Search is not available for this dataset
repo_name
string
path
string
license
string
full_code
string
full_size
int64
uncommented_code
string
uncommented_size
int64
function_only_code
string
function_only_size
int64
is_commented
bool
is_signatured
bool
n_ast_errors
int64
ast_max_depth
int64
n_whitespaces
int64
n_ast_nodes
int64
n_ast_terminals
int64
n_ast_nonterminals
int64
loc
int64
cycloplexity
int64
edi-smoljan/FER-PUH-2014-Hash
Hash.hs
bsd-3-clause
runScript :: FilePath -> IO () runScript path = do handle <- openFile path ReadMode cont <- hGetContents handle coms <- case simpleParse tlexpressions cont of Left err -> do putStrLn $ show err return Nothing Right ss -> return $ Ju...
467
runScript :: FilePath -> IO () runScript path = do handle <- openFile path ReadMode cont <- hGetContents handle coms <- case simpleParse tlexpressions cont of Left err -> do putStrLn $ show err return Nothing Right ss -> return $ Ju...
467
runScript path = do handle <- openFile path ReadMode cont <- hGetContents handle coms <- case simpleParse tlexpressions cont of Left err -> do putStrLn $ show err return Nothing Right ss -> return $ Just ss when (isJust coms) $ do...
436
false
true
0
15
161
167
71
96
null
null
albertov/hs-abci
src/Network/ABCI.hs
bsd-3-clause
-- | Serve an ABCI application with custom 'ServerSettings' serveAppWith :: (MonadIO m, MonadBaseControl IO m, MonadUnliftIO m) => ServerSettings -> (SockAddr -> m (App m)) -> m () serveAppWith cfg mkApp = runGeneralTCPServer cfg $ \appData -> do app <- mkApp (appSockAddr appData) runConduit (setupConduit app a...
389
serveAppWith :: (MonadIO m, MonadBaseControl IO m, MonadUnliftIO m) => ServerSettings -> (SockAddr -> m (App m)) -> m () serveAppWith cfg mkApp = runGeneralTCPServer cfg $ \appData -> do app <- mkApp (appSockAddr appData) runConduit (setupConduit app appData) -- | Serve an ABCI application with default 'Server...
329
serveAppWith cfg mkApp = runGeneralTCPServer cfg $ \appData -> do app <- mkApp (appSockAddr appData) runConduit (setupConduit app appData) -- | Serve an ABCI application with default 'ServerSettings'
204
true
true
0
13
65
116
56
60
null
null
DanielSchuessler/hstri
TriangulationCxtObject.hs
gpl-3.0
vertexEquivalence :: Triangulation -> EnumEqvImpl TVertex vertexEquivalence tr = enumEqvImpl (pMap_safe tr) (vertices tr)
121
vertexEquivalence :: Triangulation -> EnumEqvImpl TVertex vertexEquivalence tr = enumEqvImpl (pMap_safe tr) (vertices tr)
121
vertexEquivalence tr = enumEqvImpl (pMap_safe tr) (vertices tr)
63
false
true
0
7
13
42
19
23
null
null
sgillespie/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
isAtomicHsExpr :: HsExpr id -> Bool -- True of a single token isAtomicHsExpr (HsVar {}) = True
101
isAtomicHsExpr :: HsExpr id -> Bool isAtomicHsExpr (HsVar {}) = True
75
isAtomicHsExpr (HsVar {}) = True
39
true
true
0
7
23
29
15
14
null
null
brendanhay/gogol
gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Locations/Operations/Get.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). plogUploadType :: Lens' ProjectsLocationsOperationsGet (Maybe Text) plogUploadType = lens _plogUploadType (\ s a -> s{_plogUploadType = a})
218
plogUploadType :: Lens' ProjectsLocationsOperationsGet (Maybe Text) plogUploadType = lens _plogUploadType (\ s a -> s{_plogUploadType = a})
147
plogUploadType = lens _plogUploadType (\ s a -> s{_plogUploadType = a})
79
true
true
0
8
34
49
25
24
null
null
brendanhay/gogol
gogol-gmail/gen/Network/Google/Resource/Gmail/Users/GetProFile.hs
mpl-2.0
-- | JSONP ugpfCallback :: Lens' UsersGetProFile (Maybe Text) ugpfCallback = lens _ugpfCallback (\ s a -> s{_ugpfCallback = a})
129
ugpfCallback :: Lens' UsersGetProFile (Maybe Text) ugpfCallback = lens _ugpfCallback (\ s a -> s{_ugpfCallback = a})
118
ugpfCallback = lens _ugpfCallback (\ s a -> s{_ugpfCallback = a})
67
true
true
0
9
21
48
25
23
null
null
peterokagey/haskellOEIS
src/Sandbox/Greta/TreeFunction.hs
apache-2.0
takeFromTree :: Int -> Tree -> [Forest] takeFromTree n t = recurse n [([t], [])] where recurse :: Int -> [Lumberyard] -> [Forest] recurse 0 f = map (uncurry (++)) f recurse n f = recurse (n - 1) (concatMap nextGen f)
222
takeFromTree :: Int -> Tree -> [Forest] takeFromTree n t = recurse n [([t], [])] where recurse :: Int -> [Lumberyard] -> [Forest] recurse 0 f = map (uncurry (++)) f recurse n f = recurse (n - 1) (concatMap nextGen f)
222
takeFromTree n t = recurse n [([t], [])] where recurse :: Int -> [Lumberyard] -> [Forest] recurse 0 f = map (uncurry (++)) f recurse n f = recurse (n - 1) (concatMap nextGen f)
182
false
true
0
9
47
125
65
60
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/LiterateCurry.hs
gpl-2.0
pEndLine = do updateState $ \st -> st{ synStPrevNonspace = False } context <- currentContext contexts <- synStContexts `fmap` getState st <- getState if length contexts >= 2 then case context of _ | synStContinuation st -> updateState $ \st -> st{ synStContinuation = False } ("Literate Curry",...
693
pEndLine = do updateState $ \st -> st{ synStPrevNonspace = False } context <- currentContext contexts <- synStContexts `fmap` getState st <- getState if length contexts >= 2 then case context of _ | synStContinuation st -> updateState $ \st -> st{ synStContinuation = False } ("Literate Curry",...
693
pEndLine = do updateState $ \st -> st{ synStPrevNonspace = False } context <- currentContext contexts <- synStContexts `fmap` getState st <- getState if length contexts >= 2 then case context of _ | synStContinuation st -> updateState $ \st -> st{ synStContinuation = False } ("Literate Curry",...
693
false
false
0
15
154
242
126
116
null
null
rahulmutt/ghcvm
libraries/base/GHC/Natural.hs
bsd-3-clause
plusNatural :: Natural -> Natural -> Natural plusNatural (NatS# 0##) y = y
82
plusNatural :: Natural -> Natural -> Natural plusNatural (NatS# 0##) y = y
82
plusNatural (NatS# 0##) y = y
37
false
true
0
10
20
36
16
20
null
null
lingxiao/CIS700
src/Utils.hs
bsd-3-clause
-- * element wise operation from some num to matrix -- (.+) :: Num a => a -> Matrix a -> Matrix a a .+ m = (+a) <$> m
118
(.+) :: Num a => a -> Matrix a -> Matrix a a .+ m = (+a) <$> m
62
a .+ m = (+a) <$> m
19
true
true
2
10
30
54
26
28
null
null
hvr/jhc
src/FrontEnd/KindInfer.hs
mit
kiDataKind tyconName condecls = do unless (nameType tyconName == SortName) $ fail "tycon isn't sort" flip mapM_ condecls $ \ HsConDecl { .. } -> do kc <- lookupKind KindAny hsConDeclName let args = [ KBase (KNamed t) | HsTyCon t <- map hsBangType hsConDeclConArg ] kiApps' kc args (KBase...
340
kiDataKind tyconName condecls = do unless (nameType tyconName == SortName) $ fail "tycon isn't sort" flip mapM_ condecls $ \ HsConDecl { .. } -> do kc <- lookupKind KindAny hsConDeclName let args = [ KBase (KNamed t) | HsTyCon t <- map hsBangType hsConDeclConArg ] kiApps' kc args (KBase...
340
kiDataKind tyconName condecls = do unless (nameType tyconName == SortName) $ fail "tycon isn't sort" flip mapM_ condecls $ \ HsConDecl { .. } -> do kc <- lookupKind KindAny hsConDeclName let args = [ KBase (KNamed t) | HsTyCon t <- map hsBangType hsConDeclConArg ] kiApps' kc args (KBase...
340
false
false
0
17
84
129
58
71
null
null
geophf/1HaskellADay
exercises/HAD/Y2018/M01/D04/Solution.hs
mit
insertAuthStmt :: Query insertAuthStmt = [sql|INSERT INTO author (uuid,screen_name,family_name,given_name) VALUES (?,?,?,?) returning id|]
149
insertAuthStmt :: Query insertAuthStmt = [sql|INSERT INTO author (uuid,screen_name,family_name,given_name) VALUES (?,?,?,?) returning id|]
149
insertAuthStmt = [sql|INSERT INTO author (uuid,screen_name,family_name,given_name) VALUES (?,?,?,?) returning id|]
125
false
true
0
6
23
22
11
11
null
null
ndmitchell/shake
src/Development/Shake/Internal/Core/Run.hs
bsd-3-clause
reset :: RunState -> IO () reset RunState{..} = runLocked database $ modifyAllMem database f where f (Ready r) = Loaded (snd <$> r) f (Failed _ x) = maybe Missing Loaded x f (Running _ x) = maybe Missing Loaded x -- shouldn't ever happen, but Loaded is least worst f x = x
312
reset :: RunState -> IO () reset RunState{..} = runLocked database $ modifyAllMem database f where f (Ready r) = Loaded (snd <$> r) f (Failed _ x) = maybe Missing Loaded x f (Running _ x) = maybe Missing Loaded x -- shouldn't ever happen, but Loaded is least worst f x = x
312
reset RunState{..} = runLocked database $ modifyAllMem database f where f (Ready r) = Loaded (snd <$> r) f (Failed _ x) = maybe Missing Loaded x f (Running _ x) = maybe Missing Loaded x -- shouldn't ever happen, but Loaded is least worst f x = x
285
false
true
3
7
94
120
59
61
null
null
fffej/codekatas
99Problems/31-41/Problems.hs
mit
primeFactors n | not (null divisors) = divisor : primeFactors (n `div` divisor) | otherwise = [] where divisors = filter (\x -> n `mod` x == 0) [2..n] divisor = head divisors
199
primeFactors n | not (null divisors) = divisor : primeFactors (n `div` divisor) | otherwise = [] where divisors = filter (\x -> n `mod` x == 0) [2..n] divisor = head divisors
199
primeFactors n | not (null divisors) = divisor : primeFactors (n `div` divisor) | otherwise = [] where divisors = filter (\x -> n `mod` x == 0) [2..n] divisor = head divisors
199
false
false
3
10
57
102
49
53
null
null
tathougies/crane
src/Web/Crane/Routes.hs
gpl-2.0
masterRoutes :: (CraneApp master, ActionContext ac pc, Arrow (pc master master), ArrowChoice (pc master master)) => ac master master (CraneHandler master master, AfterResponseActions master master) -> ac master master (CraneHandler master master, AfterResponseActions master master) masterRoutes = id
316
masterRoutes :: (CraneApp master, ActionContext ac pc, Arrow (pc master master), ArrowChoice (pc master master)) => ac master master (CraneHandler master master, AfterResponseActions master master) -> ac master master (CraneHandler master master, AfterResponseActions master master) masterRoutes = id
316
masterRoutes = id
17
false
true
0
10
53
112
54
58
null
null
aloiscochard/redigo
redigo-service/Main.hs
apache-2.0
prefix :: String -> ByteString -> ByteString prefix p = ByteString.append (Char8.pack (p ++ "-"))
97
prefix :: String -> ByteString -> ByteString prefix p = ByteString.append (Char8.pack (p ++ "-"))
97
prefix p = ByteString.append (Char8.pack (p ++ "-"))
52
false
true
0
9
14
42
21
21
null
null
bitemyapp/ghc
compiler/basicTypes/BasicTypes.hs
bsd-3-clause
hasOverlappingFlag :: OverlapMode -> Bool hasOverlappingFlag mode = case mode of Overlapping -> True Overlaps -> True Incoherent -> True _ -> False
183
hasOverlappingFlag :: OverlapMode -> Bool hasOverlappingFlag mode = case mode of Overlapping -> True Overlaps -> True Incoherent -> True _ -> False
183
hasOverlappingFlag mode = case mode of Overlapping -> True Overlaps -> True Incoherent -> True _ -> False
141
false
true
5
5
58
51
23
28
null
null
ailiev/faerieplay-compiler
Faerieplay/Intermediate.hs
bsd-3-clause
-- | return the total (summed) length of a type, -- which has already been expanded (ie. no SimpleT) -- use 'tblen' for f to get the length of simple types: Int, Bool, EnumT typeLength :: (Typ -> Int) -> Typ -> Int typeLength f t = let recurse = typeLength f in case t of (StructT (ts, locs...
1,868
typeLength :: (Typ -> Int) -> Typ -> Int typeLength f t = let recurse = typeLength f in case t of (StructT (ts, locs)) -> (sum $ map (recurse . snd) $ -- snd pulls out the field's type ts) ...
1,694
typeLength f t = let recurse = typeLength f in case t of (StructT (ts, locs)) -> (sum $ map (recurse . snd) $ -- snd pulls out the field's type ts) `trace` ...
1,653
true
true
0
18
947
172
95
77
null
null
music-suite/lilypond
src/Data/Music/Lilypond.hs
bsd-3-clause
addLeftToe :: Music -> Music addLeftToe = addArticulation LeftToe
65
addLeftToe :: Music -> Music addLeftToe = addArticulation LeftToe
65
addLeftToe = addArticulation LeftToe
36
false
true
0
5
8
18
9
9
null
null
duplode/threepenny-gui
src/Graphics/UI/Threepenny/Elements.hs
bsd-3-clause
olist = tag "ol"
31
olist = tag "ol"
31
olist = tag "ol"
31
false
false
0
5
18
9
4
5
null
null
kadena-io/pact
src-ghc/Pact/Server/Test.hs
bsd-3-clause
testLogDir :: FilePath testLogDir = testDir ++ "test-log/"
58
testLogDir :: FilePath testLogDir = testDir ++ "test-log/"
58
testLogDir = testDir ++ "test-log/"
35
false
true
2
6
7
23
9
14
null
null
PeterCxy/peterbot-haskell
src/Calc.hs
mit
isConstant :: CalcToken -> Maybe String isConstant (Right _) = Nothing
70
isConstant :: CalcToken -> Maybe String isConstant (Right _) = Nothing
70
isConstant (Right _) = Nothing
30
false
true
0
7
10
27
13
14
null
null
elben/typing-haskell-in-haskell
TypingHaskellInHaskell.hs
bsd-3-clause
tiExpr :: Infer Expr Type tiExpr ce as (Var i) = do sc <- find i as (ps :=> t) <- freshInst sc return (ps, t)
221
tiExpr :: Infer Expr Type tiExpr ce as (Var i) = do sc <- find i as (ps :=> t) <- freshInst sc return (ps, t)
220
tiExpr ce as (Var i) = do sc <- find i as (ps :=> t) <- freshInst sc return (ps, t)
172
false
true
1
9
137
76
33
43
null
null
pparkkin/eta
compiler/ETA/CodeGen/ArgRep.hs
bsd-3-clause
slowCallPattern (P: _) = (1, [closureType])
58
slowCallPattern (P: _) = (1, [closureType])
58
slowCallPattern (P: _) = (1, [closureType])
58
false
false
0
6
20
26
14
12
null
null
guoy34/ampersand
src/Database/Design/Ampersand/FSpec/FPA.hs
gpl-3.0
fpVal FP{fpType=UF, fpComplexity=Moeilijk} = 7
49
fpVal FP{fpType=UF, fpComplexity=Moeilijk} = 7
49
fpVal FP{fpType=UF, fpComplexity=Moeilijk} = 7
49
false
false
1
7
7
30
14
16
null
null
brendanhay/gogol
gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs
mpl-2.0
-- | Creates a value of 'StructuredMessage' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'smMessageText' -- -- * 'smMessageKey' -- -- * 'smParameters' structuredMessage :: StructuredMessage structuredMessage = StructuredMessag...
403
structuredMessage :: StructuredMessage structuredMessage = StructuredMessage' {_smMessageText = Nothing, _smMessageKey = Nothing, _smParameters = Nothing}
164
structuredMessage = StructuredMessage' {_smMessageText = Nothing, _smMessageKey = Nothing, _smParameters = Nothing}
121
true
true
0
6
66
40
28
12
null
null
tjakway/ghcjvm
compiler/basicTypes/NameSet.hs
bsd-3-clause
allUses :: DefUses -> Uses -- ^ Just like 'duUses', but 'Defs' are not eliminated from the 'Uses' returned allUses dus = foldr get emptyNameSet dus where get (_d1, u1) u2 = u1 `unionNameSet` u2
199
allUses :: DefUses -> Uses allUses dus = foldr get emptyNameSet dus where get (_d1, u1) u2 = u1 `unionNameSet` u2
119
allUses dus = foldr get emptyNameSet dus where get (_d1, u1) u2 = u1 `unionNameSet` u2
92
true
true
0
7
40
58
29
29
null
null
dysinger/amazonka
amazonka-directconnect/gen/Network/AWS/DirectConnect/CreateConnection.hs
mpl-2.0
ccrPartnerName :: Lens' CreateConnectionResponse (Maybe Text) ccrPartnerName = lens _ccrPartnerName (\s a -> s { _ccrPartnerName = a })
135
ccrPartnerName :: Lens' CreateConnectionResponse (Maybe Text) ccrPartnerName = lens _ccrPartnerName (\s a -> s { _ccrPartnerName = a })
135
ccrPartnerName = lens _ccrPartnerName (\s a -> s { _ccrPartnerName = a })
73
false
true
0
9
18
45
24
21
null
null
romanb/amazonka
amazonka-cloudwatch-logs/gen/Network/AWS/CloudWatchLogs/DeleteMetricFilter.hs
mpl-2.0
-- | 'DeleteMetricFilter' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'dmf1FilterName' @::@ 'Text' -- -- * 'dmf1LogGroupName' @::@ 'Text' -- deleteMetricFilter :: Text -- ^ 'dmf1LogGroupName' -> Text -- ^ 'dmf1FilterName' -> DeleteMetricFilter...
430
deleteMetricFilter :: Text -- ^ 'dmf1LogGroupName' -> Text -- ^ 'dmf1FilterName' -> DeleteMetricFilter deleteMetricFilter p1 p2 = DeleteMetricFilter { _dmf1LogGroupName = p1 , _dmf1FilterName = p2 }
250
deleteMetricFilter p1 p2 = DeleteMetricFilter { _dmf1LogGroupName = p1 , _dmf1FilterName = p2 }
109
true
true
0
6
104
48
31
17
null
null
vTurbine/ghc
compiler/types/Type.hs
bsd-3-clause
splitTyConApp_maybe :: Type -> Maybe (TyCon, [Type]) splitTyConApp_maybe ty | Just ty' <- coreView ty = splitTyConApp_maybe ty'
127
splitTyConApp_maybe :: Type -> Maybe (TyCon, [Type]) splitTyConApp_maybe ty | Just ty' <- coreView ty = splitTyConApp_maybe ty'
127
splitTyConApp_maybe ty | Just ty' <- coreView ty = splitTyConApp_maybe ty'
74
false
true
0
9
17
49
23
26
null
null
dinosaur-lin/haskell-game2048
src/Lib.hs
bsd-3-clause
convertVector2Str :: Int -> (V.Vector Int) -> [Char] convertVector2Str len vec = let vecStr = fmap (\x -> convertNum2Str x len) vec in foldl (\x y -> x ++ y) "" vecStr
195
convertVector2Str :: Int -> (V.Vector Int) -> [Char] convertVector2Str len vec = let vecStr = fmap (\x -> convertNum2Str x len) vec in foldl (\x y -> x ++ y) "" vecStr
195
convertVector2Str len vec = let vecStr = fmap (\x -> convertNum2Str x len) vec in foldl (\x y -> x ++ y) "" vecStr
142
false
true
0
12
59
90
44
46
null
null
brendanhay/gogol
gogol-firebase-dynamiclinks/gen/Network/Google/Resource/FirebaseDynamicLinks/ReopenAttribution.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). raUploadProtocol :: Lens' ReopenAttribution (Maybe Text) raUploadProtocol = lens _raUploadProtocol (\ s a -> s{_raUploadProtocol = a})
204
raUploadProtocol :: Lens' ReopenAttribution (Maybe Text) raUploadProtocol = lens _raUploadProtocol (\ s a -> s{_raUploadProtocol = a})
142
raUploadProtocol = lens _raUploadProtocol (\ s a -> s{_raUploadProtocol = a})
85
true
true
2
9
33
55
25
30
null
null
rgrempel/frelm.org
vendor/elm-format/parser/src/Parse/Helpers.hs
mit
commaSep1' :: IParser a -> IParser (Comments -> Comments -> [Commented a]) commaSep1' = spaceySepBy1' comma
109
commaSep1' :: IParser a -> IParser (Comments -> Comments -> [Commented a]) commaSep1' = spaceySepBy1' comma
109
commaSep1' = spaceySepBy1' comma
34
false
true
0
11
17
41
20
21
null
null
notogawa/VideoCore4
src/VideoCore4/QPU/Instruction/Register.hs
bsd-3-clause
ra8 :: Register ra8 = Register 8 [AR,AW]
40
ra8 :: Register ra8 = Register 8 [AR,AW]
40
ra8 = Register 8 [AR,AW]
24
false
true
0
6
7
22
12
10
null
null
yiannist/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
replaceDiskSec :: String replaceDiskSec = Types.replaceDisksModeToRaw ReplaceOnSecondary
88
replaceDiskSec :: String replaceDiskSec = Types.replaceDisksModeToRaw ReplaceOnSecondary
88
replaceDiskSec = Types.replaceDisksModeToRaw ReplaceOnSecondary
63
false
true
0
6
6
16
8
8
null
null
unisonweb/platform
parser-typechecker/src/Unison/CommandLine/InputPatterns.hs
mit
display :: InputPattern display = InputPattern "display" [] [(Required, definitionQueryArg)] "`display foo` prints a rendered version of the term `foo`." (\case [s] -> Input.DisplayI Input.ConsoleLocation <$> parseHashQualifiedName s _ -> Left (I.help display) )
284
display :: InputPattern display = InputPattern "display" [] [(Required, definitionQueryArg)] "`display foo` prints a rendered version of the term `foo`." (\case [s] -> Input.DisplayI Input.ConsoleLocation <$> parseHashQualifiedName s _ -> Left (I.help display) )
284
display = InputPattern "display" [] [(Required, definitionQueryArg)] "`display foo` prints a rendered version of the term `foo`." (\case [s] -> Input.DisplayI Input.ConsoleLocation <$> parseHashQualifiedName s _ -> Left (I.help display) )
260
false
true
0
12
55
82
40
42
null
null
RAFIRAF/HASKELL
mergeSort4.hs
mit
mergeTwo (x:xs) (y:ys) = if x <= y then x:mergeTwo xs (y:ys) else y:mergeTwo (x:xs) ys
86
mergeTwo (x:xs) (y:ys) = if x <= y then x:mergeTwo xs (y:ys) else y:mergeTwo (x:xs) ys
86
mergeTwo (x:xs) (y:ys) = if x <= y then x:mergeTwo xs (y:ys) else y:mergeTwo (x:xs) ys
86
false
false
0
9
15
69
36
33
null
null
mrakgr/futhark
src/Futhark/Interpreter.hs
bsd-3-clause
asPrimitive w _ = bad $ TypeError $ w ++ " asPrimitive"
55
asPrimitive w _ = bad $ TypeError $ w ++ " asPrimitive"
55
asPrimitive w _ = bad $ TypeError $ w ++ " asPrimitive"
55
false
false
0
7
11
23
11
12
null
null
Grauniad/Haskell-Euler
tools.hs
gpl-2.0
quicksort (p:xs) = (quicksort lesser) ++ [p] ++ (quicksort greater) where lesser = filter (< p) xs greater = filter (>= p) xs ---------------------------------------- -- Primes, Factors and Multiples ---------------------------------------- -- Given a list of candiatates and a target number retu...
378
quicksort (p:xs) = (quicksort lesser) ++ [p] ++ (quicksort greater) where lesser = filter (< p) xs greater = filter (>= p) xs ---------------------------------------- -- Primes, Factors and Multiples ---------------------------------------- -- Given a list of candiatates and a target number retu...
378
quicksort (p:xs) = (quicksort lesser) ++ [p] ++ (quicksort greater) where lesser = filter (< p) xs greater = filter (>= p) xs ---------------------------------------- -- Primes, Factors and Multiples ---------------------------------------- -- Given a list of candiatates and a target number retu...
378
false
false
2
8
77
82
42
40
null
null
alexbiehl/hs-ssh
src/SSH.hs
bsd-3-clause
kexDHInit :: Session () kexDHInit = do e <- net readInteger dump ("KEXDH_INIT", e) y <- io $ randIntegerOneToNMinusOne ((safePrime - 1) `div` 2) -- q? let f = modexp generator y safePrime k = modexp e y safePrime keyPair <- gets (scKeyPair . ssConfig) let pub = keyPairPublicKey keyPa...
2,302
kexDHInit :: Session () kexDHInit = do e <- net readInteger dump ("KEXDH_INIT", e) y <- io $ randIntegerOneToNMinusOne ((safePrime - 1) `div` 2) -- q? let f = modexp generator y safePrime k = modexp e y safePrime keyPair <- gets (scKeyPair . ssConfig) let pub = keyPairPublicKey keyPa...
2,302
kexDHInit = do e <- net readInteger dump ("KEXDH_INIT", e) y <- io $ randIntegerOneToNMinusOne ((safePrime - 1) `div` 2) -- q? let f = modexp generator y safePrime k = modexp e y safePrime keyPair <- gets (scKeyPair . ssConfig) let pub = keyPairPublicKey keyPair d <- digest e f ...
2,278
false
true
2
19
1,009
751
356
395
null
null
pparkkin/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
srcLocDataConKey = mkPreludeDataConUnique 37
67
srcLocDataConKey = mkPreludeDataConUnique 37
67
srcLocDataConKey = mkPreludeDataConUnique 37
67
false
false
0
5
26
9
4
5
null
null
hmb-ba/protocol
src/Kafka/Protocol/Decode.hs
mit
produceRequestParser :: Get Request produceRequestParser = do requiredAcks <- getWord16be timeout <- getWord32be numTopics <- getWord32be topics <- parseList (fromIntegral numTopics) (topicParser rqPrPartitionParser) return $ ProduceRequest requiredAcks timeout numTopics topics -- | Fetch R...
331
produceRequestParser :: Get Request produceRequestParser = do requiredAcks <- getWord16be timeout <- getWord32be numTopics <- getWord32be topics <- parseList (fromIntegral numTopics) (topicParser rqPrPartitionParser) return $ ProduceRequest requiredAcks timeout numTopics topics -- | Fetch R...
331
produceRequestParser = do requiredAcks <- getWord16be timeout <- getWord32be numTopics <- getWord32be topics <- parseList (fromIntegral numTopics) (topicParser rqPrPartitionParser) return $ ProduceRequest requiredAcks timeout numTopics topics -- | Fetch Request (Ft)
295
false
true
0
11
63
82
36
46
null
null
bredelings/BAli-Phy
haskell/PopGen/Deploid.hs
gpl-2.0
sample_reads01 counts weights haplotypes error_rate c outlier_frac = IOAction (\s->(s, f $ builtin_sample_reads01 counts' weights' haplotypes' error_rate c outlier_frac)) where counts' = list_to_vector counts weights' = list_to_vector weights haplotypes' = list_to_vector haplotypes ...
378
sample_reads01 counts weights haplotypes error_rate c outlier_frac = IOAction (\s->(s, f $ builtin_sample_reads01 counts' weights' haplotypes' error_rate c outlier_frac)) where counts' = list_to_vector counts weights' = list_to_vector weights haplotypes' = list_to_vector haplotypes ...
378
sample_reads01 counts weights haplotypes error_rate c outlier_frac = IOAction (\s->(s, f $ builtin_sample_reads01 counts' weights' haplotypes' error_rate c outlier_frac)) where counts' = list_to_vector counts weights' = list_to_vector weights haplotypes' = list_to_vector haplotypes ...
378
false
false
4
9
84
105
48
57
null
null
anekos/liname-hs
src/LiName/Actions.hs
gpl-3.0
undoAction' :: LiNamePath -> LiNameAction -> LiNamePath -> L (Either String ()) undoAction' cp (DoRename t) f = io $ doRename (cp </> t) (cp </> f)
147
undoAction' :: LiNamePath -> LiNameAction -> LiNamePath -> L (Either String ()) undoAction' cp (DoRename t) f = io $ doRename (cp </> t) (cp </> f)
147
undoAction' cp (DoRename t) f = io $ doRename (cp </> t) (cp </> f)
67
false
true
0
12
26
76
37
39
null
null
wavewave/lhc-analysis-collection
heavyhiggs/xsecgraph.hs
gpl-3.0
rdir :: WebDAVRemoteDir rdir = WebDAVRemoteDir "newtest2"
57
rdir :: WebDAVRemoteDir rdir = WebDAVRemoteDir "newtest2"
57
rdir = WebDAVRemoteDir "newtest2"
33
false
true
0
5
6
14
7
7
null
null
ohua-dev/ohua-core
tests/src/TailRecSpec.hs
epl-1.0
-- DFExpr -- [ LetExpr 1 "f" (EmbedSf "ohua.lang/array") [DFEnvVar 95] Nothing -- , LetExpr 3 ["i"] (EmbedSf "ohua.lang/id") [DFVar "e"] Nothing -- , LetExpr 4 "p" (EmbedSf "math/minus") [DFVar "i", DFEnvVar 10] Nothing -- , LetExpr 5 "x" (EmbedSf "math/lt") [DFVar "p", DFEnvVar 0] Nothi...
1,771
detect_recursion recExpr expectedExpr = findTailRecs True recExpr `shouldBe` expectedExpr
93
detect_recursion recExpr expectedExpr = findTailRecs True recExpr `shouldBe` expectedExpr
93
true
false
0
6
651
63
52
11
null
null
UBMLtonGroup/timberc
src/Termred.hs
bsd-3-clause
value (EAp (EVar (Prim _ _)) es) = all value es
79
value (EAp (EVar (Prim _ _)) es) = all value es
79
value (EAp (EVar (Prim _ _)) es) = all value es
79
false
false
0
10
42
37
17
20
null
null
sebastian-philipp/r-tree
test/RTreeStrict.hs
mit
mkA' :: Int -> Attr mkA' x = mkA [0 .. x]
41
mkA' :: Int -> Attr mkA' x = mkA [0 .. x]
41
mkA' x = mkA [0 .. x]
21
false
true
0
7
11
32
15
17
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/List.hs
mpl-2.0
-- | Select only creative field values with these IDs. cfvlIds :: Lens' CreativeFieldValuesList [Int64] cfvlIds = lens _cfvlIds (\ s a -> s{_cfvlIds = a}) . _Default . _Coerce
183
cfvlIds :: Lens' CreativeFieldValuesList [Int64] cfvlIds = lens _cfvlIds (\ s a -> s{_cfvlIds = a}) . _Default . _Coerce
128
cfvlIds = lens _cfvlIds (\ s a -> s{_cfvlIds = a}) . _Default . _Coerce
79
true
true
2
10
37
56
28
28
null
null
rfranek/duckling
Duckling/Time/FR/Rules.hs
bsd-3-clause
ruleNamedmonth3 :: Rule ruleNamedmonth3 = Rule { name = "named-month" , pattern = [ regex "mars|mar\\.?" ] , prod = \_ -> tt $ month 3 }
152
ruleNamedmonth3 :: Rule ruleNamedmonth3 = Rule { name = "named-month" , pattern = [ regex "mars|mar\\.?" ] , prod = \_ -> tt $ month 3 }
152
ruleNamedmonth3 = Rule { name = "named-month" , pattern = [ regex "mars|mar\\.?" ] , prod = \_ -> tt $ month 3 }
128
false
true
0
10
42
59
30
29
null
null
mpickering/hackage-server
Distribution/Server/Features/UserDetails.hs
bsd-3-clause
setUserNameContact :: UserId -> Text -> Text -> Update UserDetailsTable () setUserNameContact (UserId uid) name email = do UserDetailsTable tbl <- get put $! UserDetailsTable (IntMap.alter upd uid tbl) where upd Nothing = Just emptyAccountDetails { accountName = name, accountContactEmail = email }...
423
setUserNameContact :: UserId -> Text -> Text -> Update UserDetailsTable () setUserNameContact (UserId uid) name email = do UserDetailsTable tbl <- get put $! UserDetailsTable (IntMap.alter upd uid tbl) where upd Nothing = Just emptyAccountDetails { accountName = name, accountContactEmail = email }...
423
setUserNameContact (UserId uid) name email = do UserDetailsTable tbl <- get put $! UserDetailsTable (IntMap.alter upd uid tbl) where upd Nothing = Just emptyAccountDetails { accountName = name, accountContactEmail = email } upd (Just udetails) = Just udetails { accountName = name, a...
348
false
true
0
11
93
134
67
67
null
null
dgonyeo/hydrazine
src/Hydrazine/JSON.hs
mit
returnEmptyValue :: a -> EitherT ServantErr IO EmptyValue returnEmptyValue _ = right $ EmptyValue 1
99
returnEmptyValue :: a -> EitherT ServantErr IO EmptyValue returnEmptyValue _ = right $ EmptyValue 1
99
returnEmptyValue _ = right $ EmptyValue 1
41
false
true
0
6
14
36
16
20
null
null
lally/libmet
test/Ppt/LayoutSpec.hs
bsd-3-clause
prop_sameOffsets :: (Frame, Frame) -> Bool prop_sameOffsets (a, b) = sameOffsets [a,b]
86
prop_sameOffsets :: (Frame, Frame) -> Bool prop_sameOffsets (a, b) = sameOffsets [a,b]
86
prop_sameOffsets (a, b) = sameOffsets [a,b]
43
false
true
0
6
11
39
22
17
null
null
ford-prefect/haskell-gi
lib/Data/GI/CodeGen/CodeGen.hs
lgpl-2.1
genMethod :: Name -> Method -> ExcCodeGen () genMethod cn m@(Method { methodName = mn, methodSymbol = sym, methodCallable = c, methodType = t }) = do let name' = upperName cn returnsGObject <- maybe (return False) isGObject ...
992
genMethod :: Name -> Method -> ExcCodeGen () genMethod cn m@(Method { methodName = mn, methodSymbol = sym, methodCallable = c, methodType = t }) = do let name' = upperName cn returnsGObject <- maybe (return False) isGObject ...
992
genMethod cn m@(Method { methodName = mn, methodSymbol = sym, methodCallable = c, methodType = t }) = do let name' = upperName cn returnsGObject <- maybe (return False) isGObject (returnType c) line $ "-- method " <> nam...
947
false
true
23
14
352
280
142
138
null
null
daleooo/barrelfish
tools/mackerel/Checks.hs
mit
check_undef_regtypes :: Dev.Rec -> [ MacError ] check_undef_regtypes d = [ make r | r <- (Dev.registers d), not (check r (Dev.types d)) ] where check r ttbl = TN.is_builtin_type (RT.typename r) || elem (RT.typename r) [ (TT.tt_name t) | t <- (Dev.types d)] make r = (MacError (R...
470
check_undef_regtypes :: Dev.Rec -> [ MacError ] check_undef_regtypes d = [ make r | r <- (Dev.registers d), not (check r (Dev.types d)) ] where check r ttbl = TN.is_builtin_type (RT.typename r) || elem (RT.typename r) [ (TT.tt_name t) | t <- (Dev.types d)] make r = (MacError (R...
470
check_undef_regtypes d = [ make r | r <- (Dev.registers d), not (check r (Dev.types d)) ] where check r ttbl = TN.is_builtin_type (RT.typename r) || elem (RT.typename r) [ (TT.tt_name t) | t <- (Dev.types d)] make r = (MacError (RT.pos r) (printf "Register '%s' ...
422
false
true
1
12
151
203
98
105
null
null
osa1/chsc
StaticFlags.hs
bsd-3-clause
-- NB: need a bloat factor of at least 5 to get append/append fusion to work. -- The critical point is: -- -- let (++) = ... -- in case (case xs of [] -> ys -- (x:xs) -> x : (xs ++ ys)) of -- [] -> zs -- (x:xs) -> x : (xs ++ zs) -- -- We need to duplicate the case continuat...
1,058
sPECULATION :: Bool sPECULATION = not $ "--no-speculation" `elem` aRGS
70
sPECULATION = not $ "--no-speculation" `elem` aRGS
50
true
true
2
6
276
54
37
17
null
null
anton-k/sharc-timbre
src/Sharc/Instruments/BassClarinet.hs
bsd-3-clause
note8 :: Note note8 = Note (Pitch 110.0 33 "a2") 9 (Range (NoteRange (NoteRangeAmplitude 5060.0 46 1.07) (NoteRangeHarmonicFreq 1 110.0)) (NoteRange (NoteRangeAmplitude 110.0 1 3048.0) (NoteRangeHarmonicFreq 90 9900.0))) [Harmonic 1 0.305 3...
2,989
note8 :: Note note8 = Note (Pitch 110.0 33 "a2") 9 (Range (NoteRange (NoteRangeAmplitude 5060.0 46 1.07) (NoteRangeHarmonicFreq 1 110.0)) (NoteRange (NoteRangeAmplitude 110.0 1 3048.0) (NoteRangeHarmonicFreq 90 9900.0))) [Harmonic 1 0.305 3...
2,989
note8 = Note (Pitch 110.0 33 "a2") 9 (Range (NoteRange (NoteRangeAmplitude 5060.0 46 1.07) (NoteRangeHarmonicFreq 1 110.0)) (NoteRange (NoteRangeAmplitude 110.0 1 3048.0) (NoteRangeHarmonicFreq 90 9900.0))) [Harmonic 1 0.305 3048.0 ,Har...
2,975
false
true
0
11
823
1,180
609
571
null
null
frenetic-lang/nettle-openflow
src/Nettle/OpenFlow/MessagesBinary.hs
bsd-3-clause
actionType2Code VendorActionType = 0xffff
41
actionType2Code VendorActionType = 0xffff
41
actionType2Code VendorActionType = 0xffff
41
false
false
0
5
3
9
4
5
null
null
hlian/zwischenzug
Canvas.hs
bsd-3-clause
triangle = gon 3
16
triangle = gon 3
16
triangle = gon 3
16
false
false
1
5
3
13
4
9
null
null
wavewave/hoodle-core
src/Hoodle/Type/Canvas.hs
gpl-3.0
-- | mDrawSurface :: Simple Lens (CanvasInfo a) (Maybe Surface) mDrawSurface = lens _mDrawSurface (\f a -> f { _mDrawSurface = a })
133
mDrawSurface :: Simple Lens (CanvasInfo a) (Maybe Surface) mDrawSurface = lens _mDrawSurface (\f a -> f { _mDrawSurface = a })
126
mDrawSurface = lens _mDrawSurface (\f a -> f { _mDrawSurface = a })
67
true
true
1
9
24
57
29
28
null
null
brendanhay/gogol
gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Locations/Buckets/Patch.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). balbpUploadProtocol :: Lens' BillingAccountsLocationsBucketsPatch (Maybe Text) balbpUploadProtocol = lens _balbpUploadProtocol (\ s a -> s{_balbpUploadProtocol = a})
235
balbpUploadProtocol :: Lens' BillingAccountsLocationsBucketsPatch (Maybe Text) balbpUploadProtocol = lens _balbpUploadProtocol (\ s a -> s{_balbpUploadProtocol = a})
173
balbpUploadProtocol = lens _balbpUploadProtocol (\ s a -> s{_balbpUploadProtocol = a})
94
true
true
0
9
33
48
25
23
null
null
rueshyna/gogol
gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs
mpl-2.0
-- | Whether the destination is required, excluded, selected by default or -- should be validated. psdsIntention :: Lens' ProductStatusDestinationStatus (Maybe Text) psdsIntention = lens _psdsIntention (\ s a -> s{_psdsIntention = a})
242
psdsIntention :: Lens' ProductStatusDestinationStatus (Maybe Text) psdsIntention = lens _psdsIntention (\ s a -> s{_psdsIntention = a})
143
psdsIntention = lens _psdsIntention (\ s a -> s{_psdsIntention = a})
76
true
true
0
8
40
50
26
24
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpFixity IntEqOp = Just (Fixity 4 InfixN)
45
primOpFixity IntEqOp = Just (Fixity 4 InfixN)
45
primOpFixity IntEqOp = Just (Fixity 4 InfixN)
45
false
false
0
7
6
20
9
11
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs
mpl-2.0
-- | The percent change against the price target. Valid from 0 to 100 -- inclusively. rrsbrPercentageDelta :: Lens' RepricingRuleStatsBasedRule (Maybe Int32) rrsbrPercentageDelta = lens _rrsbrPercentageDelta (\ s a -> s{_rrsbrPercentageDelta = a}) . mapping _Coerce
279
rrsbrPercentageDelta :: Lens' RepricingRuleStatsBasedRule (Maybe Int32) rrsbrPercentageDelta = lens _rrsbrPercentageDelta (\ s a -> s{_rrsbrPercentageDelta = a}) . mapping _Coerce
193
rrsbrPercentageDelta = lens _rrsbrPercentageDelta (\ s a -> s{_rrsbrPercentageDelta = a}) . mapping _Coerce
121
true
true
0
10
49
56
29
27
null
null
rwoll-hmc/project
src/Interp.hs
mit
-- | Generator a fresh key to be used in a Map based on the highest index. genKey :: (Enum k, Bounded k) => Map.Map k v -> k genKey m | null m = minBound | otherwise = succ $ fst (Map.findMax m)
198
genKey :: (Enum k, Bounded k) => Map.Map k v -> k genKey m | null m = minBound | otherwise = succ $ fst (Map.findMax m)
123
genKey m | null m = minBound | otherwise = succ $ fst (Map.findMax m)
73
true
true
2
9
47
83
37
46
null
null
mitchellwrosen/dohaskell
src/Model/Resource/Internal.hs
bsd-3-clause
shortDescResourceType CommunitySite = "community website"
61
shortDescResourceType CommunitySite = "community website"
61
shortDescResourceType CommunitySite = "community website"
61
false
false
0
5
8
9
4
5
null
null
sapek/pandoc
src/Text/Pandoc/Writers/ConTeXt.hs
gpl-2.0
inlineToConTeXt (Span _ ils) = inlineListToConTeXt ils
54
inlineToConTeXt (Span _ ils) = inlineListToConTeXt ils
54
inlineToConTeXt (Span _ ils) = inlineListToConTeXt ils
54
false
false
0
7
6
20
9
11
null
null
divarvel/hammertime
src/Hammertime/Main.hs
gpl-3.0
timeSpanToRange :: Types.TimeSpan -> UTCTime -> Types.TimeRange timeSpanToRange Types.Day now@(UTCTime day dt) = (UTCTime (addDays (-1) day) dt, now)
149
timeSpanToRange :: Types.TimeSpan -> UTCTime -> Types.TimeRange timeSpanToRange Types.Day now@(UTCTime day dt) = (UTCTime (addDays (-1) day) dt, now)
149
timeSpanToRange Types.Day now@(UTCTime day dt) = (UTCTime (addDays (-1) day) dt, now)
85
false
true
0
10
18
65
34
31
null
null
mariefarrell/Hets
CSL/AnEvenTool.hs
gpl-2.0
predecessorsOf :: Ord a => Map.Map a [a] -- the relation -> a -- the element -> [a] -- the predecessors predecessorsOf rel el = Map.keys $ Map.filter (elem el) rel
197
predecessorsOf :: Ord a => Map.Map a [a] -- the relation -> a -- the element -> [a] predecessorsOf rel el = Map.keys $ Map.filter (elem el) rel
173
predecessorsOf rel el = Map.keys $ Map.filter (elem el) rel
59
true
true
0
10
64
71
35
36
null
null
niswegmann/copilot-language
src/Copilot/Language/Operators/Constant.hs
bsd-3-clause
-------------------------------------------------------------------------------- constB :: Bool -> Stream Bool constB = constant
133
constB :: Bool -> Stream Bool constB = constant
51
constB = constant
19
true
true
0
6
14
19
10
9
null
null
JohnLato/iteratee
tests/testIteratee.hs
bsd-3-clause
mk_prop_pt_id etee p_etee i xs(Positive n) = runner1 (enumSpecial xs n $ joinI (p_etee i)) == runner1 (enumSpecial xs n $ joinI (etee i)) where types = (etee, p_etee, i, xs) :: (Etee, Etee, Itee, [Int])
207
mk_prop_pt_id etee p_etee i xs(Positive n) = runner1 (enumSpecial xs n $ joinI (p_etee i)) == runner1 (enumSpecial xs n $ joinI (etee i)) where types = (etee, p_etee, i, xs) :: (Etee, Etee, Itee, [Int])
207
mk_prop_pt_id etee p_etee i xs(Positive n) = runner1 (enumSpecial xs n $ joinI (p_etee i)) == runner1 (enumSpecial xs n $ joinI (etee i)) where types = (etee, p_etee, i, xs) :: (Etee, Etee, Itee, [Int])
207
false
false
3
10
40
111
58
53
null
null
kernelim/leveldb-haskell
src/Database/LevelDB/MonadResource.hs
bsd-3-clause
-- | An iterator is either positioned at a key/value pair, or not valid. This -- function returns /true/ iff the iterator is valid. iterValid :: MonadResource m => Iterator -> m Bool iterValid = Base.iterValid
209
iterValid :: MonadResource m => Iterator -> m Bool iterValid = Base.iterValid
77
iterValid = Base.iterValid
26
true
true
0
7
35
29
15
14
null
null
brendanhay/gogol
gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Builds/Cancel.hs
mpl-2.0
-- | JSONP pbcCallback :: Lens' ProjectsBuildsCancel (Maybe Text) pbcCallback = lens _pbcCallback (\ s a -> s{_pbcCallback = a})
130
pbcCallback :: Lens' ProjectsBuildsCancel (Maybe Text) pbcCallback = lens _pbcCallback (\ s a -> s{_pbcCallback = a})
119
pbcCallback = lens _pbcCallback (\ s a -> s{_pbcCallback = a})
64
true
true
0
9
21
48
25
23
null
null
nevrenato/Hets_Fork
Common/Partial.hs
gpl-2.0
-- | split a list of elements into equivalence classes equivBy :: POrder a -> [a] -> [[a]] equivBy order l = equiv0 [] l where equiv0 = foldl add add cs x = case cs of [] -> [[x]] [] : _ -> error "Partial.equivBy" c@(y : _) : r -> case order x y of Just EQ -> (x : c) : r _ -> c : add r x --...
387
equivBy :: POrder a -> [a] -> [[a]] equivBy order l = equiv0 [] l where equiv0 = foldl add add cs x = case cs of [] -> [[x]] [] : _ -> error "Partial.equivBy" c@(y : _) : r -> case order x y of Just EQ -> (x : c) : r _ -> c : add r x -- | split a set into the minimal elements and the remain...
332
equivBy order l = equiv0 [] l where equiv0 = foldl add add cs x = case cs of [] -> [[x]] [] : _ -> error "Partial.equivBy" c@(y : _) : r -> case order x y of Just EQ -> (x : c) : r _ -> c : add r x -- | split a set into the minimal elements and the remaining elements
296
true
true
2
13
113
176
84
92
null
null
urbanslug/ghc
testsuite/tests/safeHaskell/safeLanguage/SafeLang04.hs
bsd-3-clause
key = T3
8
key = T3
8
key = T3
8
false
false
1
5
2
10
3
7
null
null
aartamonau/repo-bisect
src/Repo/Snapshot.hs
gpl-3.0
checkoutSnapshot :: IsOid (Oid r) => Snapshot r -> IO () checkoutSnapshot = uncurry (zipWithM_ checkoutRef) . unzip . unSnapshot
128
checkoutSnapshot :: IsOid (Oid r) => Snapshot r -> IO () checkoutSnapshot = uncurry (zipWithM_ checkoutRef) . unzip . unSnapshot
128
checkoutSnapshot = uncurry (zipWithM_ checkoutRef) . unzip . unSnapshot
71
false
true
0
9
19
53
25
28
null
null
peterokagey/haskellOEIS
test/AlecSequences/A271471Spec.hs
apache-2.0
spec :: Spec spec = describe "A271471" $ it "correctly computes the first 5 elements" $ take 5 (map a271471 [1..]) `shouldBe` expectedValue where expectedValue = [5,17,28,37,82]
189
spec :: Spec spec = describe "A271471" $ it "correctly computes the first 5 elements" $ take 5 (map a271471 [1..]) `shouldBe` expectedValue where expectedValue = [5,17,28,37,82]
189
spec = describe "A271471" $ it "correctly computes the first 5 elements" $ take 5 (map a271471 [1..]) `shouldBe` expectedValue where expectedValue = [5,17,28,37,82]
176
false
true
3
7
38
84
40
44
null
null
vvmann/tyckiting-bot
clients/haskell/src/Tyckiting/AI/Joker.hs
mit
jokerAI :: AI jokerAI = mkNDAI move mkInitialState
50
jokerAI :: AI jokerAI = mkNDAI move mkInitialState
50
jokerAI = mkNDAI move mkInitialState
36
false
true
0
5
7
16
8
8
null
null
bhickey/TreeStructures
Data/Heap/Binary.hs
bsd-3-clause
rank (Node _ d _ _) = d
23
rank (Node _ d _ _) = d
23
rank (Node _ d _ _) = d
23
false
false
0
6
7
22
10
12
null
null
spacekitteh/smcghc
ghc/Main.hs
bsd-3-clause
----------------------------------------------------------------------------- -- ToDo: -- time commands when run with -v -- user ways -- Win32 support: proper signal handling -- reading the package configuration file is too slow -- -K<size> -----------------------------------------------------------------------------...
2,620
main :: IO () main = do initGCStatistics -- See Note [-Bsymbolic and hooks] hSetBuffering stdout LineBuffering hSetBuffering stderr LineBuffering GHC.defaultErrorHandler defaultFatalMessager defaultFlushOut $ do -- 1. extract the -B flag from the args argv0 <- getArgs let (minusB_args, argv1) =...
2,266
main = do initGCStatistics -- See Note [-Bsymbolic and hooks] hSetBuffering stdout LineBuffering hSetBuffering stderr LineBuffering GHC.defaultErrorHandler defaultFatalMessager defaultFlushOut $ do -- 1. extract the -B flag from the args argv0 <- getArgs let (minusB_args, argv1) = partition ("-...
2,252
true
true
1
29
821
383
185
198
null
null
yanatan16/haskell-chp-wc
src/Data/WordCount/CHP/Core.hs
mit
wordCounter :: CHPCounter wordCounter = CHPCounter $ words' <=> counter where counter = count upWords :: Chanin String -> Chanout Counts -> CHP ()
148
wordCounter :: CHPCounter wordCounter = CHPCounter $ words' <=> counter where counter = count upWords :: Chanin String -> Chanout Counts -> CHP ()
148
wordCounter = CHPCounter $ words' <=> counter where counter = count upWords :: Chanin String -> Chanout Counts -> CHP ()
122
false
true
0
8
25
52
25
27
null
null
IanConnolly/aws-sdk-fork
AWS/EC2/Tag.hs
bsd-3-clause
describeTags :: (MonadResource m, MonadBaseControl IO m) => [Filter] -- ^ Filters -> EC2 m (ResumableSource m Tag) describeTags filters = ec2QuerySource "DescribeTags" params $ itemConduit "tagSet" $ Tag <$> getT "resourceId" <*> getT "resourceType" <*> getT "key" ...
381
describeTags :: (MonadResource m, MonadBaseControl IO m) => [Filter] -- ^ Filters -> EC2 m (ResumableSource m Tag) describeTags filters = ec2QuerySource "DescribeTags" params $ itemConduit "tagSet" $ Tag <$> getT "resourceId" <*> getT "resourceType" <*> getT "key" ...
381
describeTags filters = ec2QuerySource "DescribeTags" params $ itemConduit "tagSet" $ Tag <$> getT "resourceId" <*> getT "resourceType" <*> getT "key" <*> getT "value" where params = [filtersParam filters]
254
false
true
0
11
107
110
53
57
null
null
Isweet/ppa
src/PPA/Lang/While/Util.hs
gpl-3.0
blocks (SWhile b l s) = Set.unions [Set.singleton $ BBExp b l, blocks s]
73
blocks (SWhile b l s) = Set.unions [Set.singleton $ BBExp b l, blocks s]
73
blocks (SWhile b l s) = Set.unions [Set.singleton $ BBExp b l, blocks s]
73
false
false
0
8
14
45
21
24
null
null
Raveline/lambdacula
test/SpecAction.hs
gpl-3.0
examine = Transitive Examine "examine" [] ["with"] False
56
examine = Transitive Examine "examine" [] ["with"] False
56
examine = Transitive Examine "examine" [] ["with"] False
56
false
false
1
6
7
26
11
15
null
null
andrewMacmurray/haskell-book-solutions
src/ch23/Exercises.hs
mit
get :: State s s get = State (\s -> (s, s))
43
get :: State s s get = State (\s -> (s, s))
43
get = State (\s -> (s, s))
26
false
true
0
8
11
33
18
15
null
null
IreneKnapp/Faction
faction/Distribution/Client/Init.hs
bsd-3-clause
-- | Get the package name: use the package directory (supplied, or the current -- directory by default) as a guess. getPackageName :: InitFlags -> IO InitFlags getPackageName flags = do guess <- traverse guessPackageName (flagToMaybe $ packageDir flags) ?>> Just `fmap` (getCurrentDirectory >>= ...
651
getPackageName :: InitFlags -> IO InitFlags getPackageName flags = do guess <- traverse guessPackageName (flagToMaybe $ packageDir flags) ?>> Just `fmap` (getCurrentDirectory >>= guessPackageName) pkgName' <- return (flagToMaybe $ packageName flags) ?>> maybePrompt flags (pro...
533
getPackageName flags = do guess <- traverse guessPackageName (flagToMaybe $ packageDir flags) ?>> Just `fmap` (getCurrentDirectory >>= guessPackageName) pkgName' <- return (flagToMaybe $ packageName flags) ?>> maybePrompt flags (promptStr "Package name" guess) ?...
489
true
true
0
13
153
126
63
63
null
null
SnipyJulmy/mcs_notes_and_resume
fun-and-log-prog/exercices/s02/S02_Julmy_Sylvain/s02.hs
lgpl-3.0
f1 (a:b:c:xs) = [a,b,c]
23
f1 (a:b:c:xs) = [a,b,c]
23
f1 (a:b:c:xs) = [a,b,c]
23
false
false
0
8
3
34
18
16
null
null
hvr/vector
Data/Vector/Fusion/Stream/Monadic.hs
bsd-3-clause
emptyStream = "empty stream"
28
emptyStream = "empty stream"
28
emptyStream = "empty stream"
28
false
false
1
5
3
10
3
7
null
null
urbanslug/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
isExpandableUnfolding :: Unfolding -> Bool isExpandableUnfolding (CoreUnfolding { uf_expandable = is_expable }) = is_expable
124
isExpandableUnfolding :: Unfolding -> Bool isExpandableUnfolding (CoreUnfolding { uf_expandable = is_expable }) = is_expable
124
isExpandableUnfolding (CoreUnfolding { uf_expandable = is_expable }) = is_expable
81
false
true
3
7
13
37
17
20
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Pos/Get.hs
mpl-2.0
-- | Creates a value of 'PosGet' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'pXgafv' -- -- * 'pMerchantId' -- -- * 'pStoreCode' -- -- * 'pUploadProtocol' -- -- * 'pAccessToken' -- -- * 'pUploadType' -- -- * 'pTargetMerchantId' -- ...
809
posGet :: Word64 -- ^ 'pMerchantId' -> Text -- ^ 'pStoreCode' -> Word64 -- ^ 'pTargetMerchantId' -> PosGet posGet pPMerchantId_ pPStoreCode_ pPTargetMerchantId_ = PosGet' { _pXgafv = Nothing , _pMerchantId = _Coerce # pPMerchantId_ , _pStoreCode = pPStoreCode_ , _pUploadProtocol = Noth...
472
posGet pPMerchantId_ pPStoreCode_ pPTargetMerchantId_ = PosGet' { _pXgafv = Nothing , _pMerchantId = _Coerce # pPMerchantId_ , _pStoreCode = pPStoreCode_ , _pUploadProtocol = Nothing , _pAccessToken = Nothing , _pUploadType = Nothing , _pTargetMerchantId = _Coerce # pPTargetMerchantId_ ...
349
true
true
0
9
176
119
76
43
null
null
SAdams601/ParRegexSearch
src/SearchOutputFile.hs
mit
parseApp = App <$ string "Applicative"
38
parseApp = App <$ string "Applicative"
38
parseApp = App <$ string "Applicative"
38
false
false
3
5
5
18
6
12
null
null
authchir/mini-ml
src/Interpreter.hs
isc
eval env (App _ (ExternVar _ f) t2) = do v2 <- eval env t2 case v2 of (ConstInt n) -> do !fun <- Data.List.lookup f externalFunctions let !n' = fun (fromInteger n) return (ConstInt (toInteger n')) _ -> Nothing
240
eval env (App _ (ExternVar _ f) t2) = do v2 <- eval env t2 case v2 of (ConstInt n) -> do !fun <- Data.List.lookup f externalFunctions let !n' = fun (fromInteger n) return (ConstInt (toInteger n')) _ -> Nothing
240
eval env (App _ (ExternVar _ f) t2) = do v2 <- eval env t2 case v2 of (ConstInt n) -> do !fun <- Data.List.lookup f externalFunctions let !n' = fun (fromInteger n) return (ConstInt (toInteger n')) _ -> Nothing
240
false
false
0
17
70
122
54
68
null
null
mihaimaruseac/book-of-marks
src-test/Main.hs
isc
case_dec_above :: Assertion case_dec_above = negate (inc (negate 43)) @?= (42 :: Int)
85
case_dec_above :: Assertion case_dec_above = negate (inc (negate 43)) @?= (42 :: Int)
85
case_dec_above = negate (inc (negate 43)) @?= (42 :: Int)
57
false
true
0
10
12
36
19
17
null
null
mruegenberg/Hs-Game
Main.hs
bsd-3-clause
colPlayer = 2
13
colPlayer = 2
13
colPlayer = 2
13
false
false
0
4
2
6
3
3
null
null
timbod7/terraform-hs
scripts/generate.hs
bsd-3-clause
clines :: [T.Text] -> Code clines lines = mconcat (map CLine lines)
67
clines :: [T.Text] -> Code clines lines = mconcat (map CLine lines)
67
clines lines = mconcat (map CLine lines)
40
false
true
0
7
11
34
17
17
null
null
mattias-lundell/timber-llvm
src/Env.hs
bsd-3-clause
pswap (p,n) = (n, p)
48
pswap (p,n) = (n, p)
48
pswap (p,n) = (n, p)
48
false
false
0
6
32
21
12
9
null
null
michaelficarra/purescript
src/Language/PureScript/CodeGen/JS/Optimizer/Inliner.hs
mit
isDict _ _ = False
18
isDict _ _ = False
18
isDict _ _ = False
18
false
false
0
5
4
11
5
6
null
null
wkoiking/fieldequip
src/Backend.hs
bsd-3-clause
groupNonSRSStations :: [StationData] -> [(Int, Double, StationName)] groupNonSRSStations ss = case span isNotIL ss of ([], []) -> [] ([], (r:ss)) -> groupNonSRSStations' (r:ss) (bbs@(b:bs), (r:ss)) -> (length bbs, pos r - pos b, nearestFromCenter ((pos r + pos b) / 2) bbs) : groupNonSRSStations' (r:ss) ...
436
groupNonSRSStations :: [StationData] -> [(Int, Double, StationName)] groupNonSRSStations ss = case span isNotIL ss of ([], []) -> [] ([], (r:ss)) -> groupNonSRSStations' (r:ss) (bbs@(b:bs), (r:ss)) -> (length bbs, pos r - pos b, nearestFromCenter ((pos r + pos b) / 2) bbs) : groupNonSRSStations' (r:ss) ...
436
groupNonSRSStations ss = case span isNotIL ss of ([], []) -> [] ([], (r:ss)) -> groupNonSRSStations' (r:ss) (bbs@(b:bs), (r:ss)) -> (length bbs, pos r - pos b, nearestFromCenter ((pos r + pos b) / 2) bbs) : groupNonSRSStations' (r:ss) (bs, []) -> [(length bs, pos (last bs) - pos (head bs), nearestFromCe...
367
false
true
0
17
84
269
142
127
null
null
ClathomasPrime/ImpCore
uScheme/src/CLI.hs
bsd-3-clause
uScheme :: IO () uScheme = do args <- Arg.getArgs case args of "--repl":fileName:args' -> outputM $ replWith fileName args' ["--repl"] -> outputM $ repl 0 defaultEnv ["--help"] -> putStr usage fileName:args' -> outputM $ interpret fileName args' _ -> putStr usage
320
uScheme :: IO () uScheme = do args <- Arg.getArgs case args of "--repl":fileName:args' -> outputM $ replWith fileName args' ["--repl"] -> outputM $ repl 0 defaultEnv ["--help"] -> putStr usage fileName:args' -> outputM $ interpret fileName args' _ -> putStr usage
320
uScheme = do args <- Arg.getArgs case args of "--repl":fileName:args' -> outputM $ replWith fileName args' ["--repl"] -> outputM $ repl 0 defaultEnv ["--help"] -> putStr usage fileName:args' -> outputM $ interpret fileName args' _ -> putStr usage
303
false
true
0
12
98
119
55
64
null
null
CloudI/CloudI
src/api/haskell/external/network-3.1.0.1/Network/Socket/ByteString/Lazy/Posix.hs
mit
sendAll s bs = do sent <- send s bs waitWhen0 (fromIntegral sent) s when (sent >= 0) $ sendAll s $ L.drop sent bs
125
sendAll s bs = do sent <- send s bs waitWhen0 (fromIntegral sent) s when (sent >= 0) $ sendAll s $ L.drop sent bs
125
sendAll s bs = do sent <- send s bs waitWhen0 (fromIntegral sent) s when (sent >= 0) $ sendAll s $ L.drop sent bs
125
false
false
0
11
36
68
30
38
null
null