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
mikeyhc/harkerbot
src/HarkerServer/Args.hs
bsd-3-clause
defchan = "#bots"
22
defchan = "#bots"
22
defchan = "#bots"
22
false
false
0
4
7
6
3
3
null
null
shlevy/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
isDerivedCt :: Ct -> Bool isDerivedCt = isDerived . cc_ev
57
isDerivedCt :: Ct -> Bool isDerivedCt = isDerived . cc_ev
57
isDerivedCt = isDerived . cc_ev
31
false
true
1
7
9
27
11
16
null
null
rueshyna/gogol
gogol-container/gen/Network/Google/Container/Types/Product.hs
mpl-2.0
-- | The current status of the operation. oStatus :: Lens' Operation (Maybe Text) oStatus = lens _oStatus (\ s a -> s{_oStatus = a})
132
oStatus :: Lens' Operation (Maybe Text) oStatus = lens _oStatus (\ s a -> s{_oStatus = a})
90
oStatus = lens _oStatus (\ s a -> s{_oStatus = a})
50
true
true
2
9
24
55
25
30
null
null
DanielSchuessler/hstri
DotUtil/Lenses.hs
gpl-3.0
subGraphIDL :: forall n. Lens (DotSubGraph n) (Maybe GraphID) subGraphIDL = lens subGraphID (\ x s -> s {subGraphID = x})
121
subGraphIDL :: forall n. Lens (DotSubGraph n) (Maybe GraphID) subGraphIDL = lens subGraphID (\ x s -> s {subGraphID = x})
121
subGraphIDL = lens subGraphID (\ x s -> s {subGraphID = x})
59
false
true
0
9
20
56
30
26
null
null
kmilner/tamarin-prover
src/Main/Mode/Batch.hs
gpl-3.0
-- import Debug.Trace -- | Batch processing mode. batchMode :: TamarinMode batchMode = tamarinMode "batch" "Security protocol analysis and verification." setupFlags run where setupFlags defaultMode = defaultMode { modeArgs = ([], Just $ flagArg (updateArg "inFile") "FILES") ...
1,164
batchMode :: TamarinMode batchMode = tamarinMode "batch" "Security protocol analysis and verification." setupFlags run where setupFlags defaultMode = defaultMode { modeArgs = ([], Just $ flagArg (updateArg "inFile") "FILES") , modeGroupFlags = Group { groupUnnamed = ...
1,103
batchMode = tamarinMode "batch" "Security protocol analysis and verification." setupFlags run where setupFlags defaultMode = defaultMode { modeArgs = ([], Just $ flagArg (updateArg "inFile") "FILES") , modeGroupFlags = Group { groupUnnamed = theoryLoadFlag...
1,078
true
true
1
15
401
220
115
105
null
null
DavidAlphaFox/darcs
src/Darcs/UI/Message/Send.hs
gpl-2.0
promptNoDescriptionChange :: String promptNoDescriptionChange = "File content did not change. Continue anyway?"
111
promptNoDescriptionChange :: String promptNoDescriptionChange = "File content did not change. Continue anyway?"
111
promptNoDescriptionChange = "File content did not change. Continue anyway?"
75
false
true
0
4
11
11
6
5
null
null
juodaspaulius/clafer
src/Language/Clafer/Optimizer/Optimizer.hs
mit
split' :: MonadState GEnv m => IExp -> (IExp -> m IExp) -> m [IExp] split'(IFunExp _ (p:pexp:_)) f = split' (_exp p) (\s -> f $ IFunExp iJoin [p {_exp = s}, pexp])
173
split' :: MonadState GEnv m => IExp -> (IExp -> m IExp) -> m [IExp] split'(IFunExp _ (p:pexp:_)) f = split' (_exp p) (\s -> f $ IFunExp iJoin [p {_exp = s}, pexp])
173
split'(IFunExp _ (p:pexp:_)) f = split' (_exp p) (\s -> f $ IFunExp iJoin [p {_exp = s}, pexp])
105
false
true
0
12
43
110
57
53
null
null
Mortomes/wyah
untyedlambda/dist/build/autogen/Paths_untyedlambda.hs
gpl-3.0
minusFileName :: FilePath -> String -> FilePath minusFileName dir "" = dir
78
minusFileName :: FilePath -> String -> FilePath minusFileName dir "" = dir
78
minusFileName dir "" = dir
30
false
true
0
6
15
24
12
12
null
null
fmapfmapfmap/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
mpl-2.0
-- | [EC2-VPC] One or more network interfaces for the instance. insNetworkInterfaces :: Lens' Instance [InstanceNetworkInterface] insNetworkInterfaces = lens _insNetworkInterfaces (\ s a -> s{_insNetworkInterfaces = a}) . _Default . _Coerce
240
insNetworkInterfaces :: Lens' Instance [InstanceNetworkInterface] insNetworkInterfaces = lens _insNetworkInterfaces (\ s a -> s{_insNetworkInterfaces = a}) . _Default . _Coerce
176
insNetworkInterfaces = lens _insNetworkInterfaces (\ s a -> s{_insNetworkInterfaces = a}) . _Default . _Coerce
110
true
true
0
11
30
51
28
23
null
null
Copilot-Language/sbv-for-copilot
Data/SBV/Examples/Uninterpreted/Shannon.hs
bsd-3-clause
existential :: Ternary -> Binary existential f y z = pos f y z ||| neg f y z
76
existential :: Ternary -> Binary existential f y z = pos f y z ||| neg f y z
76
existential f y z = pos f y z ||| neg f y z
43
false
true
0
6
18
40
19
21
null
null
rrnewton/accelerate
Data/Array/Accelerate/Lifetime.hs
bsd-3-clause
withLifetime :: Lifetime a -> (a -> IO b) -> IO b withLifetime (Lifetime ref _ a) f = f a <* touch ref
102
withLifetime :: Lifetime a -> (a -> IO b) -> IO b withLifetime (Lifetime ref _ a) f = f a <* touch ref
102
withLifetime (Lifetime ref _ a) f = f a <* touch ref
52
false
true
0
10
23
64
29
35
null
null
DanielSchuessler/hstri
FaceLattice.hs
gpl-3.0
test_FaceLattice :: FaceLatticeRenderStyle -> IO ExitCode test_FaceLattice opt = testDot (dotGraph opt)
103
test_FaceLattice :: FaceLatticeRenderStyle -> IO ExitCode test_FaceLattice opt = testDot (dotGraph opt)
103
test_FaceLattice opt = testDot (dotGraph opt)
45
false
true
0
7
11
30
14
16
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
548 = 547
9
548 = 547
9
548 = 547
9
false
false
1
5
2
10
3
7
null
null
geophf/1HaskellADay
exercises/HAD/Y2017/M01/D16/Solution.hs
mit
{-- Question: is hoBool a total function? Or is it partial in that it likes only the lower-order type, and not the higher-order one? geddit? 'partial' and 'likes'? GEDDIT? *groan* Now, with hoBool defined us it, First, and find to redefine any as a First/find definition: --} anyAF :: Traversable f => (a -> Bool) ->...
356
anyAF :: Traversable f => (a -> Bool) -> f a -> Bool anyAF = hoBool <<- find
76
anyAF = hoBool <<- find
23
true
true
0
8
68
41
21
20
null
null
fmapfmapfmap/amazonka
amazonka-dynamodb/gen/Network/AWS/DynamoDB/Types/Product.hs
mpl-2.0
-- | Undocumented member. gsidProvisionedThroughput :: Lens' GlobalSecondaryIndexDescription (Maybe ProvisionedThroughputDescription) gsidProvisionedThroughput = lens _gsidProvisionedThroughput (\ s a -> s{_gsidProvisionedThroughput = a})
238
gsidProvisionedThroughput :: Lens' GlobalSecondaryIndexDescription (Maybe ProvisionedThroughputDescription) gsidProvisionedThroughput = lens _gsidProvisionedThroughput (\ s a -> s{_gsidProvisionedThroughput = a})
212
gsidProvisionedThroughput = lens _gsidProvisionedThroughput (\ s a -> s{_gsidProvisionedThroughput = a})
104
true
true
1
9
20
51
25
26
null
null
ksaveljev/hake-2
src/Game/Monsters/MInsane.hs
bsd-3-clause
insaneMoveStandNormal :: MMoveT insaneMoveStandNormal = MMoveT "insaneMoveStandNormal" frameStand60 frameStand65 insaneFramesStandNormal (Just insaneStand)
155
insaneMoveStandNormal :: MMoveT insaneMoveStandNormal = MMoveT "insaneMoveStandNormal" frameStand60 frameStand65 insaneFramesStandNormal (Just insaneStand)
155
insaneMoveStandNormal = MMoveT "insaneMoveStandNormal" frameStand60 frameStand65 insaneFramesStandNormal (Just insaneStand)
123
false
true
0
7
11
28
14
14
null
null
tolysz/Diag
MyRest/Api.hs
bsd-3-clause
silkApiExample st = apiToApplication (runApi st) api
52
silkApiExample st = apiToApplication (runApi st) api
52
silkApiExample st = apiToApplication (runApi st) api
52
false
false
0
7
6
20
9
11
null
null
literate-unitb/literate-unitb
src/UnitB/Test.hs
mit
train_m0 :: Either [Error] RawMachine train_m0 = do let (st,_,st_decl) = prog_var "st" (array int bool) (t,t_decl) = Exp.var "t" int let li = LI "" 0 0 inv0 <- with_li li (mzforall [t_decl] mztrue $ mzall [(zstore st t mzfalse `mzeq` zstore st t mzfalse)]) ...
1,433
train_m0 :: Either [Error] RawMachine train_m0 = do let (st,_,st_decl) = prog_var "st" (array int bool) (t,t_decl) = Exp.var "t" int let li = LI "" 0 0 inv0 <- with_li li (mzforall [t_decl] mztrue $ mzall [(zstore st t mzfalse `mzeq` zstore st t mzfalse)]) ...
1,433
train_m0 = do let (st,_,st_decl) = prog_var "st" (array int bool) (t,t_decl) = Exp.var "t" int let li = LI "" 0 0 inv0 <- with_li li (mzforall [t_decl] mztrue $ mzall [(zstore st t mzfalse `mzeq` zstore st t mzfalse)]) c0 <- with_li li (st `select` t) ...
1,395
false
true
0
18
574
521
267
254
null
null
AndreasPK/stack
src/Stack/Types/Compiler.hs
bsd-3-clause
isWantedCompiler _ _ _ = False
30
isWantedCompiler _ _ _ = False
30
isWantedCompiler _ _ _ = False
30
false
false
0
5
5
13
6
7
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
action_12 x = happyTcHack x happyFail
37
action_12 x = happyTcHack x happyFail
37
action_12 x = happyTcHack x happyFail
37
false
false
0
5
5
14
6
8
null
null
jtdaugherty/vty
src/Graphics/Vty/Attributes.hs
bsd-3-clause
-- | Set the foreground color of an `Attr'. withForeColor :: Attr -> Color -> Attr withForeColor attr c = attr { attrForeColor = SetTo c }
138
withForeColor :: Attr -> Color -> Attr withForeColor attr c = attr { attrForeColor = SetTo c }
94
withForeColor attr c = attr { attrForeColor = SetTo c }
55
true
true
0
8
26
42
20
22
null
null
fmthoma/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
srcLocDataConName = conName gHC_SRCLOC (fsLit "SrcLoc") srcLocDataConKey
76
srcLocDataConName = conName gHC_SRCLOC (fsLit "SrcLoc") srcLocDataConKey
76
srcLocDataConName = conName gHC_SRCLOC (fsLit "SrcLoc") srcLocDataConKey
76
false
false
1
7
10
23
9
14
null
null
brendanhay/gogol
gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types/Product.hs
mpl-2.0
-- | Creates a value of 'Install' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'iVersionCode' -- -- * 'iInstallState' -- -- * 'iProductId' install :: Install install = Install' {_iVersionCode = Nothing, _iInstallState = No...
349
install :: Install install = Install' {_iVersionCode = Nothing, _iInstallState = Nothing, _iProductId = Nothing}
122
install = Install' {_iVersionCode = Nothing, _iInstallState = Nothing, _iProductId = Nothing}
99
true
true
0
7
66
50
30
20
null
null
triplepointfive/cereal
src/Data/Serialize/Put.hs
bsd-3-clause
-- | Write a Word16 in little endian format putWord16le :: Putter Word16 putWord16le = tell . B.putWord16le
123
putWord16le :: Putter Word16 putWord16le = tell . B.putWord16le
79
putWord16le = tell . B.putWord16le
42
true
true
0
6
33
21
11
10
null
null
hvr/text
Data/Text/Array.hs
bsd-2-clause
new :: forall s. Int -> ST s (MArray s) new n | n < 0 || n .&. highBit /= 0 = array_size_error | otherwise = ST $ \s1# -> case newByteArray# len# s1# of (# s2#, marr# #) -> (# s2#, MArray marr# #if defined(ASSERTS) n #endif #) where !...
405
new :: forall s. Int -> ST s (MArray s) new n | n < 0 || n .&. highBit /= 0 = array_size_error | otherwise = ST $ \s1# -> case newByteArray# len# s1# of (# s2#, marr# #) -> (# s2#, MArray marr# #if defined(ASSERTS) n #endif #) where !...
405
new n | n < 0 || n .&. highBit /= 0 = array_size_error | otherwise = ST $ \s1# -> case newByteArray# len# s1# of (# s2#, marr# #) -> (# s2#, MArray marr# #if defined(ASSERTS) n #endif #) where !(I# len#) = bytesInArray n highB...
365
false
true
2
11
160
147
75
72
null
null
GaloisInc/HaNS
src/Hans/IP4/RoutingTable.hs
bsd-3-clause
ruleMaskLen :: Rule -> Int ruleMaskLen rule = maskBits (routeNetwork (ruleRoute rule))
86
ruleMaskLen :: Rule -> Int ruleMaskLen rule = maskBits (routeNetwork (ruleRoute rule))
86
ruleMaskLen rule = maskBits (routeNetwork (ruleRoute rule))
59
false
true
0
9
11
33
16
17
null
null
rzil/honours
LeavittPathAlgebras/Example13.hs
mit
psi (WLPA.AEdge "a1" 1) = edge "e"
34
psi (WLPA.AEdge "a1" 1) = edge "e"
34
psi (WLPA.AEdge "a1" 1) = edge "e"
34
false
false
0
7
6
23
10
13
null
null
rahulmutt/codec-jvm
src/Codec/JVM/ASM/Code.hs
apache-2.0
if_dcmple = floatInvBranch jdouble OP.dcmpg ifgt
48
if_dcmple = floatInvBranch jdouble OP.dcmpg ifgt
48
if_dcmple = floatInvBranch jdouble OP.dcmpg ifgt
48
false
false
1
6
5
18
7
11
null
null
gcampax/ghc
compiler/utils/Outputable.hs
bsd-3-clause
vcat ds = SDoc $ \sty -> Pretty.vcat [runSDoc d sty | d <- ds]
62
vcat ds = SDoc $ \sty -> Pretty.vcat [runSDoc d sty | d <- ds]
62
vcat ds = SDoc $ \sty -> Pretty.vcat [runSDoc d sty | d <- ds]
62
false
false
3
9
14
43
19
24
null
null
fmapfmapfmap/amazonka
test/src/Test/AWS/TH.hs
mpl-2.0
mkTime :: Text -> Q Exp mkTime x = case fromText x :: Either String ISO8601 of Left e -> error (show e) Right t -> [|view _Time t|]
152
mkTime :: Text -> Q Exp mkTime x = case fromText x :: Either String ISO8601 of Left e -> error (show e) Right t -> [|view _Time t|]
152
mkTime x = case fromText x :: Either String ISO8601 of Left e -> error (show e) Right t -> [|view _Time t|]
128
false
true
0
10
49
71
33
38
null
null
olsner/ghc
testsuite/tests/dph/primespj/Main.hs
bsd-3-clause
main = do let n = 1000 let resultViaNDP = P.toList $ primesVect n let resultViaLists = primesList n print resultViaNDP print resultViaLists print $ resultViaNDP == resultViaLists
252
main = do let n = 1000 let resultViaNDP = P.toList $ primesVect n let resultViaLists = primesList n print resultViaNDP print resultViaLists print $ resultViaNDP == resultViaLists
252
main = do let n = 1000 let resultViaNDP = P.toList $ primesVect n let resultViaLists = primesList n print resultViaNDP print resultViaLists print $ resultViaNDP == resultViaLists
252
false
false
4
11
101
68
30
38
null
null
hesselink/stack
src/Stack/Package.hs
bsd-3-clause
-- | Get all dependencies of the package (buildable targets only). packageDependencies :: PackageDescription -> Map PackageName VersionRange packageDependencies = M.fromListWith intersectVersionRanges . concatMap (map (\dep -> ((depName dep),depRange dep)) . targetBuildDepends) . allBuildInfo'
313
packageDependencies :: PackageDescription -> Map PackageName VersionRange packageDependencies = M.fromListWith intersectVersionRanges . concatMap (map (\dep -> ((depName dep),depRange dep)) . targetBuildDepends) . allBuildInfo'
246
packageDependencies = M.fromListWith intersectVersionRanges . concatMap (map (\dep -> ((depName dep),depRange dep)) . targetBuildDepends) . allBuildInfo'
172
true
true
0
13
52
76
37
39
null
null
micknelso/language-c
src/Language/CFamily/C/Analysis/AstAnalysis.hs
bsd-3-clause
tExpr' c side (CSizeofExpr e ni) = do when (side == LValue) $ typeError ni "sizeof as lvalue" _ <- tExpr c RValue e return size_tType
151
tExpr' c side (CSizeofExpr e ni) = do when (side == LValue) $ typeError ni "sizeof as lvalue" _ <- tExpr c RValue e return size_tType
151
tExpr' c side (CSizeofExpr e ni) = do when (side == LValue) $ typeError ni "sizeof as lvalue" _ <- tExpr c RValue e return size_tType
151
false
false
0
10
43
63
28
35
null
null
alphalambda/codeworld
codeworld-base/src/Internal/Text.hs
apache-2.0
uppercase :: Text -> Text uppercase = T . J.toUpper . unT
57
uppercase :: Text -> Text uppercase = T . J.toUpper . unT
57
uppercase = T . J.toUpper . unT
31
false
true
1
7
11
33
14
19
null
null
brendanhay/gogol
gogol-books/gen/Network/Google/Resource/Books/Familysharing/GetFamilyInfo.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). fgfiUploadType :: Lens' FamilysharingGetFamilyInfo (Maybe Text) fgfiUploadType = lens _fgfiUploadType (\ s a -> s{_fgfiUploadType = a})
214
fgfiUploadType :: Lens' FamilysharingGetFamilyInfo (Maybe Text) fgfiUploadType = lens _fgfiUploadType (\ s a -> s{_fgfiUploadType = a})
143
fgfiUploadType = lens _fgfiUploadType (\ s a -> s{_fgfiUploadType = a})
79
true
true
0
9
34
48
25
23
null
null
nomeata/sat-britney
ParseHints.hs
gpl-2.0
untilFinished :: [String] -> [String] untilFinished = takeWhile (\l -> not ("finished" `isPrefixOf` l))
103
untilFinished :: [String] -> [String] untilFinished = takeWhile (\l -> not ("finished" `isPrefixOf` l))
103
untilFinished = takeWhile (\l -> not ("finished" `isPrefixOf` l))
65
false
true
0
10
13
44
25
19
null
null
pparkkin/eta
compiler/ETA/Types/Type.hs
bsd-3-clause
cmpTypeX _ (LitTy _) (TyVarTy _) = GT
45
cmpTypeX _ (LitTy _) (TyVarTy _) = GT
45
cmpTypeX _ (LitTy _) (TyVarTy _) = GT
45
false
false
1
6
15
28
12
16
null
null
input-output-hk/pos-haskell-prototype
db/src/Pos/DB/Class.hs
mit
gsMaxBlockSize :: MonadGState m => m Byte gsMaxBlockSize = bvdMaxBlockSize <$> gsAdoptedBVData
94
gsMaxBlockSize :: MonadGState m => m Byte gsMaxBlockSize = bvdMaxBlockSize <$> gsAdoptedBVData
94
gsMaxBlockSize = bvdMaxBlockSize <$> gsAdoptedBVData
52
false
true
0
7
11
31
13
18
null
null
ghcjs/ghcjs-base
test/Tests/Properties.hs
mit
j_intercalate c = unsquare $ L.intercalate c `eq` (unpackS . J.intercalate (packS c) . map packS)
139
j_intercalate c = unsquare $ L.intercalate c `eq` (unpackS . J.intercalate (packS c) . map packS)
139
j_intercalate c = unsquare $ L.intercalate c `eq` (unpackS . J.intercalate (packS c) . map packS)
139
false
false
0
11
57
49
24
25
null
null
AndrewRademacher/aeson-casing
src/Data/Aeson/Casing/Internal.hs
mit
applyFirst f (x:xs) = f x: xs
29
applyFirst f (x:xs) = f x: xs
29
applyFirst f (x:xs) = f x: xs
29
false
false
0
7
6
25
12
13
null
null
fmthoma/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
isTyVarExposed :: TcTyVar -> TcType -> Bool isTyVarExposed tv (TyVarTy tv') = tv == tv'
89
isTyVarExposed :: TcTyVar -> TcType -> Bool isTyVarExposed tv (TyVarTy tv') = tv == tv'
89
isTyVarExposed tv (TyVarTy tv') = tv == tv'
45
false
true
0
6
16
39
18
21
null
null
lukexi/ghc
compiler/main/DynFlags.hs
bsd-3-clause
isOneShot :: GhcMode -> Bool isOneShot OneShot = True
53
isOneShot :: GhcMode -> Bool isOneShot OneShot = True
53
isOneShot OneShot = True
24
false
true
0
5
8
18
9
9
null
null
da-x/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
-- Drop the inner contexts when reporting errors, else we get -- Unexpected transform statement -- in a transformed branch of -- transformed branch of -- transformed branch of monad comprehension pprStmtContext (ParStmtCtxt c) | opt_PprStyle_Debug = sep [ptext (sLit "parallel branch of"), ppr...
376
pprStmtContext (ParStmtCtxt c) | opt_PprStyle_Debug = sep [ptext (sLit "parallel branch of"), pprAStmtContext c] | otherwise = pprStmtContext c
154
pprStmtContext (ParStmtCtxt c) | opt_PprStyle_Debug = sep [ptext (sLit "parallel branch of"), pprAStmtContext c] | otherwise = pprStmtContext c
154
true
false
0
10
86
62
30
32
null
null
aufheben/lambda-arduino
packages/hArduino-0.9/System/Hardware/Arduino/Parts/LCD.hs
mit
-- | Access an internally stored symbol, one that is not available via its ASCII equivalent. See -- the Hitachi datasheet for possible values: <http://lcd-linux.sourceforge.net/pdfdocs/hd44780.pdf>, Table 4 on page 17. -- -- For instance, to access the symbol right-arrow: -- -- * Locate it in the above table: Right-a...
898
lcdInternalSymbol :: Word8 -> LCDSymbol lcdInternalSymbol = LCDSymbol
69
lcdInternalSymbol = LCDSymbol
29
true
true
0
7
149
34
21
13
null
null
brendanhay/gogol
gogol-slides/gen/Network/Google/Slides/Types/Product.hs
mpl-2.0
-- | Creates a value of 'CropProperties' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'cpBottomOffSet' -- -- * 'cpTopOffSet' -- -- * 'cpAngle' -- -- * 'cpRightOffSet' -- -- * 'cpLeftOffSet' cropProperties :: CropProperties cropP...
502
cropProperties :: CropProperties cropProperties = CropProperties' { _cpBottomOffSet = Nothing , _cpTopOffSet = Nothing , _cpAngle = Nothing , _cpRightOffSet = Nothing , _cpLeftOffSet = Nothing }
224
cropProperties = CropProperties' { _cpBottomOffSet = Nothing , _cpTopOffSet = Nothing , _cpAngle = Nothing , _cpRightOffSet = Nothing , _cpLeftOffSet = Nothing }
187
true
true
0
6
106
56
40
16
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT13.hs
gpl-3.0
qfac :: Nat -> Nat -> Nat qfac Z acc = acc
42
qfac :: Nat -> Nat -> Nat qfac Z acc = acc
42
qfac Z acc = acc
16
false
true
0
8
11
30
13
17
null
null
brendanhay/gogol
gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs
mpl-2.0
-- | Creates a value of 'SourceOperationResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'sorSplit' -- -- * 'sorGetMetadata' sourceOperationResponse :: SourceOperationResponse sourceOperationResponse = SourceOperationRes...
375
sourceOperationResponse :: SourceOperationResponse sourceOperationResponse = SourceOperationResponse' {_sorSplit = Nothing, _sorGetMetadata = Nothing}
156
sourceOperationResponse = SourceOperationResponse' {_sorSplit = Nothing, _sorGetMetadata = Nothing}
101
true
true
0
6
55
32
22
10
null
null
kikofernandez/kikofernandez.github.io
files/monadic-typechecker/typechecker/src/Final/Typechecker.hs
mit
-- | Add a list of parameters, 'Param', to the environment. addParameters :: [Param 'Checked] -> Env -> Env addParameters params env = foldl addParameter env params where addParameter env (Param name ty) = addVariable name ty env -- | Main entry point of the type checker. This function type checks an AST -- retu...
887
addParameters :: [Param 'Checked] -> Env -> Env addParameters params env = foldl addParameter env params where addParameter env (Param name ty) = addVariable name ty env -- | Main entry point of the type checker. This function type checks an AST -- returning either a list of errors or a program and its warnings....
827
addParameters params env = foldl addParameter env params where addParameter env (Param name ty) = addVariable name ty env -- | Main entry point of the type checker. This function type checks an AST -- returning either a list of errors or a program and its warnings. For instance, -- assuming the following made up...
779
true
true
0
8
193
89
54
35
null
null
aurapm/aura
aura/exec/Aura/Flags.hs
gpl-3.0
-- | Zero or more arguments. manyArgs :: Parser (Set Text) manyArgs = S.fromList <$> many (argument str (metavar "PACKAGES"))
125
manyArgs :: Parser (Set Text) manyArgs = S.fromList <$> many (argument str (metavar "PACKAGES"))
96
manyArgs = S.fromList <$> many (argument str (metavar "PACKAGES"))
66
true
true
2
10
19
50
22
28
null
null
cullina/Extractor
src/BinaryField.hs
bsd-3-clause
polyGCD a b = if 0 == toInt b then a else polyGCD b $ polyRem a b
78
polyGCD a b = if 0 == toInt b then a else polyGCD b $ polyRem a b
78
polyGCD a b = if 0 == toInt b then a else polyGCD b $ polyRem a b
78
false
false
0
7
30
38
18
20
null
null
nushio3/ghc
compiler/iface/IfaceType.hs
bsd-3-clause
ppr_iface_forall_part :: Outputable a => Bool -> [IfaceForAllBndr] -> [a] -> SDoc -> SDoc ppr_iface_forall_part show_foralls_unconditionally tvs ctxt sdoc = sep [ if show_foralls_unconditionally then pprIfaceForAll tvs else pprUserIfaceForAll tvs , pprIfaceContextArr ...
340
ppr_iface_forall_part :: Outputable a => Bool -> [IfaceForAllBndr] -> [a] -> SDoc -> SDoc ppr_iface_forall_part show_foralls_unconditionally tvs ctxt sdoc = sep [ if show_foralls_unconditionally then pprIfaceForAll tvs else pprUserIfaceForAll tvs , pprIfaceContextArr ...
340
ppr_iface_forall_part show_foralls_unconditionally tvs ctxt sdoc = sep [ if show_foralls_unconditionally then pprIfaceForAll tvs else pprUserIfaceForAll tvs , pprIfaceContextArr ctxt , sdoc]
228
false
true
0
9
94
83
41
42
null
null
Denommus/stack
src/main/Main.hs
bsd-3-clause
unpackCmd :: [String] -> GlobalOpts -> IO () unpackCmd names go = withConfigAndLock go $ do menv <- getMinimalEnvOverride Stack.Fetch.unpackPackages menv "." names -- | Update the package index
202
unpackCmd :: [String] -> GlobalOpts -> IO () unpackCmd names go = withConfigAndLock go $ do menv <- getMinimalEnvOverride Stack.Fetch.unpackPackages menv "." names -- | Update the package index
202
unpackCmd names go = withConfigAndLock go $ do menv <- getMinimalEnvOverride Stack.Fetch.unpackPackages menv "." names -- | Update the package index
157
false
true
0
10
37
65
30
35
null
null
ntc2/cryptol
src/Cryptol/ModuleSystem/Monad.hs
bsd-3-clause
getModuleEnv :: Monad m => ModuleT m ModuleEnv getModuleEnv = ModuleT get
73
getModuleEnv :: Monad m => ModuleT m ModuleEnv getModuleEnv = ModuleT get
73
getModuleEnv = ModuleT get
26
false
true
0
6
11
26
12
14
null
null
tolysz/dsp
Polynomial/Basic.hs
gpl-2.0
polyadd (x:xs) (y:ys) = (x+y) : polyadd xs ys
46
polyadd (x:xs) (y:ys) = (x+y) : polyadd xs ys
46
polyadd (x:xs) (y:ys) = (x+y) : polyadd xs ys
46
false
false
0
7
9
41
21
20
null
null
RossMeikleham/GPC
src/GPC/SimplifyAST.hs
bsd-2-clause
simplifyStmt (T.Seq bstmt) = S.Seq $ simplifyBStmt bstmt
56
simplifyStmt (T.Seq bstmt) = S.Seq $ simplifyBStmt bstmt
56
simplifyStmt (T.Seq bstmt) = S.Seq $ simplifyBStmt bstmt
56
false
false
0
8
7
26
12
14
null
null
brendanhay/amqp-bark
bark/src/Bark/Buffer.hs
bsd-3-clause
liftSTM :: forall (m :: * -> *) a. MonadIO m => STM a -> m a liftSTM = liftIO . atomically
90
liftSTM :: forall (m :: * -> *) a. MonadIO m => STM a -> m a liftSTM = liftIO . atomically
90
liftSTM = liftIO . atomically
29
false
true
0
8
21
48
25
23
null
null
joshcough/L5-Haskell
src/L/L2/L2Interp.hs
mit
addEnv :: MonadState (NonEmpty a, t) m => a -> m () addEnv e = do (es, c) <- get; put (cons e es, c)
100
addEnv :: MonadState (NonEmpty a, t) m => a -> m () addEnv e = do (es, c) <- get; put (cons e es, c)
100
addEnv e = do (es, c) <- get; put (cons e es, c)
48
false
true
0
10
24
77
37
40
null
null
JacquesCarette/literate-scientific-software
code/drasil-utils/Utils/Drasil/Phrase.hs
bsd-2-clause
-- | Same as `and_` combinator, except phrase default of second term is plural instead of phrase and_' :: (NamedIdea c, NamedIdea d) => c -> d -> NP and_' t1 t2 = nounPhrase'' (phrase t1 `sAnd` plural t2) (phrase t1 `sAnd` plural t2) (Replace (atStart t1 `sAnd` plural t2)) (Replace (titleize t1 `sAnd` titleize...
326
and_' :: (NamedIdea c, NamedIdea d) => c -> d -> NP and_' t1 t2 = nounPhrase'' (phrase t1 `sAnd` plural t2) (phrase t1 `sAnd` plural t2) (Replace (atStart t1 `sAnd` plural t2)) (Replace (titleize t1 `sAnd` titleize' t2))
229
and_' t1 t2 = nounPhrase'' (phrase t1 `sAnd` plural t2) (phrase t1 `sAnd` plural t2) (Replace (atStart t1 `sAnd` plural t2)) (Replace (titleize t1 `sAnd` titleize' t2))
177
true
true
0
10
64
130
64
66
null
null
alphaHeavy/cassandra-cql
tests/test-list.hs
bsd-3-clause
createListsI :: Query Schema () () createListsI = "create table listsi (id uuid PRIMARY KEY, items list<int>)"
110
createListsI :: Query Schema () () createListsI = "create table listsi (id uuid PRIMARY KEY, items list<int>)"
110
createListsI = "create table listsi (id uuid PRIMARY KEY, items list<int>)"
75
false
true
0
6
16
22
11
11
null
null
tsurai/hackerrank
functional-programming/recursion/fibonacci-numbers.hs
mit
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
43
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
43
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
43
false
false
5
7
10
35
15
20
null
null
redneb/HsOpenSSL-x509-system
OpenSSL/X509/SystemStore/MacOSX.hs
bsd-3-clause
contextLoadSystemCerts :: SSLContext -> IO () contextLoadSystemCerts ctx = do st <- contextGetCAStore ctx iterSystemCertsX509 (addCertToStore st)
154
contextLoadSystemCerts :: SSLContext -> IO () contextLoadSystemCerts ctx = do st <- contextGetCAStore ctx iterSystemCertsX509 (addCertToStore st)
153
contextLoadSystemCerts ctx = do st <- contextGetCAStore ctx iterSystemCertsX509 (addCertToStore st)
107
false
true
0
9
25
45
20
25
null
null
mkeeter/spacewar
Game/Spacewar/State.hs
mit
draw :: State -> [[V2f]] draw (Play ships shots) = (concat $ map drawShip ships) ++ (map drawShot shots)
108
draw :: State -> [[V2f]] draw (Play ships shots) = (concat $ map drawShip ships) ++ (map drawShot shots)
108
draw (Play ships shots) = (concat $ map drawShip ships) ++ (map drawShot shots)
83
false
true
0
8
22
60
30
30
null
null
GaloisInc/saw-script
cryptol-saw-core/css/Main.hs
bsd-3-clause
cssMain css _ | cssMode css == HelpMode = do hPutStr stdout (usageInfo header options)
90
cssMain css _ | cssMode css == HelpMode = do hPutStr stdout (usageInfo header options)
90
cssMain css _ | cssMode css == HelpMode = do hPutStr stdout (usageInfo header options)
90
false
false
0
10
18
42
17
25
null
null
GaloisInc/halvm-ghc
compiler/basicTypes/Literal.hs
bsd-3-clause
literalType (MachLabel _ _ _) = addrPrimTy
42
literalType (MachLabel _ _ _) = addrPrimTy
42
literalType (MachLabel _ _ _) = addrPrimTy
42
false
false
0
6
6
20
9
11
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
beadily = id
12
beadily = id
12
beadily = id
12
false
false
0
4
2
6
3
3
null
null
CoryXie/BarrelfishOS
hake/RuleDefs.hs
mit
-- -- The C compiler for compiling things on the host -- nativeCCompiler :: String nativeCCompiler = "$(CC)"
108
nativeCCompiler :: String nativeCCompiler = "$(CC)"
51
nativeCCompiler = "$(CC)"
25
true
true
0
6
17
21
10
11
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
pprParendExpr :: OutputableBndr id => LHsExpr id -> SDoc pprParendExpr expr | hsExprNeedsParens (unLoc expr) = parens (pprLExpr expr) | otherwise = pprLExpr expr
186
pprParendExpr :: OutputableBndr id => LHsExpr id -> SDoc pprParendExpr expr | hsExprNeedsParens (unLoc expr) = parens (pprLExpr expr) | otherwise = pprLExpr expr
186
pprParendExpr expr | hsExprNeedsParens (unLoc expr) = parens (pprLExpr expr) | otherwise = pprLExpr expr
129
false
true
1
10
48
67
29
38
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/DiskTypes/AggregatedList.hs
mpl-2.0
-- | Project ID for this request. dtalProject :: Lens' DiskTypesAggregatedList Text dtalProject = lens _dtalProject (\ s a -> s{_dtalProject = a})
148
dtalProject :: Lens' DiskTypesAggregatedList Text dtalProject = lens _dtalProject (\ s a -> s{_dtalProject = a})
114
dtalProject = lens _dtalProject (\ s a -> s{_dtalProject = a})
64
true
true
1
9
24
44
22
22
null
null
cliffano/swaggy-jenkins
clients/haskell-http-client/generated/lib/SwaggyJenkins/ModelLens.hs
mit
-- | 'pipelineActivityArtifacts' Lens pipelineActivityArtifactsL :: Lens_' PipelineActivity (Maybe [PipelineActivityartifacts]) pipelineActivityArtifactsL f PipelineActivity{..} = (\pipelineActivityArtifacts -> PipelineActivity { pipelineActivityArtifacts, ..} ) <$> f pipelineActivityArtifacts
294
pipelineActivityArtifactsL :: Lens_' PipelineActivity (Maybe [PipelineActivityartifacts]) pipelineActivityArtifactsL f PipelineActivity{..} = (\pipelineActivityArtifacts -> PipelineActivity { pipelineActivityArtifacts, ..} ) <$> f pipelineActivityArtifacts
256
pipelineActivityArtifactsL f PipelineActivity{..} = (\pipelineActivityArtifacts -> PipelineActivity { pipelineActivityArtifacts, ..} ) <$> f pipelineActivityArtifacts
166
true
true
0
8
23
60
32
28
null
null
tekul/cryptonite
tests/KAT_PubKey/ECDSA.hs
bsd-3-clause
vectorToPrivate :: VectorECDSA -> ECDSA.PrivateKey vectorToPrivate vector = ECDSA.PrivateKey (curve vector) (d vector)
118
vectorToPrivate :: VectorECDSA -> ECDSA.PrivateKey vectorToPrivate vector = ECDSA.PrivateKey (curve vector) (d vector)
118
vectorToPrivate vector = ECDSA.PrivateKey (curve vector) (d vector)
67
false
true
0
7
12
42
20
22
null
null
coreyoconnor/corebot-bliki
src/Yesod/CoreBot/Bliki/DB.hs
bsd-3-clause
history_to_updates :: [ Revision ] -> [ DataUpdate ] history_to_updates (r : rs) = revision_to_updates r ++ history_to_updates rs
129
history_to_updates :: [ Revision ] -> [ DataUpdate ] history_to_updates (r : rs) = revision_to_updates r ++ history_to_updates rs
129
history_to_updates (r : rs) = revision_to_updates r ++ history_to_updates rs
76
false
true
0
7
18
41
21
20
null
null
GaloisInc/pads-haskell
Examples/First.hs
bsd-3-clause
result_opt_test_j = opt_test_parseS input_opt_test_j
52
result_opt_test_j = opt_test_parseS input_opt_test_j
52
result_opt_test_j = opt_test_parseS input_opt_test_j
52
false
false
0
5
3
9
4
5
null
null
juhp/stack
src/Options/Applicative/Complicated.hs
bsd-3-clause
-- | Generate a complicated options parser. complicatedParser :: Monoid a => String -- ^ metavar for the sub-command -> Parser a -- ^ common settings -> ExceptT b (Writer (Mod CommandFields (b,a))) () -- ^ commands (use 'addCommand') -> Parser (a,(b,a)) complicatedParser commandMetavar commonParser comm...
604
complicatedParser :: Monoid a => String -- ^ metavar for the sub-command -> Parser a -- ^ common settings -> ExceptT b (Writer (Mod CommandFields (b,a))) () -- ^ commands (use 'addCommand') -> Parser (a,(b,a)) complicatedParser commandMetavar commonParser commandParser = (,) <$> commonParser <*> ...
560
complicatedParser commandMetavar commonParser commandParser = (,) <$> commonParser <*> case runWriter (runExceptT commandParser) of (Right (),d) -> hsubparser' commandMetavar d (Left b,_) -> pure (b,mempty) -- | Subparser with @--help@ argument. Borrowed with slight modification -- from Options.Appl...
334
true
true
0
15
115
164
86
78
null
null
Sobolee/Gomoku
src/Board.hs
bsd-3-clause
neighborsOfCoordinates:: Coordinates->Board->[Coordinates] neighborsOfCoordinates (Coordinates x y) (Board board) = [a | a<-allNeighbors (Coordinates x y), notMember a board] where allNeighbors (Coordinates x y) = [Coordinates (x+a) (y+b) | a<-[-1..1], b<-[-1..1], not(a==0 && b==0), (x+a)>0, (y+b)>0, (x+a)<...
359
neighborsOfCoordinates:: Coordinates->Board->[Coordinates] neighborsOfCoordinates (Coordinates x y) (Board board) = [a | a<-allNeighbors (Coordinates x y), notMember a board] where allNeighbors (Coordinates x y) = [Coordinates (x+a) (y+b) | a<-[-1..1], b<-[-1..1], not(a==0 && b==0), (x+a)>0, (y+b)>0, (x+a)<...
359
neighborsOfCoordinates (Coordinates x y) (Board board) = [a | a<-allNeighbors (Coordinates x y), notMember a board] where allNeighbors (Coordinates x y) = [Coordinates (x+a) (y+b) | a<-[-1..1], b<-[-1..1], not(a==0 && b==0), (x+a)>0, (y+b)>0, (x+a)<(sizeOfBoard+1), (y+b)<(sizeOfBoard+1)]
300
false
true
0
12
48
247
125
122
null
null
codeq/language-py
src/Language/Py/PrettyAST.hs
bsd-3-clause
optionalKeywordSuite :: String -> [Statement a] -> Doc optionalKeywordSuite _ [] = empty
88
optionalKeywordSuite :: String -> [Statement a] -> Doc optionalKeywordSuite _ [] = empty
88
optionalKeywordSuite _ [] = empty
33
false
true
0
8
12
32
16
16
null
null
a143753/AOJ
1137.hs
apache-2.0
ans i = dec2str $ sum $ map str2dec i
39
ans i = dec2str $ sum $ map str2dec i
39
ans i = dec2str $ sum $ map str2dec i
39
false
false
0
6
11
22
10
12
null
null
yihuang/cabal-install
Distribution/Client/PackageIndex.hs
bsd-3-clause
-- | Does a case-insensitive substring search by package name. -- -- That is, all packages that contain the given string in their name. -- searchByNameSubstring :: Package pkg => PackageIndex pkg -> String -> [(PackageName, [pkg])] searchByNameSubstring (PackageIndex m) searchterm = [ pkgs ...
637
searchByNameSubstring :: Package pkg => PackageIndex pkg -> String -> [(PackageName, [pkg])] searchByNameSubstring (PackageIndex m) searchterm = [ pkgs | pkgs@(PackageName name, _) <- Map.toList m , lsearchterm `isInfixOf` lowercase name ] where lsearchterm = lowercase searchterm...
498
searchByNameSubstring (PackageIndex m) searchterm = [ pkgs | pkgs@(PackageName name, _) <- Map.toList m , lsearchterm `isInfixOf` lowercase name ] where lsearchterm = lowercase searchterm -- -- * Special queries -- -- | All packages that have dependencies that are not in the index. -- -- Returns suc...
383
true
true
0
10
135
115
65
50
null
null
adinapoli/api-tools
src/Data/API/Tools/JSON.hs
bsd-3-clause
gen_sn_fm :: Tool (APINode, SpecNewtype) gen_sn_fm = mkTool $ \ ts (an, sn) -> optionalInstanceD ts ''FromJSONWithErrs [nodeRepT an] [simpleD 'parseJSONWithErrs (bdy an sn)] where bdy an sn = [e| $(wth sn) $(typeNameE (anName an)) (pure . $(nodeConE an)) |] wth sn ...
1,182
gen_sn_fm :: Tool (APINode, SpecNewtype) gen_sn_fm = mkTool $ \ ts (an, sn) -> optionalInstanceD ts ''FromJSONWithErrs [nodeRepT an] [simpleD 'parseJSONWithErrs (bdy an sn)] where bdy an sn = [e| $(wth sn) $(typeNameE (anName an)) (pure . $(nodeConE an)) |] wth sn ...
1,182
gen_sn_fm = mkTool $ \ ts (an, sn) -> optionalInstanceD ts ''FromJSONWithErrs [nodeRepT an] [simpleD 'parseJSONWithErrs (bdy an sn)] where bdy an sn = [e| $(wth sn) $(typeNameE (anName an)) (pure . $(nodeConE an)) |] wth sn = case (snType sn, snFilter sn) ...
1,141
false
true
0
11
541
268
161
107
null
null
palas/detparaminf
src/DetParamInf/TKPMap.hs
bsd-2-clause
mFindWithDefault d k m = fromMaybe d (M.lookup k m)
51
mFindWithDefault d k m = fromMaybe d (M.lookup k m)
51
mFindWithDefault d k m = fromMaybe d (M.lookup k m)
51
false
false
0
8
9
28
13
15
null
null
GaloisInc/saw-script
saw-core-coq/src/Verifier/SAW/Translation/Coq/SpecialTreatment.hs
bsd-3-clause
-- Use `rename` for identifiers whose definition can be translated, but has to -- be renamed. This is useful for certain definitions whose name on the -- SAWCore/Cryptol side clashes with names on the Coq side. For instance, `at` -- is a reserved Coq keyword, but is used as a function name in SAWCore Prelude. -- Also...
548
rename :: String -> IdentSpecialTreatment rename ident = IdentSpecialTreatment { atDefSite = DefRename ident , atUseSite = UseRename Nothing ident False }
160
rename ident = IdentSpecialTreatment { atDefSite = DefRename ident , atUseSite = UseRename Nothing ident False }
118
true
true
0
8
95
56
29
27
null
null
sanjoy/echoes
src/Codegen/X86.hs
gpl-3.0
lirNodeToMachineInst' _ _ (StoreWordLN symAddr (VarR reg)) = return [ MovMI_RO reg (lowerSymAddress symAddr)]
111
lirNodeToMachineInst' _ _ (StoreWordLN symAddr (VarR reg)) = return [ MovMI_RO reg (lowerSymAddress symAddr)]
111
lirNodeToMachineInst' _ _ (StoreWordLN symAddr (VarR reg)) = return [ MovMI_RO reg (lowerSymAddress symAddr)]
111
false
false
0
9
15
44
21
23
null
null
pparkkin/eta
compiler/ETA/Core/CoreSyn.hs
bsd-3-clause
tickishIsCode _tickish = True
33
tickishIsCode _tickish = True
33
tickishIsCode _tickish = True
33
false
false
0
5
7
9
4
5
null
null
jml/graphql-api
src/GraphQL/Internal/Syntax/Encoder.hs
bsd-3-clause
arguments :: [AST.Argument] -> Text arguments = parensCommas argument
69
arguments :: [AST.Argument] -> Text arguments = parensCommas argument
69
arguments = parensCommas argument
33
false
true
0
7
8
23
12
11
null
null
kolmodin/spdy
tests/QC.hs
bsd-3-clause
genPayload = do len <- choose (0,100) str <- sequence (replicate len $ choose (0,255)) return (S.pack str)
112
genPayload = do len <- choose (0,100) str <- sequence (replicate len $ choose (0,255)) return (S.pack str)
112
genPayload = do len <- choose (0,100) str <- sequence (replicate len $ choose (0,255)) return (S.pack str)
112
false
false
0
12
23
65
31
34
null
null
UCSD-PL/RefScript
src/Language/Rsc/Typecheck/Checker.hs
bsd-3-clause
tcStaticClassElt _ _ c = error (show $ pp "tcStaticClassElt - not a static element: " $+$ pp c)
95
tcStaticClassElt _ _ c = error (show $ pp "tcStaticClassElt - not a static element: " $+$ pp c)
95
tcStaticClassElt _ _ c = error (show $ pp "tcStaticClassElt - not a static element: " $+$ pp c)
95
false
false
1
9
18
31
14
17
null
null
phischu/fragnix
tests/packages/scotty/Data.IntMap.Strict.hs
bsd-3-clause
{-------------------------------------------------------------------- Mapping --------------------------------------------------------------------} -- | /O(n)/. Map a function over all values in the map. -- -- > map (++ "x") (fromList [(5,"a"), (3,"b")]) == fromList [(3, "bx"), (5, "ax")] map :: (a -> b) -> IntMap a...
461
map :: (a -> b) -> IntMap a -> IntMap b map f = go where go (Bin p m l r) = Bin p m (go l) (go r) go (Tip k x) = Tip k $! f x go Nil = Nil
168
map f = go where go (Bin p m l r) = Bin p m (go l) (go r) go (Tip k x) = Tip k $! f x go Nil = Nil
128
true
true
0
8
106
124
59
65
null
null
romanofski/codesnippets
courseraAlgorithms2/graphs/src/DFS.hs
unlicense
-- | helper to find one connected component -- >>> let g = mkGraph addUndirectedEdge [(0,1),(7,8)] HM.empty -- >>> oneComponent 0 [0] g HM.empty -- fromList [(0,0),(1,0)] -- oneComponent :: Int -> [Vertex] -> Graph -> HM.HashMap Vertex Int -> HM.HashMap Vertex Int oneComponent _ [] _ m = m
290
oneComponent :: Int -> [Vertex] -> Graph -> HM.HashMap Vertex Int -> HM.HashMap Vertex Int oneComponent _ [] _ m = m
116
oneComponent _ [] _ m = m
25
true
true
0
10
49
60
32
28
null
null
NICTA/sk-config
src/CapDLObjects.hs
bsd-2-clause
isPageCap _ = False
19
isPageCap _ = False
19
isPageCap _ = False
19
false
false
0
5
3
9
4
5
null
null
dpohanlon/Huffman
huffman.hs
lgpl-3.0
updateQ :: [(Double, String)] -> MinPQueue Double String -> MinPQueue Double String updateQ l pq = Q.insert (fst tuple) (snd tuple) pq where catTup (v1, s1) (v2, s2) = (v1 + v2, s1 ++ s2) tuple = foldl1 catTup l -- foldl?
236
updateQ :: [(Double, String)] -> MinPQueue Double String -> MinPQueue Double String updateQ l pq = Q.insert (fst tuple) (snd tuple) pq where catTup (v1, s1) (v2, s2) = (v1 + v2, s1 ++ s2) tuple = foldl1 catTup l -- foldl?
236
updateQ l pq = Q.insert (fst tuple) (snd tuple) pq where catTup (v1, s1) (v2, s2) = (v1 + v2, s1 ++ s2) tuple = foldl1 catTup l -- foldl?
152
false
true
1
7
56
118
61
57
null
null
plow-technologies/valentine
test/Valentine/ParserSpec.hs
mit
makeTest :: String -> IO Bool -> Test makeTest str ioTest = (str, ioTest)
73
makeTest :: String -> IO Bool -> Test makeTest str ioTest = (str, ioTest)
73
makeTest str ioTest = (str, ioTest)
35
false
true
0
7
13
33
17
16
null
null
Hodapp87/ivory
ivory-eval/src/Ivory/Eval.hs
bsd-3-clause
numUnOp op (Float x) = Float (op x)
37
numUnOp op (Float x) = Float (op x)
37
numUnOp op (Float x) = Float (op x)
37
false
false
0
7
9
26
12
14
null
null
nushio3/ghc
compiler/main/DynFlags.hs
bsd-3-clause
setTmpDir :: FilePath -> DynFlags -> DynFlags setTmpDir dir = alterSettings (\s -> s { sTmpDir = normalise dir })
113
setTmpDir :: FilePath -> DynFlags -> DynFlags setTmpDir dir = alterSettings (\s -> s { sTmpDir = normalise dir })
113
setTmpDir dir = alterSettings (\s -> s { sTmpDir = normalise dir })
67
false
true
0
10
19
49
24
25
null
null
flipstone/orville
orville-postgresql/src/Database/Orville/PostgreSQL/Internal/Expr/NameExpr.hs
mit
unescapedName (NameForm (Just table) name) = table <> "." <> name
65
unescapedName (NameForm (Just table) name) = table <> "." <> name
65
unescapedName (NameForm (Just table) name) = table <> "." <> name
65
false
false
0
8
10
32
15
17
null
null
diku-dk/futhark
src/Language/Futhark/Interpreter.hs
isc
eval env (QualParens (qv, _) e loc) = do m <- evalModuleVar env qv case m of ModuleFun {} -> error $ "Local open of module function at " ++ locStr loc Module m' -> eval (m' <> env) e
194
eval env (QualParens (qv, _) e loc) = do m <- evalModuleVar env qv case m of ModuleFun {} -> error $ "Local open of module function at " ++ locStr loc Module m' -> eval (m' <> env) e
194
eval env (QualParens (qv, _) e loc) = do m <- evalModuleVar env qv case m of ModuleFun {} -> error $ "Local open of module function at " ++ locStr loc Module m' -> eval (m' <> env) e
194
false
false
0
12
51
88
42
46
null
null
andrewthad/yesod-bootstrap
src/Yesod/Bootstrap.hs
mit
a_ :: [(Text,Text)] -> WidgetT site IO () -> WidgetT site IO () a_ attrs inner = [whamlet|$newline never <a *{mkStrAttrs attrs}>^{inner}|]
138
a_ :: [(Text,Text)] -> WidgetT site IO () -> WidgetT site IO () a_ attrs inner = [whamlet|$newline never <a *{mkStrAttrs attrs}>^{inner}|]
138
a_ attrs inner = [whamlet|$newline never <a *{mkStrAttrs attrs}>^{inner}|]
74
false
true
0
9
21
60
31
29
null
null
hephaestus-pl/hephaestus
willian/hephaestus-integrated/feature-modeling/src/FeatureModel/Parsers/FMGrammar/PrintFMGrammar.hs
mit
mkEsc :: Char -> Char -> ShowS mkEsc q s = case s of _ | s == q -> showChar '\\' . showChar s '\\'-> showString "\\\\" '\n' -> showString "\\n" '\t' -> showString "\\t" _ -> showChar s
194
mkEsc :: Char -> Char -> ShowS mkEsc q s = case s of _ | s == q -> showChar '\\' . showChar s '\\'-> showString "\\\\" '\n' -> showString "\\n" '\t' -> showString "\\t" _ -> showChar s
194
mkEsc q s = case s of _ | s == q -> showChar '\\' . showChar s '\\'-> showString "\\\\" '\n' -> showString "\\n" '\t' -> showString "\\t" _ -> showChar s
163
false
true
0
11
49
94
42
52
null
null
lspitzner/brittany
data/Test445.hs
agpl-3.0
func = if | cond1 -> loooooooooooooooooooooooooooooong expr1 | cond2 -> loooooooooooooooooooooooooooooong expr2
115
func = if | cond1 -> loooooooooooooooooooooooooooooong expr1 | cond2 -> loooooooooooooooooooooooooooooong expr2
115
func = if | cond1 -> loooooooooooooooooooooooooooooong expr1 | cond2 -> loooooooooooooooooooooooooooooong expr2
115
false
false
2
8
16
30
13
17
null
null
Kermit95/Playground
lang/haskell/haskell_tut4.hs
apache-2.0
doubleSmallNumber x = if x > 100 then x else x*2
54
doubleSmallNumber x = if x > 100 then x else x*2
54
doubleSmallNumber x = if x > 100 then x else x*2
54
false
false
0
6
16
25
13
12
null
null
mettekou/ghc
compiler/cmm/CmmUtils.hs
bsd-3-clause
slotForeignHint WordSlot = NoHint
38
slotForeignHint WordSlot = NoHint
38
slotForeignHint WordSlot = NoHint
38
false
false
0
4
8
10
4
6
null
null
sgillespie/ghc
compiler/basicTypes/Var.hs
bsd-3-clause
idDetails :: Id -> IdDetails idDetails (Id { id_details = details }) = details
78
idDetails :: Id -> IdDetails idDetails (Id { id_details = details }) = details
78
idDetails (Id { id_details = details }) = details
49
false
true
3
7
13
37
17
20
null
null