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
jprider63/yesod
yesod-core/Yesod/Core/Handler.hs
mit
clearUltDest :: MonadHandler m => m () clearUltDest = deleteSession ultDestKey
78
clearUltDest :: MonadHandler m => m () clearUltDest = deleteSession ultDestKey
78
clearUltDest = deleteSession ultDestKey
39
false
true
0
7
10
26
12
14
null
null
bsl/GLFW-b
Graphics/UI/GLFW.hs
bsd-2-clause
-- | If the window is resizable or not. -- See <http://www.glfw.org/docs/3.3/group__window.html#gacccb29947ea4b16860ebef42c2cb9337 glfwGetWindowAttrib> getWindowResizable :: Window -> IO Bool getWindowResizable win = fromC `fmap` c'glfwGetWindowAttrib (toC win) c'GLFW_RESIZABLE
282
getWindowResizable :: Window -> IO Bool getWindowResizable win = fromC `fmap` c'glfwGetWindowAttrib (toC win) c'GLFW_RESIZABLE
130
getWindowResizable win = fromC `fmap` c'glfwGetWindowAttrib (toC win) c'GLFW_RESIZABLE
90
true
true
0
8
31
40
21
19
null
null
agomezl/tstp2agda
src/TSTP/Base.hs
mit
eadRole "conjecture" = Conjecture
42
readRole "conjecture" = Conjecture
42
readRole "conjecture" = Conjecture
42
false
false
0
5
12
9
4
5
null
null
sgillespie/ghc
compiler/nativeGen/PPC/CodeGen.hs
bsd-3-clause
mangleIndexTree _ _ = panic "PPC.CodeGen.mangleIndexTree: no match"
75
mangleIndexTree _ _ = panic "PPC.CodeGen.mangleIndexTree: no match"
75
mangleIndexTree _ _ = panic "PPC.CodeGen.mangleIndexTree: no match"
75
false
false
0
5
15
14
6
8
null
null
wavewave/lhc-analysis-collection
analysis/histograms_ATLAS1to2L2to6JMET_8TeV.hs
gpl-3.0
-- | luminosity :: Double luminosity = 20300
46
luminosity :: Double luminosity = 20300
39
luminosity = 20300
18
true
true
0
6
9
19
8
11
null
null
tmielcza/demiurge
src/Interactive.hs
apache-2.0
displayInitDatas _ = print "no datas from the previous resolution"
66
displayInitDatas _ = print "no datas from the previous resolution"
66
displayInitDatas _ = print "no datas from the previous resolution"
66
false
false
0
5
9
12
5
7
null
null
pikajude/melvin
src/Melvin/Client/Packet.hs
mit
cmdPrivaction n channel text = Packet (hostOf n) "PRIVMSG" [channel, ac . bullets $ text] where ac m = "\1ACTION " ++ m ++ "\1"
135
cmdPrivaction n channel text = Packet (hostOf n) "PRIVMSG" [channel, ac . bullets $ text] where ac m = "\1ACTION " ++ m ++ "\1"
135
cmdPrivaction n channel text = Packet (hostOf n) "PRIVMSG" [channel, ac . bullets $ text] where ac m = "\1ACTION " ++ m ++ "\1"
135
false
false
0
7
32
59
29
30
null
null
TransformingMusicology/tabcode-haskell
src/TabCode/Serialiser/MEIXML/Serialiser.hs
gpl-3.0
meiDoc (MEIPerfRes attrs []) xmlIds = meiXml_ "perfRes" attrs xmlIds
70
meiDoc (MEIPerfRes attrs []) xmlIds = meiXml_ "perfRes" attrs xmlIds
70
meiDoc (MEIPerfRes attrs []) xmlIds = meiXml_ "perfRes" attrs xmlIds
70
false
false
0
8
11
28
13
15
null
null
GaloisInc/sk-dev-platform
user/sklite/src/Sklite/Boot.hs
bsd-3-clause
crossBootScriptFilename :: FilePath crossBootScriptFilename = "boot.sh"
71
crossBootScriptFilename :: FilePath crossBootScriptFilename = "boot.sh"
71
crossBootScriptFilename = "boot.sh"
35
false
true
0
4
5
11
6
5
null
null
juhp/stack
test/integration/tests/skip-unreachable-dirs/Main.hs
bsd-3-clause
main :: IO () main = do removeFileIgnore "stack.yaml" createDirectory "unreachabledir" `catch` \(e :: IOException) -> pure () setPermissions "unreachabledir" emptyPermissions stack ["init"]
206
main :: IO () main = do removeFileIgnore "stack.yaml" createDirectory "unreachabledir" `catch` \(e :: IOException) -> pure () setPermissions "unreachabledir" emptyPermissions stack ["init"]
206
main = do removeFileIgnore "stack.yaml" createDirectory "unreachabledir" `catch` \(e :: IOException) -> pure () setPermissions "unreachabledir" emptyPermissions stack ["init"]
192
false
true
0
10
39
68
32
36
null
null
d0kt0r0/Tidal
src/Sound/Tidal/Core.hs
gpl-3.0
in49 :: Pattern Double in49 = cF 0 "49"
39
in49 :: Pattern Double in49 = cF 0 "49"
39
in49 = cF 0 "49"
16
false
true
1
5
8
24
9
15
null
null
rkoeninger/GameCom
src/lib/CPU.hs
mit
decode 0x3e = (rol, abxMode, 7)
31
decode 0x3e = (rol, abxMode, 7)
31
decode 0x3e = (rol, abxMode, 7)
31
false
false
0
5
5
18
10
8
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT18.hs
gpl-3.0
qrevflat ((x:xs):xss) acc = qrevflat (xs:xss) (x:acc)
53
qrevflat ((x:xs):xss) acc = qrevflat (xs:xss) (x:acc)
53
qrevflat ((x:xs):xss) acc = qrevflat (xs:xss) (x:acc)
53
false
false
0
9
6
44
23
21
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs
mit
decomposeChar '\x1FC7' = "\x03B7\x0342\x0345"
45
decomposeChar '\x1FC7' = "\x03B7\x0342\x0345"
45
decomposeChar '\x1FC7' = "\x03B7\x0342\x0345"
45
false
false
0
4
3
10
4
6
null
null
jdevelop/carboncopy
CarbonCopy/EmailStorage.hs
bsd-3-clause
(?&) :: IO Bool -> IO () -> IO () (?&) cond act = cond ?: ( act, return () )
76
(?&) :: IO Bool -> IO () -> IO () (?&) cond act = cond ?: ( act, return () )
76
(?&) cond act = cond ?: ( act, return () )
42
false
true
0
8
20
56
29
27
null
null
brendanhay/gogol
gogol-dataproc/gen/Network/Google/Dataproc/Types/Product.hs
mpl-2.0
-- | etag is used for optimistic concurrency control as a way to help prevent -- simultaneous updates of a policy from overwriting each other. It is -- strongly suggested that systems make use of the etag in the -- read-modify-write cycle to perform policy updates in order to avoid race -- conditions: An etag is return...
898
pEtag :: Lens' Policy (Maybe ByteString) pEtag = lens _pEtag (\ s a -> s{_pEtag = a}) . mapping _Bytes
110
pEtag = lens _pEtag (\ s a -> s{_pEtag = a}) . mapping _Bytes
69
true
true
0
10
170
65
38
27
null
null
kishoredbn/barrelfish
tools/sockeye/v1/SockeyeParser.hs
mit
moduleParam = do paramType <- choice [intType, addrType] <?> "parameter type" paramName <- parameterName return AST.ModuleParam { AST.paramName = paramName , AST.paramType = paramType } where intType = do symbol "nat" return AST.NaturalParam ...
397
moduleParam = do paramType <- choice [intType, addrType] <?> "parameter type" paramName <- parameterName return AST.ModuleParam { AST.paramName = paramName , AST.paramType = paramType } where intType = do symbol "nat" return AST.NaturalParam ...
397
moduleParam = do paramType <- choice [intType, addrType] <?> "parameter type" paramName <- parameterName return AST.ModuleParam { AST.paramName = paramName , AST.paramType = paramType } where intType = do symbol "nat" return AST.NaturalParam ...
397
false
false
3
10
143
110
47
63
null
null
marcelosousa/poet
src/Test/Examples/ExTwo.hs
gpl-2.0
t3_2' s = let v = safeLookup "t3" s (BS.pack "pcr") in case v of IntVal 1 -> let pcVal = (IntVal 2) x = safeLookup "t3" s (BS.pack "x") ns = insert (BS.pack "pcr") pcVal s ns' = insert (BS.pack "l2") x ns in [ns'] _ -> []
276
t3_2' s = let v = safeLookup "t3" s (BS.pack "pcr") in case v of IntVal 1 -> let pcVal = (IntVal 2) x = safeLookup "t3" s (BS.pack "x") ns = insert (BS.pack "pcr") pcVal s ns' = insert (BS.pack "l2") x ns in [ns'] _ -> []
276
t3_2' s = let v = safeLookup "t3" s (BS.pack "pcr") in case v of IntVal 1 -> let pcVal = (IntVal 2) x = safeLookup "t3" s (BS.pack "x") ns = insert (BS.pack "pcr") pcVal s ns' = insert (BS.pack "l2") x ns in [ns'] _ -> []
276
false
false
2
12
103
138
66
72
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Constraint/Fresh.hs
bsd-3-clause
trueRefType (RVar a r) = RVar a <$> true r
44
trueRefType (RVar a r) = RVar a <$> true r
44
trueRefType (RVar a r) = RVar a <$> true r
44
false
false
2
6
11
30
12
18
null
null
jaspervdj/hstyle
tests/HStyle/Rules/AppSpacing/Tests.hs
bsd-3-clause
appSpacing_04 :: Assertion appSpacing_04 = testRuleReject appSpacingRule "foo x y = x`append` y"
96
appSpacing_04 :: Assertion appSpacing_04 = testRuleReject appSpacingRule "foo x y = x`append` y"
96
appSpacing_04 = testRuleReject appSpacingRule "foo x y = x`append` y"
69
false
true
0
5
12
16
8
8
null
null
apyrgio/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- | Key for job IDs in opcode result jobIdsKey :: String jobIdsKey = "jobs"
76
jobIdsKey :: String jobIdsKey = "jobs"
38
jobIdsKey = "jobs"
18
true
true
0
4
14
12
7
5
null
null
PhDP/Sphinx-AI
Faun/FOL.hs
mit
-- | Special "False", "Bot", "Bottom" predicate. bot :: FOL bot = Atom $ Predicate "Bot" []
91
bot :: FOL bot = Atom $ Predicate "Bot" []
42
bot = Atom $ Predicate "Bot" []
31
true
true
0
7
16
23
12
11
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/course/2018-06-snoyman-applied-haskell-at-lambdaconf/all/src/AH.hs
unlicense
{- LOTS OF MEMORY USAGE! stack build stack exec average --rts-options "+RTS -s" -- a 1 -} -- ** Weak Head Normal Form (WHNF) -- see : https://stackoverflow.com/a/6889335/369198 -- TODO -- seq evaluates to WHNF -- WHNF is "unwrapping constructor" (not what is inside) -- unwrapping one level x1 = putStrLn $ ...
351
x1 = putStrLn $ undefined `seq` "Hello"
47
x1 = putStrLn $ undefined `seq` "Hello"
47
true
false
3
5
75
26
15
11
null
null
dosenfrucht/beagle
src/Bytecode.hs
gpl-2.0
indexOf :: [String] -> String -> Instruction indexOf = index' 0 where index' _ [] v = PushGlobal v index' i (x : xs) v | x == v = PushVar i | otherwise = index' (i + 1) xs v
232
indexOf :: [String] -> String -> Instruction indexOf = index' 0 where index' _ [] v = PushGlobal v index' i (x : xs) v | x == v = PushVar i | otherwise = index' (i + 1) xs v
232
indexOf = index' 0 where index' _ [] v = PushGlobal v index' i (x : xs) v | x == v = PushVar i | otherwise = index' (i + 1) xs v
187
false
true
0
10
99
99
48
51
null
null
jonsterling/tt-singletons
src/TT/Operator.hs
mit
sing ∷ Abt v Op t ⇒ t Z → t Z → t Z sing α m = SING $$ α :& m :& RNil
69
sing ∷ Abt v Op t ⇒ t Z → t Z → t Z sing α m = SING $$ α :& m :& RNil
69
sing α m = SING $$ α :& m :& RNil
33
false
true
0
8
25
56
26
30
null
null
ucsd-progsys/nanomaly
src/NanoML/Misc.hs
bsd-3-clause
ifM :: Monad m => m Bool -> m a -> m a -> m a ifM b t f = do b <- b; if b then t else f
87
ifM :: Monad m => m Bool -> m a -> m a -> m a ifM b t f = do b <- b; if b then t else f
87
ifM b t f = do b <- b; if b then t else f
41
false
true
0
9
30
74
33
41
null
null
damoxc/ganeti
test/hs/Test/Ganeti/TestCommon.hs
gpl-2.0
-- | Generate an arbitrary IPv4 address in textual form (non empty). genIp4Addr :: Gen NonEmptyString genIp4Addr = genIp4AddrStr >>= mkNonEmpty
143
genIp4Addr :: Gen NonEmptyString genIp4Addr = genIp4AddrStr >>= mkNonEmpty
74
genIp4Addr = genIp4AddrStr >>= mkNonEmpty
41
true
true
0
5
20
19
10
9
null
null
Javran/Project-Euler
src/ProjectEuler/Problem47.hs
mit
result :: Int result = head $ find4Consecutives [] [1..]
56
result :: Int result = head $ find4Consecutives [] [1..]
56
result = head $ find4Consecutives [] [1..]
42
false
true
0
7
9
31
14
17
null
null
rhofour/rlglue-haskell-codec
src/RL_Glue/Network.hs
apache-2.0
putObservation :: Observation -> Put putObservation (Observation absType) = putAbstractType absType
99
putObservation :: Observation -> Put putObservation (Observation absType) = putAbstractType absType
99
putObservation (Observation absType) = putAbstractType absType
62
false
true
0
7
10
27
13
14
null
null
grnet/snf-ganeti
src/Ganeti/JSON.hs
bsd-2-clause
showJSONtoDict :: (DictObject a) => a -> J.JSValue showJSONtoDict = J.makeObj . toDict
86
showJSONtoDict :: (DictObject a) => a -> J.JSValue showJSONtoDict = J.makeObj . toDict
86
showJSONtoDict = J.makeObj . toDict
35
false
true
0
7
12
32
17
15
null
null
adscib/monad-bayes
src/Control/Monad/Bayes/Inference/SMC2.hs
mit
-- | Sequential Monte Carlo squared. smc2 :: MonadSample m => Int -- ^ number of time steps -> Int -- ^ number of inner particles -> Int -- ^ number of outer particles -> Int -- ^ number of MH transitions -> S (T (P m)) b -- ^ model parameters -> ( b -> S (P (SMC2 m)) a) -- ^ model ->...
449
smc2 :: MonadSample m => Int -- ^ number of time steps -> Int -- ^ number of inner particles -> Int -- ^ number of outer particles -> Int -- ^ number of MH transitions -> S (T (P m)) b -- ^ model parameters -> ( b -> S (P (SMC2 m)) a) -- ^ model -> P m [(a, Log Double)] smc2 k n p t p...
412
smc2 k n p t param model = rmsmc k p t (param >>= setup . runPopulation . smcSystematicPush k n . model)
106
true
true
0
18
129
153
79
74
null
null
mimi1vx/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
checkArithmeticOpCommand _ (T_SimpleCommand id [T_Assignment {}] (firstWord:_)) = fromMaybe (return ()) $ check <$> getGlobOrLiteralString firstWord where check op = when (op `elem` ["+", "-", "*", "/"]) $ warn (getId firstWord) 2099 $ "Use $((..)) for arithmetics, e.g. i=$...
341
checkArithmeticOpCommand _ (T_SimpleCommand id [T_Assignment {}] (firstWord:_)) = fromMaybe (return ()) $ check <$> getGlobOrLiteralString firstWord where check op = when (op `elem` ["+", "-", "*", "/"]) $ warn (getId firstWord) 2099 $ "Use $((..)) for arithmetics, e.g. i=$...
341
checkArithmeticOpCommand _ (T_SimpleCommand id [T_Assignment {}] (firstWord:_)) = fromMaybe (return ()) $ check <$> getGlobOrLiteralString firstWord where check op = when (op `elem` ["+", "-", "*", "/"]) $ warn (getId firstWord) 2099 $ "Use $((..)) for arithmetics, e.g. i=$...
341
false
false
4
10
90
127
61
66
null
null
ganeti-github-testing/ganeti-test-1
src/Ganeti/OpParams.hs
bsd-2-clause
readExportTarget (JSArray arr) = return $ ExportTargetRemote arr
64
readExportTarget (JSArray arr) = return $ ExportTargetRemote arr
64
readExportTarget (JSArray arr) = return $ ExportTargetRemote arr
64
false
false
0
6
7
23
10
13
null
null
gridaphobe/ghc
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
bsd-3-clause
genLlvmProc _ = panic "genLlvmProc: case that shouldn't reach here!"
68
genLlvmProc _ = panic "genLlvmProc: case that shouldn't reach here!"
68
genLlvmProc _ = panic "genLlvmProc: case that shouldn't reach here!"
68
false
false
0
5
9
12
5
7
null
null
vincenthz/hs-bsparse
Data/ByteString/Parse.hs
bsd-3-clause
takeStorable :: Storable d => Parser d takeStorable = anyStorable undefined where anyStorable :: Storable d => d -> Parser d anyStorable a = do (fptr, off, _) <- B.toForeignPtr <$> take (sizeOf a) return $ unsafePerformIO $ withForeignPtr fptr $ \ptr -> peekByteOff ptr off -- | T...
372
takeStorable :: Storable d => Parser d takeStorable = anyStorable undefined where anyStorable :: Storable d => d -> Parser d anyStorable a = do (fptr, off, _) <- B.toForeignPtr <$> take (sizeOf a) return $ unsafePerformIO $ withForeignPtr fptr $ \ptr -> peekByteOff ptr off -- | T...
372
takeStorable = anyStorable undefined where anyStorable :: Storable d => d -> Parser d anyStorable a = do (fptr, off, _) <- B.toForeignPtr <$> take (sizeOf a) return $ unsafePerformIO $ withForeignPtr fptr $ \ptr -> peekByteOff ptr off -- | Take @n bytes from the current position in the stream
320
false
true
3
11
97
112
55
57
null
null
nevrenato/Hets_Fork
CSL/Parse_Test.hs
gpl-2.0
res26 = splitSpec testspec emptySig
35
res26 = splitSpec testspec emptySig
35
res26 = splitSpec testspec emptySig
35
false
false
0
5
4
11
5
6
null
null
brendanhay/gogol
gogol-streetviewpublish/gen/Network/Google/StreetViewPublish/Types/Product.hs
mpl-2.0
-- | Required. A name assigned to this Level, restricted to 3 characters. -- Consider how the elevator buttons would be labeled for this level if -- there was an elevator. lName :: Lens' Level (Maybe Text) lName = lens _lName (\ s a -> s{_lName = a})
250
lName :: Lens' Level (Maybe Text) lName = lens _lName (\ s a -> s{_lName = a})
78
lName = lens _lName (\ s a -> s{_lName = a})
44
true
true
0
9
47
48
27
21
null
null
thoughtpolice/cabal
Cabal/Distribution/Simple/GHCJS.hs
bsd-3-clause
supportsDynamicToo :: Compiler -> Bool supportsDynamicToo = Internal.ghcLookupProperty "Support dynamic-too"
108
supportsDynamicToo :: Compiler -> Bool supportsDynamicToo = Internal.ghcLookupProperty "Support dynamic-too"
108
supportsDynamicToo = Internal.ghcLookupProperty "Support dynamic-too"
69
false
true
0
6
9
20
10
10
null
null
stevezhee/grm
Grm/Lex.hs
bsd-3-clause
delLeadingZeros :: String -> String delLeadingZeros x = case dropWhile ((==) '0') x of [] -> "0" a -> a
107
delLeadingZeros :: String -> String delLeadingZeros x = case dropWhile ((==) '0') x of [] -> "0" a -> a
107
delLeadingZeros x = case dropWhile ((==) '0') x of [] -> "0" a -> a
71
false
true
2
8
23
52
25
27
null
null
erisco/haskell-decision
src/nary.hs
bsd-3-clause
-- padRight :: Int -> String -> String padRight n s = s ++ replicate (n - length s) ' '
88
padRight :: Int -> String -> String padRight n s = s ++ replicate (n - length s) ' '
84
padRight n s = s ++ replicate (n - length s) ' '
48
true
true
0
9
21
44
22
22
null
null
DougBurke/swish
tests/RDFQueryTest.hs
lgpl-2.1
vbss03 :: [[RDFVarBinding]] vbss03 = [ vbss03a , vbss03b ]
79
vbss03 :: [[RDFVarBinding]] vbss03 = [ vbss03a , vbss03b ]
79
vbss03 = [ vbss03a , vbss03b ]
51
false
true
0
8
30
30
15
15
null
null
ezyang/ghc
compiler/stgSyn/CoreToStg.hs
bsd-3-clause
coreToStgExpr (Var v) = coreToStgApp Nothing v [] []
71
coreToStgExpr (Var v) = coreToStgApp Nothing v [] []
71
coreToStgExpr (Var v) = coreToStgApp Nothing v [] []
71
false
false
0
7
27
28
13
15
null
null
leksah/yi
src/library/Yi/Syntax/Haskell.hs
gpl-2.0
pConstrs :: Parser TT (Exp TT) pConstrs = Bin <$> (Bin <$> pOpt pContext <*> pConstr) <*> pMany (pOP [ReservedOp Pipe] (Bin <$> pOpt pContext <*> please pConstr))
187
pConstrs :: Parser TT (Exp TT) pConstrs = Bin <$> (Bin <$> pOpt pContext <*> pConstr) <*> pMany (pOP [ReservedOp Pipe] (Bin <$> pOpt pContext <*> please pConstr))
187
pConstrs = Bin <$> (Bin <$> pOpt pContext <*> pConstr) <*> pMany (pOP [ReservedOp Pipe] (Bin <$> pOpt pContext <*> please pConstr))
156
false
true
7
11
52
90
40
50
null
null
yliu120/K3
src/Language/K3/Core/Utils.hs
apache-2.0
collectProgramUIDs :: K3 Declaration -> [UID] collectProgramUIDs d = fst $ foldProgramUID (flip (:)) [] d
105
collectProgramUIDs :: K3 Declaration -> [UID] collectProgramUIDs d = fst $ foldProgramUID (flip (:)) [] d
105
collectProgramUIDs d = fst $ foldProgramUID (flip (:)) [] d
59
false
true
0
8
15
45
23
22
null
null
mcschroeder/ghc
libraries/template-haskell/Language/Haskell/TH/Lib.hs
bsd-3-clause
fromThenR :: ExpQ -> ExpQ -> RangeQ fromThenR x y = do { a <- x; b <- y; return (FromThenR a b) }
97
fromThenR :: ExpQ -> ExpQ -> RangeQ fromThenR x y = do { a <- x; b <- y; return (FromThenR a b) }
97
fromThenR x y = do { a <- x; b <- y; return (FromThenR a b) }
61
false
true
0
10
23
62
29
33
null
null
fmthoma/ghc
compiler/iface/IfaceType.hs
bsd-3-clause
ppr_co :: TyPrec -> IfaceCoercion -> SDoc ppr_co _ (IfaceReflCo r ty) = angleBrackets (ppr ty) <> ppr_role r
116
ppr_co :: TyPrec -> IfaceCoercion -> SDoc ppr_co _ (IfaceReflCo r ty) = angleBrackets (ppr ty) <> ppr_role r
116
ppr_co _ (IfaceReflCo r ty) = angleBrackets (ppr ty) <> ppr_role r
74
false
true
0
8
26
48
23
25
null
null
benjaminy/Charcoal
Testing/MicroTests/JustCalling/non_rec.hs
mit
a = a `seq` b `seq` f23 b
25
a = a `seq` b `seq` f23 b
25
a = a `seq` b `seq` f23 b
25
false
false
2
4
7
20
10
10
null
null
green-haskell/ghc
compiler/stgSyn/StgSyn.hs
bsd-3-clause
-- | Strip ticks of a given type from an STG expression stripStgTicksTop :: (Tickish Id -> Bool) -> StgExpr -> ([Tickish Id], StgExpr) stripStgTicksTop p = go [] where go ts (StgTick t e) | p t = go (t:ts) e go ts other = (reverse ts, other) {- ***********************************************...
1,335
stripStgTicksTop :: (Tickish Id -> Bool) -> StgExpr -> ([Tickish Id], StgExpr) stripStgTicksTop p = go [] where go ts (StgTick t e) | p t = go (t:ts) e go ts other = (reverse ts, other) {- ************************************************************************ * ...
1,279
stripStgTicksTop p = go [] where go ts (StgTick t e) | p t = go (t:ts) e go ts other = (reverse ts, other) {- ************************************************************************ * * \subsection{STG expressions} * ...
1,200
true
true
1
9
443
111
56
55
null
null
bitemyapp/Earley
Text/Earley/Internal.hs
bsd-3-clause
safeHead :: ListLike i t => i -> Maybe t safeHead ts | ListLike.null ts = Nothing | otherwise = Just $ ListLike.head ts
130
safeHead :: ListLike i t => i -> Maybe t safeHead ts | ListLike.null ts = Nothing | otherwise = Just $ ListLike.head ts
130
safeHead ts | ListLike.null ts = Nothing | otherwise = Just $ ListLike.head ts
89
false
true
1
9
34
57
26
31
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_POV_DEFAULT :: Int wxSTC_POV_DEFAULT = 0
46
wxSTC_POV_DEFAULT :: Int wxSTC_POV_DEFAULT = 0
46
wxSTC_POV_DEFAULT = 0
21
false
true
0
6
5
18
7
11
null
null
ezyang/ghc
testsuite/tests/numeric/should_compile/T10929.hs
bsd-3-clause
x9 :: [Integer] x9 = [3, 1 .. 5]
32
x9 :: [Integer] x9 = [3, 1 .. 5]
32
x9 = [3, 1 .. 5]
16
false
true
0
7
8
30
15
15
null
null
mcschroeder/ghc
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
bsd-3-clause
-- | Returns whether a name represents an occurrence of a top-level variable -- ('VarName'), data constructor ('DataName'), type constructor, or type class -- ('TcClsName'). If we can't be sure, it returns 'Nothing'. -- -- ==== __Examples__ -- -- >>> nameSpace 'Prelude.id -- Just VarName -- >>> nameSpace (mkName "id") ...
609
nameSpace :: Name -> Maybe NameSpace nameSpace (Name _ (NameG ns _ _)) = Just ns
80
nameSpace (Name _ (NameG ns _ _)) = Just ns
43
true
true
0
9
95
58
36
22
null
null
text-utf8/text
tests/Tests/Properties.hs
bsd-2-clause
tl_breakOnEnd_end (NotEmpty s) t = let (m,k) = TL.breakOnEnd s t in k `TL.isSuffixOf` t && (TL.null m || s `TL.isSuffixOf` m)
133
tl_breakOnEnd_end (NotEmpty s) t = let (m,k) = TL.breakOnEnd s t in k `TL.isSuffixOf` t && (TL.null m || s `TL.isSuffixOf` m)
133
tl_breakOnEnd_end (NotEmpty s) t = let (m,k) = TL.breakOnEnd s t in k `TL.isSuffixOf` t && (TL.null m || s `TL.isSuffixOf` m)
133
false
false
0
12
29
74
38
36
null
null
enolan/Idris-dev
src/Idris/IdrisDoc.hs
bsd-3-clause
extractPTactic (TEval p) = extract p
45
extractPTactic (TEval p) = extract p
45
extractPTactic (TEval p) = extract p
45
false
false
0
7
14
18
8
10
null
null
blamario/incremental-parser
src/Text/ParserCombinators/Incremental.hs
gpl-3.0
Result _ r `and` p = fmap (\x-> (r, x)) (feedEof p)
51
Result _ r `and` p = fmap (\x-> (r, x)) (feedEof p)
51
Result _ r `and` p = fmap (\x-> (r, x)) (feedEof p)
51
false
false
1
8
11
43
23
20
null
null
YuichiroSato/CategoryTheory
src/chapter02/SetsFin.hs
apache-2.0
groupByDomain :: [Arrow] -> (Map.Map Object [Arrow]) groupByDomain as = Map.fromList ls where ls = map (\g -> (dom (head g), g)) grouped grouped = List.groupBy (\a b -> dom a == dom b) sorted sorted = List.sortBy (\a b -> dom a `compare` dom b) as
266
groupByDomain :: [Arrow] -> (Map.Map Object [Arrow]) groupByDomain as = Map.fromList ls where ls = map (\g -> (dom (head g), g)) grouped grouped = List.groupBy (\a b -> dom a == dom b) sorted sorted = List.sortBy (\a b -> dom a `compare` dom b) as
265
groupByDomain as = Map.fromList ls where ls = map (\g -> (dom (head g), g)) grouped grouped = List.groupBy (\a b -> dom a == dom b) sorted sorted = List.sortBy (\a b -> dom a `compare` dom b) as
212
false
true
3
11
65
156
74
82
null
null
Rydgel/advent-of-code
src/Day6.hs
bsd-3-clause
pair :: Parser (Int,Int) pair = (,) <$> decimal <*> (char ',' *> decimal)
73
pair :: Parser (Int,Int) pair = (,) <$> decimal <*> (char ',' *> decimal)
73
pair = (,) <$> decimal <*> (char ',' *> decimal)
48
false
true
0
8
13
41
22
19
null
null
MarcusWalz/hgit
Lib/HGit/Parsers.hs
bsd-3-clause
readTreeNodeLine :: ByteString -> [TreeNode] readTreeNodeLine str = TreeNode {mode = m, object = obj, name = file} : next where (a,b) = B.break (\x -> x == c2w '\0') str x = T.words $ T.decodeUtf8 a mode = head x m = read $ T.unpack mode file = T.unpack $ last x id = T.deco...
587
readTreeNodeLine :: ByteString -> [TreeNode] readTreeNodeLine str = TreeNode {mode = m, object = obj, name = file} : next where (a,b) = B.break (\x -> x == c2w '\0') str x = T.words $ T.decodeUtf8 a mode = head x m = read $ T.unpack mode file = T.unpack $ last x id = T.deco...
587
readTreeNodeLine str = TreeNode {mode = m, object = obj, name = file} : next where (a,b) = B.break (\x -> x == c2w '\0') str x = T.words $ T.decodeUtf8 a mode = head x m = read $ T.unpack mode file = T.unpack $ last x id = T.decodeUtf8 $ hex $ B.take 20 $ B.tail b o...
542
false
true
7
15
219
239
123
116
null
null
erikd/fastpack
bench/Bench/FastPack.hs
bsd-2-clause
sanityBenchWord :: BenchWord -> BenchWord sanityBenchWord = getBenchWord . putBenchWord
87
sanityBenchWord :: BenchWord -> BenchWord sanityBenchWord = getBenchWord . putBenchWord
87
sanityBenchWord = getBenchWord . putBenchWord
45
false
true
0
5
9
19
10
9
null
null
sdiehl/ghc
testsuite/tests/typecheck/should_compile/T15050.hs
bsd-3-clause
foo (MkT1b (P::P (Int,x))) = (() :: x ~ Int => ())
55
foo (MkT1b (P::P (Int,x))) = (() :: x ~ Int => ())
55
foo (MkT1b (P::P (Int,x))) = (() :: x ~ Int => ())
55
false
false
0
10
16
51
26
25
null
null
kmels/hledger
hledger-lib/Hledger/Data/Amount.hs
gpl-3.0
showPriceDebug (UnitPrice pa) = " @ " ++ showAmountDebug pa
61
showPriceDebug (UnitPrice pa) = " @ " ++ showAmountDebug pa
61
showPriceDebug (UnitPrice pa) = " @ " ++ showAmountDebug pa
61
false
false
0
7
11
22
10
12
null
null
FranklinChen/ghc-vis
src/GHC/Vis/Internal.hs
bsd-3-clause
insertObjects _ _ = error "unexpected arguments"
48
insertObjects _ _ = error "unexpected arguments"
48
insertObjects _ _ = error "unexpected arguments"
48
false
false
0
5
6
14
6
8
null
null
aelve/guide
back/src/Guide/JS.hs
bsd-3-clause
-- TODO: all links here shouldn't be absolute [absolute-links] replaceWithData :: JSFunction a => a replaceWithData = makeJSFunction "replaceWithData" ["node"] [text| return function(data) {$(node).replaceWith(data);}; |]
232
replaceWithData :: JSFunction a => a replaceWithData = makeJSFunction "replaceWithData" ["node"] [text| return function(data) {$(node).replaceWith(data);}; |]
168
replaceWithData = makeJSFunction "replaceWithData" ["node"] [text| return function(data) {$(node).replaceWith(data);}; |]
131
true
true
0
6
35
34
19
15
null
null
tomahawkins/trs
Language/TRS/Prop.hs
bsd-3-clause
toCNF :: Ord a => Formula a -> Formula a toCNF f = if Set.null supportCNF then f' else And f' support where (f', supportCNF) = tseitin $ buryNot $ constProp f support = foldl1 And $ map (foldl1 Or . Set.toList) $ Set.toList supportCNF -- | Labeled conversion to CNF. (newFormula, cnfAccumulation)
304
toCNF :: Ord a => Formula a -> Formula a toCNF f = if Set.null supportCNF then f' else And f' support where (f', supportCNF) = tseitin $ buryNot $ constProp f support = foldl1 And $ map (foldl1 Or . Set.toList) $ Set.toList supportCNF -- | Labeled conversion to CNF. (newFormula, cnfAccumulation)
304
toCNF f = if Set.null supportCNF then f' else And f' support where (f', supportCNF) = tseitin $ buryNot $ constProp f support = foldl1 And $ map (foldl1 Or . Set.toList) $ Set.toList supportCNF -- | Labeled conversion to CNF. (newFormula, cnfAccumulation)
263
false
true
0
10
60
112
54
58
null
null
enolan/Idris-dev
src/Idris/Delaborate.hs
bsd-3-clause
pprintErr' i (ElabScriptDebug msg tm holes) = text "Elaboration halted." <> indented (align . hsep $ map (showPart i) msg) <> line <> line <> text "Holes:" <> indented (vsep (map ppHole holes)) <> line <> line <> text "Term: " <> indented (pprintTT [] tm) where ppHole :: (Name, Type, Env) -> Doc OutputAn...
859
pprintErr' i (ElabScriptDebug msg tm holes) = text "Elaboration halted." <> indented (align . hsep $ map (showPart i) msg) <> line <> line <> text "Holes:" <> indented (vsep (map ppHole holes)) <> line <> line <> text "Term: " <> indented (pprintTT [] tm) where ppHole :: (Name, Type, Env) -> Doc OutputAn...
859
pprintErr' i (ElabScriptDebug msg tm holes) = text "Elaboration halted." <> indented (align . hsep $ map (showPart i) msg) <> line <> line <> text "Holes:" <> indented (vsep (map ppHole holes)) <> line <> line <> text "Term: " <> indented (pprintTT [] tm) where ppHole :: (Name, Type, Env) -> Doc OutputAn...
859
false
false
2
13
258
332
162
170
null
null
tonyday567/mvc-extended
src/Pipes/Extended.hs
mit
modP :: (Monad m) => Int -> Pipe a a m () modP m = flip S.evalStateT 0 $ distribute $ forever $ do a <- await lift $ S.modify (+ 1) n <- lift S.get when (m `mod` n == 0) $ yield a -- count map
201
modP :: (Monad m) => Int -> Pipe a a m () modP m = flip S.evalStateT 0 $ distribute $ forever $ do a <- await lift $ S.modify (+ 1) n <- lift S.get when (m `mod` n == 0) $ yield a -- count map
201
modP m = flip S.evalStateT 0 $ distribute $ forever $ do a <- await lift $ S.modify (+ 1) n <- lift S.get when (m `mod` n == 0) $ yield a -- count map
159
false
true
0
13
56
125
59
66
null
null
cryptica/slapnet
src/Property.hs
gpl-3.0
resultNot :: PropResult -> PropResult resultNot Satisfied = Unsatisfied
71
resultNot :: PropResult -> PropResult resultNot Satisfied = Unsatisfied
71
resultNot Satisfied = Unsatisfied
33
false
true
0
5
8
18
9
9
null
null
farnoy/torrent
test/PeerMonadSpec.hs
bsd-3-clause
runPeerMonadTest :: TorrentState -> PeerData -> Memory -> [PeerEvent] -> F PeerMonad a -> UTCTime -> Either (Maybe PeerError) (a, PeerState) runPeerMonadTest state pData memory events t refTime = case result of (...
786
runPeerMonadTest :: TorrentState -> PeerData -> Memory -> [PeerEvent] -> F PeerMonad a -> UTCTime -> Either (Maybe PeerError) (a, PeerState) runPeerMonadTest state pData memory events t refTime = case result of (...
786
runPeerMonadTest state pData memory events t refTime = case result of (Left e, _) -> Left (fromException e) (Right a, s) -> Right (a, s) where peerState = PeerState pData [] Map.empty events memory refTime result = runIdentity ( runStateT ( runReaderT ( ...
543
false
true
1
13
404
188
95
93
null
null
fmapfmapfmap/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/Types.hs
mpl-2.0
-- | API version '2013-06-30' of the Amazon Storage Gateway SDK configuration. storageGateway :: Service storageGateway = Service { _svcAbbrev = "StorageGateway" , _svcSigner = v4 , _svcPrefix = "storagegateway" , _svcVersion = "2013-06-30" , _svcEndpoint = defaultEndpoint storageGateway , _...
1,137
storageGateway :: Service storageGateway = Service { _svcAbbrev = "StorageGateway" , _svcSigner = v4 , _svcPrefix = "storagegateway" , _svcVersion = "2013-06-30" , _svcEndpoint = defaultEndpoint storageGateway , _svcTimeout = Just 70 , _svcCheck = statusSuccess , _svcError = parseJSO...
1,058
storageGateway = Service { _svcAbbrev = "StorageGateway" , _svcSigner = v4 , _svcPrefix = "storagegateway" , _svcVersion = "2013-06-30" , _svcEndpoint = defaultEndpoint storageGateway , _svcTimeout = Just 70 , _svcCheck = statusSuccess , _svcError = parseJSONError , _svcRetry = r...
1,032
true
true
1
11
303
282
140
142
null
null
wangbj/haskell
0005a.hs
bsd-2-clause
getinputs s = C.lines rest where (_, t1) = C.break (== '\n') s (_, rest) = C.span (== '\n') t1
104
getinputs s = C.lines rest where (_, t1) = C.break (== '\n') s (_, rest) = C.span (== '\n') t1
104
getinputs s = C.lines rest where (_, t1) = C.break (== '\n') s (_, rest) = C.span (== '\n') t1
104
false
false
1
6
29
61
33
28
null
null
Orvid/fbthrift
thrift/compiler/test/fixtures/namespace/gen-hs/TestService.hs
apache-2.0
encode_Init_args :: (Thrift.Protocol p, Thrift.Transport t) => p t -> Init_args -> BS.ByteString encode_Init_args oprot record = Thrift.serializeVal oprot $ from_Init_args record
178
encode_Init_args :: (Thrift.Protocol p, Thrift.Transport t) => p t -> Init_args -> BS.ByteString encode_Init_args oprot record = Thrift.serializeVal oprot $ from_Init_args record
178
encode_Init_args oprot record = Thrift.serializeVal oprot $ from_Init_args record
81
false
true
0
8
21
64
30
34
null
null
d16-processor/Haskell-C-
src/Parse.hs
mit
cust_whitespace = do spaces skipMany line_directive spaces
70
cust_whitespace = do spaces skipMany line_directive spaces
70
cust_whitespace = do spaces skipMany line_directive spaces
70
false
false
0
7
18
18
7
11
null
null
bitemyapp/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
mkTcSymCo :: TcCoercion -> TcCoercion mkTcSymCo co@(TcRefl {}) = co
68
mkTcSymCo :: TcCoercion -> TcCoercion mkTcSymCo co@(TcRefl {}) = co
68
mkTcSymCo co@(TcRefl {}) = co
30
false
true
0
8
10
28
15
13
null
null
hw-hello-world/okta-signin-widget
haskell-scotty/app/Main.hs
mit
findUserFromCookies :: Maybe CookiesText -> Maybe UserEmail findUserFromCookies Nothing = Nothing
97
findUserFromCookies :: Maybe CookiesText -> Maybe UserEmail findUserFromCookies Nothing = Nothing
97
findUserFromCookies Nothing = Nothing
37
false
true
0
6
10
28
12
16
null
null
balangs/eTeak
src/Gen.hs
bsd-3-clause
genMake typ@(TeakO terms) widths@[One inWidth, One outWidth] = netlist [ if needGo && inWidth /= 0 then concat [ nets "go" 1 1, -- gate "or" [conn N "go" 0 0 1, conn R0 "i" 0 0 1, conn R1 "i" 0 0 1] drCompletion "gocomp" (conn R0 "i" 0 (0 +: inWidth)) (conn R1...
1,478
genMake typ@(TeakO terms) widths@[One inWidth, One outWidth] = netlist [ if needGo && inWidth /= 0 then concat [ nets "go" 1 1, -- gate "or" [conn N "go" 0 0 1, conn R0 "i" 0 0 1, conn R1 "i" 0 0 1] drCompletion "gocomp" (conn R0 "i" 0 (0 +: inWidth)) (conn R1...
1,478
genMake typ@(TeakO terms) widths@[One inWidth, One outWidth] = netlist [ if needGo && inWidth /= 0 then concat [ nets "go" 1 1, -- gate "or" [conn N "go" 0 0 1, conn R0 "i" 0 0 1, conn R1 "i" 0 0 1] drCompletion "gocomp" (conn R0 "i" 0 (0 +: inWidth)) (conn R1...
1,478
false
false
8
14
545
582
287
295
null
null
domenicosolazzo/practice-haskell
courses/cis194/01/01.hs
mit
biggestInt, smallestInt :: Int biggestInt = maxBound
52
biggestInt, smallestInt :: Int biggestInt = maxBound
52
biggestInt = maxBound
21
false
true
0
4
6
13
8
5
null
null
fibsifan/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
-- -- document structure -- titleLine :: MarkdownParser (F Inlines) titleLine = try $ do char '%' skipSpaces res <- many $ (notFollowedBy newline >> inline) <|> try (endline >> whitespace) newline return $ trimInlinesF $ mconcat res
256
titleLine :: MarkdownParser (F Inlines) titleLine = try $ do char '%' skipSpaces res <- many $ (notFollowedBy newline >> inline) <|> try (endline >> whitespace) newline return $ trimInlinesF $ mconcat res
227
titleLine = try $ do char '%' skipSpaces res <- many $ (notFollowedBy newline >> inline) <|> try (endline >> whitespace) newline return $ trimInlinesF $ mconcat res
187
true
true
4
13
61
96
42
54
null
null
taphu/moonshine
src/Web/Moonshine.hs
apache-2.0
{- | Wrap a `Moonshine` in a timer, so that timing data for invocations will be logged to the metrics handler. -} timed :: T.Text -- ^ The name of the timer. -> Moonshine config a -- ^ The action to be wrapped. -> Moonshine config a timed name (Moonshine m) = Moonshine $ \state@State {snap, metricsSto...
464
timed :: T.Text -- ^ The name of the timer. -> Moonshine config a -- ^ The action to be wrapped. -> Moonshine config a timed name (Moonshine m) = Moonshine $ \state@State {snap, metricsStore} -> do timer <- getDistribution name metricsStore m state {snap = timedSnap timer snap} {- | Make a new tim...
346
timed name (Moonshine m) = Moonshine $ \state@State {snap, metricsStore} -> do timer <- getDistribution name metricsStore m state {snap = timedSnap timer snap} {- | Make a new timer with the given name. -}
213
true
true
0
13
107
103
51
52
null
null
mdsteele/fallback
src/Fallback/Event.hs
gpl-3.0
fromSDLKey SDL.SDLK_w = KeyW
28
fromSDLKey SDL.SDLK_w = KeyW
28
fromSDLKey SDL.SDLK_w = KeyW
28
false
false
0
6
3
11
5
6
null
null
Ninju/reflex-dom-demos
step-by-step-todo-list/stage-6-clear-completed/source.hs
mit
renderClearCompletedButton :: MonadWidget t m => m (Event t (UserEvent Task)) renderClearCompletedButton = do clearCompletedButton <- button "Clear Completed" return $ fmap (const $ Batch (view taskCompleted) Delete) clearCompletedButton
241
renderClearCompletedButton :: MonadWidget t m => m (Event t (UserEvent Task)) renderClearCompletedButton = do clearCompletedButton <- button "Clear Completed" return $ fmap (const $ Batch (view taskCompleted) Delete) clearCompletedButton
241
renderClearCompletedButton = do clearCompletedButton <- button "Clear Completed" return $ fmap (const $ Batch (view taskCompleted) Delete) clearCompletedButton
163
false
true
0
13
32
77
36
41
null
null
emwap/feldspar-compiler
lib/Feldspar/Compiler/Imperative/FromCore.hs
bsd-3-clause
compileExpr env (In (App Ut.Ceiling t es)) = do es' <- mapM (compileExpr env) es let f' = fun (Rep.MachineVector 1 Rep.FloatType) "ceilf" es' return $ Cast (compileTypeRep (opts env) t) f'
200
compileExpr env (In (App Ut.Ceiling t es)) = do es' <- mapM (compileExpr env) es let f' = fun (Rep.MachineVector 1 Rep.FloatType) "ceilf" es' return $ Cast (compileTypeRep (opts env) t) f'
200
compileExpr env (In (App Ut.Ceiling t es)) = do es' <- mapM (compileExpr env) es let f' = fun (Rep.MachineVector 1 Rep.FloatType) "ceilf" es' return $ Cast (compileTypeRep (opts env) t) f'
200
false
false
0
13
43
101
47
54
null
null
haskell-fswatch/win32-notify
src/System/Win32/Notify.hs
bsd-3-clause
varietiesToFnFlags :: [EventVariety] -> FileNotificationFlag varietiesToFnFlags = foldl (.|.) 0 . map evToFnFlag' where evToFnFlag' :: EventVariety -> FileNotificationFlag evToFnFlag' ev = case ev of Modify -> fILE_NOTIFY_CHANGE_LAST_WRITE Move -> fILE_NOTIFY_CHANGE_FILE_N...
742
varietiesToFnFlags :: [EventVariety] -> FileNotificationFlag varietiesToFnFlags = foldl (.|.) 0 . map evToFnFlag' where evToFnFlag' :: EventVariety -> FileNotificationFlag evToFnFlag' ev = case ev of Modify -> fILE_NOTIFY_CHANGE_LAST_WRITE Move -> fILE_NOTIFY_CHANGE_FILE_NA...
741
varietiesToFnFlags = foldl (.|.) 0 . map evToFnFlag' where evToFnFlag' :: EventVariety -> FileNotificationFlag evToFnFlag' ev = case ev of Modify -> fILE_NOTIFY_CHANGE_LAST_WRITE Move -> fILE_NOTIFY_CHANGE_FILE_NAME .|. fILE_NOTIFY_CHANGE_DIR_NAME Create -> fI...
680
false
true
0
9
169
109
53
56
null
null
mcschroeder/ghc
compiler/types/Type.hs
bsd-3-clause
seqType (TyConApp tc tys) = tc `seq` seqTypes tys
52
seqType (TyConApp tc tys) = tc `seq` seqTypes tys
52
seqType (TyConApp tc tys) = tc `seq` seqTypes tys
52
false
false
0
6
11
27
13
14
null
null
necrobious/hS3
Tests.hs
bsd-3-clause
testCopyObject :: AWSConnection -> S3Object -> S3Object -> IO () testCopyObject c srco desto = do r <- copyObject c srco desto failOnError r () (const $ assertBool "object copied" True)
211
testCopyObject :: AWSConnection -> S3Object -> S3Object -> IO () testCopyObject c srco desto = do r <- copyObject c srco desto failOnError r () (const $ assertBool "object copied" True)
211
testCopyObject c srco desto = do r <- copyObject c srco desto failOnError r () (const $ assertBool "object copied" True)
146
false
true
0
11
56
79
35
44
null
null
juodaspaulius/clafer-old-customBNFC
src/Language/Clafer.hs
mit
-- | reserved keywords keyWords :: [String] keyWords = ["ref","parent","abstract", "else", "in", "no", "opt", "xor", "all", "enum", "lone", "not", "or", "disj", "extends", "mux", "one", "some"]
193
keyWords :: [String] keyWords = ["ref","parent","abstract", "else", "in", "no", "opt", "xor", "all", "enum", "lone", "not", "or", "disj", "extends", "mux", "one", "some"]
170
keyWords = ["ref","parent","abstract", "else", "in", "no", "opt", "xor", "all", "enum", "lone", "not", "or", "disj", "extends", "mux", "one", "some"]
149
true
true
0
5
24
69
45
24
null
null
eklavya/Idris-dev
src/Idris/REPL.hs
bsd-3-clause
idemodeProcess fn (SetPrinterDepth d) = do process fn (SetPrinterDepth d) iPrintResult ""
132
idemodeProcess fn (SetPrinterDepth d) = do process fn (SetPrinterDepth d) iPrintResult ""
132
idemodeProcess fn (SetPrinterDepth d) = do process fn (SetPrinterDepth d) iPrintResult ""
132
false
false
0
9
54
37
16
21
null
null
jstolarek/ghc
compiler/main/DynFlags.hs
bsd-3-clause
defaultFatalMessager :: FatalMessager defaultFatalMessager = hPutStrLn stderr
77
defaultFatalMessager :: FatalMessager defaultFatalMessager = hPutStrLn stderr
77
defaultFatalMessager = hPutStrLn stderr
39
false
true
0
5
6
14
7
7
null
null
glguy/irc-core
src/Client/State/Window.hs
isc
unpackLocalTime :: PackedTime -> LocalTime unpackLocalTime !x = LocalTime d t where d = ModifiedJulianDay (field x 22 42) t = unpackTimeOfDay x
153
unpackLocalTime :: PackedTime -> LocalTime unpackLocalTime !x = LocalTime d t where d = ModifiedJulianDay (field x 22 42) t = unpackTimeOfDay x
153
unpackLocalTime !x = LocalTime d t where d = ModifiedJulianDay (field x 22 42) t = unpackTimeOfDay x
110
false
true
2
7
32
64
26
38
null
null
wereHamster/rethinkdb-client-driver
src/Database/RethinkDB/TH.hs
mit
getConName (ForallC _ _ con) = getConName con
45
getConName (ForallC _ _ con) = getConName con
45
getConName (ForallC _ _ con) = getConName con
45
false
false
0
7
7
22
10
12
null
null
apyrgio/ganeti
src/Ganeti/Hs2Py/OpDoc.hs
bsd-2-clause
opInstanceMove :: String opInstanceMove = "Move an instance.\n\ \\n\ \ This move (with shutting down an instance and data copying) to an\n\ \ arbitrary node.\n\ \\n\ \ @ivar instance_name: the name of the instance\n\ \ @ivar target_node: the destination node"
265
opInstanceMove :: String opInstanceMove = "Move an instance.\n\ \\n\ \ This move (with shutting down an instance and data copying) to an\n\ \ arbitrary node.\n\ \\n\ \ @ivar instance_name: the name of the instance\n\ \ @ivar target_node: the destination node"
265
opInstanceMove = "Move an instance.\n\ \\n\ \ This move (with shutting down an instance and data copying) to an\n\ \ arbitrary node.\n\ \\n\ \ @ivar instance_name: the name of the instance\n\ \ @ivar target_node: the destination node"
240
false
true
0
4
45
11
6
5
null
null
ibabushkin/hapstone
test/Internal/Mips/StorableSpec.hs
bsd-3-clause
-- | CsMipsOp spec csMipsOpSpec :: Spec csMipsOpSpec = describe "Storable CsMipsOp" $ do it "has a memory-layout we can handle" $ sizeOf (undefined :: CsMipsOp) == 4 + 4 + 16 it "has matching peek- and poke-implementations" $ property $ \s -> alloca (\p -> poke p s >> (peek p :: IO C...
410
csMipsOpSpec :: Spec csMipsOpSpec = describe "Storable CsMipsOp" $ do it "has a memory-layout we can handle" $ sizeOf (undefined :: CsMipsOp) == 4 + 4 + 16 it "has matching peek- and poke-implementations" $ property $ \s -> alloca (\p -> poke p s >> (peek p :: IO CsMipsOp)) `shouldRe...
391
csMipsOpSpec = describe "Storable CsMipsOp" $ do it "has a memory-layout we can handle" $ sizeOf (undefined :: CsMipsOp) == 4 + 4 + 16 it "has matching peek- and poke-implementations" $ property $ \s -> alloca (\p -> poke p s >> (peek p :: IO CsMipsOp)) `shouldReturn` s it "parse...
370
true
true
0
16
103
130
63
67
null
null
noteed/opengl-api
Text/OpenGL/Spec.hs
bsd-3-clause
pFPassthru :: P FunLine pFPassthru = FPassthru <$> (string "passthru:" *> many (noneOf "\n")) <* eol
100
pFPassthru :: P FunLine pFPassthru = FPassthru <$> (string "passthru:" *> many (noneOf "\n")) <* eol
100
pFPassthru = FPassthru <$> (string "passthru:" *> many (noneOf "\n")) <* eol
76
false
true
0
11
15
41
20
21
null
null
supki/libjenkins
src/Network/HTTP/Client/Lens.hs
bsd-2-clause
-- | 'H.requestManagerOverride' lens requestManagerOverride :: Lens' H.Request (Maybe H.Manager) requestManagerOverride f req = f (H.requestManagerOverride req) <&> \m' -> req { H.requestManagerOverride = m' }
209
requestManagerOverride :: Lens' H.Request (Maybe H.Manager) requestManagerOverride f req = f (H.requestManagerOverride req) <&> \m' -> req { H.requestManagerOverride = m' }
172
requestManagerOverride f req = f (H.requestManagerOverride req) <&> \m' -> req { H.requestManagerOverride = m' }
112
true
true
0
9
25
62
32
30
null
null
keithodulaigh/Hets
DFOL/AS_DFOL.hs
gpl-2.0
translateFormula _ _ F = F
26
translateFormula _ _ F = F
26
translateFormula _ _ F = F
26
false
false
0
5
5
13
6
7
null
null
pimlott/diff-du
diff-du.hs
bsd-3-clause
delPrefixDu :: Maybe String -> [Du] -> [Du] delPrefixDu prefix = map delDu where delDu (Du p s cs) = Du (del p) s cs del = delPrefix prefix
143
delPrefixDu :: Maybe String -> [Du] -> [Du] delPrefixDu prefix = map delDu where delDu (Du p s cs) = Du (del p) s cs del = delPrefix prefix
143
delPrefixDu prefix = map delDu where delDu (Du p s cs) = Du (del p) s cs del = delPrefix prefix
99
false
true
0
7
32
74
37
37
null
null
rbtcollins/causes
Handler/Home.hs
apache-2.0
sampleForm :: Form MyForm sampleForm = renderBootstrap3 BootstrapBasicForm $ (,,) <$> fileAFormReq "Choose a file" <*> areq textField (withSmallInput "What's on the file?") Nothing <*> areq textField (withSmallInput "Your OpenID URL") Nothing
254
sampleForm :: Form MyForm sampleForm = renderBootstrap3 BootstrapBasicForm $ (,,) <$> fileAFormReq "Choose a file" <*> areq textField (withSmallInput "What's on the file?") Nothing <*> areq textField (withSmallInput "Your OpenID URL") Nothing
254
sampleForm = renderBootstrap3 BootstrapBasicForm $ (,,) <$> fileAFormReq "Choose a file" <*> areq textField (withSmallInput "What's on the file?") Nothing <*> areq textField (withSmallInput "Your OpenID URL") Nothing
228
false
true
8
7
43
80
37
43
null
null
toluene/bfi
Brainfuck.hs
gpl-3.0
interpret (x : xs) tape@(y : ys, rest) acc = case x of '+' -> interpret xs (succ y : ys, rest) (succ acc) '-' -> interpret xs (pred y : ys, rest) (succ acc) '.' -> putChar (chr y) >> interpret xs tape (succ acc) ',' -> getChar >>= (\ z -> interpret xs (ord z : ys, rest) (succ acc)) '[' ->...
507
interpret (x : xs) tape@(y : ys, rest) acc = case x of '+' -> interpret xs (succ y : ys, rest) (succ acc) '-' -> interpret xs (pred y : ys, rest) (succ acc) '.' -> putChar (chr y) >> interpret xs tape (succ acc) ',' -> getChar >>= (\ z -> interpret xs (ord z : ys, rest) (succ acc)) '[' ->...
507
interpret (x : xs) tape@(y : ys, rest) acc = case x of '+' -> interpret xs (succ y : ys, rest) (succ acc) '-' -> interpret xs (pred y : ys, rest) (succ acc) '.' -> putChar (chr y) >> interpret xs tape (succ acc) ',' -> getChar >>= (\ z -> interpret xs (ord z : ys, rest) (succ acc)) '[' ->...
507
false
false
1
14
145
273
139
134
null
null
diminishedprime/.org
reading-list/haskell_programming_from_first_principles/03_07.hs
mit
-- c) afterNine a = drop 9 a
28
afterNine a = drop 9 a
22
afterNine a = drop 9 a
22
true
false
0
5
7
15
7
8
null
null
mpickering/HaRe
old/testing/demote/LetIn1_TokOut.hs
bsd-3-clause
anotherFun 0 y = sq y where sq x = x^2
44
anotherFun 0 y = sq y where sq x = x^2
44
anotherFun 0 y = sq y where sq x = x^2
44
false
false
0
7
16
28
13
15
null
null
brendanhay/gogol
gogol-people/gen/Network/Google/Resource/People/People/CreateContact.hs
mpl-2.0
-- | JSONP pccCallback :: Lens' PeopleCreateContact (Maybe Text) pccCallback = lens _pccCallback (\ s a -> s{_pccCallback = a})
129
pccCallback :: Lens' PeopleCreateContact (Maybe Text) pccCallback = lens _pccCallback (\ s a -> s{_pccCallback = a})
118
pccCallback = lens _pccCallback (\ s a -> s{_pccCallback = a})
64
true
true
0
9
21
48
25
23
null
null