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
srijs/haskell-eventsource
EventSourceHelper.hs
mit
transAp :: (forall x. f x -> g x) -> Ap f a -> Ap g a transAp _ (Pure a) = Pure a
81
transAp :: (forall x. f x -> g x) -> Ap f a -> Ap g a transAp _ (Pure a) = Pure a
81
transAp _ (Pure a) = Pure a
27
false
true
0
10
23
65
30
35
null
null
mcschroeder/ctrie
benchmarks/Concurrent.hs
mit
hm_delete_tvar :: (Eq k, Hashable k) => k -> TVar (HM.HashMap k v) -> IO () hm_delete_tvar k tvar = atomically $ modifyTVar' tvar (HM.delete k)
143
hm_delete_tvar :: (Eq k, Hashable k) => k -> TVar (HM.HashMap k v) -> IO () hm_delete_tvar k tvar = atomically $ modifyTVar' tvar (HM.delete k)
143
hm_delete_tvar k tvar = atomically $ modifyTVar' tvar (HM.delete k)
67
false
true
0
11
25
74
36
38
null
null
jozefg/cooked-pi
src/LambdaPi/Bound.hs
mit
inferType (Pi t s) = do checkType t Star (newVar, s') <- unbind s local (\e -> e{localVars = M.insert newVar (nf t) $ localVars e}) $ Star <$ checkType s' Star
169
inferType (Pi t s) = do checkType t Star (newVar, s') <- unbind s local (\e -> e{localVars = M.insert newVar (nf t) $ localVars e}) $ Star <$ checkType s' Star
169
inferType (Pi t s) = do checkType t Star (newVar, s') <- unbind s local (\e -> e{localVars = M.insert newVar (nf t) $ localVars e}) $ Star <$ checkType s' Star
169
false
false
0
17
41
97
46
51
null
null
asr/fotc
notes/fixed-points/Functors.hs
mit
out ∷ Nu f → f (Nu f) out (Wrap x) = x
38
out ∷ Nu f → f (Nu f) out (Wrap x) = x
38
out (Wrap x) = x
16
false
true
0
8
12
36
17
19
null
null
danr/hipspec
src/HipSpec.hs
gpl-3.0
proveBool :: Bool -> Prop Bool proveBool lhs = lhs =:= True
59
proveBool :: Bool -> Prop Bool proveBool lhs = lhs =:= True
59
proveBool lhs = lhs =:= True
28
false
true
0
6
11
25
12
13
null
null
timtylin/scholdoc-citeproc
src/Text/CSL/Style.hs
bsd-3-clause
toStr :: String -> [Inline] toStr = intercalate [Str "\n"] . map (B.toList . B.text . tweak . fromEntities) . splitWhen (=='\n') where tweak ('«':' ':xs) = "«\8239" ++ tweak xs tweak (' ':'»':xs) = "\8239»" ++ tweak xs tweak (' ':';':xs) = "\8239;" ++ tweak xs tweak (' ':':':...
512
toStr :: String -> [Inline] toStr = intercalate [Str "\n"] . map (B.toList . B.text . tweak . fromEntities) . splitWhen (=='\n') where tweak ('«':' ':xs) = "«\8239" ++ tweak xs tweak (' ':'»':xs) = "\8239»" ++ tweak xs tweak (' ':';':xs) = "\8239;" ++ tweak xs tweak (' ':':':...
512
toStr = intercalate [Str "\n"] . map (B.toList . B.text . tweak . fromEntities) . splitWhen (=='\n') where tweak ('«':' ':xs) = "«\8239" ++ tweak xs tweak (' ':'»':xs) = "\8239»" ++ tweak xs tweak (' ':';':xs) = "\8239;" ++ tweak xs tweak (' ':':':xs) = "\8239:" ++ tweak xs ...
484
false
true
11
14
165
258
130
128
null
null
bruno-cadorette/AdventOfCode
Day 7/Day7.hs
mit
toRealAction Or = (.|.)
27
toRealAction Or = (.|.)
27
toRealAction Or = (.|.)
27
false
false
1
5
7
15
6
9
null
null
svenkeidel/sdl2
src/SDL/Video/Renderer.hs
bsd-3-clause
updateWindowSurface :: (Functor m, MonadIO m) => Window -> m () updateWindowSurface (Window w) = throwIfNeg_ "SDL.Video.updateWindowSurface" "SDL_UpdateWindowSurface" $ Raw.updateWindowSurface w
200
updateWindowSurface :: (Functor m, MonadIO m) => Window -> m () updateWindowSurface (Window w) = throwIfNeg_ "SDL.Video.updateWindowSurface" "SDL_UpdateWindowSurface" $ Raw.updateWindowSurface w
200
updateWindowSurface (Window w) = throwIfNeg_ "SDL.Video.updateWindowSurface" "SDL_UpdateWindowSurface" $ Raw.updateWindowSurface w
136
false
true
0
8
26
59
28
31
null
null
ygale/yesod
yesod-bin/main.hs
mit
addHandlerOptions :: Parser Command addHandlerOptions = AddHandler <$> optStr ( long "route" <> short 'r' <> metavar "ROUTE" <> help "Name of route (without trailing R). Required.") <*> optStr ( long "pattern" <> short 'p' <> metavar "PATTERN" <> help "Route pattern (ex: /entry/#EntryId). ...
540
addHandlerOptions :: Parser Command addHandlerOptions = AddHandler <$> optStr ( long "route" <> short 'r' <> metavar "ROUTE" <> help "Name of route (without trailing R). Required.") <*> optStr ( long "pattern" <> short 'p' <> metavar "PATTERN" <> help "Route pattern (ex: /entry/#EntryId). ...
540
addHandlerOptions = AddHandler <$> optStr ( long "route" <> short 'r' <> metavar "ROUTE" <> help "Name of route (without trailing R). Required.") <*> optStr ( long "pattern" <> short 'p' <> metavar "PATTERN" <> help "Route pattern (ex: /entry/#EntryId). Defaults to \"\".") <*> many (st...
504
false
true
0
13
139
122
55
67
null
null
robdockins/edison
edison-core/src/Data/Edison/Assoc/StandardMap.hs
mit
unionr = flip DM.union
34
unionr = flip DM.union
34
unionr = flip DM.union
34
false
false
0
6
15
11
5
6
null
null
realli/chatqy
src/Qy/User.hs
mit
signup :: SignUpForm -> AppM ReturnToken signup (SignUpForm u p e) = do when (T.null u) $ raiseHTTPError userNameIsEmpty when (T.length p < 6) $ raiseHTTPError passwordTooShort let sha_p = H.hash $ encodeUtf8 p user = M.User u sha_p e dbResult <- M.runDb $ insertBy user case dbResult of ...
389
signup :: SignUpForm -> AppM ReturnToken signup (SignUpForm u p e) = do when (T.null u) $ raiseHTTPError userNameIsEmpty when (T.length p < 6) $ raiseHTTPError passwordTooShort let sha_p = H.hash $ encodeUtf8 p user = M.User u sha_p e dbResult <- M.runDb $ insertBy user case dbResult of ...
389
signup (SignUpForm u p e) = do when (T.null u) $ raiseHTTPError userNameIsEmpty when (T.length p < 6) $ raiseHTTPError passwordTooShort let sha_p = H.hash $ encodeUtf8 p user = M.User u sha_p e dbResult <- M.runDb $ insertBy user case dbResult of Left _ -> raiseHTTPError userAlreadyExi...
348
false
true
0
13
97
158
70
88
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
happyReduction_274 _ _ = notHappyAtAll
39
happyReduction_274 _ _ = notHappyAtAll
39
happyReduction_274 _ _ = notHappyAtAll
39
false
false
0
5
5
11
5
6
null
null
plclub/lngen
src/CoqLNOutputThmFv.hs
mit
fv_close :: ASTAnalysis -> [NtRoot] -> M String fv_close aaa nt1s = do { gens <- processNt1Nt2Mv2' aaa nt1s gen ; names <- processNt1Nt2Mv2' aaa nt1s name ; lemmaText2 Resolve Rewrite NoHide [hintDb] names gens } where name aa nt1 _ mv2 _ mv2' = do { fv_fn <- fvName a...
1,609
fv_close :: ASTAnalysis -> [NtRoot] -> M String fv_close aaa nt1s = do { gens <- processNt1Nt2Mv2' aaa nt1s gen ; names <- processNt1Nt2Mv2' aaa nt1s name ; lemmaText2 Resolve Rewrite NoHide [hintDb] names gens } where name aa nt1 _ mv2 _ mv2' = do { fv_fn <- fvName a...
1,609
fv_close aaa nt1s = do { gens <- processNt1Nt2Mv2' aaa nt1s gen ; names <- processNt1Nt2Mv2' aaa nt1s name ; lemmaText2 Resolve Rewrite NoHide [hintDb] names gens } where name aa nt1 _ mv2 _ mv2' = do { fv_fn <- fvName aa nt1 mv2 ; close_fn <- closeName a...
1,561
false
true
0
13
775
429
208
221
null
null
ckaestne/CIDE
other/CaseStudies/Arith/orig_armin/ite/Arith.hs
gpl-3.0
zipResult _ (Fail e) _ = Fail e
42
zipResult _ (Fail e) _ = Fail e
42
zipResult _ (Fail e) _ = Fail e
42
false
false
0
7
18
22
10
12
null
null
joozek78/stack
src/Stack/Types/Config.hs
bsd-3-clause
parseConfigMonoidJSON :: Object -> WarningParser ConfigMonoid parseConfigMonoidJSON obj = do configMonoidDockerOpts <- jsonSubWarnings (obj ..:? "docker" ..!= mempty) configMonoidConnectionCount <- obj ..:? "connection-count" configMonoidHideTHLoading <- obj ..:? "hide-th-loading" configMonoidLatestSnap...
2,672
parseConfigMonoidJSON :: Object -> WarningParser ConfigMonoid parseConfigMonoidJSON obj = do configMonoidDockerOpts <- jsonSubWarnings (obj ..:? "docker" ..!= mempty) configMonoidConnectionCount <- obj ..:? "connection-count" configMonoidHideTHLoading <- obj ..:? "hide-th-loading" configMonoidLatestSnap...
2,672
parseConfigMonoidJSON obj = do configMonoidDockerOpts <- jsonSubWarnings (obj ..:? "docker" ..!= mempty) configMonoidConnectionCount <- obj ..:? "connection-count" configMonoidHideTHLoading <- obj ..:? "hide-th-loading" configMonoidLatestSnapshotUrl <- obj ..:? "latest-snapshot-url" configMonoidPack...
2,610
false
true
3
16
699
668
315
353
null
null
vedgar/mlr
2016 Kolokvij/LS.hs
unlicense
false = Compound false_c []
27
false = Compound false_c []
27
false = Compound false_c []
27
false
false
1
6
4
17
6
11
null
null
pfq/PFQ
user/pfq-affinity/pfq-affinity.hs
gpl-2.0
makeIrqBinding :: [String] -> Int -> IrqBinding makeIrqBinding ["round-robin"] _ = IrqBinding (-1) 1 1 none
132
makeIrqBinding :: [String] -> Int -> IrqBinding makeIrqBinding ["round-robin"] _ = IrqBinding (-1) 1 1 none
132
makeIrqBinding ["round-robin"] _ = IrqBinding (-1) 1 1 none
84
false
true
0
9
40
49
24
25
null
null
nikita-volkov/record
library/Record/TH.hs
mit
recordName :: Bool -> Int -> Name recordName strict arity = mkName $ recordNameString strict arity
100
recordName :: Bool -> Int -> Name recordName strict arity = mkName $ recordNameString strict arity
100
recordName strict arity = mkName $ recordNameString strict arity
66
false
true
2
8
17
39
17
22
null
null
mapinguari/SC_HS_Proxy
src/Proxy/PathFinding/HinzAStar.hs
mit
pathFinderF :: Node -> Node -> M.Map Node (Maybe Node) -> Maybe Path pathFinderF = pathFinder advance
101
pathFinderF :: Node -> Node -> M.Map Node (Maybe Node) -> Maybe Path pathFinderF = pathFinder advance
101
pathFinderF = pathFinder advance
32
false
true
0
11
16
48
21
27
null
null
Axure/elm-compiler
src/Optimize/Environment.hs
bsd-3-clause
setTailCall :: Bool -> Optimizer () setTailCall bool = do env <- State.get State.put (env { _hasTailCall = bool })
123
setTailCall :: Bool -> Optimizer () setTailCall bool = do env <- State.get State.put (env { _hasTailCall = bool })
123
setTailCall bool = do env <- State.get State.put (env { _hasTailCall = bool })
87
false
true
0
10
28
51
25
26
null
null
csabahruska/q3demo
src/Q3Demo/Graphics/GLBackend.hs
bsd-3-clause
compileColorTexture2D :: Bitmap Word8 -> IO GLColorTexture2D compileColorTexture2D b = do st "BEGIN[compileColorTexture2D]" r <- compileColorTexture2D' b st "END[compileColorTexture2D]" return r
210
compileColorTexture2D :: Bitmap Word8 -> IO GLColorTexture2D compileColorTexture2D b = do st "BEGIN[compileColorTexture2D]" r <- compileColorTexture2D' b st "END[compileColorTexture2D]" return r
210
compileColorTexture2D b = do st "BEGIN[compileColorTexture2D]" r <- compileColorTexture2D' b st "END[compileColorTexture2D]" return r
149
false
true
0
8
36
52
21
31
null
null
nominolo/haddock2
src/Haddock/GhcUtils.hs
bsd-2-clause
isTyClD _ = False
17
isTyClD _ = False
17
isTyClD _ = False
17
false
false
0
5
3
9
4
5
null
null
olsner/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
{- ************************************************************************ * * Constructing syntax with no location info * * ************************************************...
412
nlHsVar :: id -> LHsExpr id nlHsVar n = noLoc (HsVar (noLoc n))
63
nlHsVar n = noLoc (HsVar (noLoc n))
35
true
true
0
9
173
37
18
19
null
null
thielema/wxhaskell
wxdirect/src/IOExtra.hs
lgpl-2.1
{----------------------------------------------------------------------------------------- Only write to the file if its contents have changed, e.g. don't change the file's modifed time unless you change the contents. -----------------------------------------------------------------------------------------} writeFileLa...
546
writeFileLazy :: FilePath -> String -> IO () writeFileLazy f str = fileChanged >>= flip when (writeFile f str) where fileChanged = return . either (const True) (/= str) =<< tryJust (guard . isDoesNotExistError) (Strictly.readFile f)
237
writeFileLazy f str = fileChanged >>= flip when (writeFile f str) where fileChanged = return . either (const True) (/= str) =<< tryJust (guard . isDoesNotExistError) (Strictly.readFile f)
192
true
true
0
9
64
102
50
52
null
null
brendanhay/gogol
gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs
mpl-2.0
-- | The linking_token identifies a YouTube account and channel with which -- the third party account is linked. tplLinkingToken :: Lens' ThirdPartyLink (Maybe Text) tplLinkingToken = lens _tplLinkingToken (\ s a -> s{_tplLinkingToken = a})
248
tplLinkingToken :: Lens' ThirdPartyLink (Maybe Text) tplLinkingToken = lens _tplLinkingToken (\ s a -> s{_tplLinkingToken = a})
135
tplLinkingToken = lens _tplLinkingToken (\ s a -> s{_tplLinkingToken = a})
82
true
true
0
9
43
49
26
23
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs
mit
decomposeChar '\xF905' = "\x4E32"
33
decomposeChar '\xF905' = "\x4E32"
33
decomposeChar '\xF905' = "\x4E32"
33
false
false
0
4
3
10
4
6
null
null
jwiegley/ghc-release
libraries/binary/benchmarks/Get.hs
gpl-3.0
runAtto decoder inp = case A.parseOnly decoder inp of Right a -> a Left err -> error err
136
runAtto decoder inp = case A.parseOnly decoder inp of Right a -> a Left err -> error err
136
runAtto decoder inp = case A.parseOnly decoder inp of Right a -> a Left err -> error err
136
false
false
0
8
65
43
19
24
null
null
alanz/Hs2010To201x
src/Transform.hs
bsd-3-clause
grhsPure :: Transform (GHC.GRHSs GHC.RdrName (GHC.LHsExpr GHC.RdrName)) grhsPure = do grhsLoc <- uniqueSrcSpanT pureLoc <- uniqueSrcSpanT let lPure = (GHC.L pureLoc (GHC.HsVar pureRdrName)) lGrhs = (GHC.L grhsLoc (GHC.GRHS [] lPure)) :: GHC.LGRHS GHC.RdrName (GHC.LHsExpr GHC.RdrName) ret = (GHC.GRHS...
1,292
grhsPure :: Transform (GHC.GRHSs GHC.RdrName (GHC.LHsExpr GHC.RdrName)) grhsPure = do grhsLoc <- uniqueSrcSpanT pureLoc <- uniqueSrcSpanT let lPure = (GHC.L pureLoc (GHC.HsVar pureRdrName)) lGrhs = (GHC.L grhsLoc (GHC.GRHS [] lPure)) :: GHC.LGRHS GHC.RdrName (GHC.LHsExpr GHC.RdrName) ret = (GHC.GRHS...
1,292
grhsPure = do grhsLoc <- uniqueSrcSpanT pureLoc <- uniqueSrcSpanT let lPure = (GHC.L pureLoc (GHC.HsVar pureRdrName)) lGrhs = (GHC.L grhsLoc (GHC.GRHS [] lPure)) :: GHC.LGRHS GHC.RdrName (GHC.LHsExpr GHC.RdrName) ret = (GHC.GRHSs [lGrhs] GHC.EmptyLocalBinds) addSimpleAnnT lGrhs (DP (0,0)) [] add...
1,220
false
true
0
14
353
225
114
111
null
null
mudphone/HaskellBook
src/ReaderPractice.hs
mit
x = [1, 2, 3]
13
x = [1, 2, 3]
13
x = [1, 2, 3]
13
false
false
1
5
4
18
9
9
null
null
TomMD/cryptol
sbv/Data/SBV/Compilers/C.hs
bsd-3-clause
printQuotes :: Doc -> Doc printQuotes d = text $ '"' : ppSameLine d ++ "\""
75
printQuotes :: Doc -> Doc printQuotes d = text $ '"' : ppSameLine d ++ "\""
75
printQuotes d = text $ '"' : ppSameLine d ++ "\""
49
false
true
0
7
15
33
16
17
null
null
felipeZ/Dynamics
src/Molcas.hs
bsd-3-clause
sectionsWhatever name = do iFound <- anyLine return $ WhateverData $ "[" ++ name ++ "] " ++ iFound -- Well, I dont know what is it -- Try to parse Molecular gradients from alaska Molcas modules
206
sectionsWhatever name = do iFound <- anyLine return $ WhateverData $ "[" ++ name ++ "] " ++ iFound -- Well, I dont know what is it -- Try to parse Molecular gradients from alaska Molcas modules
206
sectionsWhatever name = do iFound <- anyLine return $ WhateverData $ "[" ++ name ++ "] " ++ iFound -- Well, I dont know what is it -- Try to parse Molecular gradients from alaska Molcas modules
206
false
false
1
11
49
45
20
25
null
null
yihuang/cabal-install
Distribution/Client/Setup.hs
bsd-3-clause
reqArgFlag :: ArgPlaceHolder -> SFlags -> LFlags -> Description -> (b -> Flag String) -> (Flag String -> b -> b) -> OptDescr b reqArgFlag ad = reqArg ad (succeedReadE Flag) flagToList
197
reqArgFlag :: ArgPlaceHolder -> SFlags -> LFlags -> Description -> (b -> Flag String) -> (Flag String -> b -> b) -> OptDescr b reqArgFlag ad = reqArg ad (succeedReadE Flag) flagToList
197
reqArgFlag ad = reqArg ad (succeedReadE Flag) flagToList
56
false
true
0
14
45
83
39
44
null
null
spyked/slides
misc-notes/pp-cb-labs/lab-08/lab-08.hs
cc0-1.0
-- să încercăm și varianta cu funcții de ordin superior, fiindcă diferă -- un pic față de exemplele anterioare fibs' = 0 : 1 : zipWith (+) fibs' (tail fibs')
157
fibs' = 0 : 1 : zipWith (+) fibs' (tail fibs')
46
fibs' = 0 : 1 : zipWith (+) fibs' (tail fibs')
46
true
false
0
8
29
31
17
14
null
null
jean-edouard/manager
apptool/Core/Types.hs
gpl-2.0
strFileResource (FileResource uri) = show uri
45
strFileResource (FileResource uri) = show uri
45
strFileResource (FileResource uri) = show uri
45
false
false
0
6
5
19
8
11
null
null
themoritz/cabal
Cabal/Distribution/Simple/PreProcess.hs
bsd-3-clause
ppHsc2hs :: BuildInfo -> LocalBuildInfo -> ComponentLocalBuildInfo -> PreProcessor ppHsc2hs bi lbi clbi = PreProcessor { platformIndependent = False, runPreProcessor = mkSimplePreProcessor $ \inFile outFile verbosity -> do (gccProg, _) <- requireProgram verbosity gccProgram (withPrograms lbi) runD...
4,265
ppHsc2hs :: BuildInfo -> LocalBuildInfo -> ComponentLocalBuildInfo -> PreProcessor ppHsc2hs bi lbi clbi = PreProcessor { platformIndependent = False, runPreProcessor = mkSimplePreProcessor $ \inFile outFile verbosity -> do (gccProg, _) <- requireProgram verbosity gccProgram (withPrograms lbi) runD...
4,265
ppHsc2hs bi lbi clbi = PreProcessor { platformIndependent = False, runPreProcessor = mkSimplePreProcessor $ \inFile outFile verbosity -> do (gccProg, _) <- requireProgram verbosity gccProgram (withPrograms lbi) runDbProgram verbosity hsc2hsProgram (withPrograms lbi) $ [ "--cc=" ++ progra...
4,182
false
true
6
30
1,434
1,013
511
502
null
null
benjaminy/Charcoal
Testing/MicroTests/JustCalling/non_rec.hs
mit
main :: IO () main = do putStrLn( show ( f30 3 ) )
52
main :: IO () main = do putStrLn( show ( f30 3 ) )
52
main = do putStrLn( show ( f30 3 ) )
38
false
true
0
12
15
40
17
23
null
null
d12frosted/environment
xmonad/xmonad/Main.hs
gpl-3.0
-------------------------------------------------------------------------------- statusBarPP :: PP statusBarPP = def { ppCurrent = Icon.active, ppHidden = Icon.inactive, ppWsSep = "", ppTitle = xmobarColor Color.textTitleFg Color.textTitleBg . shorten 120, ppLayout = \ca...
504
statusBarPP :: PP statusBarPP = def { ppCurrent = Icon.active, ppHidden = Icon.inactive, ppWsSep = "", ppTitle = xmobarColor Color.textTitleFg Color.textTitleBg . shorten 120, ppLayout = \case "Tall" -> Icon.inactiveThin "\x25E7" "Mirror Tall" -> Icon.inac...
422
statusBarPP = def { ppCurrent = Icon.active, ppHidden = Icon.inactive, ppWsSep = "", ppTitle = xmobarColor Color.textTitleFg Color.textTitleBg . shorten 120, ppLayout = \case "Tall" -> Icon.inactiveThin "\x25E7" "Mirror Tall" -> Icon.inactiveThin "\x2B12" ...
404
true
true
0
12
139
115
61
54
null
null
Newlifer/libstep
src/Data/EXPRESS/Parsers.hs
mit
{- \q { ( \q \q ) | not_quote | \s | \x9 | \xA | \xD } \q . or ' " ' encoded_character { encoded_character } ' " ' . -} pStringLiteral :: Parser StringLiteral pStringLiteral = undefined
195
pStringLiteral :: Parser StringLiteral pStringLiteral = undefined
65
pStringLiteral = undefined
26
true
true
0
5
49
15
8
7
null
null
randen/cabal
cabal-install/Distribution/Client/Tar.hs
bsd-3-clause
-- user or other executable -- | An 'Entry' with all default values except for the file name and type. It -- uses the portable USTAR/POSIX format (see 'UstarHeader'). -- -- You can use this as a basis and override specific fields, eg: -- -- > (emptyEntry name HardLink) { linkTarget = target } -- simpleEntry :: TarPath...
717
simpleEntry :: TarPath -> EntryContent -> Entry simpleEntry tarpath content = Entry { entryTarPath = tarpath, entryContent = content, entryPermissions = case content of Directory -> directoryPermissions _ -> ordinaryFilePermissions, entry...
419
simpleEntry tarpath content = Entry { entryTarPath = tarpath, entryContent = content, entryPermissions = case content of Directory -> directoryPermissions _ -> ordinaryFilePermissions, entryOwnership = Ownership "" "" 0 0, entryTime...
371
true
true
0
9
205
95
57
38
null
null
haskelladdict/simgi
src/InputCheck.hs
gpl-3.0
extract_variable_names_from_rates :: [Reaction] -> [String] extract_variable_names_from_rates = extract_variable_names . map rate
129
extract_variable_names_from_rates :: [Reaction] -> [String] extract_variable_names_from_rates = extract_variable_names . map rate
129
extract_variable_names_from_rates = extract_variable_names . map rate
69
false
true
0
6
10
28
15
13
null
null
sacundim/tau-sigma
src/TauSigma/Statistics/Util.hs
bsd-3-clause
nestedSums n m term = kbn (go zero 0 0) where go :: KBNSum -> Int -> Int -> KBNSum go subtotal i j | i >= n = subtotal | j >= m = go subtotal (i+1) 0 | otherwise = go (subtotal `add` term i j) i (j+1)
246
nestedSums n m term = kbn (go zero 0 0) where go :: KBNSum -> Int -> Int -> KBNSum go subtotal i j | i >= n = subtotal | j >= m = go subtotal (i+1) 0 | otherwise = go (subtotal `add` term i j) i (j+1)
246
nestedSums n m term = kbn (go zero 0 0) where go :: KBNSum -> Int -> Int -> KBNSum go subtotal i j | i >= n = subtotal | j >= m = go subtotal (i+1) 0 | otherwise = go (subtotal `add` term i j) i (j+1)
246
false
false
0
9
95
132
64
68
null
null
florianpilz/autotool
src/Spielbaum/Test.hs
gpl-2.0
c_wort :: Wort Char c_wort = Wort { inhalt = "111111" , regeln = [ Regel { from = "11" , to = "10" } ] }
158
c_wort :: Wort Char c_wort = Wort { inhalt = "111111" , regeln = [ Regel { from = "11" , to = "10" } ] }
158
c_wort = Wort { inhalt = "111111" , regeln = [ Regel { from = "11" , to = "10" } ] }
138
false
true
1
10
80
49
27
22
null
null
eamsden/time-flies
src/FRP/TimeFlies.hs
bsd-3-clause
-- | Initialize the evaluation of a signal function, producing an SFEvalState. initSFEval :: SVHandler (m ()) svOut -- ^ The set of handlers for the output of the signal function -> SVSample svIn -- ^ The initial signal inputs for the signal function -> Double -- ^ The initial time of the s...
600
initSFEval :: SVHandler (m ()) svOut -- ^ The set of handlers for the output of the signal function -> SVSample svIn -- ^ The initial signal inputs for the signal function -> Double -- ^ The initial time of the signal function -> SF NonInitialized svIn svOut -- ^ The signal fun...
521
initSFEval handlers initSample initTime (SF sigSampleF) = let (_, sf) = sigSampleF initSample in SFEvalState sf handlers initTime deltaNothing
142
true
true
0
12
145
111
54
57
null
null
shayan-najd/MiniLava
Lava/Library/Operators.hs
bsd-3-clause
idiv :: Signal Int -> Signal Int -> Signal Int idiv x y = divide x y
69
idiv :: Signal Int -> Signal Int -> Signal Int idiv x y = divide x y
69
idiv x y = divide x y
22
false
true
0
7
17
38
17
21
null
null
roberth/uu-helium
src/Helium/Parser/LexerMessage.hs
gpl-3.0
correctChars = Texts.lexerCorrectChars
40
correctChars = Texts.lexerCorrectChars
40
correctChars = Texts.lexerCorrectChars
40
false
false
0
5
4
8
4
4
null
null
juhp/stack
src/Stack/Ls.hs
bsd-3-clause
renderData False content = T.putStr content
43
renderData False content = T.putStr content
43
renderData False content = T.putStr content
43
false
false
0
6
5
16
7
9
null
null
prt2121/haskell-practice
parconc/fwdense.hs
apache-2.0
main :: IO () main = do [n] <- fmap (fmap read) getArgs let g = fromListUnboxed (Z:.n:.n) [0..n^(2::Int)-1] :: Graph U print (sumAllS (shortestPaths g))
161
main :: IO () main = do [n] <- fmap (fmap read) getArgs let g = fromListUnboxed (Z:.n:.n) [0..n^(2::Int)-1] :: Graph U print (sumAllS (shortestPaths g))
161
main = do [n] <- fmap (fmap read) getArgs let g = fromListUnboxed (Z:.n:.n) [0..n^(2::Int)-1] :: Graph U print (sumAllS (shortestPaths g))
147
false
true
0
15
34
111
53
58
null
null
gbwey/persistent
persistent-test/src/Init.hs
mit
persistSettings :: MkPersistSettings persistSettings = sqlSettings { mpsGeneric = True }
88
persistSettings :: MkPersistSettings persistSettings = sqlSettings { mpsGeneric = True }
88
persistSettings = sqlSettings { mpsGeneric = True }
51
false
true
0
6
10
19
11
8
null
null
jneen/cube
Data/RubiksCube.hs
mit
jperm = readAlg $! "RU2R'U' RU2L'U R'U'L"
41
jperm = readAlg $! "RU2R'U' RU2L'U R'U'L"
41
jperm = readAlg $! "RU2R'U' RU2L'U R'U'L"
41
false
false
0
5
6
10
5
5
null
null
centromere/cacophony
tests/vectors/Types.hs
unlicense
patternToHandshake PatternNKpsk2 = noiseNKpsk2
46
patternToHandshake PatternNKpsk2 = noiseNKpsk2
46
patternToHandshake PatternNKpsk2 = noiseNKpsk2
46
false
false
0
5
3
9
4
5
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/showsPrec_2.hs
mit
primCmpInt (Neg x) (Pos y) = LT
31
primCmpInt (Neg x) (Pos y) = LT
31
primCmpInt (Neg x) (Pos y) = LT
31
false
false
0
7
6
23
11
12
null
null
dorchard/array-memoize
unfix-heat-example.hs
bsd-2-clause
nt = 5 :: Float
20
nt = 5 :: Float
20
nt = 5 :: Float
20
false
false
0
4
9
9
5
4
null
null
haskell/haddock
haddock-api/src/Haddock/Backends/Xhtml/Layout.hs
bsd-2-clause
divIndex = sectionDiv "index"
40
divIndex = sectionDiv "index"
40
divIndex = sectionDiv "index"
40
false
false
0
5
14
9
4
5
null
null
muspellsson/hiccup
Expr/Parse.hs
lgpl-2.1
opsByOper = M.fromList (map pairer operators) where pairer a = (opCode a,a)
77
opsByOper = M.fromList (map pairer operators) where pairer a = (opCode a,a)
77
opsByOper = M.fromList (map pairer operators) where pairer a = (opCode a,a)
77
false
false
2
7
13
46
19
27
null
null
alanz/htelehash
src/Network/TeleHash/Old/Web.hs
bsd-3-clause
-- approot _ = "" -- approot = undefined -- --------------------------------------------------------------------- getRootR :: GHandler sub R RepHtml getRootR = defaultLayout $ do setTitle "Homepage" addHamlet [hamlet| <ul> <li> <a href="@{FnR "Switch"}">Switch <li> <a href="@{FnR "RawSwitch"}">RawSwi...
440
getRootR :: GHandler sub R RepHtml getRootR = defaultLayout $ do setTitle "Homepage" addHamlet [hamlet| <ul> <li> <a href="@{FnR "Switch"}">Switch <li> <a href="@{FnR "RawSwitch"}">RawSwitch <li> <a href="@{StatsR}">stats |] {- -} -- ---------------------------------------------------------------------
319
getRootR = defaultLayout $ do setTitle "Homepage" addHamlet [hamlet| <ul> <li> <a href="@{FnR "Switch"}">Switch <li> <a href="@{FnR "RawSwitch"}">RawSwitch <li> <a href="@{StatsR}">stats |] {- -} -- ---------------------------------------------------------------------
284
true
true
0
8
65
43
24
19
null
null
ku-fpg/marked-pretty
src/Text/PrettyPrint/MarkedHughesPJ.hs
bsd-3-clause
-- --------------------------------------------------------------------------- -- @fill@ -- | \"Paragraph fill\" version of 'cat'. fcat :: [MDoc a] -> MDoc a fcat = fill False
176
fcat :: [MDoc a] -> MDoc a fcat = fill False
44
fcat = fill False
17
true
true
0
7
22
30
16
14
null
null
mdsteele/fallback
src/Fallback/Data/Clock.hs
gpl-3.0
-- | A clock in its initial state. initClock :: Clock initClock = Clock 0
73
initClock :: Clock initClock = Clock 0
38
initClock = Clock 0
19
true
true
0
5
14
15
8
7
null
null
jamessanders/twine
src/Text/Twine/Interpreter.hs
bsd-2-clause
lift2 f = lift $ lift $ f
25
lift2 f = lift $ lift $ f
25
lift2 f = lift $ lift $ f
25
false
false
0
6
7
17
8
9
null
null
grpc/grpc-haskell
tests/interop_client/main.hs
apache-2.0
runTest UnimplementedService = runUnimplementedServiceTest
58
runTest UnimplementedService = runUnimplementedServiceTest
58
runTest UnimplementedService = runUnimplementedServiceTest
58
false
false
0
5
3
9
4
5
null
null
trbauer/ebnf
Language/EBNF/Parser.hs
mit
-- A uniformly indented comment block pCommentBlockInd :: Int -> GP String pCommentBlockInd ind = label ("comment block ("++ show ind ++ ")") $ intercalate "\n" <$> P.many1 pCommentLineInd where pCommentLineInd = do cl <- getCl when (cl /= ind) $ fail $ "wrong indent for block comment ...
386
pCommentBlockInd :: Int -> GP String pCommentBlockInd ind = label ("comment block ("++ show ind ++ ")") $ intercalate "\n" <$> P.many1 pCommentLineInd where pCommentLineInd = do cl <- getCl when (cl /= ind) $ fail $ "wrong indent for block comment (parent has " ++ show ind ++ ")" ...
348
pCommentBlockInd ind = label ("comment block ("++ show ind ++ ")") $ intercalate "\n" <$> P.many1 pCommentLineInd where pCommentLineInd = do cl <- getCl when (cl /= ind) $ fail $ "wrong indent for block comment (parent has " ++ show ind ++ ")" pCommentLine <* pSpaces
311
true
true
0
13
102
109
51
58
null
null
enolan/emp-pl-site
app/devel.hs
agpl-3.0
main :: IO () main = develMain
30
main :: IO () main = develMain
30
main = develMain
16
false
true
0
7
6
22
9
13
null
null
23Skidoo/snap-core
src/Snap/Internal/Test/RequestBuilder.hs
bsd-3-clause
requestToString :: Request -> IO ByteString requestToString req0 = do (req, is) <- maybeChunk body <- liftM S.concat $ Streams.toList is return $! toByteString $ mconcat [ statusLine , mconcat . map oneHeader . H.toList $ rq...
1,833
requestToString :: Request -> IO ByteString requestToString req0 = do (req, is) <- maybeChunk body <- liftM S.concat $ Streams.toList is return $! toByteString $ mconcat [ statusLine , mconcat . map oneHeader . H.toList $ rq...
1,833
requestToString req0 = do (req, is) <- maybeChunk body <- liftM S.concat $ Streams.toList is return $! toByteString $ mconcat [ statusLine , mconcat . map oneHeader . H.toList $ rqHeaders req ...
1,789
false
true
2
18
938
407
204
203
null
null
rsasse/tamarin-prover
lib/utils/src/Control/Monad/Bind.hs
gpl-3.0
-- | Evaluate a binding context computation. evalBind :: Bind k v a -> Bindings k v -> a evalBind = evalState
109
evalBind :: Bind k v a -> Bindings k v -> a evalBind = evalState
64
evalBind = evalState
20
true
true
0
7
21
32
16
16
null
null
vito/atomo
src/Atomo/Types.hs
bsd-3-clause
objectFrom ids (Pattern _) = idPattern ids
42
objectFrom ids (Pattern _) = idPattern ids
42
objectFrom ids (Pattern _) = idPattern ids
42
false
false
0
6
6
22
9
13
null
null
benkio/VRP
src/DataParsing/VrpTxtParse.hs
gpl-3.0
{- This funcion return the node list. if the vehicle capacity is too low it split che nodes in multiple lists -} nodes :: VRPFileContent -> Int ->[[Node]] nodes c vc = groupNodesByCapacity n vc where l = tail $ tail $ lines c n = mergeEqualNodes (map (\s -> (((readElementFromLine s xLineIndex), (read...
399
nodes :: VRPFileContent -> Int ->[[Node]] nodes c vc = groupNodesByCapacity n vc where l = tail $ tail $ lines c n = mergeEqualNodes (map (\s -> (((readElementFromLine s xLineIndex), (readElementFromLine s yLineIndex)), (readElementFromLine s demandLineIndex))) l) []
278
nodes c vc = groupNodesByCapacity n vc where l = tail $ tail $ lines c n = mergeEqualNodes (map (\s -> (((readElementFromLine s xLineIndex), (readElementFromLine s yLineIndex)), (readElementFromLine s demandLineIndex))) l) []
236
true
true
5
13
79
128
64
64
null
null
expipiplus1/vulkan
generate-new/vma/VMA/Documentation.hs
bsd-3-clause
loadHeaderDocumentation :: (Member (Embed IO) r, HasErr r) => FilePath -> Sem r [Documentation] loadHeaderDocumentation f = do let isValid = \case TopLevel (CName n) -> "vma" `T.isPrefixOf` T.toLower n Nested p _ -> isValid (TopLevel p) Chapter _ -> True txt <- liftIO $ T....
386
loadHeaderDocumentation :: (Member (Embed IO) r, HasErr r) => FilePath -> Sem r [Documentation] loadHeaderDocumentation f = do let isValid = \case TopLevel (CName n) -> "vma" `T.isPrefixOf` T.toLower n Nested p _ -> isValid (TopLevel p) Chapter _ -> True txt <- liftIO $ T....
386
loadHeaderDocumentation f = do let isValid = \case TopLevel (CName n) -> "vma" `T.isPrefixOf` T.toLower n Nested p _ -> isValid (TopLevel p) Chapter _ -> True txt <- liftIO $ T.readFile f fromEither (docBookHeaderToDocumentation isValid txt)
288
false
true
0
16
99
151
71
80
null
null
ocharles/hackage-server
Distribution/Server/Features/RecentPackages.hs
bsd-3-clause
initRecentPackagesFeature :: ServerEnv -> IO (UserFeature -> CoreFeature -> IO RecentPackagesFeature) initRecentPackagesFeature env@ServerEnv{serverCacheDelay, serverVerbosity = verbosity} = do return $ \user core@CoreFeature{pack...
1,194
initRecentPackagesFeature :: ServerEnv -> IO (UserFeature -> CoreFeature -> IO RecentPackagesFeature) initRecentPackagesFeature env@ServerEnv{serverCacheDelay, serverVerbosity = verbosity} = do return $ \user core@CoreFeature{pack...
1,194
initRecentPackagesFeature env@ServerEnv{serverCacheDelay, serverVerbosity = verbosity} = do return $ \user core@CoreFeature{packageChangeHook} -> do -- recent caches. in lieu of an ActionLog -- TODO: perhaps a hook, recentUpdated :: HookList ([PkgInfo] -> IO ()) rec let (feature, updateRecentCach...
1,006
false
true
0
16
459
169
87
82
null
null
thomkoehler/SrcGen
src/StmtResolver.hs
gpl-2.0
liftFkt1 :: StmtEnvironmentRef -> (Variable -> Variable) -> [Expr] -> IO Variable liftFkt1 env fkt exprs = case exprs of [expr] -> liftM fkt $ eval env expr otherwise -> error "One funktion parameter expected."
229
liftFkt1 :: StmtEnvironmentRef -> (Variable -> Variable) -> [Expr] -> IO Variable liftFkt1 env fkt exprs = case exprs of [expr] -> liftM fkt $ eval env expr otherwise -> error "One funktion parameter expected."
229
liftFkt1 env fkt exprs = case exprs of [expr] -> liftM fkt $ eval env expr otherwise -> error "One funktion parameter expected."
147
false
true
0
9
53
77
38
39
null
null
onponomarev/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
hvstsParameters :: FrozenSet String hvstsParameters = ConstantUtils.mkSet [hvstCpuNode, hvstCpuTotal, hvstMemoryHv, hvstMemoryNode, hvstMemoryTotal]
242
hvstsParameters :: FrozenSet String hvstsParameters = ConstantUtils.mkSet [hvstCpuNode, hvstCpuTotal, hvstMemoryHv, hvstMemoryNode, hvstMemoryTotal]
242
hvstsParameters = ConstantUtils.mkSet [hvstCpuNode, hvstCpuTotal, hvstMemoryHv, hvstMemoryNode, hvstMemoryTotal]
206
false
true
0
6
105
39
20
19
null
null
wavewave/hxournal
lib/Application/HXournal/Type/XournalState.hs
bsd-2-clause
getCurrentCanvasId :: HXournalState -> CanvasId getCurrentCanvasId = fst . _currentCanvas
89
getCurrentCanvasId :: HXournalState -> CanvasId getCurrentCanvasId = fst . _currentCanvas
89
getCurrentCanvasId = fst . _currentCanvas
41
false
true
0
7
9
26
11
15
null
null
nshaheed/flipbook
examples/active-text-opacity/Main.hs
bsd-3-clause
main :: IO () main = blankCanvas 3000 $ flip loop 0
51
main :: IO () main = blankCanvas 3000 $ flip loop 0
51
main = blankCanvas 3000 $ flip loop 0
37
false
true
1
6
11
31
13
18
null
null
rrnewton/accelerate
Data/Array/Accelerate/Smart.hs
bsd-3-clause
mkAtanh :: (Elt t, IsFloating t) => Exp t -> Exp t mkAtanh x = Exp $ PrimAtanh floatingType `PrimApp` x
103
mkAtanh :: (Elt t, IsFloating t) => Exp t -> Exp t mkAtanh x = Exp $ PrimAtanh floatingType `PrimApp` x
103
mkAtanh x = Exp $ PrimAtanh floatingType `PrimApp` x
52
false
true
0
7
20
52
26
26
null
null
uduki/hsQt
Qtc/ClassTypes/Core.hs
bsd-2-clause
withQSizeResult :: IO (Ptr (TQSize a)) -> IO (QSize a) withQSizeResult f = withObjectResult qtc_QSize_getFinalizer f
118
withQSizeResult :: IO (Ptr (TQSize a)) -> IO (QSize a) withQSizeResult f = withObjectResult qtc_QSize_getFinalizer f
118
withQSizeResult f = withObjectResult qtc_QSize_getFinalizer f
63
false
true
0
10
17
47
22
25
null
null
Knewton/rifactor
src/Rifactor/AWS.hs
apache-2.0
couldMerge :: AwsPlan -> AwsPlan -> Bool couldMerge = foldEachReservedWith (\r i -> flip (&&) (isMergeable r i)) True
117
couldMerge :: AwsPlan -> AwsPlan -> Bool couldMerge = foldEachReservedWith (\r i -> flip (&&) (isMergeable r i)) True
117
couldMerge = foldEachReservedWith (\r i -> flip (&&) (isMergeable r i)) True
76
false
true
0
10
18
49
26
23
null
null
Sobieck00/practice
utilities/nonvisualstudio/haskell/math/Solution.hs
mit
roundFloat float decimals = (fromInteger $ round $ float * (10^decimals)) / (10.0^^decimals)
92
roundFloat float decimals = (fromInteger $ round $ float * (10^decimals)) / (10.0^^decimals)
92
roundFloat float decimals = (fromInteger $ round $ float * (10^decimals)) / (10.0^^decimals)
92
false
false
0
9
12
45
23
22
null
null
tanakh/CurryDB
Database/Redis/Commands.hs
bsd-3-clause
decr = modInt pred
18
decr = modInt pred
18
decr = modInt pred
18
false
false
0
5
3
9
4
5
null
null
jsavatgy/season-count
season-count.hs
gpl-2.0
ptEntry pt = Entry { abbrev = abbrev, date = date } where abbrev = "NOW" date = formatTime defaultTimeLocale "%Y-%m-%d %H:%M" ( utcToLocalTime utc (posixSecondsToUTCTime pt))
210
ptEntry pt = Entry { abbrev = abbrev, date = date } where abbrev = "NOW" date = formatTime defaultTimeLocale "%Y-%m-%d %H:%M" ( utcToLocalTime utc (posixSecondsToUTCTime pt))
210
ptEntry pt = Entry { abbrev = abbrev, date = date } where abbrev = "NOW" date = formatTime defaultTimeLocale "%Y-%m-%d %H:%M" ( utcToLocalTime utc (posixSecondsToUTCTime pt))
210
false
false
3
9
62
70
31
39
null
null
andrewcchen/matasano-cryptopals-solutions
modules/Hamming.hs
bsd-3-clause
chunksOfEven :: Int -> ByteVector -> [ByteVector] chunksOfEven size = go where go bytes = case V.splitAt size bytes of (a,b) | V.null a -> [] | V.null b -> [] | otherwise -> a : go b
249
chunksOfEven :: Int -> ByteVector -> [ByteVector] chunksOfEven size = go where go bytes = case V.splitAt size bytes of (a,b) | V.null a -> [] | V.null b -> [] | otherwise -> a : go b
249
chunksOfEven size = go where go bytes = case V.splitAt size bytes of (a,b) | V.null a -> [] | V.null b -> [] | otherwise -> a : go b
199
false
true
0
12
104
104
49
55
null
null
lukexi/haskell-opencv
src/OpenCV/Internal.hs
bsd-3-clause
objFromPtr :: (ForeignPtr c -> hask) -> (Ptr c -> IO ()) -> IO (Ptr c) -> IO hask objFromPtr haskCons finalizer mkObjPtr = mask_ $ do objPtr <- mkObjPtr haskCons <$> newForeignPtr objPtr (finalizer objPtr) -- | A utility for passing a vector of values along with their c-compatible length
297
objFromPtr :: (ForeignPtr c -> hask) -> (Ptr c -> IO ()) -> IO (Ptr c) -> IO hask objFromPtr haskCons finalizer mkObjPtr = mask_ $ do objPtr <- mkObjPtr haskCons <$> newForeignPtr objPtr (finalizer objPtr) -- | A utility for passing a vector of values along with their c-compatible length
297
objFromPtr haskCons finalizer mkObjPtr = mask_ $ do objPtr <- mkObjPtr haskCons <$> newForeignPtr objPtr (finalizer objPtr) -- | A utility for passing a vector of values along with their c-compatible length
215
false
true
0
11
59
97
46
51
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 11308087 = 2486
35
getValueFromProduct 11308087 = 2486
35
getValueFromProduct 11308087 = 2486
35
false
false
0
5
3
9
4
5
null
null
orome/crypto-enigma
Crypto/Enigma/Utils.hs
bsd-3-clause
numA0 :: Char -> Int numA0 ch = ord ch - ord 'A'
48
numA0 :: Char -> Int numA0 ch = ord ch - ord 'A'
48
numA0 ch = ord ch - ord 'A'
27
false
true
0
6
12
28
13
15
null
null
seckcoder/vector
Data/Vector/Generic.hs
bsd-3-clause
ifoldr f z = Bundle.foldr (uncurry f) z . Bundle.indexed . stream
65
ifoldr f z = Bundle.foldr (uncurry f) z . Bundle.indexed . stream
65
ifoldr f z = Bundle.foldr (uncurry f) z . Bundle.indexed . stream
65
false
false
1
9
11
39
16
23
null
null
holzensp/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
emitPrimOp dflags res IndexOffAddrOp_Int16 args = doIndexOffAddrOp (Just (mo_s_16ToWord dflags)) b16 res args
122
emitPrimOp dflags res IndexOffAddrOp_Int16 args = doIndexOffAddrOp (Just (mo_s_16ToWord dflags)) b16 res args
122
emitPrimOp dflags res IndexOffAddrOp_Int16 args = doIndexOffAddrOp (Just (mo_s_16ToWord dflags)) b16 res args
122
false
false
0
9
25
36
17
19
null
null
hkupty/aura
src/aura.hs
gpl-3.0
auraVersion :: String auraVersion = "1.3.2.1"
45
auraVersion :: String auraVersion = "1.3.2.1"
45
auraVersion = "1.3.2.1"
23
false
true
0
4
5
11
6
5
null
null
delta4d/codewars
kata/peano-and-church/PC.hs
mit
substR :: ISO a b -> (b -> a) substR = snd
42
substR :: ISO a b -> (b -> a) substR = snd
42
substR = snd
12
false
true
0
7
11
27
14
13
null
null
fmapfmapfmap/amazonka
amazonka-codepipeline/test/Test/AWS/Gen/CodePipeline.hs
mpl-2.0
testCreateCustomActionTypeResponse :: CreateCustomActionTypeResponse -> TestTree testCreateCustomActionTypeResponse = res "CreateCustomActionTypeResponse" "fixture/CreateCustomActionTypeResponse.proto" codePipeline (Proxy :: Proxy CreateCustomActionType)
270
testCreateCustomActionTypeResponse :: CreateCustomActionTypeResponse -> TestTree testCreateCustomActionTypeResponse = res "CreateCustomActionTypeResponse" "fixture/CreateCustomActionTypeResponse.proto" codePipeline (Proxy :: Proxy CreateCustomActionType)
270
testCreateCustomActionTypeResponse = res "CreateCustomActionTypeResponse" "fixture/CreateCustomActionTypeResponse.proto" codePipeline (Proxy :: Proxy CreateCustomActionType)
189
false
true
0
6
30
36
17
19
null
null
nilthehuman/cis194
Provided/StackVM.hs
unlicense
execute (BVal s1 : BVal s2 : ss) (Or : xs) = execute (s':ss) xs where s' = BVal (s1 || s2)
95
execute (BVal s1 : BVal s2 : ss) (Or : xs) = execute (s':ss) xs where s' = BVal (s1 || s2)
95
execute (BVal s1 : BVal s2 : ss) (Or : xs) = execute (s':ss) xs where s' = BVal (s1 || s2)
95
false
false
2
9
26
71
32
39
null
null
osa1/chsc
Core/Parser.hs
bsd-3-clause
-- TODO: this is not quite right, because case on variable is not altPatCore LHE.PWildCard = return (DefaultAlt Nothing, id)
142
altPatCore LHE.PWildCard = return (DefaultAlt Nothing, id)
76
altPatCore LHE.PWildCard = return (DefaultAlt Nothing, id)
76
true
false
0
7
37
24
12
12
null
null
timtylin/scholdoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
-- Contents of a figure, chosen based on keyword figureContent :: String -> Attr -> MarkdownParser (FigureType, Attr, F Blocks) figureContent "figure" = figureWithImages
169
figureContent :: String -> Attr -> MarkdownParser (FigureType, Attr, F Blocks) figureContent "figure" = figureWithImages
120
figureContent "figure" = figureWithImages
41
true
true
0
9
23
38
20
18
null
null
ezyang/ghc
compiler/utils/Util.hs
bsd-3-clause
{- ************************************************************************ * * \subsubsection{Sort utils} * * ***********************************************************************...
459
minWith :: Ord b => (a -> b) -> [a] -> a minWith get_key xs = ASSERT( not (null xs) ) head (sortWith get_key xs)
133
minWith get_key xs = ASSERT( not (null xs) ) head (sortWith get_key xs)
92
true
true
0
9
194
73
36
37
null
null
fmapfmapfmap/amazonka
amazonka-elastictranscoder/gen/Network/AWS/ElasticTranscoder/ReadPreset.hs
mpl-2.0
-- | The response status code. rprsResponseStatus :: Lens' ReadPresetResponse Int rprsResponseStatus = lens _rprsResponseStatus (\ s a -> s{_rprsResponseStatus = a})
165
rprsResponseStatus :: Lens' ReadPresetResponse Int rprsResponseStatus = lens _rprsResponseStatus (\ s a -> s{_rprsResponseStatus = a})
134
rprsResponseStatus = lens _rprsResponseStatus (\ s a -> s{_rprsResponseStatus = a})
83
true
true
0
9
21
40
22
18
null
null
dmbarbour/Sirea
src/Sirea/Internal/SigType.hs
bsd-3-clause
eqMerge :: Maybe a -> Maybe a -> Seq (Maybe a) -> Seq (Maybe a) -> Seq (Maybe a) seqMerge Nothing _ Done ys = ys
113
seqMerge :: Maybe a -> Maybe a -> Seq (Maybe a) -> Seq (Maybe a) -> Seq (Maybe a) seqMerge Nothing _ Done ys = ys
113
seqMerge Nothing _ Done ys = ys
31
false
true
0
12
26
73
33
40
null
null
sphynx/hamisado
Board/MoveGen.hs
bsd-3-clause
ray :: (Int -> Int) -> Bool -> Int -> [Int] ray dir increasing square = let inside = if increasing then (<64) else (>=0) in case takeWhile inside $ iterate dir square of [] -> [] squares -> tail squares
214
ray :: (Int -> Int) -> Bool -> Int -> [Int] ray dir increasing square = let inside = if increasing then (<64) else (>=0) in case takeWhile inside $ iterate dir square of [] -> [] squares -> tail squares
214
ray dir increasing square = let inside = if increasing then (<64) else (>=0) in case takeWhile inside $ iterate dir square of [] -> [] squares -> tail squares
170
false
true
0
10
52
106
54
52
null
null
brendanhay/gogol
gogol-debugger/gen/Network/Google/Resource/CloudDebugger/Debugger/Debuggees/Breakpoints/List.hs
mpl-2.0
-- | When set to \`true\`, the response includes the list of breakpoints set -- by any user. Otherwise, it includes only breakpoints set by the caller. ddblIncludeAllUsers :: Lens' DebuggerDebuggeesBreakpointsList (Maybe Bool) ddblIncludeAllUsers = lens _ddblIncludeAllUsers (\ s a -> s{_ddblIncludeAllUsers = a}...
321
ddblIncludeAllUsers :: Lens' DebuggerDebuggeesBreakpointsList (Maybe Bool) ddblIncludeAllUsers = lens _ddblIncludeAllUsers (\ s a -> s{_ddblIncludeAllUsers = a})
169
ddblIncludeAllUsers = lens _ddblIncludeAllUsers (\ s a -> s{_ddblIncludeAllUsers = a})
94
true
true
0
9
51
49
26
23
null
null
laser/haste-experiment
demos/todomvc/Model.hs
mit
editOneTodoText :: [Todo] -> Int -> String -> [Todo] editOneTodoText ts id s = map (\t -> if (todoId t) == id then (setTodoText t s) else t) ts
143
editOneTodoText :: [Todo] -> Int -> String -> [Todo] editOneTodoText ts id s = map (\t -> if (todoId t) == id then (setTodoText t s) else t) ts
143
editOneTodoText ts id s = map (\t -> if (todoId t) == id then (setTodoText t s) else t) ts
90
false
true
0
11
28
80
41
39
null
null
lukexi/stack
src/Stack/Setup.hs
bsd-3-clause
ensureGhcjsBooted :: (MonadIO m, MonadBaseControl IO m, MonadLogger m, MonadCatch m, HasConfig env, HasHttpManager env, HasTerminal env, HasReExec env, HasLogLevel env, MonadReader env m) => EnvOverride -> CompilerVersion -> Bool -> m () ensureGhcjsBooted menv cv shouldBoot = do eres <- try $ sin...
2,208
ensureGhcjsBooted :: (MonadIO m, MonadBaseControl IO m, MonadLogger m, MonadCatch m, HasConfig env, HasHttpManager env, HasTerminal env, HasReExec env, HasLogLevel env, MonadReader env m) => EnvOverride -> CompilerVersion -> Bool -> m () ensureGhcjsBooted menv cv shouldBoot = do eres <- try $ sin...
2,208
ensureGhcjsBooted menv cv shouldBoot = do eres <- try $ sinkProcessStdout Nothing menv "ghcjs" [] (return ()) case eres of Right () -> return () Left (ReadProcessException _ _ _ err) | "no input files" `S.isInfixOf` LBS.toStrict err -> return () Left (ReadProcessException _ ...
1,952
false
true
0
29
723
463
221
242
null
null
Lyapunov/haskell-programming-from-first-principles
chapter_8/sum.hs
mit
summer :: (Eq a, Num a) => a -> a summer 0 = 0
46
summer :: (Eq a, Num a) => a -> a summer 0 = 0
46
summer 0 = 0
12
false
true
0
6
13
33
17
16
null
null
pbv/codex-quickcheck
src/Codex/QuickCheck/C/Property.hs
mit
forArbitrary :: (CType a, Show a, Arbitrary a, Testable prop) => String -> (a -> prop) -> Property forArbitrary name pf = forAllShrink name arbitrary shrink pf
169
forArbitrary :: (CType a, Show a, Arbitrary a, Testable prop) => String -> (a -> prop) -> Property forArbitrary name pf = forAllShrink name arbitrary shrink pf
169
forArbitrary name pf = forAllShrink name arbitrary shrink pf
62
false
true
0
10
36
69
34
35
null
null
taylor1791/adventofcode
2015/src/Day17.hs
bsd-2-clause
combinations n xs = [ y:ys | y:xs' <- tails xs , ys <- combinations (n-1) xs']
105
combinations n xs = [ y:ys | y:xs' <- tails xs , ys <- combinations (n-1) xs']
105
combinations n xs = [ y:ys | y:xs' <- tails xs , ys <- combinations (n-1) xs']
105
false
false
0
10
43
53
26
27
null
null
sopvop/json-token-stream
src/Data/JSON/TokenStream/Write.hs
bsd-3-clause
ascii5 :: (Char, (Char, (Char, (Char, Char)))) -> BP.BoundedPrim a ascii5 cs = BP.liftFixedToBounded $ (const cs) >$< BP.char7 >*< BP.char7 >*< BP.char7 >*< BP.char7 >*< BP.char7
182
ascii5 :: (Char, (Char, (Char, (Char, Char)))) -> BP.BoundedPrim a ascii5 cs = BP.liftFixedToBounded $ (const cs) >$< BP.char7 >*< BP.char7 >*< BP.char7 >*< BP.char7 >*< BP.char7
182
ascii5 cs = BP.liftFixedToBounded $ (const cs) >$< BP.char7 >*< BP.char7 >*< BP.char7 >*< BP.char7 >*< BP.char7
115
false
true
0
12
30
89
48
41
null
null