code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE RecordWildCards, PatternGuards, ScopedTypeVariables #-}
module Text.HTML.TagSoup.Implementation where
import Text.HTML.TagSoup.Type
import Text.HTML.TagSoup.Options
import Text.StringLike as Str
import Numeric
import Data.Char
import Data.Ix
import Control.Exception(assert)
import Control.Arrow
--------... | silkapp/tagsoup | Text/HTML/TagSoup/Implementation.hs | bsd-3-clause | 7,682 | 0 | 16 | 2,301 | 3,571 | 1,884 | 1,687 | 146 | 29 |
module Main where
import Criterion.Types
import Criterion.Main
import Control.DeepSeq
import Data.List
import Data.Maybe
import qualified Data.HashMap.Strict as M
import qualified Data.LinkedHashSet as LS
import qualified Data.LinkedHashMap.Seq as LM1
import qualified Data.LinkedHashMap.IntMap as LM2
deep :: NFData ... | abasko/linkedhashmap | benchmarks/Main.hs | bsd-3-clause | 3,569 | 0 | 12 | 1,278 | 1,122 | 582 | 540 | 66 | 1 |
module Network.Webmachine.Resource where
| SaneApp/webmachine | src/Network/Webmachine/Resource.hs | bsd-3-clause | 41 | 0 | 3 | 3 | 7 | 5 | 2 | 1 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
{- |
This module has its own /internal exception type/ that it hides from you.
All "Control.Exception"-like functions here only work with that type;
'try' only catches exceptions of that type;
'throw' only t... | edom/pragmatic | src/Error.hs | bsd-3-clause | 5,034 | 0 | 11 | 1,008 | 868 | 463 | 405 | 44 | 1 |
--------------------------------------------------------------------
-- |
-- Module : XMonad.Util.EZConfig
-- Copyright : Devin Mullins <me@twifkak.com>
-- Brent Yorgey <byorgey@gmail.com> (key parsing)
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : Devin Mullins <me@twifkak.com... | f1u77y/xmonad-contrib | XMonad/Util/EZConfig.hs | bsd-3-clause | 26,286 | 0 | 16 | 8,532 | 3,713 | 2,297 | 1,416 | 331 | 3 |
{-# LANGUAGE OverloadedStrings, RankNTypes #-}
module Web.Scotty.Action
( addHeader
, body
, file
, files
, html
, json
, jsonData
, next
, param
, params
, raise
, raw
, readEither
, redirect
, reqHeader
, request
, rescue
, setHeader
, source... | xich/scotty | Web/Scotty/Action.hs | bsd-3-clause | 9,788 | 0 | 14 | 2,105 | 2,346 | 1,255 | 1,091 | 142 | 3 |
{-# LANGUAGE DeriveDataTypeable, TypeSynonymInstances, GeneralizedNewtypeDeriving, PatternGuards, FlexibleInstances #-}
-- | Compilation top-level staging tools
module Stage
( Stage(..), stageNames
-- * Error messages
, msg, locMsg, stageMsg
-- ** Raising errors
, fatal, fatalIO
-- ** Catching errors
, r... | girving/duck | duck/Stage.hs | bsd-3-clause | 2,828 | 1 | 10 | 629 | 915 | 489 | 426 | 80 | 1 |
{-# LANGUAGE FlexibleInstances, PatternGuards #-}
-- The Timber compiler <timber-lang.org>
--
-- Copyright 2008-2009 Johan Nordlander <nordland@csee.ltu.se>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following condi... | mattias-lundell/timber-llvm | src/Core2Kindle.hs | bsd-3-clause | 55,845 | 0 | 21 | 27,035 | 15,106 | 7,657 | 7,449 | 570 | 7 |
module App where
import Types
primWC :: Prim
primWC -- TODO
| wuxb45/eval | Eval/low/App.hs | bsd-3-clause | 62 | 0 | 4 | 13 | 16 | 10 | 6 | -1 | -1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.BasicTypes
-- Copyright : (c) Sven Panne 2002-2005
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer : sven.panne@aedion.de
-- Stability : prov... | FranklinChen/hugs98-plus-Sep2006 | packages/OpenGL/Graphics/Rendering/OpenGL/GL/BasicTypes.hs | bsd-3-clause | 2,632 | 0 | 6 | 389 | 236 | 168 | 68 | 26 | 0 |
module XMonad.Libs.Prompts (
switchPrompt
) where
import XMonad
import XMonad.Prompt
import XMonad.Prompt.Input
statusPrompt :: XPConfig -> String -> Bool -> String -> X ()
statusPrompt config prompt notify run = do
inputPromptWithCompl config prompt cFun ?+ action notify
where
comps = switchComps run
... | odi/xmonad-ext | src/XMonad/Libs/Prompts.hs | bsd-3-clause | 1,855 | 0 | 12 | 420 | 506 | 272 | 234 | 34 | 2 |
module Main where
import Text.Read
import System.Random
import Control.Monad.State
import HigherLower.Game
main :: IO ()
main = do
g <- createGame
evalStateT playGame g
createGame :: IO Game
createGame = do
low <- retryPrompt "Not a number" (promptInt "Give a lower bound")
high <- retryPrompt "Not a numbe... | fydio/HigherLower | src/Main.hs | bsd-3-clause | 1,270 | 0 | 18 | 300 | 434 | 206 | 228 | 39 | 4 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE TemplateHaskell #-}
module Ling.Reduce where
import D... | np/ling | Ling/Reduce.hs | bsd-3-clause | 11,822 | 0 | 18 | 3,714 | 4,349 | 2,183 | 2,166 | -1 | -1 |
module Web.ChatWork.Endpoints.Base (
baseURL,
ChatWorkAPI
) where
import Web.ChatWork.Internal
type ChatWorkAPI a = (Maybe RateLimit, a)
baseURL :: String
baseURL = "https://api.chatwork.com/v1"
| eiel/haskell-chatwork | src/Web/ChatWork/Endpoints/Base.hs | bsd-3-clause | 203 | 0 | 6 | 30 | 48 | 31 | 17 | 7 | 1 |
{-# OPTIONS #-}
-----------------------------------------------------------------------------
-- |
-- Module : Language.Python.Version2.Lexer
-- Copyright : (c) 2009 Bernie Pope
-- License : BSD-style
-- Maintainer : bjpop@csse.unimelb.edu.au
-- Stability : experimental
-- Portability : ghc
--
-- Lexica... | jml/language-python | src/Language/Python/Version2/Lexer.hs | bsd-3-clause | 2,246 | 0 | 14 | 436 | 358 | 207 | 151 | 33 | 2 |
module Core.Types where
type Number = Integer
data Expr a = EVar Name
| ENum Number
| EConstr Number Number
| EAp (Expr a) (Expr a)
| ELet IsRec [(a, Expr a)] (Expr a)
| ECase (Expr a) [Alter a]
| ELam [a] (Expr a)
deriving Show
ty... | Fuuzetsu/hcore | src/Core/Types.hs | bsd-3-clause | 791 | 0 | 9 | 286 | 271 | 161 | 110 | 27 | 0 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module SMACCMPilot.GCS.Commsec
( BaseId(..)
, SecureContext_HS(..)
, Context
, secPkgInit_HS
, secPkgEncInPlace_HS
, secPkgDec_HS
) where
import Data.Word
import qualified Data.ByteString as B
import Data.ByteString (ByteString)
import Crypto.Cipher.AES ... | GaloisInc/smaccmpilot-gcs-gateway | SMACCMPilot/GCS/Commsec.hs | bsd-3-clause | 5,756 | 0 | 23 | 1,470 | 1,550 | 826 | 724 | 110 | 2 |
-- Bombard a 'Clock' with 'clockGetTime' calls, to make sure this does not
-- degrade its accuracy.
import System.Time.Monotonic
import Control.Concurrent (forkOS)
import Control.Monad (forever)
main :: IO ()
main = do
clock <- newClock
putStrLn $ "Using " ++ clockDriverName clock
_ <- fo... | joeyadams/haskell-system-time-monotonic | testing/bombard.hs | bsd-3-clause | 543 | 0 | 11 | 145 | 151 | 72 | 79 | 14 | 1 |
module Parse.Expression (term, typeAnnotation, definition, expr) where
import Control.Applicative ((<$>), (<*>))
import qualified Data.List as List
import Text.Parsec hiding (newline, spaces)
import Text.Parsec.Indent (block, withPos)
import qualified Parse.Binop as Binop
import Parse.Helpers
import qualified Parse.H... | pairyo/elm-compiler | src/Parse/Expression.hs | bsd-3-clause | 8,033 | 0 | 18 | 2,651 | 2,715 | 1,354 | 1,361 | 244 | 3 |
module Idris.Imports where
import Idris.AbsSyntax
import Idris.Core.TT
import Paths_idris
import System.FilePath
import System.Directory
import Control.Monad.State.Strict
data IFileType = IDR FilePath | LIDR FilePath | IBC FilePath IFileType
deriving (Show, Eq)
srcPath :: FilePath -> FilePath
srcPath fp = let ... | ctford/Idris-Elba-dev | src/Idris/Imports.hs | bsd-3-clause | 3,075 | 0 | 13 | 1,450 | 704 | 355 | 349 | 56 | 4 |
{-# LANGUAGE MultiWayIf #-}
module Main where
import Control.Monad (when, unless)
import Data.Char (toUpper)
import Data.Maybe (fromMaybe)
import qualified ZipMenu as M
import ZipMenu (Menu (..), WithStatus, MenuStatus (..))
main :: IO ()
main = do
let loop z = do
print z
-- putStrLn $ M.drawMenu ... | masatoko/zip-menu | example/Main.hs | bsd-3-clause | 3,513 | 0 | 20 | 1,501 | 1,238 | 597 | 641 | 119 | 15 |
{-- snippet module --}
import Control.Concurrent (forkIO)
import Control.Exception (handle)
import Control.Monad (forever)
import qualified Data.ByteString.Lazy as L
import System.Console.Readline (readline)
-- Provided by the 'zlib' package on http://hackage.haskell.org/
import Codec.Compression.GZip (compress)
main... | binesiyu/ifl | examples/ch24/Compressor.hs | mit | 791 | 0 | 17 | 202 | 196 | 101 | 95 | 18 | 3 |
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
| evolutics/haskell-formatter | testsuite/resources/source/handles_options_ghc_pragma/Output.hs | gpl-3.0 | 49 | 0 | 2 | 4 | 3 | 2 | 1 | 1 | 0 |
module Main where
import Control.Monad
import HROOT
main :: IO ()
main = do
tcanvas <- newTCanvas "Test" "Test" 640 480
h1 <- newTH1F "test" "test" 100 (-5.0) 5.0
tRandom <- newTRandom 65535
let generator = gaus tRandom 0 2
let go n | n < 0 = return ()
| otherwise = do
his... | wavewave/HROOT | HROOT-generate/template/HROOT-math/example/random1d.hs | gpl-3.0 | 634 | 0 | 15 | 195 | 259 | 114 | 145 | 25 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- Derived from AWS service descriptions, licensed under Apache 2.0.
-- |
-- Module : Network.AWS.EMR.Types.Sum
-- Copyrigh... | fmapfmapfmap/amazonka | amazonka-emr/gen/Network/AWS/EMR/Types/Sum.hs | mpl-2.0 | 14,839 | 0 | 12 | 3,192 | 2,737 | 1,376 | 1,361 | 356 | 0 |
module Hailstorm.Topology
( Topology(..)
, ProcessorAddress
) where
import Hailstorm.Payload
import Hailstorm.Processor
type ProcessorHost = String
type ProcessorPort = String
type ProcessorAddress = (ProcessorHost, ProcessorPort)
class Topology t where
-- | Returns a list of processor nodes (of various types).... | hailstorm-hs/hailstorm | src/Hailstorm/Topology.hs | apache-2.0 | 802 | 0 | 10 | 210 | 169 | 98 | 71 | 20 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ViewPatterns #-}
-- | Extra Path utilities.
module Path.Extra
(toFilePathNoTrailingSep
,dropRoot
,parseCollapsedAbsDir
,parseCollapsedAbsFile
,concatAndColapseAbsDir
,rejectMissingFile
,rejectMissingDir
,pathToByteString
,pathToLazyByteString
,pathTo... | MichielDerhaeg/stack | src/Path/Extra.hs | bsd-3-clause | 4,696 | 0 | 11 | 866 | 872 | 482 | 390 | 65 | 7 |
-----------------------------------------------------------------------------
--
-- GHCi's :ctags and :etags commands
--
-- (c) The GHC Team 2005-2007
--
-----------------------------------------------------------------------------
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
module GhciTags (
createCTagsWithLineNum... | hvr/ghci-ng | ghc/GhciTags.hs | bsd-3-clause | 7,151 | 0 | 20 | 1,563 | 1,864 | 939 | 925 | 136 | 5 |
module Reddit.Routes.Captcha where
import Reddit.Types.Captcha
import Network.API.Builder.Routes
needsCaptcha :: Route
needsCaptcha = Route [ "api", "needs_captcha.json" ]
[ ]
"GET"
newCaptcha :: Route
newCaptcha = Route [ "api", "new_captcha" ]
[ ]
... | intolerable/reddit | src/Reddit/Routes/Captcha.hs | bsd-2-clause | 453 | 0 | 7 | 153 | 108 | 62 | 46 | 16 | 1 |
{-# LANGUAGE OverlappingInstances, FlexibleInstances, DeriveDataTypeable #-}
module Happstack.Server.UDP
( UDPConfig(..)
, Request(..)
, udpServer
, sendUDPMessage -- :: HostAddress -> PortNumber -> BS.ByteString -> IO ()
) where
import Control.Concurrent
import Control.Exception as E
im... | arybczak/happstack-server | src/Happstack/Server/UDP.hs | bsd-3-clause | 2,507 | 0 | 14 | 608 | 754 | 402 | 352 | 54 | 1 |
module PGIP.Output.Mime where
textC :: String
textC = "text/plain"
xmlC :: String
xmlC = "application/xml"
jsonC :: String
jsonC = "application/json"
pdfC :: String
pdfC = "application/pdf"
dotC :: String
dotC = "text/vnd.graphviz"
svgC :: String
svgC = "image/svg+xml"
htmlC :: String
htmlC = "text/html"
| keithodulaigh/Hets | PGIP/Output/Mime.hs | gpl-2.0 | 313 | 0 | 4 | 52 | 77 | 47 | 30 | 15 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- | Provide ability to upload tarballs to Hackage.
module Stack.Upload
( -- * Upload
mkUploader
, Uploader
, upload
, UploadSettings
, defaultUploadSettings
, setUploadUrl
, ... | CRogers/stack | src/Stack/Upload.hs | bsd-3-clause | 12,633 | 0 | 26 | 4,662 | 2,319 | 1,263 | 1,056 | 241 | 5 |
{-# LANGUAGE TypeFamilies, KindSignatures, TypeInType #-}
module BadUnboxedTuple where
import GHC.Exts
type family F :: TYPE UnboxedTupleRep
foo :: F -> ()
foo _ = ()
| tjakway/ghcjvm | testsuite/tests/typecheck/should_fail/BadUnboxedTuple.hs | bsd-3-clause | 171 | 0 | 6 | 30 | 42 | 24 | 18 | -1 | -1 |
{-# LANGUAGE DisambiguateRecordFields #-}
module Main where
import T15149B
import T15149C
main = do print (AnDouble{an=1}, AnInt{an=1})
| sdiehl/ghc | testsuite/tests/rename/should_compile/T15149.hs | bsd-3-clause | 136 | 0 | 10 | 17 | 44 | 27 | 17 | 5 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Backend.Internal.SDLWrap (textureDimensions, loadTexture, loadString,... | Chattered/guis | Backend/Internal/SDLWrap.hs | mit | 9,160 | 0 | 17 | 2,335 | 3,054 | 1,582 | 1,472 | 212 | 2 |
module ProjectEuler.Problem017 (solve) where
import Data.Char
toWords :: Int -> String
toWords 00 = "zero"
toWords 01 = "one"
toWords 02 = "two"
toWords 03 = "three"
toWords 04 = "four"
toWords 05 = "five"
toWords 06 = "six"
toWords 07 = "seven"
toWords 08 = "eight"
toWords 09 = "nine"
toWords 10 = "ten"
toWords 11 =... | hachibu/project-euler | src/ProjectEuler/Problem017.hs | mit | 1,285 | 0 | 10 | 358 | 505 | 254 | 251 | 51 | 2 |
main = print getProblem30Value
getProblem30Value :: Integer
getProblem30Value = sum $ filter isEqualToSumOfFifthPowersOfDigits [10..999999]
isEqualToSumOfFifthPowersOfDigits :: Integer -> Bool
isEqualToSumOfFifthPowersOfDigits num = num == (sum $ map ((^5) . read . (:[])) $ show num)
| jchitel/ProjectEuler.hs | Problems/Problem0030.hs | mit | 287 | 0 | 13 | 37 | 92 | 49 | 43 | 5 | 1 |
module Jolly.Types.System
( TVar(..)
, Type(..)
, Scheme(..)
, typeInt
, typeBool
) where
newtype TVar =
TV String
deriving (Show, Eq, Ord)
data Type
= TVar TVar
| TCon String
| TArr Type
Type
deriving (Show, Eq, Ord)
infixr `TArr`
typeInt, typeBool :: Type
typeInt = TCon "Int"
typ... | jchildren/jolly | src/Jolly/Types/System.hs | mit | 412 | 0 | 7 | 115 | 152 | 91 | 61 | 23 | 1 |
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
{-# OPTIONS_GHC -fno-warn-implicit-prelude #-}
module Paths_secret_handshake (
version,
getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Excep... | c19/Exercism-Haskell | secret-handshake/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/autogen/Paths_secret_handshake.hs | mit | 2,491 | 0 | 10 | 239 | 410 | 238 | 172 | 33 | 1 |
module Main (main) where
import qualified Haskeleton.TestBench
-- HASKELETON: import qualified New.ModuleBench
import Criterion.Main (bgroup, defaultMain)
main :: IO ()
main = defaultMain
[ bgroup "Haskeleton.Test" Haskeleton.TestBench.benchmarks
-- HASKELETON: , bgroup "New.Module" New.ModuleBench.benchmark... | Moredread/haskeleton-test | benchmark/Bench.hs | mit | 328 | 0 | 8 | 49 | 59 | 35 | 24 | 6 | 1 |
-----------------------------------------------------------------------------
--
-- Module : PhyQ.Test.Common
-- Copyright :
-- License : MIT
--
-- Maintainer : -
-- Stability :
-- Portability :
--
-- |
--
{-# LANGUAGE GADTs, PolyKinds #-}
module PhyQ.Test.Common(
correct, mistake
, B(..)
, mod... | fehu/PhysicalQuantities | test/PhyQ/Test/Common.hs | mit | 614 | 0 | 7 | 116 | 133 | 81 | 52 | -1 | -1 |
-- Example for GA package
-- see http://hackage.haskell.org/package/GA
--
-- Evolve the string "Hello World!"
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Main where
import Data.Char (chr,ord)
import Data.List (foldl')
import Syste... | cirquit/Personal-Repository | Haskell/GeneticAlgorithms/ga-testing/app/Main.hs | mit | 4,300 | 0 | 14 | 1,452 | 971 | 530 | 441 | 70 | 1 |
module DBus
(
-- * Connection management
DBusConnection
, ConnectionType(..)
, connectClient
, connectClientWithAuth
, makeServer
, connectBus
, MethodCallHandler
, SignalHandler
, checkAlive
, waitFor
, close
-- * Message handling
, objectRoot
, ignore
-- * Sig... | Philonous/d-bus | src/DBus.hs | mit | 3,446 | 0 | 10 | 909 | 613 | 402 | 211 | 111 | 1 |
{-# LANGUAGE MultiWayIf #-}
module Data.Bitsplit.Test.Types where
import Data.Bitsplit.Types
import Data.Natural
import Data.Ratio
import Data.List (genericLength)
import Control.Applicative ((<$>))
import Test.QuickCheck
addresses = ["1LizTeRZKA2MhdjjzCcFpvqfSRYSunrCsW",
"1HxoFaq36tAvAsXMzwcmRDoBK6CTZiek4... | micmarsh/bitsplit-hs | src/Data/Bitsplit/Test/Types.hs | mit | 3,768 | 0 | 14 | 1,248 | 862 | 454 | 408 | 81 | 4 |
{-# LANGUAGE OverloadedStrings #-}
module Eventful.Store.PostgresqlSpec (spec) where
import Control.Monad.Reader (ask)
import Data.ByteString (ByteString)
import qualified Data.ByteString.UTF8 as UTF8
import Data.Maybe (maybe)
import Data.Monoid ((<>))
import Data.Text (Text, intercalate)
import Database.Persist.Post... | jdreaver/eventful | eventful-postgresql/tests/Eventful/Store/PostgresqlSpec.hs | mit | 2,966 | 0 | 19 | 527 | 736 | 372 | 364 | 73 | 1 |
-- |
-- Module : Control.Auto
-- Description : Main entry point to the /auto/ library.
-- Copyright : (c) Justin Le 2015
-- License : MIT
-- Maintainer : justin@jle.im
-- Stability : unstable
-- Portability : portable
--
-- This module serves as the main entry point for the library; these are
-- all basic... | mstksg/auto | src/Control/Auto.hs | mit | 3,065 | 0 | 5 | 688 | 409 | 289 | 120 | 96 | 0 |
{-# LANGUAGE TupleSections #-}
module PureScript.Ide.Reexports where
import Data.List (union)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Maybe
import PureScript.Ide.Types
getReexports :: Module -> [ExternDecl]
getReexpo... | kRITZCREEK/psc-ide | src/PureScript/Ide/Reexports.hs | mit | 2,359 | 0 | 13 | 600 | 717 | 376 | 341 | 53 | 2 |
import Data.List
import Data.Tuple
data Context = Context Int
tagItems :: ([a], Context) -> ([(a, Int)], Context)
tagItems (ys, ctx) = swap $ mapAccumL f ctx ys
where f (Context x) y = (Context (x + 1), (y, x))
main :: IO ()
main = do
let ctx = Context 1000
(items, ctx') = tagItems (["one", "two", "three"]... | rcook/seahug-slides | snippets/folds-part-2.hs | mit | 406 | 0 | 12 | 82 | 186 | 103 | 83 | 11 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveGeneric #-}
module Lib where
import Web.Scotty
import Control.Monad.IO.Class
import Data.Aeson (FromJSON, ToJSON, object, encode)
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Simple.ToRow
import Database.PostgreSQL.Simple.FromRow
import Database.Po... | craynafinal/cs557_functional_languages | project/haskell-rest-api/src/Lib.hs | mit | 1,700 | 0 | 17 | 314 | 532 | 269 | 263 | 45 | 1 |
module Expr where
data Value = IntVal Integer
| BoolVal Bool
deriving (Eq, Show)
data Unary = UNeg | UNot deriving (Eq, Show)
evalUnary :: Unary -> Value -> Value
evalUnary UNeg (IntVal n) = IntVal (-n)
evalUnary UNot (BoolVal b) = BoolVal (not b)
evalUnary _ _ = undefined
data B... | ghulette/logic | src/Expr.hs | mit | 1,248 | 0 | 8 | 377 | 579 | 302 | 277 | 30 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Javelin.Lib.Structures where
import qualified Data.Array.IArray as Array
import qualified Data.Int as Int
import qualified Data.List as List
import qualified Data.Map.Strict as Map
import qualified Data.Word as Word
import qualified Data.Function as Function
import qualified Da... | antonlogvinenko/javelin | src/Javelin/Lib/Structures.hs | mit | 12,838 | 0 | 15 | 2,978 | 3,516 | 1,979 | 1,537 | -1 | -1 |
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, DeriveDataTypeable #-}
module Robots.Config
( Config -- abstract
, c_hull, cluster_of
, showing_hull, show_hull
, breit
, make, make_with_hull, geschichte
, move, remove, addZug
, look, robots, inhalt
, positions, goals
, valid
, bounds, area
)
where
-- $Id$
... | Erdwolf/autotool-bonn | src/Robots/Config.hs | gpl-2.0 | 4,255 | 36 | 26 | 1,194 | 1,597 | 836 | 761 | 131 | 2 |
module Rewriting.SRS.Steps where
import Rewriting.SRS.Step
import Rewriting.SRS.Raw
import Autolib.TES.Rule
import Autolib.Symbol
import Autolib.Reporter
import Autolib.ToDoc
import Autolib.Multilingual
import Data.List ( inits, tails )
import Data.Maybe
-- | list all possible rewrite steps
-- starting from given ... | marcellussiegburg/autotool | collection/src/Rewriting/SRS/Steps.hs | gpl-2.0 | 2,450 | 22 | 16 | 871 | 857 | 454 | 403 | 68 | 3 |
module Sdk where
import Data.List
import Control.Monad (msum, forM_)
testCase :: [[Int]]
testCase = [[1, 2, 3, 4, 5, 6, 7, 8, 9],
[4, 5, 6, 7, 8, 9, 1, 2, 3],
[7, 8, 9, 1, 2, 3, 4, 5, 6],
[2, 3, 4, 5, 6, 7, 8, 9, 1],
[5, 6, 7, 8, 9, 1, 2, 3, 4],
[8, 9, 1, 2,... | cetinkaya/sdkhs | Sdk.hs | gpl-3.0 | 3,474 | 0 | 12 | 1,305 | 2,021 | 1,240 | 781 | 85 | 2 |
{- ============================================================================
| Copyright 2011 Matthew D. Steele <mdsteele@alum.mit.edu> |
| |
| This file is part of Fallback. |
... | mdsteele/fallback | src/Fallback/Scenario/Areas.hs | gpl-3.0 | 5,437 | 0 | 21 | 1,386 | 1,026 | 571 | 455 | 85 | 3 |
-- Copyright : (c) Nikolay Orlyuk 2012
-- License : GNU GPLv3 (see COPYING)
module FRP.Yampa.FieldTrip.Adapter
( Anim, Anim2, Anim3
, anim2, anim3, liftAction
) where
import Control.Arrow
import Data.Monoid
import Graphics.FieldTrip hiding (frustum)
import Graphics.UI.GLUT
import FRP.Yampa (SF... | ony/yampa-fieldtrip | FRP/Yampa/FieldTrip/Adapter.hs | gpl-3.0 | 2,779 | 0 | 13 | 770 | 819 | 429 | 390 | 56 | 1 |
{-# LANGUAGE FlexibleContexts, NoMonomorphismRestriction #-}
module Main where
import Control.Monad
import Control.Monad.Identity
import Control.Monad.State
import Data.Char
import Data.List ((\\))
import Text.Megaparsec
import Text.Megaparsec.Expr
import Text.Megaparsec.Perm
import Text.Megaparsec.String
{-
Let us ... | Tuplanolla/ties341-parsing | Parsenator.hs | gpl-3.0 | 6,075 | 0 | 12 | 1,333 | 1,044 | 555 | 489 | 90 | 2 |
-- | Auxiliary operations related to numbers.
module Data.Extra.Num where
-- | Ensure that a number is positive. Negates it if
-- negative.
--
-- Same as abs, except that it does not change the number
-- if it is already positive.
--
-- TODO: any difference in speed?
ensurePos :: (Eq a, Num a) => a -> a
ensure... | keera-studios/pang-a-lambda | src/Data/Extra/Num.hs | gpl-3.0 | 1,351 | 0 | 8 | 298 | 237 | 137 | 100 | 13 | 2 |
module Main where
import Scheme
import Repl
import System.Environment
import Control.Monad.Except
main :: IO ()
main = do
args <- getArgs
case length args of
0 -> Repl.runRepl
1 -> Repl.evalAndPrint $ args !! 0
otherwise -> putStrLn "Program takes 0 or 1 argument"
| jdcannon/hascheme | app/Main.hs | gpl-3.0 | 313 | 0 | 12 | 92 | 86 | 45 | 41 | 12 | 3 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.GamesConfig... | rueshyna/gogol | gogol-games-configuration/gen/Network/Google/GamesConfiguration/Types/Product.hs | mpl-2.0 | 32,839 | 0 | 18 | 7,938 | 5,894 | 3,390 | 2,504 | 646 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.Script.Types
-- Copyright : (c) 2015-2016 Brendan Hay
... | rueshyna/gogol | gogol-script/gen/Network/Google/Script/Types.hs | mpl-2.0 | 3,966 | 0 | 7 | 782 | 455 | 296 | 159 | 89 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-script/gen/Network/Google/Resource/Script/Projects/Deployments/Update.hs | mpl-2.0 | 5,708 | 0 | 19 | 1,334 | 858 | 499 | 359 | 127 | 1 |
{-# LANGUAGE FlexibleContexts, RankNTypes #-}
module Math.Topology.KnotTh.Enumeration.EquivalenceClasses
( equivalenceClasses
) where
import Control.Monad (when, unless, forM_)
import qualified Control.Monad.State.Strict as State
import Data.Function (fix)
import qualified Data.IntDisjointSet as DS
import qual... | mishun/tangles | src/Math/Topology/KnotTh/Enumeration/EquivalenceClasses.hs | lgpl-3.0 | 3,014 | 0 | 24 | 1,222 | 1,022 | 501 | 521 | -1 | -1 |
{-
Copyright 2016, Dominic Orchard, Andrew Rice, Mistral Contrastin, Matthew Danish
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
... | dorchard/camfort | src/Camfort/Functionality.hs | apache-2.0 | 12,879 | 0 | 17 | 3,421 | 2,544 | 1,349 | 1,195 | 263 | 1 |
module ProductBroken where
mult :: a -> a -> a
mult = (*) -- this is point-free notation
| OCExercise/haskellbook-solutions | chapters/chapter06/scratch/product_broken.hs | bsd-2-clause | 90 | 0 | 6 | 19 | 25 | 16 | 9 | 3 | 1 |
module Text.Protocol.NMEA0183.Parsers.Sentence where
import Control.Applicative
import Data.Char
import qualified Data.Text as T
import Text.Protocol.NMEA0183.Types.Talker
import Text.Parser.Char
import Text.Parser.Combinators
parseTalkerId :: (Monad m, CharParsing m) => m TalkerIdentifier
parseTalkerId = parseU <|> ... | noexc/nmea0183 | src/Text/Protocol/NMEA0183/Parsers/Sentence.hs | bsd-2-clause | 2,696 | 0 | 14 | 981 | 770 | 386 | 384 | 94 | 54 |
module Yesod.Internal.Session
( encodeSession
, decodeSession
) where
import qualified Web.ClientSession as CS
import Data.Serialize
import Data.Time
import Data.ByteString (ByteString)
import Control.Monad (guard)
import Data.Text (Text, pack, unpack)
import Control.Arrow (first)
import Control.Applicativ... | chreekat/yesod | yesod-core/Yesod/Internal/Session.hs | bsd-2-clause | 1,785 | 0 | 12 | 489 | 562 | 289 | 273 | 50 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : PFSandbox
-- Note : Beispiele und Platz zum Spielen und Probieren
--
-- Diese Sandbox ist zum testen von PrimeFields gedacht.
--
-- Die main Funktion enthält Hspec unit tests.
--
-----------------------------... | maximilianhuber/softwareProjekt | src/GalFld/Sandbox/PFSandbox.hs | bsd-3-clause | 479 | 0 | 4 | 65 | 24 | 20 | 4 | 3 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Opaleye.Array where
import Opaleye.Constant (Constant,constant)
import Opaleye.Internal.Column (Column(Column),unColumn)
import Opaleye.PGTypes (PGArray,PGBool)
import Data.Profunctor.Product.Default (Default)
import qualified Opaleye.Inter... | benkolera/haskell-opaleye | src/Opaleye/Array.hs | bsd-3-clause | 674 | 0 | 11 | 87 | 229 | 128 | 101 | 12 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad.Remote.JSON
import Network.Wreq
import Data.Aeson
import Control.Lens ((^.))
import Control.Monad (void)
session :: Session
session = defaultSession Strong (\v -> do
r <- asJSON =<< post "http://129.237.120.52:3000/" v
... | roboguy13/remote-json | example/Strong/ScottyClient.hs | bsd-3-clause | 783 | 0 | 13 | 314 | 198 | 98 | 100 | 19 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Test.Handshakes where
import Crypto.Hash
import Crypto.PubKey.Curve25519
import Crypto.PubKey.RSA
import Crypto.PubKey.RSA.Types
import Control.Applicative
import Control.Monad
import Crypto.Random
import Data.ByteArray(convert,eq)
impo... | GaloisInc/haskell-tor | test/Test/Handshakes.hs | bsd-3-clause | 2,960 | 0 | 16 | 693 | 883 | 480 | 403 | 82 | 4 |
module Interpreter where
data List a = Nil | Cons a (List a)
single x = Cons x Nil
cons = Cons
| rolph-recto/liquidhaskell | tests/todo/NativeFixCrash.hs | bsd-3-clause | 105 | 0 | 8 | 32 | 43 | 24 | 19 | 4 | 1 |
-- Main.hs
-- by alemedeiros <alexandre.n.medeiros _at_ gmail.com>
--
-- Main file for musicdb, a MusicBrainz based artist information database
-- application
-- | A small project for artist/music information database using MusicBrainz as
-- a source of information (Individual Project for QMUL's ECS713 - Functional
-... | alemedeiros/musicdb | src/Main.hs | bsd-3-clause | 5,517 | 0 | 22 | 2,144 | 1,172 | 601 | 571 | 75 | 12 |
{-# LANGUAGE FlexibleContexts #-}
module Cloud.AWS.EC2.KeyPair
( describeKeyPairs
, createKeyPair
, deleteKeyPair
, importKeyPair
) where
import Data.ByteString (ByteString)
import qualified Data.ByteString.Base64 as BASE
import Data.Text (Text)
import Data.Conduit
import Control.Applicative
impo... | worksap-ate/aws-sdk | Cloud/AWS/EC2/KeyPair.hs | bsd-3-clause | 1,884 | 0 | 10 | 408 | 481 | 271 | 210 | 54 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
module Api.Projects where
import Control.Monad.IO.Class (liftIO)
import Data.Proxy
import qualified Data.Text as T
import GHC.Generics
... | pellagic-puffbomb/simpleservantblog | src/Api/Projects.hs | bsd-3-clause | 1,008 | 0 | 11 | 255 | 241 | 135 | 106 | 32 | 2 |
{-# LANGUAGE DeriveGeneric, UndecidableInstances #-}
{-# LANGUAGE TypeFamilies, BangPatterns #-}
{-# LANGUAGE RankNTypes, AllowAmbiguousTypes #-}
{-|
Immutable GPU multi-dimensional dense numeric arrays.
-}
module DeepBanana.Tensor (
Tensor(..)
-- * Basic manipulations
, dtype
, zeros
, zeros'
, ones
, ... | alexisVallet/deep-banana | src/DeepBanana/Tensor.hs | bsd-3-clause | 24,605 | 19 | 32 | 6,474 | 7,897 | 3,937 | 3,960 | -1 | -1 |
module OpenCV.Internal.C.PlacementNew ( PlacementNew(..) ) where
import "base" Foreign.Ptr ( Ptr )
--------------------------------------------------------------------------------
-- | Copy source to destination using C++'s placement new feature
class PlacementNew a where
-- | Copy source to destination using C+... | Cortlandd/haskell-opencv | src/OpenCV/Internal/C/PlacementNew.hs | bsd-3-clause | 920 | 0 | 10 | 231 | 94 | 58 | 36 | -1 | -1 |
module Chat.Bot.Hangman where
import Chat.Bot.Answer.Hangman
import Chat.Bot.Misc.Hangman
import Chat.Data
{-
LEVEL: Medium
USAGE: /hangman [guess]
Guess a number of characters, or nothing to print out the current state.
EXAMPLE:
> /hangman
____ ____ []
> /hangman ... | charleso/haskell-in-haste | src/Chat/Bot/Hangman.hs | bsd-3-clause | 2,816 | 0 | 7 | 534 | 294 | 186 | 108 | 24 | 1 |
{-# LANGUAGE TypeFamilies, EmptyDataDecls, ScopedTypeVariables, TypeOperators, UndecidableInstances #-}
import Data.Monoid
type family ftag :% a :: *
data Parametric0Tag (a :: *)
type instance Parametric0Tag a :% () = a
data Parametric1Tag (f :: * -> *)
type instance Parametric1Tag f :% a = f a
data Parametric3Ta... | batterseapower/haskell-kata | Generics2.hs | bsd-3-clause | 7,763 | 32 | 14 | 2,116 | 2,512 | 1,293 | 1,219 | -1 | -1 |
--
-- Copyright (c) 2009-2011, ERICSSON AB
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- this list... | emwap/feldspar-compiler | src/Feldspar/Compiler/Frontend/CommandLine/API/Options.hs | bsd-3-clause | 5,143 | 0 | 16 | 1,184 | 643 | 375 | 268 | 65 | 2 |
{-# LANGUAGE BangPatterns, ScopedTypeVariables #-}
import Control.Monad
import qualified Data.ByteString as B
import Data.Csv.Incremental
import System.Exit
import System.IO
main :: IO ()
main = withFile "salaries.csv" ReadMode $ \ csvFile -> do
let loop !_ (Fail _ errMsg) = putStrLn errMsg >> exitFailure
... | mikeizbicki/cassava | examples/IncrementalIndexedBasedDecode.hs | bsd-3-clause | 855 | 0 | 17 | 274 | 298 | 148 | 150 | 20 | 5 |
{-# LANGUAGE TemplateHaskell #-}
module Drawer (Drawer(Drawer),
handleDrawerEvent,
drawDrawer) where
import Control.Lens
import Brick.Widgets.Core
import Brick.Widgets.Border
import qualified Brick.Types as T
import Window
data Drawer =
Drawer { _value :: FilePath
, _options :... | JacksonGariety/earthmacs-hs | src/Drawer.hs | bsd-3-clause | 582 | 0 | 12 | 142 | 161 | 94 | 67 | 22 | 1 |
-- http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_7_D
-- Matrix Multiplication
-- input:
-- 3 2 3
-- 1 2
-- 0 3
-- 4 5
-- 1 2 1
-- 0 3 2
-- output:
-- 1 8 5
-- 0 9 6
-- 4 23 14
import Control.Applicative ((<$>), (<*>))
import qualified Control.Monad as Monad (replicateM)
import qualified Data.List as ... | ku00/aoj-haskell | src/ITP1_7_D.hs | bsd-3-clause | 945 | 0 | 13 | 194 | 313 | 178 | 135 | 20 | 1 |
{-# LANGUAGE LambdaCase, Rank2Types, TypeOperators, TypeSynonymInstances, FlexibleInstances #-}
-- ref.) https://jtobin.io/promorphisms-pre-post
module Promorphism where
import Prelude hiding (sum, Functor, fmap, map)
import Data.Bool (bool)
import FixPrime
data ListF a x = Nil | Cons a x deriving Show
type List a =... | cutsea110/aop | src/Promorphism.hs | bsd-3-clause | 3,034 | 0 | 11 | 961 | 1,100 | 571 | 529 | 67 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Hakit.Db (
Db(..),
Specials(..),
specials,
docToSpecials,
toDocStyleSort,
-- * Oid/dbRef
dbRef,
oid,
idToStr,
idOf,
idOf',
collOf,
collOf',
dbRefToStr,
strToDbRef,
strToId,
isDbRef,
isId,
) where
import H... | crufter/hakit | src/hakit/db.hs | bsd-3-clause | 9,528 | 0 | 17 | 2,454 | 2,488 | 1,312 | 1,176 | 152 | 5 |
{-|
Compiled splices are similar to the original Heist (interpreted) splices, but
without the high performance costs of traversing a DOM at runtime. Compiled
splices do all of their DOM processing at load time. They are compiled to
produce a runtime computation that generates a ByteString Builder. This
preserves th... | silkapp/heist | src/Heist/Compiled.hs | bsd-3-clause | 1,834 | 0 | 4 | 374 | 150 | 104 | 46 | 44 | 0 |
-------------------------------------------------------------------------------
---- |
---- Module : RSL.Sema
---- Copyright : (c) Syoyo Fujita
---- License : Modified BSD
----
---- Maintainer : syoyo@lucillerender.org
---- Stability : experimental
---- Portability : GHC 6.8
----
---- RSLParser : ... | chiyama/lucille | rnd/HaskellRSLCompiler/RSL/Sema.hs | bsd-3-clause | 11,675 | 0 | 14 | 3,498 | 3,310 | 1,867 | 1,443 | 180 | 1 |
module Main where
import System.Console.GetOpt
import System.Environment
import System.IO
import System.Exit
import Network.Socket (withSocketsDo)
import Network.BSD
import Scurry.Peer
import Scurry.Comm
-- import Scurry.Management.Config
-- import Scurry.Management.Tracker
import Scurry.State
import Scurry.Util(ine... | dmagyar/scurry | src/scurry.hs | bsd-3-clause | 5,244 | 0 | 17 | 2,005 | 1,141 | 612 | 529 | 93 | 7 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Serials.Link.Import where
import Prelude hiding (null)
import Control.Lens ((^.))
import Control.Applicative
import Data.Data
import Data.ByteString.Lazy (ByteString)
import Data.Maybe (fromMaybe, fromJust)
import Data.Text (unpack, Text, null,... | seanhess/serials | server/Serials/Link/Import.hs | mit | 4,405 | 0 | 10 | 692 | 779 | 437 | 342 | 58 | 3 |
import Test.Hspec
import Control.Exception (evaluate)
import Control.DeepSeq
main :: IO ()
main = hspec $ do
describe "div" $ do
it "throws an exception if the second argument is 0" $ do
evaluate (1 `div` 0 :: Int) `shouldThrow` anyArithException
describe "evaluate" $ do
it "forces exceptions" $ do
... | hspec/hspec | doc/_includes/ExceptionsFromPureCode.hs | mit | 518 | 0 | 17 | 113 | 169 | 84 | 85 | 14 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE MagicHash, UnboxedTuples,
NamedFieldPuns, BangPatterns #-}
{-# OPTIONS_HADDOCK prune #-}
#if __GLASGOW_HASKELL__ >= 701
{-# LANGUAGE Trustworthy #-}
#endif
-- |
-- Module : Data.ByteString
-- Copyright : (c) The University of Glasgow 2001,
-- (c) David... | CloudI/CloudI | src/api/haskell/external/bytestring-0.10.10.0/Data/ByteString.hs | mit | 73,893 | 0 | 20 | 21,422 | 15,007 | 7,989 | 7,018 | 974 | 7 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
-----------------------------------------------------------------------------
--
-- Module : IDE.TextEditor.Tests
-- Copyright : 2007-2013 Juergen Nicklisch-Franken, Hamish Mackenzie
-- Licens... | ChrisLane/leksah | tests/IDE/TextEditor/Tests.hs | gpl-2.0 | 6,711 | 0 | 20 | 2,218 | 1,579 | 889 | 690 | 146 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- Module : Test.AWS.MachineLearning
-- Copyright : (c) 2013-2015 Brendan Hay
-- License : This Source Code Form is subject to the terms of
-- the Mozilla Public License, v. 2.0.
-- A copy of the MPL can be found in the LICENSE file or
-- ... | fmapfmapfmap/amazonka | amazonka-ml/test/Test/AWS/MachineLearning.hs | mpl-2.0 | 772 | 0 | 5 | 201 | 73 | 50 | 23 | 11 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
{-# OPTIONS_GHC -Wall #-}
module Taygeta.Parser.Treebank
( treebank
) where
import Data.Bifunctor (first)
import Data.Foldable (foldl')
import qualified Data.Text as T
import Data.T... | erochest/taygeta-icu | src/Taygeta/Parser/Treebank.hs | apache-2.0 | 2,464 | 0 | 10 | 1,049 | 481 | 297 | 184 | 53 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QStatusTipEvent.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:27
Warning : this file is machine generated - ... | uduki/hsQt | Qtc/Gui/QStatusTipEvent.hs | bsd-2-clause | 2,418 | 0 | 12 | 371 | 572 | 304 | 268 | 52 | 1 |
module Propellor.Property.Reboot where
import Propellor
now :: Property NoInfo
now = cmdProperty "reboot" []
`describe` "reboot now"
-- | Schedules a reboot at the end of the current propellor run.
--
-- The Result code of the endire propellor run can be checked;
-- the reboot proceeds only if the function returns ... | sjfloat/propellor | src/Propellor/Property/Reboot.hs | bsd-2-clause | 907 | 2 | 10 | 175 | 180 | 89 | 91 | 18 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnboxedTuples #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Natural
-- Copyright : (C) 2014 Herbert Valerio Riedel,
-- ... | sdiehl/ghc | libraries/base/GHC/Natural.hs | bsd-3-clause | 22,987 | 0 | 12 | 4,947 | 4,086 | 2,146 | 1,940 | 159 | 2 |
-- Copyright (c) 2016, Emil Axelsson, Peter Jonsson, Anders Persson and
-- Josef Svenningsson
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of... | kmate/raw-feldspar | src/Feldspar/Data/Queue.hs | bsd-3-clause | 5,407 | 0 | 16 | 1,394 | 1,213 | 621 | 592 | -1 | -1 |
{- Joel Svensson 2012 -}
module Obsidian.Globs where
import Data.Word
---------------------------------------------------------------------------
-- Aliases
type Name = String
type NumThreads = Word32 | svenssonjoel/ObsidianGFX | Obsidian/Globs.hs | bsd-3-clause | 210 | 0 | 4 | 29 | 26 | 18 | 8 | 4 | 0 |
{- |
Module : Control.Monad.Identity
Copyright : (c) Andy Gill 2001,
(c) Oregon Graduate Institute of Science and Technology 2001,
(c) Jeff Newbern 2003-2006,
(c) Andriy Palamarchuk 2006
License : BSD-style (see the file LICENSE)
Maintainer : libraries@haske... | ekmett/mtl | Control/Monad/Identity.hs | bsd-3-clause | 1,472 | 0 | 5 | 285 | 63 | 44 | 19 | 9 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.