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
rodrigogribeiro/mptc
src/Language/Haskell/Exts/Annotated/ExactPrint.hs
bsd-3-clause
padUntil :: Pos -> EP () padUntil (l,c) = do (l1,c1) <- getPos case {- trace (show ((l,c), (l1,c1))) -} () of _ {-()-} | l1 >= l && c1 <= c -> printString $ replicate (c - c1) ' ' | l1 < l -> newLine >> padUntil (l,c) | otherwise -> return ()
305
padUntil :: Pos -> EP () padUntil (l,c) = do (l1,c1) <- getPos case {- trace (show ((l,c), (l1,c1))) -} () of _ {-()-} | l1 >= l && c1 <= c -> printString $ replicate (c - c1) ' ' | l1 < l -> newLine >> padUntil (l,c) | otherwise -> return ()
305
padUntil (l,c) = do (l1,c1) <- getPos case {- trace (show ((l,c), (l1,c1))) -} () of _ {-()-} | l1 >= l && c1 <= c -> printString $ replicate (c - c1) ' ' | l1 < l -> newLine >> padUntil (l,c) | otherwise -> return ()
280
false
true
0
15
117
133
66
67
null
null
fmapfmapfmap/amazonka
amazonka-ses/gen/Network/AWS/SES/SetIdentityNotificationTopic.hs
mpl-2.0
-- | The identity for which the Amazon SNS topic will be set. You can specify -- an identity by using its name or by using its Amazon Resource Name -- (ARN). Examples: 'user\'example.com', 'example.com', -- 'arn:aws:ses:us-east-1:123456789012:identity\/example.com'. sintIdentity :: Lens' SetIdentityNotificationTopic Te...
388
sintIdentity :: Lens' SetIdentityNotificationTopic Text sintIdentity = lens _sintIdentity (\ s a -> s{_sintIdentity = a})
121
sintIdentity = lens _sintIdentity (\ s a -> s{_sintIdentity = a})
65
true
true
1
9
52
48
25
23
null
null
lally/orgmode
src/Data/OrgMode.hs
bsd-3-clause
-- | Closes up the path for the zipper, reversing the child-lists as we -- go (to get them into first->last order). closeZipPath doczip@(OrgDocZipper path nodes properties) = doczip { ozNodePath = [], ozNodes = nodes ++ (snd (appendChildrenUpPathThroughDepth (-1) path)) }
285
closeZipPath doczip@(OrgDocZipper path nodes properties) = doczip { ozNodePath = [], ozNodes = nodes ++ (snd (appendChildrenUpPathThroughDepth (-1) path)) }
169
closeZipPath doczip@(OrgDocZipper path nodes properties) = doczip { ozNodePath = [], ozNodes = nodes ++ (snd (appendChildrenUpPathThroughDepth (-1) path)) }
169
true
false
1
14
54
72
36
36
null
null
kadena-io/pact
src/Pact/Native.hs
bsd-3-clause
pactId i as = argsError i as
28
pactId i as = argsError i as
28
pactId i as = argsError i as
28
false
false
0
5
6
16
7
9
null
null
christiaanb/ghc
compiler/basicTypes/MkId.hs
bsd-3-clause
dataConArgRep _ _ arg_ty HsStrict = strict_but_not_unpacked arg_ty
68
dataConArgRep _ _ arg_ty HsStrict = strict_but_not_unpacked arg_ty
68
dataConArgRep _ _ arg_ty HsStrict = strict_but_not_unpacked arg_ty
68
false
false
0
5
9
18
8
10
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/inRange_4.hs
mit
ltEsOrdering GT LT = MyFalse
28
ltEsOrdering GT LT = MyFalse
28
ltEsOrdering GT LT = MyFalse
28
false
false
0
5
4
11
5
6
null
null
Cognimeta/cognimeta-utils
src/Cgm/Data/Structured/Derive.hs
apache-2.0
appsT :: [TypeQ] -> TypeQ appsT [] = error "appsT []"
53
appsT :: [TypeQ] -> TypeQ appsT [] = error "appsT []"
53
appsT [] = error "appsT []"
27
false
true
0
6
10
26
13
13
null
null
hsyl20/ViperVM
haskus-system/src/lib/Haskus/System/Linux/Graphics/Capability.hs
bsd-3-clause
-- | Set a client capability setClientCapability :: MonadInIO m => Handle -> ClientCapability -> Bool -> FlowT '[ErrorCode] m () setClientCapability hdl cap b = do let v = if b then 1 else 0 s = StructSetClientCap (toEnumField cap) v void (ioctlSetClientCapability s hdl)
290
setClientCapability :: MonadInIO m => Handle -> ClientCapability -> Bool -> FlowT '[ErrorCode] m () setClientCapability hdl cap b = do let v = if b then 1 else 0 s = StructSetClientCap (toEnumField cap) v void (ioctlSetClientCapability s hdl)
261
setClientCapability hdl cap b = do let v = if b then 1 else 0 s = StructSetClientCap (toEnumField cap) v void (ioctlSetClientCapability s hdl)
161
true
true
0
12
64
99
49
50
null
null
travitch/dalvik
src/Dalvik/SSA/Internal/Labeling.hs
bsd-3-clause
methodExceptionRanges dx (DT.EncodedMethod _ _ (Just codeItem)) = mapM toExceptionRange (codeTryItems codeItem) where catches = V.fromList $ codeHandlers codeItem toExceptionRange tryItem = do let hOffset = fromIntegral $ tryHandlerOff tryItem case V.findIndex ((==hOffset) . chHandlerOff) catche...
1,173
methodExceptionRanges dx (DT.EncodedMethod _ _ (Just codeItem)) = mapM toExceptionRange (codeTryItems codeItem) where catches = V.fromList $ codeHandlers codeItem toExceptionRange tryItem = do let hOffset = fromIntegral $ tryHandlerOff tryItem case V.findIndex ((==hOffset) . chHandlerOff) catche...
1,173
methodExceptionRanges dx (DT.EncodedMethod _ _ (Just codeItem)) = mapM toExceptionRange (codeTryItems codeItem) where catches = V.fromList $ codeHandlers codeItem toExceptionRange tryItem = do let hOffset = fromIntegral $ tryHandlerOff tryItem case V.findIndex ((==hOffset) . chHandlerOff) catche...
1,173
false
false
1
20
362
275
135
140
null
null
ajm188/99-problems
haskell/lists.hs
mit
myLast (_:xs) = myLast xs
25
myLast (_:xs) = myLast xs
25
myLast (_:xs) = myLast xs
25
false
false
0
7
4
19
9
10
null
null
mgold/Elm
src/Reporting/Error/Type.hs
bsd-3-clause
-- INFINITE TYPES infiniteTypeToReport :: RenderType.Localizer -> String -> Type.Canonical -> Report.Report infiniteTypeToReport localizer name overallType = Report.report "INFINITE TYPE" Nothing ( "I am inferring a weird self-referential type for " ++ Help.functionName name ) ( ...
860
infiniteTypeToReport :: RenderType.Localizer -> String -> Type.Canonical -> Report.Report infiniteTypeToReport localizer name overallType = Report.report "INFINITE TYPE" Nothing ( "I am inferring a weird self-referential type for " ++ Help.functionName name ) ( Help.stack [...
840
infiniteTypeToReport localizer name overallType = Report.report "INFINITE TYPE" Nothing ( "I am inferring a weird self-referential type for " ++ Help.functionName name ) ( Help.stack [ Help.reflowParagraph $ "Here is my best effort at writing down the type. You will see ? and ∞...
734
true
true
0
12
246
113
57
56
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 110825 = 5652
33
getValueFromProduct 110825 = 5652
33
getValueFromProduct 110825 = 5652
33
false
false
0
5
3
9
4
5
null
null
kazu-yamamoto/simple-sendfile
test/SendfileSpec.hs
bsd-3-clause
sendIllegal :: FileRange -> IO () sendIllegal range = sendIllegalCore range []
78
sendIllegal :: FileRange -> IO () sendIllegal range = sendIllegalCore range []
78
sendIllegal range = sendIllegalCore range []
44
false
true
0
7
11
30
14
16
null
null
graninas/The-Amoeba-World
src/Amoeba/Middleware/Math/Geometry.hs
gpl-3.0
updateRectBound p b = error $ "Rectangled bound expected, but got: " ++ show b ++ " for point " ++ show p
105
updateRectBound p b = error $ "Rectangled bound expected, but got: " ++ show b ++ " for point " ++ show p
105
updateRectBound p b = error $ "Rectangled bound expected, but got: " ++ show b ++ " for point " ++ show p
105
false
false
1
8
22
37
15
22
null
null
santolucito/haste-compiler
src/Haste/Environment.hs
bsd-3-clause
hasteNeedsReboot = False
24
hasteNeedsReboot = False
24
hasteNeedsReboot = False
24
false
false
0
4
2
6
3
3
null
null
peter-fogg/pardoc
src/Text/Pandoc/Readers/Org.hs
gpl-2.0
normalCite :: OrgParser (F [Citation]) normalCite = try $ char '[' *> skipSpaces *> citeList <* skipSpaces <* char ']'
187
normalCite :: OrgParser (F [Citation]) normalCite = try $ char '[' *> skipSpaces *> citeList <* skipSpaces <* char ']'
187
normalCite = try $ char '[' *> skipSpaces *> citeList <* skipSpaces <* char ']'
148
false
true
0
10
88
49
24
25
null
null
sheganinans/plugins
src/System/Plugins/Utils.hs
lgpl-2.1
unencodedChar 'z' = False
25
unencodedChar 'z' = False
25
unencodedChar 'z' = False
25
false
false
0
4
3
10
4
6
null
null
hauxir/haskell-tetris
src/Tetris.hs
mit
hasOrigin ::Grid -> Bool hasOrigin = not . null . origins
57
hasOrigin ::Grid -> Bool hasOrigin = not . null . origins
57
hasOrigin = not . null . origins
32
false
true
0
6
10
23
12
11
null
null
nevrenato/HetsAlloy
OWL2/OWL22CommonLogic.hs
gpl-2.0
uriToTokM :: IRI -> Result Token uriToTokM = return . uriToTok
62
uriToTokM :: IRI -> Result Token uriToTokM = return . uriToTok
62
uriToTokM = return . uriToTok
29
false
true
0
6
10
22
11
11
null
null
tjakway/ghcjvm
compiler/hsSyn/HsExpr.hs
bsd-3-clause
pprSplice (HsUntypedSplice n e) = ppr_splice (text "$") n e
61
pprSplice (HsUntypedSplice n e) = ppr_splice (text "$") n e
61
pprSplice (HsUntypedSplice n e) = ppr_splice (text "$") n e
61
false
false
0
7
11
31
14
17
null
null
achirkin/easytensor
easytensor/test/Numeric/QuaterFloatTest.hs
bsd-3-clause
prop_Square :: Quater T -> Property prop_Square q = q * conjugate q =~= realToFrac (square q)
94
prop_Square :: Quater T -> Property prop_Square q = q * conjugate q =~= realToFrac (square q)
94
prop_Square q = q * conjugate q =~= realToFrac (square q)
58
false
true
0
8
17
41
19
22
null
null
brendanhay/gogol
gogol-admin-directory/gen/Network/Google/Resource/Admin/Customers/Chrome/Printers/Create.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). ccpcUploadProtocol :: Lens' CustomersChromePrintersCreate (Maybe Text) ccpcUploadProtocol = lens _ccpcUploadProtocol (\ s a -> s{_ccpcUploadProtocol = a})
224
ccpcUploadProtocol :: Lens' CustomersChromePrintersCreate (Maybe Text) ccpcUploadProtocol = lens _ccpcUploadProtocol (\ s a -> s{_ccpcUploadProtocol = a})
162
ccpcUploadProtocol = lens _ccpcUploadProtocol (\ s a -> s{_ccpcUploadProtocol = a})
91
true
true
1
9
33
51
25
26
null
null
vladimir-ipatov/ganeti
src/Ganeti/Hypervisor/Xen/XmParser.hs
gpl-2.0
getDomainConfig :: LispConfig -> Result Domain getDomainConfig configData = do domainConf <- if isNamed "domain" configData then extractValues configData else Bad $ "Not a domain configuration: " ++ show configData domid <- getValue "domid" domainConf name <- getValue "name" domainConf cpuTime <...
909
getDomainConfig :: LispConfig -> Result Domain getDomainConfig configData = do domainConf <- if isNamed "domain" configData then extractValues configData else Bad $ "Not a domain configuration: " ++ show configData domid <- getValue "domid" domainConf name <- getValue "name" domainConf cpuTime <...
909
getDomainConfig configData = do domainConf <- if isNamed "domain" configData then extractValues configData else Bad $ "Not a domain configuration: " ++ show configData domid <- getValue "domid" domainConf name <- getValue "name" domainConf cpuTime <- getValue "cpu_time" domainConf state <- get...
862
false
true
0
11
171
143
66
77
null
null
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DeleteRoute.hs
mpl-2.0
-- | Checks whether you have the required permissions for the action, without -- actually making the request, and provides an error response. If you have the -- required permissions, the error response is 'DryRunOperation'. Otherwise, it is 'UnauthorizedOperation'. drDryRun :: Lens' DeleteRoute (Maybe Bool) drDryRun = ...
364
drDryRun :: Lens' DeleteRoute (Maybe Bool) drDryRun = lens _drDryRun (\s a -> s { _drDryRun = a })
98
drDryRun = lens _drDryRun (\s a -> s { _drDryRun = a })
55
true
true
1
9
57
52
27
25
null
null
edsko/cabal
cabal-install/Distribution/Client/InstallPlan.hs
bsd-3-clause
-- | The graph of packages (nodes) and dependencies (edges) must be acyclic. -- -- * if the result is @False@ use 'PackageIndex.dependencyCycles' to find out -- which packages are involved in dependency cycles. -- acyclic :: (HasUnitId ipkg, PackageFixedDeps ipkg, HasUnitId srcpkg, PackageFixedDeps srcp...
452
acyclic :: (HasUnitId ipkg, PackageFixedDeps ipkg, HasUnitId srcpkg, PackageFixedDeps srcpkg) => FakeMap -> PlanIndex ipkg srcpkg iresult ifailure -> Bool acyclic fakeMap = null . PlanIndex.dependencyCycles fakeMap
236
acyclic fakeMap = null . PlanIndex.dependencyCycles fakeMap
59
true
true
0
8
85
72
38
34
null
null
mreluzeon/block-monad
src/Crypto.hs
lgpl-3.0
sec_p256k1 :: ECC.Curve sec_p256k1 = ECC.getCurveByName ECC.SEC_p256k1
70
sec_p256k1 :: ECC.Curve sec_p256k1 = ECC.getCurveByName ECC.SEC_p256k1
70
sec_p256k1 = ECC.getCurveByName ECC.SEC_p256k1
46
false
true
0
6
6
20
10
10
null
null
Heather/hackport
Portage/Dependency/Print.hs
gpl-3.0
dispLBound pn (NonstrictLB v) = Disp.text ">=" <> DT.disp pn <-> DT.disp v
74
dispLBound pn (NonstrictLB v) = Disp.text ">=" <> DT.disp pn <-> DT.disp v
74
dispLBound pn (NonstrictLB v) = Disp.text ">=" <> DT.disp pn <-> DT.disp v
74
false
false
0
8
12
40
18
22
null
null
thiry/DComp
src/DB.hs
gpl-2.0
-- generate Graphviz view view file db = writeFile (file++".dot") ("digraph G {\nnode[shape=plaintext]; edge[arrowhead=vee];\n"++(concat (map (\(a,b,c)-> (show a)++"->"++(show c)++"[label="++(show b)++"];\n") db))++"}")
219
view file db = writeFile (file++".dot") ("digraph G {\nnode[shape=plaintext]; edge[arrowhead=vee];\n"++(concat (map (\(a,b,c)-> (show a)++"->"++(show c)++"[label="++(show b)++"];\n") db))++"}")
193
view file db = writeFile (file++".dot") ("digraph G {\nnode[shape=plaintext]; edge[arrowhead=vee];\n"++(concat (map (\(a,b,c)-> (show a)++"->"++(show c)++"[label="++(show b)++"];\n") db))++"}")
193
true
false
1
21
20
110
55
55
null
null
bos/text-icu
Data/Text/ICU/Spoof/Pure.hs
bsd-2-clause
spoofFromSerialized :: ByteString -> SpoofParams -> Spoof spoofFromSerialized b p = unsafePerformIO $ do s <- S.openFromSerialized b return (S $ applySpoofParams p s) -- | Check two strings for confusability.
213
spoofFromSerialized :: ByteString -> SpoofParams -> Spoof spoofFromSerialized b p = unsafePerformIO $ do s <- S.openFromSerialized b return (S $ applySpoofParams p s) -- | Check two strings for confusability.
213
spoofFromSerialized b p = unsafePerformIO $ do s <- S.openFromSerialized b return (S $ applySpoofParams p s) -- | Check two strings for confusability.
155
false
true
0
12
35
64
29
35
null
null
AndrewBrinker/scheme
src/Scheme/Eval.hs
mit
cdr [badArg] = throwError $ TypeMismatch "pair" badArg
69
cdr [badArg] = throwError $ TypeMismatch "pair" badArg
69
cdr [badArg] = throwError $ TypeMismatch "pair" badArg
69
false
false
0
6
22
22
10
12
null
null
CGenie/platform
node/src/Unison/Digest.hs
mit
write :: (H.Context H.SHA3_512 -> H.Context H.SHA3_512) -> DigestM () write f = DigestM (\ctx -> PairS () (f ctx))
114
write :: (H.Context H.SHA3_512 -> H.Context H.SHA3_512) -> DigestM () write f = DigestM (\ctx -> PairS () (f ctx))
114
write f = DigestM (\ctx -> PairS () (f ctx))
44
false
true
0
10
19
73
34
39
null
null
Feeniks/Agon
app/Agon/Data.hs
bsd-3-clause
create :: (Entity e, ToJSON e) => e -> AppM e create e = do uuid <- fmap head $ uuids 1 let e' = set (entityID e) uuid e update e'
142
create :: (Entity e, ToJSON e) => e -> AppM e create e = do uuid <- fmap head $ uuids 1 let e' = set (entityID e) uuid e update e'
142
create e = do uuid <- fmap head $ uuids 1 let e' = set (entityID e) uuid e update e'
96
false
true
0
13
43
86
38
48
null
null
oldmanmike/ghc
libraries/base/Text/ParserCombinators/ReadPrec.hs
bsd-3-clause
prec :: Prec -> ReadPrec a -> ReadPrec a -- ^ @(prec n p)@ checks whether the precedence context is -- less than or equal to @n@, and -- -- * if not, fails -- -- * if so, parses @p@ in context @n@. prec n (P f) = P (\c -> if c <= n then f n else ReadP.pfail)
264
prec :: Prec -> ReadPrec a -> ReadPrec a prec n (P f) = P (\c -> if c <= n then f n else ReadP.pfail)
101
prec n (P f) = P (\c -> if c <= n then f n else ReadP.pfail)
60
true
true
0
10
66
75
39
36
null
null
gsdlab/clafer
src/Language/Clafer/Generator/Graph.hs
mit
graphSimpleExp (EUnionCom _ set1 set2) topLevel irMap = graphSimpleExp set1 topLevel irMap ++ graphSimpleExp set2 topLevel irMap
128
graphSimpleExp (EUnionCom _ set1 set2) topLevel irMap = graphSimpleExp set1 topLevel irMap ++ graphSimpleExp set2 topLevel irMap
128
graphSimpleExp (EUnionCom _ set1 set2) topLevel irMap = graphSimpleExp set1 topLevel irMap ++ graphSimpleExp set2 topLevel irMap
128
false
false
0
7
16
41
19
22
null
null
sdteffen/epanet-haskell
Epanet.hs
gpl-3.0
getCount :: Int -> Either Int Int getCount code = unsafePerformIO $ alloca $ \countptr -> do let errcode = c_ENgetcount (fromIntegral code) countptr if 0 == errcode then do count <- peek countptr return $ Right (fromIntegral count) else do return $ Left (fromIntegral errcod...
322
getCount :: Int -> Either Int Int getCount code = unsafePerformIO $ alloca $ \countptr -> do let errcode = c_ENgetcount (fromIntegral code) countptr if 0 == errcode then do count <- peek countptr return $ Right (fromIntegral count) else do return $ Left (fromIntegral errcod...
322
getCount code = unsafePerformIO $ alloca $ \countptr -> do let errcode = c_ENgetcount (fromIntegral code) countptr if 0 == errcode then do count <- peek countptr return $ Right (fromIntegral count) else do return $ Left (fromIntegral errcode)
288
false
true
0
15
91
113
53
60
null
null
batterseapower/supercompilation-by-evaluation
Core/Syntax.hs
bsd-3-clause
detagAlts :: [TaggedAlt] -> [Alt] detagAlts = map (second detagTerm)
68
detagAlts :: [TaggedAlt] -> [Alt] detagAlts = map (second detagTerm)
68
detagAlts = map (second detagTerm)
34
false
true
0
8
9
36
17
19
null
null
comatose/redo
src/Development/Redo/Config.hs
bsd-3-clause
envParallelBuild :: String envParallelBuild = "REDO_PARALLEL_BUILD"
67
envParallelBuild :: String envParallelBuild = "REDO_PARALLEL_BUILD"
67
envParallelBuild = "REDO_PARALLEL_BUILD"
40
false
true
0
4
5
11
6
5
null
null
keithshep/txt-sushi
Database/TxtSushi/SQLParser.hs
bsd-3-clause
-- | find out if the given string ends with an op char endsWithOp :: String -> Bool endsWithOp strToTest = last strToTest `elem` opChars
136
endsWithOp :: String -> Bool endsWithOp strToTest = last strToTest `elem` opChars
81
endsWithOp strToTest = last strToTest `elem` opChars
52
true
true
0
6
24
28
15
13
null
null
ksallberg/adventofcode
2015/src/Day19_2.hs
bsd-2-clause
trans "CaF" = "F"
17
trans "CaF" = "F"
17
trans "CaF" = "F"
17
false
false
0
5
3
9
4
5
null
null
mikeplus64/Level-0
src/Graphics/UI/SDL/Extra/Keys.hs
gpl-3.0
keyToChar SDLK_c = Just 'c'
27
keyToChar SDLK_c = Just 'c'
27
keyToChar SDLK_c = Just 'c'
27
false
false
0
5
4
12
5
7
null
null
brendanhay/gogol
gogol-safebrowsing/gen/Network/Google/Resource/SafeBrowsing/ThreatMatches/Find.hs
mpl-2.0
-- | Creates a value of 'ThreatMatchesFind' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'tmfXgafv' -- -- * 'tmfUploadProtocol' -- -- * 'tmfAccessToken' -- -- * 'tmfUploadType' -- -- * 'tmfPayload' -- -- * 'tmfCallback' threatMatche...
674
threatMatchesFind :: GoogleSecuritySafebrowsingV4FindThreatMatchesRequest -- ^ 'tmfPayload' -> ThreatMatchesFind threatMatchesFind pTmfPayload_ = ThreatMatchesFind' { _tmfXgafv = Nothing , _tmfUploadProtocol = Nothing , _tmfAccessToken = Nothing , _tmfUploadType = Nothing , _tmfPayload = p...
366
threatMatchesFind pTmfPayload_ = ThreatMatchesFind' { _tmfXgafv = Nothing , _tmfUploadProtocol = Nothing , _tmfAccessToken = Nothing , _tmfUploadType = Nothing , _tmfPayload = pTmfPayload_ , _tmfCallback = Nothing }
245
true
true
0
7
128
81
52
29
null
null
mmhl/todohv2
Main.hs
gpl-2.0
printOptions :: IO () printOptions = do mapM_ (\(num, desc, _) -> putStrLn (line num desc )) options where line n desc = (show n) ++ ". " ++ desc
153
printOptions :: IO () printOptions = do mapM_ (\(num, desc, _) -> putStrLn (line num desc )) options where line n desc = (show n) ++ ". " ++ desc
153
printOptions = do mapM_ (\(num, desc, _) -> putStrLn (line num desc )) options where line n desc = (show n) ++ ". " ++ desc
131
false
true
1
12
37
84
40
44
null
null
alexbiehl/mysql-haskell-simple
src/Database/MySQL/Simple/Encoder.hs
bsd-3-clause
float :: Value Float float = mkValue MySQLFloat
47
float :: Value Float float = mkValue MySQLFloat
47
float = mkValue MySQLFloat
26
false
true
0
5
7
17
8
9
null
null
hackern/halfs
test/deps/hfuse/examples/HelloFS.hs
bsd-3-clause
helloFSOps :: FuseOperations HT helloFSOps = defaultFuseOps { fuseGetFileStat = helloGetFileStat , fuseOpen = helloOpen , fuseRead = helloRead , fuseOpenDirectory = helloOpenDirectory , fuseRea...
460
helloFSOps :: FuseOperations HT helloFSOps = defaultFuseOps { fuseGetFileStat = helloGetFileStat , fuseOpen = helloOpen , fuseRead = helloRead , fuseOpenDirectory = helloOpenDirectory , fuseRea...
460
helloFSOps = defaultFuseOps { fuseGetFileStat = helloGetFileStat , fuseOpen = helloOpen , fuseRead = helloRead , fuseOpenDirectory = helloOpenDirectory , fuseReadDirectory = helloReadDirectory ...
428
false
true
0
6
214
52
32
20
null
null
DougBurke/swish
tests/N3ParserTest.hs
lgpl-2.1
keywordN3Graph_01 :: B.Builder keywordN3Graph_01 = "@keywords .\n" `mappend` "b a c . "
92
keywordN3Graph_01 :: B.Builder keywordN3Graph_01 = "@keywords .\n" `mappend` "b a c . "
92
keywordN3Graph_01 = "@keywords .\n" `mappend` "b a c . "
61
false
true
0
7
17
28
13
15
null
null
Concomitant/LambdaHack
GameDefinition/Content/ItemKindBlast.hs
bsd-3-clause
glue = ItemKind { isymbol = '*' , iname = "hoof glue" , ifreq = [("glue", 1)] , iflavour = zipPlain [BrYellow] , icount = 20 , irarity = [(1, 1)] , iverbHit = "glue" , iweight = 20 , iaspects = [] , ieffects = [Paralyze (3 + d 3)] , ifeature = [toVelocity 40, Fragile, Identified] , id...
353
glue = ItemKind { isymbol = '*' , iname = "hoof glue" , ifreq = [("glue", 1)] , iflavour = zipPlain [BrYellow] , icount = 20 , irarity = [(1, 1)] , iverbHit = "glue" , iweight = 20 , iaspects = [] , ieffects = [Paralyze (3 + d 3)] , ifeature = [toVelocity 40, Fragile, Identified] , id...
353
glue = ItemKind { isymbol = '*' , iname = "hoof glue" , ifreq = [("glue", 1)] , iflavour = zipPlain [BrYellow] , icount = 20 , irarity = [(1, 1)] , iverbHit = "glue" , iweight = 20 , iaspects = [] , ieffects = [Paralyze (3 + d 3)] , ifeature = [toVelocity 40, Fragile, Identified] , id...
353
false
false
1
12
112
149
89
60
null
null
DougBurke/swish
tests/VarBindingTest.hs
lgpl-2.1
-- 1 testFindCompSuite :: Test testFindCompSuite = TestList [ testEq "testVarModifyName08" (swishName "__vbm4_vbm3__vbm9_") $ vbmName (head compad) , testEq "testVarModifyName08" (swishName "__vbm4_vbm9__vbm3_") $ vbmName (compad!!1) , testEq "testFindComp01" ...
3,097
testFindCompSuite :: Test testFindCompSuite = TestList [ testEq "testVarModifyName08" (swishName "__vbm4_vbm3__vbm9_") $ vbmName (head compad) , testEq "testVarModifyName08" (swishName "__vbm4_vbm9__vbm3_") $ vbmName (compad!!1) , testEq "testFindComp01" 1 (len...
3,091
testFindCompSuite = TestList [ testEq "testVarModifyName08" (swishName "__vbm4_vbm3__vbm9_") $ vbmName (head compad) , testEq "testVarModifyName08" (swishName "__vbm4_vbm9__vbm3_") $ vbmName (compad!!1) , testEq "testFindComp01" 1 (length compab) , testEq "te...
3,065
true
true
0
9
544
961
485
476
null
null
keithodulaigh/Hets
Static/GTheory.hs
gpl-2.0
getValidAxioms :: G_theory -- ^ old global theory -> G_theory -- ^ new global theory -> [String] -- ^ unchanged axioms getValidAxioms (G_theory lid1 _ _ _ sens1 _) (G_theory lid2 _ _ _ sens2 _) = case coerceThSens lid1 lid2 "" sens1 of Nothing -> [] Just sens -> OMap.keys $ OMap.filterWithKey (\ k s...
454
getValidAxioms :: G_theory -- ^ old global theory -> G_theory -- ^ new global theory -> [String] getValidAxioms (G_theory lid1 _ _ _ sens1 _) (G_theory lid2 _ _ _ sens2 _) = case coerceThSens lid1 lid2 "" sens1 of Nothing -> [] Just sens -> OMap.keys $ OMap.filterWithKey (\ k s -> case OMap.lo...
432
getValidAxioms (G_theory lid1 _ _ _ sens1 _) (G_theory lid2 _ _ _ sens2 _) = case coerceThSens lid1 lid2 "" sens1 of Nothing -> [] Just sens -> OMap.keys $ OMap.filterWithKey (\ k s -> case OMap.lookup k sens of Just s2 -> isAxiom s && isAxiom s2 && sentence s == sentence s2 _ -> Fal...
329
true
true
0
18
121
170
82
88
null
null
brendanhay/gogol
gogol-cloudscheduler/gen/Network/Google/CloudScheduler/Types/Product.hs
mpl-2.0
-- | The relative URI. The relative URL must begin with \"\/\" and must be a -- valid HTTP relative URL. It can contain a path, query string arguments, -- and \`#\` fragments. If the relative URL is empty, then the root path -- \"\/\" will be used. No spaces are allowed, and the maximum length -- allowed is 2083 charac...
478
aehttptRelativeURI :: Lens' AppEngineHTTPTarget (Maybe Text) aehttptRelativeURI = lens _aehttptRelativeURI (\ s a -> s{_aehttptRelativeURI = a})
152
aehttptRelativeURI = lens _aehttptRelativeURI (\ s a -> s{_aehttptRelativeURI = a})
91
true
true
1
9
85
56
29
27
null
null
supermario/stack
src/Stack/Setup.hs
bsd-3-clause
getSetupInfo :: (MonadIO m, MonadThrow m, MonadLogger m, MonadReader env m, HasConfig env) => String -> Manager -> m SetupInfo getSetupInfo stackSetupYaml manager = do config <- asks getConfig setupInfos <- mapM loadSetupInfo (SetupInfoFileOrURL stackSetupYaml : ...
1,117
getSetupInfo :: (MonadIO m, MonadThrow m, MonadLogger m, MonadReader env m, HasConfig env) => String -> Manager -> m SetupInfo getSetupInfo stackSetupYaml manager = do config <- asks getConfig setupInfos <- mapM loadSetupInfo (SetupInfoFileOrURL stackSetupYaml : ...
1,117
getSetupInfo stackSetupYaml manager = do config <- asks getConfig setupInfos <- mapM loadSetupInfo (SetupInfoFileOrURL stackSetupYaml : configSetupInfoLocations config) return (mconcat setupInfos) where loadSetupInfo (SetupInfoInline si) = return si loa...
982
false
true
1
18
434
289
134
155
null
null
frasertweedale/hs-jose
src/Crypto/JOSE/JWE.hs
apache-2.0
critInvalidNames :: [T.Text] critInvalidNames = [ "alg" , "enc" , "zip" , "jku" , "jwk" , "kid" , "x5u" , "x5c" , "x5t" , "x5t#S256" , "typ" , "cty" , "crit" ]
163
critInvalidNames :: [T.Text] critInvalidNames = [ "alg" , "enc" , "zip" , "jku" , "jwk" , "kid" , "x5u" , "x5c" , "x5t" , "x5t#S256" , "typ" , "cty" , "crit" ]
163
critInvalidNames = [ "alg" , "enc" , "zip" , "jku" , "jwk" , "kid" , "x5u" , "x5c" , "x5t" , "x5t#S256" , "typ" , "cty" , "crit" ]
134
false
true
0
6
35
55
35
20
null
null
ml9951/ghc
compiler/types/FamInstEnv.hs
bsd-3-clause
famInstEnvElts :: FamInstEnv -> [FamInst] famInstEnvElts fi = [elt | FamIE elts <- eltsUFM fi, elt <- elts]
107
famInstEnvElts :: FamInstEnv -> [FamInst] famInstEnvElts fi = [elt | FamIE elts <- eltsUFM fi, elt <- elts]
107
famInstEnvElts fi = [elt | FamIE elts <- eltsUFM fi, elt <- elts]
65
false
true
0
8
17
46
23
23
null
null
marcelosousa/poet
src/Domain/Concrete/State.hs
gpl-2.0
ppConHeap :: SymbolTable -> ConHeap -> String ppConHeap symt m = ppConHeap' symt $ M.toList m
93
ppConHeap :: SymbolTable -> ConHeap -> String ppConHeap symt m = ppConHeap' symt $ M.toList m
93
ppConHeap symt m = ppConHeap' symt $ M.toList m
47
false
true
0
7
15
36
17
19
null
null
deweyvm/kayvee
src/Database/Kayvee/GC.hs
mit
tempDb :: FilePath tempDb = "db.store.temp"
43
tempDb :: FilePath tempDb = "db.store.temp"
43
tempDb = "db.store.temp"
24
false
true
0
6
5
18
7
11
null
null
uduki/hsQt
Qtc/Enums/Gui/QSizePolicy.hs
bsd-2-clause
ePreferred :: Policy ePreferred = iePolicy $ 5
48
ePreferred :: Policy ePreferred = iePolicy $ 5
48
ePreferred = iePolicy $ 5
27
false
true
0
6
9
18
8
10
null
null
sol/pandoc
src/Text/Pandoc/Readers/HTML.hs
gpl-2.0
isBad :: Char -> Bool isBad c = c >= '\128' && c <= '\159'
58
isBad :: Char -> Bool isBad c = c >= '\128' && c <= '\159'
58
isBad c = c >= '\128' && c <= '\159'
36
false
true
0
7
14
30
15
15
null
null
apyrgio/snf-ganeti
test/hs/Test/Ganeti/OpCodes.hs
bsd-2-clause
case_readRecreateDisks_fail :: Assertion case_readRecreateDisks_fail = do assertBool "null" $ isJsonError (J.readJSON J.JSNull::J.Result RecreateDisksInfo) assertBool "string" $ isJsonError (J.readJSON (J.showJSON "abc")::J.Result RecreateDisksInfo) -- | Tests a few invalid 'readDdmOldChanges' cases.
314
case_readRecreateDisks_fail :: Assertion case_readRecreateDisks_fail = do assertBool "null" $ isJsonError (J.readJSON J.JSNull::J.Result RecreateDisksInfo) assertBool "string" $ isJsonError (J.readJSON (J.showJSON "abc")::J.Result RecreateDisksInfo) -- | Tests a few invalid 'readDdmOldChanges' cases.
314
case_readRecreateDisks_fail = do assertBool "null" $ isJsonError (J.readJSON J.JSNull::J.Result RecreateDisksInfo) assertBool "string" $ isJsonError (J.readJSON (J.showJSON "abc")::J.Result RecreateDisksInfo) -- | Tests a few invalid 'readDdmOldChanges' cases.
273
false
true
0
13
41
80
38
42
null
null
shayan-najd/HsParser
Lexeme.hs
gpl-3.0
okConSymOcc :: String -> Bool okConSymOcc ":" = True
52
okConSymOcc :: String -> Bool okConSymOcc ":" = True
52
okConSymOcc ":" = True
22
false
true
0
5
8
18
9
9
null
null
alxemist/TicTacToe
dist/build/autogen/Paths_TicTacToe.hs
bsd-3-clause
libdir = "C:\\Users\\Antanas\\AppData\\Roaming\\cabal\\x86_64-windows-ghc-8.0.1\\TicTacToe-0.1.0.0-HI2Cq3lqf8gHTMcOf2Xeq1"
126
libdir = "C:\\Users\\Antanas\\AppData\\Roaming\\cabal\\x86_64-windows-ghc-8.0.1\\TicTacToe-0.1.0.0-HI2Cq3lqf8gHTMcOf2Xeq1"
126
libdir = "C:\\Users\\Antanas\\AppData\\Roaming\\cabal\\x86_64-windows-ghc-8.0.1\\TicTacToe-0.1.0.0-HI2Cq3lqf8gHTMcOf2Xeq1"
126
false
false
0
4
6
6
3
3
null
null
ezyang/ghc
compiler/main/HscStats.hs
bsd-3-clause
-- | Source Statistics ppSourceStats :: Bool -> Located (HsModule GhcPs) -> SDoc ppSourceStats short (L _ (HsModule _ exports imports ldecls _ _)) = (if short then hcat else vcat) (map pp_val [("ExportAll ", export_all), -- 1 if no export list ("ExportDecls ", export_ds), ...
6,761
ppSourceStats :: Bool -> Located (HsModule GhcPs) -> SDoc ppSourceStats short (L _ (HsModule _ exports imports ldecls _ _)) = (if short then hcat else vcat) (map pp_val [("ExportAll ", export_all), -- 1 if no export list ("ExportDecls ", export_ds), ("ExportMo...
6,738
ppSourceStats short (L _ (HsModule _ exports imports ldecls _ _)) = (if short then hcat else vcat) (map pp_val [("ExportAll ", export_all), -- 1 if no export list ("ExportDecls ", export_ds), ("ExportModules ", export_ms), ("Imports ",...
6,680
true
true
188
15
2,379
1,980
1,262
718
null
null
gnn/Hets
GUI/GtkLinkTypeChoice.hs
gpl-2.0
mapEdgeTypesToNames :: Map.Map String (DGEdgeType, DGEdgeType) mapEdgeTypesToNames = Map.fromList $ map (\ e -> ("cb" ++ getDGEdgeTypeName e, (e, e { isInc = True }))) (filter (not . isInc) listDGEdgeTypes)
210
mapEdgeTypesToNames :: Map.Map String (DGEdgeType, DGEdgeType) mapEdgeTypesToNames = Map.fromList $ map (\ e -> ("cb" ++ getDGEdgeTypeName e, (e, e { isInc = True }))) (filter (not . isInc) listDGEdgeTypes)
210
mapEdgeTypesToNames = Map.fromList $ map (\ e -> ("cb" ++ getDGEdgeTypeName e, (e, e { isInc = True }))) (filter (not . isInc) listDGEdgeTypes)
147
false
true
0
10
33
86
47
39
null
null
drets/scheme-haskell-48h
src/Scheme/Eval.hs
bsd-3-clause
liftThrows :: ThrowsError a -> IOThrowsError a liftThrows (Left err) = throwError err
86
liftThrows :: ThrowsError a -> IOThrowsError a liftThrows (Left err) = throwError err
86
liftThrows (Left err) = throwError err
39
false
true
0
7
13
33
15
18
null
null
XinhuaZhang/PetaVisionHaskell
PetaVision/Utility/DFT/Base.hs
gpl-3.0
unSign :: Sign -> FFTWSign unSign DFTForward = c_forward
56
unSign :: Sign -> FFTWSign unSign DFTForward = c_forward
56
unSign DFTForward = c_forward
29
false
true
0
5
8
22
10
12
null
null
jokusi/Astview
test/SourceLocation.hs
mit
testSourceLocations :: TestTree testSourceLocations = testGroup "Source locations" [groupContains,smartConstructors]
118
testSourceLocations :: TestTree testSourceLocations = testGroup "Source locations" [groupContains,smartConstructors]
118
testSourceLocations = testGroup "Source locations" [groupContains,smartConstructors]
86
false
true
0
6
10
22
12
10
null
null
input-output-hk/pos-haskell-prototype
lib/src/Pos/Launcher/Resource.hs
mit
releaseNodeResources :: NodeResources ext -> IO () releaseNodeResources NodeResources {..} = do case nrJsonLogConfig of JsonLogDisabled -> return () JsonLogConfig mVarHandle _ -> do h <- takeMVar mVarHandle (liftIO . hClose) h putMVar mVarHandle h close...
506
releaseNodeResources :: NodeResources ext -> IO () releaseNodeResources NodeResources {..} = do case nrJsonLogConfig of JsonLogDisabled -> return () JsonLogConfig mVarHandle _ -> do h <- takeMVar mVarHandle (liftIO . hClose) h putMVar mVarHandle h close...
506
releaseNodeResources NodeResources {..} = do case nrJsonLogConfig of JsonLogDisabled -> return () JsonLogConfig mVarHandle _ -> do h <- takeMVar mVarHandle (liftIO . hClose) h putMVar mVarHandle h closeNodeDBs nrDBs Async.cancel nrConsolidate releaseNo...
448
false
true
0
14
131
114
50
64
null
null
bitemyapp/Earley
examples/Mixfix.hs
bsd-3-clause
holey ('_':xs) = Nothing : holey xs
35
holey ('_':xs) = Nothing : holey xs
35
holey ('_':xs) = Nothing : holey xs
35
false
false
0
7
6
23
11
12
null
null
psibi/persistent
persistent-mysql/Database/Persist/MySQL.hs
mit
showSqlType (SqlNumeric s prec) _ _ = "NUMERIC(" ++ show s ++ "," ++ show prec ++ ")"
89
showSqlType (SqlNumeric s prec) _ _ = "NUMERIC(" ++ show s ++ "," ++ show prec ++ ")"
89
showSqlType (SqlNumeric s prec) _ _ = "NUMERIC(" ++ show s ++ "," ++ show prec ++ ")"
89
false
false
1
9
21
45
20
25
null
null
kazu-yamamoto/dns
internal/Network/DNS/Decode/Parsers.hs
bsd-3-clause
getMailbox :: SGet Mailbox getMailbox = getPosition >>= getDomain' atsign
73
getMailbox :: SGet Mailbox getMailbox = getPosition >>= getDomain' atsign
73
getMailbox = getPosition >>= getDomain' atsign
46
false
true
0
6
9
26
11
15
null
null
markuspf/Idris-dev
src/IRTS/Lang.hs
bsd-3-clause
lambdaLift :: Name -> LDecl -> [(Name, LDecl)] lambdaLift n (LFun opts _ args e) = let (e', (LS _ _ decls)) = runState (lift args e) (LS n 0 []) in (n, LFun opts n args e') : decls
198
lambdaLift :: Name -> LDecl -> [(Name, LDecl)] lambdaLift n (LFun opts _ args e) = let (e', (LS _ _ decls)) = runState (lift args e) (LS n 0 []) in (n, LFun opts n args e') : decls
198
lambdaLift n (LFun opts _ args e) = let (e', (LS _ _ decls)) = runState (lift args e) (LS n 0 []) in (n, LFun opts n args e') : decls
151
false
true
0
12
57
117
60
57
null
null
lukexi/rumpus
pristine/Synthesis/Verylogue2.hs
bsd-3-clause
scaleRoot = 62
14
scaleRoot = 62
14
scaleRoot = 62
14
false
false
0
4
2
6
3
3
null
null
hvr/lens
src/Control/Lens/TH.hs
bsd-3-clause
classyRules_ :: LensRules classyRules_ = underscorePrefixRules & lensIso .~ const Nothing & handleSingletons .~ False & lensClass .~ classy & classRequired .~ True & partialLenses .~ False & buildTraversals .~ True where classy :: String -> Maybe (String, String) classy n@(a:as) = Just ("Has" ++ n...
414
classyRules_ :: LensRules classyRules_ = underscorePrefixRules & lensIso .~ const Nothing & handleSingletons .~ False & lensClass .~ classy & classRequired .~ True & partialLenses .~ False & buildTraversals .~ True where classy :: String -> Maybe (String, String) classy n@(a:as) = Just ("Has" ++ n...
414
classyRules_ = underscorePrefixRules & lensIso .~ const Nothing & handleSingletons .~ False & lensClass .~ classy & classRequired .~ True & partialLenses .~ False & buildTraversals .~ True where classy :: String -> Maybe (String, String) classy n@(a:as) = Just ("Has" ++ n, toLower a:as) classy...
388
false
true
12
8
89
137
67
70
null
null
Notogora/magictext
insert.hs
gpl-2.0
{- rows_func (words readfileString) readfileString accList Purpose: Returns a list of strings (including "\n" which denotes row change) from a long string retrived from a text file. PRE: The first argument must be same as the 2nd argument but with the function ...
700
rows_func :: [String] -> String ->[String] -> [String] rows_func [] _ listwrows = reverse listwrows
99
rows_func [] _ listwrows = reverse listwrows
44
true
true
0
8
200
45
24
21
null
null
brownplt/ovid
src/Data/InductiveGraph/Class.hs
bsd-2-clause
findVertices f (x:xs) | f (vxVal x) = x:(findVertices f xs) | otherwise = findVertices f xs
96
findVertices f (x:xs) | f (vxVal x) = x:(findVertices f xs) | otherwise = findVertices f xs
96
findVertices f (x:xs) | f (vxVal x) = x:(findVertices f xs) | otherwise = findVertices f xs
96
false
false
1
10
21
57
27
30
null
null
p12nGH/miss
src/MIPS_I.hs
bsd-3-clause
seImm w = se16 $ fromIntegral $ w .|. 0xffff
44
seImm w = se16 $ fromIntegral $ w .|. 0xffff
44
seImm w = se16 $ fromIntegral $ w .|. 0xffff
44
false
false
3
6
9
26
10
16
null
null
johnpmayer/spatial-index
Main.hs
agpl-3.0
genShip :: ShipStore -> Int -> Int -> STM ShipHandle genShip tStore sid seed = let g1 = mkStdGen seed (bigx, g2) = next g1 (bigy, g3) = next g2 (bigr, _) = next g3 ship = Saucer (mod bigx 100) (mod bigy 100) (mod bigr 15 + 5) in do store <- readTVar tStore writeTVar tStore $ M.insert...
370
genShip :: ShipStore -> Int -> Int -> STM ShipHandle genShip tStore sid seed = let g1 = mkStdGen seed (bigx, g2) = next g1 (bigy, g3) = next g2 (bigr, _) = next g3 ship = Saucer (mod bigx 100) (mod bigy 100) (mod bigr 15 + 5) in do store <- readTVar tStore writeTVar tStore $ M.insert...
370
genShip tStore sid seed = let g1 = mkStdGen seed (bigx, g2) = next g1 (bigy, g3) = next g2 (bigr, _) = next g3 ship = Saucer (mod bigx 100) (mod bigy 100) (mod bigr 15 + 5) in do store <- readTVar tStore writeTVar tStore $ M.insert sid ship store return $ ShipHandle tStore sid
317
false
true
0
12
106
178
84
94
null
null
locaweb/leela
src/warpdrive/src/Leela/Storage/Backend/Redis.hs
apache-2.0
runRedisIO :: Logger -> MaxRetries -> AnswerT Redis a -> Connection -> IO a runRedisIO syslog maxretry action conn = go 0 where go n | n > maxretry = throwIO (SystemExcept (Just "Redis/runRedisIO: error retrying transaction")) | otherwise = do value <- runRedis conn (runAnswerT ac...
677
runRedisIO :: Logger -> MaxRetries -> AnswerT Redis a -> Connection -> IO a runRedisIO syslog maxretry action conn = go 0 where go n | n > maxretry = throwIO (SystemExcept (Just "Redis/runRedisIO: error retrying transaction")) | otherwise = do value <- runRedis conn (runAnswerT ac...
677
runRedisIO syslog maxretry action conn = go 0 where go n | n > maxretry = throwIO (SystemExcept (Just "Redis/runRedisIO: error retrying transaction")) | otherwise = do value <- runRedis conn (runAnswerT action) case value of Value a -> return a ...
601
false
true
0
18
221
209
96
113
null
null
bravit/Idris-dev
src/IRTS/Compiler.hs
bsd-3-clause
doForeign vs env xs = ifail "Badly formed foreign function call"
64
doForeign vs env xs = ifail "Badly formed foreign function call"
64
doForeign vs env xs = ifail "Badly formed foreign function call"
64
false
false
0
5
10
16
7
9
null
null
CulpaBS/wbBach
src/Futhark/Actions.hs
bsd-3-clause
impCodeGenAction :: Action ExplicitMemory impCodeGenAction = Action { actionName = "Compile imperative" , actionDescription = "Translate program into imperative IL and write it on standard output." , actionProcedure = either compileFail (liftIO . putStrLn . pretty) <=< I...
358
impCodeGenAction :: Action ExplicitMemory impCodeGenAction = Action { actionName = "Compile imperative" , actionDescription = "Translate program into imperative IL and write it on standard output." , actionProcedure = either compileFail (liftIO . putStrLn . pretty) <=< I...
358
impCodeGenAction = Action { actionName = "Compile imperative" , actionDescription = "Translate program into imperative IL and write it on standard output." , actionProcedure = either compileFail (liftIO . putStrLn . pretty) <=< ImpGenSequential.compileProg }
316
false
true
0
12
96
65
33
32
null
null
Lainepress/easy
Text/RE/SearchReplace.hs
bsd-3-clause
-- | warapper on 'compileSearchReplace_' that will generate an error -- if any compilation errors are found unsafeCompileSearchReplace_ :: (String->s) -> (String->Either String re) -> String -> SearchReplace re s unsafeCompileSearchRepl...
591
unsafeCompileSearchReplace_ :: (String->s) -> (String->Either String re) -> String -> SearchReplace re s unsafeCompileSearchReplace_ pk cf = either err id . compileSearchReplace_ pk cf where err msg = error $ "unsafeCompileSearchR...
483
unsafeCompileSearchReplace_ pk cf = either err id . compileSearchReplace_ pk cf where err msg = error $ "unsafeCompileSearchReplace_: " ++ msg -- | compile a SearchReplace template generating errors if the RE or -- the template are not well formed -- all capture references being checked
294
true
true
0
9
166
88
45
43
null
null
ekmett/bitwise
src/Data/Array/BitArray/ByteString.hs
bsd-3-clause
fromByteStringIO :: Ix i => (i, i) {- ^ bounds -} -> ByteString {- ^ packed elems -} -> IO (IOBitArray i) fromByteStringIO bs s = do a <- IO.newArray bs False let rs = rangeSize bs bytes = (rs + 7) `shiftR` 3 unsafeUseAsCStringLen s $ \(src, len) -> withForeignPtr (iobData a) $ \dst -> copyBytes d...
365
fromByteStringIO :: Ix i => (i, i) {- ^ bounds -} -> ByteString {- ^ packed elems -} -> IO (IOBitArray i) fromByteStringIO bs s = do a <- IO.newArray bs False let rs = rangeSize bs bytes = (rs + 7) `shiftR` 3 unsafeUseAsCStringLen s $ \(src, len) -> withForeignPtr (iobData a) $ \dst -> copyBytes d...
365
fromByteStringIO bs s = do a <- IO.newArray bs False let rs = rangeSize bs bytes = (rs + 7) `shiftR` 3 unsafeUseAsCStringLen s $ \(src, len) -> withForeignPtr (iobData a) $ \dst -> copyBytes dst (castPtr src) (bytes `min` len) return a
259
false
true
0
14
88
164
82
82
null
null
JPMoresmau/leksah
src/IDE/Core/State.hs
gpl-2.0
reflectIDE :: IDEM a -> IDERef -> IO a reflectIDE = runReaderT
62
reflectIDE :: IDEM a -> IDERef -> IO a reflectIDE = runReaderT
62
reflectIDE = runReaderT
23
false
true
0
8
11
31
13
18
null
null
wavewave/misc-utils
oldcode/lib/Application/MiscUtils/Job.hs
bsd-2-clause
convertXoj :: FilePath -> IO () convertXoj fp = do let basename = takeBaseName fp cdir <- getCurrentDirectory createDirectory basename putStrLn $ "xournal-convert makesvg --dest=" ++ cdir </> basename ++ " " ++ fp system $ "xournal-convert makesvg --dest=" ++ cdir </> basename ++ " " ++ fp return ()
319
convertXoj :: FilePath -> IO () convertXoj fp = do let basename = takeBaseName fp cdir <- getCurrentDirectory createDirectory basename putStrLn $ "xournal-convert makesvg --dest=" ++ cdir </> basename ++ " " ++ fp system $ "xournal-convert makesvg --dest=" ++ cdir </> basename ++ " " ++ fp return ()
318
convertXoj fp = do let basename = takeBaseName fp cdir <- getCurrentDirectory createDirectory basename putStrLn $ "xournal-convert makesvg --dest=" ++ cdir </> basename ++ " " ++ fp system $ "xournal-convert makesvg --dest=" ++ cdir </> basename ++ " " ++ fp return ()
286
false
true
0
11
68
102
46
56
null
null
phischu/fragnix
benchmarks/containers/Data.Sequence.hs
bsd-3-clause
addDigits2 m1 (One a) b c (Four d e f g) m2 = appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2
105
addDigits2 m1 (One a) b c (Four d e f g) m2 = appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2
105
addDigits2 m1 (One a) b c (Four d e f g) m2 = appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2
105
false
false
1
7
29
85
36
49
null
null
juhp/stack
src/Stack/Build/Source.hs
bsd-3-clause
getFileDigestMaybe :: MonadIO m => FilePath -> m (Maybe SHA256) getFileDigestMaybe fp = do liftIO (catch (liftM Just . withSourceFile fp $ getDigest) (\e -> if isDoesNotExistError e then return Nothing else throwM e))...
459
getFileDigestMaybe :: MonadIO m => FilePath -> m (Maybe SHA256) getFileDigestMaybe fp = do liftIO (catch (liftM Just . withSourceFile fp $ getDigest) (\e -> if isDoesNotExistError e then return Nothing else throwM e))...
459
getFileDigestMaybe fp = do liftIO (catch (liftM Just . withSourceFile fp $ getDigest) (\e -> if isDoesNotExistError e then return Nothing else throwM e)) where getDigest src = runConduit $ src .| getZipSink (Zip...
395
false
true
0
13
163
121
58
63
null
null
pniedzielski/fowlie-mga
src/Main.hs
gpl-3.0
-------------------------------------------------------------------------------- -- 0. TABLE OF CONTENTS -- -------------------------------------------------------------------------------- {- This program is divided into the following sections: 0. TABLE OF CONTE...
2,332
main ∷ IO () main = getInputs ≫= putStr ∘ unlines ∘ fmap (show ∘ recognize grammar') where -- Return command line arguments if there are any, and stdin lines -- otherwise. getInputs = do args ← getArgs stdin ← getLines return $ selectNotNull args stdin -- Return the first argument u...
981
main = getInputs ≫= putStr ∘ unlines ∘ fmap (show ∘ recognize grammar') where -- Return command line arguments if there are any, and stdin lines -- otherwise. getInputs = do args ← getArgs stdin ← getLines return $ selectNotNull args stdin -- Return the first argument unless it is t...
968
true
true
3
11
596
134
75
59
null
null
lally/libmet
src/Ppt/Generate/CpPrim.hs
bsd-3-clause
qualBlock cfg ((PrivMember n):ns) = let isPub (PrivMember _) = True isPub _ = False pubPrefix = map (\(PrivMember t) -> t) $ takeWhile isPub ns suffix = drop (length pubPrefix) ns in docPrivate:(formatMems cfg (n:pubPrefix)) ++ qualBlock cfg suffix
270
qualBlock cfg ((PrivMember n):ns) = let isPub (PrivMember _) = True isPub _ = False pubPrefix = map (\(PrivMember t) -> t) $ takeWhile isPub ns suffix = drop (length pubPrefix) ns in docPrivate:(formatMems cfg (n:pubPrefix)) ++ qualBlock cfg suffix
270
qualBlock cfg ((PrivMember n):ns) = let isPub (PrivMember _) = True isPub _ = False pubPrefix = map (\(PrivMember t) -> t) $ takeWhile isPub ns suffix = drop (length pubPrefix) ns in docPrivate:(formatMems cfg (n:pubPrefix)) ++ qualBlock cfg suffix
270
false
false
0
14
61
127
63
64
null
null
TravisWhitaker/Propylgraph
Propylgraph/Sentences.hs
mit
punctuation :: [Char] punctuation = "~`$%^&*()_-+=|\\}]{[\"':;/><,"
67
punctuation :: [Char] punctuation = "~`$%^&*()_-+=|\\}]{[\"':;/><,"
67
punctuation = "~`$%^&*()_-+=|\\}]{[\"':;/><,"
45
false
true
0
7
5
21
9
12
null
null
rueshyna/gogol
gogol-maps-engine/gen/Network/Google/Resource/MapsEngine/Tables/List.hs
mpl-2.0
-- | An RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z). -- Returned assets will have been created at or before this time. tlCreatedBefore :: Lens' TablesList (Maybe UTCTime) tlCreatedBefore = lens _tlCreatedBefore (\ s a -> s{_tlCreatedBefore = a}) . mapping _DateTime
298
tlCreatedBefore :: Lens' TablesList (Maybe UTCTime) tlCreatedBefore = lens _tlCreatedBefore (\ s a -> s{_tlCreatedBefore = a}) . mapping _DateTime
160
tlCreatedBefore = lens _tlCreatedBefore (\ s a -> s{_tlCreatedBefore = a}) . mapping _DateTime
108
true
true
1
8
55
58
29
29
null
null
YoshikuniJujo/funpaala
samples/25_nml/Nml.hs
bsd-3-clause
parse _ = Nothing
17
parse _ = Nothing
17
parse _ = Nothing
17
false
false
0
5
3
9
4
5
null
null
ctford/Idris-Elba-dev
src/IRTS/Bytecode.hs
bsd-3-clause
isConst (_ : xs) = False
24
isConst (_ : xs) = False
24
isConst (_ : xs) = False
24
false
false
0
7
5
16
8
8
null
null
FranklinChen/hugs98-plus-Sep2006
packages/HaXml/src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs
bsd-3-clause
notPrelude "Monad" = "AMonad"
31
notPrelude "Monad" = "AMonad"
31
notPrelude "Monad" = "AMonad"
31
false
false
1
5
5
13
4
9
null
null
dysinger/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/Types.hs
mpl-2.0
-- | Specifies the operation. You can specify only one command. -- -- For stacks, the following commands are available: -- -- 'execute_recipes': Execute one or more recipes. To specify the recipes, set -- an 'Args' parameter named 'recipes' to the list of recipes to be executed. For -- example, to execute 'phpapp::apps...
1,347
dcName :: Lens' DeploymentCommand DeploymentCommandName dcName = lens _dcName (\s a -> s { _dcName = a })
105
dcName = lens _dcName (\s a -> s { _dcName = a })
49
true
true
0
9
210
54
36
18
null
null
gambogi/csh-eval
src/CSH/Eval/Frontend/Widgets.hs
mit
widgetPanelOffset :: Integer -> Integer -> Widget -> Widget -> Widget widgetPanelOffset mdsize mdoffset title body = $(whamletFile "frontend/templates/widgets/panel.hamlet")
173
widgetPanelOffset :: Integer -> Integer -> Widget -> Widget -> Widget widgetPanelOffset mdsize mdoffset title body = $(whamletFile "frontend/templates/widgets/panel.hamlet")
173
widgetPanelOffset mdsize mdoffset title body = $(whamletFile "frontend/templates/widgets/panel.hamlet")
103
false
true
0
8
18
43
21
22
null
null
dmort27/HsSPE
Data/Phonology/Representations.hs
bsd-3-clause
feature :: GenParser Char st (String, FValue) feature = spaces >> fValue >>= \v -> (fName >>= \k -> spaces >> return (k, v))
124
feature :: GenParser Char st (String, FValue) feature = spaces >> fValue >>= \v -> (fName >>= \k -> spaces >> return (k, v))
124
feature = spaces >> fValue >>= \v -> (fName >>= \k -> spaces >> return (k, v))
78
false
true
3
13
23
68
34
34
null
null
msakai/icfpc2013
src/BV.hs
bsd-2-clause
if0 :: Expr -> Expr -> Expr -> Expr if0 = If0
45
if0 :: Expr -> Expr -> Expr -> Expr if0 = If0
45
if0 = If0
9
false
true
0
9
11
30
13
17
null
null
sherwoodwang/wxHaskell
wx/src/Graphics/UI/WX/Controls.hs
lgpl-2.1
-- | Create a report-style list control. -- -- * Attributes: 'listEvent', 'columns' -- -- * Instances: 'Items' -- 'Textual', 'Literate', 'Dimensions', 'Colored', 'Visible', 'Child', -- 'Able', 'Tipped', 'Identity', 'Styled', 'Reactive', 'Paint'. -- listCtrl :: Window a -> [Prop (ListCtrl ())] -> IO (ListCtr...
406
listCtrl :: Window a -> [Prop (ListCtrl ())] -> IO (ListCtrl ()) listCtrl parent props = listCtrlEx parent (wxLC_REPORT .+. defaultStyle) props
145
listCtrl parent props = listCtrlEx parent (wxLC_REPORT .+. defaultStyle) props
80
true
true
0
11
68
73
39
34
null
null
nzok/decimal
ScaledDecimalTest.hs
mit
was_power_of_10 :: Integer -> Bool was_power_of_10 n | n <= 0 = False | n `mod` 2 == 0 = was_power_of_10 (n `div` 2) | n `mod` 5 == 0 = was_power_of_10 (n `div` 5) | True = n == 1
206
was_power_of_10 :: Integer -> Bool was_power_of_10 n | n <= 0 = False | n `mod` 2 == 0 = was_power_of_10 (n `div` 2) | n `mod` 5 == 0 = was_power_of_10 (n `div` 5) | True = n == 1
205
was_power_of_10 n | n <= 0 = False | n `mod` 2 == 0 = was_power_of_10 (n `div` 2) | n `mod` 5 == 0 = was_power_of_10 (n `div` 5) | True = n == 1
170
false
true
1
9
67
107
55
52
null
null
amccausl/Swish
Swish/HaskellUtils/ParseURI.hs
lgpl-2.1
-- URI parser -- sect 3 (see also section 4.3) -- absoluteUri -> URI scheme: Path "" absoluteUri :: Parser Char URI absoluteUri = (scheme >++> colon) >*> (alt hierPart opaquePart) `parseApply` makeAbsUri
245
absoluteUri :: Parser Char URI absoluteUri = (scheme >++> colon) >*> (alt hierPart opaquePart) `parseApply` makeAbsUri
137
absoluteUri = (scheme >++> colon) >*> (alt hierPart opaquePart) `parseApply` makeAbsUri
106
true
true
1
7
74
50
26
24
null
null
brendanhay/gogol
gogol-libraryagent/gen/Network/Google/LibraryAgent/Types/Product.hs
mpl-2.0
-- | Value indicating whether the book has been read. gelvbRead :: Lens' GoogleExampleLibraryagentV1Book (Maybe Bool) gelvbRead = lens _gelvbRead (\ s a -> s{_gelvbRead = a})
176
gelvbRead :: Lens' GoogleExampleLibraryagentV1Book (Maybe Bool) gelvbRead = lens _gelvbRead (\ s a -> s{_gelvbRead = a})
122
gelvbRead = lens _gelvbRead (\ s a -> s{_gelvbRead = a})
58
true
true
0
9
28
48
25
23
null
null
Frefreak/Gideon
src/Manufacture.hs
bsd-3-clause
runRecipe :: [Recipe] -> Gideon [(Double, [String])] runRecipe rs = do authinfo <- ask let wrapper = executeWithAuth authinfo liftIO $ forPool 5 rs $ \r -> wrapper $ perform r
187
runRecipe :: [Recipe] -> Gideon [(Double, [String])] runRecipe rs = do authinfo <- ask let wrapper = executeWithAuth authinfo liftIO $ forPool 5 rs $ \r -> wrapper $ perform r
187
runRecipe rs = do authinfo <- ask let wrapper = executeWithAuth authinfo liftIO $ forPool 5 rs $ \r -> wrapper $ perform r
134
false
true
0
10
42
83
41
42
null
null