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
lukaramu/ircparse
src/Parser.hs
mit
pManyNoSpace :: Parser String pManyNoSpace = many (satisfy (not . isSpace))
75
pManyNoSpace :: Parser String pManyNoSpace = many (satisfy (not . isSpace))
75
pManyNoSpace = many (satisfy (not . isSpace))
45
false
true
0
9
10
30
15
15
null
null
ryzhyk/cocoon
cocoon/Boogie/Boogie.hs
apache-2.0
mkLocConstructor :: Role -> Doc mkLocConstructor rl = pp "function" <+> pp "{:constructor}" <+> (apply (name rl) $ map mkField $ roleKeys rl) .: pp locTypeName <> semi
207
mkLocConstructor :: Role -> Doc mkLocConstructor rl = pp "function" <+> pp "{:constructor}" <+> (apply (name rl) $ map mkField $ roleKeys rl) .: pp locTypeName <> semi
207
mkLocConstructor rl = pp "function" <+> pp "{:constructor}" <+> (apply (name rl) $ map mkField $ roleKeys rl) .: pp locTypeName <> semi
175
false
true
0
13
67
69
32
37
null
null
bitemyapp/ghc
libraries/base/GHC/IO/Handle/Internals.hs
bsd-3-clause
withHandle_ fun h@(DuplexHandle _ m _) act = withHandle_' fun h m act
69
withHandle_ fun h@(DuplexHandle _ m _) act = withHandle_' fun h m act
69
withHandle_ fun h@(DuplexHandle _ m _) act = withHandle_' fun h m act
69
false
false
0
8
12
35
17
18
null
null
fcostantini/QuickFuzz
src/GLSL.hs
gpl-3.0
genCons :: Gen Expr genCons = return $ IntConstant Decimal 42
62
genCons :: Gen Expr genCons = return $ IntConstant Decimal 42
61
genCons = return $ IntConstant Decimal 42
41
false
true
2
6
11
29
12
17
null
null
CDSoft/pp
src/Preprocessor.hs
gpl-3.0
script :: String -> String -> String -> String -> String -> Macro script lang cmd header ext doc = Macro lang [] doc (\env args -> case args of [src] -> do (env', _) <- flushlitImpl env [] src' <- pp' env' (fromVal src) let (exe:params) = words cmd output ...
902
script :: String -> String -> String -> String -> String -> Macro script lang cmd header ext doc = Macro lang [] doc (\env args -> case args of [src] -> do (env', _) <- flushlitImpl env [] src' <- pp' env' (fromVal src) let (exe:params) = words cmd output ...
902
script lang cmd header ext doc = Macro lang [] doc (\env args -> case args of [src] -> do (env', _) <- flushlitImpl env [] src' <- pp' env' (fromVal src) let (exe:params) = words cmd output <- withSystemTempFile ("pp" <.> ext) $ \path handle -> do ...
836
false
true
1
22
398
310
146
164
null
null
ml9951/ghc
compiler/prelude/THNames.hs
bsd-3-clause
infixCName = libFun (fsLit "infixC") infixCIdKey
50
infixCName = libFun (fsLit "infixC") infixCIdKey
50
infixCName = libFun (fsLit "infixC") infixCIdKey
50
false
false
0
7
7
17
8
9
null
null
Palmik/data-store
tests/Test/Data/Store01.hs
bsd-3-clause
prop_insert2 = ids == map fst inserts where (i0 :. _, s0) = fromJust $ S.insert (vkey $ mval 0) (mval 0) S.empty inserts :: [(Int, DS)] inserts = foldl (\acc@((_, s') : _) v -> let (i :. _, s) = fromJust $ S.insert (vkey v) v s' in (i, s) : acc ...
558
prop_insert2 = ids == map fst inserts where (i0 :. _, s0) = fromJust $ S.insert (vkey $ mval 0) (mval 0) S.empty inserts :: [(Int, DS)] inserts = foldl (\acc@((_, s') : _) v -> let (i :. _, s) = fromJust $ S.insert (vkey v) v s' in (i, s) : acc ...
558
prop_insert2 = ids == map fst inserts where (i0 :. _, s0) = fromJust $ S.insert (vkey $ mval 0) (mval 0) S.empty inserts :: [(Int, DS)] inserts = foldl (\acc@((_, s') : _) v -> let (i :. _, s) = fromJust $ S.insert (vkey v) v s' in (i, s) : acc ...
558
false
false
0
17
221
259
140
119
null
null
jean-edouard/idl
rpcgen/Backend/Camel.hs
gpl-2.0
genClient_ :: Input -> IO Output genClient_ input = return [ (outputClientFile object, client_contents) ] where object = objectname input client_contents = substRules [ ("@STUBS@", stubs) ] $ lookupTemplate clientMLFileTemplate input stubs = concat . intersperse "\n" . concat . map (ca...
516
genClient_ :: Input -> IO Output genClient_ input = return [ (outputClientFile object, client_contents) ] where object = objectname input client_contents = substRules [ ("@STUBS@", stubs) ] $ lookupTemplate clientMLFileTemplate input stubs = concat . intersperse "\n" . concat . map (ca...
516
genClient_ input = return [ (outputClientFile object, client_contents) ] where object = objectname input client_contents = substRules [ ("@STUBS@", stubs) ] $ lookupTemplate clientMLFileTemplate input stubs = concat . intersperse "\n" . concat . map (callStubs object) $ interfaces ...
483
false
true
4
13
158
172
80
92
null
null
lih/Alpha
src/My/Control/Monad/State.hs
bsd-2-clause
saving v m = getting v >>= \x -> m ->> putting v x
50
saving v m = getting v >>= \x -> m ->> putting v x
50
saving v m = getting v >>= \x -> m ->> putting v x
50
false
false
1
8
13
36
15
21
null
null
gridaphobe/liquid-fixpoint
src/Language/Fixpoint/Types/Names.hs
bsd-3-clause
intSymbol :: (Show a) => Symbol -> a -> Symbol intSymbol x i = x `mappend` symbol ('#' : show i)
96
intSymbol :: (Show a) => Symbol -> a -> Symbol intSymbol x i = x `mappend` symbol ('#' : show i)
96
intSymbol x i = x `mappend` symbol ('#' : show i)
49
false
true
0
9
20
52
27
25
null
null
rgleichman/glance
test/VisualTranslateTests.hs
gpl-3.0
multiWayIfTests :: [String] multiWayIfTests = [ "y = if | x == 0 -> 1" , "y = if\n\ \ | x == 0 -> 1\n\ \ | otherwise -> 2" , "y = if\n\ \ | x == 0 -> if {| y > z -> 2; | pizza -> 3} \n\ \ | otherwise -> 2" ]
227
multiWayIfTests :: [String] multiWayIfTests = [ "y = if | x == 0 -> 1" , "y = if\n\ \ | x == 0 -> 1\n\ \ | otherwise -> 2" , "y = if\n\ \ | x == 0 -> if {| y > z -> 2; | pizza -> 3} \n\ \ | otherwise -> 2" ]
227
multiWayIfTests = [ "y = if | x == 0 -> 1" , "y = if\n\ \ | x == 0 -> 1\n\ \ | otherwise -> 2" , "y = if\n\ \ | x == 0 -> if {| y > z -> 2; | pizza -> 3} \n\ \ | otherwise -> 2" ]
199
false
true
0
5
78
23
14
9
null
null
music-suite/music-score
src/Music/Time/Juxtapose.hs
bsd-3-clause
-- | -- Like '<>', but scaling the second agument to the duration of the first. -- sustain :: (Semigroup a, HasPosition a, Transformable a) => a -> a -> a x `sustain` y = x <> y `during` x
188
sustain :: (Semigroup a, HasPosition a, Transformable a) => a -> a -> a x `sustain` y = x <> y `during` x
105
x `sustain` y = x <> y `during` x
33
true
true
0
7
39
65
35
30
null
null
andorp/bead
src/Bead/View/BeadContext.hs
bsd-3-clause
snapContextHandlerCata :: (c -> Handler b (SnapContext c) a) -> Handler b (SnapContext c) a snapContextHandlerCata k = do SnapContext ref <- get (liftIO $ readIORef ref) >>= k
179
snapContextHandlerCata :: (c -> Handler b (SnapContext c) a) -> Handler b (SnapContext c) a snapContextHandlerCata k = do SnapContext ref <- get (liftIO $ readIORef ref) >>= k
179
snapContextHandlerCata k = do SnapContext ref <- get (liftIO $ readIORef ref) >>= k
87
false
true
0
11
32
83
38
45
null
null
sgillespie/ghc
testsuite/mk/ghc-config.hs
bsd-3-clause
getGhcFieldOrDefault :: [(String,String)] -> String -> String -> String -> IO () getGhcFieldOrDefault fields mkvar key deflt = getGhcField fields mkvar key id on_fail where on_fail = putStrLn (mkvar ++ '=' : deflt)
222
getGhcFieldOrDefault :: [(String,String)] -> String -> String -> String -> IO () getGhcFieldOrDefault fields mkvar key deflt = getGhcField fields mkvar key id on_fail where on_fail = putStrLn (mkvar ++ '=' : deflt)
222
getGhcFieldOrDefault fields mkvar key deflt = getGhcField fields mkvar key id on_fail where on_fail = putStrLn (mkvar ++ '=' : deflt)
141
false
true
0
10
40
83
42
41
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
primOrdOps :: String -- The class involved -> TyCon -- The tycon involved -> Type -- The type -> (RdrName, RdrName, RdrName, RdrName, RdrName) -- (lt,le,eq,ge,gt) -- See Note [Deriving and unboxed types] primOrdOps str tycon ty = assoc_ty_id str tycon ordOpTbl ty
309
primOrdOps :: String -- The class involved -> TyCon -- The tycon involved -> Type -- The type -> (RdrName, RdrName, RdrName, RdrName, RdrName) primOrdOps str tycon ty = assoc_ty_id str tycon ordOpTbl ty
247
primOrdOps str tycon ty = assoc_ty_id str tycon ordOpTbl ty
59
true
true
0
8
88
59
34
25
null
null
seereason/ansi-wl-pprint
Text/PrettyPrint/ANSI/Leijen.hs
bsd-2-clause
plain (Italicize _ x) = plain x
31
plain (Italicize _ x) = plain x
31
plain (Italicize _ x) = plain x
31
false
false
0
7
6
20
9
11
null
null
Cahu/krpc-hs
src/KRPCHS/SpaceCenter.hs
gpl-3.0
{- - The part that this force is applied to. -} getForcePart :: KRPCHS.SpaceCenter.Force -> RPCContext (KRPCHS.SpaceCenter.Part) getForcePart thisArg = do let r = makeRequest "SpaceCenter" "Force_get_Part" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
285
getForcePart :: KRPCHS.SpaceCenter.Force -> RPCContext (KRPCHS.SpaceCenter.Part) getForcePart thisArg = do let r = makeRequest "SpaceCenter" "Force_get_Part" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
235
getForcePart thisArg = do let r = makeRequest "SpaceCenter" "Force_get_Part" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
154
true
true
0
13
49
76
35
41
null
null
grzegorzbalcerek/orgmode
Eval.hs
bsd-2-clause
---------------------------------------------------- evalProps :: Map.Map String String -> Map.Map String String evalProps props = Map.map (evalString props) props
164
evalProps :: Map.Map String String -> Map.Map String String evalProps props = Map.map (evalString props) props
110
evalProps props = Map.map (evalString props) props
50
true
true
0
8
17
51
23
28
null
null
djeik/fuckdown2
src/Asm.hs
mit
jne :: Val label addr -> AsmF label addr () jne v1 = liftF . Jne v1 $ ()
72
jne :: Val label addr -> AsmF label addr () jne v1 = liftF . Jne v1 $ ()
72
jne v1 = liftF . Jne v1 $ ()
28
false
true
0
7
18
49
22
27
null
null
GaloisInc/haskell-tor
src/Tor/DataFormat/TorCell.hs
bsd-3-clause
putTorCell (Destroy circ dreason) = putStandardCell $ do putWord32be circ putWord8 4 putDestroyReason dreason
145
putTorCell (Destroy circ dreason) = putStandardCell $ do putWord32be circ putWord8 4 putDestroyReason dreason
145
putTorCell (Destroy circ dreason) = putStandardCell $ do putWord32be circ putWord8 4 putDestroyReason dreason
145
false
false
2
8
49
42
16
26
null
null
ahodgen/qualys
Qualys/Internal/ParseWasScan.hs
bsd-3-clause
parseInsts :: (MonadIO m, MonadThrow m) => Name -> Name -> Consumer Event m (Maybe [WsPayload]) -> ConduitM Event o m (Maybe [WsInstance]) parseInsts lst ele fp = parseV3List lst (parseInst ele fp)
213
parseInsts :: (MonadIO m, MonadThrow m) => Name -> Name -> Consumer Event m (Maybe [WsPayload]) -> ConduitM Event o m (Maybe [WsInstance]) parseInsts lst ele fp = parseV3List lst (parseInst ele fp)
213
parseInsts lst ele fp = parseV3List lst (parseInst ele fp)
58
false
true
0
12
48
92
46
46
null
null
rahulmutt/ghcvm
compiler/Eta/Prelude/TysPrim.hs
bsd-3-clause
alphaTys :: [Type] alphaTys = mkTyVarTys alphaTyVars
52
alphaTys :: [Type] alphaTys = mkTyVarTys alphaTyVars
52
alphaTys = mkTyVarTys alphaTyVars
33
false
true
0
7
6
24
10
14
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Compute/Types/Product.hs
mpl-2.0
-- | Type of resource. ralKind :: Lens' RouterAggregatedList Text ralKind = lens _ralKind (\ s a -> s{_ralKind = a})
116
ralKind :: Lens' RouterAggregatedList Text ralKind = lens _ralKind (\ s a -> s{_ralKind = a})
93
ralKind = lens _ralKind (\ s a -> s{_ralKind = a})
50
true
true
0
9
20
47
23
24
null
null
Pochoir/Pochoir
src/PShow.hs
gpl-3.0
pShowShadowArrayInUse :: [PArray] -> String pShowShadowArrayInUse [] = ""
73
pShowShadowArrayInUse :: [PArray] -> String pShowShadowArrayInUse [] = ""
73
pShowShadowArrayInUse [] = ""
29
false
true
0
8
8
29
13
16
null
null
brendanhay/gogol
gen/src/Gen/TH.hs
mpl-2.0
options :: Options options = defaultOptions { constructorTagModifier = map toLower , fieldLabelModifier = \s -> let x:xs = dropWhile (not . isUpper) s in toLower x : xs }
190
options :: Options options = defaultOptions { constructorTagModifier = map toLower , fieldLabelModifier = \s -> let x:xs = dropWhile (not . isUpper) s in toLower x : xs }
190
options = defaultOptions { constructorTagModifier = map toLower , fieldLabelModifier = \s -> let x:xs = dropWhile (not . isUpper) s in toLower x : xs }
171
false
true
0
15
49
78
37
41
null
null
sseefried/shady-graphics
src/Shady/Image.hs
agpl-3.0
uscale2X = scale2X . \ a -> a :+ a
37
uscale2X = scale2X . \ a -> a :+ a
37
uscale2X = scale2X . \ a -> a :+ a
37
false
false
2
7
12
24
10
14
null
null
bitemyapp/ganeti
src/Ganeti/WConfd/Core.hs
bsd-2-clause
-- | Commit all reserved/released IP address to an IP pool. -- The IP addresses are taken from the network's IP pool and marked as -- reserved/free for instances. -- -- Note that the reservations are kept, they are supposed to be cleaned -- when a job finishes. commitTemporaryIps :: ClientId -> WConfdMonad () commitTem...
374
commitTemporaryIps :: ClientId -> WConfdMonad () commitTemporaryIps = modifyConfigDataErr_ . T.commitReservedIps
112
commitTemporaryIps = modifyConfigDataErr_ . T.commitReservedIps
63
true
true
0
7
58
32
19
13
null
null
text-utf8/text
Data/Text.hs
bsd-2-clause
-- ---------------------------------------------------------------------------- -- * Searching ------------------------------------------------------------------------------- -- ** Searching with a predicate -- | /O(n)/ The 'find' function takes a predicate and a 'Text', and -- returns the first element matching the ...
453
find :: (Char -> Bool) -> Text -> Maybe Char find p t = S.findBy p (stream t)
77
find p t = S.findBy p (stream t)
32
true
true
0
7
61
58
31
27
null
null
SWP-Ubau-SoSe2014-Haskell/SWPSoSe14
src/RailCompiler-command/Main.hs
mit
setImpAST opt = return opt { impAST = True, compile = True }
70
setImpAST opt = return opt { impAST = True, compile = True }
70
setImpAST opt = return opt { impAST = True, compile = True }
70
false
false
0
7
22
26
14
12
null
null
snoyberg/ghc
compiler/basicTypes/Var.hs
bsd-3-clause
mkCoVar :: Name -> Type -> CoVar -- Coercion variables have no IdInfo mkCoVar name ty = mk_id name ty (LocalId NotExported) coVarDetails vanillaIdInfo
150
mkCoVar :: Name -> Type -> CoVar mkCoVar name ty = mk_id name ty (LocalId NotExported) coVarDetails vanillaIdInfo
113
mkCoVar name ty = mk_id name ty (LocalId NotExported) coVarDetails vanillaIdInfo
80
true
true
0
7
23
42
21
21
null
null
shlevy/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
dataQual_RDR mod str = mkOrig mod (mkOccNameFS dataName str)
60
dataQual_RDR mod str = mkOrig mod (mkOccNameFS dataName str)
60
dataQual_RDR mod str = mkOrig mod (mkOccNameFS dataName str)
60
false
false
0
7
8
24
11
13
null
null
sboosali/derive-monoid
sources/Derive/List/Extra.hs
mit
printQ :: (Show a) => Q a -> Q Exp printQ q = go <$> q where go x = VarE 'putStrLn `AppE` (LitE . StringL . show) x -- getVariableName :: TyVarBndr -> Name -- getVariableName = \case -- PlainTV name -> name -- KindedTV name _ -> name
247
printQ :: (Show a) => Q a -> Q Exp printQ q = go <$> q where go x = VarE 'putStrLn `AppE` (LitE . StringL . show) x -- getVariableName :: TyVarBndr -> Name -- getVariableName = \case -- PlainTV name -> name -- KindedTV name _ -> name
247
printQ q = go <$> q where go x = VarE 'putStrLn `AppE` (LitE . StringL . show) x -- getVariableName :: TyVarBndr -> Name -- getVariableName = \case -- PlainTV name -> name -- KindedTV name _ -> name
212
false
true
0
9
63
76
40
36
null
null
ethercrow/ai-challenger
src/AIChallenger/WebApp.hs
mit
turnLimit :: Turn turnLimit = Turn 200
38
turnLimit :: Turn turnLimit = Turn 200
38
turnLimit = Turn 200
20
false
true
0
5
6
14
7
7
null
null
pepeiborra/narradar
src/Narradar/Types/Problem/Narrowing.hs
bsd-3-clause
narrowing = MkNarrowing rewriting
34
narrowing = MkNarrowing rewriting
34
narrowing = MkNarrowing rewriting
34
false
false
0
5
4
9
4
5
null
null
mumuki/mulang
src/Language/Mulang/Interpreter.hs
gpl-3.0
evalExpr (M.If cond thenBranch elseBranch) = do v <- evalCondition cond if v then evalExpr thenBranch else evalExpr elseBranch
130
evalExpr (M.If cond thenBranch elseBranch) = do v <- evalCondition cond if v then evalExpr thenBranch else evalExpr elseBranch
130
evalExpr (M.If cond thenBranch elseBranch) = do v <- evalCondition cond if v then evalExpr thenBranch else evalExpr elseBranch
130
false
false
0
8
22
49
22
27
null
null
expipiplus1/spir-v
Language/SpirV/OpCode.hs
mit
instructionSize OpCompositeExtract = Variadic 4
47
instructionSize OpCompositeExtract = Variadic 4
47
instructionSize OpCompositeExtract = Variadic 4
47
false
false
0
5
4
12
5
7
null
null
pgavin/secdh
lib/SECDH/Eval.hs
bsd-3-clause
-- Handle tail calls. secdhIter (SECDH [f,x] e [ApI False] ((s', e', c'):d) h) = return ( SECDH (f:x:s') e' (ApI False:c') d h , Rule 22 , Nothing )
168
secdhIter (SECDH [f,x] e [ApI False] ((s', e', c'):d) h) = return ( SECDH (f:x:s') e' (ApI False:c') d h , Rule 22 , Nothing )
146
secdhIter (SECDH [f,x] e [ApI False] ((s', e', c'):d) h) = return ( SECDH (f:x:s') e' (ApI False:c') d h , Rule 22 , Nothing )
146
true
false
0
9
49
100
53
47
null
null
kemskems/cis194-spring13
src/HW11/SExpr.hs
bsd-3-clause
ident :: Parser String ident = (:) <$> satisfy isAlpha <*> zeroOrMore (satisfy isAlphaNum)
90
ident :: Parser String ident = (:) <$> satisfy isAlpha <*> zeroOrMore (satisfy isAlphaNum)
90
ident = (:) <$> satisfy isAlpha <*> zeroOrMore (satisfy isAlphaNum)
67
false
true
0
8
13
36
18
18
null
null
Helkafen/cabal
cabal-install/Distribution/Client/Dependency/Modular/Linking.hs
bsd-3-clause
pickPOption qpn (POption i (Just pp')) deps = pickLink qpn i pp' deps
74
pickPOption qpn (POption i (Just pp')) deps = pickLink qpn i pp' deps
74
pickPOption qpn (POption i (Just pp')) deps = pickLink qpn i pp' deps
74
false
false
1
9
17
39
17
22
null
null
mariefarrell/Hets
Common/Id.hs
gpl-2.0
-- | create a generated identifier from a given one excluding characters mkGenName :: Id -> Id mkGenName i@(Id ts cs r) = case ts of t : s -> let st = tokStr t in case st of c : _ | isAlphaNum c -> Id (genToken st : s) cs r | isPlace t -> Id (mkSimpleId "gn" : ts) cs r | c == '\'' -> i _ -...
418
mkGenName :: Id -> Id mkGenName i@(Id ts cs r) = case ts of t : s -> let st = tokStr t in case st of c : _ | isAlphaNum c -> Id (genToken st : s) cs r | isPlace t -> Id (mkSimpleId "gn" : ts) cs r | c == '\'' -> i _ -> Id (mkSimpleId "gn_n" : ts) cs r _ -> i -- | tests whether a Token i...
345
mkGenName i@(Id ts cs r) = case ts of t : s -> let st = tokStr t in case st of c : _ | isAlphaNum c -> Id (genToken st : s) cs r | isPlace t -> Id (mkSimpleId "gn" : ts) cs r | c == '\'' -> i _ -> Id (mkSimpleId "gn_n" : ts) cs r _ -> i -- | tests whether a Token is already a generated ...
323
true
true
2
14
125
173
82
91
null
null
Cahu/krpc-hs
src/KRPCHS/Drawing.hs
gpl-3.0
{- - Material used to render the object. - Creates the material from a shader with the given name. -} getPolygonMaterial :: KRPCHS.Drawing.Polygon -> RPCContext (Data.Text.Text) getPolygonMaterial thisArg = do let r = makeRequest "Drawing" "Polygon_get_Material" [makeArgument 0 thisArg] res <- sendRequest r ...
343
getPolygonMaterial :: KRPCHS.Drawing.Polygon -> RPCContext (Data.Text.Text) getPolygonMaterial thisArg = do let r = makeRequest "Drawing" "Polygon_get_Material" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
238
getPolygonMaterial thisArg = do let r = makeRequest "Drawing" "Polygon_get_Material" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
162
true
true
0
13
59
76
35
41
null
null
sol/doctest
ghci-wrapper/test/Language/Haskell/GhciWrapperSpec.hs
mit
withInterpreter :: ((String -> IO String) -> IO a) -> IO a withInterpreter action = withInterpreterConfig defaultConfig $ action . Interpreter.eval
147
withInterpreter :: ((String -> IO String) -> IO a) -> IO a withInterpreter action = withInterpreterConfig defaultConfig $ action . Interpreter.eval
147
withInterpreter action = withInterpreterConfig defaultConfig $ action . Interpreter.eval
88
false
true
0
11
20
59
27
32
null
null
karamellpelle/grid
source/Game/Memory/MemoryData/Fancy.hs
gpl-3.0
unloadMemoryData :: MemoryData -> IO () unloadMemoryData memorydata = do unloadSoundMemory $ memorydataSoundMemory memorydata
129
unloadMemoryData :: MemoryData -> IO () unloadMemoryData memorydata = do unloadSoundMemory $ memorydataSoundMemory memorydata
129
unloadMemoryData memorydata = do unloadSoundMemory $ memorydataSoundMemory memorydata
89
false
true
0
8
17
33
15
18
null
null
sopvop/cabal
cabal-install/Distribution/Client/Init.hs
bsd-3-clause
-- We found some packages: group them by name. chooseDep flags (m, Just ps) = case pkgGroups of -- if there's only one group, i.e. multiple versions of a single package, -- we make it into a dependency, choosing the latest-ish version (see toDep). [grp] -> Just <$> toDep grp -- otherwise, we r...
1,688
chooseDep flags (m, Just ps) = case pkgGroups of -- if there's only one group, i.e. multiple versions of a single package, -- we make it into a dependency, choosing the latest-ish version (see toDep). [grp] -> Just <$> toDep grp -- otherwise, we refuse to choose between different packages and ...
1,641
chooseDep flags (m, Just ps) = case pkgGroups of -- if there's only one group, i.e. multiple versions of a single package, -- we make it into a dependency, choosing the latest-ish version (see toDep). [grp] -> Just <$> toDep grp -- otherwise, we refuse to choose between different packages and ...
1,641
true
false
4
19
474
336
166
170
null
null
portnov/yaledger
YaLedger/Main.hs
bsd-3-clause
apply (AddAttribute (n,v)) opts = let qry = query opts in opts {query = qry {qAttributes = M.insert n v (qAttributes qry)}}
158
apply (AddAttribute (n,v)) opts = let qry = query opts in opts {query = qry {qAttributes = M.insert n v (qAttributes qry)}}
158
apply (AddAttribute (n,v)) opts = let qry = query opts in opts {query = qry {qAttributes = M.insert n v (qAttributes qry)}}
158
false
false
1
14
56
73
35
38
null
null
monsanto/hie
hie.hs
gpl-3.0
tplInstanceOf :: InstanceData -> String tplInstanceOf NotInstance = "nil"
73
tplInstanceOf :: InstanceData -> String tplInstanceOf NotInstance = "nil"
73
tplInstanceOf NotInstance = "nil"
33
false
true
0
5
8
22
10
12
null
null
wxwxwwxxx/ghc
utils/hpc/HpcFlags.hs
bsd-3-clause
unionModuleOpt = noArg "union" "use the union of the module namespace (default is intersection)" $ \ f -> f { mergeModule = UNION }
167
unionModuleOpt = noArg "union" "use the union of the module namespace (default is intersection)" $ \ f -> f { mergeModule = UNION }
167
unionModuleOpt = noArg "union" "use the union of the module namespace (default is intersection)" $ \ f -> f { mergeModule = UNION }
167
false
false
0
8
59
28
15
13
null
null
TikhonJelvis/adaptive-radix-trees
src/Data/ART/Key.hs
bsd-3-clause
length :: Prefix -> Int length = Bytes.length
45
length :: Prefix -> Int length = Bytes.length
45
length = Bytes.length
21
false
true
0
5
7
17
9
8
null
null
PuZZleDucK/Hls
Hsort.hs
gpl-3.0
processArgs (x:xs) opts = case x of "--help" -> processArgs xs opts{displayHelp = True} "--version" -> processArgs xs opts{displayVersion = True} _ -> processArgs xs opts
176
processArgs (x:xs) opts = case x of "--help" -> processArgs xs opts{displayHelp = True} "--version" -> processArgs xs opts{displayVersion = True} _ -> processArgs xs opts
176
processArgs (x:xs) opts = case x of "--help" -> processArgs xs opts{displayHelp = True} "--version" -> processArgs xs opts{displayVersion = True} _ -> processArgs xs opts
176
false
false
3
7
31
73
36
37
null
null
brodyberg/LearnHaskell
HaskellProgramming.hsproj/Chapter09/Capitalize.hs
mit
-- The reason we can't use . in place of $ above is -- because filter (== 'a') str is fully applied. -- . requires two function parameters and if we've got -- the right hand parameter being fully applied it's -- not a function. This also shows why $ is not used -- in the pointfree case - because $ requires t...
532
fPointFree :: String -> Int fPointFree = length . filter (== 'a')
70
fPointFree = length . filter (== 'a')
42
true
true
0
7
122
35
23
12
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Abc.hs
gpl-2.0
parseRules ("ABC","Comment") = (currentContext >>= \x -> guard (x == ("ABC","Comment")) >> pDefault >>= withAttribute CommentTok)
131
parseRules ("ABC","Comment") = (currentContext >>= \x -> guard (x == ("ABC","Comment")) >> pDefault >>= withAttribute CommentTok)
131
parseRules ("ABC","Comment") = (currentContext >>= \x -> guard (x == ("ABC","Comment")) >> pDefault >>= withAttribute CommentTok)
131
false
false
0
13
17
54
29
25
null
null
hlian/basilica
Main.hs
mit
maybeParam :: Parsable a => Lazy.Text -> ActionM (Maybe a) maybeParam name = (Just <$> param name) `rescue` (return . const Nothing)
132
maybeParam :: Parsable a => Lazy.Text -> ActionM (Maybe a) maybeParam name = (Just <$> param name) `rescue` (return . const Nothing)
132
maybeParam name = (Just <$> param name) `rescue` (return . const Nothing)
73
false
true
0
9
21
62
31
31
null
null
lukexi/ghc-7.8-arm64
compiler/main/DynFlags.hs
bsd-3-clause
addGhciScript f d = d{ ghciScripts = f : ghciScripts d}
55
addGhciScript f d = d{ ghciScripts = f : ghciScripts d}
55
addGhciScript f d = d{ ghciScripts = f : ghciScripts d}
55
false
false
0
8
10
26
13
13
null
null
romanb/amazonka
amazonka-glacier/gen/Network/AWS/Glacier/ListParts.hs
mpl-2.0
-- | 'ListPartsResponse' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'lprArchiveDescription' @::@ 'Maybe' 'Text' -- -- * 'lprCreationDate' @::@ 'Maybe' 'Text' -- -- * 'lprMarker' @::@ 'Maybe' 'Text' -- -- * 'lprMultipartUploadId' @::@ 'Maybe' 'Text' -- -- * 'lprPartSizeInBytes' @:...
784
listPartsResponse :: ListPartsResponse listPartsResponse = ListPartsResponse { _lprMultipartUploadId = Nothing , _lprVaultARN = Nothing , _lprArchiveDescription = Nothing , _lprPartSizeInBytes = Nothing , _lprCreationDate = Nothing , _lprParts = mempty , _lpr...
354
listPartsResponse = ListPartsResponse { _lprMultipartUploadId = Nothing , _lprVaultARN = Nothing , _lprArchiveDescription = Nothing , _lprPartSizeInBytes = Nothing , _lprCreationDate = Nothing , _lprParts = mempty , _lprMarker = Nothing }
315
true
true
0
7
173
83
55
28
null
null
ghc/packages-filepath
System/FilePath/Internal.hs
bsd-3-clause
hasTrailingPathSeparator x = isPathSeparator (last x)
53
hasTrailingPathSeparator x = isPathSeparator (last x)
53
hasTrailingPathSeparator x = isPathSeparator (last x)
53
false
false
0
7
5
18
8
10
null
null
CloudI/CloudI
src/api/haskell/external/bytestring-0.10.10.0/Data/ByteString/Char8.hs
mit
-- | count returns the number of times its argument appears in the ByteString -- -- > count = length . elemIndices -- -- Also -- -- > count '\n' == length . lines -- -- But more efficiently than using length on the intermediate list. count :: Char -> ByteString -> Int count c = B.count (c2w c)
294
count :: Char -> ByteString -> Int count c = B.count (c2w c)
60
count c = B.count (c2w c)
25
true
true
0
7
58
42
25
17
null
null
Bodigrim/arithmoi
test-suite/Math/NumberTheory/CurvesTests.hs
mit
addRangeProperty :: Shrink2 (Positive Integer) -> Shrink2 (Positive Integer) -> Shrink2 Word -> Shrink2 Word -> Property addRangeProperty (Shrink2 (Positive s)) (Shrink2 (Positive n)) (Shrink2 k) (Shrink2 l) = newPoint s n ==>? \case SomePoint p -> isValid' p ==> isValid' kp ==> isValid' lp ==> isValid' klp ==> isVal...
441
addRangeProperty :: Shrink2 (Positive Integer) -> Shrink2 (Positive Integer) -> Shrink2 Word -> Shrink2 Word -> Property addRangeProperty (Shrink2 (Positive s)) (Shrink2 (Positive n)) (Shrink2 k) (Shrink2 l) = newPoint s n ==>? \case SomePoint p -> isValid' p ==> isValid' kp ==> isValid' lp ==> isValid' klp ==> isVal...
441
addRangeProperty (Shrink2 (Positive s)) (Shrink2 (Positive n)) (Shrink2 k) (Shrink2 l) = newPoint s n ==>? \case SomePoint p -> isValid' p ==> isValid' kp ==> isValid' lp ==> isValid' klp ==> isValid (add kp lp klp) where kp = multiply k p lp = multiply l p klp = multiply (k + l) p
320
false
true
3
9
109
195
94
101
null
null
siddhanathan/yi
yi-core/src/Yi/Main.hs
gpl-2.0
builtinOptions :: [OptDescr Opts] builtinOptions = [ Option [] ["self-check"] (NoArg SelfCheck) "Run self-checks" , Option ['f'] ["frontend"] (ReqArg Frontend "FRONTEND") frontendHelp , Option ['y'] ["config-file"] (ReqArg ConfigFile "PATH") "Specify a folder containing a configuratio...
1,158
builtinOptions :: [OptDescr Opts] builtinOptions = [ Option [] ["self-check"] (NoArg SelfCheck) "Run self-checks" , Option ['f'] ["frontend"] (ReqArg Frontend "FRONTEND") frontendHelp , Option ['y'] ["config-file"] (ReqArg ConfigFile "PATH") "Specify a folder containing a configuratio...
1,158
builtinOptions = [ Option [] ["self-check"] (NoArg SelfCheck) "Run self-checks" , Option ['f'] ["frontend"] (ReqArg Frontend "FRONTEND") frontendHelp , Option ['y'] ["config-file"] (ReqArg ConfigFile "PATH") "Specify a folder containing a configuration yi.hs file" , Option ['V'] ["...
1,124
false
true
2
9
318
308
157
151
null
null
brendanhay/gogol
gogol-genomics/gen/Network/Google/Genomics/Types/Product.hs
mpl-2.0
-- | The list of disks to create and attach to the VM. Specify either the -- \`volumes[]\` field or the \`disks[]\` field, but not both. vmDisks :: Lens' VirtualMachine [Disk] vmDisks = lens _vmDisks (\ s a -> s{_vmDisks = a}) . _Default . _Coerce
255
vmDisks :: Lens' VirtualMachine [Disk] vmDisks = lens _vmDisks (\ s a -> s{_vmDisks = a}) . _Default . _Coerce
118
vmDisks = lens _vmDisks (\ s a -> s{_vmDisks = a}) . _Default . _Coerce
79
true
true
0
11
53
54
29
25
null
null
aisamanra/activitystreams-aeson
Codec/ActivityStream/Schema.hs
bsd-3-clause
-- audio/video -- | A fragment of HTML markup that, when embedded within another HTML -- page, provides an interactive user-interface for viewing or listening -- to the video or audio stream. avEmbedCode :: Lens' Object (Maybe Text) avEmbedCode = makeAesonLensMb "embedCode" oRest
285
avEmbedCode :: Lens' Object (Maybe Text) avEmbedCode = makeAesonLensMb "embedCode" oRest
88
avEmbedCode = makeAesonLensMb "embedCode" oRest
47
true
true
0
7
47
31
17
14
null
null
bernstein/breakout
src/Main.hs
bsd-3-clause
wallLeftPos = p2 (-1.0,0.5)
27
wallLeftPos = p2 (-1.0,0.5)
27
wallLeftPos = p2 (-1.0,0.5)
27
false
false
0
7
3
17
9
8
null
null
vTurbine/ghc
compiler/stgSyn/StgSyn.hs
bsd-3-clause
stgArgHasCafRefs :: GenStgArg Id -> Bool stgArgHasCafRefs (StgVarArg id) = stgIdHasCafRefs id
95
stgArgHasCafRefs :: GenStgArg Id -> Bool stgArgHasCafRefs (StgVarArg id) = stgIdHasCafRefs id
95
stgArgHasCafRefs (StgVarArg id) = stgIdHasCafRefs id
54
false
true
0
7
13
30
14
16
null
null
mitchellwrosen/dohaskell
src/Model/Resource/Internal.hs
bsd-3-clause
shortReadResourceTypePlural "videos" = Just VideoLecture
71
shortReadResourceTypePlural "videos" = Just VideoLecture
71
shortReadResourceTypePlural "videos" = Just VideoLecture
71
false
false
0
5
19
12
5
7
null
null
solidsnack/bytestring-nums
SPOJMem.hs
bsd-3-clause
condition k num = num `mod` k == 0
44
condition k num = num `mod` k == 0
44
condition k num = num `mod` k == 0
44
false
false
0
6
18
21
11
10
null
null
JenniferWang/incremental-haskell
src/Kind.hs
mit
maxNumChildren (Map _ _) = 1
36
maxNumChildren (Map _ _) = 1
36
maxNumChildren (Map _ _) = 1
36
false
false
0
7
13
17
8
9
null
null
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Container/Str.hs
mit
-- | Loads given Urho3D::String into Haskell Stirng WITHOUT deletion of source Urho string loadConstUrhoString :: MonadIO m => Ptr UrhoString -> m String loadConstUrhoString ptr = liftIO $ peekCString =<< [C.exp| const char* { $(String* ptr)->CString() } |]
257
loadConstUrhoString :: MonadIO m => Ptr UrhoString -> m String loadConstUrhoString ptr = liftIO $ peekCString =<< [C.exp| const char* { $(String* ptr)->CString() } |]
166
loadConstUrhoString ptr = liftIO $ peekCString =<< [C.exp| const char* { $(String* ptr)->CString() } |]
103
true
true
2
8
38
51
25
26
null
null
alexbaluta/courseography
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/Combinators.hs
gpl-3.0
-- | Recursive application of filters: a fold-like operator. Defined -- as @f `o` chip (foldXml f)@. foldXml :: CFilter i -> CFilter i foldXml f = f `o` chip (foldXml f)
172
foldXml :: CFilter i -> CFilter i foldXml f = f `o` chip (foldXml f)
68
foldXml f = f `o` chip (foldXml f)
34
true
true
0
8
34
41
21
20
null
null
tolysz/postgresql-simple
src/Database/PostgreSQL/Simple/TypeInfo/Static.hs
bsd-3-clause
array_path :: TypeInfo array_path = Array { typoid = Oid 1019, typcategory = 'A', typdelim = ',', typname = "_path", typelem = path }
172
array_path :: TypeInfo array_path = Array { typoid = Oid 1019, typcategory = 'A', typdelim = ',', typname = "_path", typelem = path }
172
array_path = Array { typoid = Oid 1019, typcategory = 'A', typdelim = ',', typname = "_path", typelem = path }
149
false
true
0
7
62
46
28
18
null
null
sdiehl/ghc
testsuite/tests/profiling/should_run/T3001-2.hs
bsd-3-clause
ell :: Builder -> Put tell b = Put $ PairS () b
48
tell :: Builder -> Put tell b = Put $ PairS () b
48
tell b = Put $ PairS () b
25
false
true
0
7
13
32
15
17
null
null
awalterschulze/xhaskell-regex-deriv
Text/Regex/Deriv/ByteString/Posix.hs
bsd-3-clause
regexec :: Regex -- ^ Compiled regular expression -> S.ByteString -- ^ ByteString to match against -> Either String (Maybe (S.ByteString, S.ByteString, S.ByteString, [S.ByteString])) regexec r bs = case execPatMatch r bs of Nothing -> Right Nothing Just env -> let pre = case lookup preBin...
962
regexec :: Regex -- ^ Compiled regular expression -> S.ByteString -- ^ ByteString to match against -> Either String (Maybe (S.ByteString, S.ByteString, S.ByteString, [S.ByteString])) regexec r bs = case execPatMatch r bs of Nothing -> Right Nothing Just env -> let pre = case lookup preBin...
962
regexec r bs = case execPatMatch r bs of Nothing -> Right Nothing Just env -> let pre = case lookup preBinder env of { Just e -> rg_collect_many bs e ; Nothing -> S.empty } post = case lookup subBinder env of { Just e -> rg_collect_many bs e ; Nothing -> S.empty } full_len = S.length bs ...
760
false
true
0
19
261
332
174
158
null
null
RobinKrom/fasths
src/Codec/Fast/Encoder.hs
bsd-3-clause
bytevecF2Cop (FieldInstrContent fname (Just Optional) (Just(Tail oc))) _ = cp where cp (Just bv) = let baseValue (Assigned p) = assertType p baseValue (Undefined) = h oc where h (OpContext _ _ (Just iv)) = ivToPrimitive iv ...
2,904
bytevecF2Cop (FieldInstrContent fname (Just Optional) (Just(Tail oc))) _ = cp where cp (Just bv) = let baseValue (Assigned p) = assertType p baseValue (Undefined) = h oc where h (OpContext _ _ (Just iv)) = ivToPrimitive iv ...
2,904
bytevecF2Cop (FieldInstrContent fname (Just Optional) (Just(Tail oc))) _ = cp where cp (Just bv) = let baseValue (Assigned p) = assertType p baseValue (Undefined) = h oc where h (OpContext _ _ (Just iv)) = ivToPrimitive iv ...
2,904
false
false
1
21
1,519
804
380
424
null
null
tjakway/blackjack-simulator
test/Jakway/Blackjack/Tests/DatabaseTests/MultiTableTests.hs
mit
alphabeticTableNames = map DB.getTableNames ["abc", "def", "ghi", "jkl", "mno", "pqr", "stu", "wxy", "z"]
105
alphabeticTableNames = map DB.getTableNames ["abc", "def", "ghi", "jkl", "mno", "pqr", "stu", "wxy", "z"]
105
alphabeticTableNames = map DB.getTableNames ["abc", "def", "ghi", "jkl", "mno", "pqr", "stu", "wxy", "z"]
105
false
false
1
6
12
44
24
20
null
null
GaloisInc/galua
galua-dbg/src/Galua/Debugger.hs
mit
runDebugger :: Debugger -> IO () runDebugger dbg = do cmd <- waitForCommand (dbgCommand dbg) mbMode <- handleCommand dbg True cmd case mbMode of Nothing -> return () Just Stop -> return () -- already stopped Just mode -> do state <- readIORef (dbgStateVM dbg) c...
754
runDebugger :: Debugger -> IO () runDebugger dbg = do cmd <- waitForCommand (dbgCommand dbg) mbMode <- handleCommand dbg True cmd case mbMode of Nothing -> return () Just Stop -> return () -- already stopped Just mode -> do state <- readIORef (dbgStateVM dbg) c...
754
runDebugger dbg = do cmd <- waitForCommand (dbgCommand dbg) mbMode <- handleCommand dbg True cmd case mbMode of Nothing -> return () Just Stop -> return () -- already stopped Just mode -> do state <- readIORef (dbgStateVM dbg) case state of Runnin...
721
false
true
0
20
291
251
112
139
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Texinfo.hs
gpl-2.0
-- | Highlight source code using this syntax definition. highlight :: String -> [SourceLine] highlight input = evalState (mapM parseSourceLine $ lines input) startingState
171
highlight :: String -> [SourceLine] highlight input = evalState (mapM parseSourceLine $ lines input) startingState
114
highlight input = evalState (mapM parseSourceLine $ lines input) startingState
78
true
true
0
8
23
40
20
20
null
null
ThorntheLetter/wavestimation
haskell/Framework.hs
mit
evalAlgs eva correct results = [[zipWith f correct result | f <- eva] | result <- results]
90
evalAlgs eva correct results = [[zipWith f correct result | f <- eva] | result <- results]
90
evalAlgs eva correct results = [[zipWith f correct result | f <- eva] | result <- results]
90
false
false
0
8
16
42
21
21
null
null
naerbnic/capsir
src/Capsir/Runtime.hs
bsd-3-clause
lookupEnv name (FrameEnv envMap child) = case Map.lookup name envMap of Just val -> Just val Nothing -> lookupEnv name child -- | Evaluates a literal into a runtime constant.
191
lookupEnv name (FrameEnv envMap child) = case Map.lookup name envMap of Just val -> Just val Nothing -> lookupEnv name child -- | Evaluates a literal into a runtime constant.
191
lookupEnv name (FrameEnv envMap child) = case Map.lookup name envMap of Just val -> Just val Nothing -> lookupEnv name child -- | Evaluates a literal into a runtime constant.
191
false
false
0
8
46
54
25
29
null
null
arianvp/binary-serialise-cbor
Data/Binary/Serialise/CBOR/Term.hs
bsd-3-clause
encodeTerm (TListI ts) = encodeListLenIndef <> mconcat [ encodeTerm t | t <- ts ] <> encodeBreak
155
encodeTerm (TListI ts) = encodeListLenIndef <> mconcat [ encodeTerm t | t <- ts ] <> encodeBreak
155
encodeTerm (TListI ts) = encodeListLenIndef <> mconcat [ encodeTerm t | t <- ts ] <> encodeBreak
155
false
false
0
10
75
40
19
21
null
null
sixohsix/tak
src/Tak/Editor/Undo.hs
mit
pushUndo :: SimpleEditor -> SimpleEditor pushUndo st = st { undoBuffers = (buffer st, cursorPos st):(undoBuffers st), lastSavePtr = (lastSavePtr st) + 1 }
163
pushUndo :: SimpleEditor -> SimpleEditor pushUndo st = st { undoBuffers = (buffer st, cursorPos st):(undoBuffers st), lastSavePtr = (lastSavePtr st) + 1 }
163
pushUndo st = st { undoBuffers = (buffer st, cursorPos st):(undoBuffers st), lastSavePtr = (lastSavePtr st) + 1 }
122
false
true
0
10
32
68
35
33
null
null
cobbpg/dow
src/Main.hs
bsd-3-clause
readKeys sink = do let pr = (==Press) kn1 <- getKey UP ks1 <- getKey DOWN kw1 <- getKey LEFT ke1 <- getKey RIGHT kt1a <- getKey RCTRL kt1b <- getKey ENTER kn2 <- getKey 'W' ks2 <- getKey 'S' kw2 <- getKey 'A' ke2 <- getKey 'D' kt2 <- getKey LCTRL sink ((pr kn1, pr ks1, pr kw1, pr ke1, pr kt1a ...
382
readKeys sink = do let pr = (==Press) kn1 <- getKey UP ks1 <- getKey DOWN kw1 <- getKey LEFT ke1 <- getKey RIGHT kt1a <- getKey RCTRL kt1b <- getKey ENTER kn2 <- getKey 'W' ks2 <- getKey 'S' kw2 <- getKey 'A' ke2 <- getKey 'D' kt2 <- getKey LCTRL sink ((pr kn1, pr ks1, pr kw1, pr ke1, pr kt1a ...
382
readKeys sink = do let pr = (==Press) kn1 <- getKey UP ks1 <- getKey DOWN kw1 <- getKey LEFT ke1 <- getKey RIGHT kt1a <- getKey RCTRL kt1b <- getKey ENTER kn2 <- getKey 'W' ks2 <- getKey 'S' kw2 <- getKey 'A' ke2 <- getKey 'D' kt2 <- getKey LCTRL sink ((pr kn1, pr ks1, pr kw1, pr ke1, pr kt1a ...
382
false
false
0
11
109
211
94
117
null
null
lpsmith/blaze-builder-compat
src/Blaze/ByteString/Builder/Int.hs
bsd-3-clause
fromInt32sle :: [Int32] -> Builder fromInt32sle = P.primMapListFixed P.int32LE
80
fromInt32sle :: [Int32] -> Builder fromInt32sle = P.primMapListFixed P.int32LE
80
fromInt32sle = P.primMapListFixed P.int32LE
43
false
true
0
6
10
25
13
12
null
null
Enzo-Liu/cis194
src/AParser2013.hs
bsd-3-clause
abParser_ :: Parser () abParser_ = (\_ _->()) <$> char 'a' <*> char 'b'
71
abParser_ :: Parser () abParser_ = (\_ _->()) <$> char 'a' <*> char 'b'
71
abParser_ = (\_ _->()) <$> char 'a' <*> char 'b'
48
false
true
0
9
13
42
21
21
null
null
GU-CLASP/TypedFlow
TypedFlow/TF.hs
lgpl-3.0
-- | Random tensor with variance scaling according to deeplearning lore. varianceScaling :: forall inDim outDim t. KnownNat inDim => (KnownNat outDim, KnownFloat t) => Float -> VarianceScaleMode -> Distrib -> Gen (Tensor '[inDim,outDim] t) varianceScaling factor mode distr = noise $ case distr of ...
797
varianceScaling :: forall inDim outDim t. KnownNat inDim => (KnownNat outDim, KnownFloat t) => Float -> VarianceScaleMode -> Distrib -> Gen (Tensor '[inDim,outDim] t) varianceScaling factor mode distr = noise $ case distr of UniformDistr -> UniformD (-limit) limit ...
724
varianceScaling factor mode distr = noise $ case distr of UniformDistr -> UniformD (-limit) limit NormalDistr -> TruncatedNormalD limit where fan_in = fromIntegral (natVal (Proxy @inDim)) fan_out = fromIntegral (natVal (Proxy @outDim)) ...
554
true
true
0
15
248
243
125
118
null
null
jsavatgy/hatupist
code/aboutDialog.hs
gpl-2.0
getLines gsRef = do gs <- readIORef gsRef originalText <- tryReadFile (textfile (s gs)) let textLinesss = colLines (collectWords (words (originalText)) (lineLen (s gs))) textLiness = map (++" ") textLinesss writeIORef gsRef gs { textLines = textLiness } renewLabels gs...
323
getLines gsRef = do gs <- readIORef gsRef originalText <- tryReadFile (textfile (s gs)) let textLinesss = colLines (collectWords (words (originalText)) (lineLen (s gs))) textLiness = map (++" ") textLinesss writeIORef gsRef gs { textLines = textLiness } renewLabels gs...
323
getLines gsRef = do gs <- readIORef gsRef originalText <- tryReadFile (textfile (s gs)) let textLinesss = colLines (collectWords (words (originalText)) (lineLen (s gs))) textLiness = map (++" ") textLinesss writeIORef gsRef gs { textLines = textLiness } renewLabels gs...
323
false
false
1
17
91
122
56
66
null
null
lally/xmonad-reenberg
XMonad/Log.hs
bsd-3-clause
-- Information noticeX = logX NOTICE
39
noticeX = logX NOTICE
24
noticeX = logX NOTICE
24
true
false
0
5
8
10
5
5
null
null
mdsteele/pylos
src/System/MacOSX/Bundle.hs
gpl-3.0
makeCfForeignPtr :: Ptr a -> IO (ForeignPtr a) makeCfForeignPtr = newForeignPtr cfRelease
89
makeCfForeignPtr :: Ptr a -> IO (ForeignPtr a) makeCfForeignPtr = newForeignPtr cfRelease
89
makeCfForeignPtr = newForeignPtr cfRelease
42
false
true
0
8
11
30
14
16
null
null
conal/ghc-mod
CabalDev.hs
bsd-3-clause
findConf :: FilePath -> IO (Maybe FilePath) findConf path = do f <- find (=~ "packages.*\\.conf") <$> getDirectoryContents path return $ ((path </>) <$> f)
159
findConf :: FilePath -> IO (Maybe FilePath) findConf path = do f <- find (=~ "packages.*\\.conf") <$> getDirectoryContents path return $ ((path </>) <$> f)
159
findConf path = do f <- find (=~ "packages.*\\.conf") <$> getDirectoryContents path return $ ((path </>) <$> f)
115
false
true
0
11
28
71
34
37
null
null
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_REBOL_TIME :: Int wxSTC_REBOL_TIME = 19
45
wxSTC_REBOL_TIME :: Int wxSTC_REBOL_TIME = 19
45
wxSTC_REBOL_TIME = 19
21
false
true
0
6
5
18
7
11
null
null
ndmitchell/hlint
src/Hint/Extensions.hs
bsd-3-clause
used EmptyCase = hasS f where f :: HsExpr GhcPs -> Bool f (HsCase _ _ (MG _ (L _ []) _)) = True f (HsLamCase _ (MG _ (L _ []) _)) = True f _ = False
166
used EmptyCase = hasS f where f :: HsExpr GhcPs -> Bool f (HsCase _ _ (MG _ (L _ []) _)) = True f (HsLamCase _ (MG _ (L _ []) _)) = True f _ = False
166
used EmptyCase = hasS f where f :: HsExpr GhcPs -> Bool f (HsCase _ _ (MG _ (L _ []) _)) = True f (HsLamCase _ (MG _ (L _ []) _)) = True f _ = False
166
false
false
1
14
56
120
54
66
null
null
zmthy/snaplet-rest
src/Snap/Snaplet/Rest/Resource/Media.hs
mit
------------------------------------------------------------------------------ -- | Set the resource parser. toResource :: MediaSetter res m diff int Maybe (int -> m (Maybe res)) toResource f m = f (_toResource m) <&> \g -> m { _toResource = Just g }
250
toResource :: MediaSetter res m diff int Maybe (int -> m (Maybe res)) toResource f m = f (_toResource m) <&> \g -> m { _toResource = Just g }
141
toResource f m = f (_toResource m) <&> \g -> m { _toResource = Just g }
71
true
true
0
10
36
76
39
37
null
null
beni55/haste-compiler
libraries/ghc-7.8/base/Data/Data.hs
bsd-3-clause
tuple5DataType :: DataType tuple5DataType = mkDataType "Prelude.(,,,,)" [tuple5Constr]
86
tuple5DataType :: DataType tuple5DataType = mkDataType "Prelude.(,,,,)" [tuple5Constr]
86
tuple5DataType = mkDataType "Prelude.(,,,,)" [tuple5Constr]
59
false
true
0
6
7
25
11
14
null
null
copland/cmdargs
System/Console/CmdArgs/Implicit/Local.hs
bsd-3-clause
modeAnn a x = err "mode" $ show a
33
modeAnn a x = err "mode" $ show a
33
modeAnn a x = err "mode" $ show a
33
false
false
0
6
8
21
9
12
null
null
soupi/haskell-sdl2gl
src/MySDL/MySDL.hs
mit
gameloop :: (a -> [SDL.Event] -> IO a) -> a -> IO () gameloop update world = do tick <- SDL.ticks events <- MySDL.collectEvents new_world <- update world events -- MySDL.updateWindow (getWindowFromWorld new_world) new_tick <- SDL.ticks MySDL.regulateTicks 17 tick new_tick unless (MySDL.checkEvent SDL.Q...
385
gameloop :: (a -> [SDL.Event] -> IO a) -> a -> IO () gameloop update world = do tick <- SDL.ticks events <- MySDL.collectEvents new_world <- update world events -- MySDL.updateWindow (getWindowFromWorld new_world) new_tick <- SDL.ticks MySDL.regulateTicks 17 tick new_tick unless (MySDL.checkEvent SDL.Q...
385
gameloop update world = do tick <- SDL.ticks events <- MySDL.collectEvents new_world <- update world events -- MySDL.updateWindow (getWindowFromWorld new_world) new_tick <- SDL.ticks MySDL.regulateTicks 17 tick new_tick unless (MySDL.checkEvent SDL.QuitEvent events) $ gameloop update new_world -- pain...
332
false
true
0
11
68
128
60
68
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/fix-free/free/src/FM_GG_2012_07_purify_code.hs
unlicense
echo :: Teletype () echo = do _ <- getLine' s1 <- getLine' putStrLn' s1 s2 <- getLine' putStrLn' s2 _ <- getLine' putStrLn' s2 putStrLn' "before exit" exitSuccess' putStrLn' "after exit"
226
echo :: Teletype () echo = do _ <- getLine' s1 <- getLine' putStrLn' s1 s2 <- getLine' putStrLn' s2 _ <- getLine' putStrLn' s2 putStrLn' "before exit" exitSuccess' putStrLn' "after exit"
226
echo = do _ <- getLine' s1 <- getLine' putStrLn' s1 s2 <- getLine' putStrLn' s2 _ <- getLine' putStrLn' s2 putStrLn' "before exit" exitSuccess' putStrLn' "after exit"
206
false
true
0
8
71
83
32
51
null
null
ucla-pls/wiretap-tools
src/Wiretap/Analysis/MustHappenBefore.hs
gpl-3.0
mustHappenBeforeEvents :: PartialHistory h => Map.Map Thread MHBEvents -> h -> Map.Map Thread MHBEvents mustHappenBeforeEvents m h = simulate step m h where step u@(Unique _ e) = case operation e of Join t -> update mhbJoins t Fork t -> update mhbForks t Begin -> update mh...
486
mustHappenBeforeEvents :: PartialHistory h => Map.Map Thread MHBEvents -> h -> Map.Map Thread MHBEvents mustHappenBeforeEvents m h = simulate step m h where step u@(Unique _ e) = case operation e of Join t -> update mhbJoins t Fork t -> update mhbForks t Begin -> update mh...
486
mustHappenBeforeEvents m h = simulate step m h where step u@(Unique _ e) = case operation e of Join t -> update mhbJoins t Fork t -> update mhbForks t Begin -> update mhbBegins $ thread e End -> update mhbEnds $ thread e _ -> id where update l...
374
false
true
0
10
158
194
91
103
null
null
joelmccracken/git-stuff
src/Handler/Git.hs
bsd-3-clause
printMenuCustomCommands :: [C.GitHandlerCommandSpec] -> IO () printMenuCustomCommands ghcSpecs = do printStrings $ (T.unpack . C.gitCmdName) <$> ghcSpecs
155
printMenuCustomCommands :: [C.GitHandlerCommandSpec] -> IO () printMenuCustomCommands ghcSpecs = do printStrings $ (T.unpack . C.gitCmdName) <$> ghcSpecs
155
printMenuCustomCommands ghcSpecs = do printStrings $ (T.unpack . C.gitCmdName) <$> ghcSpecs
93
false
true
0
11
18
54
26
28
null
null
crabhi/bug-killing-spree
src/main.hs
mit
searchUrl = Data.Text.concat [jiraUrl, "/search"]
49
searchUrl = Data.Text.concat [jiraUrl, "/search"]
49
searchUrl = Data.Text.concat [jiraUrl, "/search"]
49
false
false
0
6
4
18
10
8
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/Enums.hs
mit
js_RTCPriorityTypeLow = "low"
29
js_RTCPriorityTypeLow = "low"
29
js_RTCPriorityTypeLow = "low"
29
false
false
0
4
2
6
3
3
null
null
chris-wood/ccnx-pktgen
src/CCNxPacketGenerator.hs
mit
produceContentPackets :: [[String]] -> [[Word8]] -> [Maybe ByteString] produceContentPackets names payloads = fmap preparePacket (produceContents names payloads)
161
produceContentPackets :: [[String]] -> [[Word8]] -> [Maybe ByteString] produceContentPackets names payloads = fmap preparePacket (produceContents names payloads)
161
produceContentPackets names payloads = fmap preparePacket (produceContents names payloads)
90
false
true
0
8
16
55
29
26
null
null
Chouffe/hlisp
src/Evaluator.hs
bsd-3-clause
applyProc :: [Expr] -> IOThrowsError Expr applyProc [func, List args] = apply func args
87
applyProc :: [Expr] -> IOThrowsError Expr applyProc [func, List args] = apply func args
87
applyProc [func, List args] = apply func args
45
false
true
0
7
13
38
19
19
null
null
slpopejoy/fadno-xml
src/Fadno/MusicXml/MusicXml20.hs
bsd-2-clause
parseHammerOnPullOff :: P.XParse HammerOnPullOff parseHammerOnPullOff = HammerOnPullOff <$> (P.xtext >>= return) <*> (P.xattr (P.name "type") >>= parseStartStop) <*> P.optional (P.xattr (P.name "number") >>= parseNumberLevel) <*> P.optional (P.xattr (P.name "default-x") >>= parseT...
983
parseHammerOnPullOff :: P.XParse HammerOnPullOff parseHammerOnPullOff = HammerOnPullOff <$> (P.xtext >>= return) <*> (P.xattr (P.name "type") >>= parseStartStop) <*> P.optional (P.xattr (P.name "number") >>= parseNumberLevel) <*> P.optional (P.xattr (P.name "default-x") >>= parseT...
983
parseHammerOnPullOff = HammerOnPullOff <$> (P.xtext >>= return) <*> (P.xattr (P.name "type") >>= parseStartStop) <*> P.optional (P.xattr (P.name "number") >>= parseNumberLevel) <*> P.optional (P.xattr (P.name "default-x") >>= parseTenths) <*> P.optional (P.xattr (P.name "d...
934
false
true
39
11
204
413
205
208
null
null