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
codemac/yi-editor
src/Yi/Snippets.hs
gpl-2.0
bufferMarkers (SimpleMarkInfo _ s) = [s]
40
bufferMarkers (SimpleMarkInfo _ s) = [s]
40
bufferMarkers (SimpleMarkInfo _ s) = [s]
40
false
false
0
7
5
20
10
10
null
null
scharris/hmq
ForeignKeyLink.hs
bsd-3-clause
rightTableMetadata :: ForeignKeyLink a b -> TableMetadata rightTableMetadata (ManyToOne fk) = targetTableMetadata fk
116
rightTableMetadata :: ForeignKeyLink a b -> TableMetadata rightTableMetadata (ManyToOne fk) = targetTableMetadata fk
116
rightTableMetadata (ManyToOne fk) = targetTableMetadata fk
58
false
true
0
6
12
36
16
20
null
null
kyagrd/micronax
src/Infer.hs
bsd-2-clause
tiAlts n kctx ctx (Alt (Just phi) as) = -- TODO coverage of all ctors do tys <- mapM (tiAlt kctx ctx (Just phi)) as u <- getSubstTy let (tcon : args) = tApp2list $ case (head tys) of TArr t _ -> uapply u t (is, rngty) <- unbind phi when (n + length is < length args) $ throwErr...
624
tiAlts n kctx ctx (Alt (Just phi) as) = -- TODO coverage of all ctors do tys <- mapM (tiAlt kctx ctx (Just phi)) as u <- getSubstTy let (tcon : args) = tApp2list $ case (head tys) of TArr t _ -> uapply u t (is, rngty) <- unbind phi when (n + length is < length args) $ throwErr...
624
tiAlts n kctx ctx (Alt (Just phi) as) = -- TODO coverage of all ctors do tys <- mapM (tiAlt kctx ctx (Just phi)) as u <- getSubstTy let (tcon : args) = tApp2list $ case (head tys) of TArr t _ -> uapply u t (is, rngty) <- unbind phi when (n + length is < length args) $ throwErr...
624
false
false
0
14
179
282
130
152
null
null
Chatanga/kage
src/Graphics/Color.hs
mit
seaGreen = mkColor 46 139 87
28
seaGreen = mkColor 46 139 87
28
seaGreen = mkColor 46 139 87
28
false
false
0
5
5
13
6
7
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
action_240 (153#) = happyShift action_47
40
action_240 (153#) = happyShift action_47
40
action_240 (153#) = happyShift action_47
40
false
false
0
6
4
15
7
8
null
null
iquiw/hsbin
src/Hsbin/Command.hs
mit
actList :: Action actList _ hcfg args = do let scrs = hcScripts hcfg fmt = if args == ["-l"] then long else short msg $ unlines $ "Available scripts:" : map fmt scrs where short = (" " ++) . hsName long scr = " " ++ align 12 (hsName scr) ++ hsPath scr
283
actList :: Action actList _ hcfg args = do let scrs = hcScripts hcfg fmt = if args == ["-l"] then long else short msg $ unlines $ "Available scripts:" : map fmt scrs where short = (" " ++) . hsName long scr = " " ++ align 12 (hsName scr) ++ hsPath scr
283
actList _ hcfg args = do let scrs = hcScripts hcfg fmt = if args == ["-l"] then long else short msg $ unlines $ "Available scripts:" : map fmt scrs where short = (" " ++) . hsName long scr = " " ++ align 12 (hsName scr) ++ hsPath scr
265
false
true
4
12
86
128
59
69
null
null
sopvop/cabal
Cabal/Distribution/Simple/Setup.hs
bsd-3-clause
emptySDistFlags :: SDistFlags emptySDistFlags = mempty
54
emptySDistFlags :: SDistFlags emptySDistFlags = mempty
54
emptySDistFlags = mempty
24
false
true
0
4
5
11
6
5
null
null
tjakway/ghcjvm
compiler/basicTypes/RdrName.hs
bsd-3-clause
greSrcSpan :: GlobalRdrElt -> SrcSpan greSrcSpan gre@(GRE { gre_name = name, gre_lcl = lcl, gre_imp = iss } ) | lcl = nameSrcSpan name | (is:_) <- iss = is_dloc (is_decl is) | otherwise = pprPanic "greSrcSpan" (ppr gre)
239
greSrcSpan :: GlobalRdrElt -> SrcSpan greSrcSpan gre@(GRE { gre_name = name, gre_lcl = lcl, gre_imp = iss } ) | lcl = nameSrcSpan name | (is:_) <- iss = is_dloc (is_decl is) | otherwise = pprPanic "greSrcSpan" (ppr gre)
239
greSrcSpan gre@(GRE { gre_name = name, gre_lcl = lcl, gre_imp = iss } ) | lcl = nameSrcSpan name | (is:_) <- iss = is_dloc (is_decl is) | otherwise = pprPanic "greSrcSpan" (ppr gre)
201
false
true
1
10
58
103
53
50
null
null
GintMist/double-pendulum
src/derivative.hs
bsd-3-clause
evaluate (Sin a) t = sin <$> evaluate a t
41
evaluate (Sin a) t = sin <$> evaluate a t
41
evaluate (Sin a) t = sin <$> evaluate a t
41
false
false
1
8
9
29
12
17
null
null
z0isch/aoc2016
src/Day13.hs
bsd-3-clause
integralDist :: Coord -> Coord -> Integer integralDist (x,y) (x',y') = floor $ sqrt (fromIntegral $ (x'-x)^2 + (y' - y)^2)
122
integralDist :: Coord -> Coord -> Integer integralDist (x,y) (x',y') = floor $ sqrt (fromIntegral $ (x'-x)^2 + (y' - y)^2)
122
integralDist (x,y) (x',y') = floor $ sqrt (fromIntegral $ (x'-x)^2 + (y' - y)^2)
80
false
true
0
13
20
76
41
35
null
null
shawa/delorean
src/Lint.hs
bsd-3-clause
getVars (Div e1 e2) = getVars e1 ++ getVars e2
46
getVars (Div e1 e2) = getVars e1 ++ getVars e2
46
getVars (Div e1 e2) = getVars e1 ++ getVars e2
46
false
false
0
7
9
27
12
15
null
null
sapek/pandoc
src/Text/Pandoc/Writers/Textile.hs
gpl-2.0
inlineToTextile _ (Str str) = return $ escapeStringForTextile str
65
inlineToTextile _ (Str str) = return $ escapeStringForTextile str
65
inlineToTextile _ (Str str) = return $ escapeStringForTextile str
65
false
false
1
6
8
26
11
15
null
null
karamellpelle/grid
designer/source/OpenGL/GLFW/Ext.hs
gpl-3.0
{- /*------------------------------------------------------------------------* * APPLE extension tokens *------------------------------------------------------------------------*/ #if GL_APPLE_framebuffer_multisample #define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB #define GL_FRAMEBUFFER_INCOMP...
5,942
gl_DEPTH_STENCIL_OES :: GLenum gl_DEPTH_STENCIL_OES = 0x84F9
60
gl_DEPTH_STENCIL_OES = 0x84F9
29
true
true
0
6
2,228
20
9
11
null
null
sru-systems/protobuf-simple
src/Data/ProtoBuf/WireFormat.hs
mit
-- | Decode an optional sint64 field. getSInt64Opt :: Get (Maybe Int64) getSInt64Opt = getOpt getSInt64
103
getSInt64Opt :: Get (Maybe Int64) getSInt64Opt = getOpt getSInt64
65
getSInt64Opt = getOpt getSInt64
31
true
true
0
7
15
24
12
12
null
null
vikraman/ghc
compiler/rename/RnBinds.hs
bsd-3-clause
renameSig ctxt sig@(InlineSig v s) = do { new_v <- lookupSigOccRn ctxt sig v ; return (InlineSig new_v s, emptyFVs) }
128
renameSig ctxt sig@(InlineSig v s) = do { new_v <- lookupSigOccRn ctxt sig v ; return (InlineSig new_v s, emptyFVs) }
128
renameSig ctxt sig@(InlineSig v s) = do { new_v <- lookupSigOccRn ctxt sig v ; return (InlineSig new_v s, emptyFVs) }
128
false
false
0
9
31
56
28
28
null
null
sapek/highlighting-kate
Text/Highlighting/Kate/Common.hs
gpl-2.0
pHlCHex :: KateParser String pHlCHex = pRegExpr hexRegex
56
pHlCHex :: KateParser String pHlCHex = pRegExpr hexRegex
56
pHlCHex = pRegExpr hexRegex
27
false
true
1
5
7
20
8
12
null
null
brendanhay/gogol
gogol-dataproc/gen/Network/Google/Dataproc/Types/Product.hs
mpl-2.0
-- | Optional. Minimum scale-up threshold as a fraction of total cluster size -- before scaling occurs. For example, in a 20-worker cluster, a threshold -- of 0.1 means the autoscaler must recommend at least a 2-worker scale-up -- for the cluster to scale. A threshold of 0 means the autoscaler will -- scale up on any r...
595
byacScaleUpMinWorkerFraction :: Lens' BasicYarnAutoscalingConfig (Maybe Double) byacScaleUpMinWorkerFraction = lens _byacScaleUpMinWorkerFraction (\ s a -> s{_byacScaleUpMinWorkerFraction = a}) . mapping _Coerce
225
byacScaleUpMinWorkerFraction = lens _byacScaleUpMinWorkerFraction (\ s a -> s{_byacScaleUpMinWorkerFraction = a}) . mapping _Coerce
145
true
true
0
10
96
59
32
27
null
null
plumlife/cabal
cabal-install/Distribution/Client/Sandbox.hs
bsd-3-clause
dumpPackageEnvironment :: Verbosity -> SandboxFlags -> GlobalFlags -> IO () dumpPackageEnvironment verbosity _sandboxFlags globalFlags = do (sandboxDir, pkgEnv) <- tryLoadSandboxConfig verbosity globalFlags commentPkgEnv <- commentPackageEnvironment sandboxDir putStrLn . showPackageEnvironmentWithComments ...
405
dumpPackageEnvironment :: Verbosity -> SandboxFlags -> GlobalFlags -> IO () dumpPackageEnvironment verbosity _sandboxFlags globalFlags = do (sandboxDir, pkgEnv) <- tryLoadSandboxConfig verbosity globalFlags commentPkgEnv <- commentPackageEnvironment sandboxDir putStrLn . showPackageEnvironmentWithComments ...
405
dumpPackageEnvironment verbosity _sandboxFlags globalFlags = do (sandboxDir, pkgEnv) <- tryLoadSandboxConfig verbosity globalFlags commentPkgEnv <- commentPackageEnvironment sandboxDir putStrLn . showPackageEnvironmentWithComments (Just commentPkgEnv) $ pkgEnv -- | Entry point for the 'cabal sandbox init'...
329
false
true
0
11
56
89
41
48
null
null
tamarin-prover/tamarin-prover
lib/theory/src/Theory.hs
gpl-3.0
-- | All lemmas of a theory. diffTheoryLemmas :: DiffTheory sig c r r2 p p2 -> [(Side, Lemma p2)] diffTheoryLemmas = foldDiffTheoryItem (const []) (const []) (const []) return (const []) (const []) <=< L.get diffThyItems
223
diffTheoryLemmas :: DiffTheory sig c r r2 p p2 -> [(Side, Lemma p2)] diffTheoryLemmas = foldDiffTheoryItem (const []) (const []) (const []) return (const []) (const []) <=< L.get diffThyItems
194
diffTheoryLemmas = foldDiffTheoryItem (const []) (const []) (const []) return (const []) (const []) <=< L.get diffThyItems
125
true
true
0
9
39
103
52
51
null
null
spechub/Hets
Propositional/ProveWithTruthTable.hs
gpl-2.0
runTt :: PState.PropProverState {- ^ logical part containing the input Sign and axioms and possibly goals that have been proved earlier as additional axioms -} -> ATPState.GenericConfig ProofTree -- ^ configuration to use -> Bool -- ^ True means save DIMACS file -> String...
3,147
runTt :: PState.PropProverState {- ^ logical part containing the input Sign and axioms and possibly goals that have been proved earlier as additional axioms -} -> ATPState.GenericConfig ProofTree -- ^ configuration to use -> Bool -- ^ True means save DIMACS file -> String...
3,074
runTt pState cfg _ _thName nGoal = let sig = PState.initialSignature pState sigSize = Set.size $ items sig in if sigSize >= maxSigSize then do infoDialog "Signature too large" $ sigTooLarge sigSize return (ATPState.ATPTLimitExceeded, cfg { ATPState.proofStatus = defaultProofSt...
2,600
true
true
7
24
1,254
635
333
302
null
null
project-oak/silveroak
cava/Cava2HDL/Cava2SystemVerilog.hs
apache-2.0
mkInstance :: String -> [(String, ConstExpr)] -> [(String, Signal)] -> Int -> String mkInstance instName [] args instNr = " " ++ instName ++ " inst" ++ "_" ++ show instNr ++ " " ++ showPortArgs args ++ ";"
226
mkInstance :: String -> [(String, ConstExpr)] -> [(String, Signal)] -> Int -> String mkInstance instName [] args instNr = " " ++ instName ++ " inst" ++ "_" ++ show instNr ++ " " ++ showPortArgs args ++ ";"
226
mkInstance instName [] args instNr = " " ++ instName ++ " inst" ++ "_" ++ show instNr ++ " " ++ showPortArgs args ++ ";"
127
false
true
0
11
59
90
47
43
null
null
badp/ganeti
src/Ganeti/Monitoring/Server.hs
gpl-2.0
versionQ :: Snap () versionQ = writeBS . pack $ J.encode [latestAPIVersion]
75
versionQ :: Snap () versionQ = writeBS . pack $ J.encode [latestAPIVersion]
75
versionQ = writeBS . pack $ J.encode [latestAPIVersion]
55
false
true
0
7
11
32
16
16
null
null
gtk2hs/webkit
Graphics/UI/Gtk/WebKit/DOM/EventM.hs
lgpl-2.1
mouseOffsetXY :: MouseEventClass e => EventM t e (Int, Int) mouseOffsetXY = do e <- event x <- MouseEvent.getOffsetX e y <- MouseEvent.getOffsetY e return (x, y)
177
mouseOffsetXY :: MouseEventClass e => EventM t e (Int, Int) mouseOffsetXY = do e <- event x <- MouseEvent.getOffsetX e y <- MouseEvent.getOffsetY e return (x, y)
177
mouseOffsetXY = do e <- event x <- MouseEvent.getOffsetX e y <- MouseEvent.getOffsetY e return (x, y)
117
false
true
0
10
42
80
36
44
null
null
hazel-el/hazel
test/Hazel/TestCases.hs
gpl-3.0
gci2b' :: TBox gci2b' = gcisToTBox [ Subclass conjunction dummy , Subclass (And dummy name) name ] where dummy = toDummy gci2b
168
gci2b' :: TBox gci2b' = gcisToTBox [ Subclass conjunction dummy , Subclass (And dummy name) name ] where dummy = toDummy gci2b
168
gci2b' = gcisToTBox [ Subclass conjunction dummy , Subclass (And dummy name) name ] where dummy = toDummy gci2b
153
false
true
0
9
63
49
24
25
null
null
kim/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types.hs
mpl-2.0
-- | The time of the most recent status update. sisUpdateTime :: Lens' SpotInstanceStatus (Maybe UTCTime) sisUpdateTime = lens _sisUpdateTime (\s a -> s { _sisUpdateTime = a }) . mapping _Time
192
sisUpdateTime :: Lens' SpotInstanceStatus (Maybe UTCTime) sisUpdateTime = lens _sisUpdateTime (\s a -> s { _sisUpdateTime = a }) . mapping _Time
144
sisUpdateTime = lens _sisUpdateTime (\s a -> s { _sisUpdateTime = a }) . mapping _Time
86
true
true
2
9
31
61
28
33
null
null
bitemyapp/ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
pNodeGroupAllocPolicy :: Field pNodeGroupAllocPolicy = withDoc "Instance allocation policy" . optionalField $ simpleField "alloc_policy" [t| AllocPolicy |]
161
pNodeGroupAllocPolicy :: Field pNodeGroupAllocPolicy = withDoc "Instance allocation policy" . optionalField $ simpleField "alloc_policy" [t| AllocPolicy |]
161
pNodeGroupAllocPolicy = withDoc "Instance allocation policy" . optionalField $ simpleField "alloc_policy" [t| AllocPolicy |]
130
false
true
0
7
22
31
17
14
null
null
siddhanathan/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
metaTyVarTcLevel :: TcTyVar -> TcLevel metaTyVarTcLevel tv = ASSERT( isTcTyVar tv ) case tcTyVarDetails tv of MetaTv { mtv_tclvl = tclvl } -> tclvl _ -> pprPanic "metaTyVarTcLevel" (ppr tv)
207
metaTyVarTcLevel :: TcTyVar -> TcLevel metaTyVarTcLevel tv = ASSERT( isTcTyVar tv ) case tcTyVarDetails tv of MetaTv { mtv_tclvl = tclvl } -> tclvl _ -> pprPanic "metaTyVarTcLevel" (ppr tv)
207
metaTyVarTcLevel tv = ASSERT( isTcTyVar tv ) case tcTyVarDetails tv of MetaTv { mtv_tclvl = tclvl } -> tclvl _ -> pprPanic "metaTyVarTcLevel" (ppr tv)
168
false
true
0
10
47
69
33
36
null
null
christiaanb/Idris-dev
src/IRTS/CodegenJavaScript.hs
bsd-3-clause
compileJS (JSNum num) | JSInt i <- num = show i | JSFloat f <- num = show f | JSInteger i <- num = show i
117
compileJS (JSNum num) | JSInt i <- num = show i | JSFloat f <- num = show f | JSInteger i <- num = show i
117
compileJS (JSNum num) | JSInt i <- num = show i | JSFloat f <- num = show f | JSInteger i <- num = show i
117
false
false
0
9
38
73
31
42
null
null
brendanhay/gogol
gogol-plus/gen/Network/Google/Plus/Types/Product.hs
mpl-2.0
-- | The time at which this collection of activities was last updated. -- Formatted as an RFC 3339 timestamp. afUpdated :: Lens' ActivityFeed (Maybe UTCTime) afUpdated = lens _afUpdated (\ s a -> s{_afUpdated = a}) . mapping _DateTime
242
afUpdated :: Lens' ActivityFeed (Maybe UTCTime) afUpdated = lens _afUpdated (\ s a -> s{_afUpdated = a}) . mapping _DateTime
132
afUpdated = lens _afUpdated (\ s a -> s{_afUpdated = a}) . mapping _DateTime
84
true
true
0
10
47
56
29
27
null
null
lukexi/haskell-opencv
test/test.hs
bsd-3-clause
testNewCascadeClassifierAlgorithm :: HU.Assertion testNewCascadeClassifierAlgorithm = do mbCC <- newCascadeClassifier "/this/is/bogus.xml" case mbCC of Nothing -> return () Just _cc -> fail "expected Nothing from newCascadeClassifier"
246
testNewCascadeClassifierAlgorithm :: HU.Assertion testNewCascadeClassifierAlgorithm = do mbCC <- newCascadeClassifier "/this/is/bogus.xml" case mbCC of Nothing -> return () Just _cc -> fail "expected Nothing from newCascadeClassifier"
246
testNewCascadeClassifierAlgorithm = do mbCC <- newCascadeClassifier "/this/is/bogus.xml" case mbCC of Nothing -> return () Just _cc -> fail "expected Nothing from newCascadeClassifier"
196
false
true
0
12
36
60
25
35
null
null
verement/etamoo
src/MOO/Compiler.hs
bsd-3-clause
-- avoid arithmetic overflow exception Int x `divide` Int y = return $ Int (x `quot` y)
89
Int x `divide` Int y = return $ Int (x `quot` y)
50
Int x `divide` Int y = return $ Int (x `quot` y)
50
true
false
0
8
18
37
19
18
null
null
ingemaradahl/bilder
src/Compiler/Merge.hs
lgpl-3.0
emptyState ∷ Shader → Count emptyState shd = Count [Map.empty] (Map.fromList (("unknown",0):map ((,0) . variableName) (filter (\v → variableType v == TSampler) $ Map.elems (inputs shd)))) shd
201
emptyState ∷ Shader → Count emptyState shd = Count [Map.empty] (Map.fromList (("unknown",0):map ((,0) . variableName) (filter (\v → variableType v == TSampler) $ Map.elems (inputs shd)))) shd
201
emptyState shd = Count [Map.empty] (Map.fromList (("unknown",0):map ((,0) . variableName) (filter (\v → variableType v == TSampler) $ Map.elems (inputs shd)))) shd
173
false
true
0
16
36
105
54
51
null
null
spaceships/circuit-synthesis
src/Circuit/Format/Acirc.hs
mit
parseTest :: AcircParser g () parseTest = do string "test" spaces inps <- many digit spaces outs <- many digit let inp = readInts inps res = readInts outs addTest (inp, res) endLine
221
parseTest :: AcircParser g () parseTest = do string "test" spaces inps <- many digit spaces outs <- many digit let inp = readInts inps res = readInts outs addTest (inp, res) endLine
221
parseTest = do string "test" spaces inps <- many digit spaces outs <- many digit let inp = readInts inps res = readInts outs addTest (inp, res) endLine
191
false
true
1
10
72
89
37
52
null
null
andorp/bead
snaplets/fay/src/Bead/View/Validators.hs
bsd-3-clause
emailAddress :: String -> Bool emailAddress [] = False
58
emailAddress :: String -> Bool emailAddress [] = False
58
emailAddress [] = False
27
false
true
0
6
12
20
10
10
null
null
urbanslug/ghc
compiler/deSugar/Coverage.hs
bsd-3-clause
-- For the hash value, we hash everything: the file name, -- the timestamp of the original source file, the tab stop, -- and the mix entries. We cheat, and hash the show'd string. -- This hash only has to be hashed at Mix creation time, -- and is for sanity checking only. mixHash :: FilePath -> UTCTime -> Int -> [Mi...
441
mixHash :: FilePath -> UTCTime -> Int -> [MixEntry] -> Int mixHash file tm tabstop entries = fromIntegral $ hashString (show $ Mix file tm 0 tabstop entries)
165
mixHash file tm tabstop entries = fromIntegral $ hashString (show $ Mix file tm 0 tabstop entries)
106
true
true
0
9
91
69
37
32
null
null
Copilot-Language/sbv-for-copilot
Data/SBV/SMT/SMTLib2.hs
bsd-3-clause
-- | Translate a problem into an SMTLib2 script cvt :: RoundingMode -- ^ User selected rounding mode to be used for floating point arithmetic -> Maybe Logic -- ^ SMT-Lib logic, if requested by the user -> SolverCapabilities -- ^ capabilities of the current solver -> ...
8,019
cvt :: RoundingMode -- ^ User selected rounding mode to be used for floating point arithmetic -> Maybe Logic -- ^ SMT-Lib logic, if requested by the user -> SolverCapabilities -- ^ capabilities of the current solver -> Set.Set Kind -- ^ kinds used ...
7,971
cvt rm smtLogic solverCaps kindInfo isSat comments inputs skolemInps consts tbls arrs uis axs (SBVPgm asgnsSeq) cstrs out = (pre, []) where -- the logic is an over-approaximation hasInteger = KUnbounded `Set.member` kindInfo hasReal = KReal `Set.member` kindInfo hasFloat ...
6,895
true
true
67
40
3,193
2,169
1,168
1,001
null
null
garykrige/project_euler
Haskell/Math/Combinat/Partitions.hs
gpl-2.0
partitions' (0,_) d = if d==0 then [[]] else []
48
_partitions' (0,_) d = if d==0 then [[]] else []
48
_partitions' (0,_) d = if d==0 then [[]] else []
48
false
false
0
7
10
36
20
16
null
null
shlevy/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
cmpAltCon (DataAlt _) DEFAULT = GT
40
cmpAltCon (DataAlt _) DEFAULT = GT
40
cmpAltCon (DataAlt _) DEFAULT = GT
40
false
false
0
7
11
17
8
9
null
null
christiannolte/tip-toi-reveng
src/PrettyPrint.hs
mit
ppArithOp :: ArithOp -> String ppArithOp Inc = "+="
52
ppArithOp :: ArithOp -> String ppArithOp Inc = "+="
52
ppArithOp Inc = "+="
21
false
true
0
5
9
18
9
9
null
null
xenog/haskoin
src/Network/Haskoin/Block/Headers.hs
unlicense
computeTarget :: BlockNode -> BlockNode -> Integer computeTarget f l = let work = (nodeWork l - nodeWork f) * fromIntegral targetSpacing actualTimespan = blockTimestamp (nodeHeader l) - blockTimestamp (nodeHeader f) actualTimespan' | actualTimespan > 288 * targetSpacing = 288...
544
computeTarget :: BlockNode -> BlockNode -> Integer computeTarget f l = let work = (nodeWork l - nodeWork f) * fromIntegral targetSpacing actualTimespan = blockTimestamp (nodeHeader l) - blockTimestamp (nodeHeader f) actualTimespan' | actualTimespan > 288 * targetSpacing = 288...
544
computeTarget f l = let work = (nodeWork l - nodeWork f) * fromIntegral targetSpacing actualTimespan = blockTimestamp (nodeHeader l) - blockTimestamp (nodeHeader f) actualTimespan' | actualTimespan > 288 * targetSpacing = 288 * targetSpacing | actualTimespan < 72 ...
493
false
true
2
13
149
171
83
88
null
null
m-alvarez/jhc
drift_processed/FrontEnd/SrcLoc.hs
mit
fileNameGenerated = packString "(generated)"
44
fileNameGenerated = packString "(generated)"
44
fileNameGenerated = packString "(generated)"
44
false
false
1
5
3
12
4
8
null
null
sgillespie/ghc
compiler/nativeGen/RegAlloc/Linear/Main.hs
bsd-3-clause
process entry_ids block_live [] next_round accum madeProgress | not madeProgress {- BUGS: There are so many unreachable blocks in the code the warnings are overwhelming. pprTrace "RegAlloc.Linear.Main.process: no progress made, bailing out." ( text "Unreachable blocks:" ...
505
process entry_ids block_live [] next_round accum madeProgress | not madeProgress {- BUGS: There are so many unreachable blocks in the code the warnings are overwhelming. pprTrace "RegAlloc.Linear.Main.process: no progress made, bailing out." ( text "Unreachable blocks:" ...
505
process entry_ids block_live [] next_round accum madeProgress | not madeProgress {- BUGS: There are so many unreachable blocks in the code the warnings are overwhelming. pprTrace "RegAlloc.Linear.Main.process: no progress made, bailing out." ( text "Unreachable blocks:" ...
505
false
false
0
8
164
62
28
34
null
null
ekmett/transients
src/Data/Transient/Primitive/PrimRef.hs
bsd-2-clause
primRefContents :: PrimRef s a -> Addr primRefContents (PrimRef m) = mutableByteArrayContents m
95
primRefContents :: PrimRef s a -> Addr primRefContents (PrimRef m) = mutableByteArrayContents m
95
primRefContents (PrimRef m) = mutableByteArrayContents m
56
false
true
0
9
12
38
16
22
null
null
phaazon/GLFW-b
Graphics/UI/GLFW.hs
bsd-2-clause
splitFirst (x:xs) = (Just x, xs)
32
splitFirst (x:xs) = (Just x, xs)
32
splitFirst (x:xs) = (Just x, xs)
32
false
false
0
7
5
25
13
12
null
null
elieux/ghc
compiler/ghci/ByteCodeGen.hs
bsd-3-clause
thenBc :: BcM a -> (a -> BcM b) -> BcM b thenBc (BcM expr) cont = BcM $ \st0 -> do (st1, q) <- expr st0 let BcM k = cont q (st2, r) <- k st1 return (st2, r)
164
thenBc :: BcM a -> (a -> BcM b) -> BcM b thenBc (BcM expr) cont = BcM $ \st0 -> do (st1, q) <- expr st0 let BcM k = cont q (st2, r) <- k st1 return (st2, r)
164
thenBc (BcM expr) cont = BcM $ \st0 -> do (st1, q) <- expr st0 let BcM k = cont q (st2, r) <- k st1 return (st2, r)
123
false
true
0
12
48
115
55
60
null
null
DylanSp/zmachine-interpreter
src/Instruction.hs
mit
getOperandLength (LargeOperand : remainingTypes) = zWordSize + getOperandLength remainingTypes
94
getOperandLength (LargeOperand : remainingTypes) = zWordSize + getOperandLength remainingTypes
94
getOperandLength (LargeOperand : remainingTypes) = zWordSize + getOperandLength remainingTypes
94
false
false
0
6
8
24
11
13
null
null
IvanShymanovich/FCM
src/FCM/FCM.hs
mit
defineClasses :: FCMOptions -> [[Double]] -> IO [[Double]] defineClasses options source = do matrix <- generateInitialMatrix options source return $ solveWhileAccuracy source matrix (precisionOpt options) (choseDistanceFunc options)
240
defineClasses :: FCMOptions -> [[Double]] -> IO [[Double]] defineClasses options source = do matrix <- generateInitialMatrix options source return $ solveWhileAccuracy source matrix (precisionOpt options) (choseDistanceFunc options)
240
defineClasses options source = do matrix <- generateInitialMatrix options source return $ solveWhileAccuracy source matrix (precisionOpt options) (choseDistanceFunc options)
181
false
true
0
11
34
84
40
44
null
null
micxjo/hs-advent
test/test.hs
bsd-3-clause
day2 = testGroup "Day 2" [testCase "Part 1" $ do wrappingPaper 2 3 4 @?= 58 wrappingPaper 1 1 10 @?= 43 ,testCase "Part 2" $ do ribbon 2 3 4 @?= 34 ribbon 1 1 10 @?= 14]
219
day2 = testGroup "Day 2" [testCase "Part 1" $ do wrappingPaper 2 3 4 @?= 58 wrappingPaper 1 1 10 @?= 43 ,testCase "Part 2" $ do ribbon 2 3 4 @?= 34 ribbon 1 1 10 @?= 14]
219
day2 = testGroup "Day 2" [testCase "Part 1" $ do wrappingPaper 2 3 4 @?= 58 wrappingPaper 1 1 10 @?= 43 ,testCase "Part 2" $ do ribbon 2 3 4 @?= 34 ribbon 1 1 10 @?= 14]
219
false
false
0
11
88
87
39
48
null
null
MetaMemoryT/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
defined :: PDecl -> [Name] defined (PFix _ _ _) = []
52
defined :: PDecl -> [Name] defined (PFix _ _ _) = []
52
defined (PFix _ _ _) = []
25
false
true
0
7
11
33
17
16
null
null
gambogi/csh-eval
src/CSH/Eval/DB/Statements.hs
mit
-- *** Queue -- | Instantiate a queue entry. grQueueP :: Word64 -- ^ Member ID -> UTCTime -- ^ Entrance time -> H.Stmt HP.Postgres grQueueP = [H.stmt|insert into "queue" ("member_id", "entered") values (?, ?)|]
230
grQueueP :: Word64 -- ^ Member ID -> UTCTime -- ^ Entrance time -> H.Stmt HP.Postgres grQueueP = [H.stmt|insert into "queue" ("member_id", "entered") values (?, ?)|]
184
grQueueP = [H.stmt|insert into "queue" ("member_id", "entered") values (?, ?)|]
79
true
true
0
8
54
36
22
14
null
null
neothemachine/monadiccp
src/Control/CP/FD/FD.hs
bsd-3-clause
fdSpecInfo_edge :: FDSolver s => EGEdgeId -> FDInstance s (FDSpecInfo s) fdSpecInfo_edge f = do s <- get let edge = getJustEdge f s intS p = Map.findWithDefault (emptyFDSpecInfoInt p s) p $ fdsIntVars s boolS p = Map.findWithDefault (emptyFDSpecInfoBool p s) p $ fdsBoolVars s colS p = Map.findWith...
1,120
fdSpecInfo_edge :: FDSolver s => EGEdgeId -> FDInstance s (FDSpecInfo s) fdSpecInfo_edge f = do s <- get let edge = getJustEdge f s intS p = Map.findWithDefault (emptyFDSpecInfoInt p s) p $ fdsIntVars s boolS p = Map.findWithDefault (emptyFDSpecInfoBool p s) p $ fdsBoolVars s colS p = Map.findWith...
1,120
fdSpecInfo_edge f = do s <- get let edge = getJustEdge f s intS p = Map.findWithDefault (emptyFDSpecInfoInt p s) p $ fdsIntVars s boolS p = Map.findWithDefault (emptyFDSpecInfoBool p s) p $ fdsBoolVars s colS p = Map.findWithDefault (emptyFDSpecInfoCol p s) p $ fdsColVars s -- an m x = case x...
1,047
false
true
0
13
256
210
100
110
null
null
yunomu/csv-streams
System/IO/Streams/CSV.hs
bsd-3-clause
toCSVRow :: InputStream ByteString -> IO (InputStream Row) toCSVRow = SA.parserToInputStream row
96
toCSVRow :: InputStream ByteString -> IO (InputStream Row) toCSVRow = SA.parserToInputStream row
96
toCSVRow = SA.parserToInputStream row
37
false
true
0
8
11
32
15
17
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/main/HscMain.hs
bsd-3-clause
getHscEnv :: Hsc HscEnv getHscEnv = Hsc $ \e w -> return (e, w)
63
getHscEnv :: Hsc HscEnv getHscEnv = Hsc $ \e w -> return (e, w)
63
getHscEnv = Hsc $ \e w -> return (e, w)
39
false
true
2
7
13
40
19
21
null
null
bitemyapp/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
iallocatorModeAllocateSecondary :: String iallocatorModeAllocateSecondary = Types.iAllocatorModeToRaw IAllocatorAllocateSecondary
131
iallocatorModeAllocateSecondary :: String iallocatorModeAllocateSecondary = Types.iAllocatorModeToRaw IAllocatorAllocateSecondary
131
iallocatorModeAllocateSecondary = Types.iAllocatorModeToRaw IAllocatorAllocateSecondary
89
false
true
0
6
8
16
8
8
null
null
bravit/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v (LSLt (ATInt ITBig)) [l, r] = v ++ "idris_bigLt(vm, " ++ creg l ++ ", " ++ creg r ++ ")"
95
doOp v (LSLt (ATInt ITBig)) [l, r] = v ++ "idris_bigLt(vm, " ++ creg l ++ ", " ++ creg r ++ ")"
95
doOp v (LSLt (ATInt ITBig)) [l, r] = v ++ "idris_bigLt(vm, " ++ creg l ++ ", " ++ creg r ++ ")"
95
false
false
0
9
22
57
28
29
null
null
mikeizbicki/homoiconic
old/Topology1.hs
bsd-3-clause
prop_Top :: Top a b -> a -> Neighborhood b -> (a -> Bool) prop_Top (Top f inv) a nb = \a2 -> (a2 `isNeighbor` (a,inv a nb)) ==> (f a2 `isNeighbor` (f a, nb))
161
prop_Top :: Top a b -> a -> Neighborhood b -> (a -> Bool) prop_Top (Top f inv) a nb = \a2 -> (a2 `isNeighbor` (a,inv a nb)) ==> (f a2 `isNeighbor` (f a, nb))
161
prop_Top (Top f inv) a nb = \a2 -> (a2 `isNeighbor` (a,inv a nb)) ==> (f a2 `isNeighbor` (f a, nb))
103
false
true
0
10
38
103
55
48
null
null
urbanslug/ghc
testsuite/tests/driver/recomp010/X2.hs
bsd-3-clause
-- deriving Show x :: D1 x = D { f = B }
44
x :: D1 x = D { f = B }
23
x = D { f = B }
15
true
true
0
7
17
27
13
14
null
null
beni55/texmath
src/Text/TeXMath/Readers/OMML.hs
gpl-2.0
interpretChar :: Char -> Exp interpretChar c | isDigit c = ENumber [c]
70
interpretChar :: Char -> Exp interpretChar c | isDigit c = ENumber [c]
70
interpretChar c | isDigit c = ENumber [c]
41
false
true
0
8
12
38
16
22
null
null
reflex-frp/reflex-dom
reflex-dom-core/src/Reflex/Dom/Xhr/Foreign.hs
bsd-3-clause
xmlHttpRequestGetResponseText :: (FromJSString result, MonadJSM m) => XMLHttpRequest -> m (Maybe result) xmlHttpRequestGetResponseText = getResponseText
152
xmlHttpRequestGetResponseText :: (FromJSString result, MonadJSM m) => XMLHttpRequest -> m (Maybe result) xmlHttpRequestGetResponseText = getResponseText
152
xmlHttpRequestGetResponseText = getResponseText
47
false
true
0
9
14
39
20
19
null
null
carlohamalainen/imagetrove-uploader
src/Network/MyTardis/API.hs
bsd-2-clause
getExperiment :: URI -> ReaderT MyTardisConfig IO (Result RestExperiment) getExperiment = getResource
101
getExperiment :: URI -> ReaderT MyTardisConfig IO (Result RestExperiment) getExperiment = getResource
101
getExperiment = getResource
27
false
true
0
9
11
34
15
19
null
null
pparkkin/eta
compiler/ETA/BasicTypes/NameSet.hs
bsd-3-clause
plusFV = unionNameSet
26
plusFV = unionNameSet
26
plusFV = unionNameSet
26
false
false
1
5
7
10
3
7
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_DEBUG_SOURCE_THIRD_PARTY :: GLenum gl_DEBUG_SOURCE_THIRD_PARTY = 0x8249
74
gl_DEBUG_SOURCE_THIRD_PARTY :: GLenum gl_DEBUG_SOURCE_THIRD_PARTY = 0x8249
74
gl_DEBUG_SOURCE_THIRD_PARTY = 0x8249
36
false
true
0
4
5
11
6
5
null
null
rfranek/duckling
Duckling/Time/FR/Rules.hs
bsd-3-clause
ruleErMai :: Rule ruleErMai = Rule { name = "1er mai" , pattern = [ regex "f(e|\x00ea)te du travail" ] , prod = \_ -> tt $ monthDay 5 1 }
153
ruleErMai :: Rule ruleErMai = Rule { name = "1er mai" , pattern = [ regex "f(e|\x00ea)te du travail" ] , prod = \_ -> tt $ monthDay 5 1 }
153
ruleErMai = Rule { name = "1er mai" , pattern = [ regex "f(e|\x00ea)te du travail" ] , prod = \_ -> tt $ monthDay 5 1 }
135
false
true
0
10
46
61
31
30
null
null
sru-systems/protobuf-simple
src/Data/ProtoBuf/WireFormat.hs
mit
-- | Decode a packed repeated float field. getFloatPacked :: Get (Seq Float) getFloatPacked = getPacked getFloat
112
getFloatPacked :: Get (Seq Float) getFloatPacked = getPacked getFloat
69
getFloatPacked = getPacked getFloat
35
true
true
0
7
16
24
12
12
null
null
bitemyapp/ghc
compiler/rename/RnSplice.hs
bsd-3-clause
rnBracket :: HsExpr RdrName -> HsBracket RdrName -> RnM (HsExpr Name, FreeVars) rnBracket e _ = failTH e "Template Haskell bracket"
131
rnBracket :: HsExpr RdrName -> HsBracket RdrName -> RnM (HsExpr Name, FreeVars) rnBracket e _ = failTH e "Template Haskell bracket"
131
rnBracket e _ = failTH e "Template Haskell bracket"
51
false
true
0
9
20
52
23
29
null
null
socrata-platform/ssync
src/main/haskell/SSync/DataQueue.hs
apache-2.0
firstByteOfBlock :: DataQueue -> Word8 firstByteOfBlock (SingleChunk bs hd _) = BS.index bs hd
94
firstByteOfBlock :: DataQueue -> Word8 firstByteOfBlock (SingleChunk bs hd _) = BS.index bs hd
94
firstByteOfBlock (SingleChunk bs hd _) = BS.index bs hd
55
false
true
0
7
13
35
17
18
null
null
rahulmutt/ghcvm
compiler/Eta/Utils/Digraph.hs
bsd-3-clause
componentsG :: Graph node -> [[node]] componentsG graph = map (map (gr_vertex_to_node graph) . flattenTree) $ components (gr_int_graph graph)
141
componentsG :: Graph node -> [[node]] componentsG graph = map (map (gr_vertex_to_node graph) . flattenTree) $ components (gr_int_graph graph)
141
componentsG graph = map (map (gr_vertex_to_node graph) . flattenTree) $ components (gr_int_graph graph)
103
false
true
0
10
18
64
30
34
null
null
giorgidze/YampaSynth
src/SynthParams.hs
bsd-3-clause
-- For subset of generators I am dealing here this definition is OK -- But in general preset and instrument generator should be handeled separatly applyGen :: SF.Generator -> SoundFontParams -> SoundFontParams applyGen g p = case g of SF.StartAddressOffset v -> p {sfStart = fromIntegral $ (fromIntegral $ sfStart ...
1,857
applyGen :: SF.Generator -> SoundFontParams -> SoundFontParams applyGen g p = case g of SF.StartAddressOffset v -> p {sfStart = fromIntegral $ (fromIntegral $ sfStart p) + v} SF.EndAddressOffset v -> p {sfEnd = fromIntegral $ (fromIntegral $ sfEnd p) + v} SF.LoopStartAddressOffset v -> p {sfStartLoop...
1,710
applyGen g p = case g of SF.StartAddressOffset v -> p {sfStart = fromIntegral $ (fromIntegral $ sfStart p) + v} SF.EndAddressOffset v -> p {sfEnd = fromIntegral $ (fromIntegral $ sfEnd p) + v} SF.LoopStartAddressOffset v -> p {sfStartLoop = fromIntegral $ (fromIntegral $ sfStartLoop p) + v} SF.Loop...
1,647
true
true
0
16
382
527
279
248
null
null
mcschroeder/ghc
compiler/utils/Maybes.hs
bsd-3-clause
expectJust _ (Just x) = x
27
expectJust _ (Just x) = x
27
expectJust _ (Just x) = x
27
false
false
1
6
7
20
8
12
null
null
brendanhay/gogol
gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProFileFilterLinks/Patch.hs
mpl-2.0
-- | Web property Id to which profile filter link belongs mpfflpWebPropertyId :: Lens' ManagementProFileFilterLinksPatch Text mpfflpWebPropertyId = lens _mpfflpWebPropertyId (\ s a -> s{_mpfflpWebPropertyId = a})
220
mpfflpWebPropertyId :: Lens' ManagementProFileFilterLinksPatch Text mpfflpWebPropertyId = lens _mpfflpWebPropertyId (\ s a -> s{_mpfflpWebPropertyId = a})
162
mpfflpWebPropertyId = lens _mpfflpWebPropertyId (\ s a -> s{_mpfflpWebPropertyId = a})
94
true
true
1
9
34
46
22
24
null
null
emwap/feldspar-compiler
src/Feldspar/Compiler/Frontend/CommandLine/NameExtractor.hs
bsd-3-clause
stripName (Symbol a) = a
24
stripName (Symbol a) = a
24
stripName (Symbol a) = a
24
false
false
0
7
4
15
7
8
null
null
fmapfmapfmap/amazonka
amazonka-ecs/gen/Network/AWS/ECS/Types/Product.hs
mpl-2.0
-- | The status of the deployment. Valid values are 'PRIMARY' (for the most -- recent deployment), 'ACTIVE' (for previous deployments that still have -- tasks running, but are being replaced with the 'PRIMARY' deployment), -- and 'INACTIVE' (for deployments that have been completely replaced). dStatus :: Lens' Deployme...
386
dStatus :: Lens' Deployment (Maybe Text) dStatus = lens _dStatus (\ s a -> s{_dStatus = a})
91
dStatus = lens _dStatus (\ s a -> s{_dStatus = a})
50
true
true
0
9
61
49
28
21
null
null
holzensp/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
getAmode' _ (CmmMachOp (MO_Add _) [x, CmmMachOp (MO_Add _) [CmmMachOp (MO_Shl _) [y, CmmLit (CmmInt shift _)], CmmLit (CmmInt offset _)]]) | shift == 0 || shift == 1 || shift == 2 || shift == 3 && is32BitInteger offset = x86_complex_amode x y shift ...
326
getAmode' _ (CmmMachOp (MO_Add _) [x, CmmMachOp (MO_Add _) [CmmMachOp (MO_Shl _) [y, CmmLit (CmmInt shift _)], CmmLit (CmmInt offset _)]]) | shift == 0 || shift == 1 || shift == 2 || shift == 3 && is32BitInteger offset = x86_complex_amode x y shift ...
326
getAmode' _ (CmmMachOp (MO_Add _) [x, CmmMachOp (MO_Add _) [CmmMachOp (MO_Shl _) [y, CmmLit (CmmInt shift _)], CmmLit (CmmInt offset _)]]) | shift == 0 || shift == 1 || shift == 2 || shift == 3 && is32BitInteger offset = x86_complex_amode x y shift ...
326
false
false
1
15
116
143
67
76
null
null
mightymoose/liquidhaskell
benchmarks/icfp15/pos/FindRec.hs
bsd-3-clause
{-@ measure parent :: FHandle -> FHandle @-} {-@ flookup :: h:FHandle -> Path -> RIO<{v:World | Lkup v h },\w x -> {v:World | UpdActive w v x && UpdCaps w v x h }> FHandle @-} flookup :: FHandle -> Path -> RIO FHandle flookup = undefined
240
flookup :: FHandle -> Path -> RIO FHandle flookup = undefined
61
flookup = undefined
19
true
true
0
8
51
30
14
16
null
null
rnons/yespandoc
Handler/Home.hs
bsd-2-clause
getHomeR :: Handler RepHtml getHomeR = do (formWidget, formEnctype) <- generateFormPost pandocForm defaultLayout $ do let output = Right "" :: Either Html String $(widgetFile "homepage")
210
getHomeR :: Handler RepHtml getHomeR = do (formWidget, formEnctype) <- generateFormPost pandocForm defaultLayout $ do let output = Right "" :: Either Html String $(widgetFile "homepage")
210
getHomeR = do (formWidget, formEnctype) <- generateFormPost pandocForm defaultLayout $ do let output = Right "" :: Either Html String $(widgetFile "homepage")
182
false
true
0
13
49
67
31
36
null
null
jsnajder/fer3-catalogue
src/SimLists.hs
bsd-3-clause
pairGraph2 :: (G.Vertex v k, Eq v, Ord k, Eq l) => G.Graph k v l -> G.Graph k v (l,l) pairGraph2 g = G.fromEdgeList $ do v1 <- G.vertices g (l1,v2) <- G.outEdges v1 g let Just (l2,v1') = find (\(_,v1') -> v1'==v1) (G.outEdges v1 g ++ [(l1,v1)]) return (v1,(l1,l2),v2)
285
pairGraph2 :: (G.Vertex v k, Eq v, Ord k, Eq l) => G.Graph k v l -> G.Graph k v (l,l) pairGraph2 g = G.fromEdgeList $ do v1 <- G.vertices g (l1,v2) <- G.outEdges v1 g let Just (l2,v1') = find (\(_,v1') -> v1'==v1) (G.outEdges v1 g ++ [(l1,v1)]) return (v1,(l1,l2),v2)
285
pairGraph2 g = G.fromEdgeList $ do v1 <- G.vertices g (l1,v2) <- G.outEdges v1 g let Just (l2,v1') = find (\(_,v1') -> v1'==v1) (G.outEdges v1 g ++ [(l1,v1)]) return (v1,(l1,l2),v2)
196
false
true
0
16
68
202
103
99
null
null
hvr/containers
Data/Map/Base.hs
bsd-3-clause
filterWithKey p (Bin _ kx x l r) | p kx x = link kx x (filterWithKey p l) (filterWithKey p r) | otherwise = merge (filterWithKey p l) (filterWithKey p r)
160
filterWithKey p (Bin _ kx x l r) | p kx x = link kx x (filterWithKey p l) (filterWithKey p r) | otherwise = merge (filterWithKey p l) (filterWithKey p r)
160
filterWithKey p (Bin _ kx x l r) | p kx x = link kx x (filterWithKey p l) (filterWithKey p r) | otherwise = merge (filterWithKey p l) (filterWithKey p r)
160
false
false
0
8
38
100
43
57
null
null
rjw57/cloudsync
cs/Main/Command/AddObject.hs
mit
commandName = Cmd.name command
30
commandName = Cmd.name command
30
commandName = Cmd.name command
30
false
false
1
5
3
15
5
10
null
null
rueshyna/gogol
gogol-games/gen/Network/Google/Resource/Games/Revisions/Check.hs
mpl-2.0
-- | Creates a value of 'RevisionsCheck' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'revClientRevision' -- -- * 'revConsistencyToken' revisionsCheck :: Text -- ^ 'revClientRevision' -> RevisionsCheck revisionsCheck pRevCli...
444
revisionsCheck :: Text -- ^ 'revClientRevision' -> RevisionsCheck revisionsCheck pRevClientRevision_ = RevisionsCheck' { _revClientRevision = pRevClientRevision_ , _revConsistencyToken = Nothing }
220
revisionsCheck pRevClientRevision_ = RevisionsCheck' { _revClientRevision = pRevClientRevision_ , _revConsistencyToken = Nothing }
146
true
true
0
7
82
49
28
21
null
null
TomMD/ghc
compiler/basicTypes/Name.hs
bsd-3-clause
isValName :: Name -> Bool isValName name = isValOcc (nameOccName name)
70
isValName :: Name -> Bool isValName name = isValOcc (nameOccName name)
70
isValName name = isValOcc (nameOccName name)
44
false
true
0
7
10
27
13
14
null
null
spikelynch/annales
app/Main.hs
bsd-3-clause
generateTitle :: Empire -> StdGen -> IO [ Char ] generateTitle e seed = do l <- return $ map pname $ reverse $ lineage e mends <- return $ ends l return $ case mends of Just ( k1, k2 ) -> concat [ "# ANNALES\n\n" ,"Being a faithful narration of the history of the realm" ," from the reign of ...
594
generateTitle :: Empire -> StdGen -> IO [ Char ] generateTitle e seed = do l <- return $ map pname $ reverse $ lineage e mends <- return $ ends l return $ case mends of Just ( k1, k2 ) -> concat [ "# ANNALES\n\n" ,"Being a faithful narration of the history of the realm" ," from the reign of ...
594
generateTitle e seed = do l <- return $ map pname $ reverse $ lineage e mends <- return $ ends l return $ case mends of Just ( k1, k2 ) -> concat [ "# ANNALES\n\n" ,"Being a faithful narration of the history of the realm" ," from the reign of " ,k1 ," to the present day\n\n" ...
545
false
true
0
15
202
158
81
77
null
null
brendanhay/gogol
gogol-monitoring/gen/Network/Google/Resource/Monitoring/Services/Patch.hs
mpl-2.0
-- | V1 error format. spXgafv :: Lens' ServicesPatch (Maybe Xgafv) spXgafv = lens _spXgafv (\ s a -> s{_spXgafv = a})
117
spXgafv :: Lens' ServicesPatch (Maybe Xgafv) spXgafv = lens _spXgafv (\ s a -> s{_spXgafv = a})
95
spXgafv = lens _spXgafv (\ s a -> s{_spXgafv = a})
50
true
true
0
9
21
46
25
21
null
null
Southern-Exposure-Seed-Exchange/southernexposure.com
server/test/Spec.hs
gpl-3.0
tests :: TestTree tests = testGroup "Tests" [ modelsFields , modelsUtils , commonData , stoneEdge , routesStoneEdge , avalara , routesAdminShipping ]
225
tests :: TestTree tests = testGroup "Tests" [ modelsFields , modelsUtils , commonData , stoneEdge , routesStoneEdge , avalara , routesAdminShipping ]
225
tests = testGroup "Tests" [ modelsFields , modelsUtils , commonData , stoneEdge , routesStoneEdge , avalara , routesAdminShipping ]
207
false
true
0
6
97
44
23
21
null
null
music-suite/music-preludes
tests/instances.hs
bsd-3-clause
sameType :: a -> a -> a sameType _ x = x
40
sameType :: a -> a -> a sameType _ x = x
40
sameType _ x = x
16
false
true
0
6
11
24
12
12
null
null
brendanhay/gogol
gogol-androiddeviceprovisioning/gen/Network/Google/Resource/AndroidDeviceProvisioning/Customers/Devices/RemoveConfiguration.hs
mpl-2.0
-- | Creates a value of 'CustomersDevicesRemoveConfiguration' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'cdrcParent' -- -- * 'cdrcXgafv' -- -- * 'cdrcUploadProtocol' -- -- * 'cdrcAccessToken' -- -- * 'cdrcUploadType' -- -- * 'cdr...
858
customersDevicesRemoveConfiguration :: Text -- ^ 'cdrcParent' -> CustomerRemoveConfigurationRequest -- ^ 'cdrcPayload' -> CustomersDevicesRemoveConfiguration customersDevicesRemoveConfiguration pCdrcParent_ pCdrcPayload_ = CustomersDevicesRemoveConfiguration' { _cdrcParent = pCdrcParent_ , _cdrcXg...
505
customersDevicesRemoveConfiguration pCdrcParent_ pCdrcPayload_ = CustomersDevicesRemoveConfiguration' { _cdrcParent = pCdrcParent_ , _cdrcXgafv = Nothing , _cdrcUploadProtocol = Nothing , _cdrcAccessToken = Nothing , _cdrcUploadType = Nothing , _cdrcPayload = pCdrcPayload_ , _cdrcCallback ...
335
true
true
0
8
150
96
62
34
null
null
zeyuanxy/haskell-playground
write-yourself-a-scheme/chap6/main.hs
mit
----------------------------- ------- Main --------------- ----------------------------- main :: IO () main = do args <- getArgs case length args of 0 -> runRepl 1 -> evalAndPrint $ args !! 0 otherwise -> putStrLn "Program takes only 0 or 1 argument" ----------------------------- ------- Parse --...
363
main :: IO () main = do args <- getArgs case length args of 0 -> runRepl 1 -> evalAndPrint $ args !! 0 otherwise -> putStrLn "Program takes only 0 or 1 argument" ----------------------------- ------- Parse --------------- -----------------------------
273
main = do args <- getArgs case length args of 0 -> runRepl 1 -> evalAndPrint $ args !! 0 otherwise -> putStrLn "Program takes only 0 or 1 argument" ----------------------------- ------- Parse --------------- -----------------------------
259
true
true
1
12
66
72
35
37
null
null
C0DEHERO/Hgamelaunch
Main.hs
mit
menuLoop :: Connection -> IO() menuLoop conn = do menuResult <- anonMenu conn nextMenu conn menuResult
106
menuLoop :: Connection -> IO() menuLoop conn = do menuResult <- anonMenu conn nextMenu conn menuResult
106
menuLoop conn = do menuResult <- anonMenu conn nextMenu conn menuResult
75
false
true
0
9
19
46
19
27
null
null
andyarvanitis/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v LFTan [x] = v ++ flUnOp "tan" (creg x)
45
doOp v LFTan [x] = v ++ flUnOp "tan" (creg x)
45
doOp v LFTan [x] = v ++ flUnOp "tan" (creg x)
45
false
false
0
8
10
31
15
16
null
null
karamellpelle/grid
source/Game/GUI/Widget/TextWidget.hs
gpl-3.0
splitLine :: UInt -> String -> [String] splitLine linewth str = helper linewth "" $ myWords str where helper wth line [] = case line of [] -> [] _ -> [line] helper wth line (word:words) = let wordLen = fI $ length word in if wordLen <= wth -- add wor...
1,314
splitLine :: UInt -> String -> [String] splitLine linewth str = helper linewth "" $ myWords str where helper wth line [] = case line of [] -> [] _ -> [line] helper wth line (word:words) = let wordLen = fI $ length word in if wordLen <= wth -- add wor...
1,314
splitLine linewth str = helper linewth "" $ myWords str where helper wth line [] = case line of [] -> [] _ -> [line] helper wth line (word:words) = let wordLen = fI $ length word in if wordLen <= wth -- add word to current line then helper...
1,274
false
true
0
15
582
473
245
228
null
null
shlevy/ghc
compiler/simplCore/SetLevels.hs
bsd-3-clause
notWorthFloating :: CoreExpr -> [Var] -> Bool -- Returns True if the expression would be replaced by -- something bigger than it is now. For example: -- abs_vars = tvars only: return True if e is trivial, -- but False for anything bigger -- abs_vars = [x] (an Id): return True for trivial...
3,150
notWorthFloating :: CoreExpr -> [Var] -> Bool notWorthFloating e abs_vars = go e (count isId abs_vars) where go (Var {}) n = n >= 0 go (Lit lit) n = ASSERT( n==0 ) litIsTrivial lit -- Note [Floating literals] go (Tick t e) n = not (tickishIsCode t) && go e n go (Cast e...
2,616
notWorthFloating e abs_vars = go e (count isId abs_vars) where go (Var {}) n = n >= 0 go (Lit lit) n = ASSERT( n==0 ) litIsTrivial lit -- Note [Floating literals] go (Tick t e) n = not (tickishIsCode t) && go e n go (Cast e _) n = go e n go (App e arg) n | ...
2,570
true
true
18
17
1,001
377
209
168
null
null
rickardlindberg/codemonitor
src/GUI/Renderer.hs
bsd-3-clause
renderMultilineText :: Rect -> [String] -> Render () renderMultilineText rect@(Rect x y w h) text = withClipRegion rect $ do selectFontFace fontName FontSlantNormal FontWeightNormal setFontSize fontSize setSourceRGBA 0 0 0 0.8 fontHeight <- fmap fontExtentsHeight fontExtents let totalHeight = fr...
737
renderMultilineText :: Rect -> [String] -> Render () renderMultilineText rect@(Rect x y w h) text = withClipRegion rect $ do selectFontFace fontName FontSlantNormal FontWeightNormal setFontSize fontSize setSourceRGBA 0 0 0 0.8 fontHeight <- fmap fontExtentsHeight fontExtents let totalHeight = fr...
737
renderMultilineText rect@(Rect x y w h) text = withClipRegion rect $ do selectFontFace fontName FontSlantNormal FontWeightNormal setFontSize fontSize setSourceRGBA 0 0 0 0.8 fontHeight <- fmap fontExtentsHeight fontExtents let totalHeight = fromIntegral (length text) * fontHeight let startY ...
684
false
true
20
9
202
244
126
118
null
null
GU-CLASP/TypedFlow
TypedFlow/Models/Transformer.hs
lgpl-3.0
dotAttention :: forall n e. KnownNat n => KnownNat e => T '[n,e] Float32 -> T '[n,e] Float32 -> T '[n,e] Float32 -> T '[n,e] Float32 dotAttention v k q = mapT (dotAttention1 (transpose01 q) v) k
196
dotAttention :: forall n e. KnownNat n => KnownNat e => T '[n,e] Float32 -> T '[n,e] Float32 -> T '[n,e] Float32 -> T '[n,e] Float32 dotAttention v k q = mapT (dotAttention1 (transpose01 q) v) k
196
dotAttention v k q = mapT (dotAttention1 (transpose01 q) v) k
61
false
true
0
14
38
122
62
60
null
null
gregberns/HaskellKoans
src/Koan.hs
apache-2.0
-- fnMap :: Map.Map FunctionName Url -- fnMap = Map.fromList -- [ -- ("id", functionUrl preludeUrl "id") -- , ("(+)", functionUrl preludeUrl "-43-") -- , ("(-)", functionUrl preludeUrl "-45-") -- , ("(*)", functionUrl preludeUrl "-42-") -- , ("(&&)", functionUrl preludeUrl "-38--38-") ...
1,783
yellow s = "\x1B[33;1m" ++ s ++ "\x1B[0m"
41
yellow s = "\x1B[33;1m" ++ s ++ "\x1B[0m"
41
true
false
5
5
427
65
50
15
null
null
ghcjs/ghcjs-base
test/Tests/Properties.hs
mit
j_mappend s = mappend s`eqP` (unpackS . mappend (J.pack s))
65
j_mappend s = mappend s`eqP` (unpackS . mappend (J.pack s))
65
j_mappend s = mappend s`eqP` (unpackS . mappend (J.pack s))
65
false
false
0
11
15
36
18
18
null
null
dwdyer/anorak
src/haskell/Anorak/Results.hs
gpl-3.0
-- | Splits each team's results into home results and away results. The first item in the mapped tuple is the team's -- home results, the second is their away results. splitHomeAndAway :: Map Team [Result] -> Map Team ([Result], [Result]) splitHomeAndAway = Map.mapWithKey partitionResults where pa...
457
splitHomeAndAway :: Map Team [Result] -> Map Team ([Result], [Result]) splitHomeAndAway = Map.mapWithKey partitionResults where partitionResults team = partition ((team ==) . homeTeam) -- | Maps a single result for a particular team to a character ('W', 'D' or 'L').
286
splitHomeAndAway = Map.mapWithKey partitionResults where partitionResults team = partition ((team ==) . homeTeam) -- | Maps a single result for a particular team to a character ('W', 'D' or 'L').
215
true
true
0
10
93
72
40
32
null
null
hanshoglund/imitator
src/Music/Imitator.hs
gpl-3.0
kSoundFieldBus :: (Num a, Num b) => (a, b) kMainOutputBus = ( 0, 8)
100
kSoundFieldBus :: (Num a, Num b) => (a, b) kMainOutputBus = ( 0, 8)
100
kMainOutputBus = ( 0, 8)
56
false
true
0
8
46
45
23
22
null
null
andreasabel/helf
src/HeredNormal.hs
mit
enats = map enat $ iterate (app (var' "suc")) (var' "zero")
59
enats = map enat $ iterate (app (var' "suc")) (var' "zero")
59
enats = map enat $ iterate (app (var' "suc")) (var' "zero")
59
false
false
0
10
10
36
17
19
null
null
d0kt0r0/Tidal
src/Sound/Tidal/Scales.hs
gpl-3.0
-- another mode of major pentatonic ritusen :: Fractional a => [a] ritusen = [0,2,5,7,9]
89
ritusen :: Fractional a => [a] ritusen = [0,2,5,7,9]
52
ritusen = [0,2,5,7,9]
21
true
true
0
8
15
44
23
21
null
null
mzini/qlogic
Qlogic/SatSolver.hs
gpl-3.0
value :: (Ord l, Decoder e a, Solver s l) => SatSolver s l () -> e -> IO (Either SatError e) value m p = runSolver $ m >> solveAndCheck >> constructValue p
155
value :: (Ord l, Decoder e a, Solver s l) => SatSolver s l () -> e -> IO (Either SatError e) value m p = runSolver $ m >> solveAndCheck >> constructValue p
155
value m p = runSolver $ m >> solveAndCheck >> constructValue p
62
false
true
0
10
33
84
41
43
null
null
leonidas/lambda-frp
src/Lambda/OpenGL.hs
mit
{- nanoDelta :: TimeSpec -> TimeSpec -> Integer nanoDelta (TimeSpec s n) (TimeSpec s' n') = fromIntegral (s' - s) * 1000000000 + fromIntegral (n' - n) -} glInteract :: Coroutine [KeyEvent] viewmodel -> (viewmodel -> IO ()) -> IO () glInteract logic renderFunc = do -- Initialization initializeWindow ini...
1,473
glInteract :: Coroutine [KeyEvent] viewmodel -> (viewmodel -> IO ()) -> IO () glInteract logic renderFunc = do -- Initialization initializeWindow initializeOpenGL keyEvents <- newMVar [] prevTime <- getPOSIXTime >>= newIORef timeAccum <- newIORef 0 coroutine <- newIORef logic viewMode...
1,314
glInteract logic renderFunc = do -- Initialization initializeWindow initializeOpenGL keyEvents <- newMVar [] prevTime <- getPOSIXTime >>= newIORef timeAccum <- newIORef 0 coroutine <- newIORef logic viewModel <- newIORef undefined keyboardMouseCallback $= Just (\k ks mods _ -> ...
1,236
true
true
0
16
488
402
181
221
null
null