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
isomorphism/hackage2
Distribution/Server/Framework/Resource.hs
bsd-3-clause
addServerNode :: Monoid a => BranchPath -> a -> ServerTree a -> ServerTree a addServerNode trunk response tree = treeFold trunk (ServerTree (Just response) Map.empty) tree
171
addServerNode :: Monoid a => BranchPath -> a -> ServerTree a -> ServerTree a addServerNode trunk response tree = treeFold trunk (ServerTree (Just response) Map.empty) tree
171
addServerNode trunk response tree = treeFold trunk (ServerTree (Just response) Map.empty) tree
94
false
true
0
9
25
66
31
35
null
null
sejdm/smartWallpaper
src/Calendar.hs
bsd-3-clause
formatCal s h f i n = map h [Sun .. Sat] : map (map f) theDates where theDates = chunksOf 7 $ replicate i Blank ++ map Date [1..n] mybg = s ^. calbgcol myfg = s ^. calfgcol
197
formatCal s h f i n = map h [Sun .. Sat] : map (map f) theDates where theDates = chunksOf 7 $ replicate i Blank ++ map Date [1..n] mybg = s ^. calbgcol myfg = s ^. calfgcol
197
formatCal s h f i n = map h [Sun .. Sat] : map (map f) theDates where theDates = chunksOf 7 $ replicate i Blank ++ map Date [1..n] mybg = s ^. calbgcol myfg = s ^. calfgcol
197
false
false
0
9
64
94
47
47
null
null
duplode/threepenny-gui
src/Graphics/UI/Threepenny/SVG/Attributes.hs
bsd-3-clause
operator = strAttr "operator"
50
operator = strAttr "operator"
50
operator = strAttr "operator"
50
false
false
1
5
24
12
4
8
null
null
Teaspot-Studio/metagraph
src/Data/Metagraph/Strict.hs
bsd-3-clause
-- | Get node payload nodePayload :: MetaNode edge node -> node nodePayload !v = _nodePayload v
95
nodePayload :: MetaNode edge node -> node nodePayload !v = _nodePayload v
73
nodePayload !v = _nodePayload v
31
true
true
0
6
16
28
13
15
null
null
fishtreesugar/laohuangli-hs
src/Data/Time/Calendar/Laohuangli.hs
bsd-3-clause
getNanmmingActivityName :: Activity -> IO T.Text getNanmmingActivityName a = do varIndex <- mod <$> random 12 <*> (pure $ length varNames) return $ T.replace "%v" (varNames !! varIndex) (actName a) where varNames = ["jieguo", "huodong", "pay", "expire", "zhangdan", "every", "free", "i1", "a", "virtual", "ad",...
352
getNanmmingActivityName :: Activity -> IO T.Text getNanmmingActivityName a = do varIndex <- mod <$> random 12 <*> (pure $ length varNames) return $ T.replace "%v" (varNames !! varIndex) (actName a) where varNames = ["jieguo", "huodong", "pay", "expire", "zhangdan", "every", "free", "i1", "a", "virtual", "ad",...
352
getNanmmingActivityName a = do varIndex <- mod <$> random 12 <*> (pure $ length varNames) return $ T.replace "%v" (varNames !! varIndex) (actName a) where varNames = ["jieguo", "huodong", "pay", "expire", "zhangdan", "every", "free", "i1", "a", "virtual", "ad", "spider", "mima", "pass", "ui"]
303
false
true
0
11
57
133
72
61
null
null
ComputationWithBoundedResources/tct-core
src/Tct/Core/Data/Declaration.hs
bsd-3-clause
setArgMeta k (FlagArg a fs) = FlagArg (k a) fs
50
setArgMeta k (FlagArg a fs) = FlagArg (k a) fs
50
setArgMeta k (FlagArg a fs) = FlagArg (k a) fs
50
false
false
0
7
13
30
14
16
null
null
satvikc/Lambda-Expression-Evaluator
LambdaEval.hs
mit
newString (x:xs) a | length x < length a = newString xs a | length x == length a = newString xs $ a ++ "a" | otherwise = newString xs $ a ++ [nextChar $ (!!(length a)) x]
220
newString (x:xs) a | length x < length a = newString xs a | length x == length a = newString xs $ a ++ "a" | otherwise = newString xs $ a ++ [nextChar $ (!!(length a)) x]
220
newString (x:xs) a | length x < length a = newString xs a | length x == length a = newString xs $ a ++ "a" | otherwise = newString xs $ a ++ [nextChar $ (!!(length a)) x]
220
false
false
0
12
88
110
50
60
null
null
atwupack/LearnOpenGL
src/LOGL/Application/Window.hs
bsd-3-clause
initWindowResize :: AppWindow -> MomentIO () initWindowResize win = do -- react on window resize winSizeE <- winSizeEvent win reactimate $ handleWinResize <$> winSizeE
179
initWindowResize :: AppWindow -> MomentIO () initWindowResize win = do -- react on window resize winSizeE <- winSizeEvent win reactimate $ handleWinResize <$> winSizeE
179
initWindowResize win = do -- react on window resize winSizeE <- winSizeEvent win reactimate $ handleWinResize <$> winSizeE
134
false
true
0
8
35
45
21
24
null
null
energyflowanalysis/efa-2.1
attic/src/EFA2/Signal/TH.hs
bsd-3-clause
mkDeriving :: [Name] -> Q [Dec] mkDeriving names = liftM concat $ mapM standaloneDerive names
93
mkDeriving :: [Name] -> Q [Dec] mkDeriving names = liftM concat $ mapM standaloneDerive names
93
mkDeriving names = liftM concat $ mapM standaloneDerive names
61
false
true
0
8
14
43
20
23
null
null
DougBurke/swish
tests/GraphTest.hs
lgpl-2.1
-- Remove two adjacent arcs from one, non-adjacent from another g104 :: GraphMem LabelMem g104 = arcsToGraph [ t10102, t10203, t10304, t10106, t10207, t10308, t10409, t10510, t10607, t10708, t10809, t10910, t11006 ]
241
g104 :: GraphMem LabelMem g104 = arcsToGraph [ t10102, t10203, t10304, t10106, t10207, t10308, t10409, t10510, t10607, t10708, t10809, t10910, t11006 ]
176
g104 = arcsToGraph [ t10102, t10203, t10304, t10106, t10207, t10308, t10409, t10510, t10607, t10708, t10809, t10910, t11006 ]
150
true
true
1
5
57
60
35
25
null
null
Ketouem/learn-you-a-haskell
src/chapter-6-modules/modules.hs
unlicense
-- Lookup for a value given a key findKey :: (Eq k) => k -> [(k, v)] -> v findKey key xs = snd . head . filter (\(k, v) -> key == k) $ xs
137
findKey :: (Eq k) => k -> [(k, v)] -> v findKey key xs = snd . head . filter (\(k, v) -> key == k) $ xs
103
findKey key xs = snd . head . filter (\(k, v) -> key == k) $ xs
63
true
true
0
10
35
76
42
34
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Hooks/DynamicLog.hs
bsd-2-clause
-- | Strip dzen formatting or commands. dzenStrip :: String -> String dzenStrip = strip [] where strip keep x | null x = keep | "^^" `isPrefixOf` x = strip (keep ++ "^") (drop 2 x) | '^' == head x = strip keep (drop 1 . dropWhile (/= ')') $ x) | otherwise = let (...
502
dzenStrip :: String -> String dzenStrip = strip [] where strip keep x | null x = keep | "^^" `isPrefixOf` x = strip (keep ++ "^") (drop 2 x) | '^' == head x = strip keep (drop 1 . dropWhile (/= ')') $ x) | otherwise = let (good,x') = span (/= '^') x ...
462
dzenStrip = strip [] where strip keep x | null x = keep | "^^" `isPrefixOf` x = strip (keep ++ "^") (drop 2 x) | '^' == head x = strip keep (drop 1 . dropWhile (/= ')') $ x) | otherwise = let (good,x') = span (/= '^') x in strip (kee...
432
true
true
0
11
175
189
89
100
null
null
jgm/Markdown
Markdown.hs
bsd-3-clause
isWhitespace '\t' = True
24
isWhitespace '\t' = True
24
isWhitespace '\t' = True
24
false
false
0
5
3
9
4
5
null
null
hesselink/stack
src/Stack/Package.hs
bsd-3-clause
-- | Get all dependencies of the package (buildable targets only). packageDescTools :: PackageDescription -> [Dependency] packageDescTools = concatMap buildTools . allBuildInfo'
177
packageDescTools :: PackageDescription -> [Dependency] packageDescTools = concatMap buildTools . allBuildInfo'
110
packageDescTools = concatMap buildTools . allBuildInfo'
55
true
true
0
8
21
33
15
18
null
null
haskoin/haskoin
src/Haskoin/Script/Standard.hs
unlicense
-- | Is script a data carrier output? isDataCarrier :: ScriptOutput -> Bool isDataCarrier (DataCarrier _) = True
112
isDataCarrier :: ScriptOutput -> Bool isDataCarrier (DataCarrier _) = True
74
isDataCarrier (DataCarrier _) = True
36
true
true
0
7
17
25
13
12
null
null
Javran/haptics
src/Trace/Haptics/Markup.hs
bsd-3-clause
markup_plugin :: Plugin markup_plugin = Plugin { name = "markup" , usage = "[OPTION] .. <TIX_FILE> [<MODULE> [<MODULE> ..]]" , options = markup_options , summary = "Markup Haskell source with program coverage" , implementation = markup_main , init_flags = default_flags , final_flags = defa...
341
markup_plugin :: Plugin markup_plugin = Plugin { name = "markup" , usage = "[OPTION] .. <TIX_FILE> [<MODULE> [<MODULE> ..]]" , options = markup_options , summary = "Markup Haskell source with program coverage" , implementation = markup_main , init_flags = default_flags , final_flags = defa...
341
markup_plugin = Plugin { name = "markup" , usage = "[OPTION] .. <TIX_FILE> [<MODULE> [<MODULE> ..]]" , options = markup_options , summary = "Markup Haskell source with program coverage" , implementation = markup_main , init_flags = default_flags , final_flags = default_final_flags }
317
false
true
0
6
78
55
35
20
null
null
acamino/state-codes
src/Data/StateCodes/ISO31662US.hs
mit
toName CO = "Colorado"
22
toName CO = "Colorado"
22
toName CO = "Colorado"
22
false
false
0
5
3
9
4
5
null
null
michalkonecny/aern2
aern2-erc/src/ERC/Array.hs
bsd-3-clause
arrayLookup _ _ = error "arrayLookup: supporting only 1-dimensional arrays"
75
arrayLookup _ _ = error "arrayLookup: supporting only 1-dimensional arrays"
75
arrayLookup _ _ = error "arrayLookup: supporting only 1-dimensional arrays"
75
false
false
0
5
9
14
6
8
null
null
grnet/snf-ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- Set of daemons which only run on the master. -- Keep in sync with the 'daemon-util' script. daemonsMaster :: FrozenSet String daemonsMaster = ConstantUtils.mkSet [wconfd, luxid, rapi]
186
daemonsMaster :: FrozenSet String daemonsMaster = ConstantUtils.mkSet [wconfd, luxid, rapi]
91
daemonsMaster = ConstantUtils.mkSet [wconfd, luxid, rapi]
57
true
true
0
6
27
35
18
17
null
null
plow-technologies/template-service
master/src/Data/Master/Template.hs
bsd-3-clause
checkTemplate x (Gt y) = x > y
30
checkTemplate x (Gt y) = x > y
30
checkTemplate x (Gt y) = x > y
30
false
false
0
7
7
21
10
11
null
null
spencerjanssen/cabal2nix
src/Cabal2Nix/Name.hs
bsd-3-clause
libNixName "libsystemd" = return "systemd"
66
libNixName "libsystemd" = return "systemd"
66
libNixName "libsystemd" = return "systemd"
66
false
false
0
5
28
12
5
7
null
null
headprogrammingczar/cabal
Cabal/Distribution/Simple/Setup.hs
bsd-3-clause
configureProg :: Verbosity -> ProgramConfiguration -> Program -> IO (FilePath, [String]) configureProg verbosity programConfig prog = do (p, _) <- requireProgram verbosity prog programConfig let pInv = programInvocation p [] return (progInvokePath pInv, progInvokeArgs pInv) -- | Helper fun...
533
configureProg :: Verbosity -> ProgramConfiguration -> Program -> IO (FilePath, [String]) configureProg verbosity programConfig prog = do (p, _) <- requireProgram verbosity prog programConfig let pInv = programInvocation p [] return (progInvokePath pInv, progInvokeArgs pInv) -- | Helper fun...
533
configureProg verbosity programConfig prog = do (p, _) <- requireProgram verbosity prog programConfig let pInv = programInvocation p [] return (progInvokePath pInv, progInvokeArgs pInv) -- | Helper function to split a string into a list of arguments. -- It's supposed to handle quoted things sensibly, eg: -...
427
false
true
0
11
102
102
53
49
null
null
badp/ganeti
src/Ganeti/Constants.hs
gpl-2.0
cvEnodetime :: (String, String, String) cvEnodetime = ("node", Types.cVErrorCodeToRaw CvENODETIME, "Node returned invalid time")
136
cvEnodetime :: (String, String, String) cvEnodetime = ("node", Types.cVErrorCodeToRaw CvENODETIME, "Node returned invalid time")
136
cvEnodetime = ("node", Types.cVErrorCodeToRaw CvENODETIME, "Node returned invalid time")
96
false
true
0
7
21
34
20
14
null
null
JacquesCarette/literate-scientific-software
code/drasil-example/Drasil/SSP/Goals.hs
bsd-2-clause
----------- -- Goals -- ----------- goals :: [ConceptInstance] goals = [identifyCritAndFSGS, determineNormalFGS, determineShearFGS]
132
goals :: [ConceptInstance] goals = [identifyCritAndFSGS, determineNormalFGS, determineShearFGS]
95
goals = [identifyCritAndFSGS, determineNormalFGS, determineShearFGS]
68
true
true
0
7
13
33
18
15
null
null
ARCCN/hcprobe
src/Network/Openflow/Types.hs
bsd-3-clause
ofFeatureFlags OFPPF_PAUSE_ASYM = 1 `shiftL` 11
49
ofFeatureFlags OFPPF_PAUSE_ASYM = 1 `shiftL` 11
49
ofFeatureFlags OFPPF_PAUSE_ASYM = 1 `shiftL` 11
49
false
false
0
5
7
15
8
7
null
null
geraldus/image-proc
src/Lib.hs
bsd-3-clause
lookupSequenceThing things (x:v:xs) = if x `elem` things then Just v else lookupSequenceThing things xs
115
lookupSequenceThing things (x:v:xs) = if x `elem` things then Just v else lookupSequenceThing things xs
115
lookupSequenceThing things (x:v:xs) = if x `elem` things then Just v else lookupSequenceThing things xs
115
false
false
0
8
26
44
23
21
null
null
alphalambda/codeworld
codeworld-auth/src/CodeWorld/Auth/Secret.hs
apache-2.0
readSecret :: FilePath -- ^ File path -> IO Secret -- ^ Result readSecret path = do s <- ByteString.readFile path case Base64.decode s of Left e -> error e Right bytes -> return $ Secret bytes
234
readSecret :: FilePath -- ^ File path -> IO Secret readSecret path = do s <- ByteString.readFile path case Base64.decode s of Left e -> error e Right bytes -> return $ Secret bytes
219
readSecret path = do s <- ByteString.readFile path case Base64.decode s of Left e -> error e Right bytes -> return $ Secret bytes
153
true
true
0
11
78
75
34
41
null
null
JacquesCarette/literate-scientific-software
code/drasil-example/Drasil/SSP/Changes.hs
bsd-2-clause
likelyChgCSF :: ConceptInstance likelyChgCSF = cic "LC_seismic" lcCSFDesc "Calculate-Seismic-Force" likeChgDom
110
likelyChgCSF :: ConceptInstance likelyChgCSF = cic "LC_seismic" lcCSFDesc "Calculate-Seismic-Force" likeChgDom
110
likelyChgCSF = cic "LC_seismic" lcCSFDesc "Calculate-Seismic-Force" likeChgDom
78
false
true
0
5
9
20
10
10
null
null
igraves/hdcpu16
Hdcpu16/Types.hs
gpl-3.0
val2reg :: Word16 -> Register val2reg val = case val of 0x0 -> A 0x1 -> B 0x2 -> C 0x3 -> X 0x4 -> Y 0x5 -> Z 0x6 -> I 0x7 -> J
279
val2reg :: Word16 -> Register val2reg val = case val of 0x0 -> A 0x1 -> B 0x2 -> C 0x3 -> X 0x4 -> Y 0x5 -> Z 0x6 -> I 0x7 -> J
279
val2reg val = case val of 0x0 -> A 0x1 -> B 0x2 -> C 0x3 -> X 0x4 -> Y 0x5 -> Z 0x6 -> I 0x7 -> J
249
false
true
2
7
186
46
29
17
null
null
seereason/ghcjs-jquery
JavaScript/JQuery.hs
mit
nextUntil :: Selector -> Maybe Selector -> JQuery -> IO JQuery nextUntil s mf = jq_nextUntil (textToJSString s) (maybe "" textToJSString mf)
140
nextUntil :: Selector -> Maybe Selector -> JQuery -> IO JQuery nextUntil s mf = jq_nextUntil (textToJSString s) (maybe "" textToJSString mf)
140
nextUntil s mf = jq_nextUntil (textToJSString s) (maybe "" textToJSString mf)
77
false
true
0
8
21
55
26
29
null
null
janschulz/pandoc
src/Text/Pandoc/Writers/Textile.hs
gpl-2.0
inlineToTextile opts (Quoted SingleQuote lst) = do contents <- inlineListToTextile opts lst return $ "'" ++ contents ++ "'"
127
inlineToTextile opts (Quoted SingleQuote lst) = do contents <- inlineListToTextile opts lst return $ "'" ++ contents ++ "'"
127
inlineToTextile opts (Quoted SingleQuote lst) = do contents <- inlineListToTextile opts lst return $ "'" ++ contents ++ "'"
127
false
false
0
9
22
48
21
27
null
null
michaelficarra/purescript
psci/Completion.hs
mit
directiveArg _ Quit = []
31
directiveArg _ Quit = []
31
directiveArg _ Quit = []
31
false
false
1
6
11
15
6
9
null
null
yesodweb/shakespeare
Text/Hamlet.hs
mit
hamletUsedIdentifiers :: HamletSettings -> String -> [(Deref, VarType)] hamletUsedIdentifiers settings = concatMap getVars . contentFromString settings
155
hamletUsedIdentifiers :: HamletSettings -> String -> [(Deref, VarType)] hamletUsedIdentifiers settings = concatMap getVars . contentFromString settings
155
hamletUsedIdentifiers settings = concatMap getVars . contentFromString settings
83
false
true
1
8
19
45
22
23
null
null
emhoracek/smooch
app/src/Dolls/Controller.hs
gpl-3.0
fileUploadHandler :: Ctxt -> File -> IO (Maybe Response) fileUploadHandler ctxt (File name _ filePath') = do hash <- hashFile <$> LBS.readFile filePath' output <- runExceptT $ createOrLoadDoll ctxt Nothing (takeBaseName (T.unpack name)) Nothing hash renderKissDoll ctxt output
282
fileUploadHandler :: Ctxt -> File -> IO (Maybe Response) fileUploadHandler ctxt (File name _ filePath') = do hash <- hashFile <$> LBS.readFile filePath' output <- runExceptT $ createOrLoadDoll ctxt Nothing (takeBaseName (T.unpack name)) Nothing hash renderKissDoll ctxt output
282
fileUploadHandler ctxt (File name _ filePath') = do hash <- hashFile <$> LBS.readFile filePath' output <- runExceptT $ createOrLoadDoll ctxt Nothing (takeBaseName (T.unpack name)) Nothing hash renderKissDoll ctxt output
225
false
true
0
14
43
103
48
55
null
null
hvr/jhc
lib/haskell-extras/Data/List.hs
mit
genericSplitAt _ [] = ([],[])
34
genericSplitAt _ [] = ([],[])
34
genericSplitAt _ [] = ([],[])
34
false
false
0
7
9
27
13
14
null
null
geophf/1HaskellADay
exercises/HAD/Y2018/M10/D24/Solution.hs
mit
bfprogram1 :: BFProgram bfprogram1 = ".>.>.>.>.>.>.>.>.>.>.>.>.>"
65
bfprogram1 :: BFProgram bfprogram1 = ".>.>.>.>.>.>.>.>.>.>.>.>.>"
65
bfprogram1 = ".>.>.>.>.>.>.>.>.>.>.>.>.>"
41
false
true
0
4
5
11
6
5
null
null
joelburget/frankenstein
src/Planetary/Support/Parser.hs
bsd-3-clause
parsePeg :: MonadicParsing m => m Peg' parsePeg = Peg <$> parseAbility <*> parseValTy <?> "Peg"
101
parsePeg :: MonadicParsing m => m Peg' parsePeg = Peg <$> parseAbility <*> parseValTy <?> "Peg"
101
parsePeg = Peg <$> parseAbility <*> parseValTy <?> "Peg"
62
false
true
7
6
21
39
18
21
null
null
adp-multi/adp-multi
tests/ADP/Tests/ABABExample.hs
bsd-3-clause
grammar :: ABAB_Algebra MyChar answerDim1 answerDim2 -> String -> [answerDim1] grammar algebra inp = let (fz,fp,nil,h,h2) = algebra fzRewrite :: Dim1 fzRewrite [a,a',b,b'] = [a,b,a',b'] s = tabulated1 $ fz <<< a ~~~ b >>> fzRewrite ... h fpRewrite :: Dim2 fpRewrite [a,a',c,d] = ([a,c...
798
grammar :: ABAB_Algebra MyChar answerDim1 answerDim2 -> String -> [answerDim1] grammar algebra inp = let (fz,fp,nil,h,h2) = algebra fzRewrite :: Dim1 fzRewrite [a,a',b,b'] = [a,b,a',b'] s = tabulated1 $ fz <<< a ~~~ b >>> fzRewrite ... h fpRewrite :: Dim2 fpRewrite [a,a',c,d] = ([a,c...
798
grammar algebra inp = let (fz,fp,nil,h,h2) = algebra fzRewrite :: Dim1 fzRewrite [a,a',b,b'] = [a,b,a',b'] s = tabulated1 $ fz <<< a ~~~ b >>> fzRewrite ... h fpRewrite :: Dim2 fpRewrite [a,a',c,d] = ([a,c],[a',d]) a = tabulated2 $ yieldSize2 (0,Nothing) (0,Nothing) $ ...
719
false
true
0
19
241
372
199
173
null
null
Norberg/gui_scad
src/ScadTreeView.hs
gpl-3.0
isMenuActionAllowed :: MenuAction -> Scad -> Bool isMenuActionAllowed DeleteNode Root = False
93
isMenuActionAllowed :: MenuAction -> Scad -> Bool isMenuActionAllowed DeleteNode Root = False
93
isMenuActionAllowed DeleteNode Root = False
43
false
true
0
6
11
24
12
12
null
null
GU-CLASP/TypedFlow
TypedFlow/Abstract.hs
lgpl-3.0
-- +expandDim :: forall n s t. KnownTyp t => KnownShape s => Axis n s -> Tensor s t -> Tensor (Take n s ++ (1 ': Drop n s)) t -- +expandDim ax x = case expandDimProof ax s of Refl -> reshapeFrom s x -- | Add an extra dimension at axis (0) of size 1. expandDim0 :: ∀ s t. KnownShape s => KnownTyp t => KnownLen s => Tens...
368
expandDim0 :: ∀ s t. KnownShape s => KnownTyp t => KnownLen s => Tensor s t -> Tensor (1 ': s) t expandDim0 = reshape
117
expandDim0 = reshape
20
true
true
0
12
85
64
33
31
null
null
uwap/Idris-dev
src/Idris/Docs.hs
bsd-3-clause
docData :: Name -> TypeInfo -> Idris Docs docData n ti = do tdoc <- docFun n cdocs <- mapM docFun (con_names ti) return (DataDoc tdoc cdocs)
156
docData :: Name -> TypeInfo -> Idris Docs docData n ti = do tdoc <- docFun n cdocs <- mapM docFun (con_names ti) return (DataDoc tdoc cdocs)
156
docData n ti = do tdoc <- docFun n cdocs <- mapM docFun (con_names ti) return (DataDoc tdoc cdocs)
114
false
true
0
11
42
74
32
42
null
null
mydaum/cabal
Cabal/Distribution/Simple/LHC.hs
bsd-3-clause
-- ----------------------------------------------------------------------------- -- Installing -- |Install executables for GHC. installExe :: Verbosity -> LocalBuildInfo -> FilePath -- ^Where to copy the files to -> FilePath -- ^Build location -> (FilePath, FilePath) -- ^E...
1,025
installExe :: Verbosity -> LocalBuildInfo -> FilePath -- ^Where to copy the files to -> FilePath -- ^Build location -> (FilePath, FilePath) -- ^Executable (prefix,suffix) -> PackageDescription -> Executable -> IO () installExe verbosity lbi ...
896
installExe verbosity lbi binDir buildPref (progprefix, progsuffix) _pkg exe = do createDirectoryIfMissingVerbose verbosity True binDir let exeFileName = unUnqualComponentName (exeName exe) <.> exeExtension fixedExeBaseName = progprefix ++ unUnqualComponentName (exeName exe) ++ progsuffix installBinary d...
601
true
true
0
18
241
208
105
103
null
null
AndressaUmetsu/PapaEhPop
huffman/Huffman.hs
mit
huffmanList_ [] = []
20
huffmanList_ [] = []
20
huffmanList_ [] = []
20
false
false
0
6
3
13
6
7
null
null
ganeti/htools
Ganeti/HTools/Luxi.hs
gpl-2.0
-- * Utility functions -- | Ensure a given JSValue is actually a JSArray. toArray :: (Monad m) => JSValue -> m [JSValue] toArray v = case v of JSArray arr -> return arr o -> fail ("Invalid input, expected array but got " ++ show o) -- | Annotate errors when converting values with owner/attribute for -...
339
toArray :: (Monad m) => JSValue -> m [JSValue] toArray v = case v of JSArray arr -> return arr o -> fail ("Invalid input, expected array but got " ++ show o) -- | Annotate errors when converting values with owner/attribute for -- better debugging.
264
toArray v = case v of JSArray arr -> return arr o -> fail ("Invalid input, expected array but got " ++ show o) -- | Annotate errors when converting values with owner/attribute for -- better debugging.
217
true
true
0
11
77
72
37
35
null
null
PiffNP/HaskellProject
src/WhileParser.hs
bsd-3-clause
bBinOp :: Parser BBinOp bBinOp = (reserved "and" >> return And) <|> (reserved "or" >> return Or)
99
bBinOp :: Parser BBinOp bBinOp = (reserved "and" >> return And) <|> (reserved "or" >> return Or)
99
bBinOp = (reserved "and" >> return And) <|> (reserved "or" >> return Or)
75
false
true
3
8
19
48
23
25
null
null
matterhorn-chat/matterhorn
src/Matterhorn/Zipper.hs
bsd-3-clause
filterZipper :: (Eq b) => (b -> Bool) -> Zipper a b -> Zipper a b filterZipper f oldZip = maintainFocus newZip where maintainFocus = findRight ((== focus oldZip) . Just) newZip = Zipper { zTrees = zTrees oldZip & mapped._2 %~ Seq.filter f , zRing = C.filterR f (zRing oldZip) ...
335
filterZipper :: (Eq b) => (b -> Bool) -> Zipper a b -> Zipper a b filterZipper f oldZip = maintainFocus newZip where maintainFocus = findRight ((== focus oldZip) . Just) newZip = Zipper { zTrees = zTrees oldZip & mapped._2 %~ Seq.filter f , zRing = C.filterR f (zRing oldZip) ...
335
filterZipper f oldZip = maintainFocus newZip where maintainFocus = findRight ((== focus oldZip) . Just) newZip = Zipper { zTrees = zTrees oldZip & mapped._2 %~ Seq.filter f , zRing = C.filterR f (zRing oldZip) }
269
false
true
2
10
109
142
67
75
null
null
kim/amazonka
amazonka-glacier/gen/Network/AWS/Glacier/Types.hs
mpl-2.0
-- | The optional description for the job. The description must be less than or -- equal to 1,024 bytes. The allowable characters are 7-bit ASCII without -- control codes-specifically, ASCII values 32-126 decimal or 0x20-0x7E -- hexadecimal. jpDescription :: Lens' JobParameters (Maybe Text) jpDescription = lens _jpDesc...
362
jpDescription :: Lens' JobParameters (Maybe Text) jpDescription = lens _jpDescription (\s a -> s { _jpDescription = a })
120
jpDescription = lens _jpDescription (\s a -> s { _jpDescription = a })
70
true
true
0
9
56
49
28
21
null
null
jhance/llvm-untyped
LLVM/Untyped/Core.hs
gpl-3.0
setValueName :: Value -> String -> LLVM () setValueName (Value value) name = LLVM $ withCString name (L.setValueName value)
123
setValueName :: Value -> String -> LLVM () setValueName (Value value) name = LLVM $ withCString name (L.setValueName value)
123
setValueName (Value value) name = LLVM $ withCString name (L.setValueName value)
80
false
true
0
9
18
52
25
27
null
null
senavi/haskell
chp4.hs
gpl-3.0
safetail :: [a] -> [a] -- safetail xs = if (null xs) then xs else tail xs -- safetail xs | null xs = xs -- | otherwise = tail xs safetail [] = []
159
safetail :: [a] -> [a] safetail [] = []
39
safetail [] = []
16
true
true
0
6
48
31
18
13
null
null
hjwylde/werewolf
app/Game/Werewolf/Variant/Standard/Engine.hs
bsd-3-clause
villagesTurnText :: Text villagesTurnText = [iFile|variant/standard/engine/villages-turn/start.txt|]
100
villagesTurnText :: Text villagesTurnText = [iFile|variant/standard/engine/villages-turn/start.txt|]
100
villagesTurnText = [iFile|variant/standard/engine/villages-turn/start.txt|]
75
false
true
0
6
5
22
11
11
null
null
clux/tournament.hs
Game/Tournament.hs
mit
-- Internal helpers gameZip :: Game -> [(Player, Score)] gameZip m = zip (players m) (fromJust (result m))
106
gameZip :: Game -> [(Player, Score)] gameZip m = zip (players m) (fromJust (result m))
86
gameZip m = zip (players m) (fromJust (result m))
49
true
true
0
9
17
57
28
29
null
null
Zigazou/Tank
src/ParseActions.hs
gpl-3.0
simpleAction :: GenParser Char TankID Action simpleAction = do action <- actionByName simpleActions liftM action getState where simpleActions = [ ("forward", Forward) , ("backward", Backward) , ("fire", Fire) , ("dropmine", DropM...
503
simpleAction :: GenParser Char TankID Action simpleAction = do action <- actionByName simpleActions liftM action getState where simpleActions = [ ("forward", Forward) , ("backward", Backward) , ("fire", Fire) , ("dropmine", DropM...
503
simpleAction = do action <- actionByName simpleActions liftM action getState where simpleActions = [ ("forward", Forward) , ("backward", Backward) , ("fire", Fire) , ("dropmine", DropMine) ] {-| Parse a...
458
false
true
0
8
178
80
45
35
null
null
julmue/UntypedLambda
src/Language/Lambda/Semantics/Nameless/SmallStep.hs
bsd-3-clause
-- ----------------------------------------------------------------------------- -- Evaluation rules normal-order reduction: -- -- Congruence rules: -- t1 -> t1' -- ----------------- (E-App1) -- t1 t2 -> t1' t2 -- -- t2 -> t2' -- ----------------- (E-App2) -- t1 t2 -> t1 t2' -- -- Computation rule: --...
793
normalOrder1 :: Exp n a -> Exp n a normalOrder1 = unwrapStepResult . stepNO
75
normalOrder1 = unwrapStepResult . stepNO
40
true
true
0
7
147
63
43
20
null
null
rueshyna/gogol
gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs
mpl-2.0
-- | Creates a value of 'EntityUserLinkPermissions' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'eulpLocal' -- -- * 'eulpEffective' entityUserLinkPermissions :: EntityUserLinkPermissions entityUserLinkPermissions = EntityUs...
402
entityUserLinkPermissions :: EntityUserLinkPermissions entityUserLinkPermissions = EntityUserLinkPermissions' { _eulpLocal = Nothing , _eulpEffective = Nothing }
181
entityUserLinkPermissions = EntityUserLinkPermissions' { _eulpLocal = Nothing , _eulpEffective = Nothing }
122
true
true
1
7
72
39
23
16
null
null
GaloisInc/ivory
ivory-model-check/src/Ivory/ModelCheck.hs
bsd-3-clause
consistencyQuery :: Statement consistencyQuery = query $ noLoc false
68
consistencyQuery :: Statement consistencyQuery = query $ noLoc false
68
consistencyQuery = query $ noLoc false
38
false
true
0
6
8
18
9
9
null
null
kaoskorobase/mescaline
resources/hugs/packages/base/Data/IntSet.hs
gpl-3.0
intersection t (Tip x) = case lookup x t of Just y -> Tip y Nothing -> Nil
90
intersection t (Tip x) = case lookup x t of Just y -> Tip y Nothing -> Nil
90
intersection t (Tip x) = case lookup x t of Just y -> Tip y Nothing -> Nil
90
false
false
0
8
33
44
20
24
null
null
bgamari/text
tests/Tests/Properties.hs
bsd-2-clause
t_findCount s = (L.length . T.breakOnAll s) `eq` T.count s
62
t_findCount s = (L.length . T.breakOnAll s) `eq` T.count s
62
t_findCount s = (L.length . T.breakOnAll s) `eq` T.count s
62
false
false
0
9
13
34
17
17
null
null
pdmurray/haskell-book-ex
src/ch12/Exercises12.5.hs
bsd-3-clause
countVowels :: String -> Integer countVowels = toInteger . length . Data.Maybe.mapMaybe isVowel
95
countVowels :: String -> Integer countVowels = toInteger . length . Data.Maybe.mapMaybe isVowel
95
countVowels = toInteger . length . Data.Maybe.mapMaybe isVowel
62
false
true
0
7
12
35
16
19
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
cognisantly = id
16
cognisantly = id
16
cognisantly = id
16
false
false
0
4
2
6
3
3
null
null
geophf/1HaskellADay
exercises/HAD/Y2018/M01/D30/Solution.hs
mit
fetchArticleMetaData :: Connection -> Day -> IO [ArticleMetaData] fetchArticleMetaData conn = query conn fetchArticleMetaDataStmt . singleton
141
fetchArticleMetaData :: Connection -> Day -> IO [ArticleMetaData] fetchArticleMetaData conn = query conn fetchArticleMetaDataStmt . singleton
141
fetchArticleMetaData conn = query conn fetchArticleMetaDataStmt . singleton
75
false
true
0
8
15
37
18
19
null
null
shlevy/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
nlHsParTy t = noLoc (HsParTy t)
33
nlHsParTy t = noLoc (HsParTy t)
33
nlHsParTy t = noLoc (HsParTy t)
33
false
false
0
7
7
18
8
10
null
null
glutamate/space
GeneralizedSignals.hs
bsd-3-clause
discreteLims :: (Nat n, IsDouble d) => Signal (Vec n d) a -> (Vec n Int, Vec n Int) discreteLims s@(Signal d (lo,hi) invlims arr) = ( fmap (round . toDouble) $ lo/d, fmap (round . toDouble) $ hi/d)
203
discreteLims :: (Nat n, IsDouble d) => Signal (Vec n d) a -> (Vec n Int, Vec n Int) discreteLims s@(Signal d (lo,hi) invlims arr) = ( fmap (round . toDouble) $ lo/d, fmap (round . toDouble) $ hi/d)
203
discreteLims s@(Signal d (lo,hi) invlims arr) = ( fmap (round . toDouble) $ lo/d, fmap (round . toDouble) $ hi/d)
119
false
true
1
11
44
134
66
68
null
null
GaloisInc/halvm-ghc
compiler/main/HscTypes.hs
bsd-3-clause
-- Domain = modules in the imported packages -- | Constructs an empty HomePackageTable emptyHomePackageTable :: HomePackageTable emptyHomePackageTable = emptyUFM
163
emptyHomePackageTable :: HomePackageTable emptyHomePackageTable = emptyUFM
75
emptyHomePackageTable = emptyUFM
33
true
true
0
4
21
13
8
5
null
null
erochest/wa-tor
src/WaTor/Random.hs
apache-2.0
shuffle :: V.Vector a -> GenIO -> IO (V.Vector a) shuffle v g = do v' <- V.thaw v mapM_ (randomSwap g v') $ reverse [1 .. (V.length v - 1)] V.freeze v'
163
shuffle :: V.Vector a -> GenIO -> IO (V.Vector a) shuffle v g = do v' <- V.thaw v mapM_ (randomSwap g v') $ reverse [1 .. (V.length v - 1)] V.freeze v'
163
shuffle v g = do v' <- V.thaw v mapM_ (randomSwap g v') $ reverse [1 .. (V.length v - 1)] V.freeze v'
113
false
true
0
13
44
99
46
53
null
null
simonmichael/shelltestrunner
src/shelltest.hs
gpl-3.0
progname, progversion :: String progname = "shelltest"
54
progname, progversion :: String progname = "shelltest"
54
progname = "shelltest"
22
false
true
2
6
6
24
9
15
null
null
kim/amazonka
amazonka-cloudsearch/gen/Network/AWS/CloudSearch/Types.hs
mpl-2.0
-- | Whether facet information can be returned for the field. daoFacetEnabled :: Lens' DoubleArrayOptions (Maybe Bool) daoFacetEnabled = lens _daoFacetEnabled (\s a -> s { _daoFacetEnabled = a })
195
daoFacetEnabled :: Lens' DoubleArrayOptions (Maybe Bool) daoFacetEnabled = lens _daoFacetEnabled (\s a -> s { _daoFacetEnabled = a })
133
daoFacetEnabled = lens _daoFacetEnabled (\s a -> s { _daoFacetEnabled = a })
76
true
true
0
9
29
46
25
21
null
null
gilith/hol
src/Main.hs
mit
main :: IO () main = do args <- Environment.getArgs if null args then usage "no arguments" else return () thy <- case articleArg args of Just f -> articleThy f Nothing -> case packageFileArg args of Just f -> packageFileThy f N...
698
main :: IO () main = do args <- Environment.getArgs if null args then usage "no arguments" else return () thy <- case articleArg args of Just f -> articleThy f Nothing -> case packageFileArg args of Just f -> packageFileThy f N...
698
main = do args <- Environment.getArgs if null args then usage "no arguments" else return () thy <- case articleArg args of Just f -> articleThy f Nothing -> case packageFileArg args of Just f -> packageFileThy f Nothing -> ...
684
false
true
0
22
332
189
82
107
null
null
nymacro/hs-kmip
src/Ttlv/Validator/Objects.hs
bsd-3-clause
keyWrappingData :: TtlvParser Ttlv keyWrappingData = do --tag T.WrappingData <+> apply T.WrappingMethod tEnum optional T.EncryptionKeyInformation encryptionKeyInfo optional T.MACSignatureKeyInformation macSignatureKeyInfo optional T.MACSignature tByteString optional T.IVCounterNonce tByteString
315
keyWrappingData :: TtlvParser Ttlv keyWrappingData = do --tag T.WrappingData <+> apply T.WrappingMethod tEnum optional T.EncryptionKeyInformation encryptionKeyInfo optional T.MACSignatureKeyInformation macSignatureKeyInfo optional T.MACSignature tByteString optional T.IVCounterNonce tByteString
315
keyWrappingData = do --tag T.WrappingData <+> apply T.WrappingMethod tEnum optional T.EncryptionKeyInformation encryptionKeyInfo optional T.MACSignatureKeyInformation macSignatureKeyInfo optional T.MACSignature tByteString optional T.IVCounterNonce tByteString
280
false
true
0
8
44
65
28
37
null
null
teiche/femtocc
BEStackMachine.hs
bsd-3-clause
-- Preallocate room on the stack for any locals declared in the function funcAlloc :: Expr -> [ASMStatement] funcAlloc (FuncDef _ _ _ body) = [Asp ((Imm . negate . stackSize) body)]
182
funcAlloc :: Expr -> [ASMStatement] funcAlloc (FuncDef _ _ _ body) = [Asp ((Imm . negate . stackSize) body)]
109
funcAlloc (FuncDef _ _ _ body) = [Asp ((Imm . negate . stackSize) body)]
73
true
true
0
11
32
61
31
30
null
null
nevrenato/Hets_Fork
Comorphisms/CFOL2IsabelleHOL.hs
gpl-2.0
mapSen :: FormulaTranslator f e -> CASL.Sign.Sign f e -> Set.Set String -> FORMULA f -> Sentence mapSen trForm sign tyToks = mkSen . transFORMULA sign tyToks trForm (getAssumpsToks sign)
197
mapSen :: FormulaTranslator f e -> CASL.Sign.Sign f e -> Set.Set String -> FORMULA f -> Sentence mapSen trForm sign tyToks = mkSen . transFORMULA sign tyToks trForm (getAssumpsToks sign)
197
mapSen trForm sign tyToks = mkSen . transFORMULA sign tyToks trForm (getAssumpsToks sign)
93
false
true
0
9
40
74
35
39
null
null
stu-smith/project-euler-haskell
Euler-021.hs
mit
divisors n = filter (\x -> n `rem` x == 0) [1 .. n-1]
53
divisors n = filter (\x -> n `rem` x == 0) [1 .. n-1]
53
divisors n = filter (\x -> n `rem` x == 0) [1 .. n-1]
53
false
false
0
9
13
42
23
19
null
null
kbrose/math
Mancala/MancalaBoard.hs
unlicense
playerScore :: MancalaBoard -> Player -> Int playerScore mancala p = numCaptured mancala p + sum (playerSide mancala p)
124
playerScore :: MancalaBoard -> Player -> Int playerScore mancala p = numCaptured mancala p + sum (playerSide mancala p)
119
playerScore mancala p = numCaptured mancala p + sum (playerSide mancala p)
74
false
true
0
8
23
49
22
27
null
null
sqd/haskell-C89-interpreter
Parse.hs
mit
-- Split only once, searching from the right splitOnceR :: Eq a => a -> [a] -> ([a], [a]) splitOnceR t l = let (x, y) = fst' reverse $ snd' reverse $ splitOnceL t $ reverse l in (y, x)
184
splitOnceR :: Eq a => a -> [a] -> ([a], [a]) splitOnceR t l = let (x, y) = fst' reverse $ snd' reverse $ splitOnceL t $ reverse l in (y, x)
139
splitOnceR t l = let (x, y) = fst' reverse $ snd' reverse $ splitOnceL t $ reverse l in (y, x)
94
true
true
0
12
40
95
49
46
null
null
fredokun/piexplorer
src/Parser.hs
gpl-3.0
reservedOp :: String -> Parser () reservedOp = Tok.reservedOp lexer
67
reservedOp :: String -> Parser () reservedOp = Tok.reservedOp lexer
67
reservedOp = Tok.reservedOp lexer
33
false
true
0
8
9
31
13
18
null
null
olsner/ghc
compiler/rename/RnBinds.hs
bsd-3-clause
rnTopBindsBoot _ b = pprPanic "rnTopBindsBoot" (ppr b)
54
rnTopBindsBoot _ b = pprPanic "rnTopBindsBoot" (ppr b)
54
rnTopBindsBoot _ b = pprPanic "rnTopBindsBoot" (ppr b)
54
false
false
0
7
7
22
10
12
null
null
aartifact/aartifact-verifier
src/ExpSQL.hs
mit
showC' c = case c of And -> "and" Or -> "or" Imp -> "implies that" Iff -> "if and only if" Plus -> "+" Minus -> "-" Times -> "\\cdot" Div -> "/" Mod -> "\\mod" Pow -> "^" Circ -> "\\circ" PowerSet -> "\\powerset" Otimes -> "\\otimes" Oplus -> "\\oplus" Union -> "\\cup" Isect -> "\\cap" ...
589
showC' c = case c of And -> "and" Or -> "or" Imp -> "implies that" Iff -> "if and only if" Plus -> "+" Minus -> "-" Times -> "\\cdot" Div -> "/" Mod -> "\\mod" Pow -> "^" Circ -> "\\circ" PowerSet -> "\\powerset" Otimes -> "\\otimes" Oplus -> "\\oplus" Union -> "\\cup" Isect -> "\\cap" ...
589
showC' c = case c of And -> "and" Or -> "or" Imp -> "implies that" Iff -> "if and only if" Plus -> "+" Minus -> "-" Times -> "\\cdot" Div -> "/" Mod -> "\\mod" Pow -> "^" Circ -> "\\circ" PowerSet -> "\\powerset" Otimes -> "\\otimes" Oplus -> "\\oplus" Union -> "\\cup" Isect -> "\\cap" ...
589
false
false
0
9
164
203
100
103
null
null
mightymoose/liquidhaskell
benchmarks/containers-0.5.0.0/tests/set-properties.hs
bsd-3-clause
forValid :: (Enum a,Show a,Testable b) => (Set a -> b) -> Property forValid f = forAll arbitrary $ \t -> -- classify (balanced t) "balanced" $ classify (size t == 0) "empty" $ classify (size t > 0 && size t <= 10) "small" $ classify (size t > 10 && size t <= 64) "medium" $ classify (size t > 64) "la...
349
forValid :: (Enum a,Show a,Testable b) => (Set a -> b) -> Property forValid f = forAll arbitrary $ \t -> -- classify (balanced t) "balanced" $ classify (size t == 0) "empty" $ classify (size t > 0 && size t <= 10) "small" $ classify (size t > 10 && size t <= 64) "medium" $ classify (size t > 64) "la...
349
forValid f = forAll arbitrary $ \t -> -- classify (balanced t) "balanced" $ classify (size t == 0) "empty" $ classify (size t > 0 && size t <= 10) "small" $ classify (size t > 10 && size t <= 64) "medium" $ classify (size t > 64) "large" $ balanced t ==> f t
282
false
true
0
17
93
170
82
88
null
null
cchalmers/optical
src/Optical/Coerce.hs
bsd-3-clause
refShow1 :: Coercible1 f => Proxy s -> f a -> f (ReflectedShow a s) refShow1 _ = coerce1
88
refShow1 :: Coercible1 f => Proxy s -> f a -> f (ReflectedShow a s) refShow1 _ = coerce1
88
refShow1 _ = coerce1
20
false
true
0
10
18
46
21
25
null
null
nomeata/ghc
compiler/codeGen/CgPrimOp.hs
bsd-3-clause
translateOp FloatGtOp = Just (MO_F_Gt W32)
46
translateOp FloatGtOp = Just (MO_F_Gt W32)
46
translateOp FloatGtOp = Just (MO_F_Gt W32)
46
false
false
1
6
9
21
8
13
null
null
hmemcpy/milewski-ctfp-pdf
src/content/3.8/code/haskell/snippet21.hs
gpl-3.0
lenAlg NilF = 0
15
lenAlg NilF = 0
15
lenAlg NilF = 0
15
false
false
0
5
3
9
4
5
null
null
AndrewWUw/cs9181
Data/Array/Accelerate/C/Base.hs
bsd-3-clause
uidiv _ty x y = [cexp| $exp:x / $exp:y |]
41
uidiv _ty x y = [cexp| $exp:x / $exp:y |]
41
uidiv _ty x y = [cexp| $exp:x / $exp:y |]
41
false
false
0
5
9
17
10
7
null
null
xenog/haskoin
src/Network/Haskoin/Network/Message.hs
unlicense
msgType (MMerkleBlock _) = "merkleblock"
40
msgType (MMerkleBlock _) = "merkleblock"
40
msgType (MMerkleBlock _) = "merkleblock"
40
false
false
0
6
4
16
7
9
null
null
dmeysman/tiny-compiler
src/Language/Tiny/Synthesis/X86.hs
mit
intermediateToX86 (IndexedAssign operand@(LocalEntry (VariableEntry _ _)) operand' operand'') = do (_, x86operand) <- operandToX86 operand (x86instruction', x86operand') <- operandToX86 operand' (x86instruction'', x86operand'') <- operandToX86 operand'' appendIndented x86instruction' appendIndente...
545
intermediateToX86 (IndexedAssign operand@(LocalEntry (VariableEntry _ _)) operand' operand'') = do (_, x86operand) <- operandToX86 operand (x86instruction', x86operand') <- operandToX86 operand' (x86instruction'', x86operand'') <- operandToX86 operand'' appendIndented x86instruction' appendIndente...
545
intermediateToX86 (IndexedAssign operand@(LocalEntry (VariableEntry _ _)) operand' operand'') = do (_, x86operand) <- operandToX86 operand (x86instruction', x86operand') <- operandToX86 operand' (x86instruction'', x86operand'') <- operandToX86 operand'' appendIndented x86instruction' appendIndente...
545
false
false
0
12
97
147
69
78
null
null
UCSD-PL/230-web
static/lec-stm-lecture.hs
mit
-- | Reading a SINGLE URL timeDownload url = do (page, time) <- timeit $ getURL url printf "downloaded: %s (%d bytes, %.2fs)\n" url (B.length page) time -- | Reading ALL the URLs in sequence
214
timeDownload url = do (page, time) <- timeit $ getURL url printf "downloaded: %s (%d bytes, %.2fs)\n" url (B.length page) time -- | Reading ALL the URLs in sequence
187
timeDownload url = do (page, time) <- timeit $ getURL url printf "downloaded: %s (%d bytes, %.2fs)\n" url (B.length page) time -- | Reading ALL the URLs in sequence
187
true
false
1
11
58
55
25
30
null
null
robx/puzzle-draw
src/Draw/PuzzleTypes.hs
mit
persistenceOfMemory :: Backend' b => Drawers b (AreaGrid, (Grid C (Maybe MEnd))) (Loop C) persistenceOfMemory = Drawers (ends_ <> areas') (ends_ . fst <> solstyle . edges . snd <> areas' . fst) where ends_ = placeGrid . fmap end . clues . snd areas' = (areas <> grid gDashed <> shadeGrid . fmap col...
417
persistenceOfMemory :: Backend' b => Drawers b (AreaGrid, (Grid C (Maybe MEnd))) (Loop C) persistenceOfMemory = Drawers (ends_ <> areas') (ends_ . fst <> solstyle . edges . snd <> areas' . fst) where ends_ = placeGrid . fmap end . clues . snd areas' = (areas <> grid gDashed <> shadeGrid . fmap col...
417
persistenceOfMemory = Drawers (ends_ <> areas') (ends_ . fst <> solstyle . edges . snd <> areas' . fst) where ends_ = placeGrid . fmap end . clues . snd areas' = (areas <> grid gDashed <> shadeGrid . fmap cols) . fst cols c | isUpper c = Just (blend 0.25 black white) | otherwise = No...
325
false
true
0
11
109
183
89
94
null
null
mapinguari/SC_HS_Proxy
src/Proxy/Query/Unit.hs
mit
mineralsCost TerranMissileTurret = 75
37
mineralsCost TerranMissileTurret = 75
37
mineralsCost TerranMissileTurret = 75
37
false
false
0
5
3
9
4
5
null
null
mietek/catools
src/cascrape/Scrape.hs
bsd-3-clause
tryScrapeTagAfter :: (HasTags s m) => Int -> String -> m (Maybe Tag) tryScrapeTagAfter n like = do tags <- useTags return (listToMaybe (drop n (dropWhile (~/= like) tags))) --------------------------------------------------------------------------------
262
tryScrapeTagAfter :: (HasTags s m) => Int -> String -> m (Maybe Tag) tryScrapeTagAfter n like = do tags <- useTags return (listToMaybe (drop n (dropWhile (~/= like) tags))) --------------------------------------------------------------------------------
262
tryScrapeTagAfter n like = do tags <- useTags return (listToMaybe (drop n (dropWhile (~/= like) tags))) --------------------------------------------------------------------------------
193
false
true
0
14
38
84
42
42
null
null
bgold-cosmos/Tidal
src/Sound/Tidal/UI.hs
gpl-3.0
-- | Boolean rand - a continuous stream of true/false values, with a 50/50 chance. brand :: Pattern Bool brand = _brandBy 0.5
126
brand :: Pattern Bool brand = _brandBy 0.5
42
brand = _brandBy 0.5
20
true
true
1
5
23
21
9
12
null
null
NMouad21/HaskellSamples
CommonWords.hs
mit
qSort' ((x,y):xs) = (qSort' . filter (\z -> snd z >= y) $ xs) ++ (x,y) : (qSort' . filter (\z -> snd z < y) $ xs)
113
qSort' ((x,y):xs) = (qSort' . filter (\z -> snd z >= y) $ xs) ++ (x,y) : (qSort' . filter (\z -> snd z < y) $ xs)
113
qSort' ((x,y):xs) = (qSort' . filter (\z -> snd z >= y) $ xs) ++ (x,y) : (qSort' . filter (\z -> snd z < y) $ xs)
113
false
false
0
14
27
94
50
44
null
null
ezyang/ghc
compiler/basicTypes/DataCon.hs
bsd-3-clause
isBanged :: HsImplBang -> Bool isBanged (HsUnpack {}) = True
60
isBanged :: HsImplBang -> Bool isBanged (HsUnpack {}) = True
60
isBanged (HsUnpack {}) = True
29
false
true
0
7
9
25
13
12
null
null
r-raymond/bwladder
src/Render.hs
bsd-3-clause
renderColumn :: [LiquipediaEntry] -> [RankEntry] -> RankEntry -> H.Html renderColumn l old_ranks (RankEntry r id wins losses points) = do H.tr $ do H.td H.! A.class_ "centered" $ (H.toHtml r) ranking points case findRankEntry id old_ranks of (Just (RankEntry oldr _ _ _ _)) -> ...
1,030
renderColumn :: [LiquipediaEntry] -> [RankEntry] -> RankEntry -> H.Html renderColumn l old_ranks (RankEntry r id wins losses points) = do H.tr $ do H.td H.! A.class_ "centered" $ (H.toHtml r) ranking points case findRankEntry id old_ranks of (Just (RankEntry oldr _ _ _ _)) -> ...
1,030
renderColumn l old_ranks (RankEntry r id wins losses points) = do H.tr $ do H.td H.! A.class_ "centered" $ (H.toHtml r) ranking points case findRankEntry id old_ranks of (Just (RankEntry oldr _ _ _ _)) -> displayChange (oldr - r) Nothing -> ...
958
false
true
0
20
386
426
204
222
null
null
google/codeworld
funblocks-client/src/Blocks/Types.hs
apache-2.0
colorPoly = Color 180
21
colorPoly = Color 180
21
colorPoly = Color 180
21
false
false
0
5
3
9
4
5
null
null
dbp/scotwit
Twitter.hs
bsd-3-clause
tokens :: OAuth tokens = twitterOAuth { oauthConsumerKey = Secret.consumer_tok , oauthConsumerSecret = Secret.consumer_tok_sec }
140
tokens :: OAuth tokens = twitterOAuth { oauthConsumerKey = Secret.consumer_tok , oauthConsumerSecret = Secret.consumer_tok_sec }
140
tokens = twitterOAuth { oauthConsumerKey = Secret.consumer_tok , oauthConsumerSecret = Secret.consumer_tok_sec }
124
false
true
0
8
26
39
19
20
null
null
rueshyna/gogol
gogol-logging/gen/Network/Google/Logging/Types/Product.hs
mpl-2.0
-- | If there might be more results than appear in this response, then -- nextPageToken is included. To get the next set of results, call this -- method again using the value of nextPageToken as pageToken. llmrNextPageToken :: Lens' ListLogMetricsResponse (Maybe Text) llmrNextPageToken = lens _llmrNextPageToken ...
357
llmrNextPageToken :: Lens' ListLogMetricsResponse (Maybe Text) llmrNextPageToken = lens _llmrNextPageToken (\ s a -> s{_llmrNextPageToken = a})
151
llmrNextPageToken = lens _llmrNextPageToken (\ s a -> s{_llmrNextPageToken = a})
88
true
true
0
9
61
50
27
23
null
null
gsdlab/clafer
src/Language/Clafer/Intermediate/TypeSystem.hs
mit
numeric (TUnion un') = any numeric un'
38
numeric (TUnion un') = any numeric un'
38
numeric (TUnion un') = any numeric un'
38
false
false
0
7
6
20
9
11
null
null
mohamedhayibor/haskelling-hard
realWorldHaskell/exo3.hs
mit
-- 6. Sort by length of sub List {- # took me a while to get this - on :: (b -> b -> c) -> (a -> b) -> a -> a -> c - compare :: Ord a -> a -> a -> Ordering - (compare `on` length) equivalent to (\ x y -> length x compare length y) -} sortByLength :: Foldable t => [t a] -> [t a] sortByLength xs = sortBy ( compa...
338
sortByLength :: Foldable t => [t a] -> [t a] sortByLength xs = sortBy ( compare `on` length) xs
95
sortByLength xs = sortBy ( compare `on` length) xs
50
true
true
0
10
89
58
29
29
null
null
wdanilo/haskell-logger
src/System/Log/Format.hs
apache-2.0
defaultFormatter = colorLvlFormatter ("[" <:> Lvl <:> "] ") <:> Msg
71
defaultFormatter = colorLvlFormatter ("[" <:> Lvl <:> "] ") <:> Msg
71
defaultFormatter = colorLvlFormatter ("[" <:> Lvl <:> "] ") <:> Msg
71
false
false
1
9
14
28
12
16
null
null
geophf/1HaskellADay
exercises/HAD/Data/BlockChain/Block/Blocks.hs
mit
readBlock :: FilePath -> Hash -> IO Block readBlock url hash = fmap (fromJust . decode) $ simpleHttp (url ++ hash)
114
readBlock :: FilePath -> Hash -> IO Block readBlock url hash = fmap (fromJust . decode) $ simpleHttp (url ++ hash)
114
readBlock url hash = fmap (fromJust . decode) $ simpleHttp (url ++ hash)
72
false
true
0
8
20
55
26
29
null
null
Numberartificial/workflow
haskell-first-principles/haskell-programming-from-first-principles-master/src/Chapter15.hs
mit
genTriple :: Gen (Int, [Int], String) genTriple = do n <- genInt ns <- genListInt s <- genString return (n, ns, s)
161
genTriple :: Gen (Int, [Int], String) genTriple = do n <- genInt ns <- genListInt s <- genString return (n, ns, s)
161
genTriple = do n <- genInt ns <- genListInt s <- genString return (n, ns, s)
123
false
true
0
9
68
68
33
35
null
null
Isweet/ppa
src/PPA/Lang/While/Util.hs
gpl-3.0
-- 2.1, p. 39 -- NOTE: Referenced, but not defined aExp :: Stmt -> Set.Set AExp aExp (SAssign _ a _) = aExpA a
110
aExp :: Stmt -> Set.Set AExp aExp (SAssign _ a _) = aExpA a
59
aExp (SAssign _ a _) = aExpA a
30
true
true
0
9
23
42
20
22
null
null