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
tel/xml-mapping
src/Text/XML/Mapping/Types.hs
mit
-- | If this is a text node then there are no attributes. rawAttrs :: Tag -> [(T.Text, S.ByteString)] rawAttrs (Tag Text{}) = []
128
rawAttrs :: Tag -> [(T.Text, S.ByteString)] rawAttrs (Tag Text{}) = []
70
rawAttrs (Tag Text{}) = []
26
true
true
0
8
23
44
24
20
null
null
banacorn/mini-pascal
src/Compiler/Codegen.hs
mit
genFactor (AST.InvocationFactor var exprs) = do fn <- genFunctionRef var args <- mapM genExpression exprs call fn args
130
genFactor (AST.InvocationFactor var exprs) = do fn <- genFunctionRef var args <- mapM genExpression exprs call fn args
130
genFactor (AST.InvocationFactor var exprs) = do fn <- genFunctionRef var args <- mapM genExpression exprs call fn args
130
false
false
0
8
29
49
21
28
null
null
prowdsponsor/mangopay
mangopay/src/Web/MangoPay/Monad.hs
bsd-3-clause
getBasicRequest :: MonadIO m => HT.Method -> ByteString -> (H.Request -> H.Request) -> MangoPayT m H.Request getBasicRequest method path addRest = do host <- getHost let req1 = def { H.secure = True , H.host = host , H.port = 443 , H.path = path ...
925
getBasicRequest :: MonadIO m => HT.Method -> ByteString -> (H.Request -> H.Request) -> MangoPayT m H.Request getBasicRequest method path addRest = do host <- getHost let req1 = def { H.secure = True , H.host = host , H.port = 443 , H.path = path ...
925
getBasicRequest method path addRest = do host <- getHost let req1 = def { H.secure = True , H.host = host , H.port = 443 , H.path = path , H.method = method } req2 = addRest req1 #if DEBUG liftIO $ do print req2 putStrLn $ "^-...
806
false
true
0
17
287
264
128
136
null
null
NatureShade/SymbolicHaskell
src/Math/Symbolic/M/QQ.hs
mit
handleTextE :: T.Text -> Maybe TH.ExpQ handleTextE x = Just . TH.appE (TH.varE 'T.pack) . TH.litE . TH.StringL $ T.unpack x
123
handleTextE :: T.Text -> Maybe TH.ExpQ handleTextE x = Just . TH.appE (TH.varE 'T.pack) . TH.litE . TH.StringL $ T.unpack x
123
handleTextE x = Just . TH.appE (TH.varE 'T.pack) . TH.litE . TH.StringL $ T.unpack x
84
false
true
1
11
20
71
33
38
null
null
olsner/ghc
compiler/typecheck/TcGenGenerics.hs
bsd-3-clause
mkSum gk_ us _ datacons = -- switch the payload of gk_ to be datacon-centric instead of tycon-centric unzip [ mk1Sum (gk2gkDC gk_ d) us i (length datacons) d | (d,i) <- zip datacons [1..] ]
203
mkSum gk_ us _ datacons = -- switch the payload of gk_ to be datacon-centric instead of tycon-centric unzip [ mk1Sum (gk2gkDC gk_ d) us i (length datacons) d | (d,i) <- zip datacons [1..] ]
203
mkSum gk_ us _ datacons = -- switch the payload of gk_ to be datacon-centric instead of tycon-centric unzip [ mk1Sum (gk2gkDC gk_ d) us i (length datacons) d | (d,i) <- zip datacons [1..] ]
203
false
false
1
10
49
72
35
37
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'BL.zipWith' bl_zipWith = BL.zipWith
40
bl_zipWith = BL.zipWith
23
bl_zipWith = BL.zipWith
23
true
false
0
5
4
9
5
4
null
null
micknelso/language-c
src/Language/CFamily/CXX/TravMonad.hs
bsd-3-clause
modifyOptions :: (TravOptions -> TravOptions) -> Trav s () modifyOptions f = modify $ \ts -> ts { options = f (options ts) }
124
modifyOptions :: (TravOptions -> TravOptions) -> Trav s () modifyOptions f = modify $ \ts -> ts { options = f (options ts) }
124
modifyOptions f = modify $ \ts -> ts { options = f (options ts) }
65
false
true
0
11
23
58
30
28
null
null
jtojnar/haste-compiler
libraries/ghc-7.8/base/Foreign/Ptr.hs
bsd-3-clause
-- Word and Int are guaranteed pointer-sized in GHC -- | casts a @Ptr@ to a @WordPtr@ ptrToWordPtr :: Ptr a -> WordPtr ptrToWordPtr (Ptr a#) = WordPtr (W# (i2w (addr2Int# a#)))
177
ptrToWordPtr :: Ptr a -> WordPtr ptrToWordPtr (Ptr a#) = WordPtr (W# (i2w (addr2Int# a#)))
90
ptrToWordPtr (Ptr a#) = WordPtr (W# (i2w (addr2Int# a#)))
57
true
true
0
11
32
50
25
25
null
null
ben-schulz/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
getShowArgs (_ : xs) = getShowArgs xs
37
getShowArgs (_ : xs) = getShowArgs xs
37
getShowArgs (_ : xs) = getShowArgs xs
37
false
false
0
6
6
20
9
11
null
null
cliffano/swaggy-jenkins
clients/haskell-http-client/generated/lib/SwaggyJenkins/LoggingKatip.hs
mit
-- | A Katip Log environment which targets stdout stdoutLoggingContext :: LogContext -> IO LogContext stdoutLoggingContext cxt = do handleScribe <- LG.mkHandleScribe LG.ColorIfTerminal IO.stdout (LG.permitItem LG.InfoS) LG.V2 LG.registerScribe "stdout" handleScribe LG.defaultScribeSettings cxt -- * stderr logg...
380
stdoutLoggingContext :: LogContext -> IO LogContext stdoutLoggingContext cxt = do handleScribe <- LG.mkHandleScribe LG.ColorIfTerminal IO.stdout (LG.permitItem LG.InfoS) LG.V2 LG.registerScribe "stdout" handleScribe LG.defaultScribeSettings cxt -- * stderr logger -- | Runs a Katip logging block with the Log e...
330
stdoutLoggingContext cxt = do handleScribe <- LG.mkHandleScribe LG.ColorIfTerminal IO.stdout (LG.permitItem LG.InfoS) LG.V2 LG.registerScribe "stdout" handleScribe LG.defaultScribeSettings cxt -- * stderr logger -- | Runs a Katip logging block with the Log environment
278
true
true
0
11
56
74
36
38
null
null
spechub/Hets
Modal/ModalSign.hs
gpl-2.0
addModalSign :: ModalSign -> ModalSign -> ModalSign addModalSign a b = a { flexOps = addOpMapSet (flexOps a) $ flexOps b , flexPreds = addMapSet (flexPreds a) $ flexPreds b , modies = Map.unionWith List.union (modies a) $ modies b , termModies = Map.unionWith List.union (termModies a) $ termModies b }
310
addModalSign :: ModalSign -> ModalSign -> ModalSign addModalSign a b = a { flexOps = addOpMapSet (flexOps a) $ flexOps b , flexPreds = addMapSet (flexPreds a) $ flexPreds b , modies = Map.unionWith List.union (modies a) $ modies b , termModies = Map.unionWith List.union (termModies a) $ termModies b }
310
addModalSign a b = a { flexOps = addOpMapSet (flexOps a) $ flexOps b , flexPreds = addMapSet (flexPreds a) $ flexPreds b , modies = Map.unionWith List.union (modies a) $ modies b , termModies = Map.unionWith List.union (termModies a) $ termModies b }
258
false
true
0
11
58
130
64
66
null
null
konn/expandth
lib/ASTUtil.hs
bsd-3-clause
addLanguagePragmas :: [String] -> Module -> Module addLanguagePragmas ps' (Module l n ps mw mex is ds) = Module l n (LanguagePragma noLoc (map name ps') : ps) mw mex is ds
173
addLanguagePragmas :: [String] -> Module -> Module addLanguagePragmas ps' (Module l n ps mw mex is ds) = Module l n (LanguagePragma noLoc (map name ps') : ps) mw mex is ds
173
addLanguagePragmas ps' (Module l n ps mw mex is ds) = Module l n (LanguagePragma noLoc (map name ps') : ps) mw mex is ds
122
false
true
0
10
33
80
40
40
null
null
ComputationWithBoundedResources/jat
src/Jat/Constraints.hs
bsd-3-clause
isIVar (T.Var (IVar _ _)) = True
32
isIVar (T.Var (IVar _ _)) = True
32
isIVar (T.Var (IVar _ _)) = True
32
false
false
0
8
6
26
12
14
null
null
FranklinChen/hugs98-plus-Sep2006
packages/base/Data/ByteString/Lazy.hs
bsd-3-clause
tails :: ByteString -> [ByteString] tails = tails' . unLPS where tails' [] = LPS [] : [] tails' xs@(x:xs') | P.length x == 1 = LPS xs : tails' xs' | otherwise = LPS xs : tails' (P.unsafeTail x : xs') -- --------------------------------------------------------------------- ...
654
tails :: ByteString -> [ByteString] tails = tails' . unLPS where tails' [] = LPS [] : [] tails' xs@(x:xs') | P.length x == 1 = LPS xs : tails' xs' | otherwise = LPS xs : tails' (P.unsafeTail x : xs') -- --------------------------------------------------------------------- ...
654
tails = tails' . unLPS where tails' [] = LPS [] : [] tails' xs@(x:xs') | P.length x == 1 = LPS xs : tails' xs' | otherwise = LPS xs : tails' (P.unsafeTail x : xs') -- --------------------------------------------------------------------- -- Low level constructors -- | /O(n...
618
false
true
1
10
165
131
65
66
null
null
nevrenato/Hets_Fork
Common/Lib/Pretty.hs
gpl-2.0
-- mkUnion checks for an empty document mkUnion :: Doc -> Doc -> Doc mkUnion Empty _ = Empty
92
mkUnion :: Doc -> Doc -> Doc mkUnion Empty _ = Empty
52
mkUnion Empty _ = Empty
23
true
true
0
6
18
25
13
12
null
null
vikraman/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
mkAuxBinderName :: Name -> (OccName -> OccName) -> RdrName -- ^ Make a top-level binder name for an auxiliary binding for a parent name -- See Note [Auxiliary binders] mkAuxBinderName parent occ_fun = mkRdrUnqual (occ_fun stable_parent_occ) where stable_parent_occ = mkOccName (occNameSpace parent_occ) stable_st...
11,768
mkAuxBinderName :: Name -> (OccName -> OccName) -> RdrName mkAuxBinderName parent occ_fun = mkRdrUnqual (occ_fun stable_parent_occ) where stable_parent_occ = mkOccName (occNameSpace parent_occ) stable_string stable_string | opt_PprStyle_Debug = parent_stable | otherwise = parent_stable_hash ...
11,659
mkAuxBinderName parent occ_fun = mkRdrUnqual (occ_fun stable_parent_occ) where stable_parent_occ = mkOccName (occNameSpace parent_occ) stable_string stable_string | opt_PprStyle_Debug = parent_stable | otherwise = parent_stable_hash parent_stable = nameStableString parent parent_stable_h...
11,600
true
true
2
9
2,843
131
65
66
null
null
dmcclean/HaTeX
Text/LaTeX/Packages/AMSMath.hs
bsd-3-clause
-- | Bullet operator (∙). bullet :: LaTeXC l => l -> l -> l bullet = between $ comm0 "bullet"
94
bullet :: LaTeXC l => l -> l -> l bullet = between $ comm0 "bullet"
68
bullet = between $ comm0 "bullet"
34
true
true
2
9
21
42
18
24
null
null
AlexanderPankiv/ghc
compiler/main/HscTypes.hs
bsd-3-clause
byteCodeOfObject other = pprPanic "byteCodeOfObject" (ppr other)
70
byteCodeOfObject other = pprPanic "byteCodeOfObject" (ppr other)
70
byteCodeOfObject other = pprPanic "byteCodeOfObject" (ppr other)
70
false
false
0
7
12
20
9
11
null
null
mdsteele/fallback
src/Fallback/State/Item.hs
gpl-3.0
potionSubDesc (RestoreHealth n) = "Restores " ++ show n ++ " health\n"
70
potionSubDesc (RestoreHealth n) = "Restores " ++ show n ++ " health\n"
70
potionSubDesc (RestoreHealth n) = "Restores " ++ show n ++ " health\n"
70
false
false
2
6
11
29
12
17
null
null
DarrenMowat/blackbox
src/TokenUtils.hs
unlicense
elemToken tok (L s ls : ts) = elemTokenArr tok ls || elemToken tok ts
73
elemToken tok (L s ls : ts) = elemTokenArr tok ls || elemToken tok ts
73
elemToken tok (L s ls : ts) = elemTokenArr tok ls || elemToken tok ts
73
false
false
0
8
18
37
17
20
null
null
cdparks/mini-core
src/MiniCore/GMachine.hs
mit
casejump :: [(Int, GMCode)] -> Transition casejump alts = do addr:_ <- gets gmStack (NConstructor tag _) <- gmLoad addr cons <- gets gmCons case lookup tag alts of Just branch -> modify (\s -> s { gmCode = branch ++ gmCode s }) Nothing -> runtimeError ("No case for constructor " ++ cons !! tag) -- ...
591
casejump :: [(Int, GMCode)] -> Transition casejump alts = do addr:_ <- gets gmStack (NConstructor tag _) <- gmLoad addr cons <- gets gmCons case lookup tag alts of Just branch -> modify (\s -> s { gmCode = branch ++ gmCode s }) Nothing -> runtimeError ("No case for constructor " ++ cons !! tag) -- ...
591
casejump alts = do addr:_ <- gets gmStack (NConstructor tag _) <- gmLoad addr cons <- gets gmCons case lookup tag alts of Just branch -> modify (\s -> s { gmCode = branch ++ gmCode s }) Nothing -> runtimeError ("No case for constructor " ++ cons !! tag) -- Simple branch using top-of-V-stack -- If t...
549
false
true
0
16
163
143
73
70
null
null
jgoerzen/dtmconv
HaXml-1.12/src/Text/XML/HaXml/Parse.hs
gpl-2.0
extsubsetdecl :: XParser ExtSubsetDecl extsubsetdecl = ( markupdecl >>= return . ExtMarkupDecl) +++ ( conditionalsect >>= return . ExtConditionalSect)
158
extsubsetdecl :: XParser ExtSubsetDecl extsubsetdecl = ( markupdecl >>= return . ExtMarkupDecl) +++ ( conditionalsect >>= return . ExtConditionalSect)
158
extsubsetdecl = ( markupdecl >>= return . ExtMarkupDecl) +++ ( conditionalsect >>= return . ExtConditionalSect)
119
false
true
0
8
26
40
21
19
null
null
ysnrkdm/Hamlet
src/ProofNumberSearch.hs
mit
andize' Tree.Node {Tree.node = _, Tree.childNodes = c} = map selectMostProvenNodeOr $ map orize' c
98
andize' Tree.Node {Tree.node = _, Tree.childNodes = c} = map selectMostProvenNodeOr $ map orize' c
98
andize' Tree.Node {Tree.node = _, Tree.childNodes = c} = map selectMostProvenNodeOr $ map orize' c
98
false
false
0
8
14
42
21
21
null
null
pascalpoizat/vecahaskell
test/VecaTests.hs
apache-2.0
n6 :: VName n6 = Name ["c6"]
28
n6 :: VName n6 = Name ["c6"]
28
n6 = Name ["c6"]
16
false
true
0
6
6
17
9
8
null
null
brendanhay/gogol
gen/src/Gen/Syntax.hs
mpl-2.0
conDecl :: Name () -> Prefix -> Map Local Solved -> QualConDecl () conDecl n p rs = QualConDecl () Nothing Nothing body where body = case Map.toList rs of [] -> ConDecl () n [] [x] -> RecDecl () n [field internalType x] xs -> RecDecl () n (map (field (strict . internalType)) xs) fie...
372
conDecl :: Name () -> Prefix -> Map Local Solved -> QualConDecl () conDecl n p rs = QualConDecl () Nothing Nothing body where body = case Map.toList rs of [] -> ConDecl () n [] [x] -> RecDecl () n [field internalType x] xs -> RecDecl () n (map (field (strict . internalType)) xs) fie...
372
conDecl n p rs = QualConDecl () Nothing Nothing body where body = case Map.toList rs of [] -> ConDecl () n [] [x] -> RecDecl () n [field internalType x] xs -> RecDecl () n (map (field (strict . internalType)) xs) field f (l, v) = FieldDecl () [fname p l] (f (_type v))
305
false
true
1
14
104
208
98
110
null
null
rybak/powers
Powers.hs
mit
isEqualPair :: World -> Coords -> Coords -> Bool isEqualPair w a b = w `at` a == w `at` b
89
isEqualPair :: World -> Coords -> Coords -> Bool isEqualPair w a b = w `at` a == w `at` b
89
isEqualPair w a b = w `at` a == w `at` b
40
false
true
0
7
20
46
25
21
null
null
brendanhay/gogol
gogol-plus-domains/gen/Network/Google/Resource/PlusDomains/People/ListByActivity.hs
mpl-2.0
-- | The maximum number of people to include in the response, which is used -- for paging. For any response, the actual number returned might be less -- than the specified maxResults. plbaMaxResults :: Lens' PeopleListByActivity Word32 plbaMaxResults = lens _plbaMaxResults (\ s a -> s{_plbaMaxResults = a}) ...
331
plbaMaxResults :: Lens' PeopleListByActivity Word32 plbaMaxResults = lens _plbaMaxResults (\ s a -> s{_plbaMaxResults = a}) . _Coerce
147
plbaMaxResults = lens _plbaMaxResults (\ s a -> s{_plbaMaxResults = a}) . _Coerce
95
true
true
2
8
64
53
26
27
null
null
shlevy/ghc
compiler/nativeGen/SPARC/CodeGen.hs
bsd-3-clause
stmtToInstrs :: CmmNode e x -> NatM InstrBlock stmtToInstrs stmt = do dflags <- getDynFlags case stmt of CmmComment s -> return (unitOL (COMMENT s)) CmmTick {} -> return nilOL CmmUnwind {} -> return nilOL CmmAssign reg src | isFloatType ty -> assignReg_FltCode format reg src | ...
2,015
stmtToInstrs :: CmmNode e x -> NatM InstrBlock stmtToInstrs stmt = do dflags <- getDynFlags case stmt of CmmComment s -> return (unitOL (COMMENT s)) CmmTick {} -> return nilOL CmmUnwind {} -> return nilOL CmmAssign reg src | isFloatType ty -> assignReg_FltCode format reg src | ...
2,015
stmtToInstrs stmt = do dflags <- getDynFlags case stmt of CmmComment s -> return (unitOL (COMMENT s)) CmmTick {} -> return nilOL CmmUnwind {} -> return nilOL CmmAssign reg src | isFloatType ty -> assignReg_FltCode format reg src | isWord64 ty -> assignReg_I64Code reg...
1,968
false
true
0
14
573
391
176
215
null
null
nevrenato/HetsAlloy
Common/Keywords.hs
gpl-2.0
archS :: String archS = "arch"
30
archS :: String archS = "arch"
30
archS = "arch"
14
false
true
0
4
5
11
6
5
null
null
lingxiao/CIS700
depricated/temp.hs
bsd-3-clause
-- * Run Morris beta on stream inputs `xs` for `t` independent trials and average morrisB :: Int -> [a] -> IO Counter morrisB t = fmap rmean . replicateM t . morrisA
166
morrisB :: Int -> [a] -> IO Counter morrisB t = fmap rmean . replicateM t . morrisA
84
morrisB t = fmap rmean . replicateM t . morrisA
48
true
true
0
7
33
47
22
25
null
null
daleooo/barrelfish
hake/RuleDefs.hs
mit
libvfs_deps_fat = LibDeps $ vfsdeps [VFS_FAT, VFS_BlockdevFS]
68
libvfs_deps_fat = LibDeps $ vfsdeps [VFS_FAT, VFS_BlockdevFS]
68
libvfs_deps_fat = LibDeps $ vfsdeps [VFS_FAT, VFS_BlockdevFS]
68
false
false
0
7
13
19
10
9
null
null
brendanhay/gogol
gogol-serviceuser/gen/Network/Google/ServiceUser/Types/Product.hs
mpl-2.0
-- | The source syntax. enuSyntax :: Lens' Enum' (Maybe EnumSyntax) enuSyntax = lens _enuSyntax (\ s a -> s{_enuSyntax = a})
126
enuSyntax :: Lens' Enum' (Maybe EnumSyntax) enuSyntax = lens _enuSyntax (\ s a -> s{_enuSyntax = a})
102
enuSyntax = lens _enuSyntax (\ s a -> s{_enuSyntax = a})
58
true
true
0
9
23
48
25
23
null
null
jwiegley/BlogLiterately
src/Text/BlogLiterately/Highlight.hs
gpl-3.0
-- | Read style preferences in from a file using the @Read@ instance -- for @StylePrefs@, or return the default style if the file name is -- empty. getStylePrefs :: FilePath -> IO StylePrefs getStylePrefs "" = return defaultStylePrefs
241
getStylePrefs :: FilePath -> IO StylePrefs getStylePrefs "" = return defaultStylePrefs
89
getStylePrefs "" = return defaultStylePrefs
46
true
true
0
6
45
27
14
13
null
null
mfilmer/haskBMP
mandelbrot.hs
gpl-3.0
mandelCounts = map (map escapeCount) coords
43
mandelCounts = map (map escapeCount) coords
43
mandelCounts = map (map escapeCount) coords
43
false
false
1
7
5
21
8
13
null
null
kcsongor/generic-lens
generic-optics/examples/Biscuits.hs
bsd-3-clause
upgrade :: Double -> Invoice Int -> Invoice (Int, Double) upgrade bribe invoice = over (param @0) (\i -> (i, bribe)) invoice
124
upgrade :: Double -> Invoice Int -> Invoice (Int, Double) upgrade bribe invoice = over (param @0) (\i -> (i, bribe)) invoice
124
upgrade bribe invoice = over (param @0) (\i -> (i, bribe)) invoice
66
false
true
0
9
21
69
35
34
null
null
mfpi/OpenGL
Graphics/Rendering/OpenGL/GL/PerFragment.hs
bsd-3-clause
marshalBlendEquation :: BlendEquation -> GLenum marshalBlendEquation x = case x of FuncAdd -> gl_FUNC_ADD FuncSubtract -> gl_FUNC_SUBTRACT FuncReverseSubtract -> gl_FUNC_REVERSE_SUBTRACT Min -> gl_MIN Max -> gl_MAX LogicOp -> gl_INDEX_LOGIC_OP
261
marshalBlendEquation :: BlendEquation -> GLenum marshalBlendEquation x = case x of FuncAdd -> gl_FUNC_ADD FuncSubtract -> gl_FUNC_SUBTRACT FuncReverseSubtract -> gl_FUNC_REVERSE_SUBTRACT Min -> gl_MIN Max -> gl_MAX LogicOp -> gl_INDEX_LOGIC_OP
261
marshalBlendEquation x = case x of FuncAdd -> gl_FUNC_ADD FuncSubtract -> gl_FUNC_SUBTRACT FuncReverseSubtract -> gl_FUNC_REVERSE_SUBTRACT Min -> gl_MIN Max -> gl_MAX LogicOp -> gl_INDEX_LOGIC_OP
213
false
true
6
5
46
69
29
40
null
null
homam/fsm-conversational-ui
src/TestExist.hs
bsd-3-clause
(~:>) :: Survey b -> (b -> Survey a) -> IO (Survey (b, a)) s ~:> f = do b <- runSurvey s a <- runSurvey $ f b return $ Always (b, a)
138
(~:>) :: Survey b -> (b -> Survey a) -> IO (Survey (b, a)) s ~:> f = do b <- runSurvey s a <- runSurvey $ f b return $ Always (b, a)
138
s ~:> f = do b <- runSurvey s a <- runSurvey $ f b return $ Always (b, a)
79
false
true
0
12
39
99
47
52
null
null
sdiehl/ghc
compiler/utils/Digraph.hs
bsd-3-clause
-- See Note [Deterministic SCC] graphFromEdgedVertices :: ReduceFn key payload -> [Node key payload] -- The graph; its ok for the -- out-list to contain keys which aren't -- a vertex key, they are ignored -...
406
graphFromEdgedVertices :: ReduceFn key payload -> [Node key payload] -- The graph; its ok for the -- out-list to contain keys which aren't -- a vertex key, they are ignored -> Graph (Node key payload) graph...
374
graphFromEdgedVertices _reduceFn [] = emptyGraph
59
true
true
0
9
169
54
28
26
null
null
timtylin/scholdoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
abbrevKey :: MarkdownParser (F Blocks) abbrevKey = do guardEnabled Ext_abbreviations try $ do char '*' reference char ':' skipMany (satisfy (/= '\n')) blanklines return $ return mempty
212
abbrevKey :: MarkdownParser (F Blocks) abbrevKey = do guardEnabled Ext_abbreviations try $ do char '*' reference char ':' skipMany (satisfy (/= '\n')) blanklines return $ return mempty
212
abbrevKey = do guardEnabled Ext_abbreviations try $ do char '*' reference char ':' skipMany (satisfy (/= '\n')) blanklines return $ return mempty
173
false
true
0
13
54
77
33
44
null
null
capitanbatata/sandbox
random-data-generation/src/Counter.hs
gpl-3.0
-- * Introducing the reader monad incR :: ReaderT Int (State Counter) () incR = ask >>= lift . incS
99
incR :: ReaderT Int (State Counter) () incR = ask >>= lift . incS
65
incR = ask >>= lift . incS
26
true
true
0
7
19
35
18
17
null
null
haskell-distributed/distributed-process
src/Control/Distributed/Process/Internal/Primitives.hs
bsd-3-clause
relay :: ProcessId -> Process () relay !pid = receiveWait [ matchAny (\m -> forward m pid) ] >> relay pid
105
relay :: ProcessId -> Process () relay !pid = receiveWait [ matchAny (\m -> forward m pid) ] >> relay pid
105
relay !pid = receiveWait [ matchAny (\m -> forward m pid) ] >> relay pid
72
false
true
0
11
20
53
25
28
null
null
twittner/redis-resp
src/Data/Redis/Command.hs
mpl-2.0
min2bytes :: Min -> ByteString min2bytes MinInf = "-"
58
min2bytes :: Min -> ByteString min2bytes MinInf = "-"
58
min2bytes MinInf = "-"
27
false
true
0
5
13
18
9
9
null
null
sandrolovnicki/lambda-calculus-interpreter
src/Evaluator.hs
mit
evalExp (EnvironmentVar ev) = evalVar ev
40
evalExp (EnvironmentVar ev) = evalVar ev
40
evalExp (EnvironmentVar ev) = evalVar ev
40
false
false
0
6
5
19
8
11
null
null
beni55/http-types
Network/HTTP/Types/Status.hs
bsd-3-clause
-- | Found 302 found302 :: Status found302 = status302
54
found302 :: Status found302 = status302
39
found302 = status302
20
true
true
0
4
9
12
7
5
null
null
xu-hao/QueryArrow
QueryArrow-ffi-genquery/src/QueryArrow/FFI/GenQuery/Parser.hs
bsd-3-clause
stringp :: GenQueryParser String stringp = do char '\'' str <- many (noneOf ['\''] <|> try (do char '\'' char '\'' return '\'')) char '\'' whiteSpace return str
278
stringp :: GenQueryParser String stringp = do char '\'' str <- many (noneOf ['\''] <|> try (do char '\'' char '\'' return '\'')) char '\'' whiteSpace return str
278
stringp = do char '\'' str <- many (noneOf ['\''] <|> try (do char '\'' char '\'' return '\'')) char '\'' whiteSpace return str
245
false
true
1
16
145
86
34
52
null
null
cmc-haskell-2016/fluids
src/Main.hs
bsd-3-clause
handlePic (EventKey (Char 'r') _ _ _) = restart
48
handlePic (EventKey (Char 'r') _ _ _) = restart
48
handlePic (EventKey (Char 'r') _ _ _) = restart
48
false
false
0
9
9
27
13
14
null
null
mtolly/rail
src/Language/Rail/Generate.hs
gpl-3.0
branch n = text $ unlines $ ["\\ /-", " -<", " \\"] ++ replicate ((n - 1) * 2 - 1) " |" ++ [" \\-"]
108
branch n = text $ unlines $ ["\\ /-", " -<", " \\"] ++ replicate ((n - 1) * 2 - 1) " |" ++ [" \\-"]
108
branch n = text $ unlines $ ["\\ /-", " -<", " \\"] ++ replicate ((n - 1) * 2 - 1) " |" ++ [" \\-"]
108
false
false
0
12
35
60
32
28
null
null
kishoredbn/barrelfish
tools/flounder/GCBackend.hs
mit
compile :: String -> String -> Interface -> String compile infile outfile interface = unlines $ C.pp_unit $ stub_body infile interface
138
compile :: String -> String -> Interface -> String compile infile outfile interface = unlines $ C.pp_unit $ stub_body infile interface
138
compile infile outfile interface = unlines $ C.pp_unit $ stub_body infile interface
87
false
true
4
9
24
52
23
29
null
null
travitch/llvm-data-interop
src/LLVM/Internal/TypeUnification.hs
bsd-3-clause
groupByBaseName :: [TypePtr] -> IO (HashMap String [TypePtr]) groupByBaseName = foldM addToMap mempty where addToMap m tp = do -- All struct types that make it here are named. Just name <- cTypeName tp return $ HM.insertWith (++) (structBaseName name) [tp] m -- | Unify a list of terms
310
groupByBaseName :: [TypePtr] -> IO (HashMap String [TypePtr]) groupByBaseName = foldM addToMap mempty where addToMap m tp = do -- All struct types that make it here are named. Just name <- cTypeName tp return $ HM.insertWith (++) (structBaseName name) [tp] m -- | Unify a list of terms
310
groupByBaseName = foldM addToMap mempty where addToMap m tp = do -- All struct types that make it here are named. Just name <- cTypeName tp return $ HM.insertWith (++) (structBaseName name) [tp] m -- | Unify a list of terms
248
false
true
0
10
73
94
47
47
null
null
brendanhay/gogol
gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Accounts/Clients/Users/List.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). aculUploadProtocol :: Lens' AccountsClientsUsersList (Maybe Text) aculUploadProtocol = lens _aculUploadProtocol (\ s a -> s{_aculUploadProtocol = a})
219
aculUploadProtocol :: Lens' AccountsClientsUsersList (Maybe Text) aculUploadProtocol = lens _aculUploadProtocol (\ s a -> s{_aculUploadProtocol = a})
157
aculUploadProtocol = lens _aculUploadProtocol (\ s a -> s{_aculUploadProtocol = a})
91
true
true
0
8
33
49
25
24
null
null
grumpyjames/quicksilver
src/Quicksilver/Orderbook.hs
mit
placeOrder :: Instruction -> Orderbook -> (Orderbook, Events) placeOrder (PlaceOrder p q) ob = maybe (ob, [Rejected]) (\o -> placeOrder' o ob) $ order p q
154
placeOrder :: Instruction -> Orderbook -> (Orderbook, Events) placeOrder (PlaceOrder p q) ob = maybe (ob, [Rejected]) (\o -> placeOrder' o ob) $ order p q
154
placeOrder (PlaceOrder p q) ob = maybe (ob, [Rejected]) (\o -> placeOrder' o ob) $ order p q
92
false
true
0
9
25
74
39
35
null
null
JackKiefer/herms
app/herms.hs
gpl-3.0
runWithOpts (Export targets format) = export targets format
59
runWithOpts (Export targets format) = export targets format
59
runWithOpts (Export targets format) = export targets format
59
false
false
0
6
7
23
10
13
null
null
Teaspot-Studio/gore-and-ash-lambdacube
examples/03/Example03.hs
bsd-3-clause
-- | Constantly update LambdaCube storage simulateStorage :: forall t m . (MonadLambdaCube t m, TimerMonad t m) => Dynamic t Float -> GLStorage -> TextureData -> m (Event t ()) simulateStorage aspectD storage textureData = do let dt = 1 / 60 :: Float tickE <- tickEvery (realToFrac dt) tD <- foldDyn (const (+ dt)...
727
simulateStorage :: forall t m . (MonadLambdaCube t m, TimerMonad t m) => Dynamic t Float -> GLStorage -> TextureData -> m (Event t ()) simulateStorage aspectD storage textureData = do let dt = 1 / 60 :: Float tickE <- tickEvery (realToFrac dt) tD <- foldDyn (const (+ dt)) 0 tickE performEvent_ $ ffor tickE $ c...
685
simulateStorage aspectD storage textureData = do let dt = 1 / 60 :: Float tickE <- tickEvery (realToFrac dt) tD <- foldDyn (const (+ dt)) 0 tickE performEvent_ $ ffor tickE $ const $ do t <- sample . current $ tD aspect <- sample . current $ aspectD liftIO $ LC.updateUniforms storage $ do "dif...
549
true
true
0
17
168
283
133
150
null
null
RAFIRAF/HASKELL
k.hs
mit
--sum . map digitToInt $ "22" sumaCyfr :: IO () sumaCyfr = putStrLn "Podaj liczbe:" >> getLine >>= putStrLn . show . sum . map digitToInt
137
sumaCyfr :: IO () sumaCyfr = putStrLn "Podaj liczbe:" >> getLine >>= putStrLn . show . sum . map digitToInt
107
sumaCyfr = putStrLn "Podaj liczbe:" >> getLine >>= putStrLn . show . sum . map digitToInt
89
true
true
0
10
25
43
21
22
null
null
Jubobs/CommonMark-WIP
src/CommonMark/Renderer/Html.hs
bsd-3-clause
dummyDoc :: Doc dummyDoc = Doc def (fromList [Hrule])
53
dummyDoc :: Doc dummyDoc = Doc def (fromList [Hrule])
53
dummyDoc = Doc def (fromList [Hrule])
37
false
true
0
8
8
33
14
19
null
null
phaazon/OpenGLRawgen
src/Modules/ModuleNames.hs
bsd-3-clause
-- | Asks the 'ModuleName' of a specific core profile askProfileModule :: RawGenMonad m => Int -- ^ Major version -> Int -- ^ Minor version -> Profile -- ^ The profile -> m ModuleName askProfileModule ma mi prof = askCategoryModule (Version ma mi prof)
273
askProfileModule :: RawGenMonad m => Int -- ^ Major version -> Int -- ^ Minor version -> Profile -- ^ The profile -> m ModuleName askProfileModule ma mi prof = askCategoryModule (Version ma mi prof)
219
askProfileModule ma mi prof = askCategoryModule (Version ma mi prof)
68
true
true
0
10
65
61
30
31
null
null
fmthoma/ghc
compiler/types/TyCon.hs
bsd-3-clause
primRepSizeW _ AddrRep = 1
40
primRepSizeW _ AddrRep = 1
40
primRepSizeW _ AddrRep = 1
40
false
false
0
5
18
11
5
6
null
null
mzini/hosa
src/HoSA/SizeType/Infer.hs
mit
inferSizeType_ ctx (Fun (_,s) _ _) = do tp <- rename s >>= instantiate return (ctx,tp)
90
inferSizeType_ ctx (Fun (_,s) _ _) = do tp <- rename s >>= instantiate return (ctx,tp)
90
inferSizeType_ ctx (Fun (_,s) _ _) = do tp <- rename s >>= instantiate return (ctx,tp)
90
false
false
0
9
19
53
26
27
null
null
beni55/ghcjs
test/ghc/perf/t4474b.hs
mit
main = print $ sumList $ flatListCons2 $ fullTree 24
53
main = print $ sumList $ flatListCons2 $ fullTree 24
53
main = print $ sumList $ flatListCons2 $ fullTree 24
53
false
false
0
7
10
21
10
11
null
null
input-output-hk/cardano-sl
core/src/Pos/Core/JsonLog/JsonLogT.hs
apache-2.0
jsonLogDefault :: (ToJSON a, MonadCatch m, MonadIO m, WithLogger m) => JsonLogConfig -> a -> m () jsonLogDefault jlc x = case jlc of JsonLogDisabled -> return () JsonLogConfig v decide -> do event <- toEvent <$> timedIO x b <- liftIO (decide event) ...
669
jsonLogDefault :: (ToJSON a, MonadCatch m, MonadIO m, WithLogger m) => JsonLogConfig -> a -> m () jsonLogDefault jlc x = case jlc of JsonLogDisabled -> return () JsonLogConfig v decide -> do event <- toEvent <$> timedIO x b <- liftIO (decide event) ...
669
jsonLogDefault jlc x = case jlc of JsonLogDisabled -> return () JsonLogConfig v decide -> do event <- toEvent <$> timedIO x b <- liftIO (decide event) `catchAny` \e -> do logWarning $ sformat ("error in deciding whether to json log: "%s...
559
false
true
0
21
253
229
110
119
null
null
fmapfmapfmap/amazonka
amazonka-rds/gen/Network/AWS/RDS/CreateDBCluster.hs
mpl-2.0
-- | The number of days for which automated backups are retained. Setting -- this parameter to a positive number enables backups. Setting this -- parameter to 0 disables automated backups. -- -- Default: 1 -- -- Constraints: -- -- - Must be a value from 0 to 35 cdcBackupRetentionPeriod :: Lens' CreateDBCluster (Maybe...
427
cdcBackupRetentionPeriod :: Lens' CreateDBCluster (Maybe Int) cdcBackupRetentionPeriod = lens _cdcBackupRetentionPeriod (\ s a -> s{_cdcBackupRetentionPeriod = a})
163
cdcBackupRetentionPeriod = lens _cdcBackupRetentionPeriod (\ s a -> s{_cdcBackupRetentionPeriod = a})
101
true
true
0
9
67
54
33
21
null
null
mnicoletti/pdep-utn-frba
funcional/guia-ejercicios/parcial-pociones-harry-potter.hs
mit
ingredientes lista = foldl1 (++) (map trd3 lista)
49
ingredientes lista = foldl1 (++) (map trd3 lista)
49
ingredientes lista = foldl1 (++) (map trd3 lista)
49
false
false
0
7
7
24
12
12
null
null
jorenverspeurt/portfolio
Haskell/abc.hs
gpl-2.0
construct_solution :: Distances -> Elements -> Groups -> StdGen -> (StdGen, Solution) construct_solution distances elems groups rng = {- trace (show "cs: " ++ show elems ++ "\n" ++ show ngroups)-} (nrng, ngroups) where ([], ngroups, nrng) = if (1 == length groups_m) then error "c...
516
construct_solution :: Distances -> Elements -> Groups -> StdGen -> (StdGen, Solution) construct_solution distances elems groups rng = {- trace (show "cs: " ++ show elems ++ "\n" ++ show ngroups)-} (nrng, ngroups) where ([], ngroups, nrng) = if (1 == length groups_m) then error "c...
516
construct_solution distances elems groups rng = {- trace (show "cs: " ++ show elems ++ "\n" ++ show ngroups)-} (nrng, ngroups) where ([], ngroups, nrng) = if (1 == length groups_m) then error "consol" else fill distances elems_m groups_m rng_m (elems_m, groups_m, rng_m) = choose_m di...
406
false
true
0
9
133
127
68
59
null
null
TomHammersley/HaskellRenderer
app/src/Colour.hs
gpl-2.0
colGreen :: Colour colGreen = Colour 0 1 0 1
44
colGreen :: Colour colGreen = Colour 0 1 0 1
44
colGreen = Colour 0 1 0 1
25
false
true
0
5
9
20
10
10
null
null
felixsch/moonbase-gtk
src/Moonbase/Util/Gtk.hs
gpl-2.0
parseColor' _ = parseColor' magenta
48
parseColor' _ = parseColor' magenta
48
parseColor' _ = parseColor' magenta
48
false
false
0
5
17
13
5
8
null
null
tensorflow/haskell
tensorflow-opgen/src/TensorFlow/OpGen.hs
apache-2.0
dtTypeToHaskell DT_HALF = "Data.Word.Word16"
44
dtTypeToHaskell DT_HALF = "Data.Word.Word16"
44
dtTypeToHaskell DT_HALF = "Data.Word.Word16"
44
false
false
1
5
3
13
4
9
null
null
osa1/language-lua
src/Text/PrettyPrint/Leijen.hs
bsd-3-clause
-- | The document @(encloseSep l r sep xs)@ concatenates the documents -- @xs@ separated by @sep@ and encloses the resulting document by @l@ -- and @r@. The documents are rendered horizontally if that fits the -- page. Otherwise they are aligned vertically. All separators are put -- in front of the elements. For exampl...
1,675
encloseSep :: Doc -> Doc -> Doc -> [Doc] -> Doc encloseSep left right sep ds = case ds of [] -> left <> right [d] -> left <> d <> right _ -> align (cat (zipWith (<>) (left : repeat sep) ds) <> right) ----------------------------------------------------------- -- punctuate p [d1,d2,...,d...
977
encloseSep left right sep ds = case ds of [] -> left <> right [d] -> left <> d <> right _ -> align (cat (zipWith (<>) (left : repeat sep) ds) <> right) ----------------------------------------------------------- -- punctuate p [d1,d2,...,dn] => [d1 <> p,d2 <> p, ... ,dn] ---------------...
929
true
true
0
16
357
166
108
58
null
null
bezirg/gpah
src/Generics/GPAH/Date/Analyze.hs
bsd-3-clause
cleanLog :: [[String]] -> [(Int, String)] cleanLog = map cleanLog' where --cleanLog' [String] -> (PackageName, Year, Month) cleanLog' [_, _, _, _, _, y, _, pkg, _] = (read y :: Int, pkg)
191
cleanLog :: [[String]] -> [(Int, String)] cleanLog = map cleanLog' where --cleanLog' [String] -> (PackageName, Year, Month) cleanLog' [_, _, _, _, _, y, _, pkg, _] = (read y :: Int, pkg)
191
cleanLog = map cleanLog' where --cleanLog' [String] -> (PackageName, Year, Month) cleanLog' [_, _, _, _, _, y, _, pkg, _] = (read y :: Int, pkg)
149
false
true
0
9
37
90
51
39
null
null
BlancaCC/cultutrilla
haskell_aprendizaje/básicos/haskell_básico.hs
gpl-3.0
trocear :: Integer -> (Integer , Integer ) trocear x = div10 x 0
64
trocear :: Integer -> (Integer , Integer ) trocear x = div10 x 0
64
trocear x = div10 x 0
21
false
true
0
8
13
36
16
20
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT42.hs
gpl-3.0
(==),(/=) :: Nat -> Nat -> Bool Z == Z = True
49
(==),(/=) :: Nat -> Nat -> Bool Z == Z = True
49
Z == Z = True
17
false
true
2
9
15
40
19
21
null
null
andrewthad/serpentine
example/main.hs
bsd-3-clause
parseMyRoute :: [Text] -> Maybe (SomeRoutePieces PlanMyRouteSym0) parseMyRoute = parseAllRoutes (Proxy :: Proxy PlanMyRouteSym0) sPlanMyRoute
141
parseMyRoute :: [Text] -> Maybe (SomeRoutePieces PlanMyRouteSym0) parseMyRoute = parseAllRoutes (Proxy :: Proxy PlanMyRouteSym0) sPlanMyRoute
141
parseMyRoute = parseAllRoutes (Proxy :: Proxy PlanMyRouteSym0) sPlanMyRoute
75
false
true
0
8
14
41
21
20
null
null
rootzlevel/device-manager
lib/DBus/DBusAbstraction.hs
bsd-3-clause
ifaceOf :: DBusObject o => o -> DefaultInterface o ifaceOf = const undefined
76
ifaceOf :: DBusObject o => o -> DefaultInterface o ifaceOf = const undefined
76
ifaceOf = const undefined
25
false
true
0
7
12
28
13
15
null
null
Soostone/aws
Aws/DynamoDb/Commands/Table.hs
bsd-3-clause
createTable :: T.Text -- ^ Table name -> [AttributeDefinition] -> KeySchema -> ProvisionedThroughput -> CreateTable createTable tn ad ks p = CreateTable tn ad ks p [] []
217
createTable :: T.Text -- ^ Table name -> [AttributeDefinition] -> KeySchema -> ProvisionedThroughput -> CreateTable createTable tn ad ks p = CreateTable tn ad ks p [] []
217
createTable tn ad ks p = CreateTable tn ad ks p [] []
53
false
true
0
10
75
64
31
33
null
null
rumblesan/haskell-dht
test/Tests/KBucketTests.hs
bsd-3-clause
testTreeCreation :: Test testTreeCreation = let expectedLeaf = (KBucketLeaf (KBucketInfo 1 1 (NodeId "string") 0) (NodeId "string") (NodeId "string") []) testBucketInfo = (KBucketInfo 1 1 (NodeId "string") 0) in testCase "Tree Creation" $ assertEqual "Should create a KBucket Tree" (KBucketTree t...
389
testTreeCreation :: Test testTreeCreation = let expectedLeaf = (KBucketLeaf (KBucketInfo 1 1 (NodeId "string") 0) (NodeId "string") (NodeId "string") []) testBucketInfo = (KBucketInfo 1 1 (NodeId "string") 0) in testCase "Tree Creation" $ assertEqual "Should create a KBucket Tree" (KBucketTree t...
389
testTreeCreation = let expectedLeaf = (KBucketLeaf (KBucketInfo 1 1 (NodeId "string") 0) (NodeId "string") (NodeId "string") []) testBucketInfo = (KBucketInfo 1 1 (NodeId "string") 0) in testCase "Tree Creation" $ assertEqual "Should create a KBucket Tree" (KBucketTree testBucketInfo expectedLea...
364
false
true
0
14
72
119
59
60
null
null
pparkkin/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpInfo CatchRetryOp = mkGenPrimOp (fsLit "catchRetry#") [alphaTyVar] [(mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy UnboxedTuple [mkStatePrimTy realWorldTy, alphaTy]))), (mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy UnboxedTuple [mkStatePrimTy realWorldTy, alphaTy]))), mkStatePrimTy realWorldTy] ((mkTupleTy ...
371
primOpInfo CatchRetryOp = mkGenPrimOp (fsLit "catchRetry#") [alphaTyVar] [(mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy UnboxedTuple [mkStatePrimTy realWorldTy, alphaTy]))), (mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy UnboxedTuple [mkStatePrimTy realWorldTy, alphaTy]))), mkStatePrimTy realWorldTy] ((mkTupleTy ...
371
primOpInfo CatchRetryOp = mkGenPrimOp (fsLit "catchRetry#") [alphaTyVar] [(mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy UnboxedTuple [mkStatePrimTy realWorldTy, alphaTy]))), (mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy UnboxedTuple [mkStatePrimTy realWorldTy, alphaTy]))), mkStatePrimTy realWorldTy] ((mkTupleTy ...
371
false
false
0
13
30
127
67
60
null
null
mightybyte/reflex-todomvc
src-bin/bench.hs
bsd-3-clause
testAdd :: forall t m. MonadWidget t m => Int -> m (Event t ()) testAdd n = do rec counter <- todoWithHooks mempty addTask never (constDyn Todo.All) let addTask = newTask <$> (ffilter (< n)) counter return $ void $ ffilter (>= n) counter
268
testAdd :: forall t m. MonadWidget t m => Int -> m (Event t ()) testAdd n = do rec counter <- todoWithHooks mempty addTask never (constDyn Todo.All) let addTask = newTask <$> (ffilter (< n)) counter return $ void $ ffilter (>= n) counter
268
testAdd n = do rec counter <- todoWithHooks mempty addTask never (constDyn Todo.All) let addTask = newTask <$> (ffilter (< n)) counter return $ void $ ffilter (>= n) counter
204
false
true
0
16
75
123
59
64
null
null
spacekitteh/smcghc
compiler/main/DynFlags.hs
bsd-3-clause
setGenDeriving False = return ()
32
setGenDeriving False = return ()
32
setGenDeriving False = return ()
32
false
false
1
6
4
17
6
11
null
null
sw17ch/Scurry
src/Scurry/Network/Util.hs
bsd-3-clause
-- | Network to Host Short: Convert from network to host byte order -- on a little endian host. ntohs :: Word16 -> Word16 ntohs w = let b0 = shiftR (0xFF00 .&. w) 8 b1 = shiftL (0x00FF .&. w) 8 in b0 .|. b1
231
ntohs :: Word16 -> Word16 ntohs w = let b0 = shiftR (0xFF00 .&. w) 8 b1 = shiftL (0x00FF .&. w) 8 in b0 .|. b1
135
ntohs w = let b0 = shiftR (0xFF00 .&. w) 8 b1 = shiftL (0x00FF .&. w) 8 in b0 .|. b1
109
true
true
0
11
70
64
33
31
null
null
marcellussiegburg/autotool
shib/echo.hs
gpl-2.0
main = warpDebug 3000 This
26
main = warpDebug 3000 This
26
main = warpDebug 3000 This
26
false
false
0
5
4
11
5
6
null
null
mpickering/HaRe
test/TestUtils.hs
bsd-3-clause
ct :: IO a -> IO a ct = cdAndDo "./test/testdata/"
50
ct :: IO a -> IO a ct = cdAndDo "./test/testdata/"
50
ct = cdAndDo "./test/testdata/"
31
false
true
0
7
10
30
12
18
null
null
abakst/liquidhaskell
benchmarks/vector-0.10.0.1/Data/Vector/Fusion/Stream/Monadic.hs
bsd-3-clause
emptyStream = "empty stream"
28
emptyStream = "empty stream"
28
emptyStream = "empty stream"
28
false
false
0
4
3
6
3
3
null
null
rodrigosetti/messagepack
Data/MessagePack/Spec.hs
mit
-- 11010011 fixext1 = 0xd4
28
fixext1 = 0xd4
16
fixext1 = 0xd4
16
true
false
1
5
6
11
4
7
null
null
nevrenato/Hets_Fork
HasCASL/ClassAna.hs
gpl-2.0
lesserKind :: ClassMap -> Kind -> Kind -> Bool lesserKind cm k1 k2 = case k1 of ClassKind c1 -> (case k2 of ClassKind c2 -> c1 == c2 || if k1 == universe then False else k2 == universe _ -> False) || case Map.lookup c1 cm of Just info -> not $ newKind cm k...
549
lesserKind :: ClassMap -> Kind -> Kind -> Bool lesserKind cm k1 k2 = case k1 of ClassKind c1 -> (case k2 of ClassKind c2 -> c1 == c2 || if k1 == universe then False else k2 == universe _ -> False) || case Map.lookup c1 cm of Just info -> not $ newKind cm k...
549
lesserKind cm k1 k2 = case k1 of ClassKind c1 -> (case k2 of ClassKind c2 -> c1 == c2 || if k1 == universe then False else k2 == universe _ -> False) || case Map.lookup c1 cm of Just info -> not $ newKind cm k2 $ classKinds info _ -> False Fu...
502
false
true
8
11
205
115
67
48
null
null
Gabriel439/Haskell-Dhall-Library
dhall/src/Dhall/Core.hs
bsd-3-clause
-- | Pretty-print a value pretty :: Pretty a => a -> Text pretty = pretty_
74
pretty :: Pretty a => a -> Text pretty = pretty_
48
pretty = pretty_
16
true
true
0
8
15
30
13
17
null
null
liamoc/learn-you-an-agda
main.hs
bsd-3-clause
formulaSettings :: String -> PandocFormulaOptions formulaSettings pre = defaultPandocFormulaOptions { formulaOptions = \case DisplayMath -> displaymath { preamble = pre } _ -> math { preamble = pre } }
263
formulaSettings :: String -> PandocFormulaOptions formulaSettings pre = defaultPandocFormulaOptions { formulaOptions = \case DisplayMath -> displaymath { preamble = pre } _ -> math { preamble = pre } }
263
formulaSettings pre = defaultPandocFormulaOptions { formulaOptions = \case DisplayMath -> displaymath { preamble = pre } _ -> math { preamble = pre } }
213
false
true
0
11
91
56
31
25
null
null
tjakway/ghcjvm
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
ctsElts :: Cts -> [Ct] ctsElts = bagToList
42
ctsElts :: Cts -> [Ct] ctsElts = bagToList
42
ctsElts = bagToList
19
false
true
0
8
7
25
11
14
null
null
poiuj/pfcc
src/Semant.hs
bsd-3-clause
lookupInObjectEnv :: Name -> ObjectEnv -> Maybe Type lookupInObjectEnv name (env:envs) = case M.lookup name env of Just t -> Just t Nothing -> lookupInObjectEnv name envs
180
lookupInObjectEnv :: Name -> ObjectEnv -> Maybe Type lookupInObjectEnv name (env:envs) = case M.lookup name env of Just t -> Just t Nothing -> lookupInObjectEnv name envs
180
lookupInObjectEnv name (env:envs) = case M.lookup name env of Just t -> Just t Nothing -> lookupInObjectEnv name envs
127
false
true
3
7
36
66
32
34
null
null
bjpop/blip
bliplib/src/Blip/Bytecode.hs
bsd-3-clause
word8ToOpcode :: Map.Map Word8 Opcode word8ToOpcode = Map.fromList [ (y, x) | (x, y) <- opcodeList ]
100
word8ToOpcode :: Map.Map Word8 Opcode word8ToOpcode = Map.fromList [ (y, x) | (x, y) <- opcodeList ]
100
word8ToOpcode = Map.fromList [ (y, x) | (x, y) <- opcodeList ]
62
false
true
1
9
16
49
25
24
null
null
david-caro/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
isConfusedGlobRegex [x,'*'] | x /= '\\' = True
46
isConfusedGlobRegex [x,'*'] | x /= '\\' = True
46
isConfusedGlobRegex [x,'*'] | x /= '\\' = True
46
false
false
0
8
7
25
12
13
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
989 = 988
9
989 = 988
9
989 = 988
9
false
false
1
5
2
10
3
7
null
null
cgag/cis-194-solutions
src/HW7/Editor.hs
bsd-3-clause
onBuffer :: (b -> a) -> Editor b a onBuffer f = gets (f . fst)
62
onBuffer :: (b -> a) -> Editor b a onBuffer f = gets (f . fst)
62
onBuffer f = gets (f . fst)
27
false
true
0
7
15
40
20
20
null
null
karamellpelle/MEnv
source/File/Binary/Reader.hs
bsd-2-clause
parsingAt :: Reader a -> SourceName -> UInt -> ByteStream -> IO (Either String a) parsingAt p name off s = runPT p () name s where runPT p u name s = do res <- runParsecT p (State s (newPos name 0 (fI off)) u) r <- parserR...
562
parsingAt :: Reader a -> SourceName -> UInt -> ByteStream -> IO (Either String a) parsingAt p name off s = runPT p () name s where runPT p u name s = do res <- runParsecT p (State s (newPos name 0 (fI off)) u) r <- parserR...
562
parsingAt p name off s = runPT p () name s where runPT p u name s = do res <- runParsecT p (State s (newPos name 0 (fI off)) u) r <- parserReply res case r of Ok x _ _ -> return (Right x) Error err -> return (Left $ showParseError err) where ...
410
false
true
0
16
263
208
97
111
null
null
tolysz/prepare-ghcjs
spec-lts8/base/Text/Printf.hs
bsd-3-clause
integral_prec (Just 0) "0" = ""
31
integral_prec (Just 0) "0" = ""
31
integral_prec (Just 0) "0" = ""
31
false
false
1
6
5
22
8
14
null
null
beni55/haste-compiler
libraries/ghc-7.8/base/GHC/Event/IntMap.hs
bsd-3-clause
branchMask :: Prefix -> Prefix -> Mask branchMask p1 p2 = intFromNat (highestBitMask (natFromInt p1 `xor` natFromInt p2))
125
branchMask :: Prefix -> Prefix -> Mask branchMask p1 p2 = intFromNat (highestBitMask (natFromInt p1 `xor` natFromInt p2))
125
branchMask p1 p2 = intFromNat (highestBitMask (natFromInt p1 `xor` natFromInt p2))
86
false
true
0
10
21
48
24
24
null
null
DavidAlphaFox/ghc
libraries/containers/Data/Map/Base.hs
bsd-3-clause
elemAt i (Bin _ kx x l r) = case compare i sizeL of LT -> elemAt i l GT -> elemAt (i-sizeL-1) r EQ -> (kx,x) where sizeL = size l -- | /O(log n)/. Update the element at /index/, i.e. by its zero-based index in -- the sequence sorted by keys. If the /index/ is out of range (less than zero, -- ...
1,153
elemAt i (Bin _ kx x l r) = case compare i sizeL of LT -> elemAt i l GT -> elemAt (i-sizeL-1) r EQ -> (kx,x) where sizeL = size l -- | /O(log n)/. Update the element at /index/, i.e. by its zero-based index in -- the sequence sorted by keys. If the /index/ is out of range (less than zero, -- ...
1,153
elemAt i (Bin _ kx x l r) = case compare i sizeL of LT -> elemAt i l GT -> elemAt (i-sizeL-1) r EQ -> (kx,x) where sizeL = size l -- | /O(log n)/. Update the element at /index/, i.e. by its zero-based index in -- the sequence sorted by keys. If the /index/ is out of range (less than zero, -- ...
1,153
false
false
0
11
276
102
56
46
null
null
peter-fogg/pardoc
src/Text/Pandoc/Readers/TWiki.hs
gpl-2.0
code :: TWParser B.Inlines code = try $ enclosed (char '=') nestedString >>= return . B.code . fromEntities
107
code :: TWParser B.Inlines code = try $ enclosed (char '=') nestedString >>= return . B.code . fromEntities
107
code = try $ enclosed (char '=') nestedString >>= return . B.code . fromEntities
80
false
true
2
10
17
53
23
30
null
null
leormarqs/TrabalhoGrafos
src/Graph/Digraph.hs
agpl-3.0
--build a graph with new nodes and/or archs newDigraph :: [NodeId] -> [(ArchId, NodeId, NodeId, Float)] -> Digraph newDigraph [] _ = error "Nodes list empty."
158
newDigraph :: [NodeId] -> [(ArchId, NodeId, NodeId, Float)] -> Digraph newDigraph [] _ = error "Nodes list empty."
114
newDigraph [] _ = error "Nodes list empty."
43
true
true
0
8
25
48
27
21
null
null
rawlep/EQS
sourceCode/LMisc.hs
mit
-- Finally, adjusting the matrix. This is achieved by removing the -- last indicator vector and adding it to the first indicator vector. -- This operation is only performed for lists of length greater than 2. adjustMatrix :: Num a => [[a]] -> [[a]] adjustMatrix xss = case butLastElm xss of ...
644
adjustMatrix :: Num a => [[a]] -> [[a]] adjustMatrix xss = case butLastElm xss of Nothing -> xss Just ((ys:yss), zs) -> (sub ys zs) : yss where sub ps qs = zipWith (-) ps qs --- END OF ADJUSTED MAT...
435
adjustMatrix xss = case butLastElm xss of Nothing -> xss Just ((ys:yss), zs) -> (sub ys zs) : yss where sub ps qs = zipWith (-) ps qs --- END OF ADJUSTED MATRIX DEFINITIONS ------------------------...
395
true
true
0
11
201
110
60
50
null
null
urbanslug/ghc
compiler/main/GhcMonad.hs
bsd-3-clause
reflectGhc :: Ghc a -> Session -> IO a reflectGhc m = unGhc m
61
reflectGhc :: Ghc a -> Session -> IO a reflectGhc m = unGhc m
61
reflectGhc m = unGhc m
22
false
true
0
7
13
31
14
17
null
null
d0kt0r0/estuary
client/src/Estuary/Languages/LaCalle.hs
gpl-3.0
--laCalle -- <nombre sonido> <transf1> <parametros> laCalle :: String -> Either ParseError Tidal.ControlPattern laCalle s = parse laCalleParser "LaCalle" s
155
laCalle :: String -> Either ParseError Tidal.ControlPattern laCalle s = parse laCalleParser "LaCalle" s
103
laCalle s = parse laCalleParser "LaCalle" s
43
true
true
0
7
19
34
17
17
null
null