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
hsyl20/ViperVM
haskus-system/src/lib/Haskus/Format/Elf/GHC.hs
bsd-3-clause
decode_lower 'q' = Just '\''
28
decode_lower 'q' = Just '\''
28
decode_lower 'q' = Just '\''
28
false
false
0
5
4
12
5
7
null
null
apyrgio/snf-ganeti
src/Ganeti/BasicTypes.hs
bsd-2-clause
-- | Iterate while Ok. iterateOk :: (a -> GenericResult b a) -> a -> [a] iterateOk f a = genericResult (const []) ((:) a . iterateOk f) (f a)
141
iterateOk :: (a -> GenericResult b a) -> a -> [a] iterateOk f a = genericResult (const []) ((:) a . iterateOk f) (f a)
118
iterateOk f a = genericResult (const []) ((:) a . iterateOk f) (f a)
68
true
true
0
8
29
76
39
37
null
null
snoyberg/orangeroster
Settings.hs
bsd-2-clause
withConnectionPool :: MonadPeelIO m => (ConnectionPool -> m a) -> m a withConnectionPool = withSqlitePool connStr connectionCount
129
withConnectionPool :: MonadPeelIO m => (ConnectionPool -> m a) -> m a withConnectionPool = withSqlitePool connStr connectionCount
129
withConnectionPool = withSqlitePool connStr connectionCount
59
false
true
0
9
16
40
19
21
null
null
rdnetto/H2V
H2V/DfdDef.hs
gpl-2.0
--resolve a token, which could be a variable or a function resolve :: String -> NodeGen DNode resolve name = do nodeCase <- resolveNode_ name funcCase <- resolveDFD_ name case (nodeCase, funcCase) of (Right n, _) -> return n (_, Right f) -> newId >>= \i -> return $ DFunction i f (Le...
407
resolve :: String -> NodeGen DNode resolve name = do nodeCase <- resolveNode_ name funcCase <- resolveDFD_ name case (nodeCase, funcCase) of (Right n, _) -> return n (_, Right f) -> newId >>= \i -> return $ DFunction i f (Left (ResolutionException _ n1 n2), _) -> throw $ ResolutionE...
348
resolve name = do nodeCase <- resolveNode_ name funcCase <- resolveDFD_ name case (nodeCase, funcCase) of (Right n, _) -> return n (_, Right f) -> newId >>= \i -> return $ DFunction i f (Left (ResolutionException _ n1 n2), _) -> throw $ ResolutionException "node or DFD" n1 n2
313
true
true
0
13
103
142
70
72
null
null
actframework/FrameworkBenchmarks
frameworks/Haskell/yesod/yesod-mysql-mongo/src/yesod.hs
bsd-3-clause
documentToJson :: [Field] -> Value documentToJson = object . map toAssoc where toAssoc :: Field -> (Text, Value) toAssoc ("_id" := v) = ("id", toJSON v) toAssoc (l := v) = (l, toJSON v)
199
documentToJson :: [Field] -> Value documentToJson = object . map toAssoc where toAssoc :: Field -> (Text, Value) toAssoc ("_id" := v) = ("id", toJSON v) toAssoc (l := v) = (l, toJSON v)
199
documentToJson = object . map toAssoc where toAssoc :: Field -> (Text, Value) toAssoc ("_id" := v) = ("id", toJSON v) toAssoc (l := v) = (l, toJSON v)
164
false
true
0
7
47
91
49
42
null
null
urbanslug/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
isStableSource :: UnfoldingSource -> Bool -- Keep the unfolding template isStableSource InlineCompulsory = True
113
isStableSource :: UnfoldingSource -> Bool isStableSource InlineCompulsory = True
82
isStableSource InlineCompulsory = True
40
true
true
0
7
15
25
11
14
null
null
Mattiemus/LaneWars
Game/Client/Resources.hs
mit
turretImage Red = loadImageKeyed "Assets/Sprites/turret_red.bmp"
64
turretImage Red = loadImageKeyed "Assets/Sprites/turret_red.bmp"
64
turretImage Red = loadImageKeyed "Assets/Sprites/turret_red.bmp"
64
false
false
0
5
4
12
5
7
null
null
uduki/hsQt
Qtc/ClassTypes/Gui.hs
bsd-2-clause
withQListQColorDialogResult :: (Ptr (Ptr (TQColorDialog a)) -> IO CInt) -> IO [QColorDialog a] withQListQColorDialogResult f = withQListObjectResult qtc_QColorDialog_getFinalizer f
182
withQListQColorDialogResult :: (Ptr (Ptr (TQColorDialog a)) -> IO CInt) -> IO [QColorDialog a] withQListQColorDialogResult f = withQListObjectResult qtc_QColorDialog_getFinalizer f
182
withQListQColorDialogResult f = withQListObjectResult qtc_QColorDialog_getFinalizer f
87
false
true
0
12
20
57
27
30
null
null
ekmett/rope
Data/Rope/Annotated/Unsafe.hs
bsd-3-clause
uncons :: (BreakableA f, Unpackable t) => Ann a f -> Maybe (t, U f) uncons (A r a) = case Rope.uncons r of Just (c,cs) -> Just (c, A cs (dropA (Rope.length r - Rope.length cs) r a)) Nothing -> Nothing
208
uncons :: (BreakableA f, Unpackable t) => Ann a f -> Maybe (t, U f) uncons (A r a) = case Rope.uncons r of Just (c,cs) -> Just (c, A cs (dropA (Rope.length r - Rope.length cs) r a)) Nothing -> Nothing
208
uncons (A r a) = case Rope.uncons r of Just (c,cs) -> Just (c, A cs (dropA (Rope.length r - Rope.length cs) r a)) Nothing -> Nothing
140
false
true
3
11
49
123
63
60
null
null
Tuplanolla/eigenlanguage
haskell/Parser.hs
gpl-3.0
warnHere :: ParseWarning -> StatefulParser () warnHere w = getPosition >>= warn . f where f p = LLocation (sourceName p) (sourceLine p) (sourceColumn p) (WParse w)
164
warnHere :: ParseWarning -> StatefulParser () warnHere w = getPosition >>= warn . f where f p = LLocation (sourceName p) (sourceLine p) (sourceColumn p) (WParse w)
164
warnHere w = getPosition >>= warn . f where f p = LLocation (sourceName p) (sourceLine p) (sourceColumn p) (WParse w)
118
false
true
0
7
27
74
36
38
null
null
blacktaxi/inversion
src/Interval.hs
bsd-3-clause
tritone = dim5
14
tritone = dim5
14
tritone = dim5
14
false
false
0
4
2
6
3
3
null
null
dvolk/hoodie
Main.hs
gpl-3.0
moveEntityTo :: Entity -> Vector2 -> Game () moveEntityTo e newp = modifyEntity e ( modifyEntityPos newp . addEntityTime (itemUseCost e (equArmor (inv e))) )
193
moveEntityTo :: Entity -> Vector2 -> Game () moveEntityTo e newp = modifyEntity e ( modifyEntityPos newp . addEntityTime (itemUseCost e (equArmor (inv e))) )
193
moveEntityTo e newp = modifyEntity e ( modifyEntityPos newp . addEntityTime (itemUseCost e (equArmor (inv e))) )
148
false
true
0
14
60
67
32
35
null
null
pasberth/LeatherScript-prototype
Language/LeatherScript/LeatherShield.hs
mit
leatherShield (AST.Mul x y) = do xt <- leatherShield x yt <- leatherShield y if xt == SimpleTy "string" then return $ SimpleTy "string" else if yt == SimpleTy "string" then return $ SimpleTy "string" else if xt == yt then return xt else...
348
leatherShield (AST.Mul x y) = do xt <- leatherShield x yt <- leatherShield y if xt == SimpleTy "string" then return $ SimpleTy "string" else if yt == SimpleTy "string" then return $ SimpleTy "string" else if xt == yt then return xt else...
348
leatherShield (AST.Mul x y) = do xt <- leatherShield x yt <- leatherShield y if xt == SimpleTy "string" then return $ SimpleTy "string" else if yt == SimpleTy "string" then return $ SimpleTy "string" else if xt == yt then return xt else...
348
false
false
0
11
132
110
52
58
null
null
markus1189/xmonad-contrib-710
XMonad/Hooks/FadeInactive.hs
bsd-3-clause
-- | Fades a window by the specified amount if it satisfies the first query, otherwise -- makes it opaque. fadeIf :: Query Bool -> Rational -> Query Rational fadeIf qry amt = qry >>= \b -> return $ if b then amt else 1
218
fadeIf :: Query Bool -> Rational -> Query Rational fadeIf qry amt = qry >>= \b -> return $ if b then amt else 1
111
fadeIf qry amt = qry >>= \b -> return $ if b then amt else 1
60
true
true
0
8
44
53
28
25
null
null
cheme/nanomsg-hs
System/NanoMsg.hs
mit
-- | Please refer to nn_setsockopt(3) Manual Page -- Throws NanoError setIPV4ONLY :: Socket s -> Bool -> IO () setIPV4ONLY s v = setIntOption s NN_SOL_SOCKET NN_IPV4ONLY $ fromEnum v
182
setIPV4ONLY :: Socket s -> Bool -> IO () setIPV4ONLY s v = setIntOption s NN_SOL_SOCKET NN_IPV4ONLY $ fromEnum v
112
setIPV4ONLY s v = setIntOption s NN_SOL_SOCKET NN_IPV4ONLY $ fromEnum v
71
true
true
0
8
30
48
23
25
null
null
matterhorn-chat/matterhorn
src/Matterhorn/Draw/RichText.hs
bsd-3-clause
renderFlattenedValue :: Show a => Text -> FlattenedValue a -> Widget a renderFlattenedValue curUser (NonBreaking rs) = let renderLine = hBox . F.toList . fmap (renderFlattenedValue curUser) in vBox (F.toList $ renderLine <$> F.toList rs)
245
renderFlattenedValue :: Show a => Text -> FlattenedValue a -> Widget a renderFlattenedValue curUser (NonBreaking rs) = let renderLine = hBox . F.toList . fmap (renderFlattenedValue curUser) in vBox (F.toList $ renderLine <$> F.toList rs)
245
renderFlattenedValue curUser (NonBreaking rs) = let renderLine = hBox . F.toList . fmap (renderFlattenedValue curUser) in vBox (F.toList $ renderLine <$> F.toList rs)
174
false
true
0
12
42
94
44
50
null
null
sboosali/workflow-osx
workflow-osx/sources/Workflow/OSX/Bindings.hs
mit
setCursorPosition :: (MonadIO m) => CGPoint -> m () setCursorPosition (CGPoint x y) = liftIO $ do c_setCursorPosition x y -------------------------------------------------------------------------------- -- pressKey :: (MonadIO m) => CGKeyCode -> m () -- pressKey key = liftIO $ do -- pressKeyDown key -- pressKeyUp...
326
setCursorPosition :: (MonadIO m) => CGPoint -> m () setCursorPosition (CGPoint x y) = liftIO $ do c_setCursorPosition x y -------------------------------------------------------------------------------- -- pressKey :: (MonadIO m) => CGKeyCode -> m () -- pressKey key = liftIO $ do -- pressKeyDown key -- pressKeyUp...
326
setCursorPosition (CGPoint x y) = liftIO $ do c_setCursorPosition x y -------------------------------------------------------------------------------- -- pressKey :: (MonadIO m) => CGKeyCode -> m () -- pressKey key = liftIO $ do -- pressKeyDown key -- pressKeyUp key
274
false
true
0
8
51
57
30
27
null
null
a143753/AOJ
0357.hs
apache-2.0
ans (a:b:_) = (a + b) `div` 2
29
ans (a:b:_) = (a + b) `div` 2
29
ans (a:b:_) = (a + b) `div` 2
29
false
false
0
7
7
34
18
16
null
null
snoyberg/ghc
compiler/coreSyn/MkCore.hs
bsd-3-clause
castBottomExpr :: CoreExpr -> Type -> CoreExpr -- (castBottomExpr e ty), assuming that 'e' diverges, -- return an expression of type 'ty' -- See Note [Empty case alternatives] in CoreSyn castBottomExpr e res_ty | e_ty `eqType` res_ty = e | otherwise = Case e (mkWildValBinder e_ty) res_ty [] where e...
645
castBottomExpr :: CoreExpr -> Type -> CoreExpr castBottomExpr e res_ty | e_ty `eqType` res_ty = e | otherwise = Case e (mkWildValBinder e_ty) res_ty [] where e_ty = exprType e {- The functions from this point don't really do anything cleverer than their counterparts in CoreSyn, but they are here f...
505
castBottomExpr e res_ty | e_ty `eqType` res_ty = e | otherwise = Case e (mkWildValBinder e_ty) res_ty [] where e_ty = exprType e {- The functions from this point don't really do anything cleverer than their counterparts in CoreSyn, but they are here for consistency -} -- | Create a lambda where t...
458
true
true
1
8
130
78
42
36
null
null
BartAdv/hoogle
src/General/Conduit.hs
bsd-3-clause
mapMaybeC = C.mapMaybe
22
mapMaybeC = C.mapMaybe
22
mapMaybeC = C.mapMaybe
22
false
false
1
6
2
12
4
8
null
null
oldmanmike/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
amodeCouldBeClobbered :: Platform -> AddrMode -> Bool amodeCouldBeClobbered platform amode = any (regClobbered platform) (addrModeRegs amode)
141
amodeCouldBeClobbered :: Platform -> AddrMode -> Bool amodeCouldBeClobbered platform amode = any (regClobbered platform) (addrModeRegs amode)
141
amodeCouldBeClobbered platform amode = any (regClobbered platform) (addrModeRegs amode)
87
false
true
0
7
15
45
21
24
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
2558 = 2557
11
2558 = 2557
11
2558 = 2557
11
false
false
1
5
2
10
3
7
null
null
sdzivanovich/cs1699_deliverable5
Main.hs
bsd-3-clause
-- and of a singleton [Bool] is the Bool itself. prop_andOfSingleValueIsItself :: Bool -> Bool prop_andOfSingleValueIsItself b = My.and [b] == b
144
prop_andOfSingleValueIsItself :: Bool -> Bool prop_andOfSingleValueIsItself b = My.and [b] == b
95
prop_andOfSingleValueIsItself b = My.and [b] == b
49
true
true
0
7
21
37
17
20
null
null
Pancia/loki-lang
src/Parser.hs
mit
parseTuple :: Parser LokiVal parseTuple = inLitExpr "^{" "}" $ do vals <- many (parseLiteralExpr1 <* spaces) s <- getState return $ Tuple (newMeta s) vals
166
parseTuple :: Parser LokiVal parseTuple = inLitExpr "^{" "}" $ do vals <- many (parseLiteralExpr1 <* spaces) s <- getState return $ Tuple (newMeta s) vals
166
parseTuple = inLitExpr "^{" "}" $ do vals <- many (parseLiteralExpr1 <* spaces) s <- getState return $ Tuple (newMeta s) vals
137
false
true
0
12
37
71
31
40
null
null
ihc/futhark
src/Futhark/CodeGen/Backends/SimpleRepresentation.hs
isc
uintTypeToCType Int16 = [C.cty|typename uint16_t|]
50
uintTypeToCType Int16 = [C.cty|typename uint16_t|]
50
uintTypeToCType Int16 = [C.cty|typename uint16_t|]
50
false
false
0
5
4
15
9
6
null
null
nick0x01/Win32-services
examples/official.hs
bsd-3-clause
svcCtrlHandler _ _ _ INTERROGATE = return True
46
svcCtrlHandler _ _ _ INTERROGATE = return True
46
svcCtrlHandler _ _ _ INTERROGATE = return True
46
false
false
1
5
7
16
7
9
null
null
diku-dk/futhark
src/Language/Futhark/Parser/Monad.hs
isc
parseError (L loc tok, expected) = parseErrorAt loc . Just . unlines $ [ "unexpected " ++ show tok, "Expected one of the following: " ++ unwords expected ]
171
parseError (L loc tok, expected) = parseErrorAt loc . Just . unlines $ [ "unexpected " ++ show tok, "Expected one of the following: " ++ unwords expected ]
171
parseError (L loc tok, expected) = parseErrorAt loc . Just . unlines $ [ "unexpected " ++ show tok, "Expected one of the following: " ++ unwords expected ]
171
false
false
0
8
44
55
27
28
null
null
theor/zorkell
src/Header.hs
bsd-3-clause
-- getWord8 :: StoryReader a -- getWord8 = lift BS.getWord8 isAt :: StoryReader Int isAt = do x <- get return $ snd x -- lift $ return 1
147
isAt :: StoryReader Int isAt = do x <- get return $ snd x -- lift $ return 1
86
isAt = do x <- get return $ snd x -- lift $ return 1
62
true
true
0
8
39
34
17
17
null
null
spacekitteh/compdata
examples/Examples/Multi/Eval.hs
bsd-3-clause
projC :: (Value :<: v) => Term v Int -> Int projC v = case project v of Just (Const n) -> n
91
projC :: (Value :<: v) => Term v Int -> Int projC v = case project v of Just (Const n) -> n
91
projC v = case project v of Just (Const n) -> n
47
false
true
0
10
22
56
27
29
null
null
kmilner/tamarin-prover
lib/theory/src/Theory/Model/Fact.hs
gpl-3.0
-- | The multiplicity of a 'FactTag'. factTagMultiplicity :: FactTag -> Multiplicity factTagMultiplicity tag = case tag of ProtoFact multi _ _ -> multi KUFact -> Persistent KDFact -> Persistent _ -> Linear -- | The arity of a 'FactTag'.
297
factTagMultiplicity :: FactTag -> Multiplicity factTagMultiplicity tag = case tag of ProtoFact multi _ _ -> multi KUFact -> Persistent KDFact -> Persistent _ -> Linear -- | The arity of a 'FactTag'.
259
factTagMultiplicity tag = case tag of ProtoFact multi _ _ -> multi KUFact -> Persistent KDFact -> Persistent _ -> Linear -- | The arity of a 'FactTag'.
212
true
true
0
8
100
55
28
27
null
null
siddhanathan/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
coToHsWrapperR :: TcCoercion -> HsWrapper -- A Representational coercion coToHsWrapperR co | isTcReflCo co = idHsWrapper | otherwise = mkWpCast co
170
coToHsWrapperR :: TcCoercion -> HsWrapper coToHsWrapperR co | isTcReflCo co = idHsWrapper | otherwise = mkWpCast co
137
coToHsWrapperR co | isTcReflCo co = idHsWrapper | otherwise = mkWpCast co
95
true
true
0
8
44
40
18
22
null
null
aBhallo/AoC2016
Day 19/day19part1.hs
mit
main = do let input = 3018458 result = compute input print result
96
main = do let input = 3018458 result = compute input print result
96
main = do let input = 3018458 result = compute input print result
96
false
false
1
11
43
33
13
20
null
null
ducis/cassandra-minimalist
cassandra-cql-0.3.0.1/tests/test-list.hs
apache-2.0
selectT :: Query Rows () [Text] selectT = "select items from listst"
68
selectT :: Query Rows () [Text] selectT = "select items from listst"
68
selectT = "select items from listst"
36
false
true
0
7
11
29
13
16
null
null
siddhanathan/ghc
testsuite/tests/layout/layout007.hs
bsd-3-clause
-- The paren here closes the open-splice - it doesn't match an -- opening paren f :: IO () f = do print $( [| 'a' |] )
119
f :: IO () f = do print $( [| 'a' |] )
38
f = do print $( [| 'a' |] )
27
true
true
1
10
28
35
17
18
null
null
norm2782/uuagc
tools/Haskell2Ag.hs
bsd-3-clause
showType (UnBangedTy (TyParen ty)) = showType (UnBangedTy ty)
61
showType (UnBangedTy (TyParen ty)) = showType (UnBangedTy ty)
61
showType (UnBangedTy (TyParen ty)) = showType (UnBangedTy ty)
61
false
false
0
8
7
31
14
17
null
null
futtetennista/IntroductionToFunctionalProgramming
PiH/src/Chapter8.hs
mit
evalp s (And p1 p2) = evalp s p1 && evalp s p2
48
evalp s (And p1 p2) = evalp s p1 && evalp s p2
48
evalp s (And p1 p2) = evalp s p1 && evalp s p2
48
false
false
0
7
14
33
15
18
null
null
dbp/mealstrat
src/Lib.hs
isc
ingredientParser original = do n <- many1 digit d <- option 0 $ do char '.' n' <- many1 digit return (read ("0." ++ n')) let quantity = read n + d spaces unit <- option Single (choice [unitParser ["grams", "gram"] Grams ...
958
ingredientParser original = do n <- many1 digit d <- option 0 $ do char '.' n' <- many1 digit return (read ("0." ++ n')) let quantity = read n + d spaces unit <- option Single (choice [unitParser ["grams", "gram"] Grams ...
958
ingredientParser original = do n <- many1 digit d <- option 0 $ do char '.' n' <- many1 digit return (read ("0." ++ n')) let quantity = read n + d spaces unit <- option Single (choice [unitParser ["grams", "gram"] Grams ...
958
false
false
0
15
386
290
146
144
null
null
plumlife/cabal
Cabal/Distribution/PackageDescription/Configuration.hs
bsd-3-clause
biFillInDefaults :: BuildInfo -> BuildInfo biFillInDefaults bi = if null (hsSourceDirs bi) then bi { hsSourceDirs = [currentDir] } else bi
150
biFillInDefaults :: BuildInfo -> BuildInfo biFillInDefaults bi = if null (hsSourceDirs bi) then bi { hsSourceDirs = [currentDir] } else bi
150
biFillInDefaults bi = if null (hsSourceDirs bi) then bi { hsSourceDirs = [currentDir] } else bi
107
false
true
0
8
32
52
26
26
null
null
input-output-hk/pos-haskell-prototype
x509/test/Main.hs
mit
getValidServiceID :: TLSConfiguration -> ServiceID getValidServiceID tlsConf = (NonEmpty.head $ serverAltNames $ tlsServer tlsConf, "")
147
getValidServiceID :: TLSConfiguration -> ServiceID getValidServiceID tlsConf = (NonEmpty.head $ serverAltNames $ tlsServer tlsConf, "")
147
getValidServiceID tlsConf = (NonEmpty.head $ serverAltNames $ tlsServer tlsConf, "")
88
false
true
0
9
26
43
20
23
null
null
nikai3d/ce-challenges
moderate/number_pairs.hs
bsd-3-clause
numpairs (x:xs) y | x + z < y = numpairs xs y | x + z > y = numpairs (x : init xs) y | otherwise = (show x ++ "," ++ show z) : numpairs (init xs) y where z = last xs
219
numpairs (x:xs) y | x + z < y = numpairs xs y | x + z > y = numpairs (x : init xs) y | otherwise = (show x ++ "," ++ show z) : numpairs (init xs) y where z = last xs
219
numpairs (x:xs) y | x + z < y = numpairs xs y | x + z > y = numpairs (x : init xs) y | otherwise = (show x ++ "," ++ show z) : numpairs (init xs) y where z = last xs
219
false
false
1
10
99
135
59
76
null
null
wereHamster/github-webhook-handler
src/GitHub/WebHook/Handler.hs
mit
-- ^ A signature was included in the request but it did not match the -- secret key which was providid to the handler. Usually points to -- a configuration error on either end. toParseError :: String -> Either Error Payload toParseError = Left . ParseError . T.pack
279
toParseError :: String -> Either Error Payload toParseError = Left . ParseError . T.pack
88
toParseError = Left . ParseError . T.pack
41
true
true
0
6
61
33
18
15
null
null
Lainepress/hledger
hledger-web/Hledger/Web/Options.hs
gpl-3.0
defbaseurlexample = (reverse $ drop 4 $ reverse $ defbaseurl defport) ++ "PORT"
79
defbaseurlexample = (reverse $ drop 4 $ reverse $ defbaseurl defport) ++ "PORT"
79
defbaseurlexample = (reverse $ drop 4 $ reverse $ defbaseurl defport) ++ "PORT"
79
false
false
0
10
12
31
15
16
null
null
ml9951/ghc
compiler/rename/RnBinds.hs
bsd-3-clause
rnMatch :: Outputable (body RdrName) => HsMatchContext Name -> (Located (body RdrName) -> RnM (Located (body Name), FreeVars)) -> LMatch RdrName (Located (body RdrName)) -> RnM (LMatch Name (Located (body Name)), FreeVars) rnMatch ctxt rnBody = wrapLocFstM (rnMatch' ctxt rnBody)
303
rnMatch :: Outputable (body RdrName) => HsMatchContext Name -> (Located (body RdrName) -> RnM (Located (body Name), FreeVars)) -> LMatch RdrName (Located (body RdrName)) -> RnM (LMatch Name (Located (body Name)), FreeVars) rnMatch ctxt rnBody = wrapLocFstM (rnMatch' ctxt rnBody)
303
rnMatch ctxt rnBody = wrapLocFstM (rnMatch' ctxt rnBody)
56
false
true
0
15
63
132
64
68
null
null
chriseidhof/objc-value-objects
PPObjCSyntax.hs
mit
interface :: Interface -> Doc interface v@(Interface name properties methods) = vcat [ "@interface " <> text name , "" , vcat $ map property properties , "" , vcat $ map (s . methodDecl) methods , "" , "@end" ]
261
interface :: Interface -> Doc interface v@(Interface name properties methods) = vcat [ "@interface " <> text name , "" , vcat $ map property properties , "" , vcat $ map (s . methodDecl) methods , "" , "@end" ]
261
interface v@(Interface name properties methods) = vcat [ "@interface " <> text name , "" , vcat $ map property properties , "" , vcat $ map (s . methodDecl) methods , "" , "@end" ]
231
false
true
0
10
91
87
46
41
null
null
svenssonjoel/EmbArBB
Samples/Bench/dotprod.hs
bsd-3-clause
dotprod :: Exp (DVector Dim1 Double) -> Exp (DVector Dim1 Double) -> Exp Double dotprod v1 v2 = index0$ addReduce rows (v1 * v2)
129
dotprod :: Exp (DVector Dim1 Double) -> Exp (DVector Dim1 Double) -> Exp Double dotprod v1 v2 = index0$ addReduce rows (v1 * v2)
128
dotprod v1 v2 = index0$ addReduce rows (v1 * v2)
48
false
true
0
9
24
65
31
34
null
null
lukexi/ghc-7.8-arm64
utils/ghctags/Main.hs
bsd-3-clause
targetsAtOneGo :: [FileName] -> (Maybe Handle, Maybe Handle) -> Ghc () -- load a list of targets targetsAtOneGo hsfiles handles = do targets <- mapM (\f -> guessTarget f Nothing) hsfiles setTargets targets modgraph <- depanal [] False let mods = flattenSCCs $ topSortModuleGraph False modgraph Nothing graphDat...
334
targetsAtOneGo :: [FileName] -> (Maybe Handle, Maybe Handle) -> Ghc () targetsAtOneGo hsfiles handles = do targets <- mapM (\f -> guessTarget f Nothing) hsfiles setTargets targets modgraph <- depanal [] False let mods = flattenSCCs $ topSortModuleGraph False modgraph Nothing graphData mods handles
308
targetsAtOneGo hsfiles handles = do targets <- mapM (\f -> guessTarget f Nothing) hsfiles setTargets targets modgraph <- depanal [] False let mods = flattenSCCs $ topSortModuleGraph False modgraph Nothing graphData mods handles
237
true
true
0
12
59
123
56
67
null
null
gregorias/rummikubsolver
src/Interface/GUI.hs
gpl-3.0
groupList size ss = take size ss : groupList size (drop size ss)
64
groupList size ss = take size ss : groupList size (drop size ss)
64
groupList size ss = take size ss : groupList size (drop size ss)
64
false
false
1
8
12
37
15
22
null
null
ucsd-progsys/nanomaly
src/NanoML/Classify.hs
bsd-3-clause
typeBind :: MonadEval m => (Pat, Expr) -> m ([(Var, Type)], (Pat, TExpr)) typeBind (p, e) = do (tp, bnds) <- typePat p te <- typeExpr e -- t <- substM (getType te) -- traceShowM (pretty p, pretty t) -- tryUnify tp (getType te) emitCt tp (getType te) return (bnds, (p, te))
286
typeBind :: MonadEval m => (Pat, Expr) -> m ([(Var, Type)], (Pat, TExpr)) typeBind (p, e) = do (tp, bnds) <- typePat p te <- typeExpr e -- t <- substM (getType te) -- traceShowM (pretty p, pretty t) -- tryUnify tp (getType te) emitCt tp (getType te) return (bnds, (p, te))
286
typeBind (p, e) = do (tp, bnds) <- typePat p te <- typeExpr e -- t <- substM (getType te) -- traceShowM (pretty p, pretty t) -- tryUnify tp (getType te) emitCt tp (getType te) return (bnds, (p, te))
212
false
true
0
10
65
122
66
56
null
null
8c6794b6/tokyodystopia-haskell
Database/TokyoDystopia/IDB.hs
bsd-3-clause
-- -- Advanced features -- -- | Set file descriptor for debugging output. setdbgfd :: IDB -> Int -> IO () setdbgfd db dbg = FI.c_setdbgfd (unIDB db) (fromIntegral dbg)
168
setdbgfd :: IDB -> Int -> IO () setdbgfd db dbg = FI.c_setdbgfd (unIDB db) (fromIntegral dbg)
93
setdbgfd db dbg = FI.c_setdbgfd (unIDB db) (fromIntegral dbg)
61
true
true
0
8
30
52
27
25
null
null
kajigor/uKanren_transformations
test/cpd/Main.hs
bsd-3-clause
checkEmbed4 = embed [add [V 509, inc 31 (V 459), inc 17 zero]] [add [V 517, inc 24 (V 1044), V 516]] where zero = C "o" [] add args = Invoke "add" args inc 0 x = x inc n x = C "s" [inc (n-1) x]
231
checkEmbed4 = embed [add [V 509, inc 31 (V 459), inc 17 zero]] [add [V 517, inc 24 (V 1044), V 516]] where zero = C "o" [] add args = Invoke "add" args inc 0 x = x inc n x = C "s" [inc (n-1) x]
231
checkEmbed4 = embed [add [V 509, inc 31 (V 459), inc 17 zero]] [add [V 517, inc 24 (V 1044), V 516]] where zero = C "o" [] add args = Invoke "add" args inc 0 x = x inc n x = C "s" [inc (n-1) x]
231
false
false
5
10
85
167
71
96
null
null
bgamari/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
isHruleChar :: Char -> Bool isHruleChar '*' = True
50
isHruleChar :: Char -> Bool isHruleChar '*' = True
50
isHruleChar '*' = True
22
false
true
0
5
8
18
9
9
null
null
philipturnbull/quenelle
src/Quenelle/Match.hs
gpl-2.0
childExprs path e@(Paren pe _) = (path, e) : childExprs (path.paren_exprL) pe
81
childExprs path e@(Paren pe _) = (path, e) : childExprs (path.paren_exprL) pe
81
childExprs path e@(Paren pe _) = (path, e) : childExprs (path.paren_exprL) pe
81
false
false
2
7
15
49
22
27
null
null
neilh23/dotfiles
xmonad/xmonad.hs
mit
main = xmonad =<< xmobar myConfig
33
main = xmonad =<< xmobar myConfig
33
main = xmonad =<< xmobar myConfig
33
false
false
1
6
5
16
6
10
null
null
tjakway/ghcjvm
compiler/basicTypes/Literal.hs
bsd-3-clause
{- Note [Printing of literals in Core] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The function `add_par` is used to wrap parenthesis around negative integers (`LitInteger`) and labels (`MachLabel`), if they occur in a context requiring an atomic thing (for example function application). Although not all Core literals would b...
1,917
hashLiteral :: Literal -> Int hashLiteral (MachChar c) = ord c + 1000
76
hashLiteral (MachChar c) = ord c + 1000
46
true
true
0
7
554
33
17
16
null
null
GaloisInc/pads-haskell
Examples/First.hs
bsd-3-clause
checkVersion :: Method -> Version -> Bool checkVersion method version = case method of LINK -> major version == 1 && minor version == 0 UNLINK -> major version == 1 && minor version == 0 _ -> True
213
checkVersion :: Method -> Version -> Bool checkVersion method version = case method of LINK -> major version == 1 && minor version == 0 UNLINK -> major version == 1 && minor version == 0 _ -> True
213
checkVersion method version = case method of LINK -> major version == 1 && minor version == 0 UNLINK -> major version == 1 && minor version == 0 _ -> True
171
false
true
0
11
55
82
39
43
null
null
naushadh/persistent
persistent-mysql/Database/Persist/MySQL.hs
mit
showAlter table (n, Update' s) = concat [ "UPDATE " , escapeDBName table , " SET " , escapeDBName n , "=" , s , " WHERE " , escapeDBName n , " IS NULL" ]
197
showAlter table (n, Update' s) = concat [ "UPDATE " , escapeDBName table , " SET " , escapeDBName n , "=" , s , " WHERE " , escapeDBName n , " IS NULL" ]
197
showAlter table (n, Update' s) = concat [ "UPDATE " , escapeDBName table , " SET " , escapeDBName n , "=" , s , " WHERE " , escapeDBName n , " IS NULL" ]
197
false
false
0
7
79
59
32
27
null
null
kmate/imperative-edsl
src/Language/Embedded/CExp.hs
bsd-3-clause
-- | Cast integer to 'Bool' i2b :: Integral a => CExp a -> CExp Bool i2b a = constFold $ sugarSym (T $ Cast (/=0)) a
116
i2b :: Integral a => CExp a -> CExp Bool i2b a = constFold $ sugarSym (T $ Cast (/=0)) a
88
i2b a = constFold $ sugarSym (T $ Cast (/=0)) a
47
true
true
0
10
26
59
28
31
null
null
ForestPhoenix/FPSurvey
Forms/TakeSurvey.hs
mit
freeInputForm FreeText = Just $ mopt textField "This is no used" Nothing
76
freeInputForm FreeText = Just $ mopt textField "This is no used" Nothing
76
freeInputForm FreeText = Just $ mopt textField "This is no used" Nothing
76
false
false
0
6
15
20
9
11
null
null
wouwouwou/2017_module_8
src/haskell/series2/series2.hs
apache-2.0
firstNPrimes :: Int -> [Int] firstNPrimes x = take x (sieve [2..])
68
firstNPrimes :: Int -> [Int] firstNPrimes x = take x (sieve [2..])
68
firstNPrimes x = take x (sieve [2..])
39
false
true
0
8
13
35
18
17
null
null
conal/TV
src/Examples.hs
bsd-3-clause
perWord f = onWords (map f)
27
perWord f = onWords (map f)
27
perWord f = onWords (map f)
27
false
false
1
7
5
21
8
13
null
null
et4te/zero
server/src/Zero/SessionToken/Handlers.hs
bsd-3-clause
sessionNew :: SessionId -> Connection -> AuthTokenState -> Handler SessionBundle sessionNew sid conn (AuthTokenState (Left err)) = throwError $ err403 { errBody = L8.pack err }
178
sessionNew :: SessionId -> Connection -> AuthTokenState -> Handler SessionBundle sessionNew sid conn (AuthTokenState (Left err)) = throwError $ err403 { errBody = L8.pack err }
178
sessionNew sid conn (AuthTokenState (Left err)) = throwError $ err403 { errBody = L8.pack err }
97
false
true
2
9
27
69
32
37
null
null
brendanhay/gogol
gogol-run/gen/Network/Google/Resource/Run/Namespaces/Configurations/List.hs
mpl-2.0
-- | Optional. Encoded string to continue paging. nclContinue :: Lens' NamespacesConfigurationsList (Maybe Text) nclContinue = lens _nclContinue (\ s a -> s{_nclContinue = a})
177
nclContinue :: Lens' NamespacesConfigurationsList (Maybe Text) nclContinue = lens _nclContinue (\ s a -> s{_nclContinue = a})
127
nclContinue = lens _nclContinue (\ s a -> s{_nclContinue = a})
64
true
true
0
9
26
48
25
23
null
null
karamellpelle/MEnv
source/OpenGL/IOS/Values.hs
bsd-2-clause
gl_STENCIL_BACK_PASS_DEPTH_PASS :: GLenum gl_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803
82
gl_STENCIL_BACK_PASS_DEPTH_PASS :: GLenum gl_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803
82
gl_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803
40
false
true
0
4
5
11
6
5
null
null
haskell/haddock
hypsrc-test/src/Constructors.hs
bsd-2-clause
bar, baz, quux :: Foo bar = Bar
31
bar, baz, quux :: Foo bar = Bar
31
bar = Bar
9
false
true
4
6
7
30
11
19
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/NeptuneDBInstance.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-neptune-dbinstance.html#cfn-neptune-dbinstance-tags ndbiTags :: Lens' NeptuneDBInstance (Maybe [Tag]) ndbiTags = lens _neptuneDBInstanceTags (\s a -> s { _neptuneDBInstanceTags = a })
263
ndbiTags :: Lens' NeptuneDBInstance (Maybe [Tag]) ndbiTags = lens _neptuneDBInstanceTags (\s a -> s { _neptuneDBInstanceTags = a })
131
ndbiTags = lens _neptuneDBInstanceTags (\s a -> s { _neptuneDBInstanceTags = a })
81
true
true
0
9
21
49
27
22
null
null
zakharvoit/discrete-math-labs
Season2/LinearDataStructures/Brackets/Brackets.hs
gpl-3.0
main :: IO() main = interactFiles (unlines . (map (showBool . check)) . lines)
78
main :: IO() main = interactFiles (unlines . (map (showBool . check)) . lines)
78
main = interactFiles (unlines . (map (showBool . check)) . lines)
65
false
true
0
12
13
48
23
25
null
null
brendanhay/gogol
gogol-securitycenter/gen/Network/Google/SecurityCenter/Types/Product.hs
mpl-2.0
-- | Creates a value of 'GroupResultProperties' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'grpAddtional' groupResultProperties :: HashMap Text JSONValue -- ^ 'grpAddtional' -> GroupResultProperties groupResultProperties p...
403
groupResultProperties :: HashMap Text JSONValue -- ^ 'grpAddtional' -> GroupResultProperties groupResultProperties pGrpAddtional_ = GroupResultProperties' {_grpAddtional = _Coerce # pGrpAddtional_}
207
groupResultProperties pGrpAddtional_ = GroupResultProperties' {_grpAddtional = _Coerce # pGrpAddtional_}
106
true
true
0
7
62
41
24
17
null
null
gitfoxi/vcd-haskell
app/avc-transpose.hs
agpl-3.0
dropComments :: [ByteString] -> [ByteString] dropComments = filter (not . B.isPrefixOf "#" ) . map ( B.dropWhile isSpace )
122
dropComments :: [ByteString] -> [ByteString] dropComments = filter (not . B.isPrefixOf "#" ) . map ( B.dropWhile isSpace )
122
dropComments = filter (not . B.isPrefixOf "#" ) . map ( B.dropWhile isSpace )
77
false
true
0
10
18
51
26
25
null
null
jwiegley/ghc-release
libraries/containers/Data/Sequence.hs
gpl-3.0
addDigits2 m1 (Two a b) c d (Two e f) m2 = appendTree2 m1 (node3 a b c) (node3 d e f) m2
92
addDigits2 m1 (Two a b) c d (Two e f) m2 = appendTree2 m1 (node3 a b c) (node3 d e f) m2
92
addDigits2 m1 (Two a b) c d (Two e f) m2 = appendTree2 m1 (node3 a b c) (node3 d e f) m2
92
false
false
0
7
26
64
31
33
null
null
ezyang/ghc
testsuite/tests/th/T11680.hs
bsd-3-clause
baz :: Bool baz = True
22
baz :: Bool baz = True
22
baz = True
10
false
true
0
6
5
18
7
11
null
null
nevrenato/Hets_Fork
HasCASL/hacapa.hs
gpl-2.0
toHStringParser :: Pretty a => (GlobalAnnos -> AParser () a) -> StringParser toHStringParser p ga = let newGa = addBuiltins ga in fmap (\ a -> showGlobalDoc newGa a "") $ p newGa
197
toHStringParser :: Pretty a => (GlobalAnnos -> AParser () a) -> StringParser toHStringParser p ga = let newGa = addBuiltins ga in fmap (\ a -> showGlobalDoc newGa a "") $ p newGa
197
toHStringParser p ga = let newGa = addBuiltins ga in fmap (\ a -> showGlobalDoc newGa a "") $ p newGa
105
false
true
0
11
51
80
38
42
null
null
rleshchinskiy/vector
Data/Vector/Generic.hs
bsd-3-clause
foldM_ m z = discard . Bundle.foldM m z . stream
48
foldM_ m z = discard . Bundle.foldM m z . stream
48
foldM_ m z = discard . Bundle.foldM m z . stream
48
false
false
0
8
10
26
12
14
null
null
phischu/fragnix
tests/packages/scotty/Data.Vector.Fusion.Bundle.Size.hs
bsd-3-clause
larger (Exact m) (Max n) | m >= n = Exact m | otherwise = Max n
97
larger (Exact m) (Max n) | m >= n = Exact m | otherwise = Max n
97
larger (Exact m) (Max n) | m >= n = Exact m | otherwise = Max n
97
false
false
0
8
50
48
21
27
null
null
rvion/lamdu
Lamdu/GUI/ExpressionEdit/HoleEdit/ResultGroups.hs
gpl-3.0
searchTermOfName :: Name m -> String searchTermOfName (Name _ NoCollision _ varName) = varName
94
searchTermOfName :: Name m -> String searchTermOfName (Name _ NoCollision _ varName) = varName
94
searchTermOfName (Name _ NoCollision _ varName) = varName
57
false
true
0
7
13
33
16
17
null
null
Cahu/krpc-hs
src/KRPCHS/SpaceCenter.hs
gpl-3.0
{- - The amount of thrust, in Newtons, that would be produced by the engine - when activated and fueled, with its throttle and throttle limiter set to 100%. -} getEngineMaxThrust :: KRPCHS.SpaceCenter.Engine -> RPCContext (Float) getEngineMaxThrust thisArg = do let r = makeRequest "SpaceCenter" "Engine_get_MaxTh...
399
getEngineMaxThrust :: KRPCHS.SpaceCenter.Engine -> RPCContext (Float) getEngineMaxThrust thisArg = do let r = makeRequest "SpaceCenter" "Engine_get_MaxThrust" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
236
getEngineMaxThrust thisArg = do let r = makeRequest "SpaceCenter" "Engine_get_MaxThrust" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
166
true
true
0
13
69
73
33
40
null
null
josefs/sbv
Data/SBV/Examples/Crypto/RC4.hs
bsd-3-clause
decrypt :: String -> [SWord8] -> String decrypt key ct = map cvt $ zipWith xor (keyScheduleString key) ct where cvt = chr . fromIntegral . fromJust . unliteral ----------------------------------------------------------------------------- -- * Verification -------------------------------------------------------------...
876
decrypt :: String -> [SWord8] -> String decrypt key ct = map cvt $ zipWith xor (keyScheduleString key) ct where cvt = chr . fromIntegral . fromJust . unliteral ----------------------------------------------------------------------------- -- * Verification -------------------------------------------------------------...
876
decrypt key ct = map cvt $ zipWith xor (keyScheduleString key) ct where cvt = chr . fromIntegral . fromJust . unliteral ----------------------------------------------------------------------------- -- * Verification ----------------------------------------------------------------------------- -- | Prove that round-...
836
false
true
0
8
130
78
44
34
null
null
ecaustin/haskhol-math
src/HaskHOL/Lib/WF/PQ.hs
bsd-2-clause
-- Lift Parse Context and define quasi-quoter pcWF :: ParseContext pcWF = $(liftParseContext ctxtWF)
100
pcWF :: ParseContext pcWF = $(liftParseContext ctxtWF)
54
pcWF = $(liftParseContext ctxtWF)
33
true
true
0
8
13
26
11
15
null
null
prb/perpubplat
src/Blog/BackEnd/HttpPoller.hs
bsd-3-clause
handle_exception hnd (E.AsyncException E.ThreadKilled) = do { L.errorM hnd $ "Kill received; exiting gracefully." ; return False }
141
handle_exception hnd (E.AsyncException E.ThreadKilled) = do { L.errorM hnd $ "Kill received; exiting gracefully." ; return False }
141
handle_exception hnd (E.AsyncException E.ThreadKilled) = do { L.errorM hnd $ "Kill received; exiting gracefully." ; return False }
141
false
false
0
9
28
42
20
22
null
null
holoed/Junior
src/Ast.hs
apache-2.0
ifThenElse :: Exp -> Exp -> Exp -> Exp ifThenElse p e1 e2 = In (IfThenElse p e1 e2)
83
ifThenElse :: Exp -> Exp -> Exp -> Exp ifThenElse p e1 e2 = In (IfThenElse p e1 e2)
83
ifThenElse p e1 e2 = In (IfThenElse p e1 e2)
44
false
true
0
7
18
43
21
22
null
null
telser/numerals
src-test/Text/Numeral/Language/GIL/TestData.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- Test data -------------------------------------------------------------------------------- {- Sources: http://www.languagesandnumbers.com/how-to-count-in-gilbertese/en/gil/ -} cardinals ∷ (Num i) ⇒ TestData i cardinals = [ ( "defa...
6,366
cardinals ∷ (Num i) ⇒ TestData i cardinals = [ ( "default" , defaultInflection , [ (0, "akea") , (1, "teuana") , (2, "uoua") , (3, "tenua") , (4, "aua") , (5, "nimaua") , (6, "onoua") , (7, "itua") , (8, "wanua") , (9, "ruaiwa") , (10, "tebwina") ...
6,102
cardinals = [ ( "default" , defaultInflection , [ (0, "akea") , (1, "teuana") , (2, "uoua") , (3, "tenua") , (4, "aua") , (5, "nimaua") , (6, "onoua") , (7, "itua") , (8, "wanua") , (9, "ruaiwa") , (10, "tebwina") , (11, "tebwi ma teuana") ...
6,069
true
true
0
9
1,987
1,674
1,111
563
null
null
gridaphobe/ghc
compiler/types/Type.hs
bsd-3-clause
mkPrimEqPredRole :: Role -> Type -> Type -> PredType mkPrimEqPredRole Nominal = mkPrimEqPred
101
mkPrimEqPredRole :: Role -> Type -> Type -> PredType mkPrimEqPredRole Nominal = mkPrimEqPred
101
mkPrimEqPredRole Nominal = mkPrimEqPred
48
false
true
0
7
21
26
13
13
null
null
portnov/xtt
XMonad/TimeTracker/Parser.hs
bsd-3-clause
integerLiteral :: Parser Int integerLiteral = fromIntegral <$> lexeme number
76
integerLiteral :: Parser Int integerLiteral = fromIntegral <$> lexeme number
76
integerLiteral = fromIntegral <$> lexeme number
47
false
true
2
6
9
27
11
16
null
null
mpickering/hlint
src/HSE/Util.hs
bsd-3-clause
isInfixApp InfixApp{} = True
28
isInfixApp InfixApp{} = True
28
isInfixApp InfixApp{} = True
28
false
false
0
5
3
14
6
8
null
null
MichielDerhaeg/stack
src/Stack/Sig/GPG.hs
bsd-3-clause
gpgVerify :: (MonadIO m, MonadThrow m) => Signature -> Path Abs File -> m Fingerprint gpgVerify (Signature signature) path = do (hIn,hOut,hErr,process) <- gpg ["--verify", "--with-fingerprint", "-", toFilePath path] (_in,out,err,code) <- liftIO ((,,,) <$> hPutStr...
1,046
gpgVerify :: (MonadIO m, MonadThrow m) => Signature -> Path Abs File -> m Fingerprint gpgVerify (Signature signature) path = do (hIn,hOut,hErr,process) <- gpg ["--verify", "--with-fingerprint", "-", toFilePath path] (_in,out,err,code) <- liftIO ((,,,) <$> hPutStr...
1,046
gpgVerify (Signature signature) path = do (hIn,hOut,hErr,process) <- gpg ["--verify", "--with-fingerprint", "-", toFilePath path] (_in,out,err,code) <- liftIO ((,,,) <$> hPutStrLn hIn (C.unpack signature) <*> hGetContents hOut <*> hGetContents h...
952
false
true
0
18
413
291
150
141
null
null
arirahikkala/yaml-with-class
src/Text/YamlPickle.hs
bsd-3-clause
parseScalar v t s = do return $ YamlScalar v t s
50
parseScalar v t s = do return $ YamlScalar v t s
50
parseScalar v t s = do return $ YamlScalar v t s
50
false
false
0
8
13
27
12
15
null
null
roman/Haskell-projectile
src/Projectile.hs
isc
-- | A list of files considered to mark the root of a project. This -- file must be in all sub-directories of a project. projectRecurringMarkFiles :: Vector FilePath projectRecurringMarkFiles = V.fromList [ ".svn" -- Svn VCS root dir , "CVS" -- Csv VCS root dir , "Makefile" ]
301
projectRecurringMarkFiles :: Vector FilePath projectRecurringMarkFiles = V.fromList [ ".svn" -- Svn VCS root dir , "CVS" -- Csv VCS root dir , "Makefile" ]
180
projectRecurringMarkFiles = V.fromList [ ".svn" -- Svn VCS root dir , "CVS" -- Csv VCS root dir , "Makefile" ]
135
true
true
0
5
73
32
19
13
null
null
silkapp/heist
src/Heist/Common.hs
bsd-3-clause
getDoc :: String -> IO (Either String DocumentFile) getDoc = getDocWith X.parseHTML
83
getDoc :: String -> IO (Either String DocumentFile) getDoc = getDocWith X.parseHTML
83
getDoc = getDocWith X.parseHTML
31
false
true
0
9
11
36
16
20
null
null
elginer/snm
Manual/Easy.hs
gpl-3.0
text_format :: (Manual -> String, String) text_format = (emit_text, "txt")
74
text_format :: (Manual -> String, String) text_format = (emit_text, "txt")
74
text_format = (emit_text, "txt")
32
false
true
0
8
9
34
17
17
null
null
maxigit/sql-fragment
src/Database/SQLFragment/Internal.hs
bsd-3-clause
setSection :: Section -> [String] -> SQLFragment e p -> SQLFragment e p setSection section values q = SQLFragment clauses' where clauses' = Map.update (toMaybe values) section (clauses q) toMaybe [] _ = Nothing toMaybe values _ = Just values
254
setSection :: Section -> [String] -> SQLFragment e p -> SQLFragment e p setSection section values q = SQLFragment clauses' where clauses' = Map.update (toMaybe values) section (clauses q) toMaybe [] _ = Nothing toMaybe values _ = Just values
253
setSection section values q = SQLFragment clauses' where clauses' = Map.update (toMaybe values) section (clauses q) toMaybe [] _ = Nothing toMaybe values _ = Just values
181
false
true
0
8
52
98
48
50
null
null
xmonad/xmonad-contrib
XMonad/Util/Stack.hs
bsd-3-clause
focusUpZ (Just (W.Stack f _ down)) = Just $ W.Stack (last down) (tail (reverse down) ++ [f]) []
95
focusUpZ (Just (W.Stack f _ down)) = Just $ W.Stack (last down) (tail (reverse down) ++ [f]) []
95
focusUpZ (Just (W.Stack f _ down)) = Just $ W.Stack (last down) (tail (reverse down) ++ [f]) []
95
false
false
0
11
17
67
33
34
null
null
mfine/hs-talks
src/Libv2.hs
bsd-3-clause
main' :: IO () main' = undefined
32
main' :: IO () main' = undefined
32
main' = undefined
17
false
true
0
7
6
22
9
13
null
null
motiz88/postgrest
src/PostgREST/Parsers.hs
mit
pJsonPath :: Parser [Text] pJsonPath = (++) <$> many pJsonPathStep <*> ( (:[]) <$> (string "->>" *> pFieldName) )
113
pJsonPath :: Parser [Text] pJsonPath = (++) <$> many pJsonPathStep <*> ( (:[]) <$> (string "->>" *> pFieldName) )
113
pJsonPath = (++) <$> many pJsonPathStep <*> ( (:[]) <$> (string "->>" *> pFieldName) )
86
false
true
0
10
18
53
29
24
null
null
ambiata/mafia
src/Mafia/Script.hs
bsd-3-clause
cabalText :: [Package] -> Text cabalText deps = T.unlines $ [ "name: script" , "version: 0.0.1" , "license: AllRightsReserved" , "author: script" , "maintainer: script" , "synopsis: script" , "category: Tools" , "cabal-version: >= 1.8" , "...
623
cabalText :: [Package] -> Text cabalText deps = T.unlines $ [ "name: script" , "version: 0.0.1" , "license: AllRightsReserved" , "author: script" , "maintainer: script" , "synopsis: script" , "category: Tools" , "cabal-version: >= 1.8" , "...
623
cabalText deps = T.unlines $ [ "name: script" , "version: 0.0.1" , "license: AllRightsReserved" , "author: script" , "maintainer: script" , "synopsis: script" , "category: Tools" , "cabal-version: >= 1.8" , "build-type: Simple" , "d...
592
false
true
3
7
228
108
65
43
null
null
iblumenfeld/saw-core
src/Verifier/SAW/Simulator/Prims.hs
bsd-3-clause
toBool x = error $ unwords ["Verifier.SAW.Simulator.toBool", show x]
68
toBool x = error $ unwords ["Verifier.SAW.Simulator.toBool", show x]
68
toBool x = error $ unwords ["Verifier.SAW.Simulator.toBool", show x]
68
false
false
0
8
8
25
12
13
null
null
pparkkin/Hagl
Hagl/Examples/Prisoner.hs
bsd-3-clause
-- | Defects randomly with a probability of 1/6. rr :: Player Dilemma rr = "Russian Roulette" ::: mixed [(5,C), (1,D)]
118
rr :: Player Dilemma rr = "Russian Roulette" ::: mixed [(5,C), (1,D)]
69
rr = "Russian Roulette" ::: mixed [(5,C), (1,D)]
48
true
true
0
8
20
40
23
17
null
null
supki/libstackexchange
src/Network/StackExchange/API.hs
mit
-- $linkedQuestions -- >>> checkLengthM $ askSE (linkedQuestions [394601] <> s <> k <> q) -- True -- | <https://api.stackexchange.com/docs/linked-questions> linkedQuestions ∷ [Int] → Request a "linkedQuestions" [SE Question] linkedQuestions (T.intercalate ";" . map (toLazyText . decimal) → is) = path ("questions/" <...
396
linkedQuestions ∷ [Int] → Request a "linkedQuestions" [SE Question] linkedQuestions (T.intercalate ";" . map (toLazyText . decimal) → is) = path ("questions/" <> is <> "/linked") <> parse (attoparsec items ".questions/{ids}/linked: ")
238
linkedQuestions (T.intercalate ";" . map (toLazyText . decimal) → is) = path ("questions/" <> is <> "/linked") <> parse (attoparsec items ".questions/{ids}/linked: ")
170
true
true
0
11
56
93
48
45
null
null
jabolopes/fmark
src/Parser.hs
bsd-3-clause
reconstructLine :: String -> [Text] reconstructLine str = loop str where loop [] = [] loop ('[':str) = case span (/= ']') str of (hd, []) -> [Plain hd] (hd, _:tl) -> Footnote hd:loop tl loop ('\'':str) = case span (/= '\'') str of ...
619
reconstructLine :: String -> [Text] reconstructLine str = loop str where loop [] = [] loop ('[':str) = case span (/= ']') str of (hd, []) -> [Plain hd] (hd, _:tl) -> Footnote hd:loop tl loop ('\'':str) = case span (/= '\'') str of ...
619
reconstructLine str = loop str where loop [] = [] loop ('[':str) = case span (/= ']') str of (hd, []) -> [Plain hd] (hd, _:tl) -> Footnote hd:loop tl loop ('\'':str) = case span (/= '\'') str of (hd, []) -> [Plain hd] ...
583
false
true
4
12
245
241
125
116
null
null
onponomarev/ganeti
test/hs/Test/Ganeti/Utils.hs
bsd-2-clause
-- | Test 'chompPrefix' returns Nothing when the prefix doesn't match. prop_chompPrefix_nothing :: Property prop_chompPrefix_nothing = forAll (choose (1, 20)) $ \len -> forAll (vectorOf len arbitrary) $ \pfx -> forAll (arbitrary `suchThat` (\s -> not (pfx `isPrefixOf` s) && s /= init pfx)) $ \str -> c...
350
prop_chompPrefix_nothing :: Property prop_chompPrefix_nothing = forAll (choose (1, 20)) $ \len -> forAll (vectorOf len arbitrary) $ \pfx -> forAll (arbitrary `suchThat` (\s -> not (pfx `isPrefixOf` s) && s /= init pfx)) $ \str -> chompPrefix pfx str ==? Nothing
279
prop_chompPrefix_nothing = forAll (choose (1, 20)) $ \len -> forAll (vectorOf len arbitrary) $ \pfx -> forAll (arbitrary `suchThat` (\s -> not (pfx `isPrefixOf` s) && s /= init pfx)) $ \str -> chompPrefix pfx str ==? Nothing
242
true
true
0
19
69
117
63
54
null
null
edsko/hackage-server
Distribution/Client/ParseApacheLogs.hs
bsd-3-clause
plainValue :: Parser SBS.ByteString plainValue = Att.takeWhile1 (\c -> c /= ' ' && c /= '\n')
93
plainValue :: Parser SBS.ByteString plainValue = Att.takeWhile1 (\c -> c /= ' ' && c /= '\n')
93
plainValue = Att.takeWhile1 (\c -> c /= ' ' && c /= '\n')
57
false
true
0
10
16
41
21
20
null
null
kojiromike/Idris-dev
src/IRTS/JavaScript/Codegen.hs
bsd-3-clause
cgConst (B8 x) = pure $ JsForeign (T.pack $ show x ++ " & 0xFF") []
67
cgConst (B8 x) = pure $ JsForeign (T.pack $ show x ++ " & 0xFF") []
67
cgConst (B8 x) = pure $ JsForeign (T.pack $ show x ++ " & 0xFF") []
67
false
false
0
10
15
42
20
22
null
null