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
frantisekfarka/ghc-dsi
compiler/llvmGen/LlvmCodeGen/Data.hs
bsd-3-clause
genStaticLit (CmmLabelDiffOff l1 l2 off) = do dflags <- getDynFlags var1 <- genStaticLit (CmmLabel l1) var2 <- genStaticLit (CmmLabel l2) let var = LMSub var1 var2 offset = LMStaticLit $ LMIntLit (toInteger off) (llvmWord dflags) return $ LMAdd var offset
283
genStaticLit (CmmLabelDiffOff l1 l2 off) = do dflags <- getDynFlags var1 <- genStaticLit (CmmLabel l1) var2 <- genStaticLit (CmmLabel l2) let var = LMSub var1 var2 offset = LMStaticLit $ LMIntLit (toInteger off) (llvmWord dflags) return $ LMAdd var offset
283
genStaticLit (CmmLabelDiffOff l1 l2 off) = do dflags <- getDynFlags var1 <- genStaticLit (CmmLabel l1) var2 <- genStaticLit (CmmLabel l2) let var = LMSub var1 var2 offset = LMStaticLit $ LMIntLit (toInteger off) (llvmWord dflags) return $ LMAdd var offset
283
false
false
0
13
67
110
50
60
null
null
czchen/haskell-misc
src/ListComprehension.hs
mit
list1 = [x*2 | x <- [1..10]]
28
list1 = [x*2 | x <- [1..10]]
28
list1 = [x*2 | x <- [1..10]]
28
false
false
0
8
6
26
14
12
null
null
TomMD/ghc
compiler/main/DynFlags.hs
bsd-3-clause
-- ----------------------------------------------------------------------------- -- Standard sets of warning options -- Note [Documenting warning flags] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- -- If you change the list of warning enabled by default -- please remember to update the User's Guide. The relevant file is: --...
1,237
standardWarnings :: [WarningFlag] standardWarnings -- see Note [Documenting warning flags] = [ Opt_WarnOverlappingPatterns, Opt_WarnWarningsDeprecations, Opt_WarnDeprecatedFlags, Opt_WarnDeferredTypeErrors, Opt_WarnTypedHoles, Opt_WarnPartialTypeSignatures, Opt_WarnUn...
882
standardWarnings -- see Note [Documenting warning flags] = [ Opt_WarnOverlappingPatterns, Opt_WarnWarningsDeprecations, Opt_WarnDeprecatedFlags, Opt_WarnDeferredTypeErrors, Opt_WarnTypedHoles, Opt_WarnPartialTypeSignatures, Opt_WarnUnrecognisedPragmas, Opt_War...
848
true
true
0
7
258
97
63
34
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/WorkSpacesWorkspace.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspaces-workspace.html#cfn-workspaces-workspace-tags wswTags :: Lens' WorkSpacesWorkspace (Maybe [Tag]) wswTags = lens _workSpacesWorkspaceTags (\s a -> s { _workSpacesWorkspaceTags = a })
271
wswTags :: Lens' WorkSpacesWorkspace (Maybe [Tag]) wswTags = lens _workSpacesWorkspaceTags (\s a -> s { _workSpacesWorkspaceTags = a })
135
wswTags = lens _workSpacesWorkspaceTags (\s a -> s { _workSpacesWorkspaceTags = a })
84
true
true
0
9
21
49
27
22
null
null
Quid2/model
src/Data/Model/Class.hs
bsd-3-clause
notThere :: t notThere = error "this should be never called"
60
notThere :: t notThere = error "this should be never called"
60
notThere = error "this should be never called"
46
false
true
0
6
10
21
8
13
null
null
kim/amazonka
amazonka-lambda/gen/Network/AWS/Lambda/ListEventSourceMappings.hs
mpl-2.0
-- | Optional integer. Specifies the maximum number of event sources to return in -- response. This value must be greater than 0. lesmMaxItems :: Lens' ListEventSourceMappings (Maybe Natural) lesmMaxItems = lens _lesmMaxItems (\s a -> s { _lesmMaxItems = a }) . mapping _Nat
274
lesmMaxItems :: Lens' ListEventSourceMappings (Maybe Natural) lesmMaxItems = lens _lesmMaxItems (\s a -> s { _lesmMaxItems = a }) . mapping _Nat
144
lesmMaxItems = lens _lesmMaxItems (\s a -> s { _lesmMaxItems = a }) . mapping _Nat
82
true
true
0
10
44
54
29
25
null
null
thoughtpolice/hs-asai
examples/Printf.hs
mit
str :: String -> String str x = x
33
str :: String -> String str x = x
33
str x = x
9
false
true
0
5
8
18
9
9
null
null
olsner/ghc
testsuite/tests/perf/compiler/T10370.hs
bsd-3-clause
a142 :: IO (); a142 = forever $ putStrLn "a142"
47
a142 :: IO () a142 = forever $ putStrLn "a142"
46
a142 = forever $ putStrLn "a142"
32
false
true
0
6
9
24
12
12
null
null
triplepointfive/soten
src/Codec/Soten/Parser/ObjParser.hs
mit
-- | A comment, ignore the whole line. comment :: Parser () comment = char '#' *> eol
85
comment :: Parser () comment = char '#' *> eol
46
comment = char '#' *> eol
25
true
true
0
6
17
24
12
12
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
affectedly = id
15
affectedly = id
15
affectedly = id
15
false
false
0
4
2
6
3
3
null
null
dmbarbour/Sirea
src/Sirea/Internal/LTypes.hs
bsd-3-clause
ln_toList' fn (LnkProd x y) xs = ln_toList' fn x (ln_toList' fn y xs)
69
ln_toList' fn (LnkProd x y) xs = ln_toList' fn x (ln_toList' fn y xs)
69
ln_toList' fn (LnkProd x y) xs = ln_toList' fn x (ln_toList' fn y xs)
69
false
false
0
7
13
38
18
20
null
null
lally/xmonad-reenberg
XMonad/Core.hs
bsd-3-clause
atom_WM_STATE = getAtom "WM_STATE"
44
atom_WM_STATE = getAtom "WM_STATE"
44
atom_WM_STATE = getAtom "WM_STATE"
44
false
false
0
5
13
9
4
5
null
null
forste/haReFork
refactorer/RefacUnGuard.hs
bsd-3-clause
isConstant (Pat (HsPLit _ _)) = True
36
isConstant (Pat (HsPLit _ _)) = True
36
isConstant (Pat (HsPLit _ _)) = True
36
false
false
0
9
6
23
11
12
null
null
tolysz/prepare-ghcjs
spec-lts8/base/GHC/IO/Handle/FD.hs
bsd-3-clause
stderr = unsafePerformIO $ do -- ToDo: acquire lock setBinaryMode FD.stderr enc <- getLocaleEncoding mkHandle FD.stderr "<stderr>" WriteHandle False{-stderr is unbuffered-} (Just enc) nativeNewlineMode{-translate newlines-} (Just stdHandleFinalizer) Nothing
319
stderr = unsafePerformIO $ do -- ToDo: acquire lock setBinaryMode FD.stderr enc <- getLocaleEncoding mkHandle FD.stderr "<stderr>" WriteHandle False{-stderr is unbuffered-} (Just enc) nativeNewlineMode{-translate newlines-} (Just stdHandleFinalizer) Nothing
319
stderr = unsafePerformIO $ do -- ToDo: acquire lock setBinaryMode FD.stderr enc <- getLocaleEncoding mkHandle FD.stderr "<stderr>" WriteHandle False{-stderr is unbuffered-} (Just enc) nativeNewlineMode{-translate newlines-} (Just stdHandleFinalizer) Nothing
319
false
false
0
10
89
62
30
32
null
null
diku-dk/futhark
src/Futhark/Optimise/Fusion/LoopKernel.hs
isc
newKernel :: StmAux () -> SOAC -> Names -> [VName] -> Scope SOACS -> FusedKer newKernel aux soac consumed out_nms scope = FusedKer { fsoac = soac, inplace = consumed, fusedVars = [], fusedConsumed = consumed, outputTransform = SOAC.noTransforms, outNames = out_nms, kernelScope ...
353
newKernel :: StmAux () -> SOAC -> Names -> [VName] -> Scope SOACS -> FusedKer newKernel aux soac consumed out_nms scope = FusedKer { fsoac = soac, inplace = consumed, fusedVars = [], fusedConsumed = consumed, outputTransform = SOAC.noTransforms, outNames = out_nms, kernelScope ...
353
newKernel aux soac consumed out_nms scope = FusedKer { fsoac = soac, inplace = consumed, fusedVars = [], fusedConsumed = consumed, outputTransform = SOAC.noTransforms, outNames = out_nms, kernelScope = scope, kerAux = aux }
275
false
true
0
10
100
107
61
46
null
null
forsyde/forsyde-atom
src/ForSyDe/Atom/MoC/SY/Clocked.hs
bsd-3-clause
comb12 = SY.comb12 . B.res12
28
comb12 = SY.comb12 . B.res12
28
comb12 = SY.comb12 . B.res12
28
false
false
0
6
4
14
7
7
null
null
stevenremot/fronsduk
src/Assembler.hs
gpl-3.0
getOperator "Print" = Print
27
getOperator "Print" = Print
27
getOperator "Print" = Print
27
false
false
0
5
3
9
4
5
null
null
vikraman/ghc
compiler/prelude/THNames.hs
bsd-3-clause
ruleBndrQTyConName = libTc (fsLit "RuleBndrQ") ruleBndrQTyConKey
74
ruleBndrQTyConName = libTc (fsLit "RuleBndrQ") ruleBndrQTyConKey
74
ruleBndrQTyConName = libTc (fsLit "RuleBndrQ") ruleBndrQTyConKey
74
false
false
0
7
15
17
8
9
null
null
christiaanb/ghc
compiler/hsSyn/HsTypes.hs
bsd-3-clause
splitHsAppTys (L _ (HsParTy f)) as = splitHsAppTys f as
57
splitHsAppTys (L _ (HsParTy f)) as = splitHsAppTys f as
57
splitHsAppTys (L _ (HsParTy f)) as = splitHsAppTys f as
57
false
false
0
9
11
30
14
16
null
null
YoshikuniJujo/funpaala
samples/21_adt/cpd.hs
bsd-3-clause
point1 :: Cartesian point1 = Cartesian 8 5
42
point1 :: Cartesian point1 = Cartesian 8 5
42
point1 = Cartesian 8 5
22
false
true
0
6
7
22
9
13
null
null
brow/noise
src/Text/Noise/Parser.hs
mit
keywordArgument :: Parser AST.Argument keywordArgument = ranged $ AST.KeywordArgument <$> try (Token.identifier <* Token.symbol ":") <*> expression
151
keywordArgument :: Parser AST.Argument keywordArgument = ranged $ AST.KeywordArgument <$> try (Token.identifier <* Token.symbol ":") <*> expression
151
keywordArgument = ranged $ AST.KeywordArgument <$> try (Token.identifier <* Token.symbol ":") <*> expression
112
false
true
6
8
20
55
25
30
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | Identifies what kind of resource this is. Value: the fixed string -- \"dfareporting#accountPermissionsListResponse\". aplrKind :: Lens' AccountPermissionsListResponse (Maybe Text) aplrKind = lens _aplrKind (\ s a -> s{_aplrKind = a})
238
aplrKind :: Lens' AccountPermissionsListResponse (Maybe Text) aplrKind = lens _aplrKind (\ s a -> s{_aplrKind = a})
115
aplrKind = lens _aplrKind (\ s a -> s{_aplrKind = a})
53
true
true
1
9
31
52
26
26
null
null
thiagorp/deployments-web
app/v1/Api.hs
bsd-3-clause
server :: Server Api server = Projects.server
45
server :: Server Api server = Projects.server
45
server = Projects.server
24
false
true
0
6
6
22
9
13
null
null
ku-fpg/blank-canvas
Graphics/Blank/Style.hs
bsd-3-clause
-- | @#3CB371@, @rgb(60, 179, 113)@, @hsl(147, 50%, 47%)@ mediumseagreen :: Colour Double mediumseagreen = Names.mediumseagreen
127
mediumseagreen :: Colour Double mediumseagreen = Names.mediumseagreen
69
mediumseagreen = Names.mediumseagreen
37
true
true
0
5
15
17
9
8
null
null
allanderek/ipclib
Language/Pepa/Probes/Syntax.hs
gpl-2.0
{-| Computes the set of actions names which are explicitly used at the beginning of a stochastic probe. -} firstNames :: ProbeR -> Set ActionIdentifier firstNames (SPact act) = Set.singleton act
221
firstNames :: ProbeR -> Set ActionIdentifier firstNames (SPact act) = Set.singleton act
104
firstNames (SPact act) = Set.singleton act
59
true
true
0
9
57
37
17
20
null
null
Dlackware/dlackware
lib/Slackware/CompileOrder.hs
gpl-3.0
line :: GenParser (Maybe Step) line = emptyLine <|> comment <|> package
77
line :: GenParser (Maybe Step) line = emptyLine <|> comment <|> package
77
line = emptyLine <|> comment <|> package
46
false
true
0
7
17
28
14
14
null
null
DougBurke/swish
src/Swish/VarBinding.hs
lgpl-2.1
------------------------------------------------------------ -- Declare some generally useful query binding filters ------------------------------------------------------------ -- |This function generates a query binding filter that ensures that -- two indicated query variables are mapped to the same value. varFilte...
437
varFilterEQ :: (Eq b) => a -> a -> VarBindingFilter a b varFilterEQ = makeVarCompareFilter (swishName "varFilterEQ") (==)
125
varFilterEQ = makeVarCompareFilter (swishName "varFilterEQ") (==)
69
true
true
0
8
56
51
29
22
null
null
bitemyapp/ghc
compiler/deSugar/Coverage.hs
bsd-3-clause
mkBinTickBoxHpc :: (Bool -> BoxLabel) -> SrcSpan -> LHsExpr Id -> TM (LHsExpr Id) mkBinTickBoxHpc boxLabel pos e = TM $ \ env st -> let meT = (pos,declPath env, [],boxLabel True) meF = (pos,declPath env, [],boxLabel False) meE = (pos,declPath env, [],ExpBox False) c = tickBoxCount s...
668
mkBinTickBoxHpc :: (Bool -> BoxLabel) -> SrcSpan -> LHsExpr Id -> TM (LHsExpr Id) mkBinTickBoxHpc boxLabel pos e = TM $ \ env st -> let meT = (pos,declPath env, [],boxLabel True) meF = (pos,declPath env, [],boxLabel False) meE = (pos,declPath env, [],ExpBox False) c = tickBoxCount s...
668
mkBinTickBoxHpc boxLabel pos e = TM $ \ env st -> let meT = (pos,declPath env, [],boxLabel True) meF = (pos,declPath env, [],boxLabel False) meE = (pos,declPath env, [],ExpBox False) c = tickBoxCount st mes = mixEntries st in ( L pos $ HsTick (HpcTick (this_mod env) c) $ L pos ...
570
false
true
0
17
225
255
135
120
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/course/2014-07-utrecht/src/Assignment3.hs
unlicense
fproduct fa = let (Product result) = foldMap Product fa in result
65
fproduct fa = let (Product result) = foldMap Product fa in result
65
fproduct fa = let (Product result) = foldMap Product fa in result
65
false
false
1
10
11
36
14
22
null
null
thalerjonathan/phd
coding/learning/haskell/grahambook/Code_Solutions/tictactoe.hs
gpl-3.0
run' :: Grid -> Player -> IO () run' g p | wins O g = putStrLn "Player O wins!\n" | wins X g = putStrLn "Player X wins!\n" | full g = putStrLn "It's a draw!\n" | otherwise = do i <- getNat (prompt p) case move g i p of [] -> do putStrL...
427
run' :: Grid -> Player -> IO () run' g p | wins O g = putStrLn "Player O wins!\n" | wins X g = putStrLn "Player X wins!\n" | full g = putStrLn "It's a draw!\n" | otherwise = do i <- getNat (prompt p) case move g i p of [] -> do putStrL...
427
run' g p | wins O g = putStrLn "Player O wins!\n" | wins X g = putStrLn "Player X wins!\n" | full g = putStrLn "It's a draw!\n" | otherwise = do i <- getNat (prompt p) case move g i p of [] -> do putStrLn "ERROR: Invalid move" ...
395
false
true
0
13
203
156
68
88
null
null
jgalat0/bot
src/Check.hs
gpl-3.0
isNumberNormal _ = False
33
isNumberNormal _ = False
33
isNumberNormal _ = False
33
false
false
0
5
12
9
4
5
null
null
forste/haReFork
StrategyLib-4.0-beta/examples/joos-rule02/Parser.hs
bsd-3-clause
parsePrefixOperator = do { parseSymbol "-"; return Neg } +++ do { parseSymbol "!"; return Fac }
105
parsePrefixOperator = do { parseSymbol "-"; return Neg } +++ do { parseSymbol "!"; return Fac }
105
parsePrefixOperator = do { parseSymbol "-"; return Neg } +++ do { parseSymbol "!"; return Fac }
105
false
false
1
9
26
44
19
25
null
null
juhp/haskal
src/Haskal/Shell.hs
gpl-2.0
newJob :: String -> Shell Job newJob cmdLine = do (jid:jids) <- gets shellJobIDs modify $ shellJobIDs_s jids return $ Job { jobID = jid , jobProcs = [] , jobPgid = 0 , jobAttrs = Nothing , jobCmdLine = cmdLine , jobStatus = Jo...
466
newJob :: String -> Shell Job newJob cmdLine = do (jid:jids) <- gets shellJobIDs modify $ shellJobIDs_s jids return $ Job { jobID = jid , jobProcs = [] , jobPgid = 0 , jobAttrs = Nothing , jobCmdLine = cmdLine , jobStatus = Jo...
466
newJob cmdLine = do (jid:jids) <- gets shellJobIDs modify $ shellJobIDs_s jids return $ Job { jobID = jid , jobProcs = [] , jobPgid = 0 , jobAttrs = Nothing , jobCmdLine = cmdLine , jobStatus = JobRunning } -- ...
436
false
true
0
10
179
97
53
44
null
null
jotrk/zalora
DataStore.hs
bsd-2-clause
putItemWithKey :: StoreCtx -> Key -> Item Key -> IO () putItemWithKey (StoreCtx c _) (Key k) items = void $ withTransaction c $ \c' -> run c' "INSERT INTO items VALUES (?, ?, ?, ?, ?);" $ values items where values = (toSql k :) . itemToSqlValue
252
putItemWithKey :: StoreCtx -> Key -> Item Key -> IO () putItemWithKey (StoreCtx c _) (Key k) items = void $ withTransaction c $ \c' -> run c' "INSERT INTO items VALUES (?, ?, ?, ?, ?);" $ values items where values = (toSql k :) . itemToSqlValue
252
putItemWithKey (StoreCtx c _) (Key k) items = void $ withTransaction c $ \c' -> run c' "INSERT INTO items VALUES (?, ?, ?, ?, ?);" $ values items where values = (toSql k :) . itemToSqlValue
197
false
true
1
11
55
108
49
59
null
null
forste/haReFork
tools/pfe/tstpfe1.hs
bsd-3-clause
main = pfe1 parse =<< getArgs
29
main = pfe1 parse =<< getArgs
29
main = pfe1 parse =<< getArgs
29
false
false
0
6
5
13
6
7
null
null
cmahon/interactive-brokers
library/API/IB/Data.hs
bsd-3-clause
parseTickPrice :: Parser [IBResponse] parseTickPrice = do v <- parseVersion tid <- parseIntField tt <- parseField parseIBTickType -- let stt = Map.lookup tt $ Map.fromList [(Bid,BidSize),(Ask,AskSize),(Last,LastSize)] p <- fromMaybe 0 <$> parseMaybeDecimalField _ <- if v >= 2 then parseIntField else retur...
516
parseTickPrice :: Parser [IBResponse] parseTickPrice = do v <- parseVersion tid <- parseIntField tt <- parseField parseIBTickType -- let stt = Map.lookup tt $ Map.fromList [(Bid,BidSize),(Ask,AskSize),(Last,LastSize)] p <- fromMaybe 0 <$> parseMaybeDecimalField _ <- if v >= 2 then parseIntField else retur...
516
parseTickPrice = do v <- parseVersion tid <- parseIntField tt <- parseField parseIBTickType -- let stt = Map.lookup tt $ Map.fromList [(Bid,BidSize),(Ask,AskSize),(Last,LastSize)] p <- fromMaybe 0 <$> parseMaybeDecimalField _ <- if v >= 2 then parseIntField else return 0 c <- if v >= 3 then parseBoolBin...
478
false
true
0
9
96
119
57
62
null
null
Sgoettschkes/learning
haskell/exercism/grains/Grains.hs
mit
square a = 2 ^ (a - 1)
22
square a = 2 ^ (a - 1)
22
square a = 2 ^ (a - 1)
22
false
false
0
7
7
20
10
10
null
null
brendanhay/gogol
gogol-run/gen/Network/Google/Run/Types/Product.hs
mpl-2.0
-- | The kind of this resource, in this case \"ServiceList\". lsrKind :: Lens' ListServicesResponse (Maybe Text) lsrKind = lens _lsrKind (\ s a -> s{_lsrKind = a})
163
lsrKind :: Lens' ListServicesResponse (Maybe Text) lsrKind = lens _lsrKind (\ s a -> s{_lsrKind = a})
101
lsrKind = lens _lsrKind (\ s a -> s{_lsrKind = a})
50
true
true
0
9
27
46
25
21
null
null
jsavatgy/xroads-game
code/circle-area-demo.hs
gpl-2.0
grey n = RGB n n n
18
grey n = RGB n n n
18
grey n = RGB n n n
18
false
false
0
5
6
16
7
9
null
null
flipstone/orville
orville-postgresql/src/Database/Orville/PostgreSQL/Internal/Expr/NameExpr.hs
mit
unescapedName :: NameForm -> String unescapedName (NameForm Nothing name) = name
80
unescapedName :: NameForm -> String unescapedName (NameForm Nothing name) = name
80
unescapedName (NameForm Nothing name) = name
44
false
true
0
9
10
32
14
18
null
null
schell/lamdu
bottlelib/Graphics/UI/Bottle/Widgets/TextEdit.hs
gpl-3.0
rightSideOfRect :: Rect -> Rect rightSideOfRect rect = rect & Rect.left .~ rect ^. Rect.right & Rect.width .~ 0
117
rightSideOfRect :: Rect -> Rect rightSideOfRect rect = rect & Rect.left .~ rect ^. Rect.right & Rect.width .~ 0
117
rightSideOfRect rect = rect & Rect.left .~ rect ^. Rect.right & Rect.width .~ 0
85
false
true
4
7
24
47
22
25
null
null
RaminHAL9001/inf-interval
src/Numeric/Interval/Infinite.hs
gpl-3.0
toBoundedPair :: Bounded c => Interval c -> (c, c) toBoundedPair seg = case seg of Single lo -> (toBounded lo, toBounded lo) Interval lo hi -> (toBounded lo, toBounded hi)
180
toBoundedPair :: Bounded c => Interval c -> (c, c) toBoundedPair seg = case seg of Single lo -> (toBounded lo, toBounded lo) Interval lo hi -> (toBounded lo, toBounded hi)
180
toBoundedPair seg = case seg of Single lo -> (toBounded lo, toBounded lo) Interval lo hi -> (toBounded lo, toBounded hi)
129
false
true
9
9
39
85
40
45
null
null
qpliu/esolang
01_/hs/compiler2/0c.hs
gpl-3.0
parseArgs ("-s":"-m":mainFunc:srcFiles@(_:_)) = Just (outAsm,mainFunc,srcFiles)
83
parseArgs ("-s":"-m":mainFunc:srcFiles@(_:_)) = Just (outAsm,mainFunc,srcFiles)
83
parseArgs ("-s":"-m":mainFunc:srcFiles@(_:_)) = Just (outAsm,mainFunc,srcFiles)
83
false
false
0
12
8
46
25
21
null
null
bergmark/hlint
src/HSE/Match.hs
bsd-3-clause
isSym (x:_) = not $ isAlpha x || x `elem` "_'"
46
isSym (x:_) = not $ isAlpha x || x `elem` "_'"
46
isSym (x:_) = not $ isAlpha x || x `elem` "_'"
46
false
false
0
8
10
34
17
17
null
null
happlebao/Core-Haskell
SyntaxChecker.hs
bsd-3-clause
isCoreBinds _ src (BDecls _) = Left (NotAllowed "BDecls" src)
61
isCoreBinds _ src (BDecls _) = Left (NotAllowed "BDecls" src)
61
isCoreBinds _ src (BDecls _) = Left (NotAllowed "BDecls" src)
61
false
false
1
7
9
33
14
19
null
null
sopvop/snap-core
test/Snap/Util/FileUploads/Tests.hs
bsd-3-clause
testBadParses :: Test testBadParses = testCase "fileUploads/badParses" $ do harness tmpdir hndl mixedTestBodyWithBadTypes where tmpdir = "tempdir_bad_types" hndl = do xs <- handleFileUploads tmpdir defaultUploadPolicy (co...
1,671
testBadParses :: Test testBadParses = testCase "fileUploads/badParses" $ do harness tmpdir hndl mixedTestBodyWithBadTypes where tmpdir = "tempdir_bad_types" hndl = do xs <- handleFileUploads tmpdir defaultUploadPolicy (co...
1,671
testBadParses = testCase "fileUploads/badParses" $ do harness tmpdir hndl mixedTestBodyWithBadTypes where tmpdir = "tempdir_bad_types" hndl = do xs <- handleFileUploads tmpdir defaultUploadPolicy (const $ allowWithMaximum...
1,649
false
true
3
14
642
408
183
225
null
null
input-output-hk/pos-haskell-prototype
client/src/Pos/Client/Txp/Util.hs
mit
fixedToFee :: (MonadError TxError m, HasResolution a) => Fixed a -> m TxFee fixedToFee = integerToFee . ceiling
111
fixedToFee :: (MonadError TxError m, HasResolution a) => Fixed a -> m TxFee fixedToFee = integerToFee . ceiling
111
fixedToFee = integerToFee . ceiling
35
false
true
0
7
17
42
21
21
null
null
nushio3/ghc
compiler/main/DynFlags.hs
bsd-3-clause
wayGeneralFlags _ WayEventLog = []
34
wayGeneralFlags _ WayEventLog = []
34
wayGeneralFlags _ WayEventLog = []
34
false
false
0
5
4
13
6
7
null
null
shlevy/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
promotedEQDataCon = promoteDataCon eqDataCon
48
promotedEQDataCon = promoteDataCon eqDataCon
48
promotedEQDataCon = promoteDataCon eqDataCon
48
false
false
0
5
7
9
4
5
null
null
cullina/Extractor
src/LevOps.hs
bsd-3-clause
allSingleInsertions (b:bs) = (not b : b : bs) : map (b :) (allSingleInsertions bs)
82
allSingleInsertions (b:bs) = (not b : b : bs) : map (b :) (allSingleInsertions bs)
82
allSingleInsertions (b:bs) = (not b : b : bs) : map (b :) (allSingleInsertions bs)
82
false
false
0
9
14
49
25
24
null
null
tolysz/dsp
Numeric/Transform/Fourier/SlidingFFT.hs
gpl-2.0
sfft n (x:xs) = x' : sfft' n x xs x' where x' = fft $ listArray (0,n-1) $ reverse $ take n (x:xs)
103
sfft n (x:xs) = x' : sfft' n x xs x' where x' = fft $ listArray (0,n-1) $ reverse $ take n (x:xs)
103
sfft n (x:xs) = x' : sfft' n x xs x' where x' = fft $ listArray (0,n-1) $ reverse $ take n (x:xs)
103
false
false
0
10
29
76
38
38
null
null
beni55/snap-server
test/suite/Snap/Internal/Http/Parser/Tests.hs
bsd-3-clause
stream2stream :: (Monad m) => Iteratee ByteString m L.ByteString stream2stream = liftM L.fromChunks consume
107
stream2stream :: (Monad m) => Iteratee ByteString m L.ByteString stream2stream = liftM L.fromChunks consume
107
stream2stream = liftM L.fromChunks consume
42
false
true
0
7
13
36
18
18
null
null
rumuki/rumuki-server
test/TestExtension.hs
gpl-3.0
runDBWithApp :: App -> SqlPersistM a -> IO a runDBWithApp app query = runSqlPersistMPool query (appConnPool app)
112
runDBWithApp :: App -> SqlPersistM a -> IO a runDBWithApp app query = runSqlPersistMPool query (appConnPool app)
112
runDBWithApp app query = runSqlPersistMPool query (appConnPool app)
67
false
true
0
7
16
41
19
22
null
null
Peaker/gridview
src/Main.hs
bsd-3-clause
keyPressed GLFW.KeyRight True = Scroller.sMovementDelta .~ 10
61
keyPressed GLFW.KeyRight True = Scroller.sMovementDelta .~ 10
61
keyPressed GLFW.KeyRight True = Scroller.sMovementDelta .~ 10
61
false
false
0
6
6
19
9
10
null
null
rahulmutt/ghcvm
compiler/Eta/Utils/Outputable.hs
bsd-3-clause
arrow = unicodeSyntax (char '→') (docToSDoc $ Pretty.ptext (sLit "->"))
76
arrow = unicodeSyntax (char '→') (docToSDoc $ Pretty.ptext (sLit "->"))
76
arrow = unicodeSyntax (char '→') (docToSDoc $ Pretty.ptext (sLit "->"))
76
false
false
0
10
14
35
17
18
null
null
GaloisInc/halvm-ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
ppr_expr (HsLamCase _ matches) = sep [ sep [text "\\case {"], nest 2 (pprMatches (CaseAlt :: HsMatchContext id) matches <+> char '}') ]
147
ppr_expr (HsLamCase _ matches) = sep [ sep [text "\\case {"], nest 2 (pprMatches (CaseAlt :: HsMatchContext id) matches <+> char '}') ]
147
ppr_expr (HsLamCase _ matches) = sep [ sep [text "\\case {"], nest 2 (pprMatches (CaseAlt :: HsMatchContext id) matches <+> char '}') ]
147
false
false
0
12
34
64
31
33
null
null
kelnage/tamarin-prover
lib/term/src/Term/Builtin/Convenience.hs
gpl-3.0
aenc (a,b) = fAppNoEq aencSym [a,b]
41
aenc (a,b) = fAppNoEq aencSym [a,b]
41
aenc (a,b) = fAppNoEq aencSym [a,b]
41
false
false
0
6
11
27
14
13
null
null
fmapfmapfmap/amazonka
amazonka-support/gen/Network/AWS/Support/Types/Product.hs
mpl-2.0
-- | The number of AWS resources ignored by Trusted Advisor because they were -- marked as suppressed by the user. tarsResourcesSuppressed :: Lens' TrustedAdvisorResourcesSummary Integer tarsResourcesSuppressed = lens _tarsResourcesSuppressed (\ s a -> s{_tarsResourcesSuppressed = a})
285
tarsResourcesSuppressed :: Lens' TrustedAdvisorResourcesSummary Integer tarsResourcesSuppressed = lens _tarsResourcesSuppressed (\ s a -> s{_tarsResourcesSuppressed = a})
170
tarsResourcesSuppressed = lens _tarsResourcesSuppressed (\ s a -> s{_tarsResourcesSuppressed = a})
98
true
true
0
9
36
41
23
18
null
null
kmate/HaRe
old/testing/introCase/InfixIn1AST.hs
bsd-3-clause
f ((x :* xs)) = case xs of xs@[] -> x + (head xs) xs@(b_1 : b_2) -> x + (head xs)
111
f ((x :* xs)) = case xs of xs@[] -> x + (head xs) xs@(b_1 : b_2) -> x + (head xs)
111
f ((x :* xs)) = case xs of xs@[] -> x + (head xs) xs@(b_1 : b_2) -> x + (head xs)
111
false
false
0
10
51
71
37
34
null
null
co-dan/NPNTool
src/NPNTool/Bisimilarity.hs
bsd-3-clause
nodeFromLab :: NodeMap PTMark -> PTMark -> Node nodeFromLab nm m = case lookupNode nm m of Just (n,_) -> n Nothing -> error "Marking not reachable"
154
nodeFromLab :: NodeMap PTMark -> PTMark -> Node nodeFromLab nm m = case lookupNode nm m of Just (n,_) -> n Nothing -> error "Marking not reachable"
154
nodeFromLab nm m = case lookupNode nm m of Just (n,_) -> n Nothing -> error "Marking not reachable"
106
false
true
3
6
33
59
29
30
null
null
fadeopolis/prog-spr-ue3
Trains.hs
bsd-3-clause
num_seats_01 = 20
17
num_seats_01 = 20
17
num_seats_01 = 20
17
false
false
0
4
2
6
3
3
null
null
shlevy/ghc
testsuite/tests/pmcheck/should_compile/EmptyCase001.hs
bsd-3-clause
-- Non-exhaustive (do not unfold the alternatives) f3 :: Char -> a f3 x = case x of {}
86
f3 :: Char -> a f3 x = case x of {}
35
f3 x = case x of {}
19
true
true
0
7
18
30
15
15
null
null
cblp/python5
examples/data.hs
gpl-3.0
{- Compound Data Types Lists (known as arrays in other languages) are one of the compound data types that Python understands. Lists can be indexed, sliced and manipulated with other built-in functions. # Python 3: List comprehensions >>> fruits = ['Banana', 'Apple', 'Lime'] >>> loud_fruits...
792
main = do let fruits = ["Banana", "Apple", "Lime"] let loud_fruits = [fruit.upper | fruit <- fruits] print(loud_fruits) -- ["BANANA", "APPLE", "LIME"] print(list(enumerate(fruits))) -- [(0, "Banana"), (1, "Apple"), (2, "Lime")]
252
main = do let fruits = ["Banana", "Apple", "Lime"] let loud_fruits = [fruit.upper | fruit <- fruits] print(loud_fruits) -- ["BANANA", "APPLE", "LIME"] print(list(enumerate(fruits))) -- [(0, "Banana"), (1, "Apple"), (2, "Lime")]
252
true
false
1
13
177
83
41
42
null
null
urbanslug/ghc
compiler/nativeGen/PPC/Regs.hs
bsd-3-clause
fits16Bits :: Integral a => a -> Bool fits16Bits x = x >= -32768 && x < 32768
77
fits16Bits :: Integral a => a -> Bool fits16Bits x = x >= -32768 && x < 32768
77
fits16Bits x = x >= -32768 && x < 32768
39
false
true
0
8
17
39
19
20
null
null
ilseman2/yaml-light
Data/Yaml/YamlLight.hs
bsd-3-clause
testGetTerminalsKeys1 = performTest getTerminalsKeys gtKeys1
60
testGetTerminalsKeys1 = performTest getTerminalsKeys gtKeys1
60
testGetTerminalsKeys1 = performTest getTerminalsKeys gtKeys1
60
false
false
0
5
4
11
5
6
null
null
aslatter/xcb-types
Data/XCB/FromXML.hs
bsd-3-clause
-- operations in the 'Parse' monad localName :: Parse Name localName = snd `liftM` ask
87
localName :: Parse Name localName = snd `liftM` ask
51
localName = snd `liftM` ask
27
true
true
0
5
15
21
12
9
null
null
brendanhay/gogol
gogol-serviceusage/gen/Network/Google/ServiceUsage/Types/Product.hs
mpl-2.0
-- | Declares a single overview page. For example: documentation: summary: -- ... overview: (== include overview.md ==) This is a shortcut for the -- following declaration (using pages style): documentation: summary: ... -- pages: - name: Overview content: (== include overview.md ==) Note: you -- cannot specify both \`...
462
dOverview :: Lens' Documentation (Maybe Text) dOverview = lens _dOverview (\ s a -> s{_dOverview = a})
104
dOverview = lens _dOverview (\ s a -> s{_dOverview = a})
58
true
true
0
9
72
52
29
23
null
null
bb010g/aura
aura/exec/Aura/Flags.hs
gpl-3.0
buildConfig :: Parser BuildConfig buildConfig = BuildConfig <$> makepkg <*> bp <*> bu <*> asp <*> vp <*> trunc <*> buildSwitches where makepkg = S.fromList <$> many (ia <|> as <|> si) ia = flag' IgnoreArch (long "ignorearch" <> hidden <> help "Exposed makepkg flag.") as = flag' AllSource (lo...
1,386
buildConfig :: Parser BuildConfig buildConfig = BuildConfig <$> makepkg <*> bp <*> bu <*> asp <*> vp <*> trunc <*> buildSwitches where makepkg = S.fromList <$> many (ia <|> as <|> si) ia = flag' IgnoreArch (long "ignorearch" <> hidden <> help "Exposed makepkg flag.") as = flag' AllSource (lo...
1,386
buildConfig = BuildConfig <$> makepkg <*> bp <*> bu <*> asp <*> vp <*> trunc <*> buildSwitches where makepkg = S.fromList <$> many (ia <|> as <|> si) ia = flag' IgnoreArch (long "ignorearch" <> hidden <> help "Exposed makepkg flag.") as = flag' AllSource (long "allsource" <> hidden <> help "...
1,352
false
true
29
11
331
464
203
261
null
null
cordawyn/rdf4h
src/Text/RDF/RDF4H/TurtleParser.hs
bsd-3-clause
t_pn_chars :: GenParser ParseState Char t_pn_chars = t_pn_chars_u <|> char '-' <|> char '\x00B7' <|> satisfy f where f = flip in_range [('0', '9'), ('\x0300', '\x036F'), ('\x203F', '\x2040')]
197
t_pn_chars :: GenParser ParseState Char t_pn_chars = t_pn_chars_u <|> char '-' <|> char '\x00B7' <|> satisfy f where f = flip in_range [('0', '9'), ('\x0300', '\x036F'), ('\x203F', '\x2040')]
197
t_pn_chars = t_pn_chars_u <|> char '-' <|> char '\x00B7' <|> satisfy f where f = flip in_range [('0', '9'), ('\x0300', '\x036F'), ('\x203F', '\x2040')]
157
false
true
0
8
33
77
41
36
null
null
Marcus-Rosti/numerical-methods
src/ch_03/Ch_03.hs
gpl-2.0
gauss :: Matrix -> Vector -> Vector gauss a b = x where b' = map (\y -> [y]) b a' = zipWith (++) a b' x = resubstitute $ triangular a'
163
gauss :: Matrix -> Vector -> Vector gauss a b = x where b' = map (\y -> [y]) b a' = zipWith (++) a b' x = resubstitute $ triangular a'
163
gauss a b = x where b' = map (\y -> [y]) b a' = zipWith (++) a b' x = resubstitute $ triangular a'
127
false
true
2
8
60
85
40
45
null
null
urbanslug/ghc
testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.hs
bsd-3-clause
abs :: _ => _ abs = P.abs
25
abs :: _ => _ abs = P.abs
25
abs = P.abs
11
false
true
0
7
7
25
10
15
null
null
bobjflong/biblesearch-api-haskell
src/Bible/Request.hs
mit
requestOptions :: ApiKey -> Options requestOptions key = defaults & setAuth & setContentType & setAccept where setAuth = auth .~ (basicAuth (encodeUtf8 key) "X") setContentType = header "Content-Type" .~ ["application/json"] setAccept = header "Accept" .~ ["application/json"]
294
requestOptions :: ApiKey -> Options requestOptions key = defaults & setAuth & setContentType & setAccept where setAuth = auth .~ (basicAuth (encodeUtf8 key) "X") setContentType = header "Content-Type" .~ ["application/json"] setAccept = header "Accept" .~ ["application/json"]
294
requestOptions key = defaults & setAuth & setContentType & setAccept where setAuth = auth .~ (basicAuth (encodeUtf8 key) "X") setContentType = header "Content-Type" .~ ["application/json"] setAccept = header "Accept" .~ ["application/json"]
258
false
true
7
8
53
103
46
57
null
null
siddhanathan/yi
yi-core/src/Yi/Eval.hs
gpl-2.0
parseErrorMessageB :: BufferM (Maybe (String, Int, Int)) parseErrorMessageB = parseErrorMessage <$> readLnB
107
parseErrorMessageB :: BufferM (Maybe (String, Int, Int)) parseErrorMessageB = parseErrorMessage <$> readLnB
107
parseErrorMessageB = parseErrorMessage <$> readLnB
50
false
true
0
8
11
33
18
15
null
null
dylanmc/cryptol
sbv/Data/SBV/Bridge/CVC4.hs
bsd-3-clause
minimize :: (SatModel a, SymWord a, Show a, SymWord c, Show c) => OptimizeOpts -- ^ Parameters to optimization (Iterative, Quantified, etc.) -> ([SBV a] -> SBV c) -- ^ Cost function to minimize -> Int -- ^ Number of inputs -> ([SBV a] -...
523
minimize :: (SatModel a, SymWord a, Show a, SymWord c, Show c) => OptimizeOpts -- ^ Parameters to optimization (Iterative, Quantified, etc.) -> ([SBV a] -> SBV c) -- ^ Cost function to minimize -> Int -- ^ Number of inputs -> ([SBV a] -...
428
minimize = minimizeWith sbvCurrentSolver
40
true
true
0
13
186
109
58
51
null
null
acowley/ghc
compiler/main/ErrUtils.hs
bsd-3-clause
chooseDumpFile :: DynFlags -> DumpFlag -> Maybe String chooseDumpFile dflags flag | gopt Opt_DumpToFile dflags || flag == Opt_D_th_dec_file , Just prefix <- getPrefix = Just $ setDir (prefix ++ (beautifyDumpName flag)) | otherwise = Nothing where getPrefix ...
986
chooseDumpFile :: DynFlags -> DumpFlag -> Maybe String chooseDumpFile dflags flag | gopt Opt_DumpToFile dflags || flag == Opt_D_th_dec_file , Just prefix <- getPrefix = Just $ setDir (prefix ++ (beautifyDumpName flag)) | otherwise = Nothing where getPrefix ...
986
chooseDumpFile dflags flag | gopt Opt_DumpToFile dflags || flag == Opt_D_th_dec_file , Just prefix <- getPrefix = Just $ setDir (prefix ++ (beautifyDumpName flag)) | otherwise = Nothing where getPrefix -- dump file location is being forced ...
931
false
true
3
10
413
201
90
111
null
null
reedrosenbluth/othello
src/Game.hs
bsd-3-clause
pieces :: Board -> Line -> [Piece] pieces brd = map (brd !)
59
pieces :: Board -> Line -> [Piece] pieces brd = map (brd !)
59
pieces brd = map (brd !)
24
false
true
0
7
12
32
17
15
null
null
jvictor0/OnlineRandomForest
src/CART.hs
mit
new_CART_Tree params = do g <- newStdGen let (_,thresh) = new_tests params g return $ CART_Tree params $ createNode thresh (0,0,0)
136
new_CART_Tree params = do g <- newStdGen let (_,thresh) = new_tests params g return $ CART_Tree params $ createNode thresh (0,0,0)
136
new_CART_Tree params = do g <- newStdGen let (_,thresh) = new_tests params g return $ CART_Tree params $ createNode thresh (0,0,0)
136
false
false
0
10
26
65
31
34
null
null
themoritz/cabal
Cabal/Distribution/Simple/Setup.hs
bsd-3-clause
showProfDetailLevelFlag (Flag dl) = [showProfDetailLevel dl]
60
showProfDetailLevelFlag (Flag dl) = [showProfDetailLevel dl]
60
showProfDetailLevelFlag (Flag dl) = [showProfDetailLevel dl]
60
false
false
0
7
5
21
10
11
null
null
advancedtelematic/quickcheck-state-machine-model
test/UnionFind.hs
bsd-3-clause
precondition :: Model Symbolic -> Command Symbolic -> Logic precondition m@(Model model) cmd = case cmd of New _ -> Top Find ref -> ref `member` map fst model Union ref1 ref2 -> (ref1 `member` map fst model) .&& (ref2 `member` map fst model) .&& (m ! re...
336
precondition :: Model Symbolic -> Command Symbolic -> Logic precondition m@(Model model) cmd = case cmd of New _ -> Top Find ref -> ref `member` map fst model Union ref1 ref2 -> (ref1 `member` map fst model) .&& (ref2 `member` map fst model) .&& (m ! re...
336
precondition m@(Model model) cmd = case cmd of New _ -> Top Find ref -> ref `member` map fst model Union ref1 ref2 -> (ref1 `member` map fst model) .&& (ref2 `member` map fst model) .&& (m ! ref1 ./= m ! ref2)
276
false
true
11
9
118
117
62
55
null
null
k0001/reflex
src/Reflex/Spider/Internal.hs
bsd-3-clause
--TODO: Specialize readBehaviorTracked to the Nothing and Just cases runBehaviorM :: BehaviorM a -> Maybe (Weak Invalidator, IORef [SomeBehaviorSubscribed]) -> IO a runBehaviorM a mwi = runReaderT (unBehaviorM a) mwi
217
runBehaviorM :: BehaviorM a -> Maybe (Weak Invalidator, IORef [SomeBehaviorSubscribed]) -> IO a runBehaviorM a mwi = runReaderT (unBehaviorM a) mwi
147
runBehaviorM a mwi = runReaderT (unBehaviorM a) mwi
51
true
true
0
10
30
60
29
31
null
null
nikita-volkov/rebase
library/Rebase/Data/Bifunctor.hs
mit
mapLeft :: Bifunctor p => (a -> b) -> p a c -> p b c mapLeft = first
70
mapLeft :: Bifunctor p => (a -> b) -> p a c -> p b c mapLeft = first
70
mapLeft = first
17
false
true
0
9
20
49
22
27
null
null
ktvoelker/brick
src/Brick/Widgets/Dialog.hs
bsd-3-clause
-- | The attribute for the selected dialog button (extends 'dialogAttr') buttonSelectedAttr :: AttrName buttonSelectedAttr = buttonAttr <> "selected"
149
buttonSelectedAttr :: AttrName buttonSelectedAttr = buttonAttr <> "selected"
76
buttonSelectedAttr = buttonAttr <> "selected"
45
true
true
0
5
18
16
9
7
null
null
shangaslammi/haskeroids
Haskeroids/Player.hs
mit
shipPoints :: [Vec2] shipPoints = map (uncurry polar . multiply) points where multiply = (shipSize*) *** (pi*) points = [ (1.0, 0.0) , (1.0, 0.7) , (0.2, 1.0) , (1.0, 1.3) , (1.0, 0.0) ]
238
shipPoints :: [Vec2] shipPoints = map (uncurry polar . multiply) points where multiply = (shipSize*) *** (pi*) points = [ (1.0, 0.0) , (1.0, 0.7) , (0.2, 1.0) , (1.0, 1.3) , (1.0, 0.0) ]
238
shipPoints = map (uncurry polar . multiply) points where multiply = (shipSize*) *** (pi*) points = [ (1.0, 0.0) , (1.0, 0.7) , (0.2, 1.0) , (1.0, 1.3) , (1.0, 0.0) ]
217
false
true
0
8
86
98
60
38
null
null
osa1/chsc
Supercompile/Match.hs
bsd-3-clause
matchInTerm' _ _ _ = fail "matchInTerm'"
40
matchInTerm' _ _ _ = fail "matchInTerm'"
40
matchInTerm' _ _ _ = fail "matchInTerm'"
40
false
false
1
5
6
17
6
11
null
null
Tomsik/SpaceHegemony
src/Fleet.hs
gpl-3.0
battleFleets' :: Maybe Fleet -> Maybe Fleet -> Maybe Fleet battleFleets' Nothing Nothing = Nothing
98
battleFleets' :: Maybe Fleet -> Maybe Fleet -> Maybe Fleet battleFleets' Nothing Nothing = Nothing
98
battleFleets' Nothing Nothing = Nothing
39
false
true
0
7
14
38
16
22
null
null
fmthoma/ghc
compiler/hsSyn/HsTypes.hs
bsd-3-clause
mk_forall_ty ann l exp extra tvs (L lp (HsParTy ty)) = mk_forall_ty (ann ++ mkParensApiAnn lp) l exp extra tvs ty
117
mk_forall_ty ann l exp extra tvs (L lp (HsParTy ty)) = mk_forall_ty (ann ++ mkParensApiAnn lp) l exp extra tvs ty
117
mk_forall_ty ann l exp extra tvs (L lp (HsParTy ty)) = mk_forall_ty (ann ++ mkParensApiAnn lp) l exp extra tvs ty
117
false
false
0
9
24
56
27
29
null
null
Saulzar/ghcjs-websockets-reflex
src/JavaScript/WebSockets/Reflex/WebSocket.hs
mit
delayMs :: MonadWidget t m => Int -> Event t a -> m (Event t a) delayMs ms = forkEventAsync (\a -> threadDelay ms >> return a)
126
delayMs :: MonadWidget t m => Int -> Event t a -> m (Event t a) delayMs ms = forkEventAsync (\a -> threadDelay ms >> return a)
126
delayMs ms = forkEventAsync (\a -> threadDelay ms >> return a)
62
false
true
0
10
26
68
32
36
null
null
cheng81/schemish
src/SpecialForm.hs
bsd-3-clause
defFrm env [Atom var, form] = eval env form >>= defineVar env var
65
defFrm env [Atom var, form] = eval env form >>= defineVar env var
65
defFrm env [Atom var, form] = eval env form >>= defineVar env var
65
false
false
0
6
12
36
16
20
null
null
DSLsofMath/Hatlab
src/Hatlab/Expression.hs
bsd-3-clause
evalFun (Pow a b) x = do a' <- evalFun a x guard (a' >= 0) b' <- evalFun b x return (a' ** b')
102
evalFun (Pow a b) x = do a' <- evalFun a x guard (a' >= 0) b' <- evalFun b x return (a' ** b')
102
evalFun (Pow a b) x = do a' <- evalFun a x guard (a' >= 0) b' <- evalFun b x return (a' ** b')
102
false
false
1
10
32
74
31
43
null
null
dsabel/stmshf
Control/Concurrent/SHFSTM/Internal.hs
bsd-3-clause
globalRetry :: TLOG -- ^ the transaction log -> IO () globalRetry (TLOG tlog) = catch ( do mid <- myThreadId uninterruptibleMask_ (retryCGlobWithLog (TLOG tlog)) #ifdef DEBUG sPutStrLn (show mid ++ " finished retryCGlob") #endif uninterruptibleMask_ (retryEndWithLog (TLO...
470
globalRetry :: TLOG -- ^ the transaction log -> IO () globalRetry (TLOG tlog) = catch ( do mid <- myThreadId uninterruptibleMask_ (retryCGlobWithLog (TLOG tlog)) #ifdef DEBUG sPutStrLn (show mid ++ " finished retryCGlob") #endif uninterruptibleMask_ (retryEndWithLog (TLOG...
469
globalRetry (TLOG tlog) = catch ( do mid <- myThreadId uninterruptibleMask_ (retryCGlobWithLog (TLOG tlog)) #ifdef DEBUG sPutStrLn (show mid ++ " finished retryCGlob") #endif uninterruptibleMask_ (retryEndWithLog (TLOG tlog)) #ifdef DEBUG sPutStrLn (show mid ++...
403
false
true
0
12
131
138
67
71
null
null
simonmichael/shelltestrunner
src/Print.hs
gpl-3.0
printCommand :: String -> TestCommand -> IO () printCommand prefix (ReplaceableCommand s) = printf "%s%s\n" prefix s
116
printCommand :: String -> TestCommand -> IO () printCommand prefix (ReplaceableCommand s) = printf "%s%s\n" prefix s
116
printCommand prefix (ReplaceableCommand s) = printf "%s%s\n" prefix s
69
false
true
0
8
16
47
21
26
null
null
filopodia/open
dashdo/src/Dashdo/Serve.hs
mit
runRDashdoPort :: Monad m => Int -> RunInIO m -> Text -> [RDashdo m] -> IO () runRDashdoPort prt r htm ds = do handlers <- mapM (\(RDashdo _ _ d) -> dashdoHandler r d) ds serve prt htm $ zip3 (map rdFid ds) (map rdTitle ds) handlers
236
runRDashdoPort :: Monad m => Int -> RunInIO m -> Text -> [RDashdo m] -> IO () runRDashdoPort prt r htm ds = do handlers <- mapM (\(RDashdo _ _ d) -> dashdoHandler r d) ds serve prt htm $ zip3 (map rdFid ds) (map rdTitle ds) handlers
236
runRDashdoPort prt r htm ds = do handlers <- mapM (\(RDashdo _ _ d) -> dashdoHandler r d) ds serve prt htm $ zip3 (map rdFid ds) (map rdTitle ds) handlers
158
false
true
0
12
51
127
60
67
null
null
wrengr/bytestring-trie
src/Data/Trie/Internal.hs
bsd-3-clause
mergeMaybe _ Nothing mv1@(Just _) = mv1
40
mergeMaybe _ Nothing mv1@(Just _) = mv1
40
mergeMaybe _ Nothing mv1@(Just _) = mv1
40
false
false
0
8
7
22
11
11
null
null
rodrigogribeiro/mptc
src/Iface/Iface.hs
bsd-3-clause
kind :: (KcEntry, Kind) -> Doc -> Doc kind (e,k) ac = pinfo e k $+$ ac
71
kind :: (KcEntry, Kind) -> Doc -> Doc kind (e,k) ac = pinfo e k $+$ ac
70
kind (e,k) ac = pinfo e k $+$ ac
32
false
true
0
6
17
45
24
21
null
null
kawu/mrf
Data/MRF/Values.hs
bsd-3-clause
values' :: FGV g f v x => g -> NodeIxs -> [Values x] values' graph = map fromList . sequence . map (toList . node graph) . toList
141
values' :: FGV g f v x => g -> NodeIxs -> [Values x] values' graph = map fromList . sequence . map (toList . node graph) . toList
141
values' graph = map fromList . sequence . map (toList . node graph) . toList
88
false
true
2
9
40
72
33
39
null
null
rTreutlein/ANN_experiment
World.hs
gpl-2.0
renderWorld :: World -> Picture renderWorld (x,y,s,m) = translate xoff yoff $ pictures entities where entities = Map.foldrWithKey (\k e p-> renderEntity e s k : p) [] m xoff = (x/2)*(-s) yoff = (y/2)*(-s)
225
renderWorld :: World -> Picture renderWorld (x,y,s,m) = translate xoff yoff $ pictures entities where entities = Map.foldrWithKey (\k e p-> renderEntity e s k : p) [] m xoff = (x/2)*(-s) yoff = (y/2)*(-s)
225
renderWorld (x,y,s,m) = translate xoff yoff $ pictures entities where entities = Map.foldrWithKey (\k e p-> renderEntity e s k : p) [] m xoff = (x/2)*(-s) yoff = (y/2)*(-s)
193
false
true
0
11
55
125
67
58
null
null
Cahu/krpc-hs
src/KRPCHS/SpaceCenter.hs
gpl-3.0
getPartsFairingsStreamReq :: KRPCHS.SpaceCenter.Parts -> KRPCStreamReq ([KRPCHS.SpaceCenter.Fairing]) getPartsFairingsStreamReq thisArg = let req = makeRequest "SpaceCenter" "Parts_get_Fairings" [makeArgument 0 thisArg] in makeStream req
246
getPartsFairingsStreamReq :: KRPCHS.SpaceCenter.Parts -> KRPCStreamReq ([KRPCHS.SpaceCenter.Fairing]) getPartsFairingsStreamReq thisArg = let req = makeRequest "SpaceCenter" "Parts_get_Fairings" [makeArgument 0 thisArg] in makeStream req
246
getPartsFairingsStreamReq thisArg = let req = makeRequest "SpaceCenter" "Parts_get_Fairings" [makeArgument 0 thisArg] in makeStream req
144
false
true
0
11
29
66
32
34
null
null
mumuki/mulang
src/Data/List/Extra.hs
gpl-3.0
has :: (a -> Bool) -> (b -> [a]) -> (b -> Bool) has f g = any f . g
67
has :: (a -> Bool) -> (b -> [a]) -> (b -> Bool) has f g = any f . g
67
has f g = any f . g
19
false
true
0
9
20
55
29
26
null
null
ivanperez-keera/Yampa
yampa/src/FRP/Yampa/Hybrid.hs
bsd-3-clause
accumHoldBy :: (b -> a -> b) -> b -> SF (Event a) b accumHoldBy g b_init = epPrim f b_init b_init where f b a = (b', b', b') where b' = g b a -- !!! This cannot be right since epPrim DOES and MUST patternmatch -- !!! on the input at every time step. -- !!! Add a test case to che...
504
accumHoldBy :: (b -> a -> b) -> b -> SF (Event a) b accumHoldBy g b_init = epPrim f b_init b_init where f b a = (b', b', b') where b' = g b a -- !!! This cannot be right since epPrim DOES and MUST patternmatch -- !!! on the input at every time step. -- !!! Add a test case to che...
504
accumHoldBy g b_init = epPrim f b_init b_init where f b a = (b', b', b') where b' = g b a -- !!! This cannot be right since epPrim DOES and MUST patternmatch -- !!! on the input at every time step. -- !!! Add a test case to check for this! -- | Zero-order hold accumulator param...
452
false
true
2
10
135
106
51
55
null
null
korrix/Warcaby
Graphics.hs
bsd-3-clause
v2p :: (Integral a, Num n) => V2 a -> P2 n v2p = p2 . unr2 . fmap fromIntegral
78
v2p :: (Integral a, Num n) => V2 a -> P2 n v2p = p2 . unr2 . fmap fromIntegral
78
v2p = p2 . unr2 . fmap fromIntegral
35
false
true
2
8
19
55
24
31
null
null