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
gibiansky/IHaskell
ghc-parser/src-8.10/Language/Haskell/GHC/HappyParser.hs
mit
fullExpression :: P (LHsExpr GhcPs) fullExpression = runECP_P =<< parseExpression
81
fullExpression :: P (LHsExpr GhcPs) fullExpression = runECP_P =<< parseExpression
81
fullExpression = runECP_P =<< parseExpression
45
false
true
2
6
9
30
12
18
null
null
FranklinChen/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
showDeclImp o (PClauses _ _ n cs) = text "pat" <+> text (showCG n) <+> text "\t" <+> indent 2 (vsep (map (showCImp o) cs))
162
showDeclImp o (PClauses _ _ n cs) = text "pat" <+> text (showCG n) <+> text "\t" <+> indent 2 (vsep (map (showCImp o) cs))
162
showDeclImp o (PClauses _ _ n cs) = text "pat" <+> text (showCG n) <+> text "\t" <+> indent 2 (vsep (map (showCImp o) cs))
162
false
false
0
12
64
75
35
40
null
null
chrisdone/fore
src/Main.hs
bsd-3-clause
isFunction _ = False
29
isFunction _ = False
29
isFunction _ = False
29
false
false
0
5
12
9
4
5
null
null
ditto/ditto
src/Ditto/Match.hs
gpl-3.0
match1 (PInacc _) _ = return $ MSolve []
40
match1 (PInacc _) _ = return $ MSolve []
40
match1 (PInacc _) _ = return $ MSolve []
40
false
false
0
7
8
26
12
14
null
null
eliben/code-for-blog
2017/haskell-parsers/exprparser.hs
unlicense
char :: Char -> Parser Char char x = sat (== x)
47
char :: Char -> Parser Char char x = sat (== x)
47
char x = sat (== x)
19
false
true
0
6
11
28
14
14
null
null
Helkafen/cabal
cabal-install/Distribution/Client/InstallPlan.hs
bsd-3-clause
showPlanProblem (PackageStateInvalid pkg pkg') = "Package " ++ display (packageId pkg) ++ " is in the " ++ showPlanState pkg ++ " state but it depends on package " ++ display (packageId pkg') ++ " which is in the " ++ showPlanState pkg' ++ " state" where showPlanState (PreExisting _) = "pre-existing"...
721
showPlanProblem (PackageStateInvalid pkg pkg') = "Package " ++ display (packageId pkg) ++ " is in the " ++ showPlanState pkg ++ " state but it depends on package " ++ display (packageId pkg') ++ " which is in the " ++ showPlanState pkg' ++ " state" where showPlanState (PreExisting _) = "pre-existing"...
721
showPlanProblem (PackageStateInvalid pkg pkg') = "Package " ++ display (packageId pkg) ++ " is in the " ++ showPlanState pkg ++ " state but it depends on package " ++ display (packageId pkg') ++ " which is in the " ++ showPlanState pkg' ++ " state" where showPlanState (PreExisting _) = "pre-existing"...
721
false
false
8
8
148
159
76
83
null
null
rpglover64/lens
src/Control/Lens/Setter.hs
bsd-3-clause
-- | Divide the target(s) of a numerically valued 'Lens', 'Iso', 'Setter' or 'Traversal'. -- -- >>> (a,b) & _1 //~ c -- (a / c,b) -- -- >>> (a,b) & both //~ c -- (a / c,b / c) -- -- >>> ("Hawaii",10) & _2 //~ 2 -- ("Hawaii",5.0) -- -- @ -- ('//~') :: 'Fractional' a => 'Setter'' s a -> a -> s -> s -- ('//~') :: 'Frac...
576
(//~) :: Fractional a => ASetter s t a a -> a -> s -> t l //~ n = over l (/ n)
78
l //~ n = over l (/ n)
22
true
true
0
11
152
79
46
33
null
null
rueshyna/gogol
gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs
mpl-2.0
-- | The base URL for accessing Google Cloud APIs. When workers access Google -- Cloud APIs, they logically do so via relative URLs. If this field is -- specified, it supplies the base URL to use for resolving these relative -- URLs. The normative algorithm used is defined by RFC 1808, \"Relative -- Uniform Resource Lo...
511
wsBaseURL :: Lens' WorkerSettings (Maybe Text) wsBaseURL = lens _wsBaseURL (\ s a -> s{_wsBaseURL = a})
105
wsBaseURL = lens _wsBaseURL (\ s a -> s{_wsBaseURL = a})
58
true
true
2
9
84
60
30
30
null
null
Teaspot-Studio/bmstu-commi-genetics-haste
Commi/Util.hs
bsd-3-clause
jsJquery :: JSString -> IO JQuery jsJquery v = JQuery <$> ffi "(function(e) {return $(e);})" v
94
jsJquery :: JSString -> IO JQuery jsJquery v = JQuery <$> ffi "(function(e) {return $(e);})" v
94
jsJquery v = JQuery <$> ffi "(function(e) {return $(e);})" v
60
false
true
0
6
15
30
14
16
null
null
brownplt/strobe-old
src/BrownPLT/TypedJS/FreeVars.hs
bsd-2-clause
freeVars :: [String] -- ^browser/testing environment -> [Statement SourcePos] -> [(String, SourcePos)] freeVars globals program = M.toList free where (_, free) = makeEnvTree (M.fromList (zip globals (repeat noPos))) (unions (map stmt program))
295
freeVars :: [String] -- ^browser/testing environment -> [Statement SourcePos] -> [(String, SourcePos)] freeVars globals program = M.toList free where (_, free) = makeEnvTree (M.fromList (zip globals (repeat noPos))) (unions (map stmt program))
295
freeVars globals program = M.toList free where (_, free) = makeEnvTree (M.fromList (zip globals (repeat noPos))) (unions (map stmt program))
174
false
true
0
10
83
111
55
56
null
null
valderman/lambnyaa
Network/LambNyaa/Log/Core.hs
bsd-3-clause
-- | Format a log item as (time) [level] [source] [tag1, .. tagN] message formatLogItem :: LogItem -> String formatLogItem li = concat $ [formatTime defaultTimeLocale "(%c) " $ liTimestamp li, concat ["[", show $ liLevel li, "] "], if null $ liSource li then "" else...
500
formatLogItem :: LogItem -> String formatLogItem li = concat $ [formatTime defaultTimeLocale "(%c) " $ liTimestamp li, concat ["[", show $ liLevel li, "] "], if null $ liSource li then "" else concat ["[", liSource li, "] "], if null $ liTags li ...
426
formatLogItem li = concat $ [formatTime defaultTimeLocale "(%c) " $ liTimestamp li, concat ["[", show $ liLevel li, "] "], if null $ liSource li then "" else concat ["[", liSource li, "] "], if null $ liTags li then "" else co...
391
true
true
2
11
176
146
74
72
null
null
ktvoelker/helium
src/He/Lexer/Tokens.hs
gpl-3.0
stringContent :: (IdClass a) => TokenParser a stringContent spec = keepMode $ (StringContent,) . TextData . T.pack <$> many1 (charContent specials) where ss = sStrings spec specials = catMaybes [sStringDelim ss, fmap fst (sInterpMany ss)]
256
stringContent :: (IdClass a) => TokenParser a stringContent spec = keepMode $ (StringContent,) . TextData . T.pack <$> many1 (charContent specials) where ss = sStrings spec specials = catMaybes [sStringDelim ss, fmap fst (sInterpMany ss)]
256
stringContent spec = keepMode $ (StringContent,) . TextData . T.pack <$> many1 (charContent specials) where ss = sStrings spec specials = catMaybes [sStringDelim ss, fmap fst (sInterpMany ss)]
210
false
true
5
9
52
99
48
51
null
null
samplecount/shake-language-c
src/Development/Shake/Language/C/ToolChain.hs
apache-2.0
toEnv :: ToolChain -> Action [(String,String)] toEnv tc = do flags <- (\f -> f mempty) <$> get defaultBuildFlags tc let cflags = concatMapFlag "-I" (map escapeSpaces (get systemIncludes flags)) ++ concatMapFlag "-I" (map escapeSpaces (get userIncludes flags)) ++ defineFlags flags ...
1,567
toEnv :: ToolChain -> Action [(String,String)] toEnv tc = do flags <- (\f -> f mempty) <$> get defaultBuildFlags tc let cflags = concatMapFlag "-I" (map escapeSpaces (get systemIncludes flags)) ++ concatMapFlag "-I" (map escapeSpaces (get userIncludes flags)) ++ defineFlags flags ...
1,567
toEnv tc = do flags <- (\f -> f mempty) <$> get defaultBuildFlags tc let cflags = concatMapFlag "-I" (map escapeSpaces (get systemIncludes flags)) ++ concatMapFlag "-I" (map escapeSpaces (get userIncludes flags)) ++ defineFlags flags ++ get preprocessorFlags flags ...
1,520
false
true
0
18
488
496
257
239
null
null
23Skidoo/erp
ERP.hs
gpl-3.0
snd_ :: AST -> AST snd_ e1 = builtinApp "snd" [e1]
50
snd_ :: AST -> AST snd_ e1 = builtinApp "snd" [e1]
50
snd_ e1 = builtinApp "snd" [e1]
31
false
true
0
7
10
32
14
18
null
null
bwire/checkers
src/Board.hs
bsd-3-clause
displayBoard :: Board -> IO () displayBoard board = putStrLn . boardToString $ board where boardToString :: Board -> String boardToString board = unlines $ (withRowNumbers rows) ++ (lowerRow board : []) lowerRow :: Board -> String lowerRow board = " " ++ (map fst (zip ['A' ..] [1...
1,138
displayBoard :: Board -> IO () displayBoard board = putStrLn . boardToString $ board where boardToString :: Board -> String boardToString board = unlines $ (withRowNumbers rows) ++ (lowerRow board : []) lowerRow :: Board -> String lowerRow board = " " ++ (map fst (zip ['A' ..] [1....
1,137
displayBoard board = putStrLn . boardToString $ board where boardToString :: Board -> String boardToString board = unlines $ (withRowNumbers rows) ++ (lowerRow board : []) lowerRow :: Board -> String lowerRow board = " " ++ (map fst (zip ['A' ..] [1..width board])) with...
1,106
false
true
0
11
335
457
246
211
null
null
vikraman/ghc
compiler/cmm/CmmNode.hs
bsd-3-clause
mapExpM f (CmmUnwind r e) = CmmUnwind r `fmap` f e
60
mapExpM f (CmmUnwind r e) = CmmUnwind r `fmap` f e
60
mapExpM f (CmmUnwind r e) = CmmUnwind r `fmap` f e
60
false
false
0
6
20
33
15
18
null
null
chadbrewbaker/shellcheck
ShellCheck/Parser.hs
gpl-3.0
lt x = trace (show x) x
23
lt x = trace (show x) x
23
lt x = trace (show x) x
23
false
false
1
6
6
25
9
16
null
null
siddhanathan/yi
yi-core/src/Yi/Keymap/Keys.hs
gpl-2.0
printableChar :: (MonadInteract m w Event) => m Char printableChar = do Event (KASCII c) [] <- anyEvent unless (isPrint c) $ fail "unprintable character" return c -- | Parse any character that can be inserted in the text.
235
printableChar :: (MonadInteract m w Event) => m Char printableChar = do Event (KASCII c) [] <- anyEvent unless (isPrint c) $ fail "unprintable character" return c -- | Parse any character that can be inserted in the text.
235
printableChar = do Event (KASCII c) [] <- anyEvent unless (isPrint c) $ fail "unprintable character" return c -- | Parse any character that can be inserted in the text.
182
false
true
0
10
52
73
34
39
null
null
erochest/problayers
ProbLayers.hs
bsd-3-clause
getTextValue :: [PersistValue] -> Maybe T.Text getTextValue [PersistText t] = Just t
84
getTextValue :: [PersistValue] -> Maybe T.Text getTextValue [PersistText t] = Just t
84
getTextValue [PersistText t] = Just t
37
false
true
0
7
11
35
17
18
null
null
chadbrewbaker/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
isVariableChar x = isVariableStartChar x || isDigit x
53
isVariableChar x = isVariableStartChar x || isDigit x
53
isVariableChar x = isVariableStartChar x || isDigit x
53
false
false
0
6
7
19
8
11
null
null
gsnewmark/cis194
src/Cis194/Week7/Lecture.hs
apache-2.0
flatten (Node l x r) = flatten l ++ [x] ++ flatten r
52
flatten (Node l x r) = flatten l ++ [x] ++ flatten r
52
flatten (Node l x r) = flatten l ++ [x] ++ flatten r
52
false
false
0
7
12
36
17
19
null
null
input-output-hk/pos-haskell-prototype
explorer/src/purescript/PSOptions.hs
mit
getPSOptions :: IO Args getPSOptions = do (res, ()) <- simpleOptions ("cardano-explorer-hs2purs-" <> showVersion version) "CardanoSL explorer ps datatypes generator" "CardanoSL explorer ps datatypes generator." argsParser empty return res
314
getPSOptions :: IO Args getPSOptions = do (res, ()) <- simpleOptions ("cardano-explorer-hs2purs-" <> showVersion version) "CardanoSL explorer ps datatypes generator" "CardanoSL explorer ps datatypes generator." argsParser empty return res
314
getPSOptions = do (res, ()) <- simpleOptions ("cardano-explorer-hs2purs-" <> showVersion version) "CardanoSL explorer ps datatypes generator" "CardanoSL explorer ps datatypes generator." argsParser empty return res
290
false
true
0
11
104
56
27
29
null
null
mapinguari/SC_HS_Proxy
src/Proxy/Query/Unit.hs
mit
groundDamage TerranNuclearMissile = 0
37
groundDamage TerranNuclearMissile = 0
37
groundDamage TerranNuclearMissile = 0
37
false
false
0
5
3
9
4
5
null
null
tolysz/prepare-ghcjs
spec-lts8/base/Foreign/C/Error.hs
bsd-3-clause
eNETRESET = Errno (CONST_ENETRESET)
41
eNETRESET = Errno (CONST_ENETRESET)
41
eNETRESET = Errno (CONST_ENETRESET)
41
false
false
0
6
9
12
6
6
null
null
ziman/idris-py
src/IRTS/CodegenPython.hs
bsd-3-clause
cgConst (Fl f) = text $ show f
30
cgConst (Fl f) = text $ show f
30
cgConst (Fl f) = text $ show f
30
false
false
2
6
7
25
10
15
null
null
ihc/futhark
src/Futhark/CodeGen/Backends/GenericPython.hs
isc
entryPointOutput (Imp.TransparentValue (Imp.ArrayValue mem _ (Imp.Space sid) bt ept dims)) = do pack_output <- asks envEntryOutput pack_output mem sid bt ept dims
166
entryPointOutput (Imp.TransparentValue (Imp.ArrayValue mem _ (Imp.Space sid) bt ept dims)) = do pack_output <- asks envEntryOutput pack_output mem sid bt ept dims
166
entryPointOutput (Imp.TransparentValue (Imp.ArrayValue mem _ (Imp.Space sid) bt ept dims)) = do pack_output <- asks envEntryOutput pack_output mem sid bt ept dims
166
false
false
0
12
25
67
31
36
null
null
lordxist/uroboro
src/Uroboro/Checker.hs
mit
checkPQ :: Program -> PQ -> PTSig -> Either Error TQ checkPQ p (PQApp loc name args) (name', (loc', argTypes, returnType)) | name == name' = do targs <- zipStrict loc loc' (checkPP p) args argTypes return $ TQApp returnType name targs | otherwise = failAt loc $ "Definition Mismatch: ...
367
checkPQ :: Program -> PQ -> PTSig -> Either Error TQ checkPQ p (PQApp loc name args) (name', (loc', argTypes, returnType)) | name == name' = do targs <- zipStrict loc loc' (checkPP p) args argTypes return $ TQApp returnType name targs | otherwise = failAt loc $ "Definition Mismatch: ...
367
checkPQ p (PQApp loc name args) (name', (loc', argTypes, returnType)) | name == name' = do targs <- zipStrict loc loc' (checkPP p) args argTypes return $ TQApp returnType name targs | otherwise = failAt loc $ "Definition Mismatch: " ++ name ++ " used in copattern for " ++ name'
314
false
true
1
12
97
136
66
70
null
null
uduki/hsQt
Qtc/Core/QFileInfo.hs
bsd-2-clause
completeBaseName :: QFileInfo a -> (()) -> IO (String) completeBaseName x0 () = withStringResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QFileInfo_completeBaseName cobj_x0
178
completeBaseName :: QFileInfo a -> (()) -> IO (String) completeBaseName x0 () = withStringResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QFileInfo_completeBaseName cobj_x0
178
completeBaseName x0 () = withStringResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QFileInfo_completeBaseName cobj_x0
123
false
true
0
8
31
59
29
30
null
null
brendanhay/gogol
gogol-remotebuildexecution/gen/Network/Google/Resource/RemoteBuildExecution/Blobs/FindMissing.hs
mpl-2.0
-- | The instance of the execution system to operate against. A server may -- support multiple instances of the execution system (with their own -- workers, storage, caches, etc.). The server MAY require use of this -- field to select between them in an implementation-defined fashion, -- otherwise it can be omitted. bf...
447
bfmInstanceName :: Lens' BlobsFindMissing Text bfmInstanceName = lens _bfmInstanceName (\ s a -> s{_bfmInstanceName = a})
129
bfmInstanceName = lens _bfmInstanceName (\ s a -> s{_bfmInstanceName = a})
82
true
true
0
9
76
51
27
24
null
null
zaxtax/hakaru
haskell/Language/Hakaru/CodeGen/Types.hs
bsd-3-clause
mdataStruct' :: Sing (a :: Hakaru) -> CTypeSpec mdataStruct' t = mdStruct where weight = buildDeclaration CDouble (Ident "weight") sample = typeDeclaration t (Ident "sample") mdStruct = buildStruct (Just . Ident . typeName . SMeasure $ t) [weight,sample]
272
mdataStruct' :: Sing (a :: Hakaru) -> CTypeSpec mdataStruct' t = mdStruct where weight = buildDeclaration CDouble (Ident "weight") sample = typeDeclaration t (Ident "sample") mdStruct = buildStruct (Just . Ident . typeName . SMeasure $ t) [weight,sample]
272
mdataStruct' t = mdStruct where weight = buildDeclaration CDouble (Ident "weight") sample = typeDeclaration t (Ident "sample") mdStruct = buildStruct (Just . Ident . typeName . SMeasure $ t) [weight,sample]
224
false
true
2
10
55
97
50
47
null
null
flipstone/orville
orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/SqlValue.hs
mit
{- | Attempts to decode a 'SqlValue' as a Haskell 'Word' value. If decoding fails 'Nothing' is returned. -} toWord :: SqlValue -> Either String Word toWord = toParsedValue (AttoB8.signed AttoB8.decimal)
208
toWord :: SqlValue -> Either String Word toWord = toParsedValue (AttoB8.signed AttoB8.decimal)
96
toWord = toParsedValue (AttoB8.signed AttoB8.decimal)
55
true
true
0
8
36
40
18
22
null
null
roberth/uu-helium
src/Helium/Parser/Parser.hs
gpl-3.0
constrs :: HParser Constructors constrs = constr `sepBy1` lexBAR
64
constrs :: HParser Constructors constrs = constr `sepBy1` lexBAR
64
constrs = constr `sepBy1` lexBAR
32
false
true
0
5
8
20
11
9
null
null
xavierpinho/CAM
src/Compiler.hs
unlicense
compile env (F.Not) = return [CAM.Curry [CAM.Snd, CAM.Not]]
64
compile env (F.Not) = return [CAM.Curry [CAM.Snd, CAM.Not]]
64
compile env (F.Not) = return [CAM.Curry [CAM.Snd, CAM.Not]]
64
false
false
0
9
12
37
19
18
null
null
sdiehl/ghc
libraries/base/tests/IO/T17510.hs
bsd-3-clause
:: IO () main = do writeFile "test" "hello\nworld\ntesting\n" h <- openFile "test" ReadMode h2 <- hDuplicate h hGetLine h >>= putStrLn -- should print "hello" hGetLine h2 >>= putStrLn -- should print "world" hGetLine h >>= putStrLn -- should print "testing"
284
:: IO () main = do writeFile "test" "hello\nworld\ntesting\n" h <- openFile "test" ReadMode h2 <- hDuplicate h hGetLine h >>= putStrLn -- should print "hello" hGetLine h2 >>= putStrLn -- should print "world" hGetLine h >>= putStrLn -- should print "testing"
284
:: IO () main = do writeFile "test" "hello\nworld\ntesting\n" h <- openFile "test" ReadMode h2 <- hDuplicate h hGetLine h >>= putStrLn -- should print "hello" hGetLine h2 >>= putStrLn -- should print "world" hGetLine h >>= putStrLn -- should print "testing"
284
false
false
0
8
68
82
35
47
null
null
phylake/AMF
Data/Amf/Serialize.hs
bsd-3-clause
amfInt :: Amf -> Serializer amfInt (AmfInt a) = return $ f a where f = BL.pack . Prelude.map fromIntegral . toU29 . fromIntegral
134
amfInt :: Amf -> Serializer amfInt (AmfInt a) = return $ f a where f = BL.pack . Prelude.map fromIntegral . toU29 . fromIntegral
134
amfInt (AmfInt a) = return $ f a where f = BL.pack . Prelude.map fromIntegral . toU29 . fromIntegral
106
false
true
0
9
29
58
28
30
null
null
byorgey/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v (LLe ty) [x, y] = bitOp v "Lte" ty [x, y]
48
doOp v (LLe ty) [x, y] = bitOp v "Lte" ty [x, y]
48
doOp v (LLe ty) [x, y] = bitOp v "Lte" ty [x, y]
48
false
false
0
7
12
40
21
19
null
null
folivetti/BIGDATA
09 - Redução de Dimensionalidade/PCAPar.hs
mit
-- |'main' executa programa principal main :: IO () main = do args <- getArgs fileTrain <- readFile (args !! 0) let k = read (args !! 2) :: Int train = parseFile fileTrain chunks = chunksOf nchunks train train' = (multMtx train $ pca k chunks) writeFile (args !! 1) (toString trai...
323
main :: IO () main = do args <- getArgs fileTrain <- readFile (args !! 0) let k = read (args !! 2) :: Int train = parseFile fileTrain chunks = chunksOf nchunks train train' = (multMtx train $ pca k chunks) writeFile (args !! 1) (toString train')
285
main = do args <- getArgs fileTrain <- readFile (args !! 0) let k = read (args !! 2) :: Int train = parseFile fileTrain chunks = chunksOf nchunks train train' = (multMtx train $ pca k chunks) writeFile (args !! 1) (toString train')
271
true
true
0
12
92
122
60
62
null
null
VictorDenisov/keystone
src/Glance/Web/Image.hs
gpl-2.0
listImagesH :: (Functor m, MonadIO m) => GlanceConfig -> ActionM m () listImagesH config = do imageName <- parseMaybeString "name" images <- liftIO $ CD.withDB (database config) $ MI.listImages imageName S.status status200 S.json $ object [ "images" .= (map (fromObject . toJSON) images) , "sch...
417
listImagesH :: (Functor m, MonadIO m) => GlanceConfig -> ActionM m () listImagesH config = do imageName <- parseMaybeString "name" images <- liftIO $ CD.withDB (database config) $ MI.listImages imageName S.status status200 S.json $ object [ "images" .= (map (fromObject . toJSON) images) , "sch...
417
listImagesH config = do imageName <- parseMaybeString "name" images <- liftIO $ CD.withDB (database config) $ MI.listImages imageName S.status status200 S.json $ object [ "images" .= (map (fromObject . toJSON) images) , "schema" .= ("/v2/schemas/images" :: String) , "first" ....
347
false
true
0
14
98
149
74
75
null
null
coghex/abridgefaraway
src/ABFA/Time.hs
bsd-3-clause
showSec :: Integer -> String showSec t | t < 10 = "0" ++ (show t) | otherwise = (show t)
95
showSec :: Integer -> String showSec t | t < 10 = "0" ++ (show t) | otherwise = (show t)
95
showSec t | t < 10 = "0" ++ (show t) | otherwise = (show t)
66
false
true
1
8
27
52
25
27
null
null
genos/online_problems
advent_of_code_2016/day12/hask/src/Main.hs
mit
load (Right r) rs = rs U.! fromEnum r
37
load (Right r) rs = rs U.! fromEnum r
37
load (Right r) rs = rs U.! fromEnum r
37
false
false
0
7
8
26
12
14
null
null
mcmaniac/ghc
ghc/Main.hs
bsd-3-clause
showGhciUsageMode = mkPreLoadMode ShowGhciUsage
47
showGhciUsageMode = mkPreLoadMode ShowGhciUsage
47
showGhciUsageMode = mkPreLoadMode ShowGhciUsage
47
false
false
1
5
3
12
4
8
null
null
plaimi/tempuhs-server
src/Tempuhs/Server/Requests/Attributes/Mono.hs
agpl-3.0
updateTimespanAttributes :: Key Timespan -> [(Text, Maybe Text)] -> ReaderT SqlBackend (ResourceT ActionE) () -- | 'updateTimespanAttributes' is a wrapper around 'updateAttributes' for -- 'TimespanAttribute's. updateTimespanAttributes i = updateAttributes i UniqueTimespanAttribute ...
589
updateTimespanAttributes :: Key Timespan -> [(Text, Maybe Text)] -> ReaderT SqlBackend (ResourceT ActionE) () updateTimespanAttributes i = updateAttributes i UniqueTimespanAttribute TimespanAttributeValue ...
489
updateTimespanAttributes i = updateAttributes i UniqueTimespanAttribute TimespanAttributeValue TimespanAttribute TimespanAttributeRubbish ...
354
true
true
0
9
251
67
34
33
null
null
sebfisch/incremental-sat-solver
Data/Boolean.hs
bsd-3-clause
-- | This predicate checks whether the given literal is positive. -- isPositiveLiteral :: Literal -> Bool isPositiveLiteral (Pos _) = True
139
isPositiveLiteral :: Literal -> Bool isPositiveLiteral (Pos _) = True
69
isPositiveLiteral (Pos _) = True
32
true
true
0
7
22
26
14
12
null
null
nyson/haste-compiler
src/Haste/CodeGen.hs
bsd-3-clause
genInlinedBuiltin _ _ = return Nothing
40
genInlinedBuiltin _ _ = return Nothing
40
genInlinedBuiltin _ _ = return Nothing
40
false
false
1
5
7
15
6
9
null
null
nh2/haskell-socket
tests/AddrInfo.hs
mit
t0001 :: IO () t0001 = do ais <- getAddressInfo (Just "127.0.0.1") (Just "http") aiNumericHost `onException` p 0 :: IO [AddressInfo Inet Stream TCP] when (length ais /= 1) (e 1) let [ai] = ais when (canonicalName ai /= Nothing) (e 2) let sa = socketAddress ai when (p...
467
t0001 :: IO () t0001 = do ais <- getAddressInfo (Just "127.0.0.1") (Just "http") aiNumericHost `onException` p 0 :: IO [AddressInfo Inet Stream TCP] when (length ais /= 1) (e 1) let [ai] = ais when (canonicalName ai /= Nothing) (e 2) let sa = socketAddress ai when (p...
467
t0001 = do ais <- getAddressInfo (Just "127.0.0.1") (Just "http") aiNumericHost `onException` p 0 :: IO [AddressInfo Inet Stream TCP] when (length ais /= 1) (e 1) let [ai] = ais when (canonicalName ai /= Nothing) (e 2) let sa = socketAddress ai when (port sa /= 80...
452
false
true
3
11
145
244
110
134
null
null
markuspf/Idris-dev
src/Idris/Core/Evaluate.hs
bsd-3-clause
ctxtAlist :: Context -> [(Name, Def)] ctxtAlist ctxt = map (\(n, (d, r, i, a, t, m)) -> (n, d)) $ toAlist (definitions ctxt)
124
ctxtAlist :: Context -> [(Name, Def)] ctxtAlist ctxt = map (\(n, (d, r, i, a, t, m)) -> (n, d)) $ toAlist (definitions ctxt)
124
ctxtAlist ctxt = map (\(n, (d, r, i, a, t, m)) -> (n, d)) $ toAlist (definitions ctxt)
86
false
true
0
10
23
81
47
34
null
null
thedward/haskell-ogdl
Text/OGDL/Parsec.hs
bsd-3-clause
indentTab = char '\x09' >> return Tab <?> "tab"
47
indentTab = char '\x09' >> return Tab <?> "tab"
47
indentTab = char '\x09' >> return Tab <?> "tab"
47
false
false
0
7
8
20
9
11
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
happyReduction_285 (_ `HappyStk` _ `HappyStk` (HappyAbsSyn87 happy_var_3) `HappyStk` _ `HappyStk` _ `HappyStk` happyRest) = HappyAbsSyn30 (TyEnum Nothing (reverse happy_var_3) ) `HappyStk` happyRest
273
happyReduction_285 (_ `HappyStk` _ `HappyStk` (HappyAbsSyn87 happy_var_3) `HappyStk` _ `HappyStk` _ `HappyStk` happyRest) = HappyAbsSyn30 (TyEnum Nothing (reverse happy_var_3) ) `HappyStk` happyRest
273
happyReduction_285 (_ `HappyStk` _ `HappyStk` (HappyAbsSyn87 happy_var_3) `HappyStk` _ `HappyStk` _ `HappyStk` happyRest) = HappyAbsSyn30 (TyEnum Nothing (reverse happy_var_3) ) `HappyStk` happyRest
273
false
false
0
11
96
71
41
30
null
null
rueshyna/gogol
gogol-replicapool/gen/Network/Google/Resource/ReplicaPool/InstanceGroupManagers/DeleteInstances.hs
mpl-2.0
-- | The name of the instance group manager. igmdiInstanceGroupManager :: Lens' InstanceGroupManagersDeleteInstances Text igmdiInstanceGroupManager = lens _igmdiInstanceGroupManager (\ s a -> s{_igmdiInstanceGroupManager = a})
234
igmdiInstanceGroupManager :: Lens' InstanceGroupManagersDeleteInstances Text igmdiInstanceGroupManager = lens _igmdiInstanceGroupManager (\ s a -> s{_igmdiInstanceGroupManager = a})
189
igmdiInstanceGroupManager = lens _igmdiInstanceGroupManager (\ s a -> s{_igmdiInstanceGroupManager = a})
112
true
true
0
8
32
43
22
21
null
null
chemouna/99Haskell
src/Problem10.hs
bsd-3-clause
encode6 = (enc . pack) where enc = (foldr (\x acc -> (length x, head x) : acc) [])
86
encode6 = (enc . pack) where enc = (foldr (\x acc -> (length x, head x) : acc) [])
86
encode6 = (enc . pack) where enc = (foldr (\x acc -> (length x, head x) : acc) [])
86
false
false
0
13
22
56
30
26
null
null
sdiehl/ghc
testsuite/tests/pmcheck/complete_sigs/T14059b.hs
bsd-3-clause
wobble :: Sing (z :: Bool) -> Bool wobble STooGoodToBeTrue = True
65
wobble :: Sing (z :: Bool) -> Bool wobble STooGoodToBeTrue = True
65
wobble STooGoodToBeTrue = True
30
false
true
0
8
11
27
14
13
null
null
dorchard/gram_lang
interpreter/src/Language/Granule/Interpreter/Eval.hs
bsd-3-clause
evalIn ctxt (Val s _ (Promote _ e)) = do -- (cf. Box) v <- evalIn ctxt e return $ Promote () (Val s () v)
111
evalIn ctxt (Val s _ (Promote _ e)) = do -- (cf. Box) v <- evalIn ctxt e return $ Promote () (Val s () v)
111
evalIn ctxt (Val s _ (Promote _ e)) = do -- (cf. Box) v <- evalIn ctxt e return $ Promote () (Val s () v)
111
false
false
0
11
31
68
32
36
null
null
mainland/dph
dph-prim-par/Data/Array/Parallel/Unlifted.hs
bsd-3-clause
-- Scans and Folds ------------------------------------------------------------ scan f x arr = tracePrim (TraceScan (Seq.length arr)) $! scanUP f x arr
168
scan f x arr = tracePrim (TraceScan (Seq.length arr)) $! scanUP f x arr
88
scan f x arr = tracePrim (TraceScan (Seq.length arr)) $! scanUP f x arr
88
true
false
0
11
35
42
20
22
null
null
kmate/raw-feldspar-mcs
src/Feldspar/Multicore/Compile/Parallella/Channel.hs
bsd-3-clause
compHostCoreChanCMD :: CoreChanCMD (Param3 RunGen Data PrimType') a -> RunGen a compHostCoreChanCMD (ReadChan (CoreChanComp (HostChanRep hostChan _)) off sz arr) = lift $ do addInclude "<feldspar-parallella.h>" callFun "host_read_c2h" [ hostChan, arrArg arr, valArg off, valArg sz ]
290
compHostCoreChanCMD :: CoreChanCMD (Param3 RunGen Data PrimType') a -> RunGen a compHostCoreChanCMD (ReadChan (CoreChanComp (HostChanRep hostChan _)) off sz arr) = lift $ do addInclude "<feldspar-parallella.h>" callFun "host_read_c2h" [ hostChan, arrArg arr, valArg off, valArg sz ]
290
compHostCoreChanCMD (ReadChan (CoreChanComp (HostChanRep hostChan _)) off sz arr) = lift $ do addInclude "<feldspar-parallella.h>" callFun "host_read_c2h" [ hostChan, arrArg arr, valArg off, valArg sz ]
210
false
true
0
11
44
101
48
53
null
null
rlupton20/vanguard-dataplane
app/Main.hs
gpl-3.0
-- End temporary section main :: IO () main = do -- Our command line argument is a configuration -- file for the network we want to connect to. [configFile] <- getArgs config <- loadConfigFromFile configFile case config of Left err -> error $ show err Right cfg -> do let dev = device $ net cfg...
515
main :: IO () main = do -- Our command line argument is a configuration -- file for the network we want to connect to. [configFile] <- getArgs config <- loadConfigFromFile configFile case config of Left err -> error $ show err Right cfg -> do let dev = device $ net cfg withTUN dev $ \tun ...
489
main = do -- Our command line argument is a configuration -- file for the network we want to connect to. [configFile] <- getArgs config <- loadConfigFromFile configFile case config of Left err -> error $ show err Right cfg -> do let dev = device $ net cfg withTUN dev $ \tun -> runStack (c...
475
true
true
0
16
125
116
56
60
null
null
KuroAku/lambda
src/Lambda/Eval.hs
gpl-3.0
evalLambdaTerm' :: Int -> LambdaTerm -> [Action] evalLambdaTerm' step m = let result = (tupleToAction . reduceLambdaTerm $ m) in Action step m (reductionFromAction result): -- Break if the result is equal after the reduction and is not an Alpha reduction if m == lambdaTermFromAction result && reduct...
458
evalLambdaTerm' :: Int -> LambdaTerm -> [Action] evalLambdaTerm' step m = let result = (tupleToAction . reduceLambdaTerm $ m) in Action step m (reductionFromAction result): -- Break if the result is equal after the reduction and is not an Alpha reduction if m == lambdaTermFromAction result && reduct...
458
evalLambdaTerm' step m = let result = (tupleToAction . reduceLambdaTerm $ m) in Action step m (reductionFromAction result): -- Break if the result is equal after the reduction and is not an Alpha reduction if m == lambdaTermFromAction result && reductionFromAction result /= Alpha then [Actio...
409
false
true
0
11
101
131
64
67
null
null
zeniuseducation/poly-euler
Alfa/haskell/impure/common.hs
epl-1.0
oddPrime' :: Int -> Bool oddPrime' n = loopi 3 where loopi i | (i*i) > n = True | 0 == rem n i = False | otherwise = loopi $ i + 2
162
oddPrime' :: Int -> Bool oddPrime' n = loopi 3 where loopi i | (i*i) > n = True | 0 == rem n i = False | otherwise = loopi $ i + 2
162
oddPrime' n = loopi 3 where loopi i | (i*i) > n = True | 0 == rem n i = False | otherwise = loopi $ i + 2
137
false
true
0
10
66
83
39
44
null
null
rueshyna/gogol
gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Edits/ExpansionFiles/Upload.hs
mpl-2.0
-- | Creates a value of 'EditsExpansionFilesUpload' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ePackageName' -- -- * 'eAPKVersionCode' -- -- * 'eExpansionFileType' -- -- * 'eEditId' editsExpansionFilesUpload :: Text -- ^ 'ePa...
797
editsExpansionFilesUpload :: Text -- ^ 'ePackageName' -> Int32 -- ^ 'eAPKVersionCode' -> EditsExpansionFilesUploadExpansionFileType -- ^ 'eExpansionFileType' -> Text -- ^ 'eEditId' -> EditsExpansionFilesUpload editsExpansionFilesUpload pEPackageName_ pEAPKVersionCode_ pEExpansionFileType_ pEEditId_ ...
524
editsExpansionFilesUpload pEPackageName_ pEAPKVersionCode_ pEExpansionFileType_ pEEditId_ = EditsExpansionFilesUpload' { _ePackageName = pEPackageName_ , _eAPKVersionCode = _Coerce # pEAPKVersionCode_ , _eExpansionFileType = pEExpansionFileType_ , _eEditId = pEEditId_ }
294
true
true
0
8
138
81
52
29
null
null
facebookincubator/duckling
Duckling/Numeral/TA/Rules.hs
bsd-3-clause
ruleTenToNineteen :: Rule ruleTenToNineteen = Rule { name = "integer (10..19)" , pattern = [ regex "(பத்து|பதினொன்று|பன்னிரண்டு|பதின்மூன்று|பதினான்கு|பதினைந்து|பதினாறு|பதினேழு|பதினெட்டு|பத்தொன்பது)" ] , prod = \case (Token RegexMatch (GroupMatch (match:_)):_) -> HashMap.lookup (Text.toLower ...
378
ruleTenToNineteen :: Rule ruleTenToNineteen = Rule { name = "integer (10..19)" , pattern = [ regex "(பத்து|பதினொன்று|பன்னிரண்டு|பதின்மூன்று|பதினான்கு|பதினைந்து|பதினாறு|பதினேழு|பதினெட்டு|பத்தொன்பது)" ] , prod = \case (Token RegexMatch (GroupMatch (match:_)):_) -> HashMap.lookup (Text.toLower ...
378
ruleTenToNineteen = Rule { name = "integer (10..19)" , pattern = [ regex "(பத்து|பதினொன்று|பன்னிரண்டு|பதின்மூன்று|பதினான்கு|பதினைந்து|பதினாறு|பதினேழு|பதினெட்டு|பத்தொன்பது)" ] , prod = \case (Token RegexMatch (GroupMatch (match:_)):_) -> HashMap.lookup (Text.toLower match) tenToNineteenMap >>...
352
false
true
0
17
72
99
52
47
null
null
danr/stm-promise
Control/Concurrent/STM/Promise/Process.hs
lgpl-3.0
processPromise :: FilePath -- ^ Program to run -> [String] -- ^ Arguments -> String -- ^ Input string (stdin) -> IO (Promise ProcessResult) -- ^ Promise object processPromise = processPromiseCallback (\ _ -> return ())
290
processPromise :: FilePath -- ^ Program to run -> [String] -- ^ Arguments -> String -- ^ Input string (stdin) -> IO (Promise ProcessResult) processPromise = processPromiseCallback (\ _ -> return ())
270
processPromise = processPromiseCallback (\ _ -> return ())
58
true
true
0
11
107
60
31
29
null
null
patperry/hs-linear-algebra
tests-old/Matrix.hs
bsd-3-clause
prop_herm_elem (MatrixAt (a :: M) (i,j)) = (herm a) ! (j,i) == conjugate (a!(i,j))
86
prop_herm_elem (MatrixAt (a :: M) (i,j)) = (herm a) ! (j,i) == conjugate (a!(i,j))
86
prop_herm_elem (MatrixAt (a :: M) (i,j)) = (herm a) ! (j,i) == conjugate (a!(i,j))
86
false
false
2
9
17
68
36
32
null
null
sergioifg94/Hendoman
src/CodeGeneration/Javascript/JavascriptES6.hs
bsd-3-clause
-- Both text and expressions, use string interpolatin stringInterpolation text = foldl write "`" text ++ "`" where write :: String -> TemplateExpression -> String write acc (Literal lit) = acc ++ lit write acc (Template content) = acc ++ "${" ++ content ++ "}" -- Reserved keywords in JS ES6
298
stringInterpolation text = foldl write "`" text ++ "`" where write :: String -> TemplateExpression -> String write acc (Literal lit) = acc ++ lit write acc (Template content) = acc ++ "${" ++ content ++ "}" -- Reserved keywords in JS ES6
244
stringInterpolation text = foldl write "`" text ++ "`" where write :: String -> TemplateExpression -> String write acc (Literal lit) = acc ++ lit write acc (Template content) = acc ++ "${" ++ content ++ "}" -- Reserved keywords in JS ES6
244
true
false
0
9
57
85
43
42
null
null
beni55/command-qq
test/System/Command/QQ/PredefSpec.hs
bsd-3-clause
stdout (_, xs, _) = xs
22
stdout (_, xs, _) = xs
22
stdout (_, xs, _) = xs
22
false
false
0
6
5
18
10
8
null
null
brendanhay/gogol
gogol-mirror/gen/Network/Google/Resource/Mirror/Timeline/List.hs
mpl-2.0
-- | Creates a value of 'TimelineList' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'tlPinnedOnly' -- -- * 'tlOrderBy' -- -- * 'tlBundleId' -- -- * 'tlSourceItemId' -- -- * 'tlPageToken' -- -- * 'tlMaxResults' -- -- * 'tlIncludeDele...
604
timelineList :: TimelineList timelineList = TimelineList' { _tlPinnedOnly = Nothing , _tlOrderBy = Nothing , _tlBundleId = Nothing , _tlSourceItemId = Nothing , _tlPageToken = Nothing , _tlMaxResults = Nothing , _tlIncludeDeleted = Nothing }
279
timelineList = TimelineList' { _tlPinnedOnly = Nothing , _tlOrderBy = Nothing , _tlBundleId = Nothing , _tlSourceItemId = Nothing , _tlPageToken = Nothing , _tlMaxResults = Nothing , _tlIncludeDeleted = Nothing }
246
true
true
0
7
130
82
54
28
null
null
mapinguari/SC_HS_Proxy
src/Proxy/Query/Unit.hs
mit
groundDamage ZergEgg = 0
24
groundDamage ZergEgg = 0
24
groundDamage ZergEgg = 0
24
false
false
0
5
3
9
4
5
null
null
dkandalov/katas
haskell/p99/src/p9x/p00/P00_.hs
unlicense
isPrime2 :: (Integral a) => a -> Bool isPrime2 n | n < 4 = n > 1
64
isPrime2 :: (Integral a) => a -> Bool isPrime2 n | n < 4 = n > 1
64
isPrime2 n | n < 4 = n > 1
26
false
true
0
8
17
41
20
21
null
null
bgw/hs-rpal
src/Evaluator/Control.hs
gpl-3.0
generate (AstTemp a b) = [ControlName $ AstTemp a b]
64
generate (AstTemp a b) = [ControlName $ AstTemp a b]
64
generate (AstTemp a b) = [ControlName $ AstTemp a b]
64
false
false
0
7
21
29
14
15
null
null
yiannist/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
oobPowerStatus :: String oobPowerStatus = Types.oobCommandToRaw OobPowerStatus
78
oobPowerStatus :: String oobPowerStatus = Types.oobCommandToRaw OobPowerStatus
78
oobPowerStatus = Types.oobCommandToRaw OobPowerStatus
53
false
true
0
6
6
16
8
8
null
null
nfjinjing/yuuko
src/Text/HTML/TagSoup/Options.hs
bsd-3-clause
parseOptionsFast :: StringLike str => ParseOptions str parseOptionsFast = parseOptions{optTagTextMerge=False}
109
parseOptionsFast :: StringLike str => ParseOptions str parseOptionsFast = parseOptions{optTagTextMerge=False}
109
parseOptionsFast = parseOptions{optTagTextMerge=False}
54
false
true
0
6
9
29
15
14
null
null
rrnewton/accelerate
Data/Array/Accelerate/Trafo/Vectorise.hs
bsd-3-clause
liftedReshapeC :: (Elt e, Shape sh, Shape sh', Kit acc) => acc aenv (Vector sh) -> acc aenv (LiftedArray sh' e) -> acc aenv (LiftedArray sh e) liftedReshapeC = fromHOAS liftedReshape
227
liftedReshapeC :: (Elt e, Shape sh, Shape sh', Kit acc) => acc aenv (Vector sh) -> acc aenv (LiftedArray sh' e) -> acc aenv (LiftedArray sh e) liftedReshapeC = fromHOAS liftedReshape
227
liftedReshapeC = fromHOAS liftedReshape
39
false
true
0
10
75
86
42
44
null
null
Cahu/krpc-hs
src/KRPCHS/SpaceCenter.hs
gpl-3.0
{- - Whether the wheel has brakes. -} getWheelHasBrakes :: KRPCHS.SpaceCenter.Wheel -> RPCContext (Bool) getWheelHasBrakes thisArg = do let r = makeRequest "SpaceCenter" "Wheel_get_HasBrakes" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
271
getWheelHasBrakes :: KRPCHS.SpaceCenter.Wheel -> RPCContext (Bool) getWheelHasBrakes thisArg = do let r = makeRequest "SpaceCenter" "Wheel_get_HasBrakes" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
231
getWheelHasBrakes thisArg = do let r = makeRequest "SpaceCenter" "Wheel_get_HasBrakes" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
164
true
true
0
13
46
73
33
40
null
null
Peaker/HaskProfileGui
TextUtils.hs
bsd-3-clause
showText :: Show a => a -> Text showText = Text.pack . show
59
showText :: Show a => a -> Text showText = Text.pack . show
59
showText = Text.pack . show
27
false
true
0
8
12
35
15
20
null
null
joe9/betfair-api
src/Betfair/APING/Requests/ListMarketCatalogue.hs
mit
-- The weight of all the below are 0. -- Hence, I should get the maximum of 1000 markets defaultJsonParameters :: JsonParameters defaultJsonParameters = JsonParameters defaultMarketFilter (Just [ COMPETITION , EVENT , EVENT_TYPE , MARKET_START_TIME -- , MARKET_DESCRIPTIO...
424
defaultJsonParameters :: JsonParameters defaultJsonParameters = JsonParameters defaultMarketFilter (Just [ COMPETITION , EVENT , EVENT_TYPE , MARKET_START_TIME -- , MARKET_DESCRIPTION , RUNNER_DESCRIPTION ]) -- , RUNNER_METADATA FIRST_TO_START 100...
333
defaultJsonParameters = JsonParameters defaultMarketFilter (Just [ COMPETITION , EVENT , EVENT_TYPE , MARKET_START_TIME -- , MARKET_DESCRIPTION , RUNNER_DESCRIPTION ]) -- , RUNNER_METADATA FIRST_TO_START 1000 Nothing
293
true
true
0
7
125
51
28
23
null
null
MaxOw/awesomium
src/Graphics/UI/Awesomium/WebView.hs
lgpl-3.0
-- | Loads a string of HTML into the WebView asynchronously. loadHtml :: WebView -- ^ The WebView instance. -> String -- ^ The HTML string (ASCII) to load. -> String -- ^ The name of the frame to load the HTML -- in; leave this blank to load in the main frame. -> IO () loadHtml = awe_webview_load_ht...
322
loadHtml :: WebView -- ^ The WebView instance. -> String -- ^ The HTML string (ASCII) to load. -> String -- ^ The name of the frame to load the HTML -- in; leave this blank to load in the main frame. -> IO () loadHtml = awe_webview_load_html
261
loadHtml = awe_webview_load_html
32
true
true
0
10
78
39
20
19
null
null
pniedzielski/fowlie-mga
src/Main.hs
gpl-3.0
modifyFirst p f (x : xs) | p x = f x : xs | otherwise = x : modifyFirst p f xs
89
modifyFirst p f (x : xs) | p x = f x : xs | otherwise = x : modifyFirst p f xs
89
modifyFirst p f (x : xs) | p x = f x : xs | otherwise = x : modifyFirst p f xs
89
false
false
1
8
33
54
25
29
null
null
brendanhay/numbersd
src/Numbers/Log.hs
mpl-2.0
defaultLogger :: Logger defaultLogger = unsafePerformIO $ mkLogger True stdout
78
defaultLogger :: Logger defaultLogger = unsafePerformIO $ mkLogger True stdout
78
defaultLogger = unsafePerformIO $ mkLogger True stdout
54
false
true
0
6
9
20
10
10
null
null
google/codeworld
codeworld-compiler/src/CodeWorld/Compile/Stages.hs
apache-2.0
isGoodExpAppLhs (ParArrayFromTo _ _ _) = False
46
isGoodExpAppLhs (ParArrayFromTo _ _ _) = False
46
isGoodExpAppLhs (ParArrayFromTo _ _ _) = False
46
false
false
0
6
6
20
9
11
null
null
LeoMingo/RPNMathParser
Functions/InfixOperations.hs
gpl-3.0
--Infix Constant Operation Check infCCheck :: String -> String -> Bool infCCheck a b | isConstant a && isConstant b = True | otherwise = False
156
infCCheck :: String -> String -> Bool infCCheck a b | isConstant a && isConstant b = True | otherwise = False
123
infCCheck a b | isConstant a && isConstant b = True | otherwise = False
85
true
true
0
9
39
50
23
27
null
null
jacekszymanski/wxHaskell
samples/contrib/GLMultiCanvas.hs
lgpl-2.1
convInt32 :: Int -> GLsizei convInt32 = fromInteger . toInteger
64
convInt32 :: Int -> GLsizei convInt32 = fromInteger . toInteger
63
convInt32 = fromInteger . toInteger
35
false
true
0
5
10
19
10
9
null
null
TomMD/ghc
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
bsd-3-clause
-- | Default fixity: @infixl 9@ defaultFixity :: Fixity defaultFixity = Fixity maxPrecedence InfixL
99
defaultFixity :: Fixity defaultFixity = Fixity maxPrecedence InfixL
67
defaultFixity = Fixity maxPrecedence InfixL
43
true
true
0
6
13
23
10
13
null
null
cmc-haskell-2016/checkers
src/WorldProcessing.hs
bsd-3-clause
ifZero :: Way2 -> Bool ifZero list = (foldr (||) False (map (\(x, _) -> (x /= 0)) list))
88
ifZero :: Way2 -> Bool ifZero list = (foldr (||) False (map (\(x, _) -> (x /= 0)) list))
88
ifZero list = (foldr (||) False (map (\(x, _) -> (x /= 0)) list))
65
false
true
0
12
18
59
33
26
null
null
benweitzman/DivisionOfLabor
src/lib/Data/HexGrid.hs
mit
West `ofLocation` (q, r) = (q - 1, r)
37
West `ofLocation` (q, r) = (q - 1, r)
37
West `ofLocation` (q, r) = (q - 1, r)
37
false
false
0
6
8
30
17
13
null
null
Noeda/caramia
src/Graphics/Caramia/ImageFormats/Internal.hs
mit
toConstantIF RGBA16 = GL_RGBA16
31
toConstantIF RGBA16 = GL_RGBA16
31
toConstantIF RGBA16 = GL_RGBA16
31
false
false
0
5
3
9
4
5
null
null
rashack/scheme-in-48h
src/LispParser.hs
bsd-3-clause
c2i '0' = 0
13
c2i '0' = 0
13
c2i '0' = 0
13
false
false
1
5
5
13
4
9
null
null
Stratege/Coevolutionary-Neural-Network
globalthermonuclearwarAI.hs
mit
encodeIntToVals bits maxV x = fst g where x' = (fromIntegral x) f y = if y > dv then (1,y / dv) else (y / dv,0) g = foldl (\(g,v) _ -> let (n,m) = f v in (n:g,m)) ([],x') [1..bits] dv = maxV / (2 ^ bits)
294
encodeIntToVals bits maxV x = fst g where x' = (fromIntegral x) f y = if y > dv then (1,y / dv) else (y / dv,0) g = foldl (\(g,v) _ -> let (n,m) = f v in (n:g,m)) ([],x') [1..bits] dv = maxV / (2 ^ bits)
294
encodeIntToVals bits maxV x = fst g where x' = (fromIntegral x) f y = if y > dv then (1,y / dv) else (y / dv,0) g = foldl (\(g,v) _ -> let (n,m) = f v in (n:g,m)) ([],x') [1..bits] dv = maxV / (2 ^ bits)
294
false
false
4
12
139
170
86
84
null
null
EldradUlt/probability-test
Tests.hs
bsd-3-clause
negOneHundrethSourceRangeLimit :: GenIO -> Source IO Double negOneHundrethSourceRangeLimit mwcGen = (normalDoubleSource mwcGen (-0.01)) $= limitRange (-1.1) 0.9
161
negOneHundrethSourceRangeLimit :: GenIO -> Source IO Double negOneHundrethSourceRangeLimit mwcGen = (normalDoubleSource mwcGen (-0.01)) $= limitRange (-1.1) 0.9
161
negOneHundrethSourceRangeLimit mwcGen = (normalDoubleSource mwcGen (-0.01)) $= limitRange (-1.1) 0.9
101
false
true
0
9
17
53
26
27
null
null
dorchard/camfort
src/Camfort/Specification/Units/InferenceBackendSBV.hs
apache-2.0
computeInitialNVMap :: NameSIntegerMap -> Query (Either [String] NameValueInfoMap) computeInitialNVMap nameSIntMap = do cs <- checkSat case cs of Unsat -> Left <$> getUnsatCore Sat -> do nvMap <- extractSIntValues nameSIntMap push 1 disallowValues nameSIntMap nvMap cs <- checkSat ...
597
computeInitialNVMap :: NameSIntegerMap -> Query (Either [String] NameValueInfoMap) computeInitialNVMap nameSIntMap = do cs <- checkSat case cs of Unsat -> Left <$> getUnsatCore Sat -> do nvMap <- extractSIntValues nameSIntMap push 1 disallowValues nameSIntMap nvMap cs <- checkSat ...
597
computeInitialNVMap nameSIntMap = do cs <- checkSat case cs of Unsat -> Left <$> getUnsatCore Sat -> do nvMap <- extractSIntValues nameSIntMap push 1 disallowValues nameSIntMap nvMap cs <- checkSat case cs of Sat -> do nvMap' <- extractSIntValues nameSIntMap ...
514
false
true
0
22
197
187
80
107
null
null
DavidAlphaFox/ghc
libraries/containers/Data/Tree.hs
bsd-3-clause
fmapTree :: (a -> b) -> Tree a -> Tree b fmapTree f (Node x ts) = Node (f x) (map (fmapTree f) ts)
98
fmapTree :: (a -> b) -> Tree a -> Tree b fmapTree f (Node x ts) = Node (f x) (map (fmapTree f) ts)
98
fmapTree f (Node x ts) = Node (f x) (map (fmapTree f) ts)
57
false
true
0
9
23
70
34
36
null
null
Numberartificial/workflow
snipets/src/Craft/Chapter12.hs
mit
-- Printing a picture: uses putStr after a newline has been added at the end of -- every line and the lines are joined into a single string. printPicture :: Picture -> IO () printPicture = putStr . concat . map (++"\n")
220
printPicture :: Picture -> IO () printPicture = putStr . concat . map (++"\n")
78
printPicture = putStr . concat . map (++"\n")
45
true
true
0
7
42
37
20
17
null
null
wskplho/stack
src/Stack/Types/Docker.hs
bsd-3-clause
-- | Docker database path argument name. dockerDatabasePathArgName :: Text dockerDatabasePathArgName = "database-path"
118
dockerDatabasePathArgName :: Text dockerDatabasePathArgName = "database-path"
77
dockerDatabasePathArgName = "database-path"
43
true
true
0
4
12
12
7
5
null
null
tel/hs-nanomsg
src/Network/Nanomsg/C/Errors.hs
apache-2.0
-- | "Operation now in progress" eINPROGRESS :: Errno eINPROGRESS = Errno $ getSym "EINPROGRESS"
104
eINPROGRESS :: Errno eINPROGRESS = Errno $ getSym "EINPROGRESS"
71
eINPROGRESS = Errno $ getSym "EINPROGRESS"
46
true
true
2
6
22
26
11
15
null
null
trygvis/hledger
hledger/Hledger/Cli/Balance.hs
gpl-3.0
formatBalanceReportItem opts accountName depth amount (f:fs) = s ++ (formatBalanceReportItem opts accountName depth amount fs) where s = case f of FormatLiteral l -> l FormatField leftJustified min max field -> formatAccount opts accountName depth amount leftJustified min max field
313
formatBalanceReportItem opts accountName depth amount (f:fs) = s ++ (formatBalanceReportItem opts accountName depth amount fs) where s = case f of FormatLiteral l -> l FormatField leftJustified min max field -> formatAccount opts accountName depth amount leftJustified min max field
313
formatBalanceReportItem opts accountName depth amount (f:fs) = s ++ (formatBalanceReportItem opts accountName depth amount fs) where s = case f of FormatLiteral l -> l FormatField leftJustified min max field -> formatAccount opts accountName depth amount leftJustified min max field
313
false
false
1
8
70
98
46
52
null
null
anchor/rados-timestore
src/Store.hs
bsd-3-clause
main :: IO () main = #if defined(RADOS) do Options pool user ns cmd <- execParser helpfulParser case cmd of Register s_buckets e_buckets -> do s <- radosStore (fmap S.pack user) "/etc/ceph/ceph.conf" (S.pack...
604
main :: IO () main = #if defined(RADOS) do Options pool user ns cmd <- execParser helpfulParser case cmd of Register s_buckets e_buckets -> do s <- radosStore (fmap S.pack user) "/etc/ceph/ceph.conf" (S.pack...
604
main = #if defined(RADOS) do Options pool user ns cmd <- execParser helpfulParser case cmd of Register s_buckets e_buckets -> do s <- radosStore (fmap S.pack user) "/etc/ceph/ceph.conf" (S.pack pool) ...
590
false
true
0
16
278
124
58
66
null
null
FranklinChen/hugs98-plus-Sep2006
packages/HGL/distrib/Webpage.hs
bsd-3-clause
vlinks :: [(String,URL)] -> HtmlTable vlinks xs = aboves $ map vlink $ xs where vlink (label,url) = (td ! [width "0", noshade] << anchor ! [href url] << label)
162
vlinks :: [(String,URL)] -> HtmlTable vlinks xs = aboves $ map vlink $ xs where vlink (label,url) = (td ! [width "0", noshade] << anchor ! [href url] << label)
162
vlinks xs = aboves $ map vlink $ xs where vlink (label,url) = (td ! [width "0", noshade] << anchor ! [href url] << label)
124
false
true
0
12
32
96
48
48
null
null
sboosali/simple-plugins
executables/Example/Pipes.hs
mit
main :: IO () main = do (output, input) <- spawn unbounded _ <- forkIO $ do runEffect $ lift user >~ toOutput output performGC _ <- forkIO $ do runEffect $ acidRain >-> toOutput output performGC runEffect $ fromInput input >-> handler
297
main :: IO () main = do (output, input) <- spawn unbounded _ <- forkIO $ do runEffect $ lift user >~ toOutput output performGC _ <- forkIO $ do runEffect $ acidRain >-> toOutput output performGC runEffect $ fromInput input >-> handler
297
main = do (output, input) <- spawn unbounded _ <- forkIO $ do runEffect $ lift user >~ toOutput output performGC _ <- forkIO $ do runEffect $ acidRain >-> toOutput output performGC runEffect $ fromInput input >-> handler
283
false
true
1
13
105
109
47
62
null
null
gambogi/csh-eval
src/CSH/Eval/Cacheable/Fetch.hs
mit
-- | Fetch the 'Application'(s) associated with a provided 'Member' and of a -- provided 'EvaluationStatus'. getMemberStatusApplications :: Word64 -- ^ Member ID. -> EvaluationStatus -- ^ Evaluation status. -> Cacheable [Application] getMemberStatusApp...
537
getMemberStatusApplications :: Word64 -- ^ Member ID. -> EvaluationStatus -- ^ Evaluation status. -> Cacheable [Application] getMemberStatusApplications m e c = liftListQ (getApplicationsMemberIDStatusP m (evaluationSt...
426
getMemberStatusApplications m e c = liftListQ (getApplicationsMemberIDStatusP m (evaluationStatusToVal e)) applicationFromRow c
235
true
true
0
9
219
57
30
27
null
null
Chiel92/ants
simulation/Ants.hs
gpl-2.0
makeOverviewPanel myOptions w = do p <- panel w [bgcolor := white] -- create widgets scalingSlider <- hslider p False 160 400 [selection := 230] -- 5 10 50 -- pixels roundNumberText <- staticText p [fontSize := 28, size := sz 40 20] timeRemaining <- staticText p [text := "unkn...
1,229
makeOverviewPanel myOptions w = do p <- panel w [bgcolor := white] -- create widgets scalingSlider <- hslider p False 160 400 [selection := 230] -- 5 10 50 -- pixels roundNumberText <- staticText p [fontSize := 28, size := sz 40 20] timeRemaining <- staticText p [text := "unkn...
1,229
makeOverviewPanel myOptions w = do p <- panel w [bgcolor := white] -- create widgets scalingSlider <- hslider p False 160 400 [selection := 230] -- 5 10 50 -- pixels roundNumberText <- staticText p [fontSize := 28, size := sz 40 20] timeRemaining <- staticText p [text := "unkn...
1,229
false
false
0
13
424
299
147
152
null
null
forste/haReFork
refactorer/TypeCheck.hs
bsd-3-clause
say :: String -> Interpreter () say = liftIO . putStrLn
55
say :: String -> Interpreter () say = liftIO . putStrLn
55
say = liftIO . putStrLn
23
false
true
0
7
10
24
12
12
null
null
MichaelXavier/vigilance
src/Utils/Vigilance/Config.hs
bsd-2-clause
buildWatch :: POSIXTime -> WatchName -> WatchAttrs -> Maybe NewWatch buildWatch time wName attrs = Watch <$> pure () <*> pure wName <*> (parseInterval =<< lu "interval") <*> pure (Active time) ...
635
buildWatch :: POSIXTime -> WatchName -> WatchAttrs -> Maybe NewWatch buildWatch time wName attrs = Watch <$> pure () <*> pure wName <*> (parseInterval =<< lu "interval") <*> pure (Active time) ...
635
buildWatch time wName attrs = Watch <$> pure () <*> pure wName <*> (parseInterval =<< lu "interval") <*> pure (Active time) <*> (pure . parseNotifications $ lud noNotifications...
566
false
true
0
11
255
151
71
80
null
null
bkoropoff/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reflectNameQuotePattern (MN _ n) = do i <- getNameFrom (sMN 0 "mnCounter") claim i (RConstant (AType (ATInt ITNative))) movelast i fill $ reflCall "MN" [Var i, RConstant (Str $ T.unpack n)] solve
225
reflectNameQuotePattern (MN _ n) = do i <- getNameFrom (sMN 0 "mnCounter") claim i (RConstant (AType (ATInt ITNative))) movelast i fill $ reflCall "MN" [Var i, RConstant (Str $ T.unpack n)] solve
225
reflectNameQuotePattern (MN _ n) = do i <- getNameFrom (sMN 0 "mnCounter") claim i (RConstant (AType (ATInt ITNative))) movelast i fill $ reflCall "MN" [Var i, RConstant (Str $ T.unpack n)] solve
225
false
false
0
14
61
106
48
58
null
null