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
mcschroeder/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
pprPat i (SigP p t) = parensIf (i > noPrec) $ ppr p <+> dcolon <+> ppr t
72
pprPat i (SigP p t) = parensIf (i > noPrec) $ ppr p <+> dcolon <+> ppr t
72
pprPat i (SigP p t) = parensIf (i > noPrec) $ ppr p <+> dcolon <+> ppr t
72
false
false
0
10
17
47
22
25
null
null
Melvar/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
-- showDeclImp (PImport o) = "import " ++ o getImps :: [PArg] -> [(Name, PTerm)] getImps [] = []
97
getImps :: [PArg] -> [(Name, PTerm)] getImps [] = []
52
getImps [] = []
15
true
true
0
9
19
41
21
20
null
null
rvion/lamdu
Lamdu/Sugar/Lens.hs
gpl-3.0
binderParams f (VarParam p) = VarParam <$> f p
46
binderParams f (VarParam p) = VarParam <$> f p
46
binderParams f (VarParam p) = VarParam <$> f p
46
false
false
0
7
8
24
11
13
null
null
OpenXT/network
nws/NetworkUtils.hs
gpl-2.0
checkAndAddBridgeFwd :: String -> IO () checkAndAddBridgeFwd bridge = _checkAndAddBridge bridge "0xfff8"
104
checkAndAddBridgeFwd :: String -> IO () checkAndAddBridgeFwd bridge = _checkAndAddBridge bridge "0xfff8"
104
checkAndAddBridgeFwd bridge = _checkAndAddBridge bridge "0xfff8"
64
false
true
0
7
11
28
13
15
null
null
jwiegley/functors
Data/Functor/List.hs
bsd-3-clause
init :: Algebra f => Free f a -> Free f a init (Pure _) = error "Cannot take init of Pair value"
96
init :: Algebra f => Free f a -> Free f a init (Pure _) = error "Cannot take init of Pair value"
96
init (Pure _) = error "Cannot take init of Pair value"
54
false
true
0
7
22
44
20
24
null
null
yiannist/ganeti
src/Ganeti/Types.hs
bsd-2-clause
diskTemplateToStorageType DTFile = StorageFile
46
diskTemplateToStorageType DTFile = StorageFile
46
diskTemplateToStorageType DTFile = StorageFile
46
false
false
0
5
3
9
4
5
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Text/Greek/Phonology/Vowels.hs
mit
omicron :: VowelPhoneme omicron = VowelPhoneme Omicron Short
60
omicron :: VowelPhoneme omicron = VowelPhoneme Omicron Short
60
omicron = VowelPhoneme Omicron Short
36
false
true
0
5
7
16
8
8
null
null
sdiehl/unirewrite
src/Term.hs
mit
isNonLinear :: IsTerm a var => a -> Bool isNonLinear x = not (isLinear x)
73
isNonLinear :: IsTerm a var => a -> Bool isNonLinear x = not (isLinear x)
73
isNonLinear x = not (isLinear x)
32
false
true
0
7
14
36
17
19
null
null
kim/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DescribeDhcpOptions.hs
mpl-2.0
-- | 'DescribeDhcpOptions' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'ddoDhcpOptionsIds' @::@ ['Text'] -- -- * 'ddoDryRun' @::@ 'Maybe' 'Bool' -- -- * 'ddoFilters' @::@ ['Filter'] -- describeDhcpOptions :: DescribeDhcpOptions describeDhcpOptions = DescribeDhcpOptions { _ddoD...
417
describeDhcpOptions :: DescribeDhcpOptions describeDhcpOptions = DescribeDhcpOptions { _ddoDryRun = Nothing , _ddoDhcpOptionsIds = mempty , _ddoFilters = mempty }
193
describeDhcpOptions = DescribeDhcpOptions { _ddoDryRun = Nothing , _ddoDhcpOptionsIds = mempty , _ddoFilters = mempty }
150
true
true
0
7
82
45
30
15
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/WindowOrWorkerGlobalScope.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope.origin Mozilla WindowOrWorkerGlobalScope.origin documentation> getOrigin :: (MonadDOM m, IsWindowOrWorkerGlobalScope self, FromJSString result) => self -> m result getOrigin self = liftDOM (((toWin...
397
getOrigin :: (MonadDOM m, IsWindowOrWorkerGlobalScope self, FromJSString result) => self -> m result getOrigin self = liftDOM (((toWindowOrWorkerGlobalScope self) ^. js "origin") >>= fromJSValUnchecked)
252
getOrigin self = liftDOM (((toWindowOrWorkerGlobalScope self) ^. js "origin") >>= fromJSValUnchecked)
118
true
true
0
10
80
69
35
34
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
735 = 734
9
735 = 734
9
735 = 734
9
false
false
1
5
2
10
3
7
null
null
upwawet/vision
src/Collection/Utils.hs
gpl-3.0
selectAll :: TreeSelection -> IO () selectAll = treeSelectionSelectAll
70
selectAll :: TreeSelection -> IO () selectAll = treeSelectionSelectAll
70
selectAll = treeSelectionSelectAll
34
false
true
0
8
8
26
11
15
null
null
qpliu/esolang
flower/hs/Parse.hs
gpl-3.0
symbol :: Parser Symbol symbol = try $ do position <- getPosition str <- fmap reverse (symbolString "") if str `elem` ["", "0", "1", "<-", "->", "if", "else"] then fail ("Invalid symbol: " ++ str) else return (Symbol position str) where symbolString str = (try (skipSpace True) ...
427
symbol :: Parser Symbol symbol = try $ do position <- getPosition str <- fmap reverse (symbolString "") if str `elem` ["", "0", "1", "<-", "->", "if", "else"] then fail ("Invalid symbol: " ++ str) else return (Symbol position str) where symbolString str = (try (skipSpace True) ...
427
symbol = try $ do position <- getPosition str <- fmap reverse (symbolString "") if str `elem` ["", "0", "1", "<-", "->", "if", "else"] then fail ("Invalid symbol: " ++ str) else return (Symbol position str) where symbolString str = (try (skipSpace True) >> return str) ...
403
false
true
0
11
126
161
83
78
null
null
sumitsahrawat/IHaskell
src/IHaskell/Eval/Completion.hs
mit
dirExpand :: String -> IO String dirExpand str = do home <- getHome return $ replace "~" home str
101
dirExpand :: String -> IO String dirExpand str = do home <- getHome return $ replace "~" home str
101
dirExpand str = do home <- getHome return $ replace "~" home str
68
false
true
0
8
22
42
19
23
null
null
artuuge/IHaskell
src/IHaskell/BrokenPackages.hs
mit
ident :: Parser String ident = many (alphaNum <|> oneOf "-.")
61
ident :: Parser String ident = many (alphaNum <|> oneOf "-.")
61
ident = many (alphaNum <|> oneOf "-.")
38
false
true
0
8
10
27
13
14
null
null
rzeigler/advent-of-code-2016
Lib/AoC/Day8.hs
mit
exec s (RotateRow row n) = undefined
36
exec s (RotateRow row n) = undefined
36
exec s (RotateRow row n) = undefined
36
false
false
0
7
6
19
9
10
null
null
zepto-lang/zepto-js
src/Zepto/Primitives.hs
gpl-2.0
eval _ _ (List [SimpleVal (Atom "doc"), SimpleVal (String val)]) = return $ fromSimple $ String $ concat $ fmap thirdElem (filter filterTuple primitives) ++ fmap thirdElem (filter filterTuple ioPrimitives) where filterTuple tuple = (== val) $ firstElem tuple firstElem (x,...
364
eval _ _ (List [SimpleVal (Atom "doc"), SimpleVal (String val)]) = return $ fromSimple $ String $ concat $ fmap thirdElem (filter filterTuple primitives) ++ fmap thirdElem (filter filterTuple ioPrimitives) where filterTuple tuple = (== val) $ firstElem tuple firstElem (x,...
364
eval _ _ (List [SimpleVal (Atom "doc"), SimpleVal (String val)]) = return $ fromSimple $ String $ concat $ fmap thirdElem (filter filterTuple primitives) ++ fmap thirdElem (filter filterTuple ioPrimitives) where filterTuple tuple = (== val) $ firstElem tuple firstElem (x,...
364
false
false
2
11
108
144
74
70
null
null
gcampax/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
ppr_expr (HsWrap co_fn e) = pprHsWrapper (pprExpr e) co_fn
58
ppr_expr (HsWrap co_fn e) = pprHsWrapper (pprExpr e) co_fn
58
ppr_expr (HsWrap co_fn e) = pprHsWrapper (pprExpr e) co_fn
58
false
false
0
7
8
28
13
15
null
null
GaloisInc/halvm-ghc
compiler/main/DynFlags.hs
bsd-3-clause
setTargetWithPlatform :: (Platform -> HscTarget) -> DynP () setTargetWithPlatform f = upd set where set dfs = let l = f (targetPlatform dfs) in if ghcLink dfs /= LinkBinary || isObjectTarget l then dfs{ hscTarget = l } else dfs -- Changes the target only if we're compi...
531
setTargetWithPlatform :: (Platform -> HscTarget) -> DynP () setTargetWithPlatform f = upd set where set dfs = let l = f (targetPlatform dfs) in if ghcLink dfs /= LinkBinary || isObjectTarget l then dfs{ hscTarget = l } else dfs -- Changes the target only if we're compi...
531
setTargetWithPlatform f = upd set where set dfs = let l = f (targetPlatform dfs) in if ghcLink dfs /= LinkBinary || isObjectTarget l then dfs{ hscTarget = l } else dfs -- Changes the target only if we're compiling object code. This is -- used by -fasm and -fllvm, whic...
471
false
true
0
11
138
97
50
47
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Coffee.hs
gpl-2.0
parseRules ("CoffeeScript","Normal") = (((pDetectSpaces >>= withAttribute NormalTok)) <|> ((pFloat >>= withAttribute FloatTok)) <|> ((pInt >>= withAttribute DecValTok)) <|> ((pHlCOct >>= withAttribute BaseNTok)) <|> ((pHlCHex >>= withAttribute BaseNTok)) <|> ((pKeyword " \n\t.():!+,-<=>%...
2,671
parseRules ("CoffeeScript","Normal") = (((pDetectSpaces >>= withAttribute NormalTok)) <|> ((pFloat >>= withAttribute FloatTok)) <|> ((pInt >>= withAttribute DecValTok)) <|> ((pHlCOct >>= withAttribute BaseNTok)) <|> ((pHlCHex >>= withAttribute BaseNTok)) <|> ((pKeyword " \n\t.():!+,-<=>%...
2,671
parseRules ("CoffeeScript","Normal") = (((pDetectSpaces >>= withAttribute NormalTok)) <|> ((pFloat >>= withAttribute FloatTok)) <|> ((pInt >>= withAttribute DecValTok)) <|> ((pHlCOct >>= withAttribute BaseNTok)) <|> ((pHlCHex >>= withAttribute BaseNTok)) <|> ((pKeyword " \n\t.():!+,-<=>%...
2,671
false
false
0
34
364
687
353
334
null
null
parsonsmatt/lambda
src/Lambda/Untyped.hs
bsd-3-clause
declaration :: Parser Declaration declaration = D.declaration lambda
68
declaration :: Parser Declaration declaration = D.declaration lambda
68
declaration = D.declaration lambda
34
false
true
0
6
7
19
9
10
null
null
dysinger/amazonka
amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/Types.hs
mpl-2.0
-- | 'Instance' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'iId' @::@ 'Maybe' 'Text' -- instance' :: Instance instance' = Instance { _iId = Nothing }
197
instance' :: Instance instance' = Instance { _iId = Nothing }
69
instance' = Instance { _iId = Nothing }
47
true
true
0
6
39
25
17
8
null
null
b1g3ar5/CsvDatabase
src/CsvDatabase.hs
gpl-3.0
exec :: (Eq a, Read a) => Query -> Db a -> [Row a] exec = (flip . foldl . flip) (filter . apply)
97
exec :: (Eq a, Read a) => Query -> Db a -> [Row a] exec = (flip . foldl . flip) (filter . apply)
96
exec = (flip . foldl . flip) (filter . apply)
45
false
true
0
9
24
64
33
31
null
null
ezyang/hackage-query
hackage-query.hs
bsd-3-clause
readPackageDir :: FilePath -> String -> IO GenericPackageDescription readPackageDir packageDir packageName = do let cabalFile = packageDir </> packageName ++ ".cabal" DistParse.readPackageDescription silent cabalFile -- | Retrieves all of the source directories (where module hirearchies -- live) in a package. ...
356
readPackageDir :: FilePath -> String -> IO GenericPackageDescription readPackageDir packageDir packageName = do let cabalFile = packageDir </> packageName ++ ".cabal" DistParse.readPackageDescription silent cabalFile -- | Retrieves all of the source directories (where module hirearchies -- live) in a package. ...
356
readPackageDir packageDir packageName = do let cabalFile = packageDir </> packageName ++ ".cabal" DistParse.readPackageDescription silent cabalFile -- | Retrieves all of the source directories (where module hirearchies -- live) in a package. Paths are prefixed by 'packageDir'.
287
false
true
0
12
54
61
28
33
null
null
emhoracek/explora
test-suite/Samples.hs
gpl-2.0
sampleGraph = ( [("North", 2)], (1, head samplePlaces), [("South", 2)]) :&: (([("South", 1)], (2, last samplePlaces), [("North", 1)]) :&: EmptyGraph)
163
sampleGraph = ( [("North", 2)], (1, head samplePlaces), [("South", 2)]) :&: (([("South", 1)], (2, last samplePlaces), [("North", 1)]) :&: EmptyGraph)
163
sampleGraph = ( [("North", 2)], (1, head samplePlaces), [("South", 2)]) :&: (([("South", 1)], (2, last samplePlaces), [("North", 1)]) :&: EmptyGraph)
163
false
false
0
10
33
89
55
34
null
null
phaazon/Idris-dev
src/IRTS/CodegenJavaScript.hs
bsd-3-clause
jsFUNPRELUDE :: [JS] jsFUNPRELUDE = [jsALLOCMYOLDBASE]
54
jsFUNPRELUDE :: [JS] jsFUNPRELUDE = [jsALLOCMYOLDBASE]
54
jsFUNPRELUDE = [jsALLOCMYOLDBASE]
33
false
true
0
5
5
17
10
7
null
null
adnelson/Idris-dev
src/Idris/Core/Unify.hs
bsd-3-clause
highV i (Bind n b sc) = maximum [i, highV i (binderTy b), (highV i sc - 1)]
75
highV i (Bind n b sc) = maximum [i, highV i (binderTy b), (highV i sc - 1)]
75
highV i (Bind n b sc) = maximum [i, highV i (binderTy b), (highV i sc - 1)]
75
false
false
0
9
17
58
28
30
null
null
wavewave/pipeline-eventgen
lib/HEP/Automation/EventGeneration/Job.hs
gpl-3.0
-- dummywebdav = (WebDAVRemoteDir "curltest") parseEvSetFromStdin :: IO (Either String EventSet) parseEvSetFromStdin = do bstr <- L.getContents return $ do jsonvalue <- (parseOnly json . B.concat . L.toChunks) bstr parseEither parseJSON jsonvalue
276
parseEvSetFromStdin :: IO (Either String EventSet) parseEvSetFromStdin = do bstr <- L.getContents return $ do jsonvalue <- (parseOnly json . B.concat . L.toChunks) bstr parseEither parseJSON jsonvalue
228
parseEvSetFromStdin = do bstr <- L.getContents return $ do jsonvalue <- (parseOnly json . B.concat . L.toChunks) bstr parseEither parseJSON jsonvalue
177
true
true
0
15
61
75
35
40
null
null
sopvop/snap-core
test/Snap/Util/FileUploads/Tests.hs
bsd-3-clause
testAbortedBody :: Test testAbortedBody = testCase "fileUploads/abortedBody" $ expectExceptionH $ harness' goAndAbort tmpdir hndl abortedTestBody where tmpdir = "tempdir_abort" hndl = handleFileUploads tmpdir defaultUploadPolicy (const $ allowW...
505
testAbortedBody :: Test testAbortedBody = testCase "fileUploads/abortedBody" $ expectExceptionH $ harness' goAndAbort tmpdir hndl abortedTestBody where tmpdir = "tempdir_abort" hndl = handleFileUploads tmpdir defaultUploadPolicy (const $ allowW...
505
testAbortedBody = testCase "fileUploads/abortedBody" $ expectExceptionH $ harness' goAndAbort tmpdir hndl abortedTestBody where tmpdir = "tempdir_abort" hndl = handleFileUploads tmpdir defaultUploadPolicy (const $ allowWithMaximumSize 400000) ...
481
false
true
2
8
151
105
46
59
null
null
hrantzsch/haskell-optimization
Problems.hs
gpl-2.0
binVal :: BinaryString -> Int binVal bs = sum $ fmap f b where f (x,y) = y * 2 ^ x b = S.zip (S.fromList [0..S.length bs]) $ S.reverse bs
147
binVal :: BinaryString -> Int binVal bs = sum $ fmap f b where f (x,y) = y * 2 ^ x b = S.zip (S.fromList [0..S.length bs]) $ S.reverse bs
147
binVal bs = sum $ fmap f b where f (x,y) = y * 2 ^ x b = S.zip (S.fromList [0..S.length bs]) $ S.reverse bs
117
false
true
1
12
40
89
44
45
null
null
brow/noise
tests/Text/Noise/Compiler/Document/Color/Test.hs
mit
prop_alpha_is_Nothing_over_RGB :: HexColorString -> Bool prop_alpha_is_Nothing_over_RGB (HexColorString str) | length str == 6 = isNothing alpha | length str == 8 = isJust alpha | otherwise = False where alpha = Color.fromHex str >>= Color.alpha
259
prop_alpha_is_Nothing_over_RGB :: HexColorString -> Bool prop_alpha_is_Nothing_over_RGB (HexColorString str) | length str == 6 = isNothing alpha | length str == 8 = isJust alpha | otherwise = False where alpha = Color.fromHex str >>= Color.alpha
259
prop_alpha_is_Nothing_over_RGB (HexColorString str) | length str == 6 = isNothing alpha | length str == 8 = isJust alpha | otherwise = False where alpha = Color.fromHex str >>= Color.alpha
202
false
true
1
9
48
88
40
48
null
null
Deewiant/haschoo
Haschoo/Evaluator/Eval.hs
bsd-3-clause
evalBody :: [ScmValue] -> Haschoo ScmValue evalBody (ScmList (ScmIdentifier i : xs) : ds) | i == "define" = scmDefine xs >> evalBody ds | i == "begin" = evalBody (xs ++ ds)
179
evalBody :: [ScmValue] -> Haschoo ScmValue evalBody (ScmList (ScmIdentifier i : xs) : ds) | i == "define" = scmDefine xs >> evalBody ds | i == "begin" = evalBody (xs ++ ds)
179
evalBody (ScmList (ScmIdentifier i : xs) : ds) | i == "define" = scmDefine xs >> evalBody ds | i == "begin" = evalBody (xs ++ ds)
136
false
true
0
10
39
93
43
50
null
null
google/codeworld
codeworld-api/src/CodeWorld/EntryPoints.hs
apache-2.0
drawControl :: Wrapped a -> Double -> Control a -> Picture drawControl _ alpha (RestartButton (x, y)) = translated x y p where p = colored (RGBA 0 0 0 alpha) ( thickArc 0.1 (pi / 6) (11 * pi / 6) 0.2 <> translated 0.173 (-0.1) (solidRectangle 0.17 0.17) ) <> color...
436
drawControl :: Wrapped a -> Double -> Control a -> Picture drawControl _ alpha (RestartButton (x, y)) = translated x y p where p = colored (RGBA 0 0 0 alpha) ( thickArc 0.1 (pi / 6) (11 * pi / 6) 0.2 <> translated 0.173 (-0.1) (solidRectangle 0.17 0.17) ) <> color...
436
drawControl _ alpha (RestartButton (x, y)) = translated x y p where p = colored (RGBA 0 0 0 alpha) ( thickArc 0.1 (pi / 6) (11 * pi / 6) 0.2 <> translated 0.173 (-0.1) (solidRectangle 0.17 0.17) ) <> colored (RGBA 0.2 0.2 0.2 alpha) (rectangle 0.8 0.8) <> ...
377
false
true
5
12
134
203
96
107
null
null
sampou-org/pfad
Code/Code29_Plan4.hs
bsd-3-clause
bumpDn :: (Int, Int) -> [Int] bumpDn (k,n) = bumpBy k [n-1,n-2 .. 1]
79
bumpDn :: (Int, Int) -> [Int] bumpDn (k,n) = bumpBy k [n-1,n-2 .. 1]
79
bumpDn (k,n) = bumpBy k [n-1,n-2 .. 1]
41
false
true
0
7
24
55
31
24
null
null
bitemyapp/ganeti
src/Ganeti/Utils.hs
bsd-2-clause
-- | Safe 'read' function returning data encapsulated in a Result. tryRead :: (Monad m, Read a) => String -> String -> m a tryRead name s = parseChoices name s $ reads s
169
tryRead :: (Monad m, Read a) => String -> String -> m a tryRead name s = parseChoices name s $ reads s
102
tryRead name s = parseChoices name s $ reads s
46
true
true
0
8
33
55
27
28
null
null
mbakke/ganeti
test/hs/Test/Ganeti/TestCommon.hs
bsd-2-clause
-- | Returns the path of a file in the test data directory, given its name. testDataFilename :: String -> String -> IO FilePath testDataFilename datadir name = do src <- getSourceDir return $ src ++ datadir ++ name -- | Returns the content of the specified haskell test data file.
297
testDataFilename :: String -> String -> IO FilePath testDataFilename datadir name = do src <- getSourceDir return $ src ++ datadir ++ name -- | Returns the content of the specified haskell test data file.
221
testDataFilename datadir name = do src <- getSourceDir return $ src ++ datadir ++ name -- | Returns the content of the specified haskell test data file.
169
true
true
0
9
67
51
25
26
null
null
mhwombat/exp-uivector-cluster-wains
src/ALife/Creatur/Wain/UIVector/Cluster/Experiment.hs
bsd-3-clause
recordBirths :: StateT Experiment IO () recordBirths = do a <- use subject (summary.rBirthCount) += length (view W.litter a)
128
recordBirths :: StateT Experiment IO () recordBirths = do a <- use subject (summary.rBirthCount) += length (view W.litter a)
128
recordBirths = do a <- use subject (summary.rBirthCount) += length (view W.litter a)
88
false
true
0
11
22
55
26
29
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT07.hs
gpl-3.0
not True = False
16
not True = False
16
not True = False
16
false
false
1
5
3
13
4
9
null
null
twittner/cql
src/Database/CQL/Protocol/Codec.hs
mpl-2.0
------------------------------------------------------------------------------ -- Long String encodeLongString :: Putter LT.Text encodeLongString = encodeBytes . LT.encodeUtf8
176
encodeLongString :: Putter LT.Text encodeLongString = encodeBytes . LT.encodeUtf8
81
encodeLongString = encodeBytes . LT.encodeUtf8
46
true
true
0
6
13
24
13
11
null
null
juretta/course
test/src/L02/List/Tests.hs
bsd-3-clause
prop_reverse_single_value :: Int -> Bool prop_reverse_single_value n = reverse (n :| Nil) == (n :| Nil)
109
prop_reverse_single_value :: Int -> Bool prop_reverse_single_value n = reverse (n :| Nil) == (n :| Nil)
109
prop_reverse_single_value n = reverse (n :| Nil) == (n :| Nil)
64
false
true
1
7
21
42
20
22
null
null
tetsuo-jp/while-C-ocaml
src/desugar/TransAndWhile.hs
agpl-3.0
tAnd :: Exp -> Exp tAnd (EAnd exp1 exp2) = let a = EEq (tAnd exp1) (EVal VNil) b = EEq (tAnd exp2) (EVal VNil) in EEq a (EEq a b)
151
tAnd :: Exp -> Exp tAnd (EAnd exp1 exp2) = let a = EEq (tAnd exp1) (EVal VNil) b = EEq (tAnd exp2) (EVal VNil) in EEq a (EEq a b)
151
tAnd (EAnd exp1 exp2) = let a = EEq (tAnd exp1) (EVal VNil) b = EEq (tAnd exp2) (EVal VNil) in EEq a (EEq a b)
132
false
true
0
11
52
89
43
46
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
decorously = id
15
decorously = id
15
decorously = id
15
false
false
0
4
2
6
3
3
null
null
alanz/Alex
src/NFA.hs
bsd-3-clause
rexp2nfa b e (re1 :%% re2) = do s <- newState rexp2nfa b s re1 rexp2nfa s e re2
85
rexp2nfa b e (re1 :%% re2) = do s <- newState rexp2nfa b s re1 rexp2nfa s e re2
85
rexp2nfa b e (re1 :%% re2) = do s <- newState rexp2nfa b s re1 rexp2nfa s e re2
85
false
false
0
7
24
47
21
26
null
null
cmahon/interactive-brokers
library/API/IB/Enum.hs
bsd-3-clause
parseIBOrderTimeInForce :: Parser IBOrderTimeInForce parseIBOrderTimeInForce = return Day <* string "DAY" <|> return GoodTilCancelled <* string "GTC"
154
parseIBOrderTimeInForce :: Parser IBOrderTimeInForce parseIBOrderTimeInForce = return Day <* string "DAY" <|> return GoodTilCancelled <* string "GTC"
154
parseIBOrderTimeInForce = return Day <* string "DAY" <|> return GoodTilCancelled <* string "GTC"
101
false
true
0
8
21
38
17
21
null
null
joelburget/tapl
llvm.hs
bsd-3-clause
bldGreet :: CodeGenModule (Function (IO ())) bldGreet = do puts <- newNamedFunction ExternalLinkage "puts" :: TFunction (Ptr Word8 -> IO Word32) withStringNul "Hello, World!" $ \greetz -> createFunction ExternalLinkage $ do tmp <- getElementPtr greetz (0::Word32, (0::Word32, ())) call puts tmp -...
364
bldGreet :: CodeGenModule (Function (IO ())) bldGreet = do puts <- newNamedFunction ExternalLinkage "puts" :: TFunction (Ptr Word8 -> IO Word32) withStringNul "Hello, World!" $ \greetz -> createFunction ExternalLinkage $ do tmp <- getElementPtr greetz (0::Word32, (0::Word32, ())) call puts tmp -...
364
bldGreet = do puts <- newNamedFunction ExternalLinkage "puts" :: TFunction (Ptr Word8 -> IO Word32) withStringNul "Hello, World!" $ \greetz -> createFunction ExternalLinkage $ do tmp <- getElementPtr greetz (0::Word32, (0::Word32, ())) call puts tmp -- Throw away return value (?) ret ()
319
false
true
0
16
80
130
63
67
null
null
AlephAlpha/Samau
OldSamau/Types.hs
gpl-2.0
toString (SmChar x) = [x]
29
toString (SmChar x) = [x]
29
toString (SmChar x) = [x]
29
false
false
0
6
8
19
9
10
null
null
mitsuji/exp-CloudHaskell
app/WaiTell.hs
bsd-3-clause
mainProcess :: Process () mainProcess = forever $ receiveWait [match pString,match pInt] where pString :: String -> Process () pString msg = liftIO $ putStrLn $ "String: " ++ msg pInt :: Int -> Process () pInt n = liftIO $ putStrLn $ "Int: " ++ show n
273
mainProcess :: Process () mainProcess = forever $ receiveWait [match pString,match pInt] where pString :: String -> Process () pString msg = liftIO $ putStrLn $ "String: " ++ msg pInt :: Int -> Process () pInt n = liftIO $ putStrLn $ "Int: " ++ show n
269
mainProcess = forever $ receiveWait [match pString,match pInt] where pString :: String -> Process () pString msg = liftIO $ putStrLn $ "String: " ++ msg pInt :: Int -> Process () pInt n = liftIO $ putStrLn $ "Int: " ++ show n
243
false
true
10
8
69
108
53
55
null
null
xcthulhu/lambda-geda
Geda/Parser.hs
gpl-3.0
pv :: Parser GSchem pv = do char 'v' spaces version <- pInt fileformat_version <- pInt <|> return (-1) newline return Version {..} -- Parse combinator for a Line
175
pv :: Parser GSchem pv = do char 'v' spaces version <- pInt fileformat_version <- pInt <|> return (-1) newline return Version {..} -- Parse combinator for a Line
175
pv = do char 'v' spaces version <- pInt fileformat_version <- pInt <|> return (-1) newline return Version {..} -- Parse combinator for a Line
155
false
true
0
12
42
70
30
40
null
null
gelisam/hawk
src/Control/Monad/Trans/OptionParser.hs
apache-2.0
-- | A version of `optDescr` which doesn't use the Option typeclass. optDescrWith :: (o -> Char) -> (o -> String) -> (o -> [String]) -> (o -> OptionType) -> o -> GetOpt.OptDescr (o, Maybe String) optDescrWith shortName' longName' helpMsg' optionType' o = ...
797
optDescrWith :: (o -> Char) -> (o -> String) -> (o -> [String]) -> (o -> OptionType) -> o -> GetOpt.OptDescr (o, Maybe String) optDescrWith shortName' longName' helpMsg' optionType' o = GetOpt.Option [shortName' o] [longName...
728
optDescrWith shortName' longName' helpMsg' optionType' o = GetOpt.Option [shortName' o] [longName' o] argDescr (intercalate "\n" $ helpMsg' o) where argDescr = case optionType' o of Flag ...
549
true
true
1
13
309
233
116
117
null
null
OpenXT/manager
xenmgr/XenMgr/PowerManagement.hs
gpl-2.0
shutdownCommon :: String -> Bool -> XM () shutdownCommon offCommand force = do liftRpc $ pmShutdownVms force liftIO $ do info "PM: halting host now" spawnShell offCommand -- wait for actuall poweroff threadDelay $ 360 * (10^6) -- returns True if vm was put to sleep here, False if that w...
382
shutdownCommon :: String -> Bool -> XM () shutdownCommon offCommand force = do liftRpc $ pmShutdownVms force liftIO $ do info "PM: halting host now" spawnShell offCommand -- wait for actuall poweroff threadDelay $ 360 * (10^6) -- returns True if vm was put to sleep here, False if that w...
382
shutdownCommon offCommand force = do liftRpc $ pmShutdownVms force liftIO $ do info "PM: halting host now" spawnShell offCommand -- wait for actuall poweroff threadDelay $ 360 * (10^6) -- returns True if vm was put to sleep here, False if that was not necessary (because -- it already wa...
340
false
true
0
12
94
79
37
42
null
null
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110321set2.hs
gpl-3.0
sixparamset :: [Param] sixparamset = [ SixParam m 1.00 | m <- [200.0, 300.0,400.0,600.0] ]
90
sixparamset :: [Param] sixparamset = [ SixParam m 1.00 | m <- [200.0, 300.0,400.0,600.0] ]
90
sixparamset = [ SixParam m 1.00 | m <- [200.0, 300.0,400.0,600.0] ]
67
false
true
0
8
14
42
24
18
null
null
brendanhay/gogol
gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs
mpl-2.0
-- | Auto-regressive coefficients, an array of double. acAutoRegressiveCoefficients :: Lens' ArimaCoefficients [Double] acAutoRegressiveCoefficients = lens _acAutoRegressiveCoefficients (\ s a -> s{_acAutoRegressiveCoefficients = a}) . _Default . _Coerce
274
acAutoRegressiveCoefficients :: Lens' ArimaCoefficients [Double] acAutoRegressiveCoefficients = lens _acAutoRegressiveCoefficients (\ s a -> s{_acAutoRegressiveCoefficients = a}) . _Default . _Coerce
219
acAutoRegressiveCoefficients = lens _acAutoRegressiveCoefficients (\ s a -> s{_acAutoRegressiveCoefficients = a}) . _Default . _Coerce
154
true
true
0
11
47
53
28
25
null
null
ambiata/mismi
mismi-ec2-core/src/Mismi/EC2/Core/Device.hs
bsd-3-clause
instanceStorage M1_XLarge = InstanceStore 4 420 1680 HDD
56
instanceStorage M1_XLarge = InstanceStore 4 420 1680 HDD
56
instanceStorage M1_XLarge = InstanceStore 4 420 1680 HDD
56
false
false
0
5
7
18
8
10
null
null
ezyang/ghc
compiler/nativeGen/SPARC/Ppr.hs
bsd-3-clause
-- | Print appropriate alignment for the given section type. pprAlignForSection :: SectionType -> SDoc pprAlignForSection seg = ptext (case seg of Text -> sLit ".align 4" Data -> sLit ".align 8" ReadOnlyData -> sLit ".align 8" RelocatableReadOnlyData ...
669
pprAlignForSection :: SectionType -> SDoc pprAlignForSection seg = ptext (case seg of Text -> sLit ".align 4" Data -> sLit ".align 8" ReadOnlyData -> sLit ".align 8" RelocatableReadOnlyData -> sLit ".align 8" UninitialisedData -> s...
608
pprAlignForSection seg = ptext (case seg of Text -> sLit ".align 4" Data -> sLit ".align 8" ReadOnlyData -> sLit ".align 8" RelocatableReadOnlyData -> sLit ".align 8" UninitialisedData -> sLit ".align 8" ReadOnlyData16 -> ...
566
true
true
0
10
216
106
50
56
null
null
beni55/LambdaHack
Game/LambdaHack/Atomic/PosAtomicRead.hs
bsd-3-clause
posProjBody :: Actor -> PosAtomic posProjBody body = if bproj body then PosSight (blid body) [bpos body] else PosFidAndSight [bfid body] (blid body) [bpos body]
166
posProjBody :: Actor -> PosAtomic posProjBody body = if bproj body then PosSight (blid body) [bpos body] else PosFidAndSight [bfid body] (blid body) [bpos body]
166
posProjBody body = if bproj body then PosSight (blid body) [bpos body] else PosFidAndSight [bfid body] (blid body) [bpos body]
132
false
true
0
8
30
74
36
38
null
null
zalora/octopus
src/Octopus/Command.hs
isc
cmd :: FilePath -> [T.Text] -> CreateProcess cmd proc args = CreateProcess { cmdspec = RawCommand proc $ T.unpack <$> args , cwd = Nothing , env = Nothing , std_in = CreatePipe , std_out = CreatePipe ...
559
cmd :: FilePath -> [T.Text] -> CreateProcess cmd proc args = CreateProcess { cmdspec = RawCommand proc $ T.unpack <$> args , cwd = Nothing , env = Nothing , std_in = CreatePipe , std_out = CreatePipe ...
559
cmd proc args = CreateProcess { cmdspec = RawCommand proc $ T.unpack <$> args , cwd = Nothing , env = Nothing , std_in = CreatePipe , std_out = CreatePipe , std_err = Cre...
514
false
true
0
9
323
98
58
40
null
null
markusle/husky
src/Parser.hs
gpl-3.0
-- | main parser entry point main_parser :: CharParser CalcState (ParseResult, CalcState) main_parser = (,) <$> parser_dispatch <*> getState <?> "main parser"
169
main_parser :: CharParser CalcState (ParseResult, CalcState) main_parser = (,) <$> parser_dispatch <*> getState <?> "main parser"
140
main_parser = (,) <$> parser_dispatch <*> getState <?> "main parser"
79
true
true
0
8
32
38
21
17
null
null
jean-edouard/manager
rpc-proxy/RpcProxy.hs
gpl-2.0
pathOrgFreedesktopDBus = fromString "/org/freedesktop/DBus"
59
pathOrgFreedesktopDBus = fromString "/org/freedesktop/DBus"
59
pathOrgFreedesktopDBus = fromString "/org/freedesktop/DBus"
59
false
false
0
5
3
9
4
5
null
null
DavidAlphaFox/ghc
libraries/haskeline/tests/Unit.hs
bsd-3-clause
prompt' k = utf8 (T.pack (show k ++ ":"))
41
prompt' k = utf8 (T.pack (show k ++ ":"))
41
prompt' k = utf8 (T.pack (show k ++ ":"))
41
false
false
1
10
8
34
14
20
null
null
flipstone/orville
orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/Expr/Query/SelectList.hs
mit
selectDerivedColumns :: [DerivedColumn] -> SelectList selectDerivedColumns = SelectList . RawSql.intercalate RawSql.comma
123
selectDerivedColumns :: [DerivedColumn] -> SelectList selectDerivedColumns = SelectList . RawSql.intercalate RawSql.comma
123
selectDerivedColumns = SelectList . RawSql.intercalate RawSql.comma
69
false
true
0
7
12
29
15
14
null
null
kearnh/HToyRayTracer
src/ParserCommon.hs
bsd-3-clause
tillEol = manyTill (noneOf "\n\r") eol >> return ()
51
tillEol = manyTill (noneOf "\n\r") eol >> return ()
51
tillEol = manyTill (noneOf "\n\r") eol >> return ()
51
false
false
0
8
8
26
12
14
null
null
5outh/Elm
src/Elm/Compiler.hs
bsd-3-clause
docsGen :: Bool -> Module.Optimized -> Result.Result w Error.Error (Maybe Docs.Documentation) docsGen isExposed modul = if not isExposed then Result.ok Nothing else let getChecked = Docs.check (Module.exports modul) (Module.docs modul) name = PublicModule.Name (Modul...
494
docsGen :: Bool -> Module.Optimized -> Result.Result w Error.Error (Maybe Docs.Documentation) docsGen isExposed modul = if not isExposed then Result.ok Nothing else let getChecked = Docs.check (Module.exports modul) (Module.docs modul) name = PublicModule.Name (Modul...
494
docsGen isExposed modul = if not isExposed then Result.ok Nothing else let getChecked = Docs.check (Module.exports modul) (Module.docs modul) name = PublicModule.Name (ModuleName._module (Module.name modul)) toDocs checked = Docs.fromCheckedDocs name checked i...
388
false
true
0
15
127
162
79
83
null
null
sarahn/ganeti
src/Ganeti/OpCodes.hs
gpl-2.0
opSummaryVal _ = Nothing
24
opSummaryVal _ = Nothing
24
opSummaryVal _ = Nothing
24
false
false
0
4
3
10
4
6
null
null
RobinKrom/fasths
src/Codec/Fast/Encoder.hs
bsd-3-clause
field2Cop (Seq s) = contramap (assertNameIs (sFName s)) (seqF2Cop s)
68
field2Cop (Seq s) = contramap (assertNameIs (sFName s)) (seqF2Cop s)
68
field2Cop (Seq s) = contramap (assertNameIs (sFName s)) (seqF2Cop s)
68
false
false
0
9
9
39
18
21
null
null
nickbart1980/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
hacek 'z' = "ž"
15
hacek 'z' = "ž"
15
hacek 'z' = "ž"
15
false
false
0
5
3
9
4
5
null
null
nevrenato/Hets_Fork
Propositional/Prove.hs
gpl-2.0
analyzeZchaff :: String -> PState.PropProverState -> IO (Either ATPRetval LP.GoalStatus, [String], TimeOfDay) analyzeZchaff str' pState = let unsat = isInfixOf reUNSAT str' sat = isInfixOf reSAT str' timeLine = fromMaybe "0" $ stripPrefix reTIME str' timeout = isInfixOf reEndto str' || isI...
688
analyzeZchaff :: String -> PState.PropProverState -> IO (Either ATPRetval LP.GoalStatus, [String], TimeOfDay) analyzeZchaff str' pState = let unsat = isInfixOf reUNSAT str' sat = isInfixOf reSAT str' timeLine = fromMaybe "0" $ stripPrefix reTIME str' timeout = isInfixOf reEndto str' || isI...
688
analyzeZchaff str' pState = let unsat = isInfixOf reUNSAT str' sat = isInfixOf reSAT str' timeLine = fromMaybe "0" $ stripPrefix reTIME str' timeout = isInfixOf reEndto str' || isInfixOf reEndmo str' time = calculateTime timeLine usedAx = map AS_Anno.senAttr $ PState.initialA...
576
false
true
0
16
180
236
111
125
null
null
Ian-Stewart-Binks/courseography
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs
gpl-3.0
notPrelude "Functor" = "AFunctor"
33
notPrelude "Functor" = "AFunctor"
33
notPrelude "Functor" = "AFunctor"
33
false
false
0
5
3
9
4
5
null
null
beni55/LambdaHack
Game/LambdaHack/Client/UI/WidgetClient.hs
bsd-3-clause
describeMainKeys :: MonadClientUI m => m Msg describeMainKeys = do side <- getsClient sside fact <- getsState $ (EM.! side) . sfactionD let underAI = isAIFact fact stgtMode <- getsClient stgtMode Binding{brevMap} <- askBinding Config{configVi, configLaptop} <- askConfig cursor <- getsClient scursor let ...
1,939
describeMainKeys :: MonadClientUI m => m Msg describeMainKeys = do side <- getsClient sside fact <- getsState $ (EM.! side) . sfactionD let underAI = isAIFact fact stgtMode <- getsClient stgtMode Binding{brevMap} <- askBinding Config{configVi, configLaptop} <- askConfig cursor <- getsClient scursor let ...
1,939
describeMainKeys = do side <- getsClient sside fact <- getsState $ (EM.! side) . sfactionD let underAI = isAIFact fact stgtMode <- getsClient stgtMode Binding{brevMap} <- askBinding Config{configVi, configLaptop} <- askConfig cursor <- getsClient scursor let kmLeftButtonPress = M.findWithDefault...
1,894
false
true
0
16
582
519
251
268
null
null
llscm0202/BIGDATA2017
ATIVIDADE1/exerciciosBasicos/ex3.hs
gpl-3.0
main :: IO() main = do print (mult5 10) print (mult5 12)
61
main :: IO() main = do print (mult5 10) print (mult5 12)
61
main = do print (mult5 10) print (mult5 12)
48
false
true
1
10
16
44
18
26
null
null
jaiyalas/haha
src/Lambda/DeBujin/TermUtil.hs
mit
fv' :: Nat -> Term -> [Term] fv' i (Var n) | i <= n = [Var n] | i > n = []
83
fv' :: Nat -> Term -> [Term] fv' i (Var n) | i <= n = [Var n] | i > n = []
83
fv' i (Var n) | i <= n = [Var n] | i > n = []
54
false
true
1
8
32
69
32
37
null
null
kim/amazonka
amazonka-emr/gen/Network/AWS/EMR/Types.hs
mpl-2.0
-- | The name of the command. cName :: Lens' Command (Maybe Text) cName = lens _cName (\s a -> s { _cName = a })
112
cName :: Lens' Command (Maybe Text) cName = lens _cName (\s a -> s { _cName = a })
82
cName = lens _cName (\s a -> s { _cName = a })
46
true
true
1
9
25
49
25
24
null
null
Danten/lejf
src/Types/Rules.hs
bsd-3-clause
tcArg (Proj p) n_orig = do mapping <- unpackNeg _NObject n_orig $ ProjArgumentToNoObject p lookupProjType p mapping
119
tcArg (Proj p) n_orig = do mapping <- unpackNeg _NObject n_orig $ ProjArgumentToNoObject p lookupProjType p mapping
119
tcArg (Proj p) n_orig = do mapping <- unpackNeg _NObject n_orig $ ProjArgumentToNoObject p lookupProjType p mapping
119
false
false
0
9
20
44
19
25
null
null
joelburget/haste-compiler
libraries/haste-lib/src/Haste/DOM/Core.hs
bsd-3-clause
-- | Get a list of all children belonging to a certain element. getChildren :: (IsElem e, MonadIO m) => e -> m [Elem] getChildren e = liftIO $ fromPtr `fmap` jsGetChildren (elemOf e)
182
getChildren :: (IsElem e, MonadIO m) => e -> m [Elem] getChildren e = liftIO $ fromPtr `fmap` jsGetChildren (elemOf e)
118
getChildren e = liftIO $ fromPtr `fmap` jsGetChildren (elemOf e)
64
true
true
0
8
33
59
31
28
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/HTTPSHealthChecks/List.hs
mpl-2.0
-- | Sorts list results by a certain order. By default, results are returned -- in alphanumerical order based on the resource name. You can also sort -- results in descending order based on the creation timestamp using -- orderBy=\"creationTimestamp desc\". This sorts results based on the -- creationTimestamp field in ...
663
hhclOrderBy :: Lens' HTTPSHealthChecksList (Maybe Text) hhclOrderBy = lens _hhclOrderBy (\ s a -> s{_hhclOrderBy = a})
120
hhclOrderBy = lens _hhclOrderBy (\ s a -> s{_hhclOrderBy = a})
64
true
true
0
9
103
55
32
23
null
null
hferreiro/replay
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
coerceFP2FP :: Width -> CmmExpr -> NatM Register coerceFP2FP to x = do use_sse2 <- sse2Enabled (x_reg, x_code) <- getSomeReg x let opc | use_sse2 = case to of W32 -> CVTSD2SS; W64 -> CVTSS2SD; n -> panic $ "coerceFP2FP: unhandled width (" ...
581
coerceFP2FP :: Width -> CmmExpr -> NatM Register coerceFP2FP to x = do use_sse2 <- sse2Enabled (x_reg, x_code) <- getSomeReg x let opc | use_sse2 = case to of W32 -> CVTSD2SS; W64 -> CVTSS2SD; n -> panic $ "coerceFP2FP: unhandled width (" ...
581
coerceFP2FP to x = do use_sse2 <- sse2Enabled (x_reg, x_code) <- getSomeReg x let opc | use_sse2 = case to of W32 -> CVTSD2SS; W64 -> CVTSS2SD; n -> panic $ "coerceFP2FP: unhandled width (" ++ show n ++ ")" ...
532
false
true
0
17
194
166
80
86
null
null
nevrenato/Hets_Fork
Propositional/Parse_AS_Basic.hs
gpl-2.0
-- | Parser for true trueKey :: AnnoState.AParser st Id.Token trueKey = AnnoState.asKey Keywords.trueS
102
trueKey :: AnnoState.AParser st Id.Token trueKey = AnnoState.asKey Keywords.trueS
81
trueKey = AnnoState.asKey Keywords.trueS
40
true
true
0
6
13
28
14
14
null
null
kadena-io/pact
src-ghc/Pact/GasModel/Utils.hs
bsd-3-clause
someModuleData :: ModuleData Ref someModuleData = ModuleData modDef refMap where refMap = HM.empty ref = Direct $ TVar (Name $ BareName "" def) def fst' :: Ref -> Maybe Int fst' = const Nothing scd' :: Term Ref scd' = TVar ref def scopeOfRef :: Scope Int Term Ref ...
612
someModuleData :: ModuleData Ref someModuleData = ModuleData modDef refMap where refMap = HM.empty ref = Direct $ TVar (Name $ BareName "" def) def fst' :: Ref -> Maybe Int fst' = const Nothing scd' :: Term Ref scd' = TVar ref def scopeOfRef :: Scope Int Term Ref ...
612
someModuleData = ModuleData modDef refMap where refMap = HM.empty ref = Direct $ TVar (Name $ BareName "" def) def fst' :: Ref -> Maybe Int fst' = const Nothing scd' :: Term Ref scd' = TVar ref def scopeOfRef :: Scope Int Term Ref scopeOfRef = abstract fst' scd...
579
false
true
14
8
181
207
102
105
null
null
HSU-MilitaryLogisticsClub/Free-Test
src/bmphask/bmpread24.hs
mit
plusp a b = a ++ b
18
plusp a b = a ++ b
18
plusp a b = a ++ b
18
false
false
0
5
6
15
7
8
null
null
jwiegley/ghc-release
utils/haddock/src/Haddock/Parser.hs
gpl-3.0
-- | Runs the 'parseParas' parser on an indented paragraph. -- The indentation is 4 spaces. indentedParagraphs :: DynFlags -> Parser (Doc RdrName) indentedParagraphs d = parseParas d . concat <$> dropFrontOfPara " "
218
indentedParagraphs :: DynFlags -> Parser (Doc RdrName) indentedParagraphs d = parseParas d . concat <$> dropFrontOfPara " "
126
indentedParagraphs d = parseParas d . concat <$> dropFrontOfPara " "
71
true
true
0
8
36
43
21
22
null
null
kuribas/hmetafont
Typography/HMetafont.hs
bsd-3-clause
-- lift a MFSolve compatible monad into the MFAction monad. Return Either a S.DepError or the value. liftSolver :: StateT (S.Dependencies MFVar e) (Either (S.DepError MFVar e)) a -> MFAction e r (Either (S.DepError MFVar e) a) liftSolver m = do deps <- use mfDeps case runStateT m deps of Left err ->...
976
liftSolver :: StateT (S.Dependencies MFVar e) (Either (S.DepError MFVar e)) a -> MFAction e r (Either (S.DepError MFVar e) a) liftSolver m = do deps <- use mfDeps case runStateT m deps of Left err -> return $ Left err Right (a,s) -> do mfDeps .= s return $ Right a -- | A variable exp...
874
liftSolver m = do deps <- use mfDeps case runStateT m deps of Left err -> return $ Left err Right (a,s) -> do mfDeps .= s return $ Right a -- | A variable expression with label. Depending on the current -- system of equations, the variable can have on of three states: -- -- * /Known/: the va...
737
true
true
0
13
220
156
78
78
null
null
AndrewRademacher/zotac
lib/Data/Raft/Node/Internal.hs
mit
tick ctime node@((^. nodeStanding) -> Leader subjects) = if addUTCTime (node ^. nodeTimeout) (node ^. nodeLastTick) < oneThirdTimeout then (sendHeartbeats node, node & nodeLastTick .~ ctime) else (NoAction, node) where oneThirdTimeout = (node ^. nodeTimeout) P.* 0.33
279
tick ctime node@((^. nodeStanding) -> Leader subjects) = if addUTCTime (node ^. nodeTimeout) (node ^. nodeLastTick) < oneThirdTimeout then (sendHeartbeats node, node & nodeLastTick .~ ctime) else (NoAction, node) where oneThirdTimeout = (node ^. nodeTimeout) P.* 0.33
279
tick ctime node@((^. nodeStanding) -> Leader subjects) = if addUTCTime (node ^. nodeTimeout) (node ^. nodeLastTick) < oneThirdTimeout then (sendHeartbeats node, node & nodeLastTick .~ ctime) else (NoAction, node) where oneThirdTimeout = (node ^. nodeTimeout) P.* 0.33
279
false
false
3
9
48
112
56
56
null
null
sgillespie/ghc
compiler/utils/Outputable.hs
bsd-3-clause
integer n = docToSDoc $ Pretty.integer n
42
integer n = docToSDoc $ Pretty.integer n
42
integer n = docToSDoc $ Pretty.integer n
42
false
false
0
7
8
18
8
10
null
null
robstewart57/ripl
src/AstMappings.hs
bsd-3-clause
globalIdentsElemBinary :: R.TwoVarFun -> [R.Ident] globalIdentsElemBinary (R.TwoVarFunC idents1 idents2 exp) = ((nub (idsFromExp exp)) \\ ((case idents1 of R.IdentsOneId ident -> [ident] R.IdentsManyIds ids -> ids) ++ (case idents2 of R.IdentsOneId ident -> [ident] R.IdentsMa...
339
globalIdentsElemBinary :: R.TwoVarFun -> [R.Ident] globalIdentsElemBinary (R.TwoVarFunC idents1 idents2 exp) = ((nub (idsFromExp exp)) \\ ((case idents1 of R.IdentsOneId ident -> [ident] R.IdentsManyIds ids -> ids) ++ (case idents2 of R.IdentsOneId ident -> [ident] R.IdentsMa...
339
globalIdentsElemBinary (R.TwoVarFunC idents1 idents2 exp) = ((nub (idsFromExp exp)) \\ ((case idents1 of R.IdentsOneId ident -> [ident] R.IdentsManyIds ids -> ids) ++ (case idents2 of R.IdentsOneId ident -> [ident] R.IdentsManyIds ids -> ids)))
288
false
true
0
14
81
127
65
62
null
null
ganeti/ganeti
src/Ganeti/JSON.hs
bsd-2-clause
-- | Reads the value of a key in a JSON object. fromObj :: (J.JSON a, MonadFail m) => JSRecord -> String -> m a fromObj o k = case lookup k o of Nothing -> fail $ buildNoKeyError o k Just val -> fromKeyValue k val -- | Reads the value of an optional key in a JSON object. Missing -- keys, or keys that have a ...
436
fromObj :: (J.JSON a, MonadFail m) => JSRecord -> String -> m a fromObj o k = case lookup k o of Nothing -> fail $ buildNoKeyError o k Just val -> fromKeyValue k val -- | Reads the value of an optional key in a JSON object. Missing -- keys, or keys that have a \'null\' value, will be returned as -- 'Nothing'...
388
fromObj o k = case lookup k o of Nothing -> fail $ buildNoKeyError o k Just val -> fromKeyValue k val -- | Reads the value of an optional key in a JSON object. Missing -- keys, or keys that have a \'null\' value, will be returned as -- 'Nothing', otherwise we attempt deserialisation and return a 'Just' -- va...
324
true
true
0
9
96
87
44
43
null
null
fredfeng/HaskellCodes
hw6.hs
apache-2.0
getConstraints (Literal (IntV x)) f env = let new = TVar ("x"++ show f) in ([(new, TInt)], f, new)
126
getConstraints (Literal (IntV x)) f env = let new = TVar ("x"++ show f) in ([(new, TInt)], f, new)
126
getConstraints (Literal (IntV x)) f env = let new = TVar ("x"++ show f) in ([(new, TInt)], f, new)
126
false
false
0
12
46
67
35
32
null
null
markus-git/co-feldspar
src/Feldspar/Software/Compile.hs
bsd-3-clause
newRefV :: Monad m => STypeRep a -> String -> TargetT m (Struct SoftwarePrimType Imp.Ref a) newRefV t base = lift $ mapStructA (const (Imp.newNamedRef base)) t
159
newRefV :: Monad m => STypeRep a -> String -> TargetT m (Struct SoftwarePrimType Imp.Ref a) newRefV t base = lift $ mapStructA (const (Imp.newNamedRef base)) t
159
newRefV t base = lift $ mapStructA (const (Imp.newNamedRef base)) t
67
false
true
2
12
26
79
36
43
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/WAFRegionalIPSet.hs
mit
wafRegionalIPSet :: Val Text -- ^ 'wafripsName' -> WAFRegionalIPSet wafRegionalIPSet namearg = WAFRegionalIPSet { _wAFRegionalIPSetIPSetDescriptors = Nothing , _wAFRegionalIPSetName = namearg }
205
wafRegionalIPSet :: Val Text -- ^ 'wafripsName' -> WAFRegionalIPSet wafRegionalIPSet namearg = WAFRegionalIPSet { _wAFRegionalIPSetIPSetDescriptors = Nothing , _wAFRegionalIPSetName = namearg }
205
wafRegionalIPSet namearg = WAFRegionalIPSet { _wAFRegionalIPSetIPSetDescriptors = Nothing , _wAFRegionalIPSetName = namearg }
133
false
true
0
7
33
45
22
23
null
null
thielema/wxhaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs
lgpl-2.1
{----------------------------------------------------------------------------------------- CFunPtr -----------------------------------------------------------------------------------------} toCFunPtr :: FunPtr a -> Ptr a toCFunPtr fptr = castFunPtrToPtr fptr
262
toCFunPtr :: FunPtr a -> Ptr a toCFunPtr fptr = castFunPtrToPtr fptr
70
toCFunPtr fptr = castFunPtrToPtr fptr
39
true
true
0
6
18
28
13
15
null
null
DaMSL/K3
src/Language/K3/Analysis/HMTypes/Inference.hs
apache-2.0
tvpath :: TVEnv -> QTVarId -> [QTVarId] tvpath tve v = acyclicPath [] v where acyclicPath acc v' | v' `elem` acc = acc | Just qt <- tvlkup tve v' , QTVar nv <- tag qt = acyclicPath (v':acc) nv acyclicPath acc v' = v':acc -- Compute (quite unoptimally) the...
421
tvpath :: TVEnv -> QTVarId -> [QTVarId] tvpath tve v = acyclicPath [] v where acyclicPath acc v' | v' `elem` acc = acc | Just qt <- tvlkup tve v' , QTVar nv <- tag qt = acyclicPath (v':acc) nv acyclicPath acc v' = v':acc -- Compute (quite unoptimally) the...
421
tvpath tve v = acyclicPath [] v where acyclicPath acc v' | v' `elem` acc = acc | Just qt <- tvlkup tve v' , QTVar nv <- tag qt = acyclicPath (v':acc) nv acyclicPath acc v' = v':acc -- Compute (quite unoptimally) the characteristic function of the set -- ...
381
false
true
2
9
128
136
61
75
null
null
VictorDenisov/ldap-client
test/SpecHelper.hs
bsd-2-clause
venusaur :: Dn venusaur = Dn "cn=venusaur,o=localhost"
54
venusaur :: Dn venusaur = Dn "cn=venusaur,o=localhost"
54
venusaur = Dn "cn=venusaur,o=localhost"
39
false
true
0
6
6
21
8
13
null
null
rueshyna/gogol
gogol-prediction/gen/Network/Google/Prediction/Types/Product.hs
mpl-2.0
-- | The feature index. addfiIndex :: Lens' AnalyzeDataDescriptionFeaturesItem (Maybe Int64) addfiIndex = lens _addfiIndex (\ s a -> s{_addfiIndex = a}) . mapping _Coerce
178
addfiIndex :: Lens' AnalyzeDataDescriptionFeaturesItem (Maybe Int64) addfiIndex = lens _addfiIndex (\ s a -> s{_addfiIndex = a}) . mapping _Coerce
154
addfiIndex = lens _addfiIndex (\ s a -> s{_addfiIndex = a}) . mapping _Coerce
85
true
true
0
10
32
55
28
27
null
null
nishiuramakoto/logiku
test/Handler/PrologSpec.hs
gpl-3.0
rangeList2 = struct3 "rangeList2"
33
rangeList2 = struct3 "rangeList2"
33
rangeList2 = struct3 "rangeList2"
33
false
false
1
5
3
13
4
9
null
null
mariefarrell/Hets
Comorphisms/HasCASL2THFP_P.hs
gpl-2.0
transNamedSentence :: Maybe IdConstantMap -> IdSet -> Env -> Named Sentence -> Result (Named THFFormula, IdSet) transNamedSentence micm ids sig ns' = do icm <- maybe (genIdConstantMap sig) return micm let ns = reName (\ n -> case n of [] -> n ...
772
transNamedSentence :: Maybe IdConstantMap -> IdSet -> Env -> Named Sentence -> Result (Named THFFormula, IdSet) transNamedSentence micm ids sig ns' = do icm <- maybe (genIdConstantMap sig) return micm let ns = reName (\ n -> case n of [] -> n ...
772
transNamedSentence micm ids sig ns' = do icm <- maybe (genIdConstantMap sig) return micm let ns = reName (\ n -> case n of [] -> n x : xs -> toLower x : xs) ns' case sentence ns of Formula term -> do (lf, nids) <- transTerm sig icm ...
632
false
true
0
19
305
226
109
117
null
null
phylake/avm3
vm/execute.hs
mit
pfx_class_info_idx :: VmRtP pfx_class_info_idx = ClassIdx$ BC.pack$ avm_prefix ++ "class_info_idx"
98
pfx_class_info_idx :: VmRtP pfx_class_info_idx = ClassIdx$ BC.pack$ avm_prefix ++ "class_info_idx"
98
pfx_class_info_idx = ClassIdx$ BC.pack$ avm_prefix ++ "class_info_idx"
70
false
true
0
8
9
25
13
12
null
null
SKA-ScienceDataProcessor/RC
MS4/dna-programs/Kernel/GPU/ScatterGrid.hs
apache-2.0
degridHints :: GridPar -> Vis -> GCFSet -> [ProfileHint] degridHints _ vis gcfSet = [ cudaHint { hintCudaDoubleOps = 8 * pixelDepCount vis gcfSet } ]
151
degridHints :: GridPar -> Vis -> GCFSet -> [ProfileHint] degridHints _ vis gcfSet = [ cudaHint { hintCudaDoubleOps = 8 * pixelDepCount vis gcfSet } ]
151
degridHints _ vis gcfSet = [ cudaHint { hintCudaDoubleOps = 8 * pixelDepCount vis gcfSet } ]
94
false
true
0
10
27
59
29
30
null
null
brendanhay/gogol
gogol-appengine/gen/Network/Google/AppEngine/Types/Product.hs
mpl-2.0
-- | URL to serve the endpoint at. achURL :: Lens' APIConfigHandler (Maybe Text) achURL = lens _achURL (\ s a -> s{_achURL = a})
128
achURL :: Lens' APIConfigHandler (Maybe Text) achURL = lens _achURL (\ s a -> s{_achURL = a})
93
achURL = lens _achURL (\ s a -> s{_achURL = a})
47
true
true
1
9
24
52
25
27
null
null
andyarvanitis/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
c_irts FAny l x = l ++ x
24
c_irts FAny l x = l ++ x
24
c_irts FAny l x = l ++ x
24
false
false
0
5
7
17
8
9
null
null
vadimjprokopev/Thesis
Haskell/Derivative/Derivative.hs
mit
simplify (Neg a) = Neg (simplify a)
35
simplify (Neg a) = Neg (simplify a)
35
simplify (Neg a) = Neg (simplify a)
35
false
false
0
7
6
24
11
13
null
null
YelaSeamless/cgrep
src/CGrep/Semantic/Cpp/Token.hs
gpl-2.0
getTokenNumber _ _ = undefined
30
getTokenNumber _ _ = undefined
30
getTokenNumber _ _ = undefined
30
false
false
0
5
4
11
5
6
null
null
apyrgio/snf-ganeti
test/hs/Test/Ganeti/JSON.hs
bsd-2-clause
prop_arrayMaybeFromObjFail :: String -> String -> Property prop_arrayMaybeFromObjFail t k = case JSON.tryArrayMaybeFromObj t [] k of BasicTypes.Ok r -> fail $ "Unexpected result, got: " ++ show (r::[Maybe Int]) BasicTypes.Bad e -> conjoin [ Data.List.isInfixOf t e ==? True ...
407
prop_arrayMaybeFromObjFail :: String -> String -> Property prop_arrayMaybeFromObjFail t k = case JSON.tryArrayMaybeFromObj t [] k of BasicTypes.Ok r -> fail $ "Unexpected result, got: " ++ show (r::[Maybe Int]) BasicTypes.Bad e -> conjoin [ Data.List.isInfixOf t e ==? True ...
407
prop_arrayMaybeFromObjFail t k = case JSON.tryArrayMaybeFromObj t [] k of BasicTypes.Ok r -> fail $ "Unexpected result, got: " ++ show (r::[Maybe Int]) BasicTypes.Bad e -> conjoin [ Data.List.isInfixOf t e ==? True , Data.List.isInfixOf k e ==? True ...
348
false
true
0
12
143
117
58
59
null
null