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
jkoppel/comptrans
Data/Comp/Trans/DeriveTrans.hs
bsd-3-clause
atom funNm (x, _) = AppE (VarE funNm) (VarE x)
65
atom funNm (x, _) = AppE (VarE funNm) (VarE x)
65
atom funNm (x, _) = AppE (VarE funNm) (VarE x)
65
false
false
0
7
28
36
17
19
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
singlemindedly = id
19
singlemindedly = id
19
singlemindedly = id
19
false
false
0
4
2
6
3
3
null
null
sdiehl/ghc
compiler/coreSyn/CoreUtils.hs
bsd-3-clause
-- Tick annotations that *tick* cannot be speculated, because these -- are meant to identify whether or not (and how often) the particular -- source expression was evaluated at runtime. expr_ok primop_ok (Tick tickish e) | tickishCounts tickish = False | otherwise = expr_ok primop_ok e
304
expr_ok primop_ok (Tick tickish e) | tickishCounts tickish = False | otherwise = expr_ok primop_ok e
118
expr_ok primop_ok (Tick tickish e) | tickishCounts tickish = False | otherwise = expr_ok primop_ok e
118
true
false
0
8
63
45
21
24
null
null
MedeaMelana/JsonGrammar2
src/Language/JsonGrammar/Parser.hs
bsd-3-clause
parseProperties :: Object -> Grammar 'Obj t1 t2 -> t1 -> Parser t2 parseProperties obj = \case Id -> return g1 :. g2 -> parseProperties obj g2 >=> parseProperties obj g1 Empty -> \_ -> fail "empty grammar" g1 :<> g2 -> parseProperties obj g1 <> parseProperties obj g2 Pure f _ -> ...
445
parseProperties :: Object -> Grammar 'Obj t1 t2 -> t1 -> Parser t2 parseProperties obj = \case Id -> return g1 :. g2 -> parseProperties obj g2 >=> parseProperties obj g1 Empty -> \_ -> fail "empty grammar" g1 :<> g2 -> parseProperties obj g1 <> parseProperties obj g2 Pure f _ -> ...
445
parseProperties obj = \case Id -> return g1 :. g2 -> parseProperties obj g2 >=> parseProperties obj g1 Empty -> \_ -> fail "empty grammar" g1 :<> g2 -> parseProperties obj g1 <> parseProperties obj g2 Pure f _ -> f Many g -> manyM (parseProperties obj g) Property n g -...
378
false
true
0
14
136
186
86
100
null
null
HackerspaceBielefeld/Nextride
nextride.hs
bsd-2-clause
getTrain :: [Tag BL.ByteString] -> BL.ByteString getTrain [] = ""
65
getTrain :: [Tag BL.ByteString] -> BL.ByteString getTrain [] = ""
65
getTrain [] = ""
16
false
true
0
9
9
36
16
20
null
null
patrickherrmann/sudoku
src/Sudoku.hs
mit
emptyBoard :: Board emptyBoard = listArray boardBounds $ repeat vals
68
emptyBoard :: Board emptyBoard = listArray boardBounds $ repeat vals
68
emptyBoard = listArray boardBounds $ repeat vals
48
false
true
0
6
9
27
11
16
null
null
fmapfmapfmap/amazonka
amazonka-route53-domains/gen/Network/AWS/Route53Domains/ListTagsForDomain.hs
mpl-2.0
-- | The domain for which you want to get a list of tags. ltfdDomainName :: Lens' ListTagsForDomain Text ltfdDomainName = lens _ltfdDomainName (\ s a -> s{_ltfdDomainName = a})
176
ltfdDomainName :: Lens' ListTagsForDomain Text ltfdDomainName = lens _ltfdDomainName (\ s a -> s{_ltfdDomainName = a})
118
ltfdDomainName = lens _ltfdDomainName (\ s a -> s{_ltfdDomainName = a})
71
true
true
1
9
29
43
22
21
null
null
FranklinChen/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
-- | Like 'bindAll', but the 'Binder's are 'TT' terms instead. -- The first argument is a function to map @TT@ terms to @Binder@s. -- This function might often be something like 'Lam', which directly -- constructs a @Binder@ from a @TT@ term. bindTyArgs :: (TT n -> Binder (TT n)) -> [(n, TT n)] -> TT n -> TT n bindTyAr...
371
bindTyArgs :: (TT n -> Binder (TT n)) -> [(n, TT n)] -> TT n -> TT n bindTyArgs b xs = bindAll (map (\ (n, ty) -> (n, b ty)) xs)
128
bindTyArgs b xs = bindAll (map (\ (n, ty) -> (n, b ty)) xs)
59
true
true
0
11
74
107
56
51
null
null
afwlehmann/rhm-io-iter
src/RHM/Intern/Pure.hs
bsd-3-clause
evalIteratee (Error msg) = error msg
36
evalIteratee (Error msg) = error msg
36
evalIteratee (Error msg) = error msg
36
false
false
0
7
5
18
8
10
null
null
Fedjmike/ngen
english.hs
gpl-3.0
an = extendNP $ \number _ _ phrase -> let firstLetter = head $ head phrase determiner = if isVowel firstLetter then "an" else "a" in if number == P then phrase else determiner : phrase
200
an = extendNP $ \number _ _ phrase -> let firstLetter = head $ head phrase determiner = if isVowel firstLetter then "an" else "a" in if number == P then phrase else determiner : phrase
200
an = extendNP $ \number _ _ phrase -> let firstLetter = head $ head phrase determiner = if isVowel firstLetter then "an" else "a" in if number == P then phrase else determiner : phrase
200
false
false
1
12
51
75
37
38
null
null
rvion/stack
src/Stack/PackageDump.hs
bsd-3-clause
stripPrefixBS :: ByteString -> ByteString -> Maybe ByteString stripPrefixBS x y | x `S.isPrefixOf` y = Just $ S.drop (S.length x) y | otherwise = Nothing
161
stripPrefixBS :: ByteString -> ByteString -> Maybe ByteString stripPrefixBS x y | x `S.isPrefixOf` y = Just $ S.drop (S.length x) y | otherwise = Nothing
161
stripPrefixBS x y | x `S.isPrefixOf` y = Just $ S.drop (S.length x) y | otherwise = Nothing
99
false
true
1
10
33
68
33
35
null
null
mzini/termlib
Termlib/Problem/XmlParser.hs
gpl-3.0
parseRule :: Content i -> Parser R.Rule parseRule doc = liftM2 R.Rule parseLhs parseRhs where parseLhs,parseRhs :: Parser Term parseLhs = parseOne err parseTerm $ cElems `o` (tag "rule" /> tag "lhs") $ doc parseRhs = parseOne err parseTerm $ cElems `o` (tag "rule" /> tag "rhs") $ doc err = thr...
347
parseRule :: Content i -> Parser R.Rule parseRule doc = liftM2 R.Rule parseLhs parseRhs where parseLhs,parseRhs :: Parser Term parseLhs = parseOne err parseTerm $ cElems `o` (tag "rule" /> tag "lhs") $ doc parseRhs = parseOne err parseTerm $ cElems `o` (tag "rule" /> tag "rhs") $ doc err = thr...
347
parseRule doc = liftM2 R.Rule parseLhs parseRhs where parseLhs,parseRhs :: Parser Term parseLhs = parseOne err parseTerm $ cElems `o` (tag "rule" /> tag "lhs") $ doc parseRhs = parseOne err parseTerm $ cElems `o` (tag "rule" /> tag "rhs") $ doc err = throwError $ MalformedRule doc
307
false
true
6
9
80
152
68
84
null
null
gorkinovich/Haskell
Problems/Problem0018.hs
mit
movr :: Int movr = 1
20
movr :: Int movr = 1
20
movr = 1
8
false
true
0
6
5
18
7
11
null
null
sol/tinc
src/Tinc/Install.hs
mit
generateCabalFile :: Hpack.Dependencies -> IO (FilePath, String) generateCabalFile additionalDeps = do hasHpackConfig <- Hpack.doesConfigExist cabalFiles <- getCabalFiles "." case cabalFiles of _ | hasHpackConfig -> renderHpack [] | not (additionalDeps == mempty) -> return generated [cabalFile] -> reu...
743
generateCabalFile :: Hpack.Dependencies -> IO (FilePath, String) generateCabalFile additionalDeps = do hasHpackConfig <- Hpack.doesConfigExist cabalFiles <- getCabalFiles "." case cabalFiles of _ | hasHpackConfig -> renderHpack [] | not (additionalDeps == mempty) -> return generated [cabalFile] -> reu...
743
generateCabalFile additionalDeps = do hasHpackConfig <- Hpack.doesConfigExist cabalFiles <- getCabalFiles "." case cabalFiles of _ | hasHpackConfig -> renderHpack [] | not (additionalDeps == mempty) -> return generated [cabalFile] -> reuseExisting cabalFile [] -> die "No cabal file found." _ -...
678
false
true
3
15
142
228
111
117
null
null
aleksj/lamdu
bottlelib/Graphics/UI/GLFW/Events.hs
gpl-3.0
isPressFromKeyState :: GLFW.KeyState -> IsPress isPressFromKeyState GLFW.KeyState'Pressed = Press
97
isPressFromKeyState :: GLFW.KeyState -> IsPress isPressFromKeyState GLFW.KeyState'Pressed = Press
97
isPressFromKeyState GLFW.KeyState'Pressed = Press
49
false
true
0
6
8
22
11
11
null
null
soupi/pureli
src/Language/Pureli/Module.hs
bsd-3-clause
filterListMap _ [] = return []
31
filterListMap _ [] = return []
31
filterListMap _ [] = return []
31
false
false
0
6
6
18
8
10
null
null
danplubell/CTG1371
library/Data/CTG1371/Internal/Types.hs
mit
-- | Set the fetal movement value for the first heart rate value setHR1FetalMovement :: FetalMovement -> HR1 -> HR1 setHR1FetalMovement = set fmp
145
setHR1FetalMovement :: FetalMovement -> HR1 -> HR1 setHR1FetalMovement = set fmp
80
setHR1FetalMovement = set fmp
29
true
true
0
6
23
23
12
11
null
null
haskell/haddock
haddock-api/src/Haddock/Interface/Rename.hs
bsd-2-clause
renameType :: HsType GhcRn -> RnM (HsType DocNameI) renameType t = case t of HsForAllTy { hst_tele = tele, hst_body = ltype } -> do tele' <- renameHsForAllTelescope tele ltype' <- renameLType ltype return (HsForAllTy { hst_xforall = noAnn , hst_tele = tele', hst_body = ltype' }) ...
2,227
renameType :: HsType GhcRn -> RnM (HsType DocNameI) renameType t = case t of HsForAllTy { hst_tele = tele, hst_body = ltype } -> do tele' <- renameHsForAllTelescope tele ltype' <- renameLType ltype return (HsForAllTy { hst_xforall = noAnn , hst_tele = tele', hst_body = ltype' }) ...
2,227
renameType t = case t of HsForAllTy { hst_tele = tele, hst_body = ltype } -> do tele' <- renameHsForAllTelescope tele ltype' <- renameLType ltype return (HsForAllTy { hst_xforall = noAnn , hst_tele = tele', hst_body = ltype' }) HsQualTy { hst_ctxt = lcontext , hst_body = ltype }...
2,175
false
true
33
10
608
768
368
400
null
null
contivero/hasmin
src/Hasmin/Parser/Utils.hs
bsd-3-clause
parserFromPairs :: [(Text, Parser a)] -> Parser a parserFromPairs ls = do i <- ident let t = T.toLower i fromMaybe mzero (Map.lookup t m) where m = Map.fromList ls
177
parserFromPairs :: [(Text, Parser a)] -> Parser a parserFromPairs ls = do i <- ident let t = T.toLower i fromMaybe mzero (Map.lookup t m) where m = Map.fromList ls
177
parserFromPairs ls = do i <- ident let t = T.toLower i fromMaybe mzero (Map.lookup t m) where m = Map.fromList ls
127
false
true
0
11
43
85
40
45
null
null
jimsnow/glome
GlomeVec/Data/Glome/Vec.hs
gpl-2.0
-- | Multiply two matricies. This is unrolled for efficiency, and it's also -- a little bit easier (in my opinion) to see what's going on. mat_mult :: Matrix -> Matrix -> Matrix mat_mult (Matrix a00 a01 a02 a03 a10 a11 a12 a13 a20 a21 a22 a23) (Matrix b00 b01 b02 b03 b10 b11 b12 b13 b20 b21 b22 b23) = Ma...
740
mat_mult :: Matrix -> Matrix -> Matrix mat_mult (Matrix a00 a01 a02 a03 a10 a11 a12 a13 a20 a21 a22 a23) (Matrix b00 b01 b02 b03 b10 b11 b12 b13 b20 b21 b22 b23) = Matrix (a00*b00 + a01*b10 + a02*b20) (a00*b01 + a01*b11 + a02*b21) (a00*b02 + a01*b12 + a02*b22) (a00*b03 + a01*b13 + a02*b23 + a0...
600
mat_mult (Matrix a00 a01 a02 a03 a10 a11 a12 a13 a20 a21 a22 a23) (Matrix b00 b01 b02 b03 b10 b11 b12 b13 b20 b21 b22 b23) = Matrix (a00*b00 + a01*b10 + a02*b20) (a00*b01 + a01*b11 + a02*b21) (a00*b02 + a01*b12 + a02*b22) (a00*b03 + a01*b13 + a02*b23 + a03) (a10*b00 + a11*b10 + a12*b20) ...
561
true
true
0
11
180
406
204
202
null
null
vikraman/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
mkNonCanonicalCt :: Ct -> Ct mkNonCanonicalCt ct = CNonCanonical { cc_ev = cc_ev ct }
85
mkNonCanonicalCt :: Ct -> Ct mkNonCanonicalCt ct = CNonCanonical { cc_ev = cc_ev ct }
85
mkNonCanonicalCt ct = CNonCanonical { cc_ev = cc_ev ct }
56
false
true
0
8
14
35
16
19
null
null
coccinelle/hBugs
src/Config.hs
gpl-2.0
version_msg = "hBugs v0.1"
26
version_msg = "hBugs v0.1"
26
version_msg = "hBugs v0.1"
26
false
false
0
4
3
6
3
3
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F08.hs
bsd-3-clause
-- glFragmentLightfSGIX -------------------------------------------------------- glFragmentLightfSGIX :: MonadIO m => GLenum -- ^ @light@ of type [FragmentLightNameSGIX](Graphics-GL-Groups.html#FragmentLightNameSGIX). -> GLenum -- ^ @pname@ of type [FragmentLightParameterSGIX](Graphics-GL-Groups.html#FragmentLig...
481
glFragmentLightfSGIX :: MonadIO m => GLenum -- ^ @light@ of type [FragmentLightNameSGIX](Graphics-GL-Groups.html#FragmentLightNameSGIX). -> GLenum -- ^ @pname@ of type [FragmentLightParameterSGIX](Graphics-GL-Groups.html#FragmentLightParameterSGIX). -> GLfloat -- ^ @param@ of type @CheckedFloat32@. -> m () gl...
399
glFragmentLightfSGIX v1 v2 v3 = liftIO $ dyn168 ptr_glFragmentLightfSGIX v1 v2 v3
81
true
true
2
11
56
64
31
33
null
null
shlevy/ghc
compiler/typecheck/TcSigs.hs
bsd-3-clause
ppr_tvs :: [TyVar] -> SDoc ppr_tvs tvs = braces (vcat [ ppr tv <+> dcolon <+> ppr (tyVarKind tv) | tv <- tvs])
137
ppr_tvs :: [TyVar] -> SDoc ppr_tvs tvs = braces (vcat [ ppr tv <+> dcolon <+> ppr (tyVarKind tv) | tv <- tvs])
137
ppr_tvs tvs = braces (vcat [ ppr tv <+> dcolon <+> ppr (tyVarKind tv) | tv <- tvs])
110
false
true
0
12
49
61
30
31
null
null
sawaken/pure-lisp.hs
src/Object.hs
mit
cdr :: Obj -> Obj cdr (Cons _ y) = y
36
cdr :: Obj -> Obj cdr (Cons _ y) = y
36
cdr (Cons _ y) = y
18
false
true
0
9
10
32
14
18
null
null
amtal/soyuz
DCPU16/Assembly/Printer.hs
mit
pO o = text . map toLower . show $ o
36
pO o = text . map toLower . show $ o
36
pO o = text . map toLower . show $ o
36
false
false
0
8
10
24
11
13
null
null
julienschmaltz/madl
test/app/Parser/TypeCheckerTest.hs
mit
incorrectReturnTypeTest2 :: String incorrectReturnTypeTest2 = "const a;\n\ \function f () : a {0};"
107
incorrectReturnTypeTest2 :: String incorrectReturnTypeTest2 = "const a;\n\ \function f () : a {0};"
107
incorrectReturnTypeTest2 = "const a;\n\ \function f () : a {0};"
72
false
true
0
4
20
11
6
5
null
null
nwolverson/psc-ide
src/PureScript/Ide/Filter.hs
mit
mkFilter :: ([Module] -> [Module]) -> Filter mkFilter = Filter . Endo
69
mkFilter :: ([Module] -> [Module]) -> Filter mkFilter = Filter . Endo
69
mkFilter = Filter . Endo
24
false
true
0
8
11
32
18
14
null
null
Chaddai/CurveProject
high-school-plotting/uiSrc/Widgets.hs
bsd-3-clause
uploadButton :: UI (Element, (String -> UI a) -> UI ()) uploadButton = do fileIn <- UI.input # set UI.id_ "file" # set UI.type_ "file" bIn <- stepper "Starting from NULL" $ UI.valueChange fileIn let installHandler h = do w <- UI.askWindow handler <- UI.ffiExport (\s -> runUI w $ do ...
505
uploadButton :: UI (Element, (String -> UI a) -> UI ()) uploadButton = do fileIn <- UI.input # set UI.id_ "file" # set UI.type_ "file" bIn <- stepper "Starting from NULL" $ UI.valueChange fileIn let installHandler h = do w <- UI.askWindow handler <- UI.ffiExport (\s -> runUI w $ do ...
505
uploadButton = do fileIn <- UI.input # set UI.id_ "file" # set UI.type_ "file" bIn <- stepper "Starting from NULL" $ UI.valueChange fileIn let installHandler h = do w <- UI.askWindow handler <- UI.ffiExport (\s -> runUI w $ do h s ...
449
false
true
0
21
199
185
83
102
null
null
abakst/liquidhaskell
src/Language/Haskell/Liquid/UX/Annotate.hs
bsd-3-clause
collapseA (AI m) = AI (fmap pickOneA m)
39
collapseA (AI m) = AI (fmap pickOneA m)
39
collapseA (AI m) = AI (fmap pickOneA m)
39
false
false
0
7
7
27
12
15
null
null
nevrenato/Hets_Fork
Common/Prec.hs
gpl-2.0
mkPrecIntMap :: Rel.Rel Id -> PrecMap mkPrecIntMap r = let (m, t) = Rel.toPrecMap r in emptyPrecMap { precMap = m , maxWeight = t }
188
mkPrecIntMap :: Rel.Rel Id -> PrecMap mkPrecIntMap r = let (m, t) = Rel.toPrecMap r in emptyPrecMap { precMap = m , maxWeight = t }
188
mkPrecIntMap r = let (m, t) = Rel.toPrecMap r in emptyPrecMap { precMap = m , maxWeight = t }
150
false
true
0
10
82
69
33
36
null
null
michaxm/dynamic-linking-exploration
testlibs/testlibFFI/src/Lib.hs
bsd-3-clause
someFunc :: String -> String someFunc = (++ " appended")
56
someFunc :: String -> String someFunc = (++ " appended")
56
someFunc = (++ " appended")
27
false
true
0
5
9
19
11
8
null
null
bergmannf/gitit
src/Network/Gitit/Page.hs
gpl-2.0
pMetadataBlock :: GenParser Char st ([(String, String)], String) pMetadataBlock = try $ do _ <- string "---" _ <- pBlankline ls <- manyTill pMetadataLine pMetaEnd skipMany pBlankline rest <- getInput return (ls, rest)
229
pMetadataBlock :: GenParser Char st ([(String, String)], String) pMetadataBlock = try $ do _ <- string "---" _ <- pBlankline ls <- manyTill pMetadataLine pMetaEnd skipMany pBlankline rest <- getInput return (ls, rest)
229
pMetadataBlock = try $ do _ <- string "---" _ <- pBlankline ls <- manyTill pMetadataLine pMetaEnd skipMany pBlankline rest <- getInput return (ls, rest)
164
false
true
0
9
44
91
44
47
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
57 = 56
7
57 = 56
7
57 = 56
7
false
false
1
5
2
10
3
7
null
null
simonmichael/shelltestrunner
src/Types.hs
gpl-3.0
showMatcherTrimmed :: Matcher -> String showMatcherTrimmed (PositiveRegex r) = "/"++(trim r)++"/"
99
showMatcherTrimmed :: Matcher -> String showMatcherTrimmed (PositiveRegex r) = "/"++(trim r)++"/"
99
showMatcherTrimmed (PositiveRegex r) = "/"++(trim r)++"/"
59
false
true
0
8
12
42
20
22
null
null
mumuki/mulang
src/Language/Mulang/Parsers/JavaScript.hs
gpl-3.0
muJSAST (JSAstLiteral expression _) = muJSExpression expression
67
muJSAST (JSAstLiteral expression _) = muJSExpression expression
67
muJSAST (JSAstLiteral expression _) = muJSExpression expression
67
false
false
0
7
10
20
9
11
null
null
dmpots/fibon
Setup.hs
bsd-3-clause
deleteLocalConf _ _ _ _ = do deleteIfExists (localConfigsFileName configDir)
78
deleteLocalConf _ _ _ _ = do deleteIfExists (localConfigsFileName configDir)
78
deleteLocalConf _ _ _ _ = do deleteIfExists (localConfigsFileName configDir)
78
false
false
0
9
11
27
12
15
null
null
spechub/Hets
CASL/SymbolParser.hs
gpl-2.0
symbItem :: [String] -> AParser st SYMB_ITEMS symbItem ks = do i <- symb ks Implicit return $ Symb_items Implicit [i] $ getRange i <|> do (k, p) <- symbKind i <- symb ks k return $ Symb_items k [i] $ catRange [p] -- | parse a comma separated list of symbols
280
symbItem :: [String] -> AParser st SYMB_ITEMS symbItem ks = do i <- symb ks Implicit return $ Symb_items Implicit [i] $ getRange i <|> do (k, p) <- symbKind i <- symb ks k return $ Symb_items k [i] $ catRange [p] -- | parse a comma separated list of symbols
280
symbItem ks = do i <- symb ks Implicit return $ Symb_items Implicit [i] $ getRange i <|> do (k, p) <- symbKind i <- symb ks k return $ Symb_items k [i] $ catRange [p] -- | parse a comma separated list of symbols
234
false
true
3
11
74
119
57
62
null
null
nishiuramakoto/erasm-plusplus
src/haskell/ErasmCommon.hs
gpl-3.0
uniqBy :: (a -> a -> Bool) -> [a] -> [a] uniqBy cmp xs = map head $ groupBy cmp xs
83
uniqBy :: (a -> a -> Bool) -> [a] -> [a] uniqBy cmp xs = map head $ groupBy cmp xs
83
uniqBy cmp xs = map head $ groupBy cmp xs
41
false
true
0
8
21
57
28
29
null
null
sajit/learnyou
haskell/src/baby.hs
mit
luckyGiroo 3 = "Three"
22
luckyGiroo 3 = "Three"
22
luckyGiroo 3 = "Three"
22
false
false
0
5
3
9
4
5
null
null
narinari/xmonad-ubuntu-conf
xmonad.hs
mit
mergePPOutputs :: [PP -> X String] -> PP -> X String mergePPOutputs x pp = fmap (intercalate (ppSep pp)) . sequence . sequence x $ pp
133
mergePPOutputs :: [PP -> X String] -> PP -> X String mergePPOutputs x pp = fmap (intercalate (ppSep pp)) . sequence . sequence x $ pp
133
mergePPOutputs x pp = fmap (intercalate (ppSep pp)) . sequence . sequence x $ pp
80
false
true
0
12
25
67
32
35
null
null
music-suite/music-score
src/Music/Score/Articulation.hs
bsd-3-clause
staccatissimo :: (HasArticulations' s, Articulation s ~ a, Articulated a) => s -> s staccatissimo = set (articulations . separation) 2
134
staccatissimo :: (HasArticulations' s, Articulation s ~ a, Articulated a) => s -> s staccatissimo = set (articulations . separation) 2
134
staccatissimo = set (articulations . separation) 2
50
false
true
0
8
20
53
27
26
null
null
nevrenato/HetsAlloy
Maude/PreComorphism.hs
gpl-2.0
-- | creates a implication formula distinguishing the size of the premises createImpForm :: CAS.CASLFORMULA -> CAS.CASLFORMULA -> CAS.CASLFORMULA createImpForm (CAS.Atom True _) form = form
189
createImpForm :: CAS.CASLFORMULA -> CAS.CASLFORMULA -> CAS.CASLFORMULA createImpForm (CAS.Atom True _) form = form
114
createImpForm (CAS.Atom True _) form = form
43
true
true
0
8
25
41
21
20
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/enumFromThenTo_6.hs
mit
primEqInt (Neg Zero) (Neg Zero) = MyTrue
40
primEqInt (Neg Zero) (Neg Zero) = MyTrue
40
primEqInt (Neg Zero) (Neg Zero) = MyTrue
40
false
false
0
7
6
23
11
12
null
null
wayofthepie/sip
test/ProcNet.hs
mit
netDevpExpectedTwo :: NetDeviceInfo netDevpExpectedTwo = NetDeviceInfo { _deviceName = "lo" , _rcvBytes = "0" , _rcvPackets = "0" , _rcvErrors = "0" , _rcvDrop = "0" , _rcvFifo = "0" , _rcvFrame = "0" , _rcvCompressed = "0" , _rcvMulticast = "0" , _transBytes = "0" , _transPa...
487
netDevpExpectedTwo :: NetDeviceInfo netDevpExpectedTwo = NetDeviceInfo { _deviceName = "lo" , _rcvBytes = "0" , _rcvPackets = "0" , _rcvErrors = "0" , _rcvDrop = "0" , _rcvFifo = "0" , _rcvFrame = "0" , _rcvCompressed = "0" , _rcvMulticast = "0" , _transBytes = "0" , _transPa...
487
netDevpExpectedTwo = NetDeviceInfo { _deviceName = "lo" , _rcvBytes = "0" , _rcvPackets = "0" , _rcvErrors = "0" , _rcvDrop = "0" , _rcvFifo = "0" , _rcvFrame = "0" , _rcvCompressed = "0" , _rcvMulticast = "0" , _transBytes = "0" , _transPackets = "0" , _transErrors = "0"...
451
false
true
0
6
146
115
75
40
null
null
vladimir-ipatov/ganeti
src/Ganeti/Constants.hs
gpl-2.0
cvEnoderpc :: (String, String, String) cvEnoderpc = ("node", Types.cVErrorCodeToRaw CvENODERPC, "Error during connection to the primary node of an instance")
165
cvEnoderpc :: (String, String, String) cvEnoderpc = ("node", Types.cVErrorCodeToRaw CvENODERPC, "Error during connection to the primary node of an instance")
165
cvEnoderpc = ("node", Types.cVErrorCodeToRaw CvENODERPC, "Error during connection to the primary node of an instance")
126
false
true
0
8
27
41
21
20
null
null
tidalcycles/tidal-midi
Sound/Tidal/MIDI/CC.hs
gpl-3.0
(cc10, cc10_p) = pF "cc10" (Just 0)
35
(cc10, cc10_p) = pF "cc10" (Just 0)
35
(cc10, cc10_p) = pF "cc10" (Just 0)
35
false
false
0
6
6
25
12
13
null
null
plaimi/tempuhs-server
test/Tempuhs/Spoc/Assert.hs
agpl-3.0
assertBool :: String -> Bool -> Session () -- | 'assertBool' lifts 'HU.assertBool' from the 'IO' monad. assertBool = liftIO .: HU.assertBool
140
assertBool :: String -> Bool -> Session () assertBool = liftIO .: HU.assertBool
79
assertBool = liftIO .: HU.assertBool
36
true
true
0
8
21
31
16
15
null
null
kbiscanic/PUH
hw02/homework.hs
mit
-- 8b) The function size that returns the dimensions of a n x m matrix as a tuple (n,m). size mat | isWellFormed mat = (length mat, length (mat !! 0)) | otherwise = error "Matrix is malformed"
209
size mat | isWellFormed mat = (length mat, length (mat !! 0)) | otherwise = error "Matrix is malformed"
120
size mat | isWellFormed mat = (length mat, length (mat !! 0)) | otherwise = error "Matrix is malformed"
120
true
false
0
9
54
55
25
30
null
null
BartAdv/idris-cil
src/IRTS/CodegenCil.hs
bsd-3-clause
cgOp (LPlus (ATInt _)) args = intOp add args
49
cgOp (LPlus (ATInt _)) args = intOp add args
49
cgOp (LPlus (ATInt _)) args = intOp add args
49
false
false
1
9
13
30
13
17
null
null
jonathankochems/hs-crypto-cipher
src/Crypto/Internal.hs
bsd-3-clause
myUnpack :: String -> [Int] myUnpack = map (fromIntegral . ord)
63
myUnpack :: String -> [Int] myUnpack = map (fromIntegral . ord)
63
myUnpack = map (fromIntegral . ord)
35
false
true
0
8
10
35
16
19
null
null
fpco/hedis
test/Test.hs
bsd-3-clause
testKeys :: Test testKeys = testCase "keys" $ do set "key" "value" >>=? Ok get "key" >>=? Just "value" exists "key" >>=? True keys "*" >>=? ["key"] randomkey >>=? Just "key" move "key" 13 >>=? True select 13 >>=? Ok ex...
734
testKeys :: Test testKeys = testCase "keys" $ do set "key" "value" >>=? Ok get "key" >>=? Just "value" exists "key" >>=? True keys "*" >>=? ["key"] randomkey >>=? Just "key" move "key" 13 >>=? True select 13 >>=? Ok ex...
734
testKeys = testCase "keys" $ do set "key" "value" >>=? Ok get "key" >>=? Just "value" exists "key" >>=? True keys "*" >>=? ["key"] randomkey >>=? Just "key" move "key" 13 >>=? True select 13 >>=? Ok expire "key" 1 ...
717
false
true
0
10
298
268
117
151
null
null
adityagupta1089/Project-Euler-Haskell
src/problems/Problem504.hs
bsd-3-clause
main :: IO () -- A(a, 0), B(0, b), C(−c, 0), D(0, −d) -- we can swap A<->C or B<->D main = print count where m = 100 isPerfectSquare n = let root = floor . sqrt . fromIntegral $ n in root * root == n count = length $ filter isPerfectSquare [ (cnts M.! (a, b)) -- AB + (cn...
929
main :: IO () main = print count where m = 100 isPerfectSquare n = let root = floor . sqrt . fromIntegral $ n in root * root == n count = length $ filter isPerfectSquare [ (cnts M.! (a, b)) -- AB + (cnts M.! (c, b)) -- BC + (cnts M.! (c, d)) -- CD + (...
859
main = print count where m = 100 isPerfectSquare n = let root = floor . sqrt . fromIntegral $ n in root * root == n count = length $ filter isPerfectSquare [ (cnts M.! (a, b)) -- AB + (cnts M.! (c, b)) -- BC + (cnts M.! (c, d)) -- CD + (cnts M.! (a, d...
845
true
true
16
14
368
403
219
184
null
null
josefs/autosar
ARSim/arsim/AUTOSAR/ARSim.hs
bsd-3-clause
rteReceive rqe = singleton $ Receive rqe
51
rteReceive rqe = singleton $ Receive rqe
51
rteReceive rqe = singleton $ Receive rqe
51
false
false
0
6
17
16
7
9
null
null
shockkolate/containers
Data/Map/Strict.hs
bsd-3-clause
mapWithKey f (Bin sx kx x l r) = let x' = f kx x in x' `seq` Bin sx kx x' (mapWithKey f l) (mapWithKey f r)
111
mapWithKey f (Bin sx kx x l r) = let x' = f kx x in x' `seq` Bin sx kx x' (mapWithKey f l) (mapWithKey f r)
111
mapWithKey f (Bin sx kx x l r) = let x' = f kx x in x' `seq` Bin sx kx x' (mapWithKey f l) (mapWithKey f r)
111
false
false
0
9
31
83
37
46
null
null
Zigazou/deadlink
src/Network/URI/Text.hs
gpl-3.0
notMatching :: Show a => GenParser tok a -> GenParser tok () notMatching p = do { a <- try p ; unexpected (show a) } <|> return ()
130
notMatching :: Show a => GenParser tok a -> GenParser tok () notMatching p = do { a <- try p ; unexpected (show a) } <|> return ()
130
notMatching p = do { a <- try p ; unexpected (show a) } <|> return ()
69
false
true
0
10
28
75
34
41
null
null
Axiomatic-/nano-md5
tests/Main.hs
bsd-3-clause
toString :: [Word8] -> String toString = unpack . pack
54
toString :: [Word8] -> String toString = unpack . pack
54
toString = unpack . pack
24
false
true
0
6
9
22
12
10
null
null
ejlilley/AbstractMusic
MusicGraph.hs
gpl-3.0
findNode x g = first (\(n :~> _) -> n == x) (nodes g)
53
findNode x g = first (\(n :~> _) -> n == x) (nodes g)
53
findNode x g = first (\(n :~> _) -> n == x) (nodes g)
53
false
false
0
9
13
41
21
20
null
null
ganeti-github-testing/ganeti-test-1
src/Ganeti/Constants.hs
bsd-2-clause
drbdDynamicResync :: String drbdDynamicResync = "dynamic-resync"
64
drbdDynamicResync :: String drbdDynamicResync = "dynamic-resync"
64
drbdDynamicResync = "dynamic-resync"
36
false
true
0
4
5
11
6
5
null
null
ghcjs/ghcjs
src/Compiler/Plugins.hs
mit
throwCmdLineErrorS :: DynFlags -> SDoc -> IO a throwCmdLineErrorS dflags = throwCmdLineError . showSDoc dflags
110
throwCmdLineErrorS :: DynFlags -> SDoc -> IO a throwCmdLineErrorS dflags = throwCmdLineError . showSDoc dflags
110
throwCmdLineErrorS dflags = throwCmdLineError . showSDoc dflags
63
false
true
0
8
14
36
16
20
null
null
y-kamiya/parallel-concurrent-haskell
src/Stm/Main.hs
gpl-2.0
tlist :: IO () tlist = do l <- atomically TList.newTList _ <- forkIO $ replicateM_ 100 $ atomically $ TList.writeTList l "123" _ <-forkIO $ forever $ do s <- atomically $ TList.readTList l print $ "fork thread: " ++ s replicateM_ 10 $ do s <- atomically $ TList.readTList l print $ "main thread:...
340
tlist :: IO () tlist = do l <- atomically TList.newTList _ <- forkIO $ replicateM_ 100 $ atomically $ TList.writeTList l "123" _ <-forkIO $ forever $ do s <- atomically $ TList.readTList l print $ "fork thread: " ++ s replicateM_ 10 $ do s <- atomically $ TList.readTList l print $ "main thread:...
340
tlist = do l <- atomically TList.newTList _ <- forkIO $ replicateM_ 100 $ atomically $ TList.writeTList l "123" _ <-forkIO $ forever $ do s <- atomically $ TList.readTList l print $ "fork thread: " ++ s replicateM_ 10 $ do s <- atomically $ TList.readTList l print $ "main thread: " ++ s retu...
325
false
true
0
14
88
144
64
80
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | Dimension value for the ID of the floodlight configuration. This is a -- read-only, auto-generated field. fagFloodlightConfigurationIdDimensionValue :: Lens' FloodlightActivityGroup (Maybe DimensionValue) fagFloodlightConfigurationIdDimensionValue = lens _fagFloodlightConfigurationIdDimensionValue (\ s a -...
382
fagFloodlightConfigurationIdDimensionValue :: Lens' FloodlightActivityGroup (Maybe DimensionValue) fagFloodlightConfigurationIdDimensionValue = lens _fagFloodlightConfigurationIdDimensionValue (\ s a -> s{_fagFloodlightConfigurationIdDimensionValue = a})
271
fagFloodlightConfigurationIdDimensionValue = lens _fagFloodlightConfigurationIdDimensionValue (\ s a -> s{_fagFloodlightConfigurationIdDimensionValue = a})
172
true
true
0
8
51
50
26
24
null
null
steven777400/TwilioIVR
src/Network/Wai/Twilio/RequestValidatorMiddleware.hs
mit
hmacsha1 = HMAC.hmac SHA1.hash 64
33
hmacsha1 = HMAC.hmac SHA1.hash 64
33
hmacsha1 = HMAC.hmac SHA1.hash 64
33
false
false
0
6
4
15
7
8
null
null
brendanhay/gogol
gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs
mpl-2.0
-- | The zero-based index of the rule that should be replaced or moved. ucfrrIndex :: Lens' UpdateConditionalFormatRuleRequest (Maybe Int32) ucfrrIndex = lens _ucfrrIndex (\ s a -> s{_ucfrrIndex = a}) . mapping _Coerce
226
ucfrrIndex :: Lens' UpdateConditionalFormatRuleRequest (Maybe Int32) ucfrrIndex = lens _ucfrrIndex (\ s a -> s{_ucfrrIndex = a}) . mapping _Coerce
154
ucfrrIndex = lens _ucfrrIndex (\ s a -> s{_ucfrrIndex = a}) . mapping _Coerce
85
true
true
1
9
41
59
28
31
null
null
iljakuklic/eel-proto
src/Builtins/Types.hs
bsd-3-clause
builtInType BIunpair = [a, b `x` c] ~~> [a, b, c]
49
builtInType BIunpair = [a, b `x` c] ~~> [a, b, c]
49
builtInType BIunpair = [a, b `x` c] ~~> [a, b, c]
49
false
false
1
7
10
38
20
18
null
null
narrative/stack
src/Stack/Config.hs
bsd-3-clause
resolvePackageEntry :: (MonadIO m, MonadThrow m, MonadReader env m, HasHttpManager env, MonadLogger m, MonadCatch m ,MonadBaseControl IO m, HasConfig env) => EnvOverride -> Path Abs Dir -- ^ project root -> PackageEntry -> m [(Path Abs Dir, TreatLikeExtraDep)] resolvePackageEntry menv projRoo...
658
resolvePackageEntry :: (MonadIO m, MonadThrow m, MonadReader env m, HasHttpManager env, MonadLogger m, MonadCatch m ,MonadBaseControl IO m, HasConfig env) => EnvOverride -> Path Abs Dir -- ^ project root -> PackageEntry -> m [(Path Abs Dir, TreatLikeExtraDep)] resolvePackageEntry menv projRoo...
658
resolvePackageEntry menv projRoot pe = do entryRoot <- resolvePackageLocation menv projRoot (peLocation pe) paths <- case peSubdirs pe of [] -> return [entryRoot] subs -> mapM (resolveDir entryRoot) subs return $ map (, peExtraDep pe) paths -- | Resolve a PackageLocation int...
370
false
true
0
14
159
199
97
102
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/ProjectPlanning.hs
bsd-3-clause
-- | Given the 'InstalledPackageIndex' for a nix-style package store, and an -- 'ElaboratedInstallPlan', replace configured source packages by pre-existing -- installed packages whenever they exist. -- improveInstallPlanWithPreExistingPackages :: InstalledPackageIndex -> Elabor...
1,226
improveInstallPlanWithPreExistingPackages :: InstalledPackageIndex -> ElaboratedInstallPlan -> ElaboratedInstallPlan improveInstallPlanWithPreExistingPackages installedPkgIndex installPlan = replaceWithPreExisting installPlan ...
1,024
improveInstallPlanWithPreExistingPackages installedPkgIndex installPlan = replaceWithPreExisting installPlan [ ipkg | InstallPlan.Configured pkg <- InstallPlan.reverseTopologicalOrder installPlan , ipkg <- maybeToList (canPackageBeImproved pkg) ] where --TODO: sanity checks: --...
823
true
true
1
10
315
139
69
70
null
null
johnfn/hcity
dist/dist-sandbox-7e2fc5ff/build/autogen/Paths_hcity.hs
mit
getBinDir, getLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath getBinDir = catchIO (getEnv "hcity_bindir") (\_ -> return bindir)
143
getBinDir, getLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath getBinDir = catchIO (getEnv "hcity_bindir") (\_ -> return bindir)
143
getBinDir = catchIO (getEnv "hcity_bindir") (\_ -> return bindir)
65
false
true
3
8
16
51
26
25
null
null
markflorisson/hpack
testrepo/bytestring-0.9.1.9/Data/ByteString/Lazy.hs
bsd-3-clause
dropWhile :: (Word8 -> Bool) -> ByteString -> ByteString dropWhile f cs0 = dropWhile' cs0 where dropWhile' Empty = Empty dropWhile' (Chunk c cs) = case findIndexOrEnd (not . f) c of n | n < S.length c -> Chunk (S.drop n c) cs | otherwise -> dropWhile' cs -- | '...
369
dropWhile :: (Word8 -> Bool) -> ByteString -> ByteString dropWhile f cs0 = dropWhile' cs0 where dropWhile' Empty = Empty dropWhile' (Chunk c cs) = case findIndexOrEnd (not . f) c of n | n < S.length c -> Chunk (S.drop n c) cs | otherwise -> dropWhile' cs -- | '...
369
dropWhile f cs0 = dropWhile' cs0 where dropWhile' Empty = Empty dropWhile' (Chunk c cs) = case findIndexOrEnd (not . f) c of n | n < S.length c -> Chunk (S.drop n c) cs | otherwise -> dropWhile' cs -- | 'break' @p@ is equivalent to @'span' ('not' . p)@.
312
false
true
1
14
118
126
60
66
null
null
jbetzend/Haskell-playground
Tableau/Tableau.hs
unlicense
neg (Implication p q) = Disjunction (Negation p) q
52
neg (Implication p q) = Disjunction (Negation p) q
52
neg (Implication p q) = Disjunction (Negation p) q
52
false
false
0
7
10
29
13
16
null
null
termite2/tsl
Frontend/Inline.hs
bsd-3-clause
isFairVarName :: String -> Bool isFairVarName n = (isJust $ fairProcVarPID n) || n == mkFairSchedVarName
104
isFairVarName :: String -> Bool isFairVarName n = (isJust $ fairProcVarPID n) || n == mkFairSchedVarName
104
isFairVarName n = (isJust $ fairProcVarPID n) || n == mkFairSchedVarName
72
false
true
0
9
15
36
18
18
null
null
GU-CLASP/TypedFlow
TypedFlow/TF.hs
lgpl-3.0
tailT0 :: forall n s t. KnownTyp t => KnownShape s => KnownNat n => T (n+1 ': s) t -> T (n ': s) t tailT0 xs = incrPos @n #> -- 0 < n+1 plusMinusAssoc @n @1 @1 #> -- (n+1) - 1 = -- n+ (1 - 1) slice0 @1 @(n+1) xs
249
tailT0 :: forall n s t. KnownTyp t => KnownShape s => KnownNat n => T (n+1 ': s) t -> T (n ': s) t tailT0 xs = incrPos @n #> -- 0 < n+1 plusMinusAssoc @n @1 @1 #> -- (n+1) - 1 = -- n+ (1 - 1) slice0 @1 @(n+1) xs
249
tailT0 xs = incrPos @n #> -- 0 < n+1 plusMinusAssoc @n @1 @1 #> -- (n+1) - 1 = -- n+ (1 - 1) slice0 @1 @(n+1) xs
149
false
true
0
13
92
124
62
62
null
null
llllllllll/befunge
Befunge/Doublefunge/Operations.hs
gpl-2.0
-- | Helper function to fPut. fPut' :: State -> Int32 -> Int32 -> Word8 -> IO State fPut' st y x v = if x > 79 || x < 0 || y > 24 || y < 0 then return st { stack = drop 3 $ stack st } else writeArray (playfield st) (intToWord y,intToWord x) v ...
363
fPut' :: State -> Int32 -> Int32 -> Word8 -> IO State fPut' st y x v = if x > 79 || x < 0 || y > 24 || y < 0 then return st { stack = drop 3 $ stack st } else writeArray (playfield st) (intToWord y,intToWord x) v >> return st { stack = drop 3...
333
fPut' st y x v = if x > 79 || x < 0 || y > 24 || y < 0 then return st { stack = drop 3 $ stack st } else writeArray (playfield st) (intToWord y,intToWord x) v >> return st { stack = drop 3 $ stack st }
279
true
true
0
12
149
147
73
74
null
null
capitanbatata/sandbox
on-dependency-injection-in-fp/a-weather-app/src/WeatherReporterFree.hs
gpl-3.0
fetch :: Free WeatherF WeatherData fetch = liftF $ Fetch id
59
fetch :: Free WeatherF WeatherData fetch = liftF $ Fetch id
59
fetch = liftF $ Fetch id
24
false
true
3
5
10
29
11
18
null
null
truls/language-vhdl-quote
src/Language/VHDL/Parser/Internal.hs
mpl-2.0
-------------------------------------------------------------------------------- -- -- -- 5 -- -- -- Specifications -- -------------------------------------------------------------------------------- --------------------------------------------------------...
1,318
attributeSpecification :: Parser AttributeSpecification attributeSpecification = try (reserved "attribute") >> AttributeSpecification <$> (attributeDesignator <* reserved "of") <*> (entitySpecification <* reserved "is") <*> expression <* semi
252
attributeSpecification = try (reserved "attribute") >> AttributeSpecification <$> (attributeDesignator <* reserved "of") <*> (entitySpecification <* reserved "is") <*> expression <* semi
196
true
true
0
12
337
73
41
32
null
null
apyrgio/ganeti
src/Ganeti/Hs2Py/OpDoc.hs
bsd-2-clause
opInstanceReinstall :: String opInstanceReinstall = "Reinstall an instance's OS."
83
opInstanceReinstall :: String opInstanceReinstall = "Reinstall an instance's OS."
83
opInstanceReinstall = "Reinstall an instance's OS."
53
false
true
0
4
10
11
6
5
null
null
ezyang/ghc
testsuite/tests/codeGen/should_run/CmmSwitchTest32.hs
bsd-3-clause
aq _ = 1337##
13
aq _ = 1337##
13
aq _ = 1337##
13
false
false
0
4
3
10
4
6
null
null
haasn/vimus
src/Vimus/WindowLayout.hs
mit
defaultColor :: Color defaultColor = Color (-1)
47
defaultColor :: Color defaultColor = Color (-1)
47
defaultColor = Color (-1)
25
false
true
0
6
6
25
11
14
null
null
pharaun/hGnucash
src/Types.hs
apache-2.0
cust n = XT.Name n (Just "http://www.gnucash.org/XML/cust") (Just "cust")
79
cust n = XT.Name n (Just "http://www.gnucash.org/XML/cust") (Just "cust")
79
cust n = XT.Name n (Just "http://www.gnucash.org/XML/cust") (Just "cust")
79
false
false
0
7
14
30
14
16
null
null
imalsogreg/tetrode-ephys
samples/watchpos.hs
gpl-3.0
eventUpdateWorld :: Event -> World -> IO World eventUpdateWorld (EventMotion (x',y')) (now, p,t,occ) = let --p' = Position 0 (Location ((r2 x')/ r2 gScale) ((r2 y') / r2 gScale) (p^.location.z)) -- (Angle 0 0 0) 0 0 ConfSure p' = stepPos p (realToFrac now) (Location ((realToFrac x')/realToF...
541
eventUpdateWorld :: Event -> World -> IO World eventUpdateWorld (EventMotion (x',y')) (now, p,t,occ) = let --p' = Position 0 (Location ((r2 x')/ r2 gScale) ((r2 y') / r2 gScale) (p^.location.z)) -- (Angle 0 0 0) 0 0 ConfSure p' = stepPos p (realToFrac now) (Location ((realToFrac x')/realToF...
541
eventUpdateWorld (EventMotion (x',y')) (now, p,t,occ) = let --p' = Position 0 (Location ((r2 x')/ r2 gScale) ((r2 y') / r2 gScale) (p^.location.z)) -- (Angle 0 0 0) 0 0 ConfSure p' = stepPos p (realToFrac now) (Location ((realToFrac x')/realToFrac gScale) ((realToFrac y') / real...
494
false
true
0
15
144
187
99
88
null
null
osa1/criterion
Criterion/Main/Options.hs
bsd-2-clause
match :: ReadM MatchType match = do m <- readerAsk case map toLower m of mm | mm `isPrefixOf` "pfx" -> return Prefix | mm `isPrefixOf` "prefix" -> return Prefix | mm `isPrefixOf` "glob" -> return Glob | mm `isPrefixOf` "pattern" -> return Pattern | mm `isPrefixOf` "ipatte...
473
match :: ReadM MatchType match = do m <- readerAsk case map toLower m of mm | mm `isPrefixOf` "pfx" -> return Prefix | mm `isPrefixOf` "prefix" -> return Prefix | mm `isPrefixOf` "glob" -> return Glob | mm `isPrefixOf` "pattern" -> return Pattern | mm `isPrefixOf` "ipatte...
473
match = do m <- readerAsk case map toLower m of mm | mm `isPrefixOf` "pfx" -> return Prefix | mm `isPrefixOf` "prefix" -> return Prefix | mm `isPrefixOf` "glob" -> return Glob | mm `isPrefixOf` "pattern" -> return Pattern | mm `isPrefixOf` "ipattern" -> return IPattern ...
448
false
true
0
14
176
153
71
82
null
null
ben-schulz/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
substNames :: Eq n => [(n, TT n)] -> TT n -> TT n substNames [] t = t
81
substNames :: Eq n => [(n, TT n)] -> TT n -> TT n substNames [] t = t
81
substNames [] t = t
31
false
true
0
10
30
56
26
30
null
null
andreagenso/java2scala
test/Main.hs
apache-2.0
test "tsp21" = tsp21
20
test "tsp21" = tsp21
20
test "tsp21" = tsp21
20
false
false
0
4
3
10
4
6
null
null
bgamari/pandoc
src/Text/Pandoc.hs
gpl-2.0
mkStringReader :: (ReaderOptions -> String -> Pandoc) -> Reader mkStringReader r = StringReader (\o s -> return $ r o s)
120
mkStringReader :: (ReaderOptions -> String -> Pandoc) -> Reader mkStringReader r = StringReader (\o s -> return $ r o s)
120
mkStringReader r = StringReader (\o s -> return $ r o s)
56
false
true
0
9
20
51
26
25
null
null
mkloczko/derive-storable
test/Basic/GenTestCases.hs
mit
c_prims = ["HsInt64", "HsInt32", "HsInt16", "HsInt8","HsDouble", "HsFloat"]
76
c_prims = ["HsInt64", "HsInt32", "HsInt16", "HsInt8","HsDouble", "HsFloat"]
76
c_prims = ["HsInt64", "HsInt32", "HsInt16", "HsInt8","HsDouble", "HsFloat"]
76
false
false
1
5
7
27
15
12
null
null
johanneshilden/hashids-haskell
src/Web/Hashids.hs
mit
-- | Create a context object using the default alphabet and the provided salt, -- without any minimum required length. hashidsSimple :: ByteString -- ^ Salt -> HashidsContext hashidsSimple salt = createHashidsContext salt 0 defaultAlphabet
261
hashidsSimple :: ByteString -- ^ Salt -> HashidsContext hashidsSimple salt = createHashidsContext salt 0 defaultAlphabet
140
hashidsSimple salt = createHashidsContext salt 0 defaultAlphabet
64
true
true
0
5
56
28
15
13
null
null
bitemyapp/machine-learning
src/Data/ML/Driver.hs
mit
load :: MonadDriver m => Serial1 (ModelOf m) => Serial (ScalarOf m) => FilePath -> m () load filePath = do bytes <- liftIO $ BS.readFile filePath let model = runGetL deserialize1 bytes setModel model -- | @train n@ trains the model for n iterations.
267
load :: MonadDriver m => Serial1 (ModelOf m) => Serial (ScalarOf m) => FilePath -> m () load filePath = do bytes <- liftIO $ BS.readFile filePath let model = runGetL deserialize1 bytes setModel model -- | @train n@ trains the model for n iterations.
267
load filePath = do bytes <- liftIO $ BS.readFile filePath let model = runGetL deserialize1 bytes setModel model -- | @train n@ trains the model for n iterations.
174
false
true
0
11
62
98
43
55
null
null
yairchu/ad
src/Numeric/AD/Mode/Forward.hs
bsd-3-clause
-- | Compute the gradient of a function using forward mode AD and the answer, and combine the result with the input using a -- user-specified function. -- -- Note, this performs /O(n)/ worse than 'Numeric.AD.Mode.Chain.gradWith'' for @n@ inputs, in exchange for better space utilization. -- -- >>> gradWith' (,) sum [0.....
522
gradWith' :: (Traversable f, Num a) => (a -> a -> b) -> (forall s. Mode s => f (AD s a) -> AD s a) -> f a -> (a, f b) gradWith' g f = bindWith' g (tangent . f)
159
gradWith' g f = bindWith' g (tangent . f)
41
true
true
0
14
95
120
64
56
null
null
hmgibson23/kwikup
Maven.hs
apache-2.0
deps :: Parser [Dependency] deps = dependencyParser `sepBy` char ','
68
deps :: Parser [Dependency] deps = dependencyParser `sepBy` char ','
68
deps = dependencyParser `sepBy` char ','
40
false
true
0
6
9
26
14
12
null
null
phischu/fragnix
benchmarks/containers/Data.IntSet.Base.hs
bsd-3-clause
branchMask :: Prefix -> Prefix -> Mask branchMask p1 p2 = intFromNat (highestBitMask (natFromInt p1 `xor` natFromInt p2))
123
branchMask :: Prefix -> Prefix -> Mask branchMask p1 p2 = intFromNat (highestBitMask (natFromInt p1 `xor` natFromInt p2))
123
branchMask p1 p2 = intFromNat (highestBitMask (natFromInt p1 `xor` natFromInt p2))
84
false
true
0
10
19
48
24
24
null
null
uwap/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
highestFC (PDisamb _ opts) = highestFC opts
43
highestFC (PDisamb _ opts) = highestFC opts
43
highestFC (PDisamb _ opts) = highestFC opts
43
false
false
0
7
6
20
9
11
null
null
ghc-android/ghc
compiler/codeGen/StgCmmMonad.hs
bsd-3-clause
-- | Generate code into a fresh tick (sub-)scope and gather generated code getCodeScoped :: FCode a -> FCode (a, CmmAGraphScoped) getCodeScoped fcode = do { state1 <- getState ; ((a, tscope), state2) <- tickScope $ flip withState state1 { cgs_stmts = mkNop } $ do { a <- ...
510
getCodeScoped :: FCode a -> FCode (a, CmmAGraphScoped) getCodeScoped fcode = do { state1 <- getState ; ((a, tscope), state2) <- tickScope $ flip withState state1 { cgs_stmts = mkNop } $ do { a <- fcode ; scp <- getTickScope ; return (a, scp)...
435
getCodeScoped fcode = do { state1 <- getState ; ((a, tscope), state2) <- tickScope $ flip withState state1 { cgs_stmts = mkNop } $ do { a <- fcode ; scp <- getTickScope ; return (a, scp) } ; setState $ state2 { cgs_stmts = cgs_stmts ...
380
true
true
0
12
171
152
82
70
null
null
adbrowne/dynamodb-eventstore
dynamodb-eventstore/tests/DynamoDbEventStore/GlobalFeedWriterSpec.hs
mit
pagedTestStateItems :: Int -> TestState pagedTestStateItems itemCount = let writeState = testStateItems itemCount feedEntries = (\x -> FeedEntry { feedEntryCount = 1 , feedEntryNumber = fromIntegral x , feedEntryS...
899
pagedTestStateItems :: Int -> TestState pagedTestStateItems itemCount = let writeState = testStateItems itemCount feedEntries = (\x -> FeedEntry { feedEntryCount = 1 , feedEntryNumber = fromIntegral x , feedEntryS...
899
pagedTestStateItems itemCount = let writeState = testStateItems itemCount feedEntries = (\x -> FeedEntry { feedEntryCount = 1 , feedEntryNumber = fromIntegral x , feedEntryStream = StreamId testStreamId ...
859
false
true
0
14
327
170
90
80
null
null
thalerjonathan/phd
public/towards/SugarScape/experimental/concurrent/src/SugarScape/Agent/Interface.hs
gpl-3.0
observable :: AgentOut m e o -> o observable = aoObservable
59
observable :: AgentOut m e o -> o observable = aoObservable
59
observable = aoObservable
25
false
true
0
7
10
29
12
17
null
null
giorgidze/igraph
Data/IGraph.hs
bsd-3-clause
-- | 2\.12\. `igraph_path_length_hist` — Create a histogram of all shortest path lengths. -- -- This function calculates a histogram, by calculating the shortest path length -- between each pair of vertices. For directed graphs both directions might be -- considered and then every pair of vertices appears twice in the ...
922
pathLengthHist :: Graph d a -> Bool -- ^ Whether to consider directed paths in a directed -- graph (if not zero). This argument is ignored for -- undirected graphs. -> ([Double],Double) pathLengthHist g b = unsafePerformIO $ do v <- newVecto...
591
pathLengthHist g b = unsafePerformIO $ do v <- newVector 0 d <- alloca $ \dp -> do _e <- withGraph g $ \gp -> withVector v $ \vp -> c_igraph_path_length_hist gp vp dp b realToFrac `fmap` peek dp l <- vectorToList v retu...
328
true
true
0
18
306
150
77
73
null
null
snoyberg/ghc
libraries/base/GHC/Enum.hs
bsd-3-clause
efdtCharFB :: (Char -> a -> a) -> a -> Int# -> Int# -> Int# -> a efdtCharFB c n x1 x2 lim | isTrue# (delta >=# 0#) = go_up_char_fb c n x1 delta lim | otherwise = go_dn_char_fb c n x1 delta lim where !delta = x2 -# x1
241
efdtCharFB :: (Char -> a -> a) -> a -> Int# -> Int# -> Int# -> a efdtCharFB c n x1 x2 lim | isTrue# (delta >=# 0#) = go_up_char_fb c n x1 delta lim | otherwise = go_dn_char_fb c n x1 delta lim where !delta = x2 -# x1
241
efdtCharFB c n x1 x2 lim | isTrue# (delta >=# 0#) = go_up_char_fb c n x1 delta lim | otherwise = go_dn_char_fb c n x1 delta lim where !delta = x2 -# x1
176
false
true
1
10
74
111
54
57
null
null
phischu/fragnix
tests/packages/scotty/Data.Vector.Unboxed.Mutable.hs
bsd-3-clause
modify = G.modify
17
modify = G.modify
17
modify = G.modify
17
false
false
0
5
2
8
4
4
null
null
uuhan/Idris-dev
src/Idris/Core/CaseTree.hs
bsd-3-clause
findCalls' :: Bool -> SC -> [Name] -> [(Name, [[Name]])] findCalls' ignoreasserts sc topargs = S.toList $ nu' topargs sc where nu' ps (Case _ n alts) = S.unions $ map (nua (n : ps)) alts nu' ps (ProjCase t alts) = S.unions $ nut ps t : map (nua ps) alts nu' ps (STerm t) = nut ps t nu' ps _ = S.empty...
1,488
findCalls' :: Bool -> SC -> [Name] -> [(Name, [[Name]])] findCalls' ignoreasserts sc topargs = S.toList $ nu' topargs sc where nu' ps (Case _ n alts) = S.unions $ map (nua (n : ps)) alts nu' ps (ProjCase t alts) = S.unions $ nut ps t : map (nua ps) alts nu' ps (STerm t) = nut ps t nu' ps _ = S.empty...
1,488
findCalls' ignoreasserts sc topargs = S.toList $ nu' topargs sc where nu' ps (Case _ n alts) = S.unions $ map (nua (n : ps)) alts nu' ps (ProjCase t alts) = S.unions $ nut ps t : map (nua ps) alts nu' ps (STerm t) = nut ps t nu' ps _ = S.empty nua ps (ConCase n i args sc) = nu' (ps ++ args) sc ...
1,431
false
true
0
15
554
756
378
378
null
null
arianvp/binary-serialise-cbor
bench/Macro/Load.hs
bsd-3-clause
parseTokenQ :: ReadP String parseTokenQ = parseHaskellString <++ munch1 (\x -> not (isSpace x) && x /= ',')
107
parseTokenQ :: ReadP String parseTokenQ = parseHaskellString <++ munch1 (\x -> not (isSpace x) && x /= ',')
107
parseTokenQ = parseHaskellString <++ munch1 (\x -> not (isSpace x) && x /= ',')
79
false
true
0
13
17
51
24
27
null
null
francesco-kriegel/conexp-hs
src/FormalContext/FormalContext.hs
apache-2.0
attClosure cxt atts = intent cxt $ extent cxt atts
52
attClosure cxt atts = intent cxt $ extent cxt atts
52
attClosure cxt atts = intent cxt $ extent cxt atts
52
false
false
0
6
11
23
10
13
null
null