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
topliceanu/learn
haskell/io.hs
mit
titleize :: String -> String titleize [] = []
45
titleize :: String -> String titleize [] = []
45
titleize [] = []
16
false
true
0
6
8
22
11
11
null
null
zoomhub/zoomhub
src/ZoomHub/Web/Types/Embed.hs
mit
cssClassNames :: [String] cssClassNames = ["__zoomhub", legacyCSSClassName]
75
cssClassNames :: [String] cssClassNames = ["__zoomhub", legacyCSSClassName]
75
cssClassNames = ["__zoomhub", legacyCSSClassName]
49
false
true
0
5
6
20
12
8
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
bsd-3-clause
getCmmReg (CmmGlobal g) = do onStack <- checkStackReg g dflags <- getDynFlags if onStack then return (lmGlobalRegVar dflags g) else fail $ "getCmmReg: Cmm register " ++ showSDoc dflags (ppr g) ++ " not stack-allocated!" -- | Return the value of a given register, as well as its type. M...
355
getCmmReg (CmmGlobal g) = do onStack <- checkStackReg g dflags <- getDynFlags if onStack then return (lmGlobalRegVar dflags g) else fail $ "getCmmReg: Cmm register " ++ showSDoc dflags (ppr g) ++ " not stack-allocated!" -- | Return the value of a given register, as well as its type. M...
355
getCmmReg (CmmGlobal g) = do onStack <- checkStackReg g dflags <- getDynFlags if onStack then return (lmGlobalRegVar dflags g) else fail $ "getCmmReg: Cmm register " ++ showSDoc dflags (ppr g) ++ " not stack-allocated!" -- | Return the value of a given register, as well as its type. M...
355
false
false
0
12
91
79
38
41
null
null
seereason/cabal
Cabal/Distribution/Simple/GHC.hs
bsd-3-clause
getLibDir' :: Verbosity -> ConfiguredProgram -> IO FilePath getLibDir' verbosity ghcProg = dropWhileEndLE isSpace `fmap` rawSystemProgramStdout verbosity ghcProg ["--print-libdir"]
189
getLibDir' :: Verbosity -> ConfiguredProgram -> IO FilePath getLibDir' verbosity ghcProg = dropWhileEndLE isSpace `fmap` rawSystemProgramStdout verbosity ghcProg ["--print-libdir"]
189
getLibDir' verbosity ghcProg = dropWhileEndLE isSpace `fmap` rawSystemProgramStdout verbosity ghcProg ["--print-libdir"]
129
false
true
0
7
27
46
23
23
null
null
spacekitteh/compdata
src/Data/Comp/Multi/Annotation.hs
bsd-3-clause
-- | This function transforms a function with a domain constructed -- from a functor to a function with a domain constructed with the -- same functor but with an additional annotation. liftA' :: (DistAnn s' p s, HFunctor s') => (s' a :-> Cxt h s' a) -> s a :-> Cxt h s a liftA' f v = let (v' O.:&: p) = projectA v...
349
liftA' :: (DistAnn s' p s, HFunctor s') => (s' a :-> Cxt h s' a) -> s a :-> Cxt h s a liftA' f v = let (v' O.:&: p) = projectA v in ann p (f v')
164
liftA' f v = let (v' O.:&: p) = projectA v in ann p (f v')
71
true
true
0
10
91
108
53
55
null
null
sdiehl/ghc
compiler/utils/Pretty.hs
bsd-3-clause
ptext :: PtrString -> Doc ptext s = textBeside_ (LStr s) (lengthPS s) Empty
75
ptext :: PtrString -> Doc ptext s = textBeside_ (LStr s) (lengthPS s) Empty
75
ptext s = textBeside_ (LStr s) (lengthPS s) Empty
49
false
true
0
7
13
37
18
19
null
null
rueshyna/gogol
gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs
mpl-2.0
-- | Creates a value of 'ChartData' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'cdSourceRange' chartData :: ChartData chartData = ChartData' { _cdSourceRange = Nothing }
275
chartData :: ChartData chartData = ChartData' { _cdSourceRange = Nothing }
90
chartData = ChartData' { _cdSourceRange = Nothing }
63
true
true
0
6
60
33
18
15
null
null
ezyang/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
-- Constructing miscellaneous other labels mkDeadStripPreventer :: CLabel -> CLabel mkDeadStripPreventer lbl = DeadStripPreventer lbl
140
mkDeadStripPreventer :: CLabel -> CLabel mkDeadStripPreventer lbl = DeadStripPreventer lbl
97
mkDeadStripPreventer lbl = DeadStripPreventer lbl
56
true
true
0
7
21
27
12
15
null
null
aparent/qacg
src/QACG/CircGen/Bit/Equal.hs
bsd-3-clause
mkEqualOutOfPlace, mkNotEqualOutOfPlace :: [String]-> [String] -> String -> Circuit mkEqualOutOfPlace = mkEq equal
119
mkEqualOutOfPlace, mkNotEqualOutOfPlace :: [String]-> [String] -> String -> Circuit mkEqualOutOfPlace = mkEq equal
118
mkEqualOutOfPlace = mkEq equal
30
false
true
2
9
17
44
20
24
null
null
brendanhay/gogol
gogol-language/gen/Network/Google/Language/Types/Product.hs
mpl-2.0
-- | For calls to AnalyzeSentiment or if -- AnnotateTextRequest.Features.extract_document_sentiment is set to true, -- this field will contain the sentiment for the sentence. sSentiment :: Lens' Sentence (Maybe Sentiment) sSentiment = lens _sSentiment (\ s a -> s{_sSentiment = a})
283
sSentiment :: Lens' Sentence (Maybe Sentiment) sSentiment = lens _sSentiment (\ s a -> s{_sSentiment = a})
108
sSentiment = lens _sSentiment (\ s a -> s{_sSentiment = a})
61
true
true
0
9
42
50
27
23
null
null
romanb/amazonka
amazonka-autoscaling/gen/Network/AWS/AutoScaling/Types.hs
mpl-2.0
-- | The CloudWatch Alarms related to the policy. sp1Alarms :: Lens' ScalingPolicy [Alarm] sp1Alarms = lens _sp1Alarms (\s a -> s { _sp1Alarms = a }) . _List
157
sp1Alarms :: Lens' ScalingPolicy [Alarm] sp1Alarms = lens _sp1Alarms (\s a -> s { _sp1Alarms = a }) . _List
107
sp1Alarms = lens _sp1Alarms (\s a -> s { _sp1Alarms = a }) . _List
66
true
true
0
10
28
47
26
21
null
null
skedgeme/libsystemd
src/Systemd/Wrapper/Journal.hs
bsd-3-clause
----------------------- -- Predefined Fields -- ----------------------- message = JournalField "MESSAGE"
105
message = JournalField "MESSAGE"
32
message = JournalField "MESSAGE"
32
true
false
1
5
10
15
7
8
null
null
jvilar/hrows
lib/GUI/DialogManager/Actions.hs
gpl-2.0
asInt32 :: Enum e => e -> Int32 asInt32 = fromIntegral . fromEnum
65
asInt32 :: Enum e => e -> Int32 asInt32 = fromIntegral . fromEnum
65
asInt32 = fromIntegral . fromEnum
33
false
true
1
8
12
34
14
20
null
null
lspitzner/brittany
data/Test308.hs
agpl-3.0
layoutPatternBindFinal alignmentToken binderDoc mPatDoc clauseDocs = do docAlt $ -- one-line solution [ docCols (ColBindingLine alignmentToken) [ docSeq (patPartInline ++ [guardPart]) , docSeq [ appSep $ return binderDoc , docForceSingleline $ ret...
1,755
layoutPatternBindFinal alignmentToken binderDoc mPatDoc clauseDocs = do docAlt $ -- one-line solution [ docCols (ColBindingLine alignmentToken) [ docSeq (patPartInline ++ [guardPart]) , docSeq [ appSep $ return binderDoc , docForceSingleline $ ret...
1,755
layoutPatternBindFinal alignmentToken binderDoc mPatDoc clauseDocs = do docAlt $ -- one-line solution [ docCols (ColBindingLine alignmentToken) [ docSeq (patPartInline ++ [guardPart]) , docSeq [ appSep $ return binderDoc , docForceSingleline $ ret...
1,755
false
false
0
21
659
434
226
208
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/GHC/Misc.hs
bsd-3-clause
symbolTyVar n = stringTyVar (symbolString n)
44
symbolTyVar n = stringTyVar (symbolString n)
44
symbolTyVar n = stringTyVar (symbolString n)
44
false
false
0
7
5
18
8
10
null
null
KaneTW/Idris-dev
src/Idris/REPL.hs
bsd-3-clause
runIdeModeCommand h id orig fn mods (IdeMode.Apropos a) = process fn (Apropos [] a)
85
runIdeModeCommand h id orig fn mods (IdeMode.Apropos a) = process fn (Apropos [] a)
85
runIdeModeCommand h id orig fn mods (IdeMode.Apropos a) = process fn (Apropos [] a)
85
false
false
0
8
15
42
20
22
null
null
tolysz/dsp
Numeric/Transform/Fourier/FFTUtils.hs
gpl-2.0
log10 x = logBase 10 x
22
log10 x = logBase 10 x
22
log10 x = logBase 10 x
22
false
false
0
5
5
14
6
8
null
null
toonn/wyah
src/STLCLexer.hs
bsd-2-clause
reservedOp :: String -> Parser () reservedOp = Tok.reservedOp lexer
67
reservedOp :: String -> Parser () reservedOp = Tok.reservedOp lexer
67
reservedOp = Tok.reservedOp lexer
33
false
true
0
8
9
30
13
17
null
null
nevrenato/Hets_Fork
CASL/CompositionTable/ModelChecker.hs
gpl-2.0
gVAs :: [VAR] -> [Baserel] -> [[(VAR, Baserel)]] gVAs [] _ = [[]]
65
gVAs :: [VAR] -> [Baserel] -> [[(VAR, Baserel)]] gVAs [] _ = [[]]
65
gVAs [] _ = [[]]
16
false
true
0
9
12
49
28
21
null
null
li-zhirui/EoplLangs
src/CallByNeed/Parser.hs
bsd-3-clause
lexeme :: Parser a -> Parser a lexeme = L.lexeme spaceConsumer
62
lexeme :: Parser a -> Parser a lexeme = L.lexeme spaceConsumer
62
lexeme = L.lexeme spaceConsumer
31
false
true
0
6
10
26
12
14
null
null
jetho/kendo
src/Kendo/Parser.hs
bsd-3-clause
parseLocalDecl :: Parser Decl parseLocalDecl = choice [ parseFunDecl --, parseTypeDecl ]
100
parseLocalDecl :: Parser Decl parseLocalDecl = choice [ parseFunDecl --, parseTypeDecl ]
100
parseLocalDecl = choice [ parseFunDecl --, parseTypeDecl ]
70
false
true
0
5
23
21
11
10
null
null
meteficha/yesod
yesod-core/Yesod/Core/Handler.hs
mit
notAuthenticated :: MonadHandler m => m a notAuthenticated = hcError NotAuthenticated
85
notAuthenticated :: MonadHandler m => m a notAuthenticated = hcError NotAuthenticated
85
notAuthenticated = hcError NotAuthenticated
43
false
true
0
6
10
24
11
13
null
null
wavewave/metapackage
src/MetaPackage.hs
bsd-2-clause
dep_vrange :: DependencyEqName -> VersionRange dep_vrange (DepEqName (Dependency _ v)) = v
91
dep_vrange :: DependencyEqName -> VersionRange dep_vrange (DepEqName (Dependency _ v)) = v
90
dep_vrange (DepEqName (Dependency _ v)) = v
43
false
true
0
9
12
32
16
16
null
null
oshyshko/adventofcode
src/Y15/D10.hs
bsd-3-clause
solve1 :: String -> Int solve1 = length . (L.!! 40) . iterate solve . head . lines
82
solve1 :: String -> Int solve1 = length . (L.!! 40) . iterate solve . head . lines
82
solve1 = length . (L.!! 40) . iterate solve . head . lines
58
false
true
0
9
17
40
21
19
null
null
ublubu/wyascheme
src/Types.hs
mit
liftEither (Left x) = throwError x
34
liftEither (Left x) = throwError x
34
liftEither (Left x) = throwError x
34
false
false
0
7
5
18
8
10
null
null
ctford/Idris-Elba-dev
src/Idris/Core/TT.hs
bsd-3-clause
tcname _ = False
16
tcname _ = False
16
tcname _ = False
16
false
false
0
5
3
9
4
5
null
null
lpeterse/koka
src/Common/Range.hs
apache-2.0
-- | Make a range makeRange :: Pos -> Pos -> Range makeRange p1 p2 = assertion "Range.makeRange: positions from different sources" (posSource p1 == posSource p2) $ Range (minPos p1 p2) (maxPos p1 p2)
205
makeRange :: Pos -> Pos -> Range makeRange p1 p2 = assertion "Range.makeRange: positions from different sources" (posSource p1 == posSource p2) $ Range (minPos p1 p2) (maxPos p1 p2)
187
makeRange p1 p2 = assertion "Range.makeRange: positions from different sources" (posSource p1 == posSource p2) $ Range (minPos p1 p2) (maxPos p1 p2)
154
true
true
0
9
40
75
34
41
null
null
msakai/icfpc2013
src/Interaction.hs
bsd-2-clause
-- For Debugging responseToValue' :: N.Result (Response String) -> IO (ResponseCode, Maybe Value) responseToValue' res = getResponseCode res >>= \ c -> displayResponseCode c >> getResponseBody res >>= \ b -> displayResponseBody b >> return (c, decode . BL.pack $ b)
309
responseToValue' :: N.Result (Response String) -> IO (ResponseCode, Maybe Value) responseToValue' res = getResponseCode res >>= \ c -> displayResponseCode c >> getResponseBody res >>= \ b -> displayResponseBody b >> return (c, decode . BL.pack $ b)
291
responseToValue' res = getResponseCode res >>= \ c -> displayResponseCode c >> getResponseBody res >>= \ b -> displayResponseBody b >> return (c, decode . BL.pack $ b)
210
true
true
0
14
84
99
49
50
null
null
holzensp/ghc
compiler/main/DriverPipeline.hs
bsd-3-clause
getLocation :: HscSource -> ModuleName -> CompPipeline ModLocation getLocation src_flavour mod_name = do dflags <- getDynFlags PipeEnv{ src_basename=basename, src_suffix=suff } <- getPipeEnv -- Build a ModLocation to pass to hscMain. -- The source filename is rather irrelevant by now, but...
2,248
getLocation :: HscSource -> ModuleName -> CompPipeline ModLocation getLocation src_flavour mod_name = do dflags <- getDynFlags PipeEnv{ src_basename=basename, src_suffix=suff } <- getPipeEnv -- Build a ModLocation to pass to hscMain. -- The source filename is rather irrelevant by now, but...
2,248
getLocation src_flavour mod_name = do dflags <- getDynFlags PipeEnv{ src_basename=basename, src_suffix=suff } <- getPipeEnv -- Build a ModLocation to pass to hscMain. -- The source filename is rather irrelevant by now, but it's used -- by hscMain for messages. hscMain also needs ...
2,181
false
true
0
15
563
244
126
118
null
null
bhickey/TreeStructures
Data/Heap/Pairing.hs
bsd-3-clause
singleton :: (Ord a) => a -> PairingHeap a singleton n = Heap n []
66
singleton :: (Ord a) => a -> PairingHeap a singleton n = Heap n []
66
singleton n = Heap n []
23
false
true
0
7
14
37
18
19
null
null
keera-studios/hsQt
extra-pkgs/Glome/Qt/Glome/Solid.hs
bsd-2-clause
everything_bbox = Bbox (Vec (-infinity) (-infinity) (-infinity)) (Vec infinity infinity infinity)
104
everything_bbox = Bbox (Vec (-infinity) (-infinity) (-infinity)) (Vec infinity infinity infinity)
104
everything_bbox = Bbox (Vec (-infinity) (-infinity) (-infinity)) (Vec infinity infinity infinity)
104
false
false
1
8
17
50
24
26
null
null
fmapfmapfmap/amazonka
amazonka-lambda/test/Test/AWS/Gen/Lambda.hs
mpl-2.0
-- Auto-generated: the actual test selection needs to be manually placed into -- the top-level so that real test data can be incrementally added. -- -- This commented snippet is what the entire set should look like: -- fixtures :: TestTree -- fixtures = -- [ testGroup "request" -- [ testGetFunctionConfigur...
3,142
testGetFunctionConfiguration :: GetFunctionConfiguration -> TestTree testGetFunctionConfiguration = req "GetFunctionConfiguration" "fixture/GetFunctionConfiguration.yaml"
178
testGetFunctionConfiguration = req "GetFunctionConfiguration" "fixture/GetFunctionConfiguration.yaml"
109
true
true
0
5
977
128
118
10
null
null
zmthy/snaplet-rest
src/Snap/Snaplet/Rest/Config.hs
mit
------------------------------------------------------------------------------ -- | Initialize the resource snaplet with the given configuration. resourceInit :: ResourceConfig (Handler b b) -> SnapletInit b (Resources b) resourceInit = makeSnaplet snapletName snapletDescription Nothing . return
304
resourceInit :: ResourceConfig (Handler b b) -> SnapletInit b (Resources b) resourceInit = makeSnaplet snapletName snapletDescription Nothing . return
158
resourceInit = makeSnaplet snapletName snapletDescription Nothing . return
74
true
true
0
8
37
50
25
25
null
null
bgamari/haskell-platform
hptool/src/PlatformDB.hs
bsd-3-clause
isTool IncTool = True
21
isTool IncTool = True
21
isTool IncTool = True
21
false
false
0
5
3
9
4
5
null
null
7lb/tsp-haskell
nn.hs
mit
nearest :: Tour -> Tour nearest [] = []
39
nearest :: Tour -> Tour nearest [] = []
39
nearest [] = []
15
false
true
0
6
8
22
11
11
null
null
gridaphobe/ghc
compiler/coreSyn/CoreUtils.hs
bsd-3-clause
exprType (Lam binder expr) = mkPiType binder (exprType expr)
62
exprType (Lam binder expr) = mkPiType binder (exprType expr)
62
exprType (Lam binder expr) = mkPiType binder (exprType expr)
62
false
false
0
7
10
28
13
15
null
null
olive/demiurge
src/Demiurge/World.hs
mit
forbid :: String -> TaskPermission forbid = TaskForbidden . Message
67
forbid :: String -> TaskPermission forbid = TaskForbidden . Message
67
forbid = TaskForbidden . Message
32
false
true
1
7
9
27
11
16
null
null
GaloisInc/sk-dev-platform
libs/SCD/src/SCD/M4/Dependencies.hs
bsd-3-clause
callGraphStmt (Ifndef _ s1) = callGraphStmts s1
59
callGraphStmt (Ifndef _ s1) = callGraphStmts s1
59
callGraphStmt (Ifndef _ s1) = callGraphStmts s1
59
false
false
0
7
18
20
9
11
null
null
keithodulaigh/Hets
THF/Utils.hs
gpl-2.0
rewriteBinaryFormula' :: (RewriteFuns a, a) -> THFBinaryFormula -> Result THFBinaryFormula rewriteBinaryFormula' (fns, d) bf = case bf of TBF_THF_Binary_Type _ -> mkError "THF.Utils.rewriteBinaryFormula: Binary Type not in THF0!" bf TBF_THF_Binary_Pair uf1 cn uf2 -> rewriteBinaryPair fns...
438
rewriteBinaryFormula' :: (RewriteFuns a, a) -> THFBinaryFormula -> Result THFBinaryFormula rewriteBinaryFormula' (fns, d) bf = case bf of TBF_THF_Binary_Type _ -> mkError "THF.Utils.rewriteBinaryFormula: Binary Type not in THF0!" bf TBF_THF_Binary_Pair uf1 cn uf2 -> rewriteBinaryPair fns...
438
rewriteBinaryFormula' (fns, d) bf = case bf of TBF_THF_Binary_Type _ -> mkError "THF.Utils.rewriteBinaryFormula: Binary Type not in THF0!" bf TBF_THF_Binary_Pair uf1 cn uf2 -> rewriteBinaryPair fns (fns, d) (uf1, cn, uf2) TBF_THF_Binary_Tuple bt -> liftM TBF_THF_Binary_Tuple $ rewriteBinaryTuple fns (fns, d) b...
321
false
true
5
7
86
115
61
54
null
null
alexander-at-github/eta
compiler/ETA/SimplCore/SimplEnv.hs
bsd-3-clause
substId :: SimplEnv -> InId -> SimplSR -- Returns DoneEx only on a non-Var expression substId (SimplEnv { seInScope = in_scope, seIdSubst = ids }) v = case lookupVarEnv ids v of -- Note [Global Ids in the substitution] Nothing -> DoneId (refineFromInScope in_scope v) Just (DoneId v) ...
680
substId :: SimplEnv -> InId -> SimplSR substId (SimplEnv { seInScope = in_scope, seIdSubst = ids }) v = case lookupVarEnv ids v of -- Note [Global Ids in the substitution] Nothing -> DoneId (refineFromInScope in_scope v) Just (DoneId v) -> DoneId (refineFromInScope in_scope v) ...
633
substId (SimplEnv { seInScope = in_scope, seIdSubst = ids }) v = case lookupVarEnv ids v of -- Note [Global Ids in the substitution] Nothing -> DoneId (refineFromInScope in_scope v) Just (DoneId v) -> DoneId (refineFromInScope in_scope v) Just (DoneEx (Var v)) -> DoneId (r...
594
true
true
0
12
195
141
72
69
null
null
frantisekfarka/ghc-dsi
compiler/nativeGen/PPC/Ppr.hs
bsd-3-clause
pprInstr (BL lbl _) = hcat [ ptext (sLit "\tbl\t"), ppr lbl ]
81
pprInstr (BL lbl _) = hcat [ ptext (sLit "\tbl\t"), ppr lbl ]
81
pprInstr (BL lbl _) = hcat [ ptext (sLit "\tbl\t"), ppr lbl ]
81
false
false
0
9
32
39
18
21
null
null
GaloisInc/saw-script
heapster-saw/src/Verifier/SAW/Heapster/TypeChecker.hs
bsd-3-clause
tcPointerAtomic (ExEqual _ x y) = Perm_BVProp <$> (BVProp_Eq <$> tcKExpr x <*> tcKExpr y)
95
tcPointerAtomic (ExEqual _ x y) = Perm_BVProp <$> (BVProp_Eq <$> tcKExpr x <*> tcKExpr y)
95
tcPointerAtomic (ExEqual _ x y) = Perm_BVProp <$> (BVProp_Eq <$> tcKExpr x <*> tcKExpr y)
95
false
false
0
9
20
41
19
22
null
null
diku-kmc/repg
test/Tests/Regression.hs
mit
charclass_accept_dash :: IO TS.Result charclass_accept_dash = let prog = [strQ| main := /[a-z-]*/|] in kleenexIdTest prog "a-b-c-d---d-f-eerasdfs-"
155
charclass_accept_dash :: IO TS.Result charclass_accept_dash = let prog = [strQ| main := /[a-z-]*/|] in kleenexIdTest prog "a-b-c-d---d-f-eerasdfs-"
155
charclass_accept_dash = let prog = [strQ| main := /[a-z-]*/|] in kleenexIdTest prog "a-b-c-d---d-f-eerasdfs-"
117
false
true
0
8
24
36
19
17
null
null
ImsungChoi/haskell-test
src/Testing.hs
bsd-3-clause
-- Helpers testF1 :: (Show a, Show b, Eq b) => String -> (a -> b) -> [(a, b)] -> Test testF1 s f l = Test s (uncurry (==)) $ map (first f) l
141
testF1 :: (Show a, Show b, Eq b) => String -> (a -> b) -> [(a, b)] -> Test testF1 s f l = Test s (uncurry (==)) $ map (first f) l
129
testF1 s f l = Test s (uncurry (==)) $ map (first f) l
54
true
true
0
11
35
101
52
49
null
null
beni55/libmpd-haskell
tests/Network/MPD/Applicative/OutputSpec.hs
mit
spec :: Spec spec = do describe "disableOutput" $ do it "sends a disableoutput request" $ do disableOutput 1 `with` [("disableoutput 1", Right "OK")] `shouldBe` Right () describe "enableOutput" $ do it "sends an enableoutput request" $ do ...
796
spec :: Spec spec = do describe "disableOutput" $ do it "sends a disableoutput request" $ do disableOutput 1 `with` [("disableoutput 1", Right "OK")] `shouldBe` Right () describe "enableOutput" $ do it "sends an enableoutput request" $ do ...
796
spec = do describe "disableOutput" $ do it "sends a disableoutput request" $ do disableOutput 1 `with` [("disableoutput 1", Right "OK")] `shouldBe` Right () describe "enableOutput" $ do it "sends an enableoutput request" $ do enableOutput ...
783
false
true
0
18
330
221
107
114
null
null
termite2/code-widget
CodeWidget/CodeWidgetUtil.hs
bsd-3-clause
rgnStart :: PageContext -> RegionContext -> IO G.TextIter rgnStart pg rc = do iter <- G.textBufferGetIterAtMark (pgBuffer pg) (rcStart rc) return iter -- Get a TextIter set to the end of the region
207
rgnStart :: PageContext -> RegionContext -> IO G.TextIter rgnStart pg rc = do iter <- G.textBufferGetIterAtMark (pgBuffer pg) (rcStart rc) return iter -- Get a TextIter set to the end of the region
207
rgnStart pg rc = do iter <- G.textBufferGetIterAtMark (pgBuffer pg) (rcStart rc) return iter -- Get a TextIter set to the end of the region
148
false
true
0
11
42
67
30
37
null
null
mhwombat/creatur-examples
src/Tutorial/Chapter8/Daemon.hs
bsd-3-clause
main :: IO () main = do dir <- canonicalizePath "chapter8" -- Required for daemon let u = mkSimpleUniverse "Chapter8" dir let j = simpleJob { task=runInteractingAgents run doNothing doNothing, sleepTime=0 } launch $ CreaturDaemon (simpleDaemon j u) j
276
main :: IO () main = do dir <- canonicalizePath "chapter8" -- Required for daemon let u = mkSimpleUniverse "Chapter8" dir let j = simpleJob { task=runInteractingAgents run doNothing doNothing, sleepTime=0 } launch $ CreaturDaemon (simpleDaemon j u) j
276
main = do dir <- canonicalizePath "chapter8" -- Required for daemon let u = mkSimpleUniverse "Chapter8" dir let j = simpleJob { task=runInteractingAgents run doNothing doNothing, sleepTime=0 } launch $ CreaturDaemon (simpleDaemon j u) j
262
false
true
0
12
64
91
44
47
null
null
brendanhay/gogol
gogol-cloudsearch/gen/Network/Google/CloudSearch/Types/Product.hs
mpl-2.0
-- | Creates a value of 'ResultDisplayMetadata' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'rdmMetalines' -- -- * 'rdmObjectTypeLabel' resultDisplayMetadata :: ResultDisplayMetadata resultDisplayMetadata = ResultDisplayMetad...
385
resultDisplayMetadata :: ResultDisplayMetadata resultDisplayMetadata = ResultDisplayMetadata' {_rdmMetalines = Nothing, _rdmObjectTypeLabel = Nothing}
160
resultDisplayMetadata = ResultDisplayMetadata' {_rdmMetalines = Nothing, _rdmObjectTypeLabel = Nothing}
109
true
true
0
7
59
42
24
18
null
null
PuZZleDucK/Hls
GUtils.hs
gpl-3.0
showConfigHelp :: Option -> String showConfigHelp opt | longTag /= optionTerminator = tagText++helpString | otherwise = "" --target option hidden where longTag = head (long $ flags opt) longText = " --"++longTag shortTag = head (short $ flags opt) shortText = if length short...
553
showConfigHelp :: Option -> String showConfigHelp opt | longTag /= optionTerminator = tagText++helpString | otherwise = "" --target option hidden where longTag = head (long $ flags opt) longText = " --"++longTag shortTag = head (short $ flags opt) shortText = if length short...
553
showConfigHelp opt | longTag /= optionTerminator = tagText++helpString | otherwise = "" --target option hidden where longTag = head (long $ flags opt) longText = " --"++longTag shortTag = head (short $ flags opt) shortText = if length shortTag == 1 the...
518
false
true
9
8
186
179
80
99
null
null
snoyberg/json-enumerator
Text/JSON/Enumerator.hs
bsd-2-clause
renderAtom :: Atom -> Builder renderAtom AtomNull = fromByteString "null"
73
renderAtom :: Atom -> Builder renderAtom AtomNull = fromByteString "null"
73
renderAtom AtomNull = fromByteString "null"
43
false
true
0
5
9
21
10
11
null
null
hnakamur/haskell-sandbox
sandbox-css/UnitTest.hs
bsd-3-clause
tests :: Test tests = test [ testParse stylesheet "h1 {padding-top:10px}" [RuleSet [(SimpleSel (TypeSel "h1" []))] [DeclPaddingTop (PadWidth (PWLength (Length 10.0 (Just Px)))) False]] , testParse stylesheet "h1 {border-top-color:red}" [RuleS...
5,782
tests :: Test tests = test [ testParse stylesheet "h1 {padding-top:10px}" [RuleSet [(SimpleSel (TypeSel "h1" []))] [DeclPaddingTop (PadWidth (PWLength (Length 10.0 (Just Px)))) False]] , testParse stylesheet "h1 {border-top-color:red}" [RuleS...
5,782
tests = test [ testParse stylesheet "h1 {padding-top:10px}" [RuleSet [(SimpleSel (TypeSel "h1" []))] [DeclPaddingTop (PadWidth (PWLength (Length 10.0 (Just Px)))) False]] , testParse stylesheet "h1 {border-top-color:red}" [RuleSet [...
5,768
false
true
0
20
1,441
1,960
984
976
null
null
facebookincubator/duckling
Duckling/Rules/EL.hs
bsd-3-clause
langRules (Seal Numeral) = Numeral.rules
40
langRules (Seal Numeral) = Numeral.rules
40
langRules (Seal Numeral) = Numeral.rules
40
false
false
0
7
4
17
8
9
null
null
olsner/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
pcDataConWithFixity' :: Bool -> Name -> Unique -> RuntimeRepInfo -> [TyVar] -> [TyVar] -> [Type] -> TyCon -> DataCon -- The Name should be in the DataName name space; it's the name -- of the DataCon itself. pcDataConWithFixity' declared_infix dc_name wrk_key rri tyvars ex_tyva...
1,131
pcDataConWithFixity' :: Bool -> Name -> Unique -> RuntimeRepInfo -> [TyVar] -> [TyVar] -> [Type] -> TyCon -> DataCon pcDataConWithFixity' declared_infix dc_name wrk_key rri tyvars ex_tyvars arg_tys tycon = data_con where data_con = mkDataCon dc_name declared_infix prom_...
1,040
pcDataConWithFixity' declared_infix dc_name wrk_key rri tyvars ex_tyvars arg_tys tycon = data_con where data_con = mkDataCon dc_name declared_infix prom_info (map (const no_bang) arg_tys) [] -- No labelled fields (mkTyVarBinders Specified tyvars) ...
881
true
true
3
14
399
235
109
126
null
null
TomMD/ghc
compiler/types/TyCon.hs
bsd-3-clause
algTyConRhs other = pprPanic "algTyConRhs" (ppr other)
54
algTyConRhs other = pprPanic "algTyConRhs" (ppr other)
54
algTyConRhs other = pprPanic "algTyConRhs" (ppr other)
54
false
false
1
7
6
23
9
14
null
null
silkapp/xmlhtml
test/suite/Text/XmlHtml/Tests.hs
bsd-3-clause
renderByteOrderMark :: Bool renderByteOrderMark = toByteString (render (XmlDocument UTF16BE Nothing [])) == T.encodeUtf16BE "\xFEFF<?xml version=\"1.0\" encoding=\"UTF-16\"?>\n"
185
renderByteOrderMark :: Bool renderByteOrderMark = toByteString (render (XmlDocument UTF16BE Nothing [])) == T.encodeUtf16BE "\xFEFF<?xml version=\"1.0\" encoding=\"UTF-16\"?>\n"
185
renderByteOrderMark = toByteString (render (XmlDocument UTF16BE Nothing [])) == T.encodeUtf16BE "\xFEFF<?xml version=\"1.0\" encoding=\"UTF-16\"?>\n"
157
false
true
1
9
23
53
23
30
null
null
oldmanmike/ghc
compiler/hsSyn/HsBinds.hs
bsd-3-clause
hsSigDoc (IdSig {}) = text "id signature"
53
hsSigDoc (IdSig {}) = text "id signature"
53
hsSigDoc (IdSig {}) = text "id signature"
53
false
false
0
6
18
20
9
11
null
null
sgillespie/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
pprCLbl (RtsLabel (RtsPrimOp primop)) = text "stg_" <> ppr primop
67
pprCLbl (RtsLabel (RtsPrimOp primop)) = text "stg_" <> ppr primop
67
pprCLbl (RtsLabel (RtsPrimOp primop)) = text "stg_" <> ppr primop
67
false
false
2
8
11
34
14
20
null
null
k0001/reflex
bench/Main.hs
bsd-3-clause
main :: IO () main = defaultMain [ bgroup "micro" micros ]
60
main :: IO () main = defaultMain [ bgroup "micro" micros ]
60
main = defaultMain [ bgroup "micro" micros ]
46
false
true
0
7
13
33
14
19
null
null
lechimp-p/Typogenetics
Testing.hs
mit
ppC = putStrLn . showContext
28
ppC = putStrLn . showContext
28
ppC = putStrLn . showContext
28
false
false
0
5
4
10
5
5
null
null
paulp/unison
parser-typechecker/src/Unison/Builtin.hs
mit
-- todo: to update these, just inline definition of Parsers.{unsafeParseType, unsafeParseTerm} -- then merge Parsers2 back into Parsers (and GC and unused functions) -- parse a type, hard-coding the builtins defined in this file t :: Var v => String -> Type v t s = bindTypeBuiltins . either error id $ Parser.run (Par...
379
t :: Var v => String -> Type v t s = bindTypeBuiltins . either error id $ Parser.run (Parser.root TypeParser.valueType) s TypeParser.s0 Parser.penv0
150
t s = bindTypeBuiltins . either error id $ Parser.run (Parser.root TypeParser.valueType) s TypeParser.s0 Parser.penv0
119
true
true
0
8
59
74
35
39
null
null
Bodigrim/arithmoi
test-suite/Math/NumberTheory/Moduli/SingletonTests.hs
mit
someSFactorsProperty1 :: (Ord a, Num a) => [(Prime a, Word)] -> Bool someSFactorsProperty1 xs = case someSFactors xs of Some sm -> unSFactors sm == M.assocs (M.fromListWith (+) xs)
188
someSFactorsProperty1 :: (Ord a, Num a) => [(Prime a, Word)] -> Bool someSFactorsProperty1 xs = case someSFactors xs of Some sm -> unSFactors sm == M.assocs (M.fromListWith (+) xs)
188
someSFactorsProperty1 xs = case someSFactors xs of Some sm -> unSFactors sm == M.assocs (M.fromListWith (+) xs)
113
false
true
0
12
36
90
44
46
null
null
rkaippully/haskell-ants
src/Ants/Ants.hs
apache-2.0
-- Given a list of weights, returns the value picked by a random spin of a -- roulette wheel with compartments proportional to the weights wrand :: [Int] -> StateSTM Int wrand weights = do gen <- get let (r, newGen) = randomR (0, sum weights - 1) gen put newGen return $ findCompartmentOf r 0 0 where findC...
710
wrand :: [Int] -> StateSTM Int wrand weights = do gen <- get let (r, newGen) = randomR (0, sum weights - 1) gen put newGen return $ findCompartmentOf r 0 0 where findCompartmentOf r i total = if r < ((weights!!i) + total) then i else findCompartmentOf r (i + 1) (total + weights!!i) -- M...
571
wrand weights = do gen <- get let (r, newGen) = randomR (0, sum weights - 1) gen put newGen return $ findCompartmentOf r 0 0 where findCompartmentOf r i total = if r < ((weights!!i) + total) then i else findCompartmentOf r (i + 1) (total + weights!!i) -- Make a move forward, turn NW, or...
540
true
true
0
13
163
161
82
79
null
null
cje/hilbert
test/THilbert.hs
bsd-3-clause
test_ShiftLASmall :: Assertion test_ShiftLASmall = (np 6 4) @=? shiftLA (np 3 3) (1::Int)
92
test_ShiftLASmall :: Assertion test_ShiftLASmall = (np 6 4) @=? shiftLA (np 3 3) (1::Int)
91
test_ShiftLASmall = (np 6 4) @=? shiftLA (np 3 3) (1::Int)
60
false
true
0
8
16
48
23
25
null
null
martinra/smallcheck
src/Test/SmallCheck/Series.hs
bsd-3-clause
alts3 :: (CoSerial m a, CoSerial m b, CoSerial m c) => Series m d -> Series m (a -> b -> c -> Maybe d) alts3 rs = do rs <- fixDepth rs decDepthChecked (pure $ \_ _ _ -> Nothing) $ (\f x y z -> f x >>= ($ y) >>= ($ z)) <$> (coseriesP . coseriesP . coseriesP $ rs)
297
alts3 :: (CoSerial m a, CoSerial m b, CoSerial m c) => Series m d -> Series m (a -> b -> c -> Maybe d) alts3 rs = do rs <- fixDepth rs decDepthChecked (pure $ \_ _ _ -> Nothing) $ (\f x y z -> f x >>= ($ y) >>= ($ z)) <$> (coseriesP . coseriesP . coseriesP $ rs)
297
alts3 rs = do rs <- fixDepth rs decDepthChecked (pure $ \_ _ _ -> Nothing) $ (\f x y z -> f x >>= ($ y) >>= ($ z)) <$> (coseriesP . coseriesP . coseriesP $ rs)
181
false
true
0
13
98
161
82
79
null
null
zachsully/hakaru
haskell/Language/Hakaru/Pretty/Haskell.hs
bsd-3-clause
ppApply2 :: (ABT Term abt) => Int -> String -> abt '[] a -> abt '[] b -> Docs ppApply2 p f e1 e2 = ppFun p f [ppArg e1, ppArg e2]
133
ppApply2 :: (ABT Term abt) => Int -> String -> abt '[] a -> abt '[] b -> Docs ppApply2 p f e1 e2 = ppFun p f [ppArg e1, ppArg e2]
133
ppApply2 p f e1 e2 = ppFun p f [ppArg e1, ppArg e2]
51
false
true
0
12
35
84
41
43
null
null
pasberth/binal1
Language/Binal/Generator/Simple.hs
mit
generateString :: TypedAST -> String generateString = BS.toString . Aeson.encode . Aeson.toJSON . flatJSAST . humanReadable . flatJSAST . generateProgram
153
generateString :: TypedAST -> String generateString = BS.toString . Aeson.encode . Aeson.toJSON . flatJSAST . humanReadable . flatJSAST . generateProgram
153
generateString = BS.toString . Aeson.encode . Aeson.toJSON . flatJSAST . humanReadable . flatJSAST . generateProgram
116
false
true
0
11
19
45
23
22
null
null
rueshyna/gogol
gogol-admin-directory/gen/Network/Google/Directory/Types/Product.hs
mpl-2.0
useEmails :: Lens' User (Maybe JSONValue) useEmails = lens _useEmails (\ s a -> s{_useEmails = a})
100
useEmails :: Lens' User (Maybe JSONValue) useEmails = lens _useEmails (\ s a -> s{_useEmails = a})
100
useEmails = lens _useEmails (\ s a -> s{_useEmails = a})
58
false
true
0
9
18
47
24
23
null
null
li-zhirui/EoplLangs
src/CallByReference/Parser.hs
bsd-3-clause
semiColon = symbol ";"
22
semiColon = symbol ";"
22
semiColon = symbol ";"
22
false
false
0
5
3
9
4
5
null
null
osa1/sequent-core
src/Language/SequentCore/Arity.hs
bsd-3-clause
etaInfoAbs :: [EtaInfo] -> SeqCoreTerm -> SeqCoreTerm etaInfoAbs [] expr = expr
93
etaInfoAbs :: [EtaInfo] -> SeqCoreTerm -> SeqCoreTerm etaInfoAbs [] expr = expr
93
etaInfoAbs [] expr = expr
39
false
true
0
6
25
29
15
14
null
null
ruud-v-a/blog
src/Post.hs
gpl-3.0
selectRelated :: [Post] -> [(Post, RelatedContent)] selectRelated posts = fmap nextElsePrev prevPostNext where -- Create chronological triples of (previous post, post, next post). chronological = sortWith date posts prevPosts = Nothing : (fmap Just chronological) nextPosts = (drop 1 $ ...
866
selectRelated :: [Post] -> [(Post, RelatedContent)] selectRelated posts = fmap nextElsePrev prevPostNext where -- Create chronological triples of (previous post, post, next post). chronological = sortWith date posts prevPosts = Nothing : (fmap Just chronological) nextPosts = (drop 1 $ ...
866
selectRelated posts = fmap nextElsePrev prevPostNext where -- Create chronological triples of (previous post, post, next post). chronological = sortWith date posts prevPosts = Nothing : (fmap Just chronological) nextPosts = (drop 1 $ fmap Just chronological) ++ [Nothing] prevPo...
814
false
true
4
11
239
187
98
89
null
null
sboosali/commands-spiros
config/Commands/Plugins/Spiros/Emacs/Run.hs
gpl-2.0
runEmacsWithP :: MonadWorkflow m => String -> [Phrase] -> m () runEmacsWithP f ps = do xs <- traverse munge ps runEmacsWith f xs
130
runEmacsWithP :: MonadWorkflow m => String -> [Phrase] -> m () runEmacsWithP f ps = do xs <- traverse munge ps runEmacsWith f xs
130
runEmacsWithP f ps = do xs <- traverse munge ps runEmacsWith f xs
67
false
true
0
10
25
64
28
36
null
null
dimitri-xyz/public-bitcoin-type
Test/Test.hs
lgpl-2.1
tests = TestList [ TestLabel "Negative wraparound" negativeWraparoundTest , TestLabel "64-bit Integer Overflow" integerOverflowTest , TestLabel "Round to nearest Satoshi" roundSmallValuesTest , TestLabel "Show values in whole BTC" showBitcoinTest , TestLabel "Multiplica...
488
tests = TestList [ TestLabel "Negative wraparound" negativeWraparoundTest , TestLabel "64-bit Integer Overflow" integerOverflowTest , TestLabel "Round to nearest Satoshi" roundSmallValuesTest , TestLabel "Show values in whole BTC" showBitcoinTest , TestLabel "Multiplica...
488
tests = TestList [ TestLabel "Negative wraparound" negativeWraparoundTest , TestLabel "64-bit Integer Overflow" integerOverflowTest , TestLabel "Round to nearest Satoshi" roundSmallValuesTest , TestLabel "Show values in whole BTC" showBitcoinTest , TestLabel "Multiplica...
488
false
false
1
6
141
68
32
36
null
null
dirkz/Thinking_Functionally_With_Haskell
5/Matrix.hs
isc
transpose' :: Matrix a -> Matrix a transpose' [] = [[]]
55
transpose' :: Matrix a -> Matrix a transpose' [] = [[]]
55
transpose' [] = [[]]
20
false
true
0
6
10
35
16
19
null
null
kazu-yamamoto/network-uri
tests/uri001.hs
bsd-3-clause
testRelative01 = testRelative "testRelative01" "foo:xyz" "bar:abc" "bar:abc"
96
testRelative01 = testRelative "testRelative01" "foo:xyz" "bar:abc" "bar:abc"
96
testRelative01 = testRelative "testRelative01" "foo:xyz" "bar:abc" "bar:abc"
96
false
false
0
5
26
15
7
8
null
null
dylanmann/CurriersOfCatan
src/ParserCombinators.hs
gpl-3.0
parseFromFile :: Parser a -> String -> IO (Either ParseError a) parseFromFile parser filename = do handle <- openFile filename ReadMode str <- hGetContents handle pure $ parse parser str -- | Return the next character if it satisfies the given predicate
260
parseFromFile :: Parser a -> String -> IO (Either ParseError a) parseFromFile parser filename = do handle <- openFile filename ReadMode str <- hGetContents handle pure $ parse parser str -- | Return the next character if it satisfies the given predicate
260
parseFromFile parser filename = do handle <- openFile filename ReadMode str <- hGetContents handle pure $ parse parser str -- | Return the next character if it satisfies the given predicate
196
false
true
0
9
48
73
33
40
null
null
fibsifan/pandoc
src/Text/Pandoc/Readers/HTML.hs
gpl-2.0
-- | Matches a tag meeting a certain condition. htmlTag :: Monad m => (Tag String -> Bool) -> ParserT [Char] st m (Tag String, String) htmlTag f = try $ do lookAhead (char '<') inp <- getInput let (next : rest) = canonicalizeTags $ parseTagsOptions parseOptions{ optTagWarnin...
1,028
htmlTag :: Monad m => (Tag String -> Bool) -> ParserT [Char] st m (Tag String, String) htmlTag f = try $ do lookAhead (char '<') inp <- getInput let (next : rest) = canonicalizeTags $ parseTagsOptions parseOptions{ optTagWarning = True } inp guard $ f next case next of ...
980
htmlTag f = try $ do lookAhead (char '<') inp <- getInput let (next : rest) = canonicalizeTags $ parseTagsOptions parseOptions{ optTagWarning = True } inp guard $ f next case next of TagWarning _ -> fail "encountered TagWarning" TagComment s | "<!--" `isPrefixOf` ...
877
true
true
2
17
341
300
140
160
null
null
meiersi-11ce/stack
src/Stack/Constants.hs
bsd-3-clause
-- | Where .mix files go. dotHpc :: Path Rel Dir dotHpc = $(mkRelDir ".hpc")
76
dotHpc :: Path Rel Dir dotHpc = $(mkRelDir ".hpc")
50
dotHpc = $(mkRelDir ".hpc")
27
true
true
0
7
14
24
12
12
null
null
dagit/7drl2017
src/Render.hs
bsd-3-clause
worldImages :: Game [Image] worldImages = do thePlayer <- _gsPlayer <$> getGS let playerImage = translate (thePlayer ^. pCoord._1) (thePlayer ^. pCoord._2) (symbolToImage playerSymbol) -- Update the cached level image, or use it if it's already -- defi...
626
worldImages :: Game [Image] worldImages = do thePlayer <- _gsPlayer <$> getGS let playerImage = translate (thePlayer ^. pCoord._1) (thePlayer ^. pCoord._2) (symbolToImage playerSymbol) -- Update the cached level image, or use it if it's already -- defi...
626
worldImages = do thePlayer <- _gsPlayer <$> getGS let playerImage = translate (thePlayer ^. pCoord._1) (thePlayer ^. pCoord._2) (symbolToImage playerSymbol) -- Update the cached level image, or use it if it's already -- defined. mb_lvlImage <- _rsIma...
598
false
true
0
18
187
180
87
93
null
null
abakst/liquidhaskell
benchmarks/hmatrix-0.15.0.1/examples/inplace.hs
bsd-3-clause
histoCheck ds = runSTVector $ do h <- newVector (0::Double) 15 -- > constant for this test let inc k = modifyVector h k (+1) mapM_ inc ds return h
162
histoCheck ds = runSTVector $ do h <- newVector (0::Double) 15 -- > constant for this test let inc k = modifyVector h k (+1) mapM_ inc ds return h
162
histoCheck ds = runSTVector $ do h <- newVector (0::Double) 15 -- > constant for this test let inc k = modifyVector h k (+1) mapM_ inc ds return h
162
false
false
0
12
45
69
32
37
null
null
brendanhay/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Grouplicenses/List.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). glUploadType :: Lens' GrouplicensesList (Maybe Text) glUploadType = lens _glUploadType (\ s a -> s{_glUploadType = a})
191
glUploadType :: Lens' GrouplicensesList (Maybe Text) glUploadType = lens _glUploadType (\ s a -> s{_glUploadType = a})
120
glUploadType = lens _glUploadType (\ s a -> s{_glUploadType = a})
67
true
true
1
9
28
52
25
27
null
null
spechub/Hets
CASL/ToDoc.hs
gpl-2.0
printRecord :: FormExtension f => Record f Doc Doc printRecord = Record { foldQuantification = \ _ q l r _ -> fsep $ printQuant q : printVarDeclL l ++ [addBullet r] , foldJunction = \ o j l _ -> let (n, p) = case j of Con -> (trueS, andDoc) ...
3,867
printRecord :: FormExtension f => Record f Doc Doc printRecord = Record { foldQuantification = \ _ q l r _ -> fsep $ printQuant q : printVarDeclL l ++ [addBullet r] , foldJunction = \ o j l _ -> let (n, p) = case j of Con -> (trueS, andDoc) ...
3,867
printRecord = Record { foldQuantification = \ _ q l r _ -> fsep $ printQuant q : printVarDeclL l ++ [addBullet r] , foldJunction = \ o j l _ -> let (n, p) = case j of Con -> (trueS, andDoc) Dis -> (falseS, orDoc) in ca...
3,816
false
true
0
19
1,393
1,466
758
708
null
null
sgillespie/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
untag_Expr tycon ((untag_this, put_tag_here) : more) expr = nlHsCase (nlHsPar (nlHsVarApps (con2tag_RDR tycon) [untag_this])) {-of-} [mkHsCaseAlt (nlVarPat put_tag_here) (untag_Expr tycon more expr)]
207
untag_Expr tycon ((untag_this, put_tag_here) : more) expr = nlHsCase (nlHsPar (nlHsVarApps (con2tag_RDR tycon) [untag_this])) {-of-} [mkHsCaseAlt (nlVarPat put_tag_here) (untag_Expr tycon more expr)]
207
untag_Expr tycon ((untag_this, put_tag_here) : more) expr = nlHsCase (nlHsPar (nlHsVarApps (con2tag_RDR tycon) [untag_this])) {-of-} [mkHsCaseAlt (nlVarPat put_tag_here) (untag_Expr tycon more expr)]
207
false
false
0
10
29
81
41
40
null
null
urbanslug/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
enumFromThenToName = varQual gHC_ENUM (fsLit "enumFromThenTo") enumFromThenToClassOpKey
87
enumFromThenToName = varQual gHC_ENUM (fsLit "enumFromThenTo") enumFromThenToClassOpKey
87
enumFromThenToName = varQual gHC_ENUM (fsLit "enumFromThenTo") enumFromThenToClassOpKey
87
false
false
0
7
6
19
9
10
null
null
AlexanderPankiv/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
word8TyCon :: TyCon word8TyCon = pcNonRecDataTyCon word8TyConName (Just (CType "" Nothing ("HsWord8", fsLit "HsWord8"))) [] [word8DataCon]
182
word8TyCon :: TyCon word8TyCon = pcNonRecDataTyCon word8TyConName (Just (CType "" Nothing ("HsWord8", fsLit "HsWord8"))) [] [word8DataCon]
182
word8TyCon = pcNonRecDataTyCon word8TyConName (Just (CType "" Nothing ("HsWord8", fsLit "HsWord8"))) [] [word8DataCon]
162
false
true
0
11
59
59
27
32
null
null
olsner/ghc
compiler/cmm/CmmUtils.hs
bsd-3-clause
primRepForeignHint (VecRep {}) = NoHint
40
primRepForeignHint (VecRep {}) = NoHint
40
primRepForeignHint (VecRep {}) = NoHint
40
false
false
0
7
5
16
8
8
null
null
seL4/capDL-tool
CapDL/State.hs
bsd-2-clause
capTyp (TCBCap {}) = TCB_T
26
capTyp (TCBCap {}) = TCB_T
26
capTyp (TCBCap {}) = TCB_T
26
false
false
0
7
4
16
8
8
null
null
NickAger/LearningHaskell
HaskellProgrammingFromFirstPrinciples/Chapter8.hsproj/Chapter8.hs
mit
digitToWord :: Int -> String digitToWord 0 = "zero"
51
digitToWord :: Int -> String digitToWord 0 = "zero"
51
digitToWord 0 = "zero"
22
false
true
0
7
8
24
10
14
null
null
jcristovao/persistent
persistent/Database/Persist/Quasi.hs
mit
splitExtras (Line _ ts:rest) = let (x, y) = splitExtras rest in (ts:x, y)
82
splitExtras (Line _ ts:rest) = let (x, y) = splitExtras rest in (ts:x, y)
82
splitExtras (Line _ ts:rest) = let (x, y) = splitExtras rest in (ts:x, y)
82
false
false
0
9
22
52
26
26
null
null
nomicflux/threals
src/Threal/Show.hs
gpl-2.0
showThreal (Threal [(Threal [] [] [])] [] []) = " r "
53
showThreal (Threal [(Threal [] [] [])] [] []) = " r "
53
showThreal (Threal [(Threal [] [] [])] [] []) = " r "
53
false
false
0
11
11
42
21
21
null
null
jstepien/qudb
Database/QUDB/Structure.hs
lgpl-3.0
---- |Inserts a new row to a given table. It should check all types and constraints. insertRow :: DB -> String -> [Value] -> DBMonad DB insertRow db name values = modifyTable db name addRow where addRow :: Table -> DBMonad Table addRow (Table _ columns rows) = do new <- newRow ...
1,075
insertRow :: DB -> String -> [Value] -> DBMonad DB insertRow db name values = modifyTable db name addRow where addRow :: Table -> DBMonad Table addRow (Table _ columns rows) = do new <- newRow return $ Table name columns (rows ++ [new]) where newR...
990
insertRow db name values = modifyTable db name addRow where addRow :: Table -> DBMonad Table addRow (Table _ columns rows) = do new <- newRow return $ Table name columns (rows ++ [new]) where newRow = fmap (Row) $ buildNewRow (types columns) value...
939
true
true
0
14
404
307
154
153
null
null
alexander-at-github/eta
compiler/ETA/Utils/Encoding.hs
bsd-3-clause
utf8DecodeChar :: Ptr Word8 -> (Char, Int) utf8DecodeChar (Ptr a#) = case utf8DecodeChar# a# of (# c#, nBytes# #) -> ( C# c#, I# nBytes# ) -- UTF-8 is cleverly designed so that we can always figure out where -- the start of the current character is, given any position in a -- stream. This function finds the start o...
390
utf8DecodeChar :: Ptr Word8 -> (Char, Int) utf8DecodeChar (Ptr a#) = case utf8DecodeChar# a# of (# c#, nBytes# #) -> ( C# c#, I# nBytes# ) -- UTF-8 is cleverly designed so that we can always figure out where -- the start of the current character is, given any position in a -- stream. This function finds the start o...
390
utf8DecodeChar (Ptr a#) = case utf8DecodeChar# a# of (# c#, nBytes# #) -> ( C# c#, I# nBytes# ) -- UTF-8 is cleverly designed so that we can always figure out where -- the start of the current character is, given any position in a -- stream. This function finds the start of the previous character, -- assuming there...
347
false
true
0
9
73
67
36
31
null
null
ganeti/ganeti
src/Ganeti/BasicTypes.hs
bsd-2-clause
-- | Lift a 'Result' value to any 'MonadError'. Since 'ResultT' is itself its -- instance, it's a generalization of -- @Monad m => GenericResult a b -> ResultT a m b@. toError :: (MonadError e m) => GenericResult e a -> m a toError = genericResult throwError return
265
toError :: (MonadError e m) => GenericResult e a -> m a toError = genericResult throwError return
97
toError = genericResult throwError return
41
true
true
0
8
48
48
23
25
null
null
rvion/ride
jetpack/src/Data/List/NonEmpty/AsNe.hs
bsd-3-clause
-- ne_take :: forall a. Int -> NonEmpty a -> [a] ne_take = I.take
65
ne_take = I.take
16
ne_take = I.take
16
true
false
1
6
13
13
5
8
null
null
jtobin/deprecated-observable
test/TestSuite.hs
bsd-3-clause
prettyPrint :: Handle -> Vector Double -> IO () prettyPrint h = hPutStrLn h . filter (`notElem` "fromList []") . show
117
prettyPrint :: Handle -> Vector Double -> IO () prettyPrint h = hPutStrLn h . filter (`notElem` "fromList []") . show
117
prettyPrint h = hPutStrLn h . filter (`notElem` "fromList []") . show
69
false
true
1
9
20
56
26
30
null
null
wuzzeb/hs-webdriver
src/Test/WebDriver/Commands.hs
bsd-3-clause
serverStatus :: (WebDriver wd) => wd Value -- todo: make this a record type serverStatus = doCommand methodGet "/status" Null
127
serverStatus :: (WebDriver wd) => wd Value serverStatus = doCommand methodGet "/status" Null
92
serverStatus = doCommand methodGet "/status" Null
49
true
true
0
6
21
31
16
15
null
null
kyk0704/haskell-test
src/Function.hs
bsd-3-clause
describeList2 :: [a] -> String describeList2 xs = "The list is " ++ func xs where func [] = "empty" func [x] = "a singleton list" func _ = "a longer list"
178
describeList2 :: [a] -> String describeList2 xs = "The list is " ++ func xs where func [] = "empty" func [x] = "a singleton list" func _ = "a longer list"
178
describeList2 xs = "The list is " ++ func xs where func [] = "empty" func [x] = "a singleton list" func _ = "a longer list"
147
false
true
1
7
55
71
31
40
null
null
geophf/1HaskellADay
exercises/HAD/Y2021/M03/D29/Solution.hs
mit
counter :: [([Fruit], Int)] -> String counter [(f, l)] = counts f l
67
counter :: [([Fruit], Int)] -> String counter [(f, l)] = counts f l
67
counter [(f, l)] = counts f l
29
false
true
0
8
12
44
25
19
null
null
Lykos/Sara
src/lib/Sara/Codegen/CodeGenerator.hs
gpl-3.0
codegenExpression :: MonadState CodegenState m => PureCheckerExpression -> m Operand codegenExpression exp = let t' = typ $ expressionTyp exp in case exp of S.Unit{} -> unit (S.Boolean b _ _) -> boolean b (S.Integer n _ _) -> integer n (S.D...
2,743
codegenExpression :: MonadState CodegenState m => PureCheckerExpression -> m Operand codegenExpression exp = let t' = typ $ expressionTyp exp in case exp of S.Unit{} -> unit (S.Boolean b _ _) -> boolean b (S.Integer n _ _) -> integer n (S.D...
2,743
codegenExpression exp = let t' = typ $ expressionTyp exp in case exp of S.Unit{} -> unit (S.Boolean b _ _) -> boolean b (S.Integer n _ _) -> integer n (S.Double d _ _) -> double d (S.UnaryOperation op exp _ _) ...
2,658
false
true
28
29
886
823
394
429
null
null
SKA-ScienceDataProcessor/RC
MS3/lib/DNA/Interpreter/Types.hs
apache-2.0
runDnaMonad :: AID -> Rank -> GroupSize -> Closure DnaInterpreter -> [NodeInfo] -> [DebugFlag] -> LoggerOpt -> FilePath -> DnaMonad a -> Process a runDnaMonad aid (Rank rnk) (GroupSize grp) interp nodes flags logopt workDir = flip runReaderT env . flip evalStateT s0 . unDnaMo...
1,198
runDnaMonad :: AID -> Rank -> GroupSize -> Closure DnaInterpreter -> [NodeInfo] -> [DebugFlag] -> LoggerOpt -> FilePath -> DnaMonad a -> Process a runDnaMonad aid (Rank rnk) (GroupSize grp) interp nodes flags logopt workDir = flip runReaderT env . flip evalStateT s0 . unDnaMo...
1,198
runDnaMonad aid (Rank rnk) (GroupSize grp) interp nodes flags logopt workDir = flip runReaderT env . flip evalStateT s0 . unDnaMonad where env = Env { envRank = rnk , envGroupSize = grp , envInterpreter = interp , envAID = aid , envWorkD...
1,011
false
true
0
17
501
264
148
116
null
null
kelnage/tamarin-prover
src/Web/Types.hs
gpl-3.0
imageFormatMIME SVG = "image/svg+xml"
37
imageFormatMIME SVG = "image/svg+xml"
37
imageFormatMIME SVG = "image/svg+xml"
37
false
false
0
5
3
9
4
5
null
null