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
ocramz/petsc-hs
src/Numerical/PETSc/Spec.hs
gpl-3.0
-- nonzero pattern nz3x3 = VarNZPR (dnnz, onnz) where dnnz = V.convert $ V.fromList [1,1,1] onnz = V.convert $ V.fromList [1,1,2]
135
nz3x3 = VarNZPR (dnnz, onnz) where dnnz = V.convert $ V.fromList [1,1,1] onnz = V.convert $ V.fromList [1,1,2]
116
nz3x3 = VarNZPR (dnnz, onnz) where dnnz = V.convert $ V.fromList [1,1,1] onnz = V.convert $ V.fromList [1,1,2]
116
true
false
1
7
26
71
38
33
null
null
enolan/Idris-dev
src/Idris/ElabDecls.hs
bsd-3-clause
elabDecl' what info (PNamespace n nfc ps) = do mapM_ (elabDecl' what ninfo) ps let ns = reverse (map T.pack newNS) sendHighlighting [(nfc, AnnNamespace ns Nothing)] where newNS = n : namespace info ninfo = info { namespace = newNS }
254
elabDecl' what info (PNamespace n nfc ps) = do mapM_ (elabDecl' what ninfo) ps let ns = reverse (map T.pack newNS) sendHighlighting [(nfc, AnnNamespace ns Nothing)] where newNS = n : namespace info ninfo = info { namespace = newNS }
254
elabDecl' what info (PNamespace n nfc ps) = do mapM_ (elabDecl' what ninfo) ps let ns = reverse (map T.pack newNS) sendHighlighting [(nfc, AnnNamespace ns Nothing)] where newNS = n : namespace info ninfo = info { namespace = newNS }
254
false
false
1
13
62
110
53
57
null
null
aelve/json-x
lib/Json/Internal/JsonParser.hs
bsd-3-clause
copy :: ByteString -> Ptr Word8 -> Z.ZeptoT IO (Ptr Word8) copy (PS fp off len) ptr = liftIO . withForeignPtr fp $ \src -> do B.memcpy ptr (src `plusPtr` off) len return $! ptr `plusPtr` len
200
copy :: ByteString -> Ptr Word8 -> Z.ZeptoT IO (Ptr Word8) copy (PS fp off len) ptr = liftIO . withForeignPtr fp $ \src -> do B.memcpy ptr (src `plusPtr` off) len return $! ptr `plusPtr` len
200
copy (PS fp off len) ptr = liftIO . withForeignPtr fp $ \src -> do B.memcpy ptr (src `plusPtr` off) len return $! ptr `plusPtr` len
141
false
true
0
11
46
100
50
50
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
action_213 (174#) = happyShift action_200
41
action_213 (174#) = happyShift action_200
41
action_213 (174#) = happyShift action_200
41
false
false
0
6
4
15
7
8
null
null
Happy0/snowdrift
Model/Tag.hs
agpl-3.0
sortAnnotTagsByName :: [AnnotatedTag] -> [AnnotatedTag] sortAnnotTagsByName = sortBy (compare `on` annotTagName)
112
sortAnnotTagsByName :: [AnnotatedTag] -> [AnnotatedTag] sortAnnotTagsByName = sortBy (compare `on` annotTagName)
112
sortAnnotTagsByName = sortBy (compare `on` annotTagName)
56
false
true
0
8
10
39
20
19
null
null
mrakgr/futhark
src/Futhark/Analysis/ScalExp.hs
bsd-3-clause
expandScalExp look (SNot se) = SNot $ expandScalExp look se
59
expandScalExp look (SNot se) = SNot $ expandScalExp look se
59
expandScalExp look (SNot se) = SNot $ expandScalExp look se
59
false
false
0
7
9
26
12
14
null
null
rgaiacs/pandoc
src/Text/Pandoc/Writers/HTML.hs
gpl-2.0
renderKaTeX :: String renderKaTeX = unlines [ "window.onload = function(){var mathElements = document.getElementsByClassName(\"math\");" , "for (var i=0; i < mathElements.length; i++)" , "{" , " var texText = mathElements[i].firstChild" , " katex.render(texText.data, mathElements[i])" , "}}" ]
310
renderKaTeX :: String renderKaTeX = unlines [ "window.onload = function(){var mathElements = document.getElementsByClassName(\"math\");" , "for (var i=0; i < mathElements.length; i++)" , "{" , " var texText = mathElements[i].firstChild" , " katex.render(texText.data, mathElements[i])" , "}}" ]
310
renderKaTeX = unlines [ "window.onload = function(){var mathElements = document.getElementsByClassName(\"math\");" , "for (var i=0; i < mathElements.length; i++)" , "{" , " var texText = mathElements[i].firstChild" , " katex.render(texText.data, mathElements[i])" , "}}" ]
288
false
true
0
6
51
32
19
13
null
null
vikraman/ghc
compiler/ghci/ByteCodeGen.hs
bsd-3-clause
isVAtom (AnnVar v) = isVoidArg (bcIdArgRep v)
58
isVAtom (AnnVar v) = isVoidArg (bcIdArgRep v)
58
isVAtom (AnnVar v) = isVoidArg (bcIdArgRep v)
58
false
false
0
7
19
25
11
14
null
null
dsorokin/aivika-experiment-chart
examples/SingleLaneTraffic/Model.hs
bsd-3-clause
ightTime2 = LightTime 80 60
28
lightTime2 = LightTime 80 60
28
lightTime2 = LightTime 80 60
28
false
false
1
5
5
15
5
10
null
null
gcampax/ghc
compiler/basicTypes/Literal.hs
bsd-3-clause
int2DoubleLit (MachInt i) = MachDouble (fromInteger i)
57
int2DoubleLit (MachInt i) = MachDouble (fromInteger i)
57
int2DoubleLit (MachInt i) = MachDouble (fromInteger i)
57
false
false
0
7
9
24
11
13
null
null
facebookincubator/duckling
Duckling/Numeral/FI/Rules.hs
bsd-3-clause
tensMap :: HashMap Text Integer tensMap = HashMap.fromList [ ( "kaksikymmentä", 20 ) , ( "kolmekymmentä", 30 ) , ( "neljäkymmentä", 40 ) , ( "viisikymmentä", 50 ) , ( "kuusikymmentä", 60 ) , ( "seitsemänkymmentä", 70 ) , ( "kahdeksankymmentä", 80 ) , ( "yhdeksänkymmentä", 90 ) ]
297
tensMap :: HashMap Text Integer tensMap = HashMap.fromList [ ( "kaksikymmentä", 20 ) , ( "kolmekymmentä", 30 ) , ( "neljäkymmentä", 40 ) , ( "viisikymmentä", 50 ) , ( "kuusikymmentä", 60 ) , ( "seitsemänkymmentä", 70 ) , ( "kahdeksankymmentä", 80 ) , ( "yhdeksänkymmentä", 90 ) ]
297
tensMap = HashMap.fromList [ ( "kaksikymmentä", 20 ) , ( "kolmekymmentä", 30 ) , ( "neljäkymmentä", 40 ) , ( "viisikymmentä", 50 ) , ( "kuusikymmentä", 60 ) , ( "seitsemänkymmentä", 70 ) , ( "kahdeksankymmentä", 80 ) , ( "yhdeksänkymmentä", 90 ) ]
265
false
true
0
6
66
93
58
35
null
null
supki/outdated
test/spec/ConfSpec.hs
bsd-2-clause
linux_x8664_ghc78 :: Conf linux_x8664_ghc78 = Conf { os = Linux , arch = X86_64 , impl = CompilerId GHC (makeVersion [7, 8]) , cflags = [] , pflags = [] }
188
linux_x8664_ghc78 :: Conf linux_x8664_ghc78 = Conf { os = Linux , arch = X86_64 , impl = CompilerId GHC (makeVersion [7, 8]) , cflags = [] , pflags = [] }
188
linux_x8664_ghc78 = Conf { os = Linux , arch = X86_64 , impl = CompilerId GHC (makeVersion [7, 8]) , cflags = [] , pflags = [] }
162
false
true
0
10
64
64
38
26
null
null
gallais/potpourri
haskell/cyclic/CyclicListFlat.hs
gpl-3.0
toList :: CList a -> Maybe [ a ] toList xs | isFinite xs = Just $ prfx xs
73
toList :: CList a -> Maybe [ a ] toList xs | isFinite xs = Just $ prfx xs
73
toList xs | isFinite xs = Just $ prfx xs
40
false
true
0
8
18
47
20
27
null
null
mimi1vx/cabal-rpm
src/Setup.hs
gpl-3.0
parseArgs :: [String] -> IO (RpmFlags, String, Maybe String) parseArgs args = do let (os, args', unknown, errs) = getOpt' Permute options args opts = foldl (flip ($)) emptyRpmFlags os when (rpmHelp opts) $ do printHelp stdout exitSuccess when (rpmVersion opts) $ do putStrLn $ showVersion version...
957
parseArgs :: [String] -> IO (RpmFlags, String, Maybe String) parseArgs args = do let (os, args', unknown, errs) = getOpt' Permute options args opts = foldl (flip ($)) emptyRpmFlags os when (rpmHelp opts) $ do printHelp stdout exitSuccess when (rpmVersion opts) $ do putStrLn $ showVersion version...
957
parseArgs args = do let (os, args', unknown, errs) = getOpt' Permute options args opts = foldl (flip ($)) emptyRpmFlags os when (rpmHelp opts) $ do printHelp stdout exitSuccess when (rpmVersion opts) $ do putStrLn $ showVersion version exitSuccess unless (null errs) $ error $ unlines e...
896
false
true
0
14
203
384
183
201
null
null
sdiehl/ghc
hadrian/src/Context/Path.hs
bsd-3-clause
-- | The expression that evaluates to the path to the directory in 'buildRoot' -- containing build artifacts of a given 'Context'. getContextPath :: Expr Context b FilePath getContextPath = expr . contextPath =<< getContext
223
getContextPath :: Expr Context b FilePath getContextPath = expr . contextPath =<< getContext
92
getContextPath = expr . contextPath =<< getContext
50
true
true
1
6
34
32
15
17
null
null
raymoo/shmuppy
src/Game.hs
gpl-3.0
mkControls :: Set Key -> Set PlayerControl mkControls set = S.fromList $ mapMaybe (\(k,v) -> if k `S.member` set then Just v else Nothing) inputMap where inputMap = [ (SpecialKey KeyUp, CUp) , (SpecialKey KeyDown, CDown) , (SpecialKey KeyLeft, CLeft) ...
472
mkControls :: Set Key -> Set PlayerControl mkControls set = S.fromList $ mapMaybe (\(k,v) -> if k `S.member` set then Just v else Nothing) inputMap where inputMap = [ (SpecialKey KeyUp, CUp) , (SpecialKey KeyDown, CDown) , (SpecialKey KeyLeft, CLeft) ...
472
mkControls set = S.fromList $ mapMaybe (\(k,v) -> if k `S.member` set then Just v else Nothing) inputMap where inputMap = [ (SpecialKey KeyUp, CUp) , (SpecialKey KeyDown, CDown) , (SpecialKey KeyLeft, CLeft) , (SpecialKey KeyRight, CRight) ...
429
false
true
0
10
186
148
82
66
null
null
a143753/AOJ
0021.hs
apache-2.0
ans :: [Float] -> String ans (x1:y1:x2:y2:x3:y3:x4:y4:_) | y2 == y1 = if y4 == y3 then "YES" else "NO" | x4 == x3 = if x2 == x1 then "YES" else "NO" | otherwise = if (y2-y1) / (x2-x1) == (y4-y3) / (x4-x3) then "YES" else "NO"
265
ans :: [Float] -> String ans (x1:y1:x2:y2:x3:y3:x4:y4:_) | y2 == y1 = if y4 == y3 then "YES" else "NO" | x4 == x3 = if x2 == x1 then "YES" else "NO" | otherwise = if (y2-y1) / (x2-x1) == (y4-y3) / (x4-x3) then "YES" else "NO"
265
ans (x1:y1:x2:y2:x3:y3:x4:y4:_) | y2 == y1 = if y4 == y3 then "YES" else "NO" | x4 == x3 = if x2 == x1 then "YES" else "NO" | otherwise = if (y2-y1) / (x2-x1) == (y4-y3) / (x4-x3) then "YES" else "NO"
240
false
true
0
16
87
170
87
83
null
null
olsner/ghc
compiler/deSugar/Coverage.hs
bsd-3-clause
getFreeVars :: TM a -> TM (FreeVars, a) getFreeVars (TM m) = TM $ \ env st -> case m env st of (a, fv, st') -> ((fv,a), fv, st')
130
getFreeVars :: TM a -> TM (FreeVars, a) getFreeVars (TM m) = TM $ \ env st -> case m env st of (a, fv, st') -> ((fv,a), fv, st')
130
getFreeVars (TM m) = TM $ \ env st -> case m env st of (a, fv, st') -> ((fv,a), fv, st')
90
false
true
0
11
31
86
47
39
null
null
green-haskell/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
isAtomicHsExpr (HsOverLit {}) = True
36
isAtomicHsExpr (HsOverLit {}) = True
36
isAtomicHsExpr (HsOverLit {}) = True
36
false
false
0
6
4
17
8
9
null
null
gaeldeest/NaBot
src/NaBot/Parser.hs
mit
col = char ':'
14
col = char ':'
14
col = char ':'
14
false
false
1
5
3
13
4
9
null
null
rfranek/duckling
Duckling/Ordinal/ES/Rules.hs
bsd-3-clause
ordinalsMap :: HashMap.HashMap Text.Text Int ordinalsMap = HashMap.fromList [ ( "primer" , 1 ) , ( "primero" , 1 ) , ( "primeros" , 1 ) , ( "primera" , 1 ) , ( "primeras" , 1 ) , ( "segundo" , 2 ) , ( "segunda" , 2 ) , ( "segundas" , 2 ) , ( "segundos" , 2 ) , ( "terceros" , 3 ) , ( "tercera" , 3 ...
1,217
ordinalsMap :: HashMap.HashMap Text.Text Int ordinalsMap = HashMap.fromList [ ( "primer" , 1 ) , ( "primero" , 1 ) , ( "primeros" , 1 ) , ( "primera" , 1 ) , ( "primeras" , 1 ) , ( "segundo" , 2 ) , ( "segunda" , 2 ) , ( "segundas" , 2 ) , ( "segundos" , 2 ) , ( "terceros" , 3 ) , ( "tercera" , 3 ...
1,217
ordinalsMap = HashMap.fromList [ ( "primer" , 1 ) , ( "primero" , 1 ) , ( "primeros" , 1 ) , ( "primera" , 1 ) , ( "primeras" , 1 ) , ( "segundo" , 2 ) , ( "segunda" , 2 ) , ( "segundas" , 2 ) , ( "segundos" , 2 ) , ( "terceros" , 3 ) , ( "tercera" , 3 ) , ( "terceras" , 3 ) , ( "tercero" , 3 ...
1,172
false
true
0
6
410
475
312
163
null
null
Mathnerd314/lamdu
test/InferCombinators.hs
gpl-3.0
set :: InferResults t set = simple bodySet pureSet
50
set :: InferResults t set = simple bodySet pureSet
50
set = simple bodySet pureSet
28
false
true
1
5
8
22
9
13
null
null
kasbah/haskell-kicad-data
Data/Kicad/Util.hs
mit
maybeLast xs = Just $ last xs
29
maybeLast xs = Just $ last xs
29
maybeLast xs = Just $ last xs
29
false
false
0
6
6
16
7
9
null
null
jstolarek/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
pprExp i (LamCaseE ms) = parensIf (i > noPrec) $ text "\\case" $$ nest nestDepth (ppr ms)
112
pprExp i (LamCaseE ms) = parensIf (i > noPrec) $ text "\\case" $$ nest nestDepth (ppr ms)
112
pprExp i (LamCaseE ms) = parensIf (i > noPrec) $ text "\\case" $$ nest nestDepth (ppr ms)
112
false
false
0
9
39
49
23
26
null
null
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/codeGen/should_run/cgrun052.hs
bsd-3-clause
f 0 = C3 (C1 T1) 42
19
f 0 = C3 (C1 T1) 42
19
f 0 = C3 (C1 T1) 42
19
false
false
1
7
6
23
9
14
null
null
ssonal/haskell-experiments
chapter7.hs
mit
willson = Person { firstName = "Willson", lastName = "Mock", age = 28 }
71
willson = Person { firstName = "Willson", lastName = "Mock", age = 28 }
71
willson = Person { firstName = "Willson", lastName = "Mock", age = 28 }
71
false
false
1
7
13
33
17
16
null
null
NorfairKing/hess
src/MailScrape.hs
mit
mailScraper :: Pipe ByteString ByteString HESS () mailScraper = mailMatcher >-> validFilter >-> deduper
103
mailScraper :: Pipe ByteString ByteString HESS () mailScraper = mailMatcher >-> validFilter >-> deduper
103
mailScraper = mailMatcher >-> validFilter >-> deduper
53
false
true
3
6
13
37
16
21
null
null
ekr/tamarin-prover
lib/term/src/Term/Builtin/Convenience.hs
gpl-3.0
lx9 = LVar "x" LSortMsg 9
25
lx9 = LVar "x" LSortMsg 9
25
lx9 = LVar "x" LSortMsg 9
25
false
false
1
5
5
17
6
11
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/ApiGatewayBasePathMapping.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-basepathmapping.html#cfn-apigateway-basepathmapping-domainname agbpmDomainName :: Lens' ApiGatewayBasePathMapping (Val Text) agbpmDomainName = lens _apiGatewayBasePathMappingDomainName (\s a -> s { _apiGatewayBasePathMappingDomai...
332
agbpmDomainName :: Lens' ApiGatewayBasePathMapping (Val Text) agbpmDomainName = lens _apiGatewayBasePathMappingDomainName (\s a -> s { _apiGatewayBasePathMappingDomainName = a })
178
agbpmDomainName = lens _apiGatewayBasePathMappingDomainName (\s a -> s { _apiGatewayBasePathMappingDomainName = a })
116
true
true
0
9
21
46
25
21
null
null
andreagenso/java2scala
test/J2s/Parser/Test.hs
apache-2.0
tsp40 = parser (path ++ "workspaceclipse_haskell/java2scala/test/J2s/Parser/40actualTypeArgument.java")
103
tsp40 = parser (path ++ "workspaceclipse_haskell/java2scala/test/J2s/Parser/40actualTypeArgument.java")
103
tsp40 = parser (path ++ "workspaceclipse_haskell/java2scala/test/J2s/Parser/40actualTypeArgument.java")
103
false
false
0
7
5
16
8
8
null
null
gleachkr/Carnap
Carnap/src/Carnap/Languages/PureFirstOrder/Parser.hs
gpl-3.0
hausmanPLOptions :: FirstOrderParserOptions PureLexiconFOL u Identity hausmanPLOptions = FirstOrderParserOptions { atomicSentenceParser = \x -> try (parsePredicateSymbolNoParen "ABCDEFGHIJKLMNOPQRSTUVWXYZ" x) <|> sentenceLetterParser "ABC...
1,640
hausmanPLOptions :: FirstOrderParserOptions PureLexiconFOL u Identity hausmanPLOptions = FirstOrderParserOptions { atomicSentenceParser = \x -> try (parsePredicateSymbolNoParen "ABCDEFGHIJKLMNOPQRSTUVWXYZ" x) <|> sentenceLetterParser "ABC...
1,640
hausmanPLOptions = FirstOrderParserOptions { atomicSentenceParser = \x -> try (parsePredicateSymbolNoParen "ABCDEFGHIJKLMNOPQRSTUVWXYZ" x) <|> sentenceLetterParser "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ...
1,570
false
true
2
12
622
299
152
147
null
null
fmapfmapfmap/amazonka
amazonka-swf/gen/Network/AWS/SWF/Types/Product.hs
mpl-2.0
-- | Creates a value of 'SignalExternalWorkflowExecutionFailedEventAttributes' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'sewefeaControl' -- -- * 'sewefeaRunId' -- -- * 'sewefeaWorkflowId' -- -- * 'sewefeaCause' -- -- * 'sewefeaI...
1,156
signalExternalWorkflowExecutionFailedEventAttributes :: Text -- ^ 'sewefeaWorkflowId' -> SignalExternalWorkflowExecutionFailedCause -- ^ 'sewefeaCause' -> Integer -- ^ 'sewefeaInitiatedEventId' -> Integer -- ^ 'sewefeaDecisionTaskCompletedEventId' -> SignalExternalWorkflowExecutionFailedEventAttribu...
773
signalExternalWorkflowExecutionFailedEventAttributes pWorkflowId_ pCause_ pInitiatedEventId_ pDecisionTaskCompletedEventId_ = SignalExternalWorkflowExecutionFailedEventAttributes' { _sewefeaControl = Nothing , _sewefeaRunId = Nothing , _sewefeaWorkflowId = pWorkflowId_ , _sewefeaCause = pCause_ ...
449
true
true
0
8
160
93
62
31
null
null
jjingram/satori
src/Parser.hs
bsd-3-clause
expression :: Parser (Expression Name) expression = integer <|> try quote <|> try quasiquote <|> try binop <|> try variable <|> try Parser.lambda <|> try let' <|> try if' <|> call
189
expression :: Parser (Expression Name) expression = integer <|> try quote <|> try quasiquote <|> try binop <|> try variable <|> try Parser.lambda <|> try let' <|> try if' <|> call
189
expression = integer <|> try quote <|> try quasiquote <|> try binop <|> try variable <|> try Parser.lambda <|> try let' <|> try if' <|> call
150
false
true
17
8
40
97
44
53
null
null
ibotty/log-effect
src/Control/Eff/Log/Simple.hs
mit
error :: (Typeable l, Member (Log (Severity, l)) r) => l -> Eff r () error = logTo ERROR
88
error :: (Typeable l, Member (Log (Severity, l)) r) => l -> Eff r () error = logTo ERROR
88
error = logTo ERROR
19
false
true
0
9
18
54
28
26
null
null
pparkkin/eta
compiler/ETA/Types/Type.hs
bsd-3-clause
splitAppTy_maybe ty = repSplitAppTy_maybe ty
44
splitAppTy_maybe ty = repSplitAppTy_maybe ty
44
splitAppTy_maybe ty = repSplitAppTy_maybe ty
44
false
false
1
5
4
15
5
10
null
null
kylcarte/wangtiles
src/Util.hs
bsd-3-clause
ppPadStringRows :: [[String]] -> String ppPadStringRows rs = ppStringRows $ map (map pad) rs where pad s = replicate (mxdigits - length s) ' ' ++ s mxdigits = safeMaximum 0 $ map length $ concat rs
203
ppPadStringRows :: [[String]] -> String ppPadStringRows rs = ppStringRows $ map (map pad) rs where pad s = replicate (mxdigits - length s) ' ' ++ s mxdigits = safeMaximum 0 $ map length $ concat rs
203
ppPadStringRows rs = ppStringRows $ map (map pad) rs where pad s = replicate (mxdigits - length s) ' ' ++ s mxdigits = safeMaximum 0 $ map length $ concat rs
163
false
true
0
9
42
91
44
47
null
null
maruks/haskell-book
src/Chapter8_recursion.hs
gpl-3.0
digitToWord 8 = "eight"
23
digitToWord 8 = "eight"
23
digitToWord 8 = "eight"
23
false
false
0
5
3
9
4
5
null
null
hpacheco/HAAP
examples/gameworker/li1g175/Bomberman.hs
mit
stepDir (x,y) 1 = (x,y+1)
25
stepDir (x,y) 1 = (x,y+1)
25
stepDir (x,y) 1 = (x,y+1)
25
false
false
0
6
4
27
15
12
null
null
wavewave/madgraph-auto
test/madgraphRun.hs
gpl-3.0
main :: IO () main = do updateGlobalLogger "MadGraphAuto" (setLevel DEBUG) work =<< getWSetup -- |
106
main :: IO () main = do updateGlobalLogger "MadGraphAuto" (setLevel DEBUG) work =<< getWSetup -- |
106
main = do updateGlobalLogger "MadGraphAuto" (setLevel DEBUG) work =<< getWSetup -- |
92
false
true
0
9
23
38
18
20
null
null
bitemyapp/hlint
src/Hint/Import.hs
bsd-3-clause
simplifyHead x (y:ys) = case reduce x y of Nothing -> first (y:) <$> simplifyHead x ys Just (xy, rs) -> Just $ (xy : ys, rs)
132
simplifyHead x (y:ys) = case reduce x y of Nothing -> first (y:) <$> simplifyHead x ys Just (xy, rs) -> Just $ (xy : ys, rs)
132
simplifyHead x (y:ys) = case reduce x y of Nothing -> first (y:) <$> simplifyHead x ys Just (xy, rs) -> Just $ (xy : ys, rs)
132
false
false
0
10
34
78
40
38
null
null
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Common/ActorState.hs
bsd-3-clause
fullAssocs :: ActorId -> [CStore] -> State -> [(ItemId, ItemFull)] fullAssocs aid cstores s = let allAssocs = concatMap (\cstore -> getActorAssocs aid cstore s) cstores iToFull (iid, (item, _kit)) = (iid, itemToFull6 (scops s) (sdiscoKind s) (sdiscoAspect s) iid item) in map iToFull allAssocs
311
fullAssocs :: ActorId -> [CStore] -> State -> [(ItemId, ItemFull)] fullAssocs aid cstores s = let allAssocs = concatMap (\cstore -> getActorAssocs aid cstore s) cstores iToFull (iid, (item, _kit)) = (iid, itemToFull6 (scops s) (sdiscoKind s) (sdiscoAspect s) iid item) in map iToFull allAssocs
311
fullAssocs aid cstores s = let allAssocs = concatMap (\cstore -> getActorAssocs aid cstore s) cstores iToFull (iid, (item, _kit)) = (iid, itemToFull6 (scops s) (sdiscoKind s) (sdiscoAspect s) iid item) in map iToFull allAssocs
244
false
true
0
12
62
133
70
63
null
null
k0001/haskell-opaleye
Opaleye/RunQuery.hs
bsd-3-clause
runQueryExplicit :: QueryRunner columns haskells -> Query columns -> SQL.Connection -> IO [haskells] runQueryExplicit (QueryRunner u rowParser) q conn = SQL.queryWith_ rowParser conn sql where sql :: SQL.Query sql = S.fromString (S.showSqlForPostgresExplici...
326
runQueryExplicit :: QueryRunner columns haskells -> Query columns -> SQL.Connection -> IO [haskells] runQueryExplicit (QueryRunner u rowParser) q conn = SQL.queryWith_ rowParser conn sql where sql :: SQL.Query sql = S.fromString (S.showSqlForPostgresExplici...
326
runQueryExplicit (QueryRunner u rowParser) q conn = SQL.queryWith_ rowParser conn sql where sql :: SQL.Query sql = S.fromString (S.showSqlForPostgresExplicit u q)
174
false
true
0
9
96
99
46
53
null
null
kawu/tag-vanilla
src/NLP/TAG/Vanilla/Tests.hs
bsd-2-clause
quickly :: AuxTr quickly = AuxTree (INode "V" [ INode "Ad" [FNode "quickly"] , INode "V" [] ]) [1]
110
quickly :: AuxTr quickly = AuxTree (INode "V" [ INode "Ad" [FNode "quickly"] , INode "V" [] ]) [1]
110
quickly = AuxTree (INode "V" [ INode "Ad" [FNode "quickly"] , INode "V" [] ]) [1]
93
false
true
0
10
30
58
27
31
null
null
keithodulaigh/Hets
GMP/GMP-CoLoSS/GMP/Logics/Generic.hs
gpl-2.0
prettyll (x : xs) = case x of [] -> "[[]]" (y : ys) -> case ys of [] -> "[" ++ pretty_seq y ++ "]" ++ prettyll xs (z : zs) -> "[" ++ pretty_seq y ++ "," ++ pretty_slist ys ++ "]" ++ prettyll xs -- pretty print a...
355
prettyll (x : xs) = case x of [] -> "[[]]" (y : ys) -> case ys of [] -> "[" ++ pretty_seq y ++ "]" ++ prettyll xs (z : zs) -> "[" ++ pretty_seq y ++ "," ++ pretty_slist ys ++ "]" ++ prettyll xs -- pretty print a...
355
prettyll (x : xs) = case x of [] -> "[[]]" (y : ys) -> case ys of [] -> "[" ++ pretty_seq y ++ "]" ++ prettyll xs (z : zs) -> "[" ++ pretty_seq y ++ "," ++ pretty_slist ys ++ "]" ++ prettyll xs -- pretty print a...
355
false
false
0
16
166
114
56
58
null
null
lambdageek/insomnia
src/FOmega/Check.hs
bsd-3-clause
runTC :: TC m a -> m (Either OmegaErr a) runTC c = runLFreshMT $ runExceptT (runReaderT c initialCtx) where initialCtx = Ctx [ CType (U.s2n "Int") KType , CType (U.s2n "Real") KType , CVal (U.s2n "__BOOT.intAdd") intAddTy , CVal (U.s2n "__BOOT.ifIntLt") ifIntLtTy , CVal (U.s2n "__BOO...
694
runTC :: TC m a -> m (Either OmegaErr a) runTC c = runLFreshMT $ runExceptT (runReaderT c initialCtx) where initialCtx = Ctx [ CType (U.s2n "Int") KType , CType (U.s2n "Real") KType , CVal (U.s2n "__BOOT.intAdd") intAddTy , CVal (U.s2n "__BOOT.ifIntLt") ifIntLtTy , CVal (U.s2n "__BOO...
694
runTC c = runLFreshMT $ runExceptT (runReaderT c initialCtx) where initialCtx = Ctx [ CType (U.s2n "Int") KType , CType (U.s2n "Real") KType , CVal (U.s2n "__BOOT.intAdd") intAddTy , CVal (U.s2n "__BOOT.ifIntLt") ifIntLtTy , CVal (U.s2n "__BOOT.realAdd") realBinopTy , CVal (U.s...
653
false
true
0
10
156
236
116
120
null
null
iatorm/grime
Parser.hs
mit
grammarLine :: Parsec String () (Maybe ([Option], (Label, Expr))) grammarLine = try (commentLine >> return Nothing) <|> (Just <$> contentLine)
142
grammarLine :: Parsec String () (Maybe ([Option], (Label, Expr))) grammarLine = try (commentLine >> return Nothing) <|> (Just <$> contentLine)
142
grammarLine = try (commentLine >> return Nothing) <|> (Just <$> contentLine)
76
false
true
0
9
19
65
35
30
null
null
yxm4109/pandoc
src/Text/Pandoc/Writers/Docbook.hs
gpl-2.0
plainToPara x = x
25
plainToPara x = x
25
plainToPara x = x
25
false
false
0
5
11
9
4
5
null
null
sdiehl/ghc
compiler/coreSyn/CoreTidy.hs
bsd-3-clause
tidyTickish _ other_tickish = other_tickish
51
tidyTickish _ other_tickish = other_tickish
51
tidyTickish _ other_tickish = other_tickish
51
false
false
0
5
12
11
5
6
null
null
xu-hao/QueryArrow
heterogeneous-list/src/QueryArrow/Data/Heterogeneous/List.hs
bsd-3-clause
hApplyCUL :: forall (c :: * -> Constraint) (b :: *) (l :: [*]). (HMapConstraint c l) => (forall a . c a => a -> b) -> Int -> HList l -> Maybe b hApplyCUL g a l = case l of HNil -> Nothing HCons e l' -> if a == 0 then Just (g e) else hApplyCUL @c @b g (a-1) l'
316
hApplyCUL :: forall (c :: * -> Constraint) (b :: *) (l :: [*]). (HMapConstraint c l) => (forall a . c a => a -> b) -> Int -> HList l -> Maybe b hApplyCUL g a l = case l of HNil -> Nothing HCons e l' -> if a == 0 then Just (g e) else hApplyCUL @c @b g (a-1) l'
316
hApplyCUL g a l = case l of HNil -> Nothing HCons e l' -> if a == 0 then Just (g e) else hApplyCUL @c @b g (a-1) l'
171
false
true
0
11
121
162
86
76
null
null
considerate/progp
Haskell/bio/molbio.hs
mit
fam4 = [("4A1_Human","SGSLEVIRKWAEKIPGFAELSPADQDLLLESAFLELFILRLAYRSKPGIFCSGLVLHRDWIDSILAFSRSLLVDVPAFACLSALVLITHGLQEPRVEELNRIEHVAAVAGQQD"), ("4A1_Mouse","SGSLDVIRKWAEKIPGFIELCPGDQDLLLESAFLELFILRLAYRSKPGIFCSGLVLHQDWIDNILAFSRSLGVDVPAFACLSALVLITHGLQDPRVEELNRIEHMATVAGQQD"), ("4A2_Human","TGSMEIIRGWAEKIPGFADLPKADQDLLFE...
806
fam4 = [("4A1_Human","SGSLEVIRKWAEKIPGFAELSPADQDLLLESAFLELFILRLAYRSKPGIFCSGLVLHRDWIDSILAFSRSLLVDVPAFACLSALVLITHGLQEPRVEELNRIEHVAAVAGQQD"), ("4A1_Mouse","SGSLDVIRKWAEKIPGFIELCPGDQDLLLESAFLELFILRLAYRSKPGIFCSGLVLHQDWIDNILAFSRSLGVDVPAFACLSALVLITHGLQDPRVEELNRIEHMATVAGQQD"), ("4A2_Human","TGSMEIIRGWAEKIPGFADLPKADQDLLFE...
806
fam4 = [("4A1_Human","SGSLEVIRKWAEKIPGFAELSPADQDLLLESAFLELFILRLAYRSKPGIFCSGLVLHRDWIDSILAFSRSLLVDVPAFACLSALVLITHGLQEPRVEELNRIEHVAAVAGQQD"), ("4A1_Mouse","SGSLDVIRKWAEKIPGFIELCPGDQDLLLESAFLELFILRLAYRSKPGIFCSGLVLHQDWIDNILAFSRSLGVDVPAFACLSALVLITHGLQDPRVEELNRIEHMATVAGQQD"), ("4A2_Human","TGSMEIIRGWAEKIPGFADLPKADQDLLFE...
806
false
false
0
6
22
60
39
21
null
null
matonix/BTScraper
src/GithubCommit.hs
bsd-3-clause
scrapeGithubCommit :: String -> String -> IO (Maybe ByteString) scrapeGithubCommit prefix commitId = scrapeURL (prefix ++ commitId) commit
138
scrapeGithubCommit :: String -> String -> IO (Maybe ByteString) scrapeGithubCommit prefix commitId = scrapeURL (prefix ++ commitId) commit
138
scrapeGithubCommit prefix commitId = scrapeURL (prefix ++ commitId) commit
74
false
true
0
9
17
45
22
23
null
null
tidalcycles/Tidal
bin/params-header.hs
gpl-3.0
drumN "sn" = 38
15
drumN "sn" = 38
15
drumN "sn" = 38
15
false
false
0
4
3
10
4
6
null
null
nevrenato/Hets_Fork
Maude/Maude2DG.hs
gpl-2.0
getSortParamsStringAux (c : cs) st = getSortParamsStringAux cs (st ++ [c])
74
getSortParamsStringAux (c : cs) st = getSortParamsStringAux cs (st ++ [c])
74
getSortParamsStringAux (c : cs) st = getSortParamsStringAux cs (st ++ [c])
74
false
false
1
8
10
35
17
18
null
null
CDSoft/pp
src/OSAbstraction.hs
gpl-3.0
cmdexe = "wine cmd /c"
22
cmdexe = "wine cmd /c"
22
cmdexe = "wine cmd /c"
22
false
false
1
5
4
10
3
7
null
null
fumieval/call
src/Call.hs
bsd-3-clause
hideCursor :: Call => IO () hideCursor = GLFW.setCursorInputMode (G.theWindow $ theSystem given) GLFW.CursorInputMode'Hidden
124
hideCursor :: Call => IO () hideCursor = GLFW.setCursorInputMode (G.theWindow $ theSystem given) GLFW.CursorInputMode'Hidden
124
hideCursor = GLFW.setCursorInputMode (G.theWindow $ theSystem given) GLFW.CursorInputMode'Hidden
96
false
true
0
8
13
42
20
22
null
null
SimonRichards/HaskellOfLife
georgie.hs
apache-2.0
zipWith' _ _ [] = []
20
zipWith' _ _ [] = []
20
zipWith' _ _ [] = []
20
false
false
0
6
5
17
8
9
null
null
magthe/lat
src/RepEng.hs
gpl-3.0
_getComponentId url session project component = _getJiraValue (_jiraGetComponents url session project) "name" component "id"
124
_getComponentId url session project component = _getJiraValue (_jiraGetComponents url session project) "name" component "id"
124
_getComponentId url session project component = _getJiraValue (_jiraGetComponents url session project) "name" component "id"
124
false
false
0
7
13
34
16
18
null
null
ghorn/classy-dvda
src/Classy/Differentiation.hs
bsd-3-clause
partial (SMul x y) arg = x*y' + x'*y where x' = partial x arg y' = partial y arg
90
partial (SMul x y) arg = x*y' + x'*y where x' = partial x arg y' = partial y arg
90
partial (SMul x y) arg = x*y' + x'*y where x' = partial x arg y' = partial y arg
90
false
false
3
7
29
67
26
41
null
null
keera-studios/hsQt
Qtc/Gui/QApplication.hs
bsd-2-clause
qApplicationSetActiveWindow :: ((QWidget t1)) -> IO () qApplicationSetActiveWindow (x1) = withObjectPtr x1 $ \cobj_x1 -> qtc_QApplication_setActiveWindow cobj_x1
167
qApplicationSetActiveWindow :: ((QWidget t1)) -> IO () qApplicationSetActiveWindow (x1) = withObjectPtr x1 $ \cobj_x1 -> qtc_QApplication_setActiveWindow cobj_x1
167
qApplicationSetActiveWindow (x1) = withObjectPtr x1 $ \cobj_x1 -> qtc_QApplication_setActiveWindow cobj_x1
112
false
true
0
8
22
50
25
25
null
null
sgillespie/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
needsCDecl PicBaseLabel = panic "needsCDecl PicBaseLabel"
73
needsCDecl PicBaseLabel = panic "needsCDecl PicBaseLabel"
73
needsCDecl PicBaseLabel = panic "needsCDecl PicBaseLabel"
73
false
false
0
5
21
12
5
7
null
null
alfa07/TargetsGenerator
src/Build2.hs
bsd-3-clause
artCase3 :: Name -> Q Exp artCase3 name = do v_1 <- newName "v_1" [|(\x -> case x of $(conP name [varP v_1]) -> Just () _ -> Nothing , $(conE name) )|]
249
artCase3 :: Name -> Q Exp artCase3 name = do v_1 <- newName "v_1" [|(\x -> case x of $(conP name [varP v_1]) -> Just () _ -> Nothing , $(conE name) )|]
249
artCase3 name = do v_1 <- newName "v_1" [|(\x -> case x of $(conP name [varP v_1]) -> Just () _ -> Nothing , $(conE name) )|]
223
false
true
0
8
130
37
18
19
null
null
brendanhay/gogol
gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Snapshots/Get.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). psgsUploadProtocol :: Lens' ProjectsSnapshotsGet (Maybe Text) psgsUploadProtocol = lens _psgsUploadProtocol (\ s a -> s{_psgsUploadProtocol = a})
215
psgsUploadProtocol :: Lens' ProjectsSnapshotsGet (Maybe Text) psgsUploadProtocol = lens _psgsUploadProtocol (\ s a -> s{_psgsUploadProtocol = a})
153
psgsUploadProtocol = lens _psgsUploadProtocol (\ s a -> s{_psgsUploadProtocol = a})
91
true
true
0
9
33
48
25
23
null
null
osa1/Idris-dev
src/Idris/IdrisDoc.hs
bsd-3-clause
createOtherDoc ist (RecordDoc n doc ctor projs params) = do H.dt ! (A.id $ toValue $ show n) $ do H.span ! class_ "word" $ do "record"; nbsp H.span ! class_ "name type" ! title (toValue $ show n) $ toHtml $ name $ nsroot n H.span ! class_ "type" $ do nbsp ; prettyParameters H.dd $ ...
1,058
createOtherDoc ist (RecordDoc n doc ctor projs params) = do H.dt ! (A.id $ toValue $ show n) $ do H.span ! class_ "word" $ do "record"; nbsp H.span ! class_ "name type" ! title (toValue $ show n) $ toHtml $ name $ nsroot n H.span ! class_ "type" $ do nbsp ; prettyParameters H.dd $ ...
1,058
createOtherDoc ist (RecordDoc n doc ctor projs params) = do H.dt ! (A.id $ toValue $ show n) $ do H.span ! class_ "word" $ do "record"; nbsp H.span ! class_ "name type" ! title (toValue $ show n) $ toHtml $ name $ nsroot n H.span ! class_ "type" $ do nbsp ; prettyParameters H.dd $ ...
1,058
false
false
3
17
371
442
212
230
null
null
sashabu/libcspm
src/Util/PrettyPrint.hs
bsd-3-clause
speakNth 4 = text "fourth"
26
speakNth 4 = text "fourth"
26
speakNth 4 = text "fourth"
26
false
false
0
5
4
12
5
7
null
null
dQuixote/hearch
src/lib/Database.hs
mit
crawledFile :: String crawledFile = "data/crawled.db"
53
crawledFile :: String crawledFile = "data/crawled.db"
53
crawledFile = "data/crawled.db"
31
false
true
0
4
5
11
6
5
null
null
mthom/abominable-klambda-compiler
Compiler/Backend.hs
bsd-3-clause
writeSources :: Table -> [TopLevel] -> [Symbol] -> FileName -> Symbol -> Int -> IO Int writeSources tbl tls mods file moduleName count = withFile (T.unpack file) WriteMode $ \h -> do hPutModuleLn h moduleName mods es <- catMaybes <$> mapM (writeSource h) tls T.putStrLn $ "Writing ...
727
writeSources :: Table -> [TopLevel] -> [Symbol] -> FileName -> Symbol -> Int -> IO Int writeSources tbl tls mods file moduleName count = withFile (T.unpack file) WriteMode $ \h -> do hPutModuleLn h moduleName mods es <- catMaybes <$> mapM (writeSource h) tls T.putStrLn $ "Writing "...
726
writeSources tbl tls mods file moduleName count = withFile (T.unpack file) WriteMode $ \h -> do hPutModuleLn h moduleName mods es <- catMaybes <$> mapM (writeSource h) tls T.putStrLn $ "Writing " <> moduleName hPutExprLn h tbl moduleName mods count es return (count+1) where writ...
622
false
true
1
13
211
294
137
157
null
null
maciej-bendkowski/boltzmann-brain
Data/Boltzmann/Compiler/Haskell/Helpers.hs
bsd-3-clause
toDouble :: Double -> Exp () toDouble x = Lit () $ Frac () (toRational x) (show (toRational x))
95
toDouble :: Double -> Exp () toDouble x = Lit () $ Frac () (toRational x) (show (toRational x))
95
toDouble x = Lit () $ Frac () (toRational x) (show (toRational x))
66
false
true
0
10
18
63
29
34
null
null
mydaum/cabal
Cabal/Distribution/PackageDescription/Configuration.hs
bsd-3-clause
addBuildableConditionPDTagged :: (Eq v, Monoid c) => CondTree v c PDTagged -> CondTree v c PDTagged addBuildableConditionPDTagged t = case extractCondition (buildable . getInfo) t of Lit True -> t Lit False -> deleteConstraints t c ...
1,370
addBuildableConditionPDTagged :: (Eq v, Monoid c) => CondTree v c PDTagged -> CondTree v c PDTagged addBuildableConditionPDTagged t = case extractCondition (buildable . getInfo) t of Lit True -> t Lit False -> deleteConstraints t c ...
1,370
addBuildableConditionPDTagged t = case extractCondition (buildable . getInfo) t of Lit True -> t Lit False -> deleteConstraints t c -> CondNode mempty mempty [condIfThenElse c t (deleteConstraints t)] where deleteConstraints = mapTreeConstrs (const mempty) getInfo :: PDTagged -...
1,207
false
true
0
12
320
197
102
95
null
null
vladimir-ipatov/ganeti
src/Ganeti/Query/Query.hs
gpl-2.0
-- | Extracts all quoted strings from a list, ignoring the -- 'NumericValue' entries. getAllQuotedStrings :: [FilterValue] -> [String] getAllQuotedStrings = concatMap extractor where extractor (NumericValue _) = [] extractor (QuotedString val) = [val] -- | Checks that we have either requested a valid...
371
getAllQuotedStrings :: [FilterValue] -> [String] getAllQuotedStrings = concatMap extractor where extractor (NumericValue _) = [] extractor (QuotedString val) = [val] -- | Checks that we have either requested a valid set of names, or we -- have a more complex filter.
285
getAllQuotedStrings = concatMap extractor where extractor (NumericValue _) = [] extractor (QuotedString val) = [val] -- | Checks that we have either requested a valid set of names, or we -- have a more complex filter.
236
true
true
1
7
73
64
35
29
null
null
nomeata/codeworld
codeworld-base/src/Internal/Text.hs
apache-2.0
toString :: Text -> String toString = J.unpack . unT
52
toString :: Text -> String toString = J.unpack . unT
52
toString = J.unpack . unT
25
false
true
1
7
9
29
12
17
null
null
VoQn/tapl-hs
src/Main.hs
mit
main :: IO () main = runInputT defaultSettings repl where quit = outputStrLn "Goodbye" repl = ask >>= \case Halt -> quit mode -> loop mode loop mode = getInputLine (header mode) >>= \case Nothing -> quit Just input -> proc mode input >> loop mode
275
main :: IO () main = runInputT defaultSettings repl where quit = outputStrLn "Goodbye" repl = ask >>= \case Halt -> quit mode -> loop mode loop mode = getInputLine (header mode) >>= \case Nothing -> quit Just input -> proc mode input >> loop mode
275
main = runInputT defaultSettings repl where quit = outputStrLn "Goodbye" repl = ask >>= \case Halt -> quit mode -> loop mode loop mode = getInputLine (header mode) >>= \case Nothing -> quit Just input -> proc mode input >> loop mode
261
false
true
4
11
74
121
53
68
null
null
JoeyEremondi/elm-summer-opt
src/Type/Type.hs
bsd-3-clause
variableToSrcType :: Variable -> Variable -> IO T.Canonical variableToSrcType rootVariable variable = do desc <- UF.descriptor variable srcType <- maybe (backupSrcType desc) (termToSrcType rootVariable) (structure desc) case alias desc of Nothing -> return srcType Just (name,...
1,198
variableToSrcType :: Variable -> Variable -> IO T.Canonical variableToSrcType rootVariable variable = do desc <- UF.descriptor variable srcType <- maybe (backupSrcType desc) (termToSrcType rootVariable) (structure desc) case alias desc of Nothing -> return srcType Just (name,...
1,198
variableToSrcType rootVariable variable = do desc <- UF.descriptor variable srcType <- maybe (backupSrcType desc) (termToSrcType rootVariable) (structure desc) case alias desc of Nothing -> return srcType Just (name, args) -> case srcType of T.Type (...
1,138
false
true
0
21
476
357
169
188
null
null
cryptonomicon314/pyccoon-hs-xml
Text/XML/Light/Input.hs
bsd-3-clause
nodes ns ps (TokText txt : ts) = let (es,qs,ts1) = nodes ns ps ts (more,es1) = case es of Text cd : es1' | cdVerbatim cd == cdVerbatim txt -> (cdData cd,es1') _ -> ([],es) in (Text txt { cdData = cdData txt...
346
nodes ns ps (TokText txt : ts) = let (es,qs,ts1) = nodes ns ps ts (more,es1) = case es of Text cd : es1' | cdVerbatim cd == cdVerbatim txt -> (cdData cd,es1') _ -> ([],es) in (Text txt { cdData = cdData txt...
346
nodes ns ps (TokText txt : ts) = let (es,qs,ts1) = nodes ns ps ts (more,es1) = case es of Text cd : es1' | cdVerbatim cd == cdVerbatim txt -> (cdData cd,es1') _ -> ([],es) in (Text txt { cdData = cdData txt...
346
false
false
0
16
164
150
76
74
null
null
hvr/lens
src/Control/Lens/TH.hs
bsd-3-clause
-- | Generate overloaded field accessors. -- -- /e.g/ -- -- @ -- data Foo a = Foo { _fooX :: 'Int', _fooY : a } -- newtype Bar = Bar { _barX :: 'Char' } -- makeFields ''Foo -- makeFields ''Bar -- @ -- -- will create -- -- @ -- _fooXLens :: Lens' (Foo a) Int -- _fooYLens :: Lens (Foo a) (Foo b) a b -- class HasX s a | s...
738
makeFields :: Name -> Q [Dec] makeFields = makeFieldsWith defaultFieldRules
75
makeFields = makeFieldsWith defaultFieldRules
45
true
true
0
7
169
56
44
12
null
null
AgustinCB/hgen
src/Population.hs
gpl-2.0
sort :: Population a -> Population a sort (Population pop c@(Chromosome _ _ fitness _ _ showSolution)) = (Population (sortBy compare pop) c) where compare sol1 sol2 | (fitness sol1) > (fitness sol2) = LT | (fitness sol2) > (fitness sol1) = GT | otherwise = EQ
313
sort :: Population a -> Population a sort (Population pop c@(Chromosome _ _ fitness _ _ showSolution)) = (Population (sortBy compare pop) c) where compare sol1 sol2 | (fitness sol1) > (fitness sol2) = LT | (fitness sol2) > (fitness sol1) = GT | otherwise = EQ
313
sort (Population pop c@(Chromosome _ _ fitness _ _ showSolution)) = (Population (sortBy compare pop) c) where compare sol1 sol2 | (fitness sol1) > (fitness sol2) = LT | (fitness sol2) > (fitness sol1) = GT | otherwise = EQ
276
false
true
13
8
100
131
66
65
null
null
tjakway/ghcjvm
utils/hpc/HpcMarkup.hs
bsd-3-clause
addMarkup tabStop0 ('\n':cs) loc@(Loc ln col) os@((Loc ln2 col2,_):_) ticks | ln == ln2 && col < col2 = addMarkup tabStop0 (' ':'\n':cs) loc os ticks
169
addMarkup tabStop0 ('\n':cs) loc@(Loc ln col) os@((Loc ln2 col2,_):_) ticks | ln == ln2 && col < col2 = addMarkup tabStop0 (' ':'\n':cs) loc os ticks
169
addMarkup tabStop0 ('\n':cs) loc@(Loc ln col) os@((Loc ln2 col2,_):_) ticks | ln == ln2 && col < col2 = addMarkup tabStop0 (' ':'\n':cs) loc os ticks
169
false
false
0
10
45
96
49
47
null
null
josefs/autosar
oldARSim/ARSim.hs
bsd-3-clause
may_hear :: Connected -> Label -> Proc -> Label may_hear conn PASS _ = PASS
118
may_hear :: Connected -> Label -> Proc -> Label may_hear conn PASS _ = PASS
118
may_hear conn PASS _ = PASS
70
false
true
0
9
57
36
16
20
null
null
anton-dessiatov/ghc
compiler/deSugar/Check.hs
bsd-3-clause
untidy_con (InfixCon p1 p2) = InfixCon (untidy_pars p1) (untidy_pars p2)
73
untidy_con (InfixCon p1 p2) = InfixCon (untidy_pars p1) (untidy_pars p2)
73
untidy_con (InfixCon p1 p2) = InfixCon (untidy_pars p1) (untidy_pars p2)
73
false
false
0
7
10
34
16
18
null
null
enolan/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
tcname (SN (MethodN _)) = True
30
tcname (SN (MethodN _)) = True
30
tcname (SN (MethodN _)) = True
30
false
false
0
9
5
21
10
11
null
null
thought2/diamond-kata
test/Test.hs
bsd-3-clause
mkTest s xs = TestLabel s $ TestList xs
39
mkTest s xs = TestLabel s $ TestList xs
39
mkTest s xs = TestLabel s $ TestList xs
39
false
false
0
6
8
21
9
12
null
null
green-haskell/ghc
compiler/coreSyn/CoreUnfold.hs
bsd-3-clause
mkSizeIs :: FastInt -> FastInt -> Bag (Id, Int) -> FastInt -> ExprSize mkSizeIs max n xs d | (n -# d) ># max = TooBig | otherwise = SizeIs n xs d
171
mkSizeIs :: FastInt -> FastInt -> Bag (Id, Int) -> FastInt -> ExprSize mkSizeIs max n xs d | (n -# d) ># max = TooBig | otherwise = SizeIs n xs d
171
mkSizeIs max n xs d | (n -# d) ># max = TooBig | otherwise = SizeIs n xs d
100
false
true
0
10
58
84
39
45
null
null
kellino/TypeSystems
fullSimple/PrettyPrint.hs
mit
count (TmSucc t) = 1 + count t
30
count (TmSucc t) = 1 + count t
30
count (TmSucc t) = 1 + count t
30
false
false
0
7
7
22
10
12
null
null
Baranowski/SourceGraph
Analyse/Visualise.hs
gpl-3.0
drawGraph' :: String -> HData' -> DotGraph Node drawGraph' gid dg = setID (toGraphID gid) . graphvizClusters params $ compactData dg' where params = Params True gAttrs N undefined undefined modClustAttrs nAttr eAttr dg' = collapsedHData dg gAttrs = [nodeAttrs] -- [GraphA...
616
drawGraph' :: String -> HData' -> DotGraph Node drawGraph' gid dg = setID (toGraphID gid) . graphvizClusters params $ compactData dg' where params = Params True gAttrs N undefined undefined modClustAttrs nAttr eAttr dg' = collapsedHData dg gAttrs = [nodeAttrs] -- [GraphA...
616
drawGraph' gid dg = setID (toGraphID gid) . graphvizClusters params $ compactData dg' where params = Params True gAttrs N undefined undefined modClustAttrs nAttr eAttr dg' = collapsedHData dg gAttrs = [nodeAttrs] -- [GraphAttrs [toLabel t]] nAttr = entityAttributes dg' Fa...
561
false
true
0
9
141
114
58
56
null
null
OS2World/DEV-UTIL-HUGS
libraries/Graphics/UI/GLUT/Callbacks/Registration.hs
bsd-3-clause
theScavenger :: IORef (FunPtr TimerCallback) theScavenger = unsafePerformIO (newIORef =<< makeTimerCallback (\_ -> do cleanupList <- getCleanupList mapM_ freeHaskellFunPtr cleanupList setCleanupList []))
212
theScavenger :: IORef (FunPtr TimerCallback) theScavenger = unsafePerformIO (newIORef =<< makeTimerCallback (\_ -> do cleanupList <- getCleanupList mapM_ freeHaskellFunPtr cleanupList setCleanupList []))
212
theScavenger = unsafePerformIO (newIORef =<< makeTimerCallback (\_ -> do cleanupList <- getCleanupList mapM_ freeHaskellFunPtr cleanupList setCleanupList []))
167
false
true
0
14
30
64
30
34
null
null
fizruk/lxc
src/System/LXC/Internal/Container.hs
bsd-3-clause
printState ContainerRunning = "RUNNING"
47
printState ContainerRunning = "RUNNING"
47
printState ContainerRunning = "RUNNING"
47
false
false
0
5
11
9
4
5
null
null
gspia/half-baked
hb4-button-reflex/src/Main.hs
bsd-2-clause
b2Txt False = "Toggle off"
26
b2Txt False = "Toggle off"
26
b2Txt False = "Toggle off"
26
false
false
0
5
4
9
4
5
null
null
pixbi/duplo
tests/Tests.hs
mit
main :: IO () main = defaultMain tests
38
main :: IO () main = defaultMain tests
38
main = defaultMain tests
24
false
true
0
6
7
19
9
10
null
null
li-zhirui/EoplLangs
src/ExplicitRefs/Evaluator.hs
bsd-3-clause
valueOf (CallExpr rator rands) env = evalCallExpr rator rands env
69
valueOf (CallExpr rator rands) env = evalCallExpr rator rands env
69
valueOf (CallExpr rator rands) env = evalCallExpr rator rands env
69
false
false
1
7
13
28
12
16
null
null
romanb/amazonka
amazonka-elasticache/gen/Network/AWS/ElastiCache/DescribeReplicationGroups.hs
mpl-2.0
-- | Provides an identifier to allow retrieval of paginated results. drgrMarker :: Lens' DescribeReplicationGroupsResponse (Maybe Text) drgrMarker = lens _drgrMarker (\s a -> s { _drgrMarker = a })
197
drgrMarker :: Lens' DescribeReplicationGroupsResponse (Maybe Text) drgrMarker = lens _drgrMarker (\s a -> s { _drgrMarker = a })
128
drgrMarker = lens _drgrMarker (\s a -> s { _drgrMarker = a })
61
true
true
0
9
29
46
25
21
null
null
shlevy/ghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
-- FETCHPC for PIC on Darwin/x86 -- get the instruction pointer into a register -- (Terminology note: the IP is called Program Counter on PPC, -- and it's a good thing to use the same name on both platforms) pprInstr (FETCHPC reg) = vcat [ text "\tcall 1f", hcat [ text "1:\tpopl\t", pprReg I...
341
pprInstr (FETCHPC reg) = vcat [ text "\tcall 1f", hcat [ text "1:\tpopl\t", pprReg II32 reg ] ]
120
pprInstr (FETCHPC reg) = vcat [ text "\tcall 1f", hcat [ text "1:\tpopl\t", pprReg II32 reg ] ]
120
true
false
0
8
94
49
25
24
null
null
greenrd/wpfixcites
src/Text/Mediawiki/Wikipedia.hs
bsd-3-clause
removePortIfExists :: Int -> Endo URI removePortIfExists defaultPort = Endo $ authority . _Just . port %~ (pure (Endo mempty) `applyFor` check) where check :: String -> Maybe () check = guard . (== ':' : show defaultPort)
233
removePortIfExists :: Int -> Endo URI removePortIfExists defaultPort = Endo $ authority . _Just . port %~ (pure (Endo mempty) `applyFor` check) where check :: String -> Maybe () check = guard . (== ':' : show defaultPort)
233
removePortIfExists defaultPort = Endo $ authority . _Just . port %~ (pure (Endo mempty) `applyFor` check) where check :: String -> Maybe () check = guard . (== ':' : show defaultPort)
195
false
true
2
10
49
92
47
45
null
null
spechub/Hets
Comorphisms/QVTR2CASL.hs
gpl-2.0
collectWhenVarSet :: [RelVar] -> Maybe QVTRAs.WhenWhere -> [RelVar] collectWhenVarSet _ Nothing = []
100
collectWhenVarSet :: [RelVar] -> Maybe QVTRAs.WhenWhere -> [RelVar] collectWhenVarSet _ Nothing = []
100
collectWhenVarSet _ Nothing = []
32
false
true
0
8
12
37
19
18
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_NSIS_SECTIONDEF :: Int wxSTC_NSIS_SECTIONDEF = 9
54
wxSTC_NSIS_SECTIONDEF :: Int wxSTC_NSIS_SECTIONDEF = 9
54
wxSTC_NSIS_SECTIONDEF = 9
25
false
true
0
6
5
18
7
11
null
null
DimaSamoz/thodo
src/Util.hs
mit
-- | Converts a deadline to a category. deadlineToCategory :: Deadline -> IO Category deadlineToCategory None = return $ RelTime Today
134
deadlineToCategory :: Deadline -> IO Category deadlineToCategory None = return $ RelTime Today
94
deadlineToCategory None = return $ RelTime Today
48
true
true
0
6
20
29
14
15
null
null
rfranek/duckling
Duckling/Time/RO/Rules.hs
bsd-3-clause
ruleAzi :: Rule ruleAzi = Rule { name = "azi" , pattern = [ regex "a(st(a|\x0103))?zi" ] , prod = \_ -> tt $ cycleNth TG.Day 0 }
144
ruleAzi :: Rule ruleAzi = Rule { name = "azi" , pattern = [ regex "a(st(a|\x0103))?zi" ] , prod = \_ -> tt $ cycleNth TG.Day 0 }
144
ruleAzi = Rule { name = "azi" , pattern = [ regex "a(st(a|\x0103))?zi" ] , prod = \_ -> tt $ cycleNth TG.Day 0 }
128
false
true
0
11
43
63
32
31
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Constraint/Split.hs
bsd-3-clause
splitW (WfC γ t@(RAppTy t1 t2 _)) = do ws <- bsplitW γ t ws' <- splitW (WfC γ t1) ws'' <- splitW (WfC γ t2) return $ ws ++ ws' ++ ws''
164
splitW (WfC γ t@(RAppTy t1 t2 _)) = do ws <- bsplitW γ t ws' <- splitW (WfC γ t1) ws'' <- splitW (WfC γ t2) return $ ws ++ ws' ++ ws''
164
splitW (WfC γ t@(RAppTy t1 t2 _)) = do ws <- bsplitW γ t ws' <- splitW (WfC γ t1) ws'' <- splitW (WfC γ t2) return $ ws ++ ws' ++ ws''
164
false
false
0
10
62
93
43
50
null
null
cdepillabout/testing-code-that-accesses-db-in-haskell
without-db/typeclass/test/Test.hs
apache-2.0
pec :: Spec spec = with app $ do describe "GET blogpost" $ do it "responds with 200 after inserting something" $ do postJson "/create" testBlogPost `shouldRespondWith` 201 get "/read/1" `shouldRespondWithJson` (200, testBlogPost) it "responds with 404 because nothing has bee...
2,391
spec :: Spec spec = with app $ do describe "GET blogpost" $ do it "responds with 200 after inserting something" $ do postJson "/create" testBlogPost `shouldRespondWith` 201 get "/read/1" `shouldRespondWithJson` (200, testBlogPost) it "responds with 404 because nothing has be...
2,391
spec = with app $ do describe "GET blogpost" $ do it "responds with 200 after inserting something" $ do postJson "/create" testBlogPost `shouldRespondWith` 201 get "/read/1" `shouldRespondWithJson` (200, testBlogPost) it "responds with 404 because nothing has been inserted" ...
2,378
false
true
1
19
684
475
235
240
null
null
bitemyapp/roshask
Tests/TopicTest.hs
bsd-3-clause
leftThenRightTest :: TestTree leftThenRightTest = testCase "leftThenRight" $ do let t = fromList $ zipWith ($) [Left, Right, Right, Left, Left, Right] [1,2..] ls <- toList $ leftThenRight t ([(1,2),(5,6)] :: [(Int,Int)]) @=? take 2 ls
240
leftThenRightTest :: TestTree leftThenRightTest = testCase "leftThenRight" $ do let t = fromList $ zipWith ($) [Left, Right, Right, Left, Left, Right] [1,2..] ls <- toList $ leftThenRight t ([(1,2),(5,6)] :: [(Int,Int)]) @=? take 2 ls
240
leftThenRightTest = testCase "leftThenRight" $ do let t = fromList $ zipWith ($) [Left, Right, Right, Left, Left, Right] [1,2..] ls <- toList $ leftThenRight t ([(1,2),(5,6)] :: [(Int,Int)]) @=? take 2 ls
210
false
true
0
14
41
130
70
60
null
null
carbolymer/blockchain
blockchain-ui/src/Blockchain/UI/Core.hs
apache-2.0
nodeToNodeDto :: Core.Node -> NodeDto nodeToNodeDto node = NodeDto (Core.id node) (Core.url node) 0
99
nodeToNodeDto :: Core.Node -> NodeDto nodeToNodeDto node = NodeDto (Core.id node) (Core.url node) 0
99
nodeToNodeDto node = NodeDto (Core.id node) (Core.url node) 0
61
false
true
0
8
13
46
22
24
null
null
sdiehl/ghc
libraries/base/GHC/Storable.hs
bsd-3-clause
readWordOffPtr (Ptr a) (I# i) = IO $ \s -> case readWordOffAddr# a i s of (# s2, x #) -> (# s2, W# x #)
110
readWordOffPtr (Ptr a) (I# i) = IO $ \s -> case readWordOffAddr# a i s of (# s2, x #) -> (# s2, W# x #)
110
readWordOffPtr (Ptr a) (I# i) = IO $ \s -> case readWordOffAddr# a i s of (# s2, x #) -> (# s2, W# x #)
110
false
false
0
11
32
62
31
31
null
null