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
nkpart/score-writer
src/Score/Parser.hs
bsd-3-clause
modsAtPosition :: MonadState ParseState m => Int64 -> m (Endo Beamed) modsAtPosition c = do x <- use parseStateNoteMods pure $ lookupMods x c
163
modsAtPosition :: MonadState ParseState m => Int64 -> m (Endo Beamed) modsAtPosition c = do x <- use parseStateNoteMods pure $ lookupMods x c
163
modsAtPosition c = do x <- use parseStateNoteMods pure $ lookupMods x c
78
false
true
0
9
45
58
26
32
null
null
jean-edouard/manager
xenmgr/Vm/Queries.hs
gpl-2.0
getVmImagePath :: Uuid -> Rpc FilePath getVmImagePath uuid = readConfigPropertyDef uuid vmImagePath ""
102
getVmImagePath :: Uuid -> Rpc FilePath getVmImagePath uuid = readConfigPropertyDef uuid vmImagePath ""
102
getVmImagePath uuid = readConfigPropertyDef uuid vmImagePath ""
63
false
true
0
6
12
28
13
15
null
null
phischu/fragnix
tests/packages/scotty/System.FilePath.Posix.hs
bsd-3-clause
-- | The character that is used to separate the entries in the $PATH environment variable. -- -- > Windows: searchPathSeparator == ';' -- > Posix: searchPathSeparator == ':' searchPathSeparator :: Char searchPathSeparator = if isWindows then ';' else ':'
256
searchPathSeparator :: Char searchPathSeparator = if isWindows then ';' else ':'
80
searchPathSeparator = if isWindows then ';' else ':'
52
true
true
0
5
41
23
15
8
null
null
f-me/snap-core
test/suite/Snap/Util/FileServe/Tests.hs
bsd-3-clause
testFooHtml :: Test testFooHtml = testCase "fileServe/foo.html" $ do go fs "foo.html" >>= checkProps "fileServe/foo.html/default" go fs "foo.html?bar=bar" >>= checkProps "fileServe/foo.html/query" where checkProps name r = do b <- getBody r assertEqual (name ++ "/contents") "FOO\n" b ...
840
testFooHtml :: Test testFooHtml = testCase "fileServe/foo.html" $ do go fs "foo.html" >>= checkProps "fileServe/foo.html/default" go fs "foo.html?bar=bar" >>= checkProps "fileServe/foo.html/query" where checkProps name r = do b <- getBody r assertEqual (name ++ "/contents") "FOO\n" b ...
840
testFooHtml = testCase "fileServe/foo.html" $ do go fs "foo.html" >>= checkProps "fileServe/foo.html/default" go fs "foo.html?bar=bar" >>= checkProps "fileServe/foo.html/query" where checkProps name r = do b <- getBody r assertEqual (name ++ "/contents") "FOO\n" b assertEqual (na...
820
false
true
0
10
242
207
97
110
null
null
carymrobbins/meta-open
src/meta-open.hs
bsd-3-clause
defaultCommand :: Command defaultCommand = "open"
49
defaultCommand :: Command defaultCommand = "open"
49
defaultCommand = "open"
23
false
true
0
4
5
11
6
5
null
null
denibertovic/haskell
kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs
bsd-3-clause
-- | 'v1beta2DeploymentSpecPaused' Lens v1beta2DeploymentSpecPausedL :: Lens_' V1beta2DeploymentSpec (Maybe Bool) v1beta2DeploymentSpecPausedL f V1beta2DeploymentSpec{..} = (\v1beta2DeploymentSpecPaused -> V1beta2DeploymentSpec { v1beta2DeploymentSpecPaused, ..} ) <$> f v1beta2DeploymentSpecPaused
298
v1beta2DeploymentSpecPausedL :: Lens_' V1beta2DeploymentSpec (Maybe Bool) v1beta2DeploymentSpecPausedL f V1beta2DeploymentSpec{..} = (\v1beta2DeploymentSpecPaused -> V1beta2DeploymentSpec { v1beta2DeploymentSpecPaused, ..} ) <$> f v1beta2DeploymentSpecPaused
258
v1beta2DeploymentSpecPausedL f V1beta2DeploymentSpec{..} = (\v1beta2DeploymentSpecPaused -> V1beta2DeploymentSpec { v1beta2DeploymentSpecPaused, ..} ) <$> f v1beta2DeploymentSpecPaused
184
true
true
0
8
23
57
30
27
null
null
RobinKrom/fasths
src/Codec/Fast/Encoder.hs
bsd-3-clause
nulL :: FBuilder nulL = lift $ return $ BU.singleton 0x80
58
nulL :: FBuilder nulL = lift $ return $ BU.singleton 0x80
57
nulL = lift $ return $ BU.singleton 0x80
40
false
true
4
6
11
33
13
20
null
null
corajr/cataskell
src/Cataskell/Game.hs
bsd-3-clause
playersExist' :: [PlayerIndex] -> Game -> Bool playersExist' pIs = playersExist'' (Set.fromList pIs)
100
playersExist' :: [PlayerIndex] -> Game -> Bool playersExist' pIs = playersExist'' (Set.fromList pIs)
100
playersExist' pIs = playersExist'' (Set.fromList pIs)
53
false
true
0
8
12
36
18
18
null
null
fffej/haskellprojects
freebase/Freebase.hs
bsd-2-clause
mqlReadUri :: String mqlReadUri = "http://api.freebase.com/api/service/mqlread"
79
mqlReadUri :: String mqlReadUri = "http://api.freebase.com/api/service/mqlread"
79
mqlReadUri = "http://api.freebase.com/api/service/mqlread"
58
false
true
0
4
5
11
6
5
null
null
OS2World/DEV-UTIL-HUGS
oldlib/SizedSeq.hs
bsd-3-clause
rtail (N 0 xs) = empty
22
rtail (N 0 xs) = empty
22
rtail (N 0 xs) = empty
22
false
false
0
6
5
18
8
10
null
null
Blaisorblade/stack
src/main/Main.hs
bsd-3-clause
interpreterHandler :: Monoid t => [String] -> ParserFailure ParserHelp -> IO (GlobalOptsMonoid, (GlobalOpts -> IO (), t)) interpreterHandler args f = do -- args can include top-level config such as --extra-lib-dirs=... (set by -- nix-shell) - we need to find the first argument which is a file, everything ...
2,052
interpreterHandler :: Monoid t => [String] -> ParserFailure ParserHelp -> IO (GlobalOptsMonoid, (GlobalOpts -> IO (), t)) interpreterHandler args f = do -- args can include top-level config such as --extra-lib-dirs=... (set by -- nix-shell) - we need to find the first argument which is a file, everything ...
2,052
interpreterHandler args f = do -- args can include top-level config such as --extra-lib-dirs=... (set by -- nix-shell) - we need to find the first argument which is a file, everything -- afterwards is an argument to the script, everything before is an argument -- to Stack (stackArgs, fileArgs) <- spanM (fmap ...
1,922
false
true
7
17
525
519
266
253
null
null
olorin/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
mpl-2.0
-- | One or more block device mapping entries. rslsBlockDeviceMappings :: Lens' RequestSpotLaunchSpecification [BlockDeviceMapping] rslsBlockDeviceMappings = lens _rslsBlockDeviceMappings (\ s a -> s{_rslsBlockDeviceMappings = a}) . _Default . _Coerce
251
rslsBlockDeviceMappings :: Lens' RequestSpotLaunchSpecification [BlockDeviceMapping] rslsBlockDeviceMappings = lens _rslsBlockDeviceMappings (\ s a -> s{_rslsBlockDeviceMappings = a}) . _Default . _Coerce
204
rslsBlockDeviceMappings = lens _rslsBlockDeviceMappings (\ s a -> s{_rslsBlockDeviceMappings = a}) . _Default . _Coerce
119
true
true
0
11
28
51
28
23
null
null
andreasfrom/bule
Main.hs
mit
run (ETuple a b) r = (run a r, run b r)
40
run (ETuple a b) r = (run a r, run b r)
40
run (ETuple a b) r = (run a r, run b r)
40
false
false
1
7
12
38
17
21
null
null
danfran/feed
src/Text/RSS/Export.hs
bsd-3-clause
--- mb :: (a -> b) -> Maybe a -> [b] mb _ Nothing = []
54
mb :: (a -> b) -> Maybe a -> [b] mb _ Nothing = []
50
mb _ Nothing = []
17
true
true
0
7
15
40
21
19
null
null
polux/snippets
Merge.hs
apache-2.0
success x s = Just (x, s)
25
success x s = Just (x, s)
25
success x s = Just (x, s)
25
false
false
0
6
6
20
10
10
null
null
akegalj/snowdrift
Handler/ProjectBlog.hs
agpl-3.0
getReplyBlogPostCommentR :: Text -> Text -> CommentId -> Handler Html getReplyBlogPostCommentR project_handle post_name parent_id = do (widget, _) <- makeBlogPostCommentActionWidget makeReplyCommentWidget project_handle post_name parent_id def getMaxDepth defaultLayout $ projectBlogDiscussionPage project_handl...
338
getReplyBlogPostCommentR :: Text -> Text -> CommentId -> Handler Html getReplyBlogPostCommentR project_handle post_name parent_id = do (widget, _) <- makeBlogPostCommentActionWidget makeReplyCommentWidget project_handle post_name parent_id def getMaxDepth defaultLayout $ projectBlogDiscussionPage project_handl...
338
getReplyBlogPostCommentR project_handle post_name parent_id = do (widget, _) <- makeBlogPostCommentActionWidget makeReplyCommentWidget project_handle post_name parent_id def getMaxDepth defaultLayout $ projectBlogDiscussionPage project_handle post_name widget
268
false
true
0
8
40
73
35
38
null
null
rahulmutt/ghcvm
compiler/Eta/CodeGen/Prim.hs
bsd-3-clause
emitPrimOp op args | Just execute <- simpleOp op = return [execute args]
76
emitPrimOp op args | Just execute <- simpleOp op = return [execute args]
76
emitPrimOp op args | Just execute <- simpleOp op = return [execute args]
76
false
false
0
9
16
36
15
21
null
null
aviaviavi/legion
src/Lib.hs
mit
-- abstracted hash function that takes a string -- to hash and returns a hex string hashString :: String -> String hashString = maybe (error "Something went wrong generating a hash") show . sha256
198
hashString :: String -> String hashString = maybe (error "Something went wrong generating a hash") show . sha256
114
hashString = maybe (error "Something went wrong generating a hash") show . sha256
83
true
true
0
8
35
32
17
15
null
null
tjunier/mlgsc
test/TestPepModel.hs
mit
test_59 = "T@2(aln4)" ~: (round (scale_factor * (logBase 10 (5/9)))) ~?= (pepScoreOf aln4Mod 'T' 2)
100
test_59 = "T@2(aln4)" ~: (round (scale_factor * (logBase 10 (5/9)))) ~?= (pepScoreOf aln4Mod 'T' 2)
100
test_59 = "T@2(aln4)" ~: (round (scale_factor * (logBase 10 (5/9)))) ~?= (pepScoreOf aln4Mod 'T' 2)
100
false
false
0
14
15
52
27
25
null
null
input-output-hk/pos-haskell-prototype
explorer/src/Pos/Explorer/Web/Transform.hs
mit
explorerServeWebReal :: HasExplorerConfiguration => Genesis.Config -> Diffusion ExplorerProd -> Word16 -> ExplorerProd () explorerServeWebReal genesisConfig diffusion port = do rctx <- ask let handlers = explorerHandlers genesisConfig diffusion server = hoistServer expl...
467
explorerServeWebReal :: HasExplorerConfiguration => Genesis.Config -> Diffusion ExplorerProd -> Word16 -> ExplorerProd () explorerServeWebReal genesisConfig diffusion port = do rctx <- ask let handlers = explorerHandlers genesisConfig diffusion server = hoistServer expl...
467
explorerServeWebReal genesisConfig diffusion port = do rctx <- ask let handlers = explorerHandlers genesisConfig diffusion server = hoistServer explorerApi (convertHandler genesisConfig rctx) handlers app = explorerApp (pure server) explorerServeImpl app...
325
false
true
0
13
129
113
51
62
null
null
zcwj/emacs
lisps/mew/bin/hs/smew.hs
gpl-3.0
parseArgs [mid,db,dir] = Just (mid, db, dir)
44
parseArgs [mid,db,dir] = Just (mid, db, dir)
44
parseArgs [mid,db,dir] = Just (mid, db, dir)
44
false
false
0
6
6
30
17
13
null
null
rdnetto/persistent
persistent-sqlite/Database/Sqlite.hs
mit
decodeError 17 = ErrorSchema
28
decodeError 17 = ErrorSchema
28
decodeError 17 = ErrorSchema
28
false
false
1
5
3
13
4
9
null
null
paulrzcz/takusen-oracle
Database/Oracle/Enumerator.hs
bsd-3-clause
tStmt :: Session -> IO StmtHandle getStmt session = inSession session (\ env err _ -> do stmt <- OCI.handleAlloc oci_HTYPE_STMT (castPtr env) return (castPtr stmt) ) nullAction
199
getStmt :: Session -> IO StmtHandle getStmt session = inSession session (\ env err _ -> do stmt <- OCI.handleAlloc oci_HTYPE_STMT (castPtr env) return (castPtr stmt) ) nullAction
198
getStmt session = inSession session (\ env err _ -> do stmt <- OCI.handleAlloc oci_HTYPE_STMT (castPtr env) return (castPtr stmt) ) nullAction
162
false
true
0
12
50
78
35
43
null
null
pheaver/BitVector
Data/BitVector/BitVector2.hs
bsd-3-clause
rotateL :: BitVector -> Int -> BitVector rotateL (BV w a b) i0 = BV w (maskWidth w a') (maskWidth w b') where i = i0 `mod` w a' = (a `Bits.shiftR` (w-i)) .|. (a `Bits.shiftL` i) b' = (b `Bits.shiftR` (w-i)) .|. (b `Bits.shiftL` i)
247
rotateL :: BitVector -> Int -> BitVector rotateL (BV w a b) i0 = BV w (maskWidth w a') (maskWidth w b') where i = i0 `mod` w a' = (a `Bits.shiftR` (w-i)) .|. (a `Bits.shiftL` i) b' = (b `Bits.shiftR` (w-i)) .|. (b `Bits.shiftL` i)
247
rotateL (BV w a b) i0 = BV w (maskWidth w a') (maskWidth w b') where i = i0 `mod` w a' = (a `Bits.shiftR` (w-i)) .|. (a `Bits.shiftL` i) b' = (b `Bits.shiftR` (w-i)) .|. (b `Bits.shiftL` i)
206
false
true
2
12
62
151
82
69
null
null
cwbriones/mal-hs
src/Main.hs
mit
evalList [Symbol "quasiquote", val] = quasiquote val
52
evalList [Symbol "quasiquote", val] = quasiquote val
52
evalList [Symbol "quasiquote", val] = quasiquote val
52
false
false
0
7
6
21
10
11
null
null
tdox/app-arch-sandbox
system.hs
mit
-------------------------------------------------------------------------------- main :: IO () main = do man <- newManager def (keyBS, _) <- CS.randomKey writeKeyToDB keyBS warpDebug systemPort $ System man keyBS --------------------------------------------------------------------------------...
9,169
main :: IO () main = do man <- newManager def (keyBS, _) <- CS.randomKey writeKeyToDB keyBS warpDebug systemPort $ System man keyBS -------------------------------------------------------------------------------- {- NOTE: could not get this to compile. Decided to switch to cookie method getSes...
9,082
main = do man <- newManager def (keyBS, _) <- CS.randomKey writeKeyToDB keyBS warpDebug systemPort $ System man keyBS -------------------------------------------------------------------------------- {- NOTE: could not get this to compile. Decided to switch to cookie method getSessionMapR :: {-...
9,068
true
true
0
8
2,737
89
55
34
null
null
tmcgilchrist/scheme
src/Scheme/Parser.hs
bsd-3-clause
readExpr :: T.Text -> ThrowsError LispVal readExpr = readOrThrow parseExpr
74
readExpr :: T.Text -> ThrowsError LispVal readExpr = readOrThrow parseExpr
74
readExpr = readOrThrow parseExpr
32
false
true
0
6
9
23
11
12
null
null
uduki/hsQt
Qtc/ClassTypes/Gui.hs
bsd-2-clause
qWheelEventAddFinalizer :: QWheelEvent a -> IO () qWheelEventAddFinalizer (Object fp) = addForeignPtrFinalizer qtc_QWheelEvent_getFinalizer fp
144
qWheelEventAddFinalizer :: QWheelEvent a -> IO () qWheelEventAddFinalizer (Object fp) = addForeignPtrFinalizer qtc_QWheelEvent_getFinalizer fp
144
qWheelEventAddFinalizer (Object fp) = addForeignPtrFinalizer qtc_QWheelEvent_getFinalizer fp
94
false
true
0
7
15
37
17
20
null
null
siddhanathan/ghc
includes/CodeGen.Platform.hs
bsd-3-clause
globalRegMaybe (FloatReg 3) = Just (RealRegSingle REG_F3)
69
globalRegMaybe (FloatReg 3) = Just (RealRegSingle REG_F3)
69
globalRegMaybe (FloatReg 3) = Just (RealRegSingle REG_F3)
69
false
false
0
7
18
24
11
13
null
null
flipstone/orville
orville-postgresql-libpq/test/Test/FieldDefinition.hs
mit
uuidField :: Pool.Pool Connection.Connection -> [(HH.PropertyName, HH.Property)] uuidField pool = testFieldProperties pool "uuidField" $ FieldDefinitionTest { roundTripFieldDef = FieldDef.uuidField "foo" , roundTripDefaultValueTests = [] , roundTripGen = uuidGen }
294
uuidField :: Pool.Pool Connection.Connection -> [(HH.PropertyName, HH.Property)] uuidField pool = testFieldProperties pool "uuidField" $ FieldDefinitionTest { roundTripFieldDef = FieldDef.uuidField "foo" , roundTripDefaultValueTests = [] , roundTripGen = uuidGen }
294
uuidField pool = testFieldProperties pool "uuidField" $ FieldDefinitionTest { roundTripFieldDef = FieldDef.uuidField "foo" , roundTripDefaultValueTests = [] , roundTripGen = uuidGen }
213
false
true
0
9
58
74
40
34
null
null
stefan-hoeck/labeled-graph
benchmark/bench.hs
bsd-3-clause
b_bfp_e ∷ Int → Benchmark b_bfp_e n = let e = empty n in bench (show n) $ nf (bfPaths e) (vertices e)
113
b_bfp_e ∷ Int → Benchmark b_bfp_e n = let e = empty n in bench (show n) $ nf (bfPaths e) (vertices e)
113
b_bfp_e n = let e = empty n in bench (show n) $ nf (bfPaths e) (vertices e)
87
false
true
2
9
34
69
30
39
null
null
msakai/ptq
src/Parser.hs
lgpl-2.1
fvs (F25 x) = fvs x
23
fvs (F25 x) = fvs x
23
fvs (F25 x) = fvs x
23
false
false
0
6
9
19
8
11
null
null
olsner/ghc
compiler/types/TyCoRep.hs
bsd-3-clause
provSize (HoleProv h) = pprPanic "provSize hits a hole" (ppr h)
70
provSize (HoleProv h) = pprPanic "provSize hits a hole" (ppr h)
70
provSize (HoleProv h) = pprPanic "provSize hits a hole" (ppr h)
70
false
false
0
7
17
26
12
14
null
null
alphalambda/k12math
contrib/MHills/GeometryLessons/code/student/lesson2e.hs
mit
main = drawPicture myPicture
28
main = drawPicture myPicture
28
main = drawPicture myPicture
28
false
false
0
5
3
9
4
5
null
null
aisamanra/matterhorn
src/Events/Keybindings.hs
bsd-3-clause
bindingToEvent :: Binding -> Vty.Event bindingToEvent binding = Vty.EvKey (kbKey binding) (kbMods binding)
108
bindingToEvent :: Binding -> Vty.Event bindingToEvent binding = Vty.EvKey (kbKey binding) (kbMods binding)
108
bindingToEvent binding = Vty.EvKey (kbKey binding) (kbMods binding)
69
false
true
0
7
14
39
19
20
null
null
eligottlieb/chaitin
src/Evaluator.hs
mit
cons badArgList = throwError $ NumArgs 2 badArgList
65
cons badArgList = throwError $ NumArgs 2 badArgList
65
cons badArgList = throwError $ NumArgs 2 badArgList
65
false
false
0
6
21
18
8
10
null
null
ahushh/Monaba
monaba/src/Handler/Settings.hs
mit
timezones :: [(Text, Int)] timezones = [("[UTC -11:00] Pacific/Midway",-39600) ,("[UTC -10:00] Pacific/Honolulu",-36000) ,("[UTC -09:30] Pacific/Marquesas",-34200) ,("[UTC -09:00] Pacific/Gambier",-32400) ,("[UTC -08:00] America/Anchorage",-28800) ,("[UTC -07:...
3,163
timezones :: [(Text, Int)] timezones = [("[UTC -11:00] Pacific/Midway",-39600) ,("[UTC -10:00] Pacific/Honolulu",-36000) ,("[UTC -09:30] Pacific/Marquesas",-34200) ,("[UTC -09:00] Pacific/Gambier",-32400) ,("[UTC -08:00] America/Anchorage",-28800) ,("[UTC -07:...
3,163
timezones = [("[UTC -11:00] Pacific/Midway",-39600) ,("[UTC -10:00] Pacific/Honolulu",-36000) ,("[UTC -09:30] Pacific/Marquesas",-34200) ,("[UTC -09:00] Pacific/Gambier",-32400) ,("[UTC -08:00] America/Anchorage",-28800) ,("[UTC -07:00] America/Los_Angeles",-2...
3,136
false
true
0
7
921
605
396
209
null
null
keithodulaigh/Hets
CspCASLProver/CspCASLProver.hs
gpl-2.0
produceDataEncoding :: CASLSign -> [Named CASLFORMULA] -> Result (Isa.Sign, [Named Isa.Sentence], CASLSign, CASLSign) produceDataEncoding caslSign caslNamedSens = let -- Comorphisms casl2pcfol = wrapMapTheory CASL2PCFOL.CASL2PCFOL pcfol2cfol =...
1,152
produceDataEncoding :: CASLSign -> [Named CASLFORMULA] -> Result (Isa.Sign, [Named Isa.Sentence], CASLSign, CASLSign) produceDataEncoding caslSign caslNamedSens = let -- Comorphisms casl2pcfol = wrapMapTheory CASL2PCFOL.CASL2PCFOL pcfol2cfol =...
1,152
produceDataEncoding caslSign caslNamedSens = let -- Comorphisms casl2pcfol = wrapMapTheory CASL2PCFOL.CASL2PCFOL pcfol2cfol = wrapMapTheory $ CASL2SubCFOL.CASL2SubCFOL True CASL2SubCFOL.AllSortBottoms cfol2isabelleHol = wrapMapTheory CFOL2IsabelleHOL.CFOL2IsabelleHOL ...
977
false
true
0
11
282
170
87
83
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Desugar710/DsArrows.hs
bsd-3-clause
replaceLeavesMatch :: Type -- new result type -> [Located (body' Id)] -- replacement leaf expressions of that type -> LMatch Id (Located (body Id)) -- the matches of a case command -> ([Located (body' Id)], -- remaining...
626
replaceLeavesMatch :: Type -- new result type -> [Located (body' Id)] -- replacement leaf expressions of that type -> LMatch Id (Located (body Id)) -- the matches of a case command -> ([Located (body' Id)], -- remaining...
605
replaceLeavesMatch _res_ty leaves (L loc (Match mf pat mt (GRHSs grhss binds))) = let (leaves', grhss') = mapAccumL replaceLeavesGRHS leaves grhss in (leaves', L loc (Match mf pat mt (GRHSs grhss' binds)))
223
true
true
0
13
213
183
94
89
null
null
frerich/pandoc
src/Text/Pandoc/Writers/LaTeX.hs
gpl-2.0
toBabel ("en":"GB":_) = "british"
40
toBabel ("en":"GB":_) = "british"
40
toBabel ("en":"GB":_) = "british"
40
false
false
0
8
10
20
10
10
null
null
solidsnack/cassava
Data/Csv/Encoding.hs
bsd-3-clause
moduleError :: String -> String -> a moduleError func msg = error $ "Data.Csv.Encoding." ++ func ++ ": " ++ msg
111
moduleError :: String -> String -> a moduleError func msg = error $ "Data.Csv.Encoding." ++ func ++ ": " ++ msg
111
moduleError func msg = error $ "Data.Csv.Encoding." ++ func ++ ": " ++ msg
74
false
true
0
8
20
40
20
20
null
null
justinethier/husk-scheme
hs-src/Language/Scheme/Types.hs
mit
fromOpaque badArg = throwError $ TypeMismatch (show $ toOpaque (undefined :: a)) badArg
87
fromOpaque badArg = throwError $ TypeMismatch (show $ toOpaque (undefined :: a)) badArg
87
fromOpaque badArg = throwError $ TypeMismatch (show $ toOpaque (undefined :: a)) badArg
87
false
false
0
10
12
34
17
17
null
null
GaloisInc/halvm-ghc
compiler/utils/Platform.hs
bsd-3-clause
latformBinariesAreStaticLibs :: Platform -> Bool platformBinariesAreStaticLibs = osBinariesAreStaticLibs . platformOS
118
platformBinariesAreStaticLibs :: Platform -> Bool platformBinariesAreStaticLibs = osBinariesAreStaticLibs . platformOS
118
platformBinariesAreStaticLibs = osBinariesAreStaticLibs . platformOS
68
false
true
0
5
10
19
10
9
null
null
sopvop/cabal
cabal-install/Distribution/Solver/Modular/PSQ.hs
bsd-3-clause
filterKeys :: (k -> Bool) -> PSQ k a -> PSQ k a filterKeys p (PSQ xs) = PSQ (S.filter (p . fst) xs)
99
filterKeys :: (k -> Bool) -> PSQ k a -> PSQ k a filterKeys p (PSQ xs) = PSQ (S.filter (p . fst) xs)
99
filterKeys p (PSQ xs) = PSQ (S.filter (p . fst) xs)
51
false
true
0
9
23
67
33
34
null
null
olsner/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
doPrefetchValueOp _ _ = panic "StgCmmPrim: doPrefetchValueOp"
63
doPrefetchValueOp _ _ = panic "StgCmmPrim: doPrefetchValueOp"
63
doPrefetchValueOp _ _ = panic "StgCmmPrim: doPrefetchValueOp"
63
false
false
1
5
8
15
6
9
null
null
daleooo/barrelfish
tools/mackerel/TypeTable.hs
mit
builtin_size "uint16" = 16
26
builtin_size "uint16" = 16
26
builtin_size "uint16" = 16
26
false
false
0
4
3
10
4
6
null
null
gbataille/pandoc
src/Text/Pandoc/Readers/EPUB.hs
gpl-2.0
attrToNSPair :: Attr -> Maybe (String, String) attrToNSPair (Attr (QName "xmlns" _ _) val) = Just ("xmlns", val)
112
attrToNSPair :: Attr -> Maybe (String, String) attrToNSPair (Attr (QName "xmlns" _ _) val) = Just ("xmlns", val)
112
attrToNSPair (Attr (QName "xmlns" _ _) val) = Just ("xmlns", val)
65
false
true
0
9
17
54
28
26
null
null
brendanhay/gogol
gogol-containeranalysis/gen/Network/Google/ContainerAnalysis/Types/Product.hs
mpl-2.0
-- | A note describing an attestation role. nAttestationAuthority :: Lens' Note (Maybe Authority) nAttestationAuthority = lens _nAttestationAuthority (\ s a -> s{_nAttestationAuthority = a})
198
nAttestationAuthority :: Lens' Note (Maybe Authority) nAttestationAuthority = lens _nAttestationAuthority (\ s a -> s{_nAttestationAuthority = a})
154
nAttestationAuthority = lens _nAttestationAuthority (\ s a -> s{_nAttestationAuthority = a})
100
true
true
0
8
32
49
25
24
null
null
DanielG/kvm-in-a-box
src/Ssh.hs
agpl-3.0
headMatch _ _ = False
21
headMatch _ _ = False
21
headMatch _ _ = False
21
false
false
0
5
4
11
5
6
null
null
julienschmaltz/madl
src/Madl/Network.hs
mit
prop _ (_, LoadBalancer{}, _) = fatal 361 "invalid network"
59
prop _ (_, LoadBalancer{}, _) = fatal 361 "invalid network"
59
prop _ (_, LoadBalancer{}, _) = fatal 361 "invalid network"
59
false
false
1
6
9
31
15
16
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/S3Bucket.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-tags sbTags :: Lens' S3Bucket (Maybe [Tag]) sbTags = lens _s3BucketTags (\s a -> s { _s3BucketTags = a })
216
sbTags :: Lens' S3Bucket (Maybe [Tag]) sbTags = lens _s3BucketTags (\s a -> s { _s3BucketTags = a })
100
sbTags = lens _s3BucketTags (\s a -> s { _s3BucketTags = a })
61
true
true
0
9
21
49
27
22
null
null
ntc2/optparse-applicative
Options/Applicative/Common.hs
bsd-3-clause
isArg :: OptReader a -> Bool isArg (ArgReader _) = True
55
isArg :: OptReader a -> Bool isArg (ArgReader _) = True
55
isArg (ArgReader _) = True
26
false
true
0
7
10
27
13
14
null
null
M42/mikrokosmos
source/Lambda.hs
gpl-3.0
isOpenExp (Caseof a b c) = isOpenExp a || isOpenExp b || isOpenExp c
68
isOpenExp (Caseof a b c) = isOpenExp a || isOpenExp b || isOpenExp c
68
isOpenExp (Caseof a b c) = isOpenExp a || isOpenExp b || isOpenExp c
68
false
false
0
7
13
36
16
20
null
null
R-Morgan/hasStat
Exponential.hs
gpl-3.0
exponentialQuantile :: (Num a, Floating a) => a -> a -> a exponentialQuantile x lambda = (-1 * log (1-x)) / lambda
114
exponentialQuantile :: (Num a, Floating a) => a -> a -> a exponentialQuantile x lambda = (-1 * log (1-x)) / lambda
114
exponentialQuantile x lambda = (-1 * log (1-x)) / lambda
56
false
true
0
10
21
62
32
30
null
null
typelead/epm
Cabal/Distribution/Simple/BuildTarget.hs
bsd-3-clause
addDepth :: Confidence -> Match a -> Match a addDepth d' (NoMatch d msgs) = NoMatch (d'+d) msgs
105
addDepth :: Confidence -> Match a -> Match a addDepth d' (NoMatch d msgs) = NoMatch (d'+d) msgs
105
addDepth d' (NoMatch d msgs) = NoMatch (d'+d) msgs
60
false
true
0
7
27
50
24
26
null
null
diminishedprime/.org
reading-list/learn_you_a_haskell/syntax_in_functions.hs
mit
length' (_:xs) = 1 + length' xs
31
length' (_:xs) = 1 + length' xs
31
length' (_:xs) = 1 + length' xs
31
false
false
2
6
6
25
11
14
null
null
lukexi/ghc-7.8-arm64
includes/CodeGen.Platform.hs
bsd-3-clause
globalRegMaybe (ZmmReg 1) = Just (RealRegSingle REG_ZMM1)
71
globalRegMaybe (ZmmReg 1) = Just (RealRegSingle REG_ZMM1)
71
globalRegMaybe (ZmmReg 1) = Just (RealRegSingle REG_ZMM1)
71
false
false
0
7
20
24
11
13
null
null
meiersi/bytestring-builder
tests/builder/Data/ByteString/Lazy/Builder/BasicEncoding/Tests.hs
bsd-3-clause
------------------------------------------------------------------------------ -- Binary ------------------------------------------------------------------------------ testsBinary :: [Test] testsBinary = [ testBoundedF "word8" bigEndian_list BE.word8 , testBoundedF "int8" bigEndian_list BE.int8 -...
3,340
testsBinary :: [Test] testsBinary = [ testBoundedF "word8" bigEndian_list BE.word8 , testBoundedF "int8" bigEndian_list BE.int8 -- big-endian , testBoundedF "int16BE" bigEndian_list BE.int16BE , testBoundedF "int32BE" bigEndian_list BE.int32BE , testBoundedF "int64BE" bigEndian_...
3,171
testsBinary = [ testBoundedF "word8" bigEndian_list BE.word8 , testBoundedF "int8" bigEndian_list BE.int8 -- big-endian , testBoundedF "int16BE" bigEndian_list BE.int16BE , testBoundedF "int32BE" bigEndian_list BE.int32BE , testBoundedF "int64BE" bigEndian_list BE.int64BE ...
3,149
true
true
0
9
546
615
314
301
null
null
vTurbine/ghc
compiler/hsSyn/HsDecls.hs
bsd-3-clause
docDeclDoc (DocCommentNamed _ d) = d
36
docDeclDoc (DocCommentNamed _ d) = d
36
docDeclDoc (DocCommentNamed _ d) = d
36
false
false
0
7
5
17
8
9
null
null
dancor/halve-sheet-music
src/png-halve-sheet-music.hs
mit
main :: IO () main = do [fname, errPrefix] <- getArgs c <- BS.readFile fname let Right (ImageRGB8 img) = decodePng c imgW = imageWidth img imgH = imageHeight img hMid = imgH `quot` 2 h1 = imgH `quot` 3 h2 = imgH - h1 hDiff = h2 - h1 contigPx <- initP img ...
2,462
main :: IO () main = do [fname, errPrefix] <- getArgs c <- BS.readFile fname let Right (ImageRGB8 img) = decodePng c imgW = imageWidth img imgH = imageHeight img hMid = imgH `quot` 2 h1 = imgH `quot` 3 h2 = imgH - h1 hDiff = h2 - h1 contigPx <- initP img ...
2,462
main = do [fname, errPrefix] <- getArgs c <- BS.readFile fname let Right (ImageRGB8 img) = decodePng c imgW = imageWidth img imgH = imageHeight img hMid = imgH `quot` 2 h1 = imgH `quot` 3 h2 = imgH - h1 hDiff = h2 - h1 contigPx <- initP img contigPx2 <...
2,448
false
true
0
22
961
637
324
313
null
null
ml9951/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
-- ^ A hole in a type (PartialTypeSignatures) {- Note [Hole constraints] ~~~~~~~~~~~~~~~~~~~~~~~ CHoleCan constraints are used for two kinds of holes, distinguished by cc_hole: * For holes in expressions e.g. f x = g _ x * For holes in type signatures e.g. f :: _ -> _ f x = [x,True] Note ...
3,565
mkNonCanonical :: CtEvidence -> Ct mkNonCanonical ev = CNonCanonical { cc_ev = ev }
83
mkNonCanonical ev = CNonCanonical { cc_ev = ev }
48
true
true
0
6
815
28
16
12
null
null
nushio3/formura
src/Formura/Parser.hs
mit
isIdentifierAlphabet0 :: Char -> Bool isIdentifierAlphabet0 = isLetter
70
isIdentifierAlphabet0 :: Char -> Bool isIdentifierAlphabet0 = isLetter
70
isIdentifierAlphabet0 = isLetter
32
false
true
0
7
7
22
9
13
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | List of third-party authentication tokens enabled for this -- configuration. fcThirdPartyAuthenticationTokens :: Lens' FloodlightConfiguration [ThirdPartyAuthenticationToken] fcThirdPartyAuthenticationTokens = lens _fcThirdPartyAuthenticationTokens (\ s a -> s{_fcThirdPartyAuthenticationTokens = a}) ...
346
fcThirdPartyAuthenticationTokens :: Lens' FloodlightConfiguration [ThirdPartyAuthenticationToken] fcThirdPartyAuthenticationTokens = lens _fcThirdPartyAuthenticationTokens (\ s a -> s{_fcThirdPartyAuthenticationTokens = a}) . _Default . _Coerce
264
fcThirdPartyAuthenticationTokens = lens _fcThirdPartyAuthenticationTokens (\ s a -> s{_fcThirdPartyAuthenticationTokens = a}) . _Default . _Coerce
166
true
true
0
11
51
52
29
23
null
null
leptonyu/BrainFuck
src/Language/BrainFuck.hs
bsd-3-clause
addTo :: U.Vector Byte -> Int -> Byte -> U.Vector Byte addTo vector i m = runST $ do v <- U.unsafeThaw vector MU.modify v (+m) i U.unsafeFreeze v
161
addTo :: U.Vector Byte -> Int -> Byte -> U.Vector Byte addTo vector i m = runST $ do v <- U.unsafeThaw vector MU.modify v (+m) i U.unsafeFreeze v
160
addTo vector i m = runST $ do v <- U.unsafeThaw vector MU.modify v (+m) i U.unsafeFreeze v
105
false
true
0
10
44
80
37
43
null
null
rueshyna/gogol
gogol-books/gen/Network/Google/Resource/Books/Volumes/List.hs
mpl-2.0
-- | Restrict information returned to a set of selected fields. vlProjection :: Lens' VolumesList (Maybe VolumesListProjection) vlProjection = lens _vlProjection (\ s a -> s{_vlProjection = a})
195
vlProjection :: Lens' VolumesList (Maybe VolumesListProjection) vlProjection = lens _vlProjection (\ s a -> s{_vlProjection = a})
131
vlProjection = lens _vlProjection (\ s a -> s{_vlProjection = a})
67
true
true
0
9
29
48
25
23
null
null
wxwxwwxxx/ghc
compiler/types/TypeRep.hs
bsd-3-clause
pprTcApp_help :: TyPrec -> (TyPrec -> a -> SDoc) -> TyCon -> [a] -> DynFlags -> SDoc -- This one has accss to the DynFlags pprTcApp_help p pp tc tys dflags | not (isSymOcc (nameOccName (tyConName tc))) = pprPrefixApp p (ppr tc) (map (pp TyConPrec) tys_wo_kinds) | [ty1,ty2] <- tys_wo_kinds -- Infix, two argument...
749
pprTcApp_help :: TyPrec -> (TyPrec -> a -> SDoc) -> TyCon -> [a] -> DynFlags -> SDoc pprTcApp_help p pp tc tys dflags | not (isSymOcc (nameOccName (tyConName tc))) = pprPrefixApp p (ppr tc) (map (pp TyConPrec) tys_wo_kinds) | [ty1,ty2] <- tys_wo_kinds -- Infix, two arguments; -- w...
711
pprTcApp_help p pp tc tys dflags | not (isSymOcc (nameOccName (tyConName tc))) = pprPrefixApp p (ppr tc) (map (pp TyConPrec) tys_wo_kinds) | [ty1,ty2] <- tys_wo_kinds -- Infix, two arguments; -- we know nothing of precedence though = pprInfixApp p pp (ppr tc) ty1 ty2 | tc `h...
626
true
true
0
14
175
258
130
128
null
null
xenog/haskoin
src/Network/Haskoin/Script/Evaluator.hs
unlicense
eval OP_CODESEPARATOR = dropHashOpsSeparatedCode
48
eval OP_CODESEPARATOR = dropHashOpsSeparatedCode
48
eval OP_CODESEPARATOR = dropHashOpsSeparatedCode
48
false
false
1
5
3
13
4
9
null
null
oldmanmike/haskellSDL2Examples
src/shared/lifecycle.hs
gpl-2.0
createWindow :: String -> (CInt, CInt) -> IO (Risky SDL.Window) createWindow title (w, h) = withCAString title $ \ctitle -> do window <- SDL.createWindow ctitle SDL.SDL_WINDOWPOS_UNDEFINED SDL.SDL_WINDOWPOS_UNDEFINED w h SDL.SDL_WINDOW_SHOWN return $ if window == nullPtr then Left "Window could not be created!"...
338
createWindow :: String -> (CInt, CInt) -> IO (Risky SDL.Window) createWindow title (w, h) = withCAString title $ \ctitle -> do window <- SDL.createWindow ctitle SDL.SDL_WINDOWPOS_UNDEFINED SDL.SDL_WINDOWPOS_UNDEFINED w h SDL.SDL_WINDOW_SHOWN return $ if window == nullPtr then Left "Window could not be created!"...
338
createWindow title (w, h) = withCAString title $ \ctitle -> do window <- SDL.createWindow ctitle SDL.SDL_WINDOWPOS_UNDEFINED SDL.SDL_WINDOWPOS_UNDEFINED w h SDL.SDL_WINDOW_SHOWN return $ if window == nullPtr then Left "Window could not be created!" else Right window
274
false
true
0
11
53
112
56
56
null
null
HaritzPuerto/SemanticsforWhileLanguage
While/Exercises03.hs
mit
bexp1 :: Bexp bexp1 = TRUE
26
bexp1 :: Bexp bexp1 = TRUE
26
bexp1 = TRUE
12
false
true
0
4
5
11
6
5
null
null
Lythimus/lptv
sites/all/modules/jgm-pandoc-8be6cc2/src/Text/Pandoc/Writers/Org.hs
gpl-2.0
inlineToOrg Apostrophe = return "'"
35
inlineToOrg Apostrophe = return "'"
35
inlineToOrg Apostrophe = return "'"
35
false
false
0
5
4
12
5
7
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Actions/CycleSelectedLayouts.hs
bsd-2-clause
-- $usage -- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@: -- -- > import XMonad hiding ((|||)) -- > import XMonad.Layout.LayoutCombinators ((|||)) -- > import XMonad.Actions.CycleSelectedLayouts -- -- > , ((modm, xK_t ), cycleThroughLayouts ["Tall", "Mirror Tall"]) -- -- Make sure yo...
757
cycleToNext :: (Eq a) => [a] -> a -> Maybe a cycleToNext lst a = do -- not beautiful but simple and readable ind <- findIndex (a==) lst return $ lst !! if ind == length lst - 1 then 0 else ind+1 -- | If the current layout is in the list, cycle to the next layout. Otherwise, -- apply the first layout from...
326
cycleToNext lst a = do -- not beautiful but simple and readable ind <- findIndex (a==) lst return $ lst !! if ind == length lst - 1 then 0 else ind+1 -- | If the current layout is in the list, cycle to the next layout. Otherwise, -- apply the first layout from list.
281
true
true
0
11
146
103
59
44
null
null
brendanhay/gogol
gogol-cloudkms/gen/Network/Google/CloudKMS/Types/Product.hs
mpl-2.0
-- | Creates a value of 'Location' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'lName' -- -- * 'lMetadata' -- -- * 'lDisplayName' -- -- * 'lLabels' -- -- * 'lLocationId' location :: Location location = Location' { _lName ...
446
location :: Location location = Location' { _lName = Nothing , _lMetadata = Nothing , _lDisplayName = Nothing , _lLabels = Nothing , _lLocationId = Nothing }
187
location = Location' { _lName = Nothing , _lMetadata = Nothing , _lDisplayName = Nothing , _lLabels = Nothing , _lLocationId = Nothing }
162
true
true
0
6
106
56
40
16
null
null
lukexi/ghc-7.8-arm64
compiler/codeGen/StgCmmClosure.hs
bsd-3-clause
staticClosureLabel :: ClosureInfo -> CLabel staticClosureLabel = toClosureLbl . closureInfoLabel
97
staticClosureLabel :: ClosureInfo -> CLabel staticClosureLabel = toClosureLbl . closureInfoLabel
97
staticClosureLabel = toClosureLbl . closureInfoLabel
53
false
true
0
5
10
19
10
9
null
null
sonyandy/unvar
src/UnVar.hs
bsd-3-clause
unconsDeps :: MutVarDeps -> (UniqSet CoreBndr, MutVarDeps) unconsDeps deps = case deps of ClosesOver bndrs deps' -> (bndrs, deps') PointsTo _ -> (emptyUniqSet, None) None -> (emptyUniqSet, None)
200
unconsDeps :: MutVarDeps -> (UniqSet CoreBndr, MutVarDeps) unconsDeps deps = case deps of ClosesOver bndrs deps' -> (bndrs, deps') PointsTo _ -> (emptyUniqSet, None) None -> (emptyUniqSet, None)
200
unconsDeps deps = case deps of ClosesOver bndrs deps' -> (bndrs, deps') PointsTo _ -> (emptyUniqSet, None) None -> (emptyUniqSet, None)
141
false
true
4
7
33
74
40
34
null
null
jdimond/diplomarbeit
tools/Cluster.hs
bsd-3-clause
fromElems v = V.update empty v where empty = V.replicate (V.length v) undefined
83
fromElems v = V.update empty v where empty = V.replicate (V.length v) undefined
83
fromElems v = V.update empty v where empty = V.replicate (V.length v) undefined
83
false
false
0
8
16
39
18
21
null
null
Xandaros/MinecraftCLI
app/Main.hs
bsd-2-clause
uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d uncurry3 f (a, b, c) = f a b c
79
uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d uncurry3 f (a, b, c) = f a b c
79
uncurry3 f (a, b, c) = f a b c
30
false
true
0
9
24
64
35
29
null
null
aartifact/aartifact-verifier
src/ExpSQL.hs
mit
cnv eix pix oix min0 vs (Exp (App (C Neg) e)) = let (vs3, eix3, min3) = cnvAll (eix+1) eix 0 (min0+1) vs [Syn "-", Exp e] (vs'', _, min3') = dof eix pix oix min0 min3 "Neg" "null" "false" vs3 in (vs'', eix3+1, min3')
226
cnv eix pix oix min0 vs (Exp (App (C Neg) e)) = let (vs3, eix3, min3) = cnvAll (eix+1) eix 0 (min0+1) vs [Syn "-", Exp e] (vs'', _, min3') = dof eix pix oix min0 min3 "Neg" "null" "false" vs3 in (vs'', eix3+1, min3')
226
cnv eix pix oix min0 vs (Exp (App (C Neg) e)) = let (vs3, eix3, min3) = cnvAll (eix+1) eix 0 (min0+1) vs [Syn "-", Exp e] (vs'', _, min3') = dof eix pix oix min0 min3 "Neg" "null" "false" vs3 in (vs'', eix3+1, min3')
226
false
false
0
11
54
147
76
71
null
null
locaweb/leela
src/warpdrive/src/Leela/Network/Protocol.hs
apache-2.0
whenValidSignature :: (Time, NominalDiffTime) -> (User -> Maybe Secret) -> Time -> User -> Nonce -> MAC -> B.ByteString -> a -> Either Reply a whenValidSignature now secLookup t u nonce sig msg = case (secLookup u) of Nothing -> const $ Left $ Fail 401 $ Just "signature error: user" Just sec | not $ ve...
550
whenValidSignature :: (Time, NominalDiffTime) -> (User -> Maybe Secret) -> Time -> User -> Nonce -> MAC -> B.ByteString -> a -> Either Reply a whenValidSignature now secLookup t u nonce sig msg = case (secLookup u) of Nothing -> const $ Left $ Fail 401 $ Just "signature error: user" Just sec | not $ ve...
550
whenValidSignature now secLookup t u nonce sig msg = case (secLookup u) of Nothing -> const $ Left $ Fail 401 $ Just "signature error: user" Just sec | not $ verify sec nonce msg sig -> const $ Left $ Fail 403 $ Just "signature error: secret" | expired now t -> const $ Left $ Fai...
407
false
true
0
13
159
202
95
107
null
null
3of8/haskell_playground
queue/Queue.hs
gpl-2.0
take n q = case dequeue q of Nothing -> [] Just (x,q') -> x : take (n - 1) q'
107
take n q = case dequeue q of Nothing -> [] Just (x,q') -> x : take (n - 1) q'
107
take n q = case dequeue q of Nothing -> [] Just (x,q') -> x : take (n - 1) q'
107
false
false
1
11
50
61
28
33
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'B.splitWith' b_splitWith = B.splitWith
43
b_splitWith = B.splitWith
25
b_splitWith = B.splitWith
25
true
false
0
5
4
9
5
4
null
null
bitemyapp/bloodhound
src/Database/Bloodhound/Client.hs
bsd-3-clause
stringifyOCIndex :: OpenCloseIndex -> Text stringifyOCIndex oci = case oci of OpenIndex -> "_open" CloseIndex -> "_close"
126
stringifyOCIndex :: OpenCloseIndex -> Text stringifyOCIndex oci = case oci of OpenIndex -> "_open" CloseIndex -> "_close"
126
stringifyOCIndex oci = case oci of OpenIndex -> "_open" CloseIndex -> "_close"
83
false
true
0
8
21
40
18
22
null
null
ssonal/haskell-experiments
ninetynine.hs
mit
myLast (_:xs) = myLast xs
27
myLast (_:xs) = myLast xs
27
myLast (_:xs) = myLast xs
27
false
false
0
6
6
20
9
11
null
null
mdorman/couch-simple
src/lib/Database/Couch/Explicit/Local.hs
mit
{- | <http://docs.couchdb.org/en/1.6.1/api/local.html#copy--db-_local-docid Copy the specified local document> The return value is an object that can hold "id" and "rev" keys, but if you don't need those values, it is easily decoded into a 'Data.Bool.Bool' with our 'asBool' combinator: >>> value :: Result Bool <- Doc...
695
copy :: (FromJSON a, MonadIO m) => ModifyDoc -- ^ Parameters for document modification -> DocId -- ^ The document ID -> Maybe DocRev -- ^ An optional document revision -> DocId -- ^ The destination document ID -> Context -> m (Result a) copy = Base.copy "_local"
287
copy = Base.copy "_local"
25
true
true
0
14
131
74
37
37
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 8084707 = 4307
34
getValueFromProduct 8084707 = 4307
34
getValueFromProduct 8084707 = 4307
34
false
false
0
5
3
9
4
5
null
null
fmapfmapfmap/amazonka
amazonka-s3/gen/Network/AWS/S3/Types/Product.hs
mpl-2.0
-- | Undocumented member. dDeleteMarker :: Lens' DeletedObject (Maybe Bool) dDeleteMarker = lens _dDeleteMarker (\ s a -> s{_dDeleteMarker = a})
144
dDeleteMarker :: Lens' DeletedObject (Maybe Bool) dDeleteMarker = lens _dDeleteMarker (\ s a -> s{_dDeleteMarker = a})
118
dDeleteMarker = lens _dDeleteMarker (\ s a -> s{_dDeleteMarker = a})
68
true
true
1
9
20
51
25
26
null
null
christiaanb/ghc
libraries/base/Control/Exception/Base.hs
bsd-3-clause
noMethodBindingError s = throw (NoMethodError (untangle s "No instance nor default method for class operation"))
119
noMethodBindingError s = throw (NoMethodError (untangle s "No instance nor default method for class operation"))
119
noMethodBindingError s = throw (NoMethodError (untangle s "No instance nor default method for class operation"))
119
false
false
1
9
21
30
12
18
null
null
pgj/bead
src/Bead/Domain/Entity/Assignment.hs
bsd-3-clause
isZippedSubmissions :: Aspects -> Bool isZippedSubmissions = fromAspects (not . Set.null . Set.filter isZippedSubmissionsAspect)
128
isZippedSubmissions :: Aspects -> Bool isZippedSubmissions = fromAspects (not . Set.null . Set.filter isZippedSubmissionsAspect)
128
isZippedSubmissions = fromAspects (not . Set.null . Set.filter isZippedSubmissionsAspect)
89
false
true
0
9
13
36
18
18
null
null
ribag/ganeti-experiments
src/Ganeti/Constants.hs
gpl-2.0
oobStatusWarning :: String oobStatusWarning = Types.oobStatusToRaw OobStatusWarning
83
oobStatusWarning :: String oobStatusWarning = Types.oobStatusToRaw OobStatusWarning
83
oobStatusWarning = Types.oobStatusToRaw OobStatusWarning
56
false
true
0
6
6
16
8
8
null
null
sol/pandoc
src/Text/Pandoc/Writers/Docx.hs
gpl-2.0
styleToOpenXml :: Style -> [Element] styleToOpenXml style = parStyle : map toStyle alltoktypes where alltoktypes = enumFromTo KeywordTok NormalTok toStyle toktype = mknode "w:style" [("w:type","character"), ("w:customStyle","1"),("w:styleId",show toktype)] ...
2,290
styleToOpenXml :: Style -> [Element] styleToOpenXml style = parStyle : map toStyle alltoktypes where alltoktypes = enumFromTo KeywordTok NormalTok toStyle toktype = mknode "w:style" [("w:type","character"), ("w:customStyle","1"),("w:styleId",show toktype)] ...
2,290
styleToOpenXml style = parStyle : map toStyle alltoktypes where alltoktypes = enumFromTo KeywordTok NormalTok toStyle toktype = mknode "w:style" [("w:type","character"), ("w:customStyle","1"),("w:styleId",show toktype)] [ mknode "w:name" [("w:val",show t...
2,253
false
true
6
21
987
638
339
299
null
null
dirkz/google-code-jam-haskell
practice/src/Rotate.hs
mpl-2.0
transpose (xs:xss) = zipWith (:) xs (transpose xss)
51
transpose (xs:xss) = zipWith (:) xs (transpose xss)
51
transpose (xs:xss) = zipWith (:) xs (transpose xss)
51
false
false
0
7
7
32
16
16
null
null
rosenbergdm/language-r
src/Language/R/sketches/InFin.hs
bsd-3-clause
rtestpw72 = mkrtest (\() -> app (testpowfix7 ()) (int 2))
57
rtestpw72 = mkrtest (\() -> app (testpowfix7 ()) (int 2))
57
rtestpw72 = mkrtest (\() -> app (testpowfix7 ()) (int 2))
57
false
false
0
11
9
38
19
19
null
null
dorchard/camfort
src/Camfort/Specification/Units/Analysis.hs
apache-2.0
callIdRemap :: UnitInfo -> UnitSolver UnitInfo callIdRemap info = modifyCallIdRemapM $ \ idMap -> case info of UnitParamPosUse (n, p, i) | Just i' <- IM.lookup i idMap -> pure (UnitParamPosUse (n, p, i'), idMap) | otherwise -> freshId >>= \ i' -> ...
1,288
callIdRemap :: UnitInfo -> UnitSolver UnitInfo callIdRemap info = modifyCallIdRemapM $ \ idMap -> case info of UnitParamPosUse (n, p, i) | Just i' <- IM.lookup i idMap -> pure (UnitParamPosUse (n, p, i'), idMap) | otherwise -> freshId >>= \ i' -> ...
1,288
callIdRemap info = modifyCallIdRemapM $ \ idMap -> case info of UnitParamPosUse (n, p, i) | Just i' <- IM.lookup i idMap -> pure (UnitParamPosUse (n, p, i'), idMap) | otherwise -> freshId >>= \ i' -> pure (UnitParamPosUse (n, p, i'), IM.insert...
1,241
false
true
0
16
511
460
234
226
null
null
feumilieu/sicp-haskell
src/SICP/DB.hs
bsd-3-clause
localAddValue :: Value -> DBMonad a -> DBMonad a localAddValue v = local f where f (z, db) = (Set.insert v z, db)
119
localAddValue :: Value -> DBMonad a -> DBMonad a localAddValue v = local f where f (z, db) = (Set.insert v z, db)
119
localAddValue v = local f where f (z, db) = (Set.insert v z, db)
70
false
true
0
8
28
67
31
36
null
null
liamoc/dixi
Dixi/Database.hs
bsd-3-clause
getHistory :: Key -> Query Database [Page PatchSummary] getHistory k = view (db . ix k . to (fmap (fmap patchSummary) . toList))
128
getHistory :: Key -> Query Database [Page PatchSummary] getHistory k = view (db . ix k . to (fmap (fmap patchSummary) . toList))
128
getHistory k = view (db . ix k . to (fmap (fmap patchSummary) . toList))
72
false
true
0
13
22
70
32
38
null
null
loganbraga/hunch
app/Hunch/Runner.hs
mit
writeFileOrTpl (Source tpl) target dir = copyFile (dir `combine` tpl) target
76
writeFileOrTpl (Source tpl) target dir = copyFile (dir `combine` tpl) target
76
writeFileOrTpl (Source tpl) target dir = copyFile (dir `combine` tpl) target
76
false
false
0
7
10
33
17
16
null
null
m4lvin/robbed
src/Data/ROBDD/Types.hs
bsd-3-clause
One `bddCmp` One = EQ
21
One `bddCmp` One = EQ
21
One `bddCmp` One = EQ
21
false
false
0
5
4
18
8
10
null
null
k0001/gtk2hs
cairo/Graphics/Rendering/Cairo.hs
gpl-3.0
-- | Modifies the current transformation matrix (CTM) by translating the -- user-space origin by @(tx, ty)@. This offset is interpreted as a user-space -- coordinate according to the CTM in place before the new call to 'translate'. -- In other words, the translation of the user-space origin takes place after -- any exi...
541
translate :: Double -- ^ @tx@ - amount to translate in the X direction -> Double -- ^ @ty@ - amount to translate in the Y direction -> Render () translate = liftRender2 Internal.translate
196
translate = liftRender2 Internal.translate
42
true
true
0
9
98
42
23
19
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Repricingrules/List.hs
mpl-2.0
-- | A page token, received from a previous \`ListRepricingRules\` call. -- Provide this to retrieve the subsequent page. When paginating, all other -- parameters provided to \`ListRepricingRules\` must match the call that -- provided the page token. rlPageToken :: Lens' RepricingrulesList (Maybe Text) rlPageToken = ...
368
rlPageToken :: Lens' RepricingrulesList (Maybe Text) rlPageToken = lens _rlPageToken (\ s a -> s{_rlPageToken = a})
117
rlPageToken = lens _rlPageToken (\ s a -> s{_rlPageToken = a})
64
true
true
1
9
56
53
28
25
null
null
rahulmutt/ghcvm
compiler/Eta/Rename/RnTypes.hs
bsd-3-clause
rnHsTyKi isType _ (HsCoreTy ty) = ASSERT( isType ) return (HsCoreTy ty, emptyFVs)
87
rnHsTyKi isType _ (HsCoreTy ty) = ASSERT( isType ) return (HsCoreTy ty, emptyFVs)
87
rnHsTyKi isType _ (HsCoreTy ty) = ASSERT( isType ) return (HsCoreTy ty, emptyFVs)
87
false
false
1
6
18
43
19
24
null
null
uduki/hsQt
Qtc/ClassTypes/Core.hs
bsd-2-clause
qAbstractTableModelListFromPtrList :: [Ptr (TQAbstractTableModel a)] -> IO [QAbstractTableModel a] qAbstractTableModelListFromPtrList p = objectListFromPtrList_nf p
166
qAbstractTableModelListFromPtrList :: [Ptr (TQAbstractTableModel a)] -> IO [QAbstractTableModel a] qAbstractTableModelListFromPtrList p = objectListFromPtrList_nf p
166
qAbstractTableModelListFromPtrList p = objectListFromPtrList_nf p
67
false
true
0
9
15
42
20
22
null
null