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
vaibhavsagar/duffer.hs
duffer/src/Duffer/Plumbing.hs
bsd-3-clause
resolvePartialRef :: String -> WithRepo (Maybe Ref) resolvePartialRef search = runMaybeT $ MaybeT (localObjects $ resolvePartialLooseRef' search) <|> MaybeT (localObjects $ resolvePartialPackRef' search)
214
resolvePartialRef :: String -> WithRepo (Maybe Ref) resolvePartialRef search = runMaybeT $ MaybeT (localObjects $ resolvePartialLooseRef' search) <|> MaybeT (localObjects $ resolvePartialPackRef' search)
214
resolvePartialRef search = runMaybeT $ MaybeT (localObjects $ resolvePartialLooseRef' search) <|> MaybeT (localObjects $ resolvePartialPackRef' search)
162
false
true
5
8
33
65
31
34
null
null
sqd/haskell-C89-interpreter
Storage.hs
mit
readMem :: Memory -> Id -> Value readMem (Mem m _) x = m M.! x
62
readMem :: Memory -> Id -> Value readMem (Mem m _) x = m M.! x
62
readMem (Mem m _) x = m M.! x
29
false
true
2
10
15
45
20
25
null
null
joshi4/hRaft
src/Hraft.hs
mit
initSystem :: String -> IO RaftState initSystem node = do configuration <- initConfiguration electionTimer <- getStdRandom (randomR (electionTimerLL, electionTimerUL )) rs <- return $ initRaftState configuration node rs' <- readRaftFile rs -- reads from file if possible putStrLn $ "Initial Log : " ++ s...
459
initSystem :: String -> IO RaftState initSystem node = do configuration <- initConfiguration electionTimer <- getStdRandom (randomR (electionTimerLL, electionTimerUL )) rs <- return $ initRaftState configuration node rs' <- readRaftFile rs -- reads from file if possible putStrLn $ "Initial Log : " ++ s...
459
initSystem node = do configuration <- initConfiguration electionTimer <- getStdRandom (randomR (electionTimerLL, electionTimerUL )) rs <- return $ initRaftState configuration node rs' <- readRaftFile rs -- reads from file if possible putStrLn $ "Initial Log : " ++ show (getlog rs') return $ rs' {elect...
421
false
true
0
11
91
119
56
63
null
null
TomMD/ghc
compiler/types/Type.hs
bsd-3-clause
isNumLitTy (LitTy (NumTyLit n)) = Just n
40
isNumLitTy (LitTy (NumTyLit n)) = Just n
40
isNumLitTy (LitTy (NumTyLit n)) = Just n
40
false
false
0
8
6
25
11
14
null
null
GregorySchwartz/fasta
src/Data/Fasta/Text/Lazy/Parse.hs
gpl-3.0
clone' :: A.Parser (Germline, [FastaSequence]) clone' = do A.skipSpace germline <- fastaCLIP' fseqs <- A.manyTill fasta' (void (A.char '>') CA.<|> A.endOfInput) return (germline, fseqs) -- | attoparsec parser for a fasta file
242
clone' :: A.Parser (Germline, [FastaSequence]) clone' = do A.skipSpace germline <- fastaCLIP' fseqs <- A.manyTill fasta' (void (A.char '>') CA.<|> A.endOfInput) return (germline, fseqs) -- | attoparsec parser for a fasta file
242
clone' = do A.skipSpace germline <- fastaCLIP' fseqs <- A.manyTill fasta' (void (A.char '>') CA.<|> A.endOfInput) return (germline, fseqs) -- | attoparsec parser for a fasta file
195
false
true
1
15
48
90
43
47
null
null
ricardopenyamari/ir2haskell
clir-parser-haskell-master/test/Main.hs
gpl-2.0
test2 = testCase "Check let with function application" $ do decoded <- return $ (fromRight $ decode x :: GeneralExpression) assertEqual "encode-decode is idempotent" decoded expected where x = "(let ((x int)) (@ f (the bool false)) x)" expected = Let [TypedVar "x" (Sim...
466
test2 = testCase "Check let with function application" $ do decoded <- return $ (fromRight $ decode x :: GeneralExpression) assertEqual "encode-decode is idempotent" decoded expected where x = "(let ((x int)) (@ f (the bool false)) x)" expected = Let [TypedVar "x" (Sim...
466
test2 = testCase "Check let with function application" $ do decoded <- return $ (fromRight $ decode x :: GeneralExpression) assertEqual "encode-decode is idempotent" decoded expected where x = "(let ((x int)) (@ f (the bool false)) x)" expected = Let [TypedVar "x" (Sim...
466
false
false
0
13
152
126
62
64
null
null
hpacheco/HAAP
examples/plab/svn/2017li1g186/src/OracleT1.hs
mit
processa (s:c) d a (x,y) m = processa c d a' (mexe (x,y) d) m' where m' = replace m (x,y) p' a' = adapta s a p' = (blocoRampa s d) (min a a')
165
processa (s:c) d a (x,y) m = processa c d a' (mexe (x,y) d) m' where m' = replace m (x,y) p' a' = adapta s a p' = (blocoRampa s d) (min a a')
165
processa (s:c) d a (x,y) m = processa c d a' (mexe (x,y) d) m' where m' = replace m (x,y) p' a' = adapta s a p' = (blocoRampa s d) (min a a')
165
false
false
4
7
58
134
57
77
null
null
vTurbine/ghc
compiler/main/DynFlags.hs
bsd-3-clause
ghcUsagePath :: DynFlags -> FilePath ghcUsagePath dflags = sGhcUsagePath (settings dflags)
99
ghcUsagePath :: DynFlags -> FilePath ghcUsagePath dflags = sGhcUsagePath (settings dflags)
99
ghcUsagePath dflags = sGhcUsagePath (settings dflags)
53
false
true
0
7
19
27
13
14
null
null
brendanhay/gogol
gogol-cloudkms/gen/Network/Google/Resource/CloudKMS/Projects/Locations/KeyRings/Create.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). plkrcUploadProtocol :: Lens' ProjectsLocationsKeyRingsCreate (Maybe Text) plkrcUploadProtocol = lens _plkrcUploadProtocol (\ s a -> s{_plkrcUploadProtocol = a})
230
plkrcUploadProtocol :: Lens' ProjectsLocationsKeyRingsCreate (Maybe Text) plkrcUploadProtocol = lens _plkrcUploadProtocol (\ s a -> s{_plkrcUploadProtocol = a})
168
plkrcUploadProtocol = lens _plkrcUploadProtocol (\ s a -> s{_plkrcUploadProtocol = a})
94
true
true
0
8
33
49
25
24
null
null
prasmussen/glot-www
Glot/Language.hs
mit
-- TODO: get static root from arg pngLogoPath :: LanguageConfig -> Text.Text pngLogoPath LanguageConfig{..} = Text.intercalate "/" ["static", "img", logoName <> ".svg.png"]
176
pngLogoPath :: LanguageConfig -> Text.Text pngLogoPath LanguageConfig{..} = Text.intercalate "/" ["static", "img", logoName <> ".svg.png"]
142
pngLogoPath LanguageConfig{..} = Text.intercalate "/" ["static", "img", logoName <> ".svg.png"]
99
true
true
2
7
25
49
27
22
null
null
jamesthompson/nosql-generic
test/Data/Gogol/DatastoreEntityTests.hs
bsd-3-clause
case_recursive_optional_record_forwards_backwards_serialization_2 = let exp = RecordTest3 "baz" True (pure $ RecordTest3 "quux" False Nothing) res = exp^._ToDatastoreEntity >>= view _FromDatastoreEntity in res @?= Just exp
232
case_recursive_optional_record_forwards_backwards_serialization_2 = let exp = RecordTest3 "baz" True (pure $ RecordTest3 "quux" False Nothing) res = exp^._ToDatastoreEntity >>= view _FromDatastoreEntity in res @?= Just exp
232
case_recursive_optional_record_forwards_backwards_serialization_2 = let exp = RecordTest3 "baz" True (pure $ RecordTest3 "quux" False Nothing) res = exp^._ToDatastoreEntity >>= view _FromDatastoreEntity in res @?= Just exp
232
false
false
0
12
34
61
29
32
null
null
themattchan/tandoori
library/Tandoori/Typing.hs
bsd-3-clause
tyChar = TyCon GHC.charTyConName
36
tyChar = TyCon GHC.charTyConName
36
tyChar = TyCon GHC.charTyConName
36
false
false
0
6
7
11
5
6
null
null
prowdsponsor/country-codes
src/Data/CountryCodes/ISO31661.hs
bsd-3-clause
fromMText "IQ" = Just IQ
24
fromMText "IQ" = Just IQ
24
fromMText "IQ" = Just IQ
24
false
false
0
5
4
12
5
7
null
null
vincenthz/cryptonite
Crypto/ConstructHash/MiyaguchiPreneel.hs
bsd-3-clause
compute' :: (ByteArrayAccess bin, BlockCipher cipher) => (Bytes -> cipher) -- ^ key build function to compute Miyaguchi-Preneel. care about block-size and key-size -> bin -- ^ input message -> MiyaguchiPreneel cipher -- ^ output tag compute' g = MP . foldl' (step $ g...
781
compute' :: (ByteArrayAccess bin, BlockCipher cipher) => (Bytes -> cipher) -- ^ key build function to compute Miyaguchi-Preneel. care about block-size and key-size -> bin -- ^ input message -> MiyaguchiPreneel cipher compute' g = MP . foldl' (step $ g) (B.replicate b...
765
compute' g = MP . foldl' (step $ g) (B.replicate bsz 0) . chunks . pad (ZERO bsz) . B.convert where bsz = blockSize ( g B.empty {- dummy to get block size -} ) chunks msg | B.null msg = [] | otherwise = (hd :: Bytes) : chunks tl where (hd, tl) = B.splitAt bsz msg -- | Compute M...
495
true
true
0
12
221
187
96
91
null
null
picca/hkl
contrib/haskell/src/Hkl/Diffabs/IRDRx.hs
gpl-3.0
sampleRef :: XRDRef sampleRef = XRDRef "reference" (published </> "calibration") (XrdRefNxs (nxs' (project </> "2016" </> "Run5" </> "2016-11-09" </> "scan_39.nxs") "scan_39" h5path') 10 )
250
sampleRef :: XRDRef sampleRef = XRDRef "reference" (published </> "calibration") (XrdRefNxs (nxs' (project </> "2016" </> "Run5" </> "2016-11-09" </> "scan_39.nxs") "scan_39" h5path') 10 )
250
sampleRef = XRDRef "reference" (published </> "calibration") (XrdRefNxs (nxs' (project </> "2016" </> "Run5" </> "2016-11-09" </> "scan_39.nxs") "scan_39" h5path') 10 )
230
false
true
0
14
86
71
33
38
null
null
nevrenato/Hets_Fork
HasCASL/ATC_HasCASL.hs
gpl-2.0
_tcComponentTc :: TyCon _tcComponentTc = mkTyCon "HasCASL.As.Component"
71
_tcComponentTc :: TyCon _tcComponentTc = mkTyCon "HasCASL.As.Component"
71
_tcComponentTc = mkTyCon "HasCASL.As.Component"
47
false
true
0
5
6
14
7
7
null
null
mietek/idris-bash
src/IRTS/Codegen/Utils.hs
bsd-3-clause
clExp (SCase _ _ cs) = maximum (map clCase cs)
52
clExp (SCase _ _ cs) = maximum (map clCase cs)
52
clExp (SCase _ _ cs) = maximum (map clCase cs)
52
false
false
0
7
15
31
14
17
null
null
iblumenfeld/saw-core
src/Verifier/SAW/Simulator/SBV.hs
bsd-3-clause
------------------------------------------------------------ -- Indexing operations -- | Lifts a strict mux operation to a lazy mux lazyMux :: (SBool -> a -> a -> IO a) -> (SBool -> IO a -> IO a -> IO a) lazyMux muxFn c tm fm = case svAsBool c of Just True -> tm Just False -> fm Nothing -> do t...
536
lazyMux :: (SBool -> a -> a -> IO a) -> (SBool -> IO a -> IO a -> IO a) lazyMux muxFn c tm fm = case svAsBool c of Just True -> tm Just False -> fm Nothing -> do t <- tm f <- fm muxFn c t f -- selectV merger maxValue valueFn index returns valueFn v when index has value v -- if index...
403
lazyMux muxFn c tm fm = case svAsBool c of Just True -> tm Just False -> fm Nothing -> do t <- tm f <- fm muxFn c t f -- selectV merger maxValue valueFn index returns valueFn v when index has value v -- if index is greater than maxValue, it returns valueFn maxValue. Use the ite op f...
331
true
true
6
10
135
120
61
59
null
null
sinelaw/lamdu
bottlelib/Graphics/UI/Bottle/Widgets/Spacer.hs
gpl-3.0
makeVertical :: Anim.R -> View makeVertical height = make $ Vector2 0 height
76
makeVertical :: Anim.R -> View makeVertical height = make $ Vector2 0 height
76
makeVertical height = make $ Vector2 0 height
45
false
true
0
6
12
29
14
15
null
null
tjakway/ghcjvm
compiler/typecheck/TcEvidence.hs
bsd-3-clause
mkWpEvVarApps :: [EvVar] -> HsWrapper mkWpEvVarApps vs = mk_co_app_fn WpEvApp (map EvId vs)
91
mkWpEvVarApps :: [EvVar] -> HsWrapper mkWpEvVarApps vs = mk_co_app_fn WpEvApp (map EvId vs)
91
mkWpEvVarApps vs = mk_co_app_fn WpEvApp (map EvId vs)
53
false
true
0
7
12
34
17
17
null
null
johnjcamilleri/fst
tests/drink.hs
bsd-3-clause
quarter = s "q" <*> (times 25 "c")
34
quarter = s "q" <*> (times 25 "c")
34
quarter = s "q" <*> (times 25 "c")
34
false
false
1
8
7
25
10
15
null
null
kojiromike/Idris-dev
src/IRTS/JavaScript/AST.hs
bsd-3-clause
jsAst2Text (JsDouble d) = T.pack $ show d
41
jsAst2Text (JsDouble d) = T.pack $ show d
41
jsAst2Text (JsDouble d) = T.pack $ show d
41
false
false
0
7
7
24
11
13
null
null
silky/foot-in-the-door
Handler/Chat.hs
mit
getChatR :: Handler Html getChatR = do defaultLayout $ do setTitleI MsgSiteTitle $(widgetFile "chat")
121
getChatR :: Handler Html getChatR = do defaultLayout $ do setTitleI MsgSiteTitle $(widgetFile "chat")
121
getChatR = do defaultLayout $ do setTitleI MsgSiteTitle $(widgetFile "chat")
96
false
true
1
13
33
41
16
25
null
null
typelead/epm
epm/Distribution/Client/FetchUtils.hs
bsd-3-clause
fetchSourceRepo :: Verbosity -> Repo -> PackageId -> [PD.SourceRepo] -> IO FilePath fetchSourceRepo verbosity repo pkgid sourceRepos = do fetched <- doesDirectoryExist repoDir if fetched then do info verbosity $ repoDir ++ " has already been downloaded." return repoDir else do no...
679
fetchSourceRepo :: Verbosity -> Repo -> PackageId -> [PD.SourceRepo] -> IO FilePath fetchSourceRepo verbosity repo pkgid sourceRepos = do fetched <- doesDirectoryExist repoDir if fetched then do info verbosity $ repoDir ++ " has already been downloaded." return repoDir else do no...
679
fetchSourceRepo verbosity repo pkgid sourceRepos = do fetched <- doesDirectoryExist repoDir if fetched then do info verbosity $ repoDir ++ " has already been downloaded." return repoDir else do notice verbosity $ "Downloading " ++ repoDir ++ "..." downloadSourceRepo retur...
579
false
true
0
13
167
155
72
83
null
null
michalt/cvector
Data/CVector/Unboxed.hs
bsd-3-clause
foldl1 :: (Unbox a) => (a -> a -> a) -> CVector a -> a foldl1 = G.foldl1
72
foldl1 :: (Unbox a) => (a -> a -> a) -> CVector a -> a foldl1 = G.foldl1
72
foldl1 = G.foldl1
17
false
true
0
9
17
44
23
21
null
null
sboosali/commands
commands-frontend-DragonNaturallySpeaking/sources/Commands/Frontends/Dragon13/Serialize.hs
mit
{- | @Address (Host "localhost") (Port 8000)@ becomes @("'localhost'", "'8000'")@ @SerializedGrammar = ShimR - NatLinkConfig@ -} from_SerializedGrammar_to_ShimR :: NatLinkConfig -> SerializedGrammar -> ShimR Doc from_SerializedGrammar_to_ShimR NatLinkConfig{..} SerializedGrammar{..} = ShimR{..} where __rules__ = s...
721
from_SerializedGrammar_to_ShimR :: NatLinkConfig -> SerializedGrammar -> ShimR Doc from_SerializedGrammar_to_ShimR NatLinkConfig{..} SerializedGrammar{..} = ShimR{..} where __rules__ = serializedRules __lists__ = serializedLists __export__ = serializedExport __serverHost__ = str2doc h __serverPort__ = str2d...
591
from_SerializedGrammar_to_ShimR NatLinkConfig{..} SerializedGrammar{..} = ShimR{..} where __rules__ = serializedRules __lists__ = serializedLists __export__ = serializedExport __serverHost__ = str2doc h __serverPort__ = str2doc (show p) -- __logFile__ = str2doc nlLogFile -- __contextFile__ = str2doc n...
508
true
true
8
7
107
154
71
83
null
null
mankyKitty/leesp
src/Main.hs
mit
cons badArgList = throwError $ NumArgs 2 badArgList
65
cons badArgList = throwError $ NumArgs 2 badArgList
65
cons badArgList = throwError $ NumArgs 2 badArgList
65
false
false
1
6
21
21
8
13
null
null
roberth/uu-helium
test/typeerrors/Examples/TypeBug9.hs
gpl-3.0
(<$>) :: (a -> b) -> Parser s a -> Parser s b (<*>) = undefined
64
(<$>) :: (a -> b) -> Parser s a -> Parser s b (<*>) = undefined
63
(<*>) = undefined
17
false
true
0
7
16
40
22
18
null
null
mdsteele/pylos
src/Pylos/Draw.hs
gpl-3.0
canvasRect :: (MonadHandler m) => m IRect canvasRect = do (width, height) <- canvasSize return $ Rect 0 0 width height
122
canvasRect :: (MonadHandler m) => m IRect canvasRect = do (width, height) <- canvasSize return $ Rect 0 0 width height
122
canvasRect = do (width, height) <- canvasSize return $ Rect 0 0 width height
80
false
true
0
8
24
52
26
26
null
null
jacekm-git/HsPredictor
library/HsPredictor/Prelude.hs
gpl-3.0
sHead :: [a] -> Maybe a sHead [] = Nothing
42
sHead :: [a] -> Maybe a sHead [] = Nothing
42
sHead [] = Nothing
18
false
true
0
8
9
31
14
17
null
null
alephnil/h99
15.hs
apache-2.0
repli :: [a] -> Int -> [a] repli [] _ = []
42
repli :: [a] -> Int -> [a] repli [] _ = []
42
repli [] _ = []
15
false
true
0
7
11
34
18
16
null
null
dylex/blaze-markup
src/Text/Blaze/Renderer/Pretty.hs
bsd-3-clause
renderHtml :: Markup -> String renderHtml = renderMarkup
56
renderHtml :: Markup -> String renderHtml = renderMarkup
56
renderHtml = renderMarkup
25
false
true
0
7
7
22
9
13
null
null
Iruyan-Zak/Nlp100
src/Nlp4.hs
bsd-3-clause
f37 :: [(Int, ByteString)] -> String f37 = unlines . map (\(n,s) -> "\"" ++ utf8unpack s ++ "\" " ++ show n)
108
f37 :: [(Int, ByteString)] -> String f37 = unlines . map (\(n,s) -> "\"" ++ utf8unpack s ++ "\" " ++ show n)
108
f37 = unlines . map (\(n,s) -> "\"" ++ utf8unpack s ++ "\" " ++ show n)
71
false
true
1
11
22
71
35
36
null
null
danr/hipspec
examples/old-examples/quickspec/ProductiveUseOfFailure2.hs
gpl-3.0
Z <= _ = True
21
Z <= _ = True
21
Z <= _ = True
21
false
false
2
5
12
14
6
8
null
null
aemoncannon/woof
compiler/woof_eval.hs
mit
nilObject :: WoofVal nilObject = WoofObject (0, nilObject, [], nullEnv)
72
nilObject :: WoofVal nilObject = WoofObject (0, nilObject, [], nullEnv)
71
nilObject = WoofObject (0, nilObject, [], nullEnv)
50
false
true
0
7
10
28
16
12
null
null
Min-/HaskellSandbox
src/LongestAlignment.hs
bsd-3-clause
pos = snd
9
pos = snd
9
pos = snd
9
false
false
0
4
2
6
3
3
null
null
hughfdjackson/abattoir
src/Commands.hs
mit
parseSteps :: Parser Command parseSteps = liftM Steps (string "steps" >> many1 space >> optWhitespace parseExpr)
112
parseSteps :: Parser Command parseSteps = liftM Steps (string "steps" >> many1 space >> optWhitespace parseExpr)
112
parseSteps = liftM Steps (string "steps" >> many1 space >> optWhitespace parseExpr)
83
false
true
0
9
15
46
19
27
null
null
christiaanb/Idris-dev
src/Idris/Delaborate.hs
bsd-3-clause
showbasic (MN _ s) = s
22
showbasic (MN _ s) = s
22
showbasic (MN _ s) = s
22
false
false
0
7
5
17
8
9
null
null
texodus/forml
src/hs/lib/Forml/Optimize/Inline.hs
bsd-3-clause
replace_expr d f (IfExpression a b (Just c)) = IfExpression (replace_expr d f a) (replace_expr d f b) (Just (replace_expr d f c))
133
replace_expr d f (IfExpression a b (Just c)) = IfExpression (replace_expr d f a) (replace_expr d f b) (Just (replace_expr d f c))
133
replace_expr d f (IfExpression a b (Just c)) = IfExpression (replace_expr d f a) (replace_expr d f b) (Just (replace_expr d f c))
133
false
false
0
9
26
76
35
41
null
null
MichaelMackus/hsrl
RL/Game.hs
mit
broadcast' env e = let p = player (level env) lvl = level env ms' = map (`broadcast` e) (mobs lvl) in env { level = lvl { player = broadcast p e, mobs = aliveMobs ms' }, events = e:events env }
308
broadcast' env e = let p = player (level env) lvl = level env ms' = map (`broadcast` e) (mobs lvl) in env { level = lvl { player = broadcast p e, mobs = aliveMobs ms' }, events = e:events env }
308
broadcast' env e = let p = player (level env) lvl = level env ms' = map (`broadcast` e) (mobs lvl) in env { level = lvl { player = broadcast p e, mobs = aliveMobs ms' }, events = e:events env }
308
false
false
0
11
157
104
55
49
null
null
ezyang/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
exprCtOrigin (SectionL _ _) = SectionOrigin
47
exprCtOrigin (SectionL _ _) = SectionOrigin
47
exprCtOrigin (SectionL _ _) = SectionOrigin
47
false
false
0
6
9
18
8
10
null
null
stepcut/ase2css
ase2less.hs
bsd-3-clause
main :: IO () main = do args <- getArgs case args of [inFile, outFile] -> do c <- B.readFile inFile let ase = runGet getASE c less = text "/* Generated from" <+> doubleQuotes (text inFile) <+> text "using ase2less */" $+$ a...
447
main :: IO () main = do args <- getArgs case args of [inFile, outFile] -> do c <- B.readFile inFile let ase = runGet getASE c less = text "/* Generated from" <+> doubleQuotes (text inFile) <+> text "using ase2less */" $+$ a...
447
main = do args <- getArgs case args of [inFile, outFile] -> do c <- B.readFile inFile let ase = runGet getASE c less = text "/* Generated from" <+> doubleQuotes (text inFile) <+> text "using ase2less */" $+$ ase2less ase ...
433
false
true
0
21
179
132
59
73
null
null
Alexander-Ignatyev/morpheus
hmatrix-morpheus/src/Numeric/Morpheus/Statistics.hs
bsd-3-clause
-- | Calculates sample standard deviation. stddev :: Vector R -> R stddev x = unsafePerformIO $ do apply x id c_morpheus_stddev {- morpheus_column_mean -}
160
stddev :: Vector R -> R stddev x = unsafePerformIO $ do apply x id c_morpheus_stddev {- morpheus_column_mean -}
117
stddev x = unsafePerformIO $ do apply x id c_morpheus_stddev {- morpheus_column_mean -}
93
true
true
0
8
30
37
18
19
null
null
ekmett/ghc
compiler/cmm/PprC.hs
bsd-3-clause
-- True if (pprReg reg) will give an expression with type StgPtr. We -- need to take care with pointer arithmetic on registers with type -- StgPtr. isFixedPtrReg :: CmmReg -> Bool isFixedPtrReg (CmmLocal _) = False
215
isFixedPtrReg :: CmmReg -> Bool isFixedPtrReg (CmmLocal _) = False
66
isFixedPtrReg (CmmLocal _) = False
34
true
true
0
9
37
33
16
17
null
null
FranklinChen/twenty-four-days2015-of-hackage
test/SymbolicDifferentiation/OperatorSyntaxSpec.hs
bsd-3-clause
main :: IO () main = hspec spec
31
main :: IO () main = hspec spec
31
main = hspec spec
17
false
true
1
6
7
22
9
13
null
null
runjak/projectEuler
src/Problem33.hs
mit
wanted = filter predicate ratios
32
wanted = filter predicate ratios
32
wanted = filter predicate ratios
32
false
false
0
5
4
11
5
6
null
null
bakineggs/k-framework
tools/OutputFilter/InfixOperators.hs
gpl-2.0
globSCs [] = []
54
globSCs [] = []
54
globSCs [] = []
54
false
false
0
5
42
14
6
8
null
null
susoDominguez/eNominalTerms-Alpha
Freshen2.hs
unlicense
renameVarRl :: RnmMap -> Rule -> Rule renameVarRl m (fc,l,r) = (fc',l',r') where fc' = renameVarCtx m fc l' = renameTrm m l r' = renameTrm m r
162
renameVarRl :: RnmMap -> Rule -> Rule renameVarRl m (fc,l,r) = (fc',l',r') where fc' = renameVarCtx m fc l' = renameTrm m l r' = renameTrm m r
162
renameVarRl m (fc,l,r) = (fc',l',r') where fc' = renameVarCtx m fc l' = renameTrm m l r' = renameTrm m r
124
false
true
2
6
47
75
40
35
null
null
keithodulaigh/Hets
Comorphisms/HolLight2Isabelle.hs
gpl-2.0
-- ++ "_" ++ (show $ pp_print_type t) unpack_gabs :: Term -> [String] -> (IsaSign.Term, [IsaSign.Term], IsaSign.Term, IsaSign.Term) unpack_gabs t vs = case unpack_gabs' t vs [] of Just (q, vars, tm) -> let (pat, res) = case tm of Comb (Com...
635
unpack_gabs :: Term -> [String] -> (IsaSign.Term, [IsaSign.Term], IsaSign.Term, IsaSign.Term) unpack_gabs t vs = case unpack_gabs' t vs [] of Just (q, vars, tm) -> let (pat, res) = case tm of Comb (Comb (Const "GEQ" _ _) ...
596
unpack_gabs t vs = case unpack_gabs' t vs [] of Just (q, vars, tm) -> let (pat, res) = case tm of Comb (Comb (Const "GEQ" _ _) (Comb (Var "f" _ _) pat1)) res1 -> (pat1, res1) ...
502
true
true
0
21
275
202
104
98
null
null
pascal-knodel/haskell-craft
Examples/· Recursion/· Primitive Recursion/Lists/Double.hs
mit
double (integer : remainingIntegers) = (2 * integer) : double remainingIntegers
81
double (integer : remainingIntegers) = (2 * integer) : double remainingIntegers
81
double (integer : remainingIntegers) = (2 * integer) : double remainingIntegers
81
false
false
0
7
12
31
15
16
null
null
bernstein/ircfs
Network/IRC/Message/Types.hs
bsd-3-clause
numericMsg 002 = RPL_YOURHOST
29
numericMsg 002 = RPL_YOURHOST
29
numericMsg 002 = RPL_YOURHOST
29
false
false
1
5
3
13
4
9
null
null
GaloisInc/stack
src/Stack/Types/Config.hs
bsd-3-clause
packageEntryCurrDir :: PackageEntry packageEntryCurrDir = PackageEntry { peValidWanted = Nothing , peExtraDepMaybe = Nothing , peLocation = PLFilePath "." , peSubdirs = [] }
193
packageEntryCurrDir :: PackageEntry packageEntryCurrDir = PackageEntry { peValidWanted = Nothing , peExtraDepMaybe = Nothing , peLocation = PLFilePath "." , peSubdirs = [] }
193
packageEntryCurrDir = PackageEntry { peValidWanted = Nothing , peExtraDepMaybe = Nothing , peLocation = PLFilePath "." , peSubdirs = [] }
157
false
true
0
8
43
52
27
25
null
null
DrNico/byoparser
Text/ByoParser/LexerPos.hs
mit
sepBy :: Lexer i a -> Lexer i sep -> Lexer i [a] sepBy p sep = sepBy1 p sep <|> return []
89
sepBy :: Lexer i a -> Lexer i sep -> Lexer i [a] sepBy p sep = sepBy1 p sep <|> return []
89
sepBy p sep = sepBy1 p sep <|> return []
40
false
true
0
8
22
56
26
30
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_CMD_HOMEWRAP :: Int wxSTC_CMD_HOMEWRAP = 2349
51
wxSTC_CMD_HOMEWRAP :: Int wxSTC_CMD_HOMEWRAP = 2349
51
wxSTC_CMD_HOMEWRAP = 2349
25
false
true
0
4
5
11
6
5
null
null
rrnewton/accelerate
Data/Array/Accelerate/Analysis/Type.hs
bsd-3-clause
-- |Reify the result types of of a scalar expression using the expression AST before tying the -- knot. -- preExpType :: forall acc aenv env t. AccType acc -> PreOpenExp acc aenv env t -> TupleType (EltRepr t) preExpType k e = case e of Let _ _ -> eltType (undefined::...
1,472
preExpType :: forall acc aenv env t. AccType acc -> PreOpenExp acc aenv env t -> TupleType (EltRepr t) preExpType k e = case e of Let _ _ -> eltType (undefined::t) Var _ -> eltType (undefined::t) Const _ -> eltType (undefined::t) Tupl...
1,365
preExpType k e = case e of Let _ _ -> eltType (undefined::t) Var _ -> eltType (undefined::t) Const _ -> eltType (undefined::t) Tuple _ -> eltType (undefined::t) Prj _ _ -> eltType (undefined::t) IndexNil -> eltType (undefined::t) ...
1,226
true
true
0
10
500
530
266
264
null
null
phischu/fragnix
tests/packages/scotty/Data.Attoparsec.Text.Internal.hs
bsd-3-clause
satisfyWith :: (Char -> a) -> (a -> Bool) -> Parser a satisfyWith f p = do (k,s) <- ensure 1 let c = f $! T.unsafeHead s if p c then advance k >> return c else fail "satisfyWith"
193
satisfyWith :: (Char -> a) -> (a -> Bool) -> Parser a satisfyWith f p = do (k,s) <- ensure 1 let c = f $! T.unsafeHead s if p c then advance k >> return c else fail "satisfyWith"
193
satisfyWith f p = do (k,s) <- ensure 1 let c = f $! T.unsafeHead s if p c then advance k >> return c else fail "satisfyWith"
139
false
true
0
12
54
102
49
53
null
null
olsner/ghc
compiler/main/DriverPipeline.hs
bsd-3-clause
fixchar :: Char -> Char fixchar '-' = '_'
41
fixchar :: Char -> Char fixchar '-' = '_'
41
fixchar '-' = '_'
17
false
true
0
5
8
18
9
9
null
null
sol/pandoc
src/Text/Pandoc/Shared.hs
gpl-2.0
-- | Convert Pandoc inline list to plain text identifier. HTML -- identifiers must start with a letter, and may contain only -- letters, digits, and the characters _-. inlineListToIdentifier :: [Inline] -> String inlineListToIdentifier = dropWhile (not . isAlpha) . intercalate "-" . words . map (nbspToSp . toLow...
542
inlineListToIdentifier :: [Inline] -> String inlineListToIdentifier = dropWhile (not . isAlpha) . intercalate "-" . words . map (nbspToSp . toLower) . filter (\c -> isLetter c || isDigit c || c `elem` "_-. ") . stringify where nbspToSp '\160' = ' ' nbspToSp x = x -- | Convert list ...
373
inlineListToIdentifier = dropWhile (not . isAlpha) . intercalate "-" . words . map (nbspToSp . toLower) . filter (\c -> isLetter c || isDigit c || c `elem` "_-. ") . stringify where nbspToSp '\160' = ' ' nbspToSp x = x -- | Convert list of Pandoc blocks into (hierarchical) list of ...
328
true
true
1
13
126
115
60
55
null
null
brendanhay/gogol
gogol-plus-domains/gen/Network/Google/PlusDomains/Types/Product.hs
mpl-2.0
-- | The width, in pixels, of the linked resource. aoaitiiWidth :: Lens' ActivityObjectAttachmentsItemThumbnailsItemImage (Maybe Word32) aoaitiiWidth = lens _aoaitiiWidth (\ s a -> s{_aoaitiiWidth = a}) . mapping _Coerce
228
aoaitiiWidth :: Lens' ActivityObjectAttachmentsItemThumbnailsItemImage (Maybe Word32) aoaitiiWidth = lens _aoaitiiWidth (\ s a -> s{_aoaitiiWidth = a}) . mapping _Coerce
177
aoaitiiWidth = lens _aoaitiiWidth (\ s a -> s{_aoaitiiWidth = a}) . mapping _Coerce
91
true
true
0
10
37
55
28
27
null
null
mzini/TcT
source/Tct/Processor/Transformations.hs
gpl-3.0
-- | Modify parameters of instance modifyArguments :: (Transformer t) => (Domains (ArgumentsOf t) -> Domains (ArgumentsOf t)) -> (TheTransformer t -> TheTransformer t) modifyArguments f (TheTransformer t as) = TheTransformer t (f as)
233
modifyArguments :: (Transformer t) => (Domains (ArgumentsOf t) -> Domains (ArgumentsOf t)) -> (TheTransformer t -> TheTransformer t) modifyArguments f (TheTransformer t as) = TheTransformer t (f as)
198
modifyArguments f (TheTransformer t as) = TheTransformer t (f as)
65
true
true
0
11
33
92
44
48
null
null
topos-house/prototype
src/Proto3.hs
bsd-3-clause
fullIdent :: Parser String fullIdent = concat <$> ident <:> many (char '.' <:> ident)
85
fullIdent :: Parser String fullIdent = concat <$> ident <:> many (char '.' <:> ident)
85
fullIdent = concat <$> ident <:> many (char '.' <:> ident)
58
false
true
0
9
14
35
17
18
null
null
brendanhay/gogol
gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs
mpl-2.0
-- | The point size. If empty, a default size is used. psSize :: Lens' PointStyle (Maybe Double) psSize = lens _psSize (\ s a -> s{_psSize = a}) . mapping _Coerce
170
psSize :: Lens' PointStyle (Maybe Double) psSize = lens _psSize (\ s a -> s{_psSize = a}) . mapping _Coerce
115
psSize = lens _psSize (\ s a -> s{_psSize = a}) . mapping _Coerce
73
true
true
2
9
39
62
28
34
null
null
hecrj/haskell-format
test/specs/do/output.hs
bsd-3-clause
test :: IO () test = doSomething $ do one two
65
test :: IO () test = doSomething $ do one two
65
test = doSomething $ do one two
51
false
true
1
8
30
30
12
18
null
null
wavewave/MSSMScan
src/HEP/ModelScan/MSSMScan/Read.hs
bsd-2-clause
print_fullmodel fullmodel = show (idnum fullmodel) ++ " : " ++ show (inputparam fullmodel) ++ " | " ++ show (outputphys fullmodel)
188
print_fullmodel fullmodel = show (idnum fullmodel) ++ " : " ++ show (inputparam fullmodel) ++ " | " ++ show (outputphys fullmodel)
188
print_fullmodel fullmodel = show (idnum fullmodel) ++ " : " ++ show (inputparam fullmodel) ++ " | " ++ show (outputphys fullmodel)
188
false
false
0
11
79
52
24
28
null
null
josefs/sbv
SBVTestSuite/Utils/SBVTestFramework.hs
bsd-3-clause
numberOfModels :: Provable a => a -> IO Int numberOfModels p = do AllSatResult (_, _, rs) <- allSat p return $ length rs -- | Symbolicly run a SAT instance using the default config
203
numberOfModels :: Provable a => a -> IO Int numberOfModels p = do AllSatResult (_, _, rs) <- allSat p return $ length rs -- | Symbolicly run a SAT instance using the default config
203
numberOfModels p = do AllSatResult (_, _, rs) <- allSat p return $ length rs -- | Symbolicly run a SAT instance using the default config
159
false
true
0
9
57
61
29
32
null
null
benjumanji/hawkes
src/HawkesGen.hs
bsd-3-clause
main :: IO () main = do gen <- newMTGen Nothing evs <- generateHawkes gen hc 10000 let vec = U.fromList evs let tis = U.zip vec (U.tail vec) h <- openFile "iis.txt" WriteMode U.mapM_ (hPutStrLn h . toShortest) . U.map (integratedIntensity hc vec) $ tis hClose ...
486
main :: IO () main = do gen <- newMTGen Nothing evs <- generateHawkes gen hc 10000 let vec = U.fromList evs let tis = U.zip vec (U.tail vec) h <- openFile "iis.txt" WriteMode U.mapM_ (hPutStrLn h . toShortest) . U.map (integratedIntensity hc vec) $ tis hClose ...
486
main = do gen <- newMTGen Nothing evs <- generateHawkes gen hc 10000 let vec = U.fromList evs let tis = U.zip vec (U.tail vec) h <- openFile "iis.txt" WriteMode U.mapM_ (hPutStrLn h . toShortest) . U.map (integratedIntensity hc vec) $ tis hClose h where hc =...
472
false
true
0
13
145
152
69
83
null
null
haskell-distributed/distributed-process-tests
src/Control/Distributed/Process/Tests/CH.hs
bsd-3-clause
testRegistry :: TestTransport -> Assertion testRegistry TestTransport{..} = do node <- newLocalNode testTransport initRemoteTable done <- newEmptyMVar pingServer <- forkProcess node ping deadProcess <- forkProcess node (return ()) runProcess node $ do register "ping" pingServer Just pid <- whereis "...
827
testRegistry :: TestTransport -> Assertion testRegistry TestTransport{..} = do node <- newLocalNode testTransport initRemoteTable done <- newEmptyMVar pingServer <- forkProcess node ping deadProcess <- forkProcess node (return ()) runProcess node $ do register "ping" pingServer Just pid <- whereis "...
827
testRegistry TestTransport{..} = do node <- newLocalNode testTransport initRemoteTable done <- newEmptyMVar pingServer <- forkProcess node ping deadProcess <- forkProcess node (return ()) runProcess node $ do register "ping" pingServer Just pid <- whereis "ping" True <- return $ pingServer == pi...
784
false
true
0
15
172
287
126
161
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/FloodlightConfigurations/Update.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). fcuUploadType :: Lens' FloodlightConfigurationsUpdate (Maybe Text) fcuUploadType = lens _fcuUploadType (\ s a -> s{_fcuUploadType = a})
214
fcuUploadType :: Lens' FloodlightConfigurationsUpdate (Maybe Text) fcuUploadType = lens _fcuUploadType (\ s a -> s{_fcuUploadType = a})
143
fcuUploadType = lens _fcuUploadType (\ s a -> s{_fcuUploadType = a})
76
true
true
0
8
34
49
25
24
null
null
schell/odin
odin-engine/devel/USB.hs
mit
readSensorReadings :: String -> Maybe SensorReadings readSensorReadings str = do (n, str2) <- readInt str (e, str3) <- readInt str2 (s, str4) <- readInt str3 (w, str5) <- readInt str4 d <- readMaybe str5 let mk a = Just (a, a) return $ SensorReadings (mk n) (mk e) (mk s) (mk w) (mk d) where read...
462
readSensorReadings :: String -> Maybe SensorReadings readSensorReadings str = do (n, str2) <- readInt str (e, str3) <- readInt str2 (s, str4) <- readInt str3 (w, str5) <- readInt str4 d <- readMaybe str5 let mk a = Just (a, a) return $ SensorReadings (mk n) (mk e) (mk s) (mk w) (mk d) where read...
462
readSensorReadings str = do (n, str2) <- readInt str (e, str3) <- readInt str2 (s, str4) <- readInt str3 (w, str5) <- readInt str4 d <- readMaybe str5 let mk a = Just (a, a) return $ SensorReadings (mk n) (mk e) (mk s) (mk w) (mk d) where readInt s = (,drop 1 $ dropWhile (/= ',') s) <$...
409
false
true
0
11
117
215
107
108
null
null
CulpaBS/wbBach
src/Futhark/Representation/ExplicitMemory/IndexFunction.hs
bsd-3-clause
applyInd ixfun [] = ixfun
25
applyInd ixfun [] = ixfun
25
applyInd ixfun [] = ixfun
25
false
false
0
6
4
14
6
8
null
null
NCrashed/bitmap
Data/Bitmap/IO.hs
bsd-3-clause
mptyBitmap :: PixelComponent t => Size -- ^ (width,height) -> NChn -- ^ number of channels (components\/pixel) -> Maybe Alignment -- ^ the row alignment of the new image -> IO (IOBitmap t) emptyBitmap = newIOBitmap
252
emptyBitmap :: PixelComponent t => Size -- ^ (width,height) -> NChn -- ^ number of channels (components\/pixel) -> Maybe Alignment -- ^ the row alignment of the new image -> IO (IOBitmap t) emptyBitmap = newIOBitmap
252
emptyBitmap = newIOBitmap
25
false
true
0
12
73
50
24
26
null
null
gregorycollins/blaaargh
src/Blaaargh/Internal/Post.hs
gpl-2.0
setEntryHTMLContent :: String -> Post -> Post setEntryHTMLContent x (Post p) = Post $ p { entryContent = Just $ HTMLContent x }
127
setEntryHTMLContent :: String -> Post -> Post setEntryHTMLContent x (Post p) = Post $ p { entryContent = Just $ HTMLContent x }
127
setEntryHTMLContent x (Post p) = Post $ p { entryContent = Just $ HTMLContent x }
81
false
true
0
10
22
54
26
28
null
null
Vetii/Haskell-Art
Main.hs
mit
canvasHeight :: Double canvasHeight = 768
41
canvasHeight :: Double canvasHeight = 768
41
canvasHeight = 768
18
false
true
0
6
5
18
7
11
null
null
mydaum/cabal
Cabal/Distribution/Simple/GHCJS.hs
bsd-3-clause
checkPackageDbEnvVar :: Verbosity -> IO () checkPackageDbEnvVar verbosity = Internal.checkPackageDbEnvVar verbosity "GHCJS" "GHCJS_PACKAGE_PATH"
148
checkPackageDbEnvVar :: Verbosity -> IO () checkPackageDbEnvVar verbosity = Internal.checkPackageDbEnvVar verbosity "GHCJS" "GHCJS_PACKAGE_PATH"
148
checkPackageDbEnvVar verbosity = Internal.checkPackageDbEnvVar verbosity "GHCJS" "GHCJS_PACKAGE_PATH"
105
false
true
0
7
16
32
15
17
null
null
wavewave/LHEParser
src/HEP/Parser/LHE/DecayTop.hs
bsd-2-clause
mkFullDecayTop :: IntTree -> [DecayTop PtlID] mkFullDecayTop tree = let lst = outgoing (inout tree) dmap = decaymap tree in map (mkDecayTop dmap) lst
198
mkFullDecayTop :: IntTree -> [DecayTop PtlID] mkFullDecayTop tree = let lst = outgoing (inout tree) dmap = decaymap tree in map (mkDecayTop dmap) lst
197
mkFullDecayTop tree = let lst = outgoing (inout tree) dmap = decaymap tree in map (mkDecayTop dmap) lst
151
false
true
0
11
72
68
31
37
null
null
sboosali/commands-backends-osx9
sources/Commands/Backends/OSX/Constants.hs
mit
keycode F5Key = 0x60
31
keycode F5Key = 0x60
31
keycode F5Key = 0x60
31
false
false
0
5
14
9
4
5
null
null
Mr-Click/PFQ
user/Haskell/Network/PFq/Experimental.hs
gpl-2.0
dummy_strings :: [String] -> NetFunction dummy_strings xs = MFunction "dummy_strings" xs () () () () () () ()
110
dummy_strings :: [String] -> NetFunction dummy_strings xs = MFunction "dummy_strings" xs () () () () () () ()
110
dummy_strings xs = MFunction "dummy_strings" xs () () () () () () ()
69
false
true
0
6
18
54
27
27
null
null
BlackBrane/quantum-random-numbers
src-ex/Main.hs
mit
interp Fill = fill
36
interp Fill = fill
36
interp Fill = fill
36
false
false
0
4
21
10
4
6
null
null
urbanslug/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
ppr_co p (TcCoercion co) = pprPrefixApp p (text "Core co:") [ppr co]
73
ppr_co p (TcCoercion co) = pprPrefixApp p (text "Core co:") [ppr co]
73
ppr_co p (TcCoercion co) = pprPrefixApp p (text "Core co:") [ppr co]
73
false
false
0
7
16
36
17
19
null
null
abid-mujtaba/haskell-cas
test/QuickTests/Ordering.hs
apache-2.0
prop_Rev_Order :: Expr Int -> Expr Int -> Bool prop_Rev_Order e1 e2 = (compare e1 e2) == (flip $ compare e2 e1) where types = (e1 :: Expr Int, e2 :: Expr Int) flip LT = GT flip GT = LT flip EQ = EQ
231
prop_Rev_Order :: Expr Int -> Expr Int -> Bool prop_Rev_Order e1 e2 = (compare e1 e2) == (flip $ compare e2 e1) where types = (e1 :: Expr Int, e2 :: Expr Int) flip LT = GT flip GT = LT flip EQ = EQ
231
prop_Rev_Order e1 e2 = (compare e1 e2) == (flip $ compare e2 e1) where types = (e1 :: Expr Int, e2 :: Expr Int) flip LT = GT flip GT = LT flip EQ = EQ
184
false
true
4
8
78
122
53
69
null
null
bartavelle/publicsnippets
performanceparsing/05optimize.hs
bsd-3-clause
myOctal :: Parser Int myOctal = foldl' (\acc n -> acc * 8 + digitToInt n) 0 <$> some digit
90
myOctal :: Parser Int myOctal = foldl' (\acc n -> acc * 8 + digitToInt n) 0 <$> some digit
90
myOctal = foldl' (\acc n -> acc * 8 + digitToInt n) 0 <$> some digit
68
false
true
1
10
19
50
23
27
null
null
cspollard/HMCMC
src/Data/Model.hs
bsd-3-clause
sumH :: [Hist] -> Hist sumH = foldl1 addH
41
sumH :: [Hist] -> Hist sumH = foldl1 addH
41
sumH = foldl1 addH
18
false
true
0
7
8
28
12
16
null
null
olorin/amazonka
amazonka-efs/gen/Network/AWS/EFS/Types.hs
mpl-2.0
-- | Returned if the specified 'FileSystemId' does not exist in the -- requester\'s AWS account. _FileSystemNotFound :: AsError a => Getting (First ServiceError) a ServiceError _FileSystemNotFound = _ServiceError . hasStatus 404 . hasCode "FileSystemNotFound"
263
_FileSystemNotFound :: AsError a => Getting (First ServiceError) a ServiceError _FileSystemNotFound = _ServiceError . hasStatus 404 . hasCode "FileSystemNotFound"
166
_FileSystemNotFound = _ServiceError . hasStatus 404 . hasCode "FileSystemNotFound"
86
true
true
0
8
38
47
23
24
null
null
monsanto/hie
Hie/Language/Haskell/Exts/Pretty.hs
gpl-3.0
ppDeriving :: [Deriving] -> Doc ppDeriving [] = empty
54
ppDeriving :: [Deriving] -> Doc ppDeriving [] = empty
54
ppDeriving [] = empty
22
false
true
0
6
9
23
12
11
null
null
pcapriotti/pipes-extra
Control/Pipe/Coroutine.hs
bsd-3-clause
suspend (Yield x p w) = return (Right (x, Coroutine p w))
57
suspend (Yield x p w) = return (Right (x, Coroutine p w))
57
suspend (Yield x p w) = return (Right (x, Coroutine p w))
57
false
false
0
9
11
39
19
20
null
null
mfine/ghc
compiler/main/DynFlags.hs
bsd-3-clause
setSigOf :: String -> DynFlags -> DynFlags setSigOf s d = d { sigOf = parseSigOf s }
84
setSigOf :: String -> DynFlags -> DynFlags setSigOf s d = d { sigOf = parseSigOf s }
84
setSigOf s d = d { sigOf = parseSigOf s }
41
false
true
0
8
17
40
19
21
null
null
Kagami/cirno
src/Network/XMPP/Monad.hs
bsd-3-clause
runXMPPLoop' :: XMPPState -> [XML] -> IO () runXMPPLoop' state [] = runXMPP state (getStanzas parseXML) >>= runXMPPLoop' state
130
runXMPPLoop' :: XMPPState -> [XML] -> IO () runXMPPLoop' state [] = runXMPP state (getStanzas parseXML) >>= runXMPPLoop' state
130
runXMPPLoop' state [] = runXMPP state (getStanzas parseXML) >>= runXMPPLoop' state
86
false
true
0
8
22
57
26
31
null
null
mrd/camfort
src/Camfort/Specification/Units/Environment.hs
apache-2.0
isConcreteUnit (UnitMul u v) = isConcreteUnit u && isConcreteUnit v
67
isConcreteUnit (UnitMul u v) = isConcreteUnit u && isConcreteUnit v
67
isConcreteUnit (UnitMul u v) = isConcreteUnit u && isConcreteUnit v
67
false
false
0
7
9
27
12
15
null
null
brendanhay/gogol
gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs
mpl-2.0
-- | This value explains why YouTube rejected an uploaded video. This -- property is only present if the uploadStatus property indicates that the -- upload was rejected. vsRejectionReason :: Lens' VideoStatus (Maybe VideoStatusRejectionReason) vsRejectionReason = lens _vsRejectionReason (\ s a -> s{_vsRejection...
332
vsRejectionReason :: Lens' VideoStatus (Maybe VideoStatusRejectionReason) vsRejectionReason = lens _vsRejectionReason (\ s a -> s{_vsRejectionReason = a})
162
vsRejectionReason = lens _vsRejectionReason (\ s a -> s{_vsRejectionReason = a})
88
true
true
0
9
52
50
27
23
null
null
fffej/haskellprojects
basics/tests.hs
bsd-2-clause
invariantAddNum a b = (addNum a b) >= b && (addNum a b) >= a
60
invariantAddNum a b = (addNum a b) >= b && (addNum a b) >= a
60
invariantAddNum a b = (addNum a b) >= b && (addNum a b) >= a
60
false
false
0
9
14
39
19
20
null
null
joshuaunderwood7/HaskeLinGeom
DistanceTables.hs
gpl-3.0
getNext_jLocations table = map indexToChessLocation $ getIndexOfnonZero table
77
getNext_jLocations table = map indexToChessLocation $ getIndexOfnonZero table
77
getNext_jLocations table = map indexToChessLocation $ getIndexOfnonZero table
77
false
false
0
6
7
19
8
11
null
null
emilaxelsson/ag-graph
examples/TypeInf.hs
bsd-3-clause
typeInfS (If' c t f) | Just BoolType <- typeOf c , Just tt <- typeOf t , Just tf <- typeOf f , tt == tf = Just tt
164
typeInfS (If' c t f) | Just BoolType <- typeOf c , Just tt <- typeOf t , Just tf <- typeOf f , tt == tf = Just tt
164
typeInfS (If' c t f) | Just BoolType <- typeOf c , Just tt <- typeOf t , Just tf <- typeOf f , tt == tf = Just tt
164
false
false
0
9
80
75
32
43
null
null
k0001/pipes-attoparsec
src/Pipes/Attoparsec.hs
bsd-3-clause
-- | Like 'parsed', except this tags each parsed value with the length of input -- consumed to parse the value. parsedL :: (Monad m, ParserInput a) => Attoparsec.Parser a b -- ^ Attoparsec parser -> Producer a m r -- ^ Raw input -> Producer (Int, b) m (Either (ParsingError, Producer a m r) ...
922
parsedL :: (Monad m, ParserInput a) => Attoparsec.Parser a b -- ^ Attoparsec parser -> Producer a m r -- ^ Raw input -> Producer (Int, b) m (Either (ParsingError, Producer a m r) r) parsedL parser = go where go p0 = do x <- lift (nextSkipEmpty p0) case x of Left r ...
810
parsedL parser = go where go p0 = do x <- lift (nextSkipEmpty p0) case x of Left r -> return (Right r) Right (a,p1) -> step (yield a >>) (_parse parser a) p1 (_length a) step diffP res p0 !len = case res of Fail _ c m -> return (Left (ParsingError c m, diffP p0)) ...
599
true
true
0
17
297
405
197
208
null
null
kaoskorobase/mescaline
lib/mescaline/Mescaline/Data/Signal.hs
gpl-3.0
zipS :: Signal p a -> Signal p b -> Signal p (a,b) zipS = lift2 (,)
68
zipS :: Signal p a -> Signal p b -> Signal p (a,b) zipS = lift2 (,)
68
zipS = lift2 (,)
17
false
true
0
8
17
46
23
23
null
null
kawu/skladnica-parser
src/NLP/Skladnica.hs
bsd-2-clause
printChosen :: DAG -> IO () printChosen dag = let t0 = simplify $ forest chosen 0 dag !! 0 simpLab = T.unpack . either cat orth . label in putStrLn . R.drawTree . fmap simpLab $ t0
191
printChosen :: DAG -> IO () printChosen dag = let t0 = simplify $ forest chosen 0 dag !! 0 simpLab = T.unpack . either cat orth . label in putStrLn . R.drawTree . fmap simpLab $ t0
191
printChosen dag = let t0 = simplify $ forest chosen 0 dag !! 0 simpLab = T.unpack . either cat orth . label in putStrLn . R.drawTree . fmap simpLab $ t0
163
false
true
0
11
48
86
41
45
null
null
HongbinZhou/helloworld
src/ch10.hs
bsd-3-clause
getNat :: L.ByteString -> Maybe (Int, L.ByteString) getNat s = case L8.readInt s of Nothing -> Nothing Just (num,rest) | num <= 0 -> Nothing | otherwise -> Just (fromIntegral num, rest)
248
getNat :: L.ByteString -> Maybe (Int, L.ByteString) getNat s = case L8.readInt s of Nothing -> Nothing Just (num,rest) | num <= 0 -> Nothing | otherwise -> Just (fromIntegral num, rest)
248
getNat s = case L8.readInt s of Nothing -> Nothing Just (num,rest) | num <= 0 -> Nothing | otherwise -> Just (fromIntegral num, rest)
196
false
true
0
11
94
92
45
47
null
null
pascalpoizat/veca-haskell
src/Veca/Model.hs
apache-2.0
isValidBehavior :: Signature -> VLTS -> Bool isValidBehavior _ l = isValidLTS l && isCorrectForTimeout l && isCorrectForInternal l && isCorrectForInternalEvents l
175
isValidBehavior :: Signature -> VLTS -> Bool isValidBehavior _ l = isValidLTS l && isCorrectForTimeout l && isCorrectForInternal l && isCorrectForInternalEvents l
175
isValidBehavior _ l = isValidLTS l && isCorrectForTimeout l && isCorrectForInternal l && isCorrectForInternalEvents l
130
false
true
6
6
34
51
22
29
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/Distribution/Simple/Program/Run.hs
bsd-3-clause
-- always utf8 emptyProgramInvocation :: ProgramInvocation emptyProgramInvocation = ProgramInvocation { progInvokePath = "", progInvokeArgs = [], progInvokeEnv = [], progInvokeCwd = Nothing, progInvokeInput = Nothing, progInvokeInputEncoding = IOEncodingText, progInvokeOutputEncodi...
343
emptyProgramInvocation :: ProgramInvocation emptyProgramInvocation = ProgramInvocation { progInvokePath = "", progInvokeArgs = [], progInvokeEnv = [], progInvokeCwd = Nothing, progInvokeInput = Nothing, progInvokeInputEncoding = IOEncodingText, progInvokeOutputEncoding = IOEncodingT...
327
emptyProgramInvocation = ProgramInvocation { progInvokePath = "", progInvokeArgs = [], progInvokeEnv = [], progInvokeCwd = Nothing, progInvokeInput = Nothing, progInvokeInputEncoding = IOEncodingText, progInvokeOutputEncoding = IOEncodingText }
283
true
true
0
7
71
60
38
22
null
null
nikita-volkov/bit-array
library/BitArray.hs
mit
foldr :: (FiniteBits a) => (a -> b -> b) -> b -> BitArray a -> b foldr step init = inline Foldable.foldr step init . inline toList
130
foldr :: (FiniteBits a) => (a -> b -> b) -> b -> BitArray a -> b foldr step init = inline Foldable.foldr step init . inline toList
130
foldr step init = inline Foldable.foldr step init . inline toList
65
false
true
0
9
27
71
34
37
null
null
bitemyapp/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
nestDepth :: Int nestDepth = 4
30
nestDepth :: Int nestDepth = 4
30
nestDepth = 4
13
false
true
0
6
5
18
7
11
null
null