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
sopvop/bytestring-flatmap
src/Data/ByteString/FlatSet.hs
bsd-3-clause
-- | /O(log n)/ Find first largest element smaller than this one. lookupGT :: ByteString -> FlatSet -> Maybe ByteString lookupGT bs fs = valueAt (either snd succ (lookupGeneric bs fs)) fs
187
lookupGT :: ByteString -> FlatSet -> Maybe ByteString lookupGT bs fs = valueAt (either snd succ (lookupGeneric bs fs)) fs
121
lookupGT bs fs = valueAt (either snd succ (lookupGeneric bs fs)) fs
67
true
true
0
9
31
55
26
29
null
null
nevrenato/HetsAlloy
CASL/Morphism.hs
gpl-2.0
typedSymbKindToRaw :: Bool -> Sign f e -> SYMB_KIND -> Id -> TYPE -> Result RawSymbol typedSymbKindToRaw b sig k idt t = let pm = predMap sig om = opMap sig getSet = MapSet.lookup idt err = plain_error (AKindedSymb Implicit idt) (showDoc idt ":" ++ showDoc t "does not ...
2,933
typedSymbKindToRaw :: Bool -> Sign f e -> SYMB_KIND -> Id -> TYPE -> Result RawSymbol typedSymbKindToRaw b sig k idt t = let pm = predMap sig om = opMap sig getSet = MapSet.lookup idt err = plain_error (AKindedSymb Implicit idt) (showDoc idt ":" ++ showDoc t "does not ...
2,933
typedSymbKindToRaw b sig k idt t = let pm = predMap sig om = opMap sig getSet = MapSet.lookup idt err = plain_error (AKindedSymb Implicit idt) (showDoc idt ":" ++ showDoc t "does not have kind" ++ showDoc k "") (getRange idt) aSymb = ASymbol $ case t of O_typ...
2,845
false
true
0
23
1,190
842
390
452
null
null
swift-nav/plover
src/Language/Plover/Simplify.hs
mit
(.>) :: (a -> b) -> (b -> c) -> a -> c (.>) = flip (.)
54
(.>) :: (a -> b) -> (b -> c) -> a -> c (.>) = flip (.)
54
(.>) = flip (.)
15
false
true
0
9
16
53
28
25
null
null
ribag/ganeti-experiments
src/Ganeti/Constants.hs
gpl-2.0
rieVersion :: Int rieVersion = 0
32
rieVersion :: Int rieVersion = 0
32
rieVersion = 0
14
false
true
0
4
5
11
6
5
null
null
ezyang/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
printIdKey = mkPreludeMiscIdUnique 37
56
printIdKey = mkPreludeMiscIdUnique 37
56
printIdKey = mkPreludeMiscIdUnique 37
56
false
false
0
5
22
9
4
5
null
null
RossMeikleham/Potato-Tool
src/VMU.hs
gpl-2.0
insertFAT (x:y:xs) f = insertFAT (y:xs) $ insertValFAT x y f
60
insertFAT (x:y:xs) f = insertFAT (y:xs) $ insertValFAT x y f
60
insertFAT (x:y:xs) f = insertFAT (y:xs) $ insertValFAT x y f
60
false
false
0
8
10
43
21
22
null
null
runjak/carbon-adf
Carbon/Website/Composition.hs
gpl-3.0
compose :: Composition -> IO (TVar Text, INotify) compose c = do putStrLn "Compositing files…" t <- compose' c t' <- STM.atomically $ STM.newTVar t putStrLn "Setting up INotify…" n <- INotify.initINotify mapM_ (watch n t') $ paths c putStrLn "Composition complete." return (t', n) where paths :: Co...
922
compose :: Composition -> IO (TVar Text, INotify) compose c = do putStrLn "Compositing files…" t <- compose' c t' <- STM.atomically $ STM.newTVar t putStrLn "Setting up INotify…" n <- INotify.initINotify mapM_ (watch n t') $ paths c putStrLn "Composition complete." return (t', n) where paths :: Co...
922
compose c = do putStrLn "Compositing files…" t <- compose' c t' <- STM.atomically $ STM.newTVar t putStrLn "Setting up INotify…" n <- INotify.initINotify mapM_ (watch n t') $ paths c putStrLn "Composition complete." return (t', n) where paths :: Composition -> [FilePath] paths c | null (...
872
false
true
0
13
261
339
151
188
null
null
bitc/omegagb
src/Cpu.hs
gpl-2.0
mctiCB 0x12 = (RL D, 8)
23
mctiCB 0x12 = (RL D, 8)
23
mctiCB 0x12 = (RL D, 8)
23
false
false
1
6
5
21
9
12
null
null
Crazycolorz5/AlgebraicPrelude
Polynomials.hs
mit
degree :: (Field f) => Polynomial f -> Maybe Int degree (Polynomial { toList = [] }) = Nothing
95
degree :: (Field f) => Polynomial f -> Maybe Int degree (Polynomial { toList = [] }) = Nothing
94
degree (Polynomial { toList = [] }) = Nothing
45
false
true
0
10
19
47
24
23
null
null
chiyama/lucille
rnd/HaskellRSLCompiler/RSL/CodeGenLLVM.hs
bsd-3-clause
cfloatToCDouble :: CFloat -> CDouble cfloatToCDouble f = realToFrac f
69
cfloatToCDouble :: CFloat -> CDouble cfloatToCDouble f = realToFrac f
69
cfloatToCDouble f = realToFrac f
32
false
true
0
7
9
26
11
15
null
null
micknelso/language-c
src/Language/CFamily/C/Analysis/AstAnalysis.hs
bsd-3-clause
tInit t i@(CInitList initList ni) = tInitList ni (canonicalType t) initList >> return i
89
tInit t i@(CInitList initList ni) = tInitList ni (canonicalType t) initList >> return i
89
tInit t i@(CInitList initList ni) = tInitList ni (canonicalType t) initList >> return i
89
false
false
0
8
15
42
20
22
null
null
glguy/vty-hangman-helper
GameModel.hs
bsd-3-clause
currentChoices :: GameModel -> [(Char, Int)] currentChoices g = rankLetters (alphabet \\ lettersTried g) (currentWords g)
121
currentChoices :: GameModel -> [(Char, Int)] currentChoices g = rankLetters (alphabet \\ lettersTried g) (currentWords g)
121
currentChoices g = rankLetters (alphabet \\ lettersTried g) (currentWords g)
76
false
true
0
8
15
48
25
23
null
null
bartavelle/stateWriter
tests/rwscompare.hs
bsd-3-clause
evaluateIM ReplicateThrice x = [x,x,x]
38
evaluateIM ReplicateThrice x = [x,x,x]
38
evaluateIM ReplicateThrice x = [x,x,x]
38
false
false
0
5
4
20
11
9
null
null
anttisalonen/freekick
haskell/libfreekick/Freekick/Libsoccer/Database.hs
agpl-3.0
parsePromotion :: Node -> (Int, (String, String)) parsePromotion n = (num, st) where num = read (fromMaybe "0" (lookup "num" (eAttrs n))) st = parseStageTarget n
182
parsePromotion :: Node -> (Int, (String, String)) parsePromotion n = (num, st) where num = read (fromMaybe "0" (lookup "num" (eAttrs n))) st = parseStageTarget n
182
parsePromotion n = (num, st) where num = read (fromMaybe "0" (lookup "num" (eAttrs n))) st = parseStageTarget n
132
false
true
2
10
46
89
42
47
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/Draw.hs
lgpl-2.1
dcSetDrawState :: DC a -> DrawState -> IO () dcSetDrawState dc (DrawState pen brush font textc backc) = do dcSetPen dc pen dcSetBrush dc brush dcSetFont dc font dcSetTextBackground dc backc dcSetTextForeground dc textc -- | Release the resources associated with a drawing state.
310
dcSetDrawState :: DC a -> DrawState -> IO () dcSetDrawState dc (DrawState pen brush font textc backc) = do dcSetPen dc pen dcSetBrush dc brush dcSetFont dc font dcSetTextBackground dc backc dcSetTextForeground dc textc -- | Release the resources associated with a drawing state.
310
dcSetDrawState dc (DrawState pen brush font textc backc) = do dcSetPen dc pen dcSetBrush dc brush dcSetFont dc font dcSetTextBackground dc backc dcSetTextForeground dc textc -- | Release the resources associated with a drawing state.
264
false
true
0
8
75
87
38
49
null
null
diagrams/diagrams-contrib
src/Diagrams/Color/XKCD.hs
bsd-3-clause
cream = fromJust $ readHexColor "#ffffc2"
57
cream = fromJust $ readHexColor "#ffffc2"
57
cream = fromJust $ readHexColor "#ffffc2"
57
false
false
0
6
21
13
6
7
null
null
rueshyna/gogol
gogol-logging/gen/Network/Google/Logging/Types/Product.hs
mpl-2.0
-- | Properties of the object. lejpAddtional :: Lens' LogEntryJSONPayload (HashMap Text JSONValue) lejpAddtional = lens _lejpAddtional (\ s a -> s{_lejpAddtional = a}) . _Coerce
191
lejpAddtional :: Lens' LogEntryJSONPayload (HashMap Text JSONValue) lejpAddtional = lens _lejpAddtional (\ s a -> s{_lejpAddtional = a}) . _Coerce
160
lejpAddtional = lens _lejpAddtional (\ s a -> s{_lejpAddtional = a}) . _Coerce
92
true
true
0
10
39
54
28
26
null
null
ublubu/euler
Euler9/Euler9.hs
mit
mPairsToTriplet :: Reader Integer ([(Integer, Integer)] -> Maybe (Integer, Integer, Integer)) mPairsToTriplet = do t <- ask return $ pairsToTriplet t
153
mPairsToTriplet :: Reader Integer ([(Integer, Integer)] -> Maybe (Integer, Integer, Integer)) mPairsToTriplet = do t <- ask return $ pairsToTriplet t
153
mPairsToTriplet = do t <- ask return $ pairsToTriplet t
59
false
true
0
10
24
67
33
34
null
null
ancientlanguage/haskell-analysis
grammar/src/Grammar/Common/Decompose.hs
mit
decomposeChar '\x1E33' = "\x006B\x0323"
39
decomposeChar '\x1E33' = "\x006B\x0323"
39
decomposeChar '\x1E33' = "\x006B\x0323"
39
false
false
0
5
3
9
4
5
null
null
jparyani/capnproto-boostpython
compiler/src/Parser.hs
bsd-2-clause
tokenErrorString EqualsSign = "\"=\""
37
tokenErrorString EqualsSign = "\"=\""
37
tokenErrorString EqualsSign = "\"=\""
37
false
false
0
5
3
9
4
5
null
null
m-alvarez/jhc
src/Grin/Show.hs
mit
prettyExp vl (BaseOp NewRegister xs) = vl <> keyword "register" <+> tupled (map prettyVal xs)
93
prettyExp vl (BaseOp NewRegister xs) = vl <> keyword "register" <+> tupled (map prettyVal xs)
93
prettyExp vl (BaseOp NewRegister xs) = vl <> keyword "register" <+> tupled (map prettyVal xs)
93
false
false
0
8
14
41
19
22
null
null
johanneshilden/trombone
Monitor/Warp.hs
bsd-3-clause
modify tvar = atomically . modifyTVar' tvar
43
modify tvar = atomically . modifyTVar' tvar
43
modify tvar = atomically . modifyTVar' tvar
43
false
false
0
6
6
16
7
9
null
null
abuiles/turbinado-blog
Turbinado/Environment/CodeStore.hs
bsd-3-clause
loadCode :: (HasEnvironment m) => CodeType -> CodeMap -> CodeLocation -> m CodeMap loadCode ct cmap cl = do debugM $ "\tCodeStore : loadCode : loading " ++ (fst cl) ++ " - " ++ (snd cl) mergeCode ct cmap cl -- | Merges the application code with the appropriate Stub, places the merged -- file into @tm...
355
loadCode :: (HasEnvironment m) => CodeType -> CodeMap -> CodeLocation -> m CodeMap loadCode ct cmap cl = do debugM $ "\tCodeStore : loadCode : loading " ++ (fst cl) ++ " - " ++ (snd cl) mergeCode ct cmap cl -- | Merges the application code with the appropriate Stub, places the merged -- file into @tm...
355
loadCode ct cmap cl = do debugM $ "\tCodeStore : loadCode : loading " ++ (fst cl) ++ " - " ++ (snd cl) mergeCode ct cmap cl -- | Merges the application code with the appropriate Stub, places the merged -- file into @tmp/compiled@, then calls 'makeCode'.
272
false
true
0
11
79
85
42
43
null
null
alphaHeavy/htcondor
src/Network/HTCondor/Submit/Language.hs
bsd-3-clause
log :: Monad m => FilePath -> CondorT m () log logPath = modifyHead (Map.insert "log" [Text.pack logPath])
106
log :: Monad m => FilePath -> CondorT m () log logPath = modifyHead (Map.insert "log" [Text.pack logPath])
106
log logPath = modifyHead (Map.insert "log" [Text.pack logPath])
63
false
true
0
10
17
58
26
32
null
null
mpickering/hackage-server
Distribution/Server/Features/Tags/State.hs
bsd-3-clause
packagesForTag :: Tag -> Query PackageTags (Set PackageName) packagesForTag tag = asks $ Map.findWithDefault Set.empty tag . tagPackages
136
packagesForTag :: Tag -> Query PackageTags (Set PackageName) packagesForTag tag = asks $ Map.findWithDefault Set.empty tag . tagPackages
136
packagesForTag tag = asks $ Map.findWithDefault Set.empty tag . tagPackages
75
false
true
0
8
17
46
22
24
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Layout/Groups/Helpers.hs
bsd-2-clause
-- | Swap the focused window with the next one swapDown :: X () swapDown = alt G.swapDown W.swapDown
100
swapDown :: X () swapDown = alt G.swapDown W.swapDown
53
swapDown = alt G.swapDown W.swapDown
36
true
true
0
6
18
26
13
13
null
null
srijs/haskell-json-togo
src/Data/JSON/ToGo.hs
mit
alg_ (AnyM f) = void $ pvalue >>= lift . f
42
alg_ (AnyM f) = void $ pvalue >>= lift . f
42
alg_ (AnyM f) = void $ pvalue >>= lift . f
42
false
false
0
7
10
27
13
14
null
null
eriksvedang/Carp
src/Obj.hs
mpl-2.0
getSimpleNameWithArgs xobj@(XObj (Lst (XObj Dynamic _ _ : _ : (XObj (Arr args) _ _) : _)) _ _) = Just $ "(" ++ getSimpleName xobj ++ (if length args > 0 then " " else "") ++ unwords (map getSimpleName args) ++ ")"
223
getSimpleNameWithArgs xobj@(XObj (Lst (XObj Dynamic _ _ : _ : (XObj (Arr args) _ _) : _)) _ _) = Just $ "(" ++ getSimpleName xobj ++ (if length args > 0 then " " else "") ++ unwords (map getSimpleName args) ++ ")"
223
getSimpleNameWithArgs xobj@(XObj (Lst (XObj Dynamic _ _ : _ : (XObj (Arr args) _ _) : _)) _ _) = Just $ "(" ++ getSimpleName xobj ++ (if length args > 0 then " " else "") ++ unwords (map getSimpleName args) ++ ")"
223
false
false
5
17
53
126
59
67
null
null
castaway/pandoc
src/Text/Pandoc/Pretty.hs
gpl-2.0
-- | Same as 'cat', but putting breakable spaces between the -- 'Doc's. hsep :: [Doc] -> Doc hsep = foldr (<+>) empty
117
hsep :: [Doc] -> Doc hsep = foldr (<+>) empty
45
hsep = foldr (<+>) empty
24
true
true
0
6
22
27
16
11
null
null
geocurnoff/nikki
src/Sorts/DeathStones.hs
lgpl-3.0
maybeMerge a b = Nothing
24
maybeMerge a b = Nothing
24
maybeMerge a b = Nothing
24
false
false
1
5
4
16
5
11
null
null
acowley/ghc
compiler/rename/RnSplice.hs
bsd-3-clause
rnSpliceDecl :: SpliceDecl RdrName -> RnM (SpliceDecl Name, FreeVars) rnSpliceDecl e = failTH e "Template Haskell declaration splice"
133
rnSpliceDecl :: SpliceDecl RdrName -> RnM (SpliceDecl Name, FreeVars) rnSpliceDecl e = failTH e "Template Haskell declaration splice"
133
rnSpliceDecl e = failTH e "Template Haskell declaration splice"
63
false
true
0
8
17
38
18
20
null
null
4ZP6Capstone2015/ampersand
src/Database/Design/Ampersand/Core/Poset.hs
gpl-3.0
sortWith :: (Show b,Poset b) => (b -> [[b]], [b]) -> (a -> b) -> [a] -> [a] sortWith _ _ [] = []
99
sortWith :: (Show b,Poset b) => (b -> [[b]], [b]) -> (a -> b) -> [a] -> [a] sortWith _ _ [] = []
99
sortWith _ _ [] = []
23
false
true
0
11
26
87
46
41
null
null
akegalj/snowdrift
app/SnowdriftEmailDaemon.hs
agpl-3.0
withDelay :: MonadIO m => Delay -> m a -> m () withDelay delay action = action >> liftIO (threadDelay $ 1000000 * delay)
120
withDelay :: MonadIO m => Delay -> m a -> m () withDelay delay action = action >> liftIO (threadDelay $ 1000000 * delay)
120
withDelay delay action = action >> liftIO (threadDelay $ 1000000 * delay)
73
false
true
0
9
23
57
27
30
null
null
linusyang/barrelfish
hake/RuleDefs.hs
mit
cToAssembler :: Options -> String -> String -> String -> String -> [ RuleToken ] cToAssembler opts phase src afile objdepfile | optArch opts == "x86_64" = X86_64.cToAssembler opts phase src afile objdepfile | optArch opts == "k1om" = K1om.cToAssembler opts phase src afile objdepfile | optArch opts == "x86...
961
cToAssembler :: Options -> String -> String -> String -> String -> [ RuleToken ] cToAssembler opts phase src afile objdepfile | optArch opts == "x86_64" = X86_64.cToAssembler opts phase src afile objdepfile | optArch opts == "k1om" = K1om.cToAssembler opts phase src afile objdepfile | optArch opts == "x86...
961
cToAssembler opts phase src afile objdepfile | optArch opts == "x86_64" = X86_64.cToAssembler opts phase src afile objdepfile | optArch opts == "k1om" = K1om.cToAssembler opts phase src afile objdepfile | optArch opts == "x86_32" = X86_32.cToAssembler opts phase src afile objdepfile | optArch opts ==...
880
false
true
0
11
191
331
152
179
null
null
CanvasHS/Canvas.hs
demo/chart/Chart.hs
lgpl-2.1
uiBlue = (0,122,255,1.0)
24
uiBlue = (0,122,255,1.0)
24
uiBlue = (0,122,255,1.0)
24
false
false
0
5
2
18
11
7
null
null
sumeetchhetri/FrameworkBenchmarks
frameworks/Haskell/warp/warp-shared/src/Main.hs
bsd-3-clause
main :: IO () main = do testName <- lookupEnv "TFB_TEST_NAME" putStrLn $ "Test is: " ++ show testName args <- getArgs dbHost <- case args of [x] -> pure x _ -> pure "0.0.0.0" numCaps <- GHC.Conc.getNumCapabilities Lib.main $ Lib.Config { Lib.configHost = dbHost, Lib.configName = "hello...
479
main :: IO () main = do testName <- lookupEnv "TFB_TEST_NAME" putStrLn $ "Test is: " ++ show testName args <- getArgs dbHost <- case args of [x] -> pure x _ -> pure "0.0.0.0" numCaps <- GHC.Conc.getNumCapabilities Lib.main $ Lib.Config { Lib.configHost = dbHost, Lib.configName = "hello...
479
main = do testName <- lookupEnv "TFB_TEST_NAME" putStrLn $ "Test is: " ++ show testName args <- getArgs dbHost <- case args of [x] -> pure x _ -> pure "0.0.0.0" numCaps <- GHC.Conc.getNumCapabilities Lib.main $ Lib.Config { Lib.configHost = dbHost, Lib.configName = "hello_world", L...
465
false
true
0
11
117
150
77
73
null
null
keithodulaigh/Hets
LF/Analysis.hs
gpl-2.0
getSens :: Sign -> [(NAME, Sentence)] getSens sig = map (\ (Def s _ v) -> case v of Nothing -> error $ badValError $ symName s Just v' -> (symName s, v') ) $ getLocalDefs sig
213
getSens :: Sign -> [(NAME, Sentence)] getSens sig = map (\ (Def s _ v) -> case v of Nothing -> error $ badValError $ symName s Just v' -> (symName s, v') ) $ getLocalDefs sig
213
getSens sig = map (\ (Def s _ v) -> case v of Nothing -> error $ badValError $ symName s Just v' -> (symName s, v') ) $ getLocalDefs sig
175
false
true
0
14
75
95
48
47
null
null
eklinkhammer/haskell-vision
SegmentTest.hs
mit
perpPoint_tests = test [ "origin" ~: (Point 0 0) ~=? (pointPerp $ Point 0 0) , "0" ~: (Point 0 1) ~=? (pointPerp $ Point 1 0) , "Pi/4" ~: (Point (-1) 1) ~=? (pointPerp $ Point 1 1) , "Pi/2" ~: (Point (-1) 0) ~=? (poi...
783
perpPoint_tests = test [ "origin" ~: (Point 0 0) ~=? (pointPerp $ Point 0 0) , "0" ~: (Point 0 1) ~=? (pointPerp $ Point 1 0) , "Pi/4" ~: (Point (-1) 1) ~=? (pointPerp $ Point 1 1) , "Pi/2" ~: (Point (-1) 0) ~=? (poi...
783
perpPoint_tests = test [ "origin" ~: (Point 0 0) ~=? (pointPerp $ Point 0 0) , "0" ~: (Point 0 1) ~=? (pointPerp $ Point 1 0) , "Pi/4" ~: (Point (-1) 1) ~=? (pointPerp $ Point 1 1) , "Pi/2" ~: (Point (-1) 0) ~=? (poi...
783
false
false
0
12
365
348
184
164
null
null
kebertx/GoFu
src/Go/Move.hs
bsd-3-clause
fromValue :: Value -> [Pos] -- Special case: "tt" means the player passed, so no move is played fromValue (Value "tt") = []
123
fromValue :: Value -> [Pos] fromValue (Value "tt") = []
55
fromValue (Value "tt") = []
27
true
true
0
7
22
30
16
14
null
null
chreekat/snowdrift
Handler/Wiki/Comment.hs
agpl-3.0
getEditWikiCommentR :: Text -> Language -> Text -> CommentId -> Handler Html getEditWikiCommentR project_handle language target comment_id = do (widget, _) <- makeWikiPageCommentActionWidget makeEditCommentWidget project_handle language target comm...
444
getEditWikiCommentR :: Text -> Language -> Text -> CommentId -> Handler Html getEditWikiCommentR project_handle language target comment_id = do (widget, _) <- makeWikiPageCommentActionWidget makeEditCommentWidget project_handle language target comm...
444
getEditWikiCommentR project_handle language target comment_id = do (widget, _) <- makeWikiPageCommentActionWidget makeEditCommentWidget project_handle language target comment_id def getMaxDepth defaultLayout (wikiDiscus...
367
false
true
0
10
136
90
42
48
null
null
nickbart1980/pandoc
src/Text/Pandoc/Writers/ConTeXt.hs
gpl-2.0
-- blankline because \stoptyping can't have anything after it, inc. '}' blockToConTeXt (RawBlock "context" str) = return $ text str <> blankline
144
blockToConTeXt (RawBlock "context" str) = return $ text str <> blankline
72
blockToConTeXt (RawBlock "context" str) = return $ text str <> blankline
72
true
false
0
7
21
30
14
16
null
null
nushio3/formura
src/Formura/Annotation.hs
mit
-- | Extract the first annotation of the given type, -- if it exists. viewMaybe :: (Typeable a, Annotated b) => b -> Maybe a viewMaybe = toMaybe . (^. annotation)
162
viewMaybe :: (Typeable a, Annotated b) => b -> Maybe a viewMaybe = toMaybe . (^. annotation)
92
viewMaybe = toMaybe . (^. annotation)
37
true
true
0
7
30
43
24
19
null
null
Noeda/adeonbot
bot/src/Bot/NetHack/SelectItem.hs
mit
looksLikeItemLine :: T.Text -> Bool looksLikeItemLine txt = T.length txt >= 5 && T.index txt 1 == ' ' && T.index txt 2 == '-' && T.index txt 3 == ' '
157
looksLikeItemLine :: T.Text -> Bool looksLikeItemLine txt = T.length txt >= 5 && T.index txt 1 == ' ' && T.index txt 2 == '-' && T.index txt 3 == ' '
157
looksLikeItemLine txt = T.length txt >= 5 && T.index txt 1 == ' ' && T.index txt 2 == '-' && T.index txt 3 == ' '
121
false
true
6
6
39
79
36
43
null
null
spechub/Hets
Persistence/Range.hs
gpl-2.0
createRange :: MonadIO m => Range -> DBMonad m (Maybe FileRangeId) createRange range = let rangeL = rangeToList range in if null rangeL then return Nothing else let startPos = head rangeL endPosM = if null $ tail rangeL then Nothing ...
710
createRange :: MonadIO m => Range -> DBMonad m (Maybe FileRangeId) createRange range = let rangeL = rangeToList range in if null rangeL then return Nothing else let startPos = head rangeL endPosM = if null $ tail rangeL then Nothing ...
710
createRange range = let rangeL = rangeToList range in if null rangeL then return Nothing else let startPos = head rangeL endPosM = if null $ tail rangeL then Nothing else Just $ head $ tail rangeL in fmap Just $ insert SchemaClass....
631
false
true
14
14
260
176
86
90
null
null
evgenim/tm
src/TM/Task.hs
gpl-3.0
filterByTag tagName = filter (\t -> tag t == tagName)
53
filterByTag tagName = filter (\t -> tag t == tagName)
53
filterByTag tagName = filter (\t -> tag t == tagName)
53
false
false
0
9
9
27
13
14
null
null
snoyberg/ghc
compiler/main/DriverPhases.hs
bsd-3-clause
eqPhase LlvmMangle LlvmMangle = True
37
eqPhase LlvmMangle LlvmMangle = True
37
eqPhase LlvmMangle LlvmMangle = True
37
false
false
0
5
5
11
5
6
null
null
olorin/amazonka
amazonka-cloudformation/gen/Network/AWS/CloudFormation/SetStackPolicy.hs
mpl-2.0
-- | Structure containing the stack policy body. For more information, go to -- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html Prevent Updates to Stack Resources> -- in the AWS CloudFormation User Guide. You can specify either the -- 'StackPolicyBody' or the 'StackPolicyURL'...
485
sspStackPolicyBody :: Lens' SetStackPolicy (Maybe Text) sspStackPolicyBody = lens _sspStackPolicyBody (\ s a -> s{_sspStackPolicyBody = a})
139
sspStackPolicyBody = lens _sspStackPolicyBody (\ s a -> s{_sspStackPolicyBody = a})
83
true
true
0
9
57
49
28
21
null
null
osa1/rho-torrent
test/Rho/MagnetSpec.hs
bsd-3-clause
spec :: Spec spec = do describe "parsing" $ do fromHUnitTest $ TestLabel "should parse (from file)" shouldParse describe "parsing-printing" $ do prop "forall m, parseMagnet . printMagnet m == m" $ \m -> assertEqual "" (Right m) (parseMagnet (printMagnet m))
276
spec :: Spec spec = do describe "parsing" $ do fromHUnitTest $ TestLabel "should parse (from file)" shouldParse describe "parsing-printing" $ do prop "forall m, parseMagnet . printMagnet m == m" $ \m -> assertEqual "" (Right m) (parseMagnet (printMagnet m))
276
spec = do describe "parsing" $ do fromHUnitTest $ TestLabel "should parse (from file)" shouldParse describe "parsing-printing" $ do prop "forall m, parseMagnet . printMagnet m == m" $ \m -> assertEqual "" (Right m) (parseMagnet (printMagnet m))
263
false
true
0
17
59
90
39
51
null
null
olsner/ghc
compiler/coreSyn/MkCore.hs
bsd-3-clause
-- | Like 'mkTupleSelector' but for tuples that are guaranteed -- never to be \"big\". -- -- > mkSmallTupleSelector [x] x v e = [| e |] -- > mkSmallTupleSelector [x,y,z] x v e = [| case e of v { (x,y,z) -> x } |] mkSmallTupleSelector, mkSmallTupleSelector1 :: [Id] -- The tuple args -> Id ...
587
mkSmallTupleSelector, mkSmallTupleSelector1 :: [Id] -- The tuple args -> Id -- The selected one -> Id -- A variable of the same type as the scrutinee -> CoreExpr -- Scrutinee -> CoreExpr mkSmallTupleSelector [var] should_be_the_same_var _ scr...
374
mkSmallTupleSelector [var] should_be_the_same_var _ scrut = ASSERT(var == should_be_the_same_var) scrut
109
true
true
0
8
171
65
39
26
null
null
haru2036/loc-man-server
test/TestImport.hs
bsd-3-clause
runDB :: SqlPersistM a -> YesodExample App a runDB query = do app <- getTestYesod liftIO $ runDBWithApp app query
121
runDB :: SqlPersistM a -> YesodExample App a runDB query = do app <- getTestYesod liftIO $ runDBWithApp app query
121
runDB query = do app <- getTestYesod liftIO $ runDBWithApp app query
76
false
true
0
8
27
45
20
25
null
null
bergmark/hlint
data/Default.hs
bsd-3-clause
error = [a | Right a <- a] ==> rights a
39
error = [a | Right a <- a] ==> rights a
39
error = [a | Right a <- a] ==> rights a
39
false
false
0
9
10
27
13
14
null
null
izmailoff/haskell-h99
src/H99/Q1to10.hs
mit
elementAt (x:xs) 1 = x
22
elementAt (x:xs) 1 = x
22
elementAt (x:xs) 1 = x
22
false
false
0
7
4
18
9
9
null
null
Xophmeister/tapestry
Encode.hs
mit
normaliseInt Nothing = 0
25
normaliseInt Nothing = 0
25
normaliseInt Nothing = 0
25
false
false
1
5
4
13
4
9
null
null
TikhonJelvis/array-forth-sketch
src/GenerateSketch.hs
bsd-3-clause
genHoles :: Settings -> Int -> String genHoles Settings { supportedOpcodes, literalHoles } n = drop 2 . unlines $ replicate n [sketch| step = {| $opcodeCalls $literalHole |}; |] where opcodeCalls = intercalate " | " $ map callOpcode supportedOpcodes literalHole | literalHoles = "| loadLiteral(??, step)" ...
358
genHoles :: Settings -> Int -> String genHoles Settings { supportedOpcodes, literalHoles } n = drop 2 . unlines $ replicate n [sketch| step = {| $opcodeCalls $literalHole |}; |] where opcodeCalls = intercalate " | " $ map callOpcode supportedOpcodes literalHole | literalHoles = "| loadLiteral(??, step)" ...
358
genHoles Settings { supportedOpcodes, literalHoles } n = drop 2 . unlines $ replicate n [sketch| step = {| $opcodeCalls $literalHole |}; |] where opcodeCalls = intercalate " | " $ map callOpcode supportedOpcodes literalHole | literalHoles = "| loadLiteral(??, step)" | otherwise = ""
320
false
true
10
9
88
103
47
56
null
null
brendanhay/gogol
gogol-adexchangebuyer2/gen/Network/Google/AdExchangeBuyer2/Types/Product.hs
mpl-2.0
-- | Month of a year. Must be from 1 to 12, or 0 to specify a year without a -- month and day. dMonth :: Lens' Date (Maybe Int32) dMonth = lens _dMonth (\ s a -> s{_dMonth = a}) . mapping _Coerce
203
dMonth :: Lens' Date (Maybe Int32) dMonth = lens _dMonth (\ s a -> s{_dMonth = a}) . mapping _Coerce
108
dMonth = lens _dMonth (\ s a -> s{_dMonth = a}) . mapping _Coerce
73
true
true
3
8
51
64
29
35
null
null
ozataman/snap-extension-session
src/Snap/Extension/Session/Common.hs
bsd-3-clause
------------------------------------------------------------------------------ -- | Insert an authenticity token against CSRF into the session. setAuthenticityToken :: (MonadSnap m) => Session -> m Session setAuthenticityToken s = case Map.lookup "_csrf_token" s of Just _ -> return s Nothing -> do t <-...
506
setAuthenticityToken :: (MonadSnap m) => Session -> m Session setAuthenticityToken s = case Map.lookup "_csrf_token" s of Just _ -> return s Nothing -> do t <- liftIO randomToken return $ Map.insert "_csrf_token" t s ------------------------------------------------------------------------------...
362
setAuthenticityToken s = case Map.lookup "_csrf_token" s of Just _ -> return s Nothing -> do t <- liftIO randomToken return $ Map.insert "_csrf_token" t s ------------------------------------------------------------------------------ -- | Insert a timestamp into the session.
300
true
true
0
12
80
89
43
46
null
null
jbddc/sdc-graph
src/Main.hs
bsd-3-clause
shellExec :: (Int -> IO ((Graph Int),Int)) -> [String] -> IO Bool shellExec cmd (cm:(scl:(x:[]))) = do let upper_bound = (read x :: Int) let scale = (read scl :: Int) let delta = list_scale scale upper_bound results <- mapM (avg_run cmd 10) delta let plot_data = map (\(pos,edges) -> (show pos,[edge...
579
shellExec :: (Int -> IO ((Graph Int),Int)) -> [String] -> IO Bool shellExec cmd (cm:(scl:(x:[]))) = do let upper_bound = (read x :: Int) let scale = (read scl :: Int) let delta = list_scale scale upper_bound results <- mapM (avg_run cmd 10) delta let plot_data = map (\(pos,edges) -> (show pos,[edge...
579
shellExec cmd (cm:(scl:(x:[]))) = do let upper_bound = (read x :: Int) let scale = (read scl :: Int) let delta = list_scale scale upper_bound results <- mapM (avg_run cmd 10) delta let plot_data = map (\(pos,edges) -> (show pos,[edges])) $ zip delta results plotIt ("res_avg_"++cm++"_"++x++".png...
513
false
true
0
16
117
311
156
155
null
null
gambogi/csh-eval
src/CSH/Eval/DB/Schema.hs
mit
-- | Represents the status of a member's owed dues. The possible values are: -- -- * @paid@ - The member has paid dues. -- * @exempt@ - The member is exempted from paying dues. dues_t :: SchemaInit dues_t = mapM_ H.unitEx [ [H.stmt|drop type if exists "dues_t" cascade|] , [H.stmt|create type "dues_t" as enu...
378
dues_t :: SchemaInit dues_t = mapM_ H.unitEx [ [H.stmt|drop type if exists "dues_t" cascade|] , [H.stmt|create type "dues_t" as enum ( 'paid' , 'exempt' ) |] ]
195
dues_t = mapM_ H.unitEx [ [H.stmt|drop type if exists "dues_t" cascade|] , [H.stmt|create type "dues_t" as enum ( 'paid' , 'exempt' ) |] ]
174
true
true
0
6
103
47
28
19
null
null
michaelbeaumont/pandoc
src/Text/Pandoc/Writers/Markdown.hs
gpl-2.0
notesToMarkdown :: WriterOptions -> [[Block]] -> State WriterState Doc notesToMarkdown opts notes = mapM (\(num, note) -> noteToMarkdown opts num note) (zip [1..] notes) >>= return . vsep
191
notesToMarkdown :: WriterOptions -> [[Block]] -> State WriterState Doc notesToMarkdown opts notes = mapM (\(num, note) -> noteToMarkdown opts num note) (zip [1..] notes) >>= return . vsep
191
notesToMarkdown opts notes = mapM (\(num, note) -> noteToMarkdown opts num note) (zip [1..] notes) >>= return . vsep
120
false
true
0
10
31
80
42
38
null
null
FranklinChen/IHaskell
ipython-kernel/examples/Calc.hs
mit
sleepThen :: Parsec String a Razor sleepThen = do keyword "sleep" delay <- float <?> "seconds" keyword "then" body <- expr keyword "end" <?> "" return $ SleepThen delay body
185
sleepThen :: Parsec String a Razor sleepThen = do keyword "sleep" delay <- float <?> "seconds" keyword "then" body <- expr keyword "end" <?> "" return $ SleepThen delay body
185
sleepThen = do keyword "sleep" delay <- float <?> "seconds" keyword "then" body <- expr keyword "end" <?> "" return $ SleepThen delay body
150
false
true
0
8
41
70
30
40
null
null
vTurbine/ghc
compiler/basicTypes/Name.hs
bsd-3-clause
isVarName :: Name -> Bool isVarName = isVarOcc . nameOccName
60
isVarName :: Name -> Bool isVarName = isVarOcc . nameOccName
60
isVarName = isVarOcc . nameOccName
34
false
true
0
5
9
19
10
9
null
null
recursion-ninja/megaparsec
tests/Text/Megaparsec/ByteSpec.hs
bsd-2-clause
-- | Covert a char to byte. fromChar :: Char -> Maybe Word8 fromChar x = let p = ord x in if p > 0xff then Nothing else Just (fromIntegral p)
152
fromChar :: Char -> Maybe Word8 fromChar x = let p = ord x in if p > 0xff then Nothing else Just (fromIntegral p)
123
fromChar x = let p = ord x in if p > 0xff then Nothing else Just (fromIntegral p)
91
true
true
0
10
42
57
28
29
null
null
pascal-knodel/haskell-craft
_/links/E'8''7.hs
mit
alternate :: Strategy -> Strategy -> Strategy alternate firstStrategy alternativeStrategy moves -- Change strategy every move: | even (length moves) = firstStrategy moves | otherwise = alternativeStrategy moves
231
alternate :: Strategy -> Strategy -> Strategy alternate firstStrategy alternativeStrategy moves -- Change strategy every move: | even (length moves) = firstStrategy moves | otherwise = alternativeStrategy moves
231
alternate firstStrategy alternativeStrategy moves -- Change strategy every move: | even (length moves) = firstStrategy moves | otherwise = alternativeStrategy moves
185
false
true
1
10
48
55
26
29
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/Configure.hs
bsd-3-clause
configureSetupScript :: PackageDBStack -> Compiler -> Platform -> ProgramConfiguration -> FilePath -> VersionRange -> Maybe Lock -> Bool -> InstalledPac...
3,802
configureSetupScript :: PackageDBStack -> Compiler -> Platform -> ProgramConfiguration -> FilePath -> VersionRange -> Maybe Lock -> Bool -> InstalledPac...
3,802
configureSetupScript packageDBs comp platform conf distPref cabalVersion lock forceExternal index mpkg = SetupScriptOptions { ...
3,386
false
true
2
16
1,335
519
270
249
null
null
lukexi/ghc-7.8-arm64
compiler/cmm/CmmUtils.hs
bsd-3-clause
-------------------------------------------- -- -- mkLiveness -- --------------------------------------------- mkLiveness :: DynFlags -> [Maybe LocalReg] -> Liveness mkLiveness _ [] = []
199
mkLiveness :: DynFlags -> [Maybe LocalReg] -> Liveness mkLiveness _ [] = []
80
mkLiveness _ [] = []
25
true
true
0
8
31
39
22
17
null
null
JoeyEremondi/haskelm
src/Language/Elm/TH/HToE.hs
bsd-3-clause
getElmName "error" = "Error.raise"
34
getElmName "error" = "Error.raise"
34
getElmName "error" = "Error.raise"
34
false
false
1
5
3
13
4
9
null
null
vrom911/hs-init
summoner-tui/src/Summoner/Tui/GroupBorder.hs
mit
tr = joinableBorder (Edges False True True False)
49
tr = joinableBorder (Edges False True True False)
49
tr = joinableBorder (Edges False True True False)
49
false
false
1
6
7
24
10
14
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | Whether to hide Flash objects flag for an asset. Applicable to the -- following creative types: all RICH_MEDIA. caaHideFlashObjects :: Lens' CreativeAsset (Maybe Bool) caaHideFlashObjects = lens _caaHideFlashObjects (\ s a -> s{_caaHideFlashObjects = a})
267
caaHideFlashObjects :: Lens' CreativeAsset (Maybe Bool) caaHideFlashObjects = lens _caaHideFlashObjects (\ s a -> s{_caaHideFlashObjects = a})
150
caaHideFlashObjects = lens _caaHideFlashObjects (\ s a -> s{_caaHideFlashObjects = a})
94
true
true
0
9
44
47
26
21
null
null
lostMohican/simple-Haskell-web-crawler
Crawler.hs
gpl-2.0
checkUrls urls | length urls > 1 = error "supply just one url" | otherwise = ()
100
checkUrls urls | length urls > 1 = error "supply just one url" | otherwise = ()
100
checkUrls urls | length urls > 1 = error "supply just one url" | otherwise = ()
100
false
false
0
9
37
36
15
21
null
null
kadena-io/pact
src/Pact/Repl/Lib.hs
bsd-3-clause
setGasPrice :: RNativeFun LibState setGasPrice _ [TLiteral (LDecimal d) _] = do setenv (eeGasEnv . geGasPrice) (wrap (wrap d)) return $ tStr $ "Set gas price to " <> tShow d
177
setGasPrice :: RNativeFun LibState setGasPrice _ [TLiteral (LDecimal d) _] = do setenv (eeGasEnv . geGasPrice) (wrap (wrap d)) return $ tStr $ "Set gas price to " <> tShow d
177
setGasPrice _ [TLiteral (LDecimal d) _] = do setenv (eeGasEnv . geGasPrice) (wrap (wrap d)) return $ tStr $ "Set gas price to " <> tShow d
142
false
true
0
11
34
78
37
41
null
null
cmahon/interactive-brokers
library/API/IB/Request.hs
bsd-3-clause
-- ----------------------------------------------------------------------------- createCancelAccountSummaryMsg :: Int -> Int -> Msg createCancelAccountSummaryMsg sversion requestid | sversion < minServerVersionAccountSummary = Left InvalidServerVersion | otherwise = return $ ibMsg 1 CancelAccountSummaryT [intDec ...
330
createCancelAccountSummaryMsg :: Int -> Int -> Msg createCancelAccountSummaryMsg sversion requestid | sversion < minServerVersionAccountSummary = Left InvalidServerVersion | otherwise = return $ ibMsg 1 CancelAccountSummaryT [intDec requestid]
248
createCancelAccountSummaryMsg sversion requestid | sversion < minServerVersionAccountSummary = Left InvalidServerVersion | otherwise = return $ ibMsg 1 CancelAccountSummaryT [intDec requestid]
197
true
true
1
8
34
62
30
32
null
null
tonyfloatersu/solution-haskell-craft-of-FP
Chapter8.hs
mit
-- The worker function playInteractive :: Strategy -> Tournament -> IO () playInteractive s t@(mine,yours) = do ch <- getChar if not (ch `elem` "rpsRPS") then showResults t else do let next = s yours putStrLn ("\nI play: " ++ show next ++ " you play: " ++ [ch]) ...
472
playInteractive :: Strategy -> Tournament -> IO () playInteractive s t@(mine,yours) = do ch <- getChar if not (ch `elem` "rpsRPS") then showResults t else do let next = s yours putStrLn ("\nI play: " ++ show next ++ " you play: " ++ [ch]) let yourMove ...
447
playInteractive s t@(mine,yours) = do ch <- getChar if not (ch `elem` "rpsRPS") then showResults t else do let next = s yours putStrLn ("\nI play: " ++ show next ++ " you play: " ++ [ch]) let yourMove = convertMove ch playInteractive s ...
396
true
true
0
15
153
146
73
73
null
null
mikeizbicki/HerbiePlugin
test/Tests.hs
bsd-3-clause
example86 x = sqrt(x + 1) - sqrt x + sin(x - 1)
47
example86 x = sqrt(x + 1) - sqrt x + sin(x - 1)
47
example86 x = sqrt(x + 1) - sqrt x + sin(x - 1)
47
false
false
0
9
12
40
19
21
null
null
dylanmc/cryptol
sbv/Data/SBV/Tools/Polynomial.hs
bsd-3-clause
divx n i xs ys' = (q:qs, rs) where q = xs `idx` i xs' = ites q (xs `addPoly` ys') xs (qs, rs) = divx (n-1) (i-1) xs' (tail ys') -- | Compute CRCs over bit-vectors. The call @crcBV n m p@ computes -- the CRC of the message @m@ with respect to polynomial @p@. The -- inputs are assume...
1,962
divx n i xs ys' = (q:qs, rs) where q = xs `idx` i xs' = ites q (xs `addPoly` ys') xs (qs, rs) = divx (n-1) (i-1) xs' (tail ys') -- | Compute CRCs over bit-vectors. The call @crcBV n m p@ computes -- the CRC of the message @m@ with respect to polynomial @p@. The -- inputs are assume...
1,962
divx n i xs ys' = (q:qs, rs) where q = xs `idx` i xs' = ites q (xs `addPoly` ys') xs (qs, rs) = divx (n-1) (i-1) xs' (tail ys') -- | Compute CRCs over bit-vectors. The call @crcBV n m p@ computes -- the CRC of the message @m@ with respect to polynomial @p@. The -- inputs are assume...
1,962
false
false
2
8
409
134
88
46
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_STENCIL_ATTACHMENT :: GLenum gl_STENCIL_ATTACHMENT = 0x8D20
62
gl_STENCIL_ATTACHMENT :: GLenum gl_STENCIL_ATTACHMENT = 0x8D20
62
gl_STENCIL_ATTACHMENT = 0x8D20
30
false
true
0
4
5
11
6
5
null
null
JustinUnger/haskell-book
ch25/ch26-outerinner.hs
mit
maybeUnwrap :: ExceptT String (ReaderT () IO) (Maybe Int) maybeUnwrap = runMaybeT embedded
90
maybeUnwrap :: ExceptT String (ReaderT () IO) (Maybe Int) maybeUnwrap = runMaybeT embedded
90
maybeUnwrap = runMaybeT embedded
32
false
true
0
8
12
37
18
19
null
null
urv/fixhs
src/Data/FIX/Spec/FIX40.hs
lgpl-2.1
tPossDupFlag :: FIXTag tPossDupFlag = FIXTag { tName = "PossDupFlag" , tnum = 43 , tparser = toFIXChar , arbitraryValue = FIXChar <$> (return 'A') }
161
tPossDupFlag :: FIXTag tPossDupFlag = FIXTag { tName = "PossDupFlag" , tnum = 43 , tparser = toFIXChar , arbitraryValue = FIXChar <$> (return 'A') }
161
tPossDupFlag = FIXTag { tName = "PossDupFlag" , tnum = 43 , tparser = toFIXChar , arbitraryValue = FIXChar <$> (return 'A') }
138
false
true
0
10
38
57
30
27
null
null
airobert/yices_haskell
Math/SMT/Yices/Parser.hs
bsd-3-clause
assertp = tok "assert+" >> liftM2 ASSERT_P expY (optionMaybe integer)
69
assertp = tok "assert+" >> liftM2 ASSERT_P expY (optionMaybe integer)
69
assertp = tok "assert+" >> liftM2 ASSERT_P expY (optionMaybe integer)
69
false
false
3
7
9
30
12
18
null
null
romanb/amazonka
amazonka-swf/gen/Network/AWS/SWF/Types.hs
mpl-2.0
-- | If the event is of type 'ChildWorkflowExecutionCompleted' then this member is -- set and provides detailed information about the event. It is not set for -- other event types. heChildWorkflowExecutionCompletedEventAttributes :: Lens' HistoryEvent (Maybe ChildWorkflowExecutionCompletedEventAttributes) heChildWorkfl...
494
heChildWorkflowExecutionCompletedEventAttributes :: Lens' HistoryEvent (Maybe ChildWorkflowExecutionCompletedEventAttributes) heChildWorkflowExecutionCompletedEventAttributes = lens _heChildWorkflowExecutionCompletedEventAttributes (\s a -> s { _heChildWorkflowExecutionCompletedEventAttributes = a })
313
heChildWorkflowExecutionCompletedEventAttributes = lens _heChildWorkflowExecutionCompletedEventAttributes (\s a -> s { _heChildWorkflowExecutionCompletedEventAttributes = a })
187
true
true
0
9
61
48
27
21
null
null
Javran/misc
wheelguess/wheelguess.hs
mit
wordsFromDict :: FilePath -> IO [String] wordsFromDict p = map (filter (not . isSpace)) . lines <$> SIO.readFile p
114
wordsFromDict :: FilePath -> IO [String] wordsFromDict p = map (filter (not . isSpace)) . lines <$> SIO.readFile p
114
wordsFromDict p = map (filter (not . isSpace)) . lines <$> SIO.readFile p
73
false
true
0
11
18
53
26
27
null
null
rgrempel/frelm.org
vendor/elm-format/parser/src/Parse/Helpers.hs
mit
processAs :: (T.GenTokenParser String u SourceM -> IParser a) -> String -> IParser a processAs processor s = calloutParser s (processor lexer) where calloutParser :: String -> IParser a -> IParser a calloutParser inp p = either (fail . show) return (iParse p inp) lexer :: T.GenTokenParser Strin...
964
processAs :: (T.GenTokenParser String u SourceM -> IParser a) -> String -> IParser a processAs processor s = calloutParser s (processor lexer) where calloutParser :: String -> IParser a -> IParser a calloutParser inp p = either (fail . show) return (iParse p inp) lexer :: T.GenTokenParser Strin...
964
processAs processor s = calloutParser s (processor lexer) where calloutParser :: String -> IParser a -> IParser a calloutParser inp p = either (fail . show) return (iParse p inp) lexer :: T.GenTokenParser String u SourceM lexer = T.makeTokenParser elmDef -- I don't know how many of the...
879
false
true
0
9
306
256
139
117
null
null
pasberth/LeatherScript-prototype
Language/LeatherScript/Tokenizer.hs
mit
token :: Text.Text -> Tokenizer (Maybe (Text.Text, Text.Text)) token "" = return Nothing
88
token :: Text.Text -> Tokenizer (Maybe (Text.Text, Text.Text)) token "" = return Nothing
88
token "" = return Nothing
25
false
true
0
10
12
42
21
21
null
null
mheinzel/Rome
src/CommandParsers.hs
mit
platformsParser :: Opts.Parser [TargetPlatform] platformsParser = (nub . concat <$> Opts.some (Opts.option (eitherReader platformListOrError) (Opts.metavar "PLATFORMS" <> Opts.long "platform" <> Opts.help "Applicable platforms for the command. One of iOS, MacOS, tvOS, watchOS, or a comma-separated list of any of these ...
621
platformsParser :: Opts.Parser [TargetPlatform] platformsParser = (nub . concat <$> Opts.some (Opts.option (eitherReader platformListOrError) (Opts.metavar "PLATFORMS" <> Opts.long "platform" <> Opts.help "Applicable platforms for the command. One of iOS, MacOS, tvOS, watchOS, or a comma-separated list of any of these ...
621
platformsParser = (nub . concat <$> Opts.some (Opts.option (eitherReader platformListOrError) (Opts.metavar "PLATFORMS" <> Opts.long "platform" <> Opts.help "Applicable platforms for the command. One of iOS, MacOS, tvOS, watchOS, or a comma-separated list of any of these values."))) <|> pure allTargetPlatforms wher...
573
false
true
3
14
97
179
87
92
null
null
tomwadeson/cis194
week2/LogAnalysis.hs
mit
parseLogMessage :: ReadP LogMessage parseLogMessage = parseLogMessage' <|> parseUnknown
87
parseLogMessage :: ReadP LogMessage parseLogMessage = parseLogMessage' <|> parseUnknown
87
parseLogMessage = parseLogMessage' <|> parseUnknown
51
false
true
3
6
8
27
12
15
null
null
rvion/ride
jetpack/src/Data/Vector/AsVec.hs
bsd-3-clause
-- vec_unsafeDrop :: forall a. Int -> Vector a -> Vector a vec_unsafeDrop = I.unsafeDrop
88
vec_unsafeDrop = I.unsafeDrop
29
vec_unsafeDrop = I.unsafeDrop
29
true
false
0
5
14
9
5
4
null
null
Jiggins/Final-Year-Project
src/Parser/Lexer.hs
mit
identifier, operator :: Parsec String u String identifier = Token.identifier lexer
82
identifier, operator :: Parsec String u String identifier = Token.identifier lexer
82
identifier = Token.identifier lexer
35
false
true
3
6
10
32
13
19
null
null
ethercrow/yi
yi-core/src/Yi/Buffer/HighLevel.hs
gpl-2.0
-- | Get the previous point, unless at the beginning of the file prevPointB :: BufferM Point prevPointB = do sof <- atSof if sof then pointB else do p <- pointB return $ Point (fromPoint p - 1) -- | Reads in word at point.
253
prevPointB :: BufferM Point prevPointB = do sof <- atSof if sof then pointB else do p <- pointB return $ Point (fromPoint p - 1) -- | Reads in word at point.
188
prevPointB = do sof <- atSof if sof then pointB else do p <- pointB return $ Point (fromPoint p - 1) -- | Reads in word at point.
160
true
true
0
15
76
67
31
36
null
null
gencer/bond
compiler/src/Language/Bond/Codegen/TypeMapping.hs
mit
cppTypeCustomAlloc _ _ t = cppType t
36
cppTypeCustomAlloc _ _ t = cppType t
36
cppTypeCustomAlloc _ _ t = cppType t
36
false
false
0
5
6
16
7
9
null
null
urbanslug/ghc
compiler/deSugar/Coverage.hs
bsd-3-clause
mkDensity :: TickishType -> DynFlags -> TickDensity mkDensity tickish dflags = case tickish of HpcTicks -> TickForCoverage SourceNotes -> TickForCoverage Breakpoints -> TickForBreakPoints ProfNotes -> case profAuto dflags of ProfAutoAll -> TickAllFunctions Prof...
540
mkDensity :: TickishType -> DynFlags -> TickDensity mkDensity tickish dflags = case tickish of HpcTicks -> TickForCoverage SourceNotes -> TickForCoverage Breakpoints -> TickForBreakPoints ProfNotes -> case profAuto dflags of ProfAutoAll -> TickAllFunctions Prof...
540
mkDensity tickish dflags = case tickish of HpcTicks -> TickForCoverage SourceNotes -> TickForCoverage Breakpoints -> TickForBreakPoints ProfNotes -> case profAuto dflags of ProfAutoAll -> TickAllFunctions ProfAutoTop -> TickTopFunctions ProfAutoExpor...
488
false
true
0
11
154
93
46
47
null
null
danchoi/imapget
src/Network/HaskellNet/IMAP.hs
bsd-3-clause
subscribe :: IMAPConnection -> MailboxName -> IO () subscribe conn mboxname = sendCommand conn ("SUBSCRIBE " ++ mboxname) pNone
127
subscribe :: IMAPConnection -> MailboxName -> IO () subscribe conn mboxname = sendCommand conn ("SUBSCRIBE " ++ mboxname) pNone
127
subscribe conn mboxname = sendCommand conn ("SUBSCRIBE " ++ mboxname) pNone
75
false
true
0
8
18
47
22
25
null
null
deweyvm/pone
src/Pone/Parser/Common.hs
gpl-3.0
comma = P.comma lexer
29
comma = P.comma lexer
29
comma = P.comma lexer
29
false
false
0
6
11
11
5
6
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'BC.splitWith' bc_splitWith = BC.splitWith
46
bc_splitWith = BC.splitWith
27
bc_splitWith = BC.splitWith
27
true
false
0
5
4
9
5
4
null
null
agrafix/HSmarty
src/Text/HSmarty/Render/Engine.hs
bsd-3-clause
evalBinOp env (BinLargerEq x y) = numOp "LargerEq" (>=) (x, y) env
70
evalBinOp env (BinLargerEq x y) = numOp "LargerEq" (>=) (x, y) env
70
evalBinOp env (BinLargerEq x y) = numOp "LargerEq" (>=) (x, y) env
70
false
false
0
7
15
36
19
17
null
null
input-output-hk/pos-haskell-prototype
chain/test/Test/Pos/Chain/Genesis/Dummy.hs
mit
dummyGenesisAvvmBalances :: GenesisAvvmBalances dummyGenesisAvvmBalances = GenesisAvvmBalances mempty
101
dummyGenesisAvvmBalances :: GenesisAvvmBalances dummyGenesisAvvmBalances = GenesisAvvmBalances mempty
101
dummyGenesisAvvmBalances = GenesisAvvmBalances mempty
53
false
true
0
5
6
14
7
7
null
null
diku-dk/futhark
src/Futhark/Pass/KernelBabysitting.hs
isc
splitSlice :: Slice SubExp -> ([SubExp], Slice SubExp) splitSlice (Slice []) = ([], Slice [])
93
splitSlice :: Slice SubExp -> ([SubExp], Slice SubExp) splitSlice (Slice []) = ([], Slice [])
93
splitSlice (Slice []) = ([], Slice [])
38
false
true
0
10
14
60
29
31
null
null
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/NV/PresentVideo.hs
bsd-3-clause
gl_PRESENT_TIME :: GLenum gl_PRESENT_TIME = 0x8E2A
50
gl_PRESENT_TIME :: GLenum gl_PRESENT_TIME = 0x8E2A
50
gl_PRESENT_TIME = 0x8E2A
24
false
true
0
4
5
11
6
5
null
null
isomorphism/linear
src/Linear/V3.hs
bsd-3-clause
_yz f = _xyz $ \(V3 a b c) -> f (V2 b c) <&> \(V2 b' c') -> V3 a b' c'
70
_yz f = _xyz $ \(V3 a b c) -> f (V2 b c) <&> \(V2 b' c') -> V3 a b' c'
70
_yz f = _xyz $ \(V3 a b c) -> f (V2 b c) <&> \(V2 b' c') -> V3 a b' c'
70
false
false
1
10
22
66
31
35
null
null
paulkeene/FP101x
chapter08/Exercises.hs
bsd-3-clause
myFilterM f (a:as) = do p <- f a as <- myFilterM f as if p then return (a : as) else return as -- Exercise 9 --
122
myFilterM f (a:as) = do p <- f a as <- myFilterM f as if p then return (a : as) else return as -- Exercise 9 --
122
myFilterM f (a:as) = do p <- f a as <- myFilterM f as if p then return (a : as) else return as -- Exercise 9 --
122
false
false
0
10
38
65
31
34
null
null
thoughtpolice/cabal
Cabal/Distribution/Simple/Utils.hs
bsd-3-clause
toUTF8 :: String -> String toUTF8 [] = []
48
toUTF8 :: String -> String toUTF8 [] = []
48
toUTF8 [] = []
21
false
true
0
5
15
26
12
14
null
null
solaryeti/riff
test/Main.hs
bsd-3-clause
main :: IO () main = defaultMain tests
38
main :: IO () main = defaultMain tests
38
main = defaultMain tests
24
false
true
1
6
7
22
9
13
null
null