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
csabahruska/quake3
game/GameLogic.hs
bsd-3-clause
updateVisuals :: PureMT -> Time -> DTime -> [Visual] -> (PureMT,[Visual]) updateVisuals randGen time dtime visuals = (randGen',catMaybes visuals' ++ newVisuals) where ((visuals',newVisuals),randGen') = collect randGen $ mapM stepVisual visuals stepVisual = \case VParticle a -> update VParticle a $ stepParticle...
356
updateVisuals :: PureMT -> Time -> DTime -> [Visual] -> (PureMT,[Visual]) updateVisuals randGen time dtime visuals = (randGen',catMaybes visuals' ++ newVisuals) where ((visuals',newVisuals),randGen') = collect randGen $ mapM stepVisual visuals stepVisual = \case VParticle a -> update VParticle a $ stepParticle...
356
updateVisuals randGen time dtime visuals = (randGen',catMaybes visuals' ++ newVisuals) where ((visuals',newVisuals),randGen') = collect randGen $ mapM stepVisual visuals stepVisual = \case VParticle a -> update VParticle a $ stepParticle time dtime e -> return $ Just e
282
false
true
0
12
61
142
71
71
null
null
LightAndLight/pl0-haskell
src/PL0/StaticChecker.hs
bsd-3-clause
checkStatement (If cond thenStatement elseStatement) = do cond' <- dereference <$> checkExpression cond >>= coerceExpression TBool then' <- checkStatement thenStatement else' <- checkStatement elseStatement return $ If cond' then' else'
244
checkStatement (If cond thenStatement elseStatement) = do cond' <- dereference <$> checkExpression cond >>= coerceExpression TBool then' <- checkStatement thenStatement else' <- checkStatement elseStatement return $ If cond' then' else'
244
checkStatement (If cond thenStatement elseStatement) = do cond' <- dereference <$> checkExpression cond >>= coerceExpression TBool then' <- checkStatement thenStatement else' <- checkStatement elseStatement return $ If cond' then' else'
244
false
false
0
10
37
74
32
42
null
null
bos/wreq
tests/doctests.hs
bsd-3-clause
main :: IO () main = do traverse_ putStrLn args doctest args where args = flags ++ pkgs ++ module_sources
119
main :: IO () main = do traverse_ putStrLn args doctest args where args = flags ++ pkgs ++ module_sources
119
main = do traverse_ putStrLn args doctest args where args = flags ++ pkgs ++ module_sources
105
false
true
5
7
33
57
22
35
null
null
whittle/linkedin-api
Data/API/LinkedIn/Profile.hs
mit
fieldName FormattedNameS = "formatted-name"
43
fieldName FormattedNameS = "formatted-name"
43
fieldName FormattedNameS = "formatted-name"
43
false
false
1
5
3
13
4
9
null
null
Rydgel/advent-of-code
src/Day1.hs
bsd-3-clause
day1' :: IO () day1' = do fileStr <- readFile "resources/day1.txt" print $ findFirstSpecificFloor (-1) 0 $ getAllFloors fileStr
131
day1' :: IO () day1' = do fileStr <- readFile "resources/day1.txt" print $ findFirstSpecificFloor (-1) 0 $ getAllFloors fileStr
131
day1' = do fileStr <- readFile "resources/day1.txt" print $ findFirstSpecificFloor (-1) 0 $ getAllFloors fileStr
116
false
true
0
11
22
50
23
27
null
null
gatlin/psilo
src/Lib/Syntax/Symbol.hs
gpl-3.0
{- [-- "=?", "<", ">", "modulo", "not" -- some non-overloaded numeric functions , "int-add", "int-mul", "int-div", "int-sub" , "float-add", "float-mul", "float-div", "float-sub" ] -} mangle :: Symbol -> Symbol mangle sym | sym == "-" = "-" | otherwise = concatMap (\c -> if c == '-' then "__...
335
mangle :: Symbol -> Symbol mangle sym | sym == "-" = "-" | otherwise = concatMap (\c -> if c == '-' then "__" else [c]) sym
131
mangle sym | sym == "-" = "-" | otherwise = concatMap (\c -> if c == '-' then "__" else [c]) sym
104
true
true
1
9
80
64
34
30
null
null
joranvar/GCJ
src/gcj-lib/Lib.hs
gpl-3.0
runner :: Text -> Maybe (Bool -> Text -> Text) runner = flip Map.lookup $ Map.fromList [ ("2017-R1B-A", Y2017.R1B.A.solve) , ("2017-R1B-B", Y2017.R1B.B.solve) , ("2017-R1B-C", Y2017.R1B.C.solve) , ("2017-R1B-D", Y2017.R1B.D.solve) ]
240
runner :: Text -> Maybe (Bool -> Text -> Text) runner = flip Map.lookup $ Map.fromList [ ("2017-R1B-A", Y2017.R1B.A.solve) , ("2017-R1B-B", Y2017.R1B.B.solve) , ("2017-R1B-C", Y2017.R1B.C.solve) , ("2017-R1B-D", Y2017.R1B.D.solve) ]
240
runner = flip Map.lookup $ Map.fromList [ ("2017-R1B-A", Y2017.R1B.A.solve) , ("2017-R1B-B", Y2017.R1B.B.solve) , ("2017-R1B-C", Y2017.R1B.C.solve) , ("2017-R1B-D", Y2017.R1B.D.solve) ]
193
false
true
0
9
36
95
57
38
null
null
dmp1ce/Haskell-Programming-Exercises
Chapter 11/BinaryTree.hs
unlicense
postorder (Node left a right) = (postorder left) ++ (postorder right) ++ [a]
76
postorder (Node left a right) = (postorder left) ++ (postorder right) ++ [a]
76
postorder (Node left a right) = (postorder left) ++ (postorder right) ++ [a]
76
false
false
0
8
12
42
21
21
null
null
23Skidoo/xmlhtml
src/Text/XmlHtml/Cursor.hs
bsd-3-clause
------------------------------------------------------------------------------ -- | Inserts a 'Node' as the last child of the current element. insertLastChild :: Node -> Cursor -> Maybe Cursor insertLastChild n (Cursor (Element t a c) ls rs ps) = Just (Cursor (Element t a (c ++ [n])) ls rs ps)
298
insertLastChild :: Node -> Cursor -> Maybe Cursor insertLastChild n (Cursor (Element t a c) ls rs ps) = Just (Cursor (Element t a (c ++ [n])) ls rs ps)
155
insertLastChild n (Cursor (Element t a c) ls rs ps) = Just (Cursor (Element t a (c ++ [n])) ls rs ps)
105
true
true
0
12
47
91
45
46
null
null
Hi-Angel/yi
yi-core/src/Yi/Buffer/Misc.hs
gpl-2.0
nelemsB :: Int -> Point -> BufferM YiString nelemsB n i = R.take n <$> streamB Forward i
88
nelemsB :: Int -> Point -> BufferM YiString nelemsB n i = R.take n <$> streamB Forward i
88
nelemsB n i = R.take n <$> streamB Forward i
44
false
true
0
7
17
41
19
22
null
null
afiskon/leprosorium-captcha-recognizer
src/NeuralNetworkBackpropagationMain.hs
bsd-2-clause
testset = learnset Testset.examples
35
testset = learnset Testset.examples
35
testset = learnset Testset.examples
35
false
false
1
6
3
15
5
10
null
null
neothemachine/monadiccp
src/Data/Expr/Data.hs
bsd-3-clause
compareColExpr l (ColMap f1 c1) (ColMap f2 c2) = compareColExpr l c1 c2 <<>> compareExpr (l+1) (f1 $ ExprHole l) (f2 $ ExprHole l)
130
compareColExpr l (ColMap f1 c1) (ColMap f2 c2) = compareColExpr l c1 c2 <<>> compareExpr (l+1) (f1 $ ExprHole l) (f2 $ ExprHole l)
130
compareColExpr l (ColMap f1 c1) (ColMap f2 c2) = compareColExpr l c1 c2 <<>> compareExpr (l+1) (f1 $ ExprHole l) (f2 $ ExprHole l)
130
false
false
0
9
23
74
36
38
null
null
qfjp/csce_dfa_project_test
src/ProjectTest.hs
bsd-3-clause
-- dfas to feed to properties propTestCases :: [String] propTestCases = map show [1..8 :: Int]
96
propTestCases :: [String] propTestCases = map show [1..8 :: Int]
66
propTestCases = map show [1..8 :: Int]
40
true
true
0
7
17
31
16
15
null
null
dysinger/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/SetPermission.hs
mpl-2.0
-- | The user is allowed to use sudo to elevate privileges. spAllowSudo :: Lens' SetPermission (Maybe Bool) spAllowSudo = lens _spAllowSudo (\s a -> s { _spAllowSudo = a })
172
spAllowSudo :: Lens' SetPermission (Maybe Bool) spAllowSudo = lens _spAllowSudo (\s a -> s { _spAllowSudo = a })
112
spAllowSudo = lens _spAllowSudo (\s a -> s { _spAllowSudo = a })
64
true
true
1
9
30
50
25
25
null
null
silverweed/maudstats
MaudStats/Fetch.hs
mit
pairIps (doc:docs) | date /= Nothing && ip /= Nothing = let (Just d, Just i) = (date, ip) in (d, i) : pairIps docs | otherwise = pairIps docs where ip = doc !? "author.ip" date = fmap un...
428
pairIps (doc:docs) | date /= Nothing && ip /= Nothing = let (Just d, Just i) = (date, ip) in (d, i) : pairIps docs | otherwise = pairIps docs where ip = doc !? "author.ip" date = fmap un...
428
pairIps (doc:docs) | date /= Nothing && ip /= Nothing = let (Just d, Just i) = (date, ip) in (d, i) : pairIps docs | otherwise = pairIps docs where ip = doc !? "author.ip" date = fmap un...
428
false
false
0
11
197
117
58
59
null
null
lukexi/rumpus
src/Rumpus/Systems/KeyPads.hs
bsd-3-clause
keyCapWidth HandKeyCopy = 1.5
39
keyCapWidth HandKeyCopy = 1.5
39
keyCapWidth HandKeyCopy = 1.5
39
false
false
0
5
13
9
4
5
null
null
jml/hodor
Hodor/CommandLine.hs
apache-2.0
getHodorConfiguration :: HodorOptions -> IO Config getHodorConfiguration opts = do let configFilePath = fromMaybe defaultConfigFile (optConfigFile opts) baseConfig <- loadConfigFile configFilePath return $ updateConfiguration baseConfig opts
247
getHodorConfiguration :: HodorOptions -> IO Config getHodorConfiguration opts = do let configFilePath = fromMaybe defaultConfigFile (optConfigFile opts) baseConfig <- loadConfigFile configFilePath return $ updateConfiguration baseConfig opts
247
getHodorConfiguration opts = do let configFilePath = fromMaybe defaultConfigFile (optConfigFile opts) baseConfig <- loadConfigFile configFilePath return $ updateConfiguration baseConfig opts
196
false
true
0
13
31
67
29
38
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
action_316 (120#) = happyShift action_195
41
action_316 (120#) = happyShift action_195
41
action_316 (120#) = happyShift action_195
41
false
false
0
6
4
15
7
8
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 406445 = 2090
33
getValueFromProduct 406445 = 2090
33
getValueFromProduct 406445 = 2090
33
false
false
0
5
3
9
4
5
null
null
aspidites/vice-by-example
haskell/Experimental/Data/Deck.hs
agpl-3.0
readDeck :: String -> IO Deck readDeck file = do db <- database names <- lines <$> readFile file let deck = concatMap (\card -> findByName card db) names return deck
173
readDeck :: String -> IO Deck readDeck file = do db <- database names <- lines <$> readFile file let deck = concatMap (\card -> findByName card db) names return deck
173
readDeck file = do db <- database names <- lines <$> readFile file let deck = concatMap (\card -> findByName card db) names return deck
143
false
true
0
13
38
75
34
41
null
null
ywata/redmine-report
src/Redmine/Reporter/Parser.hs
mit
parens = P.parens lexer
23
parens = P.parens lexer
23
parens = P.parens lexer
23
false
false
1
5
3
15
5
10
null
null
nzok/decimal
ScaledDecimalTest.hs
mit
prop_equality_commutes = forAll sdGen $ \x -> forAll sdGen $ \y -> (x == y) == (y == x)
99
prop_equality_commutes = forAll sdGen $ \x -> forAll sdGen $ \y -> (x == y) == (y == x)
99
prop_equality_commutes = forAll sdGen $ \x -> forAll sdGen $ \y -> (x == y) == (y == x)
99
false
false
0
11
30
48
25
23
null
null
beni55/haste-compiler
libraries/ghc-7.8/base/Data/Dynamic.hs
bsd-3-clause
fromDyn :: Typeable a => Dynamic -- ^ the dynamically-typed object -> a -- ^ a default value -> a -- ^ returns: the value of the first argument, if -- it has the correct type, otherwise the value of -- the second argumen...
411
fromDyn :: Typeable a => Dynamic -- ^ the dynamically-typed object -> a -- ^ a default value -> a fromDyn (Dynamic t v) def | typeOf def == t = unsafeCoerce v | otherwise = def
227
fromDyn (Dynamic t v) def | typeOf def == t = unsafeCoerce v | otherwise = def
88
true
true
1
9
170
68
34
34
null
null
andreasabel/helf
src/ClosVal.hs
mit
updateSubst = Env.update
24
updateSubst = Env.update
24
updateSubst = Env.update
24
false
false
0
5
2
8
4
4
null
null
talanis85/rechord
haScales/src/Data/Music/Scales.hs
gpl-3.0
degreeInterval VII natural = 11
31
degreeInterval VII natural = 11
31
degreeInterval VII natural = 11
31
false
false
0
4
4
12
5
7
null
null
aniketd/learn.haskell
haskellbook/wordNumber.hs
unlicense
digitToWord :: Int -> String digitToWord 1 = "one"
50
digitToWord :: Int -> String digitToWord 1 = "one"
50
digitToWord 1 = "one"
21
false
true
0
5
8
18
9
9
null
null
jwiegley/ghc-release
libraries/Cabal/cabal/Distribution/Simple/BuildTarget.hs
gpl-3.0
-- | Lift a list of matches to an exact match. -- exactMatches, inexactMatches :: [a] -> Match a exactMatches [] = matchZero
125
exactMatches, inexactMatches :: [a] -> Match a exactMatches [] = matchZero
74
exactMatches [] = matchZero
27
true
true
0
6
23
30
17
13
null
null
pbl64k/HackerRank-Contests
2014-06-20-FP/BoleynSalary/bs.merge.hs
bsd-2-clause
readEdge :: IO (Int, Int) readEdge = do estr <- getLine let (a : b : _) = map read (words estr) return (a, b)
121
readEdge :: IO (Int, Int) readEdge = do estr <- getLine let (a : b : _) = map read (words estr) return (a, b)
121
readEdge = do estr <- getLine let (a : b : _) = map read (words estr) return (a, b)
95
false
true
0
12
36
71
35
36
null
null
mcschroeder/ghc
compiler/types/Type.hs
bsd-3-clause
splitFunTy_maybe _ = Nothing
52
splitFunTy_maybe _ = Nothing
52
splitFunTy_maybe _ = Nothing
52
false
false
0
4
27
10
4
6
null
null
jwiegley/ghc-release
compiler/llvmGen/Llvm/PpLlvm.hs
gpl-3.0
ppSyncOrdering SyncAcquire = text "acquire"
45
ppSyncOrdering SyncAcquire = text "acquire"
45
ppSyncOrdering SyncAcquire = text "acquire"
45
false
false
0
5
6
12
5
7
null
null
rueshyna/gogol
gogol-container/gen/Network/Google/Container/Types/Product.hs
mpl-2.0
-- | [Output only] Server-defined URL for the resource. npSelfLink :: Lens' NodePool (Maybe Text) npSelfLink = lens _npSelfLink (\ s a -> s{_npSelfLink = a})
159
npSelfLink :: Lens' NodePool (Maybe Text) npSelfLink = lens _npSelfLink (\ s a -> s{_npSelfLink = a})
103
npSelfLink = lens _npSelfLink (\ s a -> s{_npSelfLink = a})
61
true
true
2
9
27
55
25
30
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F02.hs
bsd-3-clause
-- glBlendFuncSeparateiOES ----------------------------------------------------- -- | This command is an alias for 'glBlendFuncSeparatei'. glBlendFuncSeparateiOES :: MonadIO m => GLuint -- ^ @buf@. -> GLenum -- ^ @srcRGB@ of type [BlendingFactor](Graphics-GL-Groups.html#BlendingFactor). -> GLenum -- ^ @dstRGB@...
683
glBlendFuncSeparateiOES :: MonadIO m => GLuint -- ^ @buf@. -> GLenum -- ^ @srcRGB@ of type [BlendingFactor](Graphics-GL-Groups.html#BlendingFactor). -> GLenum -- ^ @dstRGB@ of type [BlendingFactor](Graphics-GL-Groups.html#BlendingFactor). -> GLenum -- ^ @srcAlpha@ of type [BlendingFactor](Graphics-GL-Groups.h...
543
glBlendFuncSeparateiOES v1 v2 v3 v4 v5 = liftIO $ dyn57 ptr_glBlendFuncSeparateiOES v1 v2 v3 v4 v5
98
true
true
0
13
86
82
42
40
null
null
Soostone/uri-bytestring
src/URI/ByteString/Internal.hs
bsd-3-clause
------------------------------------------------------------------------------- oBracket :: Word8 oBracket = 91
111
oBracket :: Word8 oBracket = 91
31
oBracket = 91
13
true
true
0
4
6
12
7
5
null
null
SteffenMichels/IHPMC
src/Main.hs
mit
whenJust (Just x) fx = fx x
27
whenJust (Just x) fx = fx x
27
whenJust (Just x) fx = fx x
27
false
false
0
7
6
20
9
11
null
null
nedervold/origami
tests/Data/Origami/Internal/BuildTests.hs
bsd-3-clause
assertBuildFailed :: Either BuildErr FoldFamily -> Assertion assertBuildFailed e = case e of Left _ -> return () Right _ff -> assertFailure "test didn't fail; was supposed to"
183
assertBuildFailed :: Either BuildErr FoldFamily -> Assertion assertBuildFailed e = case e of Left _ -> return () Right _ff -> assertFailure "test didn't fail; was supposed to"
183
assertBuildFailed e = case e of Left _ -> return () Right _ff -> assertFailure "test didn't fail; was supposed to"
122
false
true
0
9
35
53
24
29
null
null
acowley/ghc
compiler/types/Type.hs
bsd-3-clause
isEqPred ty = case tyConAppTyCon_maybe ty of Just tyCon -> tyCon `hasKey` eqTyConKey _ -> False
112
isEqPred ty = case tyConAppTyCon_maybe ty of Just tyCon -> tyCon `hasKey` eqTyConKey _ -> False
112
isEqPred ty = case tyConAppTyCon_maybe ty of Just tyCon -> tyCon `hasKey` eqTyConKey _ -> False
112
false
false
1
8
32
41
18
23
null
null
rahulmutt/ghcvm
compiler/Eta/BasicTypes/Module.hs
bsd-3-clause
pprModuleName :: ModuleName -> SDoc pprModuleName (ModuleName nm) = getPprStyle $ \ sty -> if codeStyle sty then ztext (zEncodeFS nm) else ftext nm
171
pprModuleName :: ModuleName -> SDoc pprModuleName (ModuleName nm) = getPprStyle $ \ sty -> if codeStyle sty then ztext (zEncodeFS nm) else ftext nm
171
pprModuleName (ModuleName nm) = getPprStyle $ \ sty -> if codeStyle sty then ztext (zEncodeFS nm) else ftext nm
135
false
true
0
10
47
56
28
28
null
null
brendanhay/gogol
gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Agent/Sessions/EntityTypes/Patch.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). paSetpUploadProtocol :: Lens' ProjectsAgentSessionsEntityTypesPatch (Maybe Text) paSetpUploadProtocol = lens _paSetpUploadProtocol (\ s a -> s{_paSetpUploadProtocol = a})
240
paSetpUploadProtocol :: Lens' ProjectsAgentSessionsEntityTypesPatch (Maybe Text) paSetpUploadProtocol = lens _paSetpUploadProtocol (\ s a -> s{_paSetpUploadProtocol = a})
178
paSetpUploadProtocol = lens _paSetpUploadProtocol (\ s a -> s{_paSetpUploadProtocol = a})
97
true
true
0
9
33
48
25
23
null
null
tonyday567/pipes-extended
src/Pipes/Extended.hs
mit
readLines :: FilePath -> Producer ByteString (SafeT IO) () readLines file = over PB.lines id (readFile file) >-> Pipes.filter (/= "\n")
137
readLines :: FilePath -> Producer ByteString (SafeT IO) () readLines file = over PB.lines id (readFile file) >-> Pipes.filter (/= "\n")
137
readLines file = over PB.lines id (readFile file) >-> Pipes.filter (/= "\n")
78
false
true
0
9
22
67
31
36
null
null
planrich/abstractmachines
src/Builtins.hs
bsd-3-clause
existsBuiltin :: Int -> String -> Maybe Builtin existsBuiltin argcount name = case M.lookup name builtins of Just bi@(Builtin argcount' b) -> if argcount' == argcount then Just bi else Nothing _ -> Nothing
225
existsBuiltin :: Int -> String -> Maybe Builtin existsBuiltin argcount name = case M.lookup name builtins of Just bi@(Builtin argcount' b) -> if argcount' == argcount then Just bi else Nothing _ -> Nothing
225
existsBuiltin argcount name = case M.lookup name builtins of Just bi@(Builtin argcount' b) -> if argcount' == argcount then Just bi else Nothing _ -> Nothing
177
false
true
0
11
53
84
40
44
null
null
flocc-net/flocc
v0.1/Compiler/Types/Solver.hs
apache-2.0
occursInTm a (Term t l) = or $ map (occursInTm a) l
51
occursInTm a (Term t l) = or $ map (occursInTm a) l
51
occursInTm a (Term t l) = or $ map (occursInTm a) l
51
false
false
0
8
11
34
16
18
null
null
clockworkdevstudio/Idlewild-Lang
Semantics.hs
bsd-2-clause
dataSemantics :: Statement -> CodeTransformation () dataSemantics (Statement {statementContents = expressionList}) = do symbols <- gets compileStateSymbols mapM_ (requireConstantExpression symbols) expressionList mapM_ expressionSemantics expressionList
266
dataSemantics :: Statement -> CodeTransformation () dataSemantics (Statement {statementContents = expressionList}) = do symbols <- gets compileStateSymbols mapM_ (requireConstantExpression symbols) expressionList mapM_ expressionSemantics expressionList
266
dataSemantics (Statement {statementContents = expressionList}) = do symbols <- gets compileStateSymbols mapM_ (requireConstantExpression symbols) expressionList mapM_ expressionSemantics expressionList
214
false
true
0
9
36
67
31
36
null
null
ryantm/ghc
libraries/template-haskell/Language/Haskell/TH/Lib/Map.hs
bsd-3-clause
insert :: Ord k => k -> a -> Map k a -> Map k a insert = go where go :: Ord k => k -> a -> Map k a -> Map k a go !kx x Tip = singleton kx x go !kx x (Bin sz ky y l r) = case compare kx ky of LT -> balanceL ky y (go kx x l) r GT -> balanceR ky y l (go kx x r) EQ ...
339
insert :: Ord k => k -> a -> Map k a -> Map k a insert = go where go :: Ord k => k -> a -> Map k a -> Map k a go !kx x Tip = singleton kx x go !kx x (Bin sz ky y l r) = case compare kx ky of LT -> balanceL ky y (go kx x l) r GT -> balanceR ky y l (go kx x r) EQ ...
339
insert = go where go :: Ord k => k -> a -> Map k a -> Map k a go !kx x Tip = singleton kx x go !kx x (Bin sz ky y l r) = case compare kx ky of LT -> balanceL ky y (go kx x l) r GT -> balanceR ky y l (go kx x r) EQ -> Bin sz kx x l r
291
false
true
0
10
145
198
93
105
null
null
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/SageMakerEndpointConfigProductionVariant.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-endpointconfig-productionvariant.html#cfn-sagemaker-endpointconfig-productionvariant-modelname smecpvModelName :: Lens' SageMakerEndpointConfigProductionVariant (Val Text) smecpvModelName = lens _sageMakerEndpointConfigProductio...
408
smecpvModelName :: Lens' SageMakerEndpointConfigProductionVariant (Val Text) smecpvModelName = lens _sageMakerEndpointConfigProductionVariantModelName (\s a -> s { _sageMakerEndpointConfigProductionVariantModelName = a })
221
smecpvModelName = lens _sageMakerEndpointConfigProductionVariantModelName (\s a -> s { _sageMakerEndpointConfigProductionVariantModelName = a })
144
true
true
1
9
21
49
25
24
null
null
sashabu/libcspm
src/Util/FuzzyLookup.hs
bsd-3-clause
restrictedDamerauLevenshteinDistance' :: (Bits bv, Num bv) => bv -> Int -> Int -> String -> String -> Int restrictedDamerauLevenshteinDistance' _bv_dummy m n str1 str2 | [] <- str1 = n | otherwise = extractAnswer $ foldl' (restrictedDamerauLevenshteinDistanceWorker (...
572
restrictedDamerauLevenshteinDistance' :: (Bits bv, Num bv) => bv -> Int -> Int -> String -> String -> Int restrictedDamerauLevenshteinDistance' _bv_dummy m n str1 str2 | [] <- str1 = n | otherwise = extractAnswer $ foldl' (restrictedDamerauLevenshteinDistanceWorker (...
572
restrictedDamerauLevenshteinDistance' _bv_dummy m n str1 str2 | [] <- str1 = n | otherwise = extractAnswer $ foldl' (restrictedDamerauLevenshteinDistanceWorker (matchVectors str1) top_bit_mask vector_mask) (0, 0, m_ones, 0, m) str2 where m...
464
false
true
1
10
162
195
105
90
null
null
copland/cmdargs
System/Console/CmdArgs/Implicit/Reader.hs
bsd-3-clause
sequenceEither = foldr f (Right []) where f (Left x) _ = Left x f _ (Left x) = Left x f (Right x) (Right xs) = Right (x:xs)
147
sequenceEither = foldr f (Right []) where f (Left x) _ = Left x f _ (Left x) = Left x f (Right x) (Right xs) = Right (x:xs)
147
sequenceEither = foldr f (Right []) where f (Left x) _ = Left x f _ (Left x) = Left x f (Right x) (Right xs) = Right (x:xs)
147
false
false
2
8
52
89
44
45
null
null
wiggly/workshop
app/Main.hs
bsd-3-clause
ackerman m n p = ackerman m (ackerman m (n-1) p) (p-1)
54
ackerman m n p = ackerman m (ackerman m (n-1) p) (p-1)
54
ackerman m n p = ackerman m (ackerman m (n-1) p) (p-1)
54
false
false
0
9
11
44
22
22
null
null
gcampax/ghc
compiler/deSugar/DsBinds.hs
bsd-3-clause
dsHsWrapper :: HsWrapper -> CoreExpr -> DsM CoreExpr dsHsWrapper WpHole e = return e
95
dsHsWrapper :: HsWrapper -> CoreExpr -> DsM CoreExpr dsHsWrapper WpHole e = return e
95
dsHsWrapper WpHole e = return e
42
false
true
0
7
24
30
14
16
null
null
EdisonAlgorithms/HackerRank
practice/fp/recursion/crosswords-101/crosswords-101.hs
mit
isPossible :: [String] -> String -> (Int, Int) -> (Int, Int) -> Bool isPossible _ [] _ _ = True
95
isPossible :: [String] -> String -> (Int, Int) -> (Int, Int) -> Bool isPossible _ [] _ _ = True
95
isPossible _ [] _ _ = True
26
false
true
0
9
19
53
29
24
null
null
gabluc/CIS194-Solutions
src/Homework11/AParser.hs
bsd-3-clause
char :: Char -> Parser Char char c = satisfy (== c)
51
char :: Char -> Parser Char char c = satisfy (== c)
51
char c = satisfy (== c)
23
false
true
0
6
11
28
14
14
null
null
bsl/GLFW-b
Graphics/UI/GLFW.hs
bsd-2-clause
windowHint (WindowHint'DepthBits x) = c'glfwWindowHint c'GLFW_DEPTH_BITS (toC x)
109
windowHint (WindowHint'DepthBits x) = c'glfwWindowHint c'GLFW_DEPTH_BITS (toC x)
109
windowHint (WindowHint'DepthBits x) = c'glfwWindowHint c'GLFW_DEPTH_BITS (toC x)
109
false
false
0
7
36
26
12
14
null
null
oforero/sudoku
haskell/src/Sudoku/Main.hs
mit
sudoku _ = putStrLn "Call the program with [-b|-s] <String|File>"
65
sudoku _ = putStrLn "Call the program with [-b|-s] <String|File>"
65
sudoku _ = putStrLn "Call the program with [-b|-s] <String|File>"
65
false
false
0
5
9
13
5
8
null
null
ghorn/dynobud
dynobud/src/Dyno/SimpleOcp.hs
lgpl-3.0
solver :: Solver solver = ipoptSolver
37
solver :: Solver solver = ipoptSolver
37
solver = ipoptSolver
20
false
true
0
6
5
18
7
11
null
null
robbertkrebbers/fewdigits
Data/Real/CReal.hs
bsd-2-clause
choke :: BoundedCReal -> CReal choke (CReal x, (Interval (lb,ub))) = CReal f where f eps | y < lb = lb | ub < y = ub | otherwise = y where y = x eps {- produces a regular function whose resulting approximations are small in memory size -}
269
choke :: BoundedCReal -> CReal choke (CReal x, (Interval (lb,ub))) = CReal f where f eps | y < lb = lb | ub < y = ub | otherwise = y where y = x eps {- produces a regular function whose resulting approximations are small in memory size -}
269
choke (CReal x, (Interval (lb,ub))) = CReal f where f eps | y < lb = lb | ub < y = ub | otherwise = y where y = x eps {- produces a regular function whose resulting approximations are small in memory size -}
238
false
true
0
9
81
96
47
49
null
null
rbonifacio/hephaestus-pl
src/meta-hephaestus/HplAssets/Hephaestus.hs
lgpl-3.0
addCaseList :: String -> String -> [ParserTransf] -> HsModule -> HsModule addCaseList dataName typeTransf [(stTran, dtTran, peTran, pDtTran, condSuc)] = addCase3 dataName typeTransf stTran dtTran peTran pDtTran condSuc
221
addCaseList :: String -> String -> [ParserTransf] -> HsModule -> HsModule addCaseList dataName typeTransf [(stTran, dtTran, peTran, pDtTran, condSuc)] = addCase3 dataName typeTransf stTran dtTran peTran pDtTran condSuc
221
addCaseList dataName typeTransf [(stTran, dtTran, peTran, pDtTran, condSuc)] = addCase3 dataName typeTransf stTran dtTran peTran pDtTran condSuc
147
false
true
0
12
30
75
39
36
null
null
bitemyapp/serials
server/Serials/Scan.hs
mit
scanShowSource :: Source -> String scanShowSource s = show (Source.id s) <> " " <> show (Source.status s) <> " " <> show (Source.name s)
136
scanShowSource :: Source -> String scanShowSource s = show (Source.id s) <> " " <> show (Source.status s) <> " " <> show (Source.name s)
136
scanShowSource s = show (Source.id s) <> " " <> show (Source.status s) <> " " <> show (Source.name s)
101
false
true
0
12
24
67
32
35
null
null
olsner/ghc
compiler/simplCore/CSE.hs
bsd-3-clause
cseBind :: CSEnv -> CoreBind -> (CSEnv, CoreBind) cseBind env (NonRec b e) = (env2, NonRec b2 e2) where e1 = tryForCSE env e (env1, b1) = addBinder env b (env2, (b2, e2)) = addBinding env1 b b1 e1
232
cseBind :: CSEnv -> CoreBind -> (CSEnv, CoreBind) cseBind env (NonRec b e) = (env2, NonRec b2 e2) where e1 = tryForCSE env e (env1, b1) = addBinder env b (env2, (b2, e2)) = addBinding env1 b b1 e1
232
cseBind env (NonRec b e) = (env2, NonRec b2 e2) where e1 = tryForCSE env e (env1, b1) = addBinder env b (env2, (b2, e2)) = addBinding env1 b b1 e1
182
false
true
0
7
74
106
56
50
null
null
kairne/repa-lts
Data/Rope/Seq.hs
bsd-3-clause
last (Seq_Double v) = G.last v
30
last (Seq_Double v) = G.last v
30
last (Seq_Double v) = G.last v
30
false
false
0
6
5
21
9
12
null
null
jthornber/language-c-ejt
src/Language/C/Data/Ident.hs
bsd-3-clause
-- | string of an identifier identToString :: Ident -> String identToString (Ident s _ _) = s
108
identToString :: Ident -> String identToString (Ident s _ _) = s
79
identToString (Ident s _ _) = s
32
true
true
0
7
32
29
15
14
null
null
ke00n/alabno
backend/compile-checker/testFiles/HaskellIncorrect/testHaskell0.hs
mit
sumDigits :: Int -> Int sumDigits n | n<10 = n | otherwise = sumdig n 0 where sumdig :: Int->Int->Int sumdig n sum | n < 10 = sum + n | otherwise = sumdig (n `div` 10) (sum + (n `mod` 10))
224
sumDigits :: Int -> Int sumDigits n | n<10 = n | otherwise = sumdig n 0 where sumdig :: Int->Int->Int sumdig n sum | n < 10 = sum + n | otherwise = sumdig (n `div` 10) (sum + (n `mod` 10))
224
sumDigits n | n<10 = n | otherwise = sumdig n 0 where sumdig :: Int->Int->Int sumdig n sum | n < 10 = sum + n | otherwise = sumdig (n `div` 10) (sum + (n `mod` 10))
200
false
true
4
10
79
119
60
59
null
null
bermanjosh/bloodhound
tests/V5/tests.hs
bsd-3-clause
searchExpectNoResults :: Search -> BH IO () searchExpectNoResults search = do result <- searchTweets search let emptyHits = fmap (hits . searchHits) result liftIO $ emptyHits `shouldBe` Right []
204
searchExpectNoResults :: Search -> BH IO () searchExpectNoResults search = do result <- searchTweets search let emptyHits = fmap (hits . searchHits) result liftIO $ emptyHits `shouldBe` Right []
204
searchExpectNoResults search = do result <- searchTweets search let emptyHits = fmap (hits . searchHits) result liftIO $ emptyHits `shouldBe` Right []
160
false
true
0
12
38
74
35
39
null
null
jmitchell/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
mapPTermFC f g (PAlternative ns ty ts) = PAlternative ns ty (map (mapPTermFC f g) ts)
92
mapPTermFC f g (PAlternative ns ty ts) = PAlternative ns ty (map (mapPTermFC f g) ts)
92
mapPTermFC f g (PAlternative ns ty ts) = PAlternative ns ty (map (mapPTermFC f g) ts)
92
false
false
0
9
22
46
22
24
null
null
lonsbio/biotool
haskell/src/Main.hs
mit
prettyOutput label (Just stats@Stats {..}) = intercalate "\t" (label : numbers) where -- If we cannot compute an average, show a dash. averageStr = maybe "-" show (average stats) numbers = [ show numSequences, show numBases, show minSequenceLength , averageStr, show maxSequenceLength ] -- |...
439
prettyOutput label (Just stats@Stats {..}) = intercalate "\t" (label : numbers) where -- If we cannot compute an average, show a dash. averageStr = maybe "-" show (average stats) numbers = [ show numSequences, show numBases, show minSequenceLength , averageStr, show maxSequenceLength ] -- |...
439
prettyOutput label (Just stats@Stats {..}) = intercalate "\t" (label : numbers) where -- If we cannot compute an average, show a dash. averageStr = maybe "-" show (average stats) numbers = [ show numSequences, show numBases, show minSequenceLength , averageStr, show maxSequenceLength ] -- |...
439
false
false
0
10
94
95
50
45
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/enumFromThen_2.hs
mit
absReal1 x MyFalse = absReal0 x otherwise
41
absReal1 x MyFalse = absReal0 x otherwise
41
absReal1 x MyFalse = absReal0 x otherwise
41
false
false
0
5
6
16
7
9
null
null
bergmark/hlint
data/Default.hs
bsd-3-clause
warn "Use infix" = intersect x y ==> x `intersect` y where _ = not (isInfixApp original) && not (isParen result) -- MATHS
122
warn "Use infix" = intersect x y ==> x `intersect` y where _ = not (isInfixApp original) && not (isParen result) -- MATHS
122
warn "Use infix" = intersect x y ==> x `intersect` y where _ = not (isInfixApp original) && not (isParen result) -- MATHS
122
false
false
0
10
23
55
27
28
null
null
aparent/jcc
src/CircuitDiagram.hs
gpl-3.0
drawCnot :: Double -> [Double] -> Diagram B drawCnot t cs = circle targetRad # lwL lWidth # translateY t <> controls <> line where line = drawLine 0 (top - bottom) # translateY bottom where top | maxY == t = maxY + targetRad | otherwise = maxY ...
534
drawCnot :: Double -> [Double] -> Diagram B drawCnot t cs = circle targetRad # lwL lWidth # translateY t <> controls <> line where line = drawLine 0 (top - bottom) # translateY bottom where top | maxY == t = maxY + targetRad | otherwise = maxY ...
534
drawCnot t cs = circle targetRad # lwL lWidth # translateY t <> controls <> line where line = drawLine 0 (top - bottom) # translateY bottom where top | maxY == t = maxY + targetRad | otherwise = maxY bottom | minY == t = minY - ta...
490
false
true
2
10
229
173
84
89
null
null
rleshchinskiy/vector
Data/Vector/Internal/Check.hs
bsd-3-clause
checkIndex file line kind loc i n x = check file line kind loc (checkIndex_msg i n) (i >= 0 && i<n) x
103
checkIndex file line kind loc i n x = check file line kind loc (checkIndex_msg i n) (i >= 0 && i<n) x
103
checkIndex file line kind loc i n x = check file line kind loc (checkIndex_msg i n) (i >= 0 && i<n) x
103
false
false
1
9
24
73
29
44
null
null
np/hlatex
Language/LaTeX/Builder/Math.hs
bsd-3-clause
_Theta :: MathItem _Theta = mathCmd "Theta"
43
_Theta :: MathItem _Theta = mathCmd "Theta"
43
_Theta = mathCmd "Theta"
24
false
true
0
5
6
14
7
7
null
null
awakenetworks/gRPC-haskell
core/src/Network/GRPC/LowLevel/CompletionQueue/Internal.hs
apache-2.0
-- | Shuts down the completion queue. See the comment above 'CompletionQueue' -- for the strategy we use to ensure that no one tries to use the -- queue after we begin the shutdown process. Errors with -- 'GRPCIOShutdownFailure' if the queue can't be shut down within 5 seconds. shutdownCompletionQueue :: CompletionQueu...
1,336
shutdownCompletionQueue :: CompletionQueue -> IO (Either GRPCIOError ()) shutdownCompletionQueue CompletionQueue{..} = do atomically $ writeTVar shuttingDown True atomically $ do readTVar currentPushers >>= check . (==0) readTVar currentPluckers >>= check . (==0) --drain the queue C.grpcCompletionQueue...
1,057
shutdownCompletionQueue CompletionQueue{..} = do atomically $ writeTVar shuttingDown True atomically $ do readTVar currentPushers >>= check . (==0) readTVar currentPluckers >>= check . (==0) --drain the queue C.grpcCompletionQueueShutdown unsafeCQ loopRes <- timeout (5*10^(6::Int)) drainLoop grpcDe...
984
true
true
0
14
305
325
151
174
null
null
jwiegley/ghc-release
libraries/Cabal/cabal/Distribution/Simple/Utils.hs
gpl-3.0
xargs :: Int -> ([String] -> IO ()) -> [String] -> [String] -> IO () xargs maxSize rawSystemFun fixedArgs bigArgs = let fixedArgSize = sum (map length fixedArgs) + length fixedArgs chunkSize = maxSize - fixedArgSize in mapM_ (rawSystemFun . (fixedArgs ++)) (chunks chunkSize bigArgs) where chunks len...
896
xargs :: Int -> ([String] -> IO ()) -> [String] -> [String] -> IO () xargs maxSize rawSystemFun fixedArgs bigArgs = let fixedArgSize = sum (map length fixedArgs) + length fixedArgs chunkSize = maxSize - fixedArgSize in mapM_ (rawSystemFun . (fixedArgs ++)) (chunks chunkSize bigArgs) where chunks len...
896
xargs maxSize rawSystemFun fixedArgs bigArgs = let fixedArgSize = sum (map length fixedArgs) + length fixedArgs chunkSize = maxSize - fixedArgSize in mapM_ (rawSystemFun . (fixedArgs ++)) (chunks chunkSize bigArgs) where chunks len = unfoldr $ \s -> if null s then Nothing els...
821
false
true
5
12
231
284
149
135
null
null
nickng/gong
TypeSize.hs
apache-2.0
sizeOfEqs :: Eqn -> Int sizeOfEqs (EqnSys bnd) = let (defs,main) = unsafeUnbind bnd deflist = unrec defs fun (n,(Embed (ChanAbst bnd))) = let (l,t) = unsafeUnbind bnd in isRecPar [n] (unrec defs) t in maximum (0:(L.map fun deflist))
287
sizeOfEqs :: Eqn -> Int sizeOfEqs (EqnSys bnd) = let (defs,main) = unsafeUnbind bnd deflist = unrec defs fun (n,(Embed (ChanAbst bnd))) = let (l,t) = unsafeUnbind bnd in isRecPar [n] (unrec defs) t in maximum (0:(L.map fun deflist))
287
sizeOfEqs (EqnSys bnd) = let (defs,main) = unsafeUnbind bnd deflist = unrec defs fun (n,(Embed (ChanAbst bnd))) = let (l,t) = unsafeUnbind bnd in isRecPar [n] (unrec defs) t in maximum (0:(L.map fun deflist))
263
false
true
0
14
93
142
69
73
null
null
yav/value-supply
Data/Supply.hs
mit
-- | A supply of values that are in the 'Enum' class. -- The initial value is @toEnum 0@, new values are generates with 'succ'. -- WARNING: See comment on 'newDupableSupply' newDupableEnumSupply :: (Enum a) => IO (Supply a) newDupableEnumSupply = newDupableSupply (toEnum 0) succ
280
newDupableEnumSupply :: (Enum a) => IO (Supply a) newDupableEnumSupply = newDupableSupply (toEnum 0) succ
106
newDupableEnumSupply = newDupableSupply (toEnum 0) succ
56
true
true
0
8
45
43
23
20
null
null
tjakway/ghcjvm
compiler/basicTypes/RdrName.hs
bsd-3-clause
plusGRE :: GlobalRdrElt -> GlobalRdrElt -> GlobalRdrElt -- Used when the gre_name fields match plusGRE g1 g2 = GRE { gre_name = gre_name g1 , gre_lcl = gre_lcl g1 || gre_lcl g2 , gre_imp = gre_imp g1 ++ gre_imp g2 , gre_par = gre_par g1 `plusParent` gre_par g2 }
293
plusGRE :: GlobalRdrElt -> GlobalRdrElt -> GlobalRdrElt plusGRE g1 g2 = GRE { gre_name = gre_name g1 , gre_lcl = gre_lcl g1 || gre_lcl g2 , gre_imp = gre_imp g1 ++ gre_imp g2 , gre_par = gre_par g1 `plusParent` gre_par g2 }
254
plusGRE g1 g2 = GRE { gre_name = gre_name g1 , gre_lcl = gre_lcl g1 || gre_lcl g2 , gre_imp = gre_imp g1 ++ gre_imp g2 , gre_par = gre_par g1 `plusParent` gre_par g2 }
198
true
true
0
9
79
95
47
48
null
null
input-output-hk/pos-haskell-prototype
util/src/Pos/Util/CompileInfo.hs
mit
compileInfo :: HasCompileInfo => CompileTimeInfo compileInfo = given
68
compileInfo :: HasCompileInfo => CompileTimeInfo compileInfo = given
68
compileInfo = given
19
false
true
0
7
7
23
9
14
null
null
chpatrick/hmidi
examples/SMF.hs
bsd-3-clause
onstbyte n = do b <- byte when (b /= n) $ unexpected $ "expected " ++ show b
82
constbyte n = do b <- byte when (b /= n) $ unexpected $ "expected " ++ show b
82
constbyte n = do b <- byte when (b /= n) $ unexpected $ "expected " ++ show b
82
false
false
1
12
24
47
20
27
null
null
robeverest/accelerate
Data/Array/Accelerate/Analysis/Match.hs
bsd-3-clause
hashPrimFun (PrimBAnd _) = hash "PrimBAnd"
57
hashPrimFun (PrimBAnd _) = hash "PrimBAnd"
57
hashPrimFun (PrimBAnd _) = hash "PrimBAnd"
57
false
false
0
6
20
19
8
11
null
null
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/AttachVpnGateway.hs
mpl-2.0
-- | Checks whether you have the required permissions for the action, without -- actually making the request, and provides an error response. If you have the -- required permissions, the error response is 'DryRunOperation'. Otherwise, it is 'UnauthorizedOperation'. avgDryRun :: Lens' AttachVpnGateway (Maybe Bool) avgDr...
373
avgDryRun :: Lens' AttachVpnGateway (Maybe Bool) avgDryRun = lens _avgDryRun (\s a -> s { _avgDryRun = a })
107
avgDryRun = lens _avgDryRun (\s a -> s { _avgDryRun = a })
58
true
true
1
9
57
54
27
27
null
null
lambda-llama/sized
src/Data/Sized/ByteString.hs
mit
unsafeFromPtr :: forall a b. KnownNat a => Ptr b -> IO (SizedByteString a) unsafeFromPtr p = do let size = rep (Proxy :: Proxy a) unsafeCreate $ \p' -> memcpy p' (castPtr p) $ fromIntegral size
202
unsafeFromPtr :: forall a b. KnownNat a => Ptr b -> IO (SizedByteString a) unsafeFromPtr p = do let size = rep (Proxy :: Proxy a) unsafeCreate $ \p' -> memcpy p' (castPtr p) $ fromIntegral size
202
unsafeFromPtr p = do let size = rep (Proxy :: Proxy a) unsafeCreate $ \p' -> memcpy p' (castPtr p) $ fromIntegral size
127
false
true
0
12
45
98
46
52
null
null
coinapi/coinapi-sdk
data-api/haskell-rest/CoinApi/Monadic.hs
mit
quotes_latest_data_s :: MonadIO m => String -> CoinApi m (Either String [Quote]) quotes_latest_data_s symbol_id = get >>= (\key -> CA.quotes_latest_data_s key symbol_id)
169
quotes_latest_data_s :: MonadIO m => String -> CoinApi m (Either String [Quote]) quotes_latest_data_s symbol_id = get >>= (\key -> CA.quotes_latest_data_s key symbol_id)
169
quotes_latest_data_s symbol_id = get >>= (\key -> CA.quotes_latest_data_s key symbol_id)
88
false
true
2
11
21
67
32
35
null
null
gabluc/CIS194-Solutions
src/Homework5/StackVM.hs
bsd-3-clause
-- Execute a program against a given stack. execute :: Stack -> Program -> Either String StackVal execute [] [] = Right Void
154
execute :: Stack -> Program -> Either String StackVal execute [] [] = Right Void
110
execute [] [] = Right Void
56
true
true
0
7
52
37
18
19
null
null
beni55/blank-canvas
examples/tictactoe/Main.hs
bsd-3-clause
loop :: Context -> Map (Int,Int) XO -> XO -> IO () loop context board turn = do -- print board -- print turn (width,height,sz) <- send context $ do (width,height) <- size clearRect (0,0,width,height) beginPath() let sz = min width he...
2,431
loop :: Context -> Map (Int,Int) XO -> XO -> IO () loop context board turn = do -- print board -- print turn (width,height,sz) <- send context $ do (width,height) <- size clearRect (0,0,width,height) beginPath() let sz = min width he...
2,431
loop context board turn = do -- print board -- print turn (width,height,sz) <- send context $ do (width,height) <- size clearRect (0,0,width,height) beginPath() let sz = min width height save() transla...
2,380
false
true
0
21
1,320
762
380
382
null
null
isido/functional-morphology-for-koine-greek
lib/Dictionary.hs
gpl-3.0
-- | Perform sharing on the strings in the Dictionary. shareDictionary :: Dictionary -> Dictionary shareDictionary (Dict xs) = Dict $ map shareEntry xs
151
shareDictionary :: Dictionary -> Dictionary shareDictionary (Dict xs) = Dict $ map shareEntry xs
96
shareDictionary (Dict xs) = Dict $ map shareEntry xs
52
true
true
0
6
23
38
18
20
null
null
d0kt0r0/Tidal
src/Sound/Tidal/ParseBP.hs
gpl-3.0
pVocable :: MyParser (TPat String) pVocable = wrapPos $ (TPat_Atom Nothing) <$> pString
87
pVocable :: MyParser (TPat String) pVocable = wrapPos $ (TPat_Atom Nothing) <$> pString
87
pVocable = wrapPos $ (TPat_Atom Nothing) <$> pString
52
false
true
4
7
12
41
17
24
null
null
kazu-yamamoto/wai
wai-http2-extra/Network/Wai/Middleware/Push/Referer/Types.hs
mit
-- | Learn if the file to be pushed is CSS (.css) or JavaScript (.js) file. defaultMakePushPromise :: MakePushPromise defaultMakePushPromise refPath path file = case getCT path of Nothing -> return Nothing Just ct -> do let pp = defaultPushPromise { promisedPath = path , pr...
519
defaultMakePushPromise :: MakePushPromise defaultMakePushPromise refPath path file = case getCT path of Nothing -> return Nothing Just ct -> do let pp = defaultPushPromise { promisedPath = path , promisedFile = file , promisedResponseHeaders = [("content-ty...
443
defaultMakePushPromise refPath path file = case getCT path of Nothing -> return Nothing Just ct -> do let pp = defaultPushPromise { promisedPath = path , promisedFile = file , promisedResponseHeaders = [("content-type", ct) ...
401
true
true
2
14
190
103
54
49
null
null
reidwilbur/aoc2016
src/Day2.hs
bsd-3-clause
parseInstrs :: [String] -> [[Instr]] parseInstrs = List.foldr (\s ils -> (parseLine s):ils) []
94
parseInstrs :: [String] -> [[Instr]] parseInstrs = List.foldr (\s ils -> (parseLine s):ils) []
94
parseInstrs = List.foldr (\s ils -> (parseLine s):ils) []
57
false
true
0
10
13
53
29
24
null
null
leshchevds/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
defaultDiskResync :: Bool defaultDiskResync = False
51
defaultDiskResync :: Bool defaultDiskResync = False
51
defaultDiskResync = False
25
false
true
0
4
5
11
6
5
null
null
jb55/elm-export-persistent
src/Elm/Export/Persist/Ent.hs
mit
addIdToVals :: String -> ElmValue -> ElmValue addIdToVals keyname ev = case ev of ef@(ElmField{}) -> Values ef (elmIdField (T.pack keyname)) Values v1 rest -> Values v1 (addIdToVals keyname rest) _ -> ev
223
addIdToVals :: String -> ElmValue -> ElmValue addIdToVals keyname ev = case ev of ef@(ElmField{}) -> Values ef (elmIdField (T.pack keyname)) Values v1 rest -> Values v1 (addIdToVals keyname rest) _ -> ev
223
addIdToVals keyname ev = case ev of ef@(ElmField{}) -> Values ef (elmIdField (T.pack keyname)) Values v1 rest -> Values v1 (addIdToVals keyname rest) _ -> ev
177
false
true
0
13
52
93
46
47
null
null
silkapp/fast-tagsoup
Text/HTML/TagSoup/Fast/Utf8Only.hs
bsd-3-clause
bst = T.decodeUtf8With (\ _ -> fmap B.w2c)
42
bst = T.decodeUtf8With (\ _ -> fmap B.w2c)
42
bst = T.decodeUtf8With (\ _ -> fmap B.w2c)
42
false
false
0
9
7
24
12
12
null
null
tavisrudd/ghcjs-base
JavaScript/TypedArray/DataView/ST.hs
mit
unsafeReadUint16LE idx dv = ST (I.js_m_unsafeGetUint16LE idx dv)
64
unsafeReadUint16LE idx dv = ST (I.js_m_unsafeGetUint16LE idx dv)
64
unsafeReadUint16LE idx dv = ST (I.js_m_unsafeGetUint16LE idx dv)
64
false
false
0
8
7
24
11
13
null
null
tonyfloatersu/solution-haskell-craft-of-FP
Chapter_13_my_note.hs
mit
filtRoman :: String -> String filtRoman = filter (`elem` "MCDXLVIO")
71
filtRoman :: String -> String filtRoman = filter (`elem` "MCDXLVIO")
71
filtRoman = filter (`elem` "MCDXLVIO")
41
false
true
0
6
12
24
14
10
null
null
tlaitinen/mailchimp
Web/Mailchimp.hs
bsd-3-clause
runMailchimpT :: (MonadIO m, MonadLogger m, MonadBaseControl IO m) => MailchimpConfig -> MailchimpT m a -> m a runMailchimpT config action = runReaderT action config
168
runMailchimpT :: (MonadIO m, MonadLogger m, MonadBaseControl IO m) => MailchimpConfig -> MailchimpT m a -> m a runMailchimpT config action = runReaderT action config
168
runMailchimpT config action = runReaderT action config
57
false
true
0
8
27
65
30
35
null
null
juanmab37/HOpenCV-0.5.0.1
src/HOpenCV/HCxCore.hs
gpl-2.0
seqToPListCV :: CvSeq a -> IO [ForeignPtr a] seqToPListCV cq = do r <- seqToPList cq return ([runErr (head r)])
119
seqToPListCV :: CvSeq a -> IO [ForeignPtr a] seqToPListCV cq = do r <- seqToPList cq return ([runErr (head r)])
119
seqToPListCV cq = do r <- seqToPList cq return ([runErr (head r)])
74
false
true
0
12
27
61
28
33
null
null
linzhp/Language-GLSL
src/Language/C/Syntax/Constants.hs
bsd-3-clause
-- | concatenate a list of C string literals concatCStrings :: [CString] -> CString concatCStrings cs = CString (concatMap getCString cs) (any isWideString cs)
159
concatCStrings :: [CString] -> CString concatCStrings cs = CString (concatMap getCString cs) (any isWideString cs)
114
concatCStrings cs = CString (concatMap getCString cs) (any isWideString cs)
75
true
true
0
7
23
43
22
21
null
null
Helkafen/haddock
haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
bsd-2-clause
lookupBySpan :: Span -> DetailsMap -> Maybe TokenDetails lookupBySpan tspan = listToMaybe . map snd . filter (matches tspan . fst)
130
lookupBySpan :: Span -> DetailsMap -> Maybe TokenDetails lookupBySpan tspan = listToMaybe . map snd . filter (matches tspan . fst)
130
lookupBySpan tspan = listToMaybe . map snd . filter (matches tspan . fst)
73
false
true
0
9
20
49
23
26
null
null
cosmo0920/Ahblog
Helper/ImageForm.hs
mit
uploadSubDirectory :: FilePath uploadSubDirectory = "files"
59
uploadSubDirectory :: FilePath uploadSubDirectory = "files"
59
uploadSubDirectory = "files"
28
false
true
0
6
5
18
7
11
null
null
kwrooijen/sdl-game
Main.hs
gpl-3.0
startState :: Gameconfig -> Gamestate -> IO () startState = evalStateT . runReaderT game
88
startState :: Gameconfig -> Gamestate -> IO () startState = evalStateT . runReaderT game
88
startState = evalStateT . runReaderT game
41
false
true
1
9
13
37
16
21
null
null
uuhan/Idris-dev
src/Idris/WhoCalls.hs
bsd-3-clause
namesCaseAlt (DefaultCase sc) = namesSC sc
42
namesCaseAlt (DefaultCase sc) = namesSC sc
42
namesCaseAlt (DefaultCase sc) = namesSC sc
42
false
false
0
7
5
18
8
10
null
null
Zigazou/HaMinitel
src/Minitel/Key.hs
gpl-3.0
toAlpha (AddGrave mn ) = Just $ chrm mn
53
toAlpha (AddGrave mn ) = Just $ chrm mn
53
toAlpha (AddGrave mn ) = Just $ chrm mn
53
false
false
0
7
22
22
10
12
null
null
portnov/yaledger
YaLedger/Output/ASCII.hs
bsd-3-clause
startchar BottomLine = '╘'
26
startchar BottomLine = '╘'
26
startchar BottomLine = '╘'
26
false
false
0
4
3
10
4
6
null
null
kim/amazonka
amazonka-swf/gen/Network/AWS/SWF/Types.hs
mpl-2.0
-- | The date and time when the event occurred. heEventTimestamp :: Lens' HistoryEvent UTCTime heEventTimestamp = lens _heEventTimestamp (\s a -> s { _heEventTimestamp = a }) . _Time
182
heEventTimestamp :: Lens' HistoryEvent UTCTime heEventTimestamp = lens _heEventTimestamp (\s a -> s { _heEventTimestamp = a }) . _Time
134
heEventTimestamp = lens _heEventTimestamp (\s a -> s { _heEventTimestamp = a }) . _Time
87
true
true
0
10
29
44
24
20
null
null