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
formrre/yi
yi-core/src/Yi/Editor.hs
gpl-2.0
-- | Rotate focus to the previous window prevWinE :: EditorM () prevWinE = windowsA %= PL.previous
98
prevWinE :: EditorM () prevWinE = windowsA %= PL.previous
57
prevWinE = windowsA %= PL.previous
34
true
true
0
6
16
23
12
11
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
4711 = 4710
11
4711 = 4710
11
4711 = 4710
11
false
false
1
5
2
10
3
7
null
null
yesodweb/shakespeare
Text/Internal/Css.hs
mit
contentToBuilder :: Name -> Scope -> Content -> Q Exp contentToBuilder _ _ (ContentRaw x) = [|fromText . pack|] `appE` litE (StringL x)
139
contentToBuilder :: Name -> Scope -> Content -> Q Exp contentToBuilder _ _ (ContentRaw x) = [|fromText . pack|] `appE` litE (StringL x)
139
contentToBuilder _ _ (ContentRaw x) = [|fromText . pack|] `appE` litE (StringL x)
85
false
true
0
8
26
57
30
27
null
null
wilbowma/accelerate
Data/Array/Accelerate/Pretty/Print.hs
bsd-3-clause
prettyPrim PrimChr = text "chr"
46
prettyPrim PrimChr = text "chr"
46
prettyPrim PrimChr = text "chr"
46
false
false
0
5
19
12
5
7
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
action_514 (180#) = happyShift action_201
41
action_514 (180#) = happyShift action_201
41
action_514 (180#) = happyShift action_201
41
false
false
0
6
4
15
7
8
null
null
jimfinnis/keith
firmware/common/regparse.hs
mit
-- output a line describing the register suitable for a latex table outputNumberedRegLatex (x,n) = intercalate " & " [ show n, doname (mName x), show (mBytes x), if (mWritable...
1,127
outputNumberedRegLatex (x,n) = intercalate " & " [ show n, doname (mName x), show (mBytes x), if (mWritable x) then "Y" else "", floatRange ...
1,058
outputNumberedRegLatex (x,n) = intercalate " & " [ show n, doname (mName x), show (mBytes x), if (mWritable x) then "Y" else "", floatRange ...
1,058
true
false
0
12
540
163
85
78
null
null
nurpax/hstodo
src/Model/Db.hs
bsd-3-clause
listNotes :: Connection -> User -> IO [Note] listNotes c u = listNotes' c u Nothing
83
listNotes :: Connection -> User -> IO [Note] listNotes c u = listNotes' c u Nothing
83
listNotes c u = listNotes' c u Nothing
38
false
true
0
8
15
37
18
19
null
null
dosenfrucht/mcasm
src/Main.hs
gpl-2.0
getInput :: [String] -> String getInput [] = []
56
getInput :: [String] -> String getInput [] = []
56
getInput [] = []
25
false
true
0
6
17
29
14
15
null
null
ranjitjhala/json-biblio
src/Text/JsonBib/Types.hs
mit
readBib :: FilePath -> IO BibValue readBib f = do b <- eitherDecode' <$> LB.readFile f case b of Left err -> error err Right v -> return $ bibValue v
162
readBib :: FilePath -> IO BibValue readBib f = do b <- eitherDecode' <$> LB.readFile f case b of Left err -> error err Right v -> return $ bibValue v
162
readBib f = do b <- eitherDecode' <$> LB.readFile f case b of Left err -> error err Right v -> return $ bibValue v
127
false
true
0
12
43
77
33
44
null
null
rfranek/duckling
tests/Duckling/Ordinal/ET/Tests.hs
bsd-3-clause
tests :: TestTree tests = testGroup "ET Tests" [ makeCorpusTest [This Ordinal] corpus ]
91
tests :: TestTree tests = testGroup "ET Tests" [ makeCorpusTest [This Ordinal] corpus ]
91
tests = testGroup "ET Tests" [ makeCorpusTest [This Ordinal] corpus ]
73
false
true
0
9
17
38
16
22
null
null
kim/amazonka
amazonka-route53-domains/gen/Network/AWS/Route53Domains/Types.hs
mpl-2.0
-- | Type of the action requested. -- -- Type: String -- -- Valid values: 'REGISTER_DOMAIN' | 'DELETE_DOMAIN' | 'TRANSFER_IN_DOMAIN' | 'UPDATE_DOMAIN_CONTACT' | 'UPDATE_NAMESERVER' | 'CHANGE_PRIVACY_PROTECTION' | 'DOMAIN_LOCK' osType :: Lens' OperationSummary OperationType osType = lens _osType (\s a -> s { _osType = a...
323
osType :: Lens' OperationSummary OperationType osType = lens _osType (\s a -> s { _osType = a })
96
osType = lens _osType (\s a -> s { _osType = a })
49
true
true
0
9
45
44
26
18
null
null
scolobb/fgl
Data/Graph/Inductive/Monad/IOArray.hs
bsd-3-clause
removeDel :: IOArray Node Bool -> Adj b -> IO (Adj b) removeDel m = filterM (\(_,v)->do {b<-readArray m v;return (not b)})
122
removeDel :: IOArray Node Bool -> Adj b -> IO (Adj b) removeDel m = filterM (\(_,v)->do {b<-readArray m v;return (not b)})
122
removeDel m = filterM (\(_,v)->do {b<-readArray m v;return (not b)})
68
false
true
0
12
21
87
42
45
null
null
meteogrid/bindings-gdal
tests/TestUtils.hs
bsd-3-clause
shouldNotBe :: (MonadIO m, Show a, Eq a) => a -> a -> m () shouldNotBe a = liftIO . flip Hspec.shouldSatisfy (/=a)
115
shouldNotBe :: (MonadIO m, Show a, Eq a) => a -> a -> m () shouldNotBe a = liftIO . flip Hspec.shouldSatisfy (/=a)
115
shouldNotBe a = liftIO . flip Hspec.shouldSatisfy (/=a)
56
false
true
0
9
23
63
32
31
null
null
taiki45/hs-vm
src/VM/Instruction.hs
mit
boolToValue True = 1
20
boolToValue True = 1
20
boolToValue True = 1
20
false
false
1
5
3
13
4
9
null
null
jwiegley/ghc-release
utils/haddock/src/Haddock/Interface/Create.hs
gpl-3.0
mkWarningMap :: DynFlags -> Warnings -> GlobalRdrEnv -> [Name] -> ErrMsgM WarningMap mkWarningMap dflags warnings gre exps = case warnings of NoWarnings -> return M.empty WarnAll _ -> return M.empty WarnSome ws -> do let ws' = [ (n, w) | (occ, w) <- ws, elt <- lookupGlobalRdrEnv gre occ , let...
451
mkWarningMap :: DynFlags -> Warnings -> GlobalRdrEnv -> [Name] -> ErrMsgM WarningMap mkWarningMap dflags warnings gre exps = case warnings of NoWarnings -> return M.empty WarnAll _ -> return M.empty WarnSome ws -> do let ws' = [ (n, w) | (occ, w) <- ws, elt <- lookupGlobalRdrEnv gre occ , let...
451
mkWarningMap dflags warnings gre exps = case warnings of NoWarnings -> return M.empty WarnAll _ -> return M.empty WarnSome ws -> do let ws' = [ (n, w) | (occ, w) <- ws, elt <- lookupGlobalRdrEnv gre occ , let n = gre_name elt, n `elem` exps ] M.fromList <$> mapM parse ws' where pars...
366
false
true
0
18
113
202
98
104
null
null
AM636E/Statistics
src/Stats.hs
bsd-3-clause
indexate xs = zipWith (curry flip') xs [1..(length xs)]
55
indexate xs = zipWith (curry flip') xs [1..(length xs)]
55
indexate xs = zipWith (curry flip') xs [1..(length xs)]
55
false
false
0
8
8
33
16
17
null
null
tolysz/yesod
yesod-core/test/YesodCoreTest/ErrorHandling.hs
mit
caseBefore :: IO () caseBefore = runner $ do res <- request defaultRequest { pathInfo = ["first_thing"] , requestMethod = "POST" } assertStatus 500 res assertBodyContains "There was an error 3.14159" res
251
caseBefore :: IO () caseBefore = runner $ do res <- request defaultRequest { pathInfo = ["first_thing"] , requestMethod = "POST" } assertStatus 500 res assertBodyContains "There was an error 3.14159" res
251
caseBefore = runner $ do res <- request defaultRequest { pathInfo = ["first_thing"] , requestMethod = "POST" } assertStatus 500 res assertBodyContains "There was an error 3.14159" res
231
false
true
0
12
79
63
31
32
null
null
jc423/Husky
src/Supervised/KNN.hs
bsd-3-clause
mostCommon:: Ord a => [Neighbor a] -- ^ List of neighbors -> a -- ^ Return value mostCommon xs = mostCommonLabel $ sortBy (comparing length) $ groupByLabel xs where groupByLabel = group . sortBy (comparing labeled) mostCommonLabel = labeled . head . last -- | Nearest Neghbors
298
mostCommon:: Ord a => [Neighbor a] -- ^ List of neighbors -> a mostCommon xs = mostCommonLabel $ sortBy (comparing length) $ groupByLabel xs where groupByLabel = group . sortBy (comparing labeled) mostCommonLabel = labeled . head . last -- | Nearest Neghbors
279
mostCommon xs = mostCommonLabel $ sortBy (comparing length) $ groupByLabel xs where groupByLabel = group . sortBy (comparing labeled) mostCommonLabel = labeled . head . last -- | Nearest Neghbors
206
true
true
1
10
68
89
44
45
null
null
mikeizbicki/hmm
BioHMM.hs
bsd-3-clause
createDNAitr len order = createDNAhmm ("hmm/autowinegrape-"++show len++"-"++show order++".hmm") (len) $ simpleMM "AGCT" (order)
127
createDNAitr len order = createDNAhmm ("hmm/autowinegrape-"++show len++"-"++show order++".hmm") (len) $ simpleMM "AGCT" (order)
127
createDNAitr len order = createDNAhmm ("hmm/autowinegrape-"++show len++"-"++show order++".hmm") (len) $ simpleMM "AGCT" (order)
127
false
false
1
12
12
60
27
33
null
null
brow/noise
src/Text/Noise/Parser.hs
mit
sourceFile :: Parser AST.SourceFile sourceFile = do Token.whiteSpace ast <- ranged (AST.SourceFile <$> many statement) eof return ast
141
sourceFile :: Parser AST.SourceFile sourceFile = do Token.whiteSpace ast <- ranged (AST.SourceFile <$> many statement) eof return ast
141
sourceFile = do Token.whiteSpace ast <- ranged (AST.SourceFile <$> many statement) eof return ast
105
false
true
0
12
25
58
24
34
null
null
nfjinjing/yuuko
src/Yuuko/Text/XML/HXT/RelaxNG/PatternFunctions.hs
bsd-3-clause
isRelaxElement :: Pattern -> Bool isRelaxElement (Element _ _) = True
69
isRelaxElement :: Pattern -> Bool isRelaxElement (Element _ _) = True
69
isRelaxElement (Element _ _) = True
35
false
true
0
9
10
32
14
18
null
null
haskell/haddock
haddock-api/src/Haddock/Backends/Xhtml.hs
bsd-2-clause
processDecl :: Bool -> Html -> Maybe Html processDecl True = Just
65
processDecl :: Bool -> Html -> Maybe Html processDecl True = Just
65
processDecl True = Just
23
false
true
0
7
11
29
13
16
null
null
SwiftsNamesake/Southpaw
lib/Southpaw/Picasso/Palette.hs
mit
mediumspringgreen = (0.00000000, 0.98039200, 0.60392200, 1.0)
64
mediumspringgreen = (0.00000000, 0.98039200, 0.60392200, 1.0)
64
mediumspringgreen = (0.00000000, 0.98039200, 0.60392200, 1.0)
64
false
false
0
5
8
18
11
7
null
null
tlaitinen/fuzzy-timings
FuzzyTimings/Solve.hs
mit
-- sVar corresponds to the number of seconds used to play spots in a single -- timing bucket sVar :: Int -> String sVar i = "s" ++ (show i)
139
sVar :: Int -> String sVar i = "s" ++ (show i)
46
sVar i = "s" ++ (show i)
24
true
true
2
7
29
37
17
20
null
null
bgamari/sump
Spi.hs
bsd-3-clause
dropUntilEdge :: (a -> Level) -> Edge -> Plan (Is a) a () dropUntilEdge getLevel edge = await >>= go . getLevel where -- go :: Level -> Plan (Is a) a () go l0 = do a <- await let l1 = getLevel a case (l0, l1) ^? edgeLevels of Just edge' | edge == edge' -> yield a _ ...
343
dropUntilEdge :: (a -> Level) -> Edge -> Plan (Is a) a () dropUntilEdge getLevel edge = await >>= go . getLevel where -- go :: Level -> Plan (Is a) a () go l0 = do a <- await let l1 = getLevel a case (l0, l1) ^? edgeLevels of Just edge' | edge == edge' -> yield a _ ...
343
dropUntilEdge getLevel edge = await >>= go . getLevel where -- go :: Level -> Plan (Is a) a () go l0 = do a <- await let l1 = getLevel a case (l0, l1) ^? edgeLevels of Just edge' | edge == edge' -> yield a _ -> go l1
285
false
true
0
13
132
132
63
69
null
null
zyla/monad-batch
test/BatchTests.hs
bsd-3-clause
prop_twoBatchesWithLift x y z w = run (pair (lift (return 0) >> req x >> req z) (req y >> req w)) === [[x, y], [z, w]]
130
prop_twoBatchesWithLift x y z w = run (pair (lift (return 0) >> req x >> req z) (req y >> req w)) === [[x, y], [z, w]]
130
prop_twoBatchesWithLift x y z w = run (pair (lift (return 0) >> req x >> req z) (req y >> req w)) === [[x, y], [z, w]]
130
false
false
1
12
38
91
45
46
null
null
kumasento/accelerate
Data/Array/Accelerate/AST.hs
bsd-3-clause
showPreAccOp Map{} = "Map"
39
showPreAccOp Map{} = "Map"
39
showPreAccOp Map{} = "Map"
39
false
false
0
6
16
13
6
7
null
null
diku-dk/futhark
src/Futhark/IR/Primitive.hs
isc
blankPrimValue (IntType Int32) = IntValue $ Int32Value 0
56
blankPrimValue (IntType Int32) = IntValue $ Int32Value 0
56
blankPrimValue (IntType Int32) = IntValue $ Int32Value 0
56
false
false
0
7
7
22
10
12
null
null
Chrisr850/Villefort
test/Spec.hs
bsd-3-clause
prop_insert titl des du su= monadicIO $ do row <- run $ insertTest titl des du su assert ((row !! 0) == Row { rid=2, title=titl, description=des, due=du, subject=su, time = 0, Villefort.Todo.pred = 0.0})
299
prop_insert titl des du su= monadicIO $ do row <- run $ insertTest titl des du su assert ((row !! 0) == Row { rid=2, title=titl, description=des, due=du, subject=su, time = 0, Villefort.Todo.pred = 0.0})
299
prop_insert titl des du su= monadicIO $ do row <- run $ insertTest titl des du su assert ((row !! 0) == Row { rid=2, title=titl, description=des, due=du, subject=su, time = 0, Villefort.Todo.pred = 0.0})
299
false
false
0
12
130
106
59
47
null
null
lukexi/ghc
libraries/base/System/IO.hs
bsd-3-clause
output_flags = std_flags .|. o_CREAT
39
output_flags = std_flags .|. o_CREAT
39
output_flags = std_flags .|. o_CREAT
39
false
false
2
5
7
16
6
10
null
null
trskop/cabal
cabal-install/Distribution/Client/Sandbox.hs
bsd-3-clause
dumpPackageEnvironment :: Verbosity -> SandboxFlags -> GlobalFlags -> IO () dumpPackageEnvironment verbosity _sandboxFlags globalFlags = do (sandboxDir, pkgEnv) <- tryLoadSandboxConfig verbosity globalFlags commentPkgEnv <- commentPackageEnvironment sandboxDir putStrLn . showPackageEnvironmentWithComments ...
405
dumpPackageEnvironment :: Verbosity -> SandboxFlags -> GlobalFlags -> IO () dumpPackageEnvironment verbosity _sandboxFlags globalFlags = do (sandboxDir, pkgEnv) <- tryLoadSandboxConfig verbosity globalFlags commentPkgEnv <- commentPackageEnvironment sandboxDir putStrLn . showPackageEnvironmentWithComments ...
405
dumpPackageEnvironment verbosity _sandboxFlags globalFlags = do (sandboxDir, pkgEnv) <- tryLoadSandboxConfig verbosity globalFlags commentPkgEnv <- commentPackageEnvironment sandboxDir putStrLn . showPackageEnvironmentWithComments (Just commentPkgEnv) $ pkgEnv -- | Entry point for the 'cabal sandbox init'...
329
false
true
0
11
56
84
40
44
null
null
olorin/amazonka
amazonka-cloudfront/gen/Network/AWS/CloudFront/Types.hs
mpl-2.0
-- | Prism for DistributionNotDisabled' errors. _DistributionNotDisabled :: AsError a => Getting (First ServiceError) a ServiceError _DistributionNotDisabled = _ServiceError . hasStatus 409 . hasCode "DistributionNotDisabled"
229
_DistributionNotDisabled :: AsError a => Getting (First ServiceError) a ServiceError _DistributionNotDisabled = _ServiceError . hasStatus 409 . hasCode "DistributionNotDisabled"
181
_DistributionNotDisabled = _ServiceError . hasStatus 409 . hasCode "DistributionNotDisabled"
96
true
true
0
8
28
46
22
24
null
null
uuhan/Idris-dev
src/Idris/Primitives.hs
bsd-3-clause
trunc :: IntTy -> IntTy -> [Const] -> Maybe Const trunc ITBig to val = intToInt ITBig to val
92
trunc :: IntTy -> IntTy -> [Const] -> Maybe Const trunc ITBig to val = intToInt ITBig to val
92
trunc ITBig to val = intToInt ITBig to val
42
false
true
0
8
18
43
21
22
null
null
yihuang/xml2json
tests/Test.hs
bsd-3-clause
plistCases :: [(String, L.ByteString, Value)] plistCases = [ ( "basic" , toLazy $ T.encodeUtf8 "<plist>\ \<dict>\ \<key>name</key>\ \<string>foo</string>\ \<key>addr</key>\ \<string>bar road</string>\ \<key>age</key>\ \<...
1,354
plistCases :: [(String, L.ByteString, Value)] plistCases = [ ( "basic" , toLazy $ T.encodeUtf8 "<plist>\ \<dict>\ \<key>name</key>\ \<string>foo</string>\ \<key>addr</key>\ \<string>bar road</string>\ \<key>age</key>\ \<...
1,354
plistCases = [ ( "basic" , toLazy $ T.encodeUtf8 "<plist>\ \<dict>\ \<key>name</key>\ \<string>foo</string>\ \<key>addr</key>\ \<string>bar road</string>\ \<key>age</key>\ \<integer>25</integer>\ \<key>nil ke...
1,308
false
true
0
9
585
56
31
25
null
null
winterland1989/mysql-haskell
Database/MySQL/Protocol/Command.hs
bsd-3-clause
putCommand (COM_STMT_PREPARE stmt) = putWord8 0x16 >> putLazyByteString stmt
76
putCommand (COM_STMT_PREPARE stmt) = putWord8 0x16 >> putLazyByteString stmt
76
putCommand (COM_STMT_PREPARE stmt) = putWord8 0x16 >> putLazyByteString stmt
76
false
false
0
7
8
25
11
14
null
null
defanor/pancake
Pancake/Rendering.hs
gpl-3.0
fitLines maxLen inlineBits = concatMap (map reverse . fitWords') inlineBits where splitStyled :: Styled -> [Styled] splitStyled (Plain s) | length s > maxLen = case reverse (takeWhile (<= maxLen) (findIndices isSpace s)) of (n:_) -> let (t, _:d) = splitAt n s in Plai...
2,294
fitLines maxLen inlineBits = concatMap (map reverse . fitWords') inlineBits where splitStyled :: Styled -> [Styled] splitStyled (Plain s) | length s > maxLen = case reverse (takeWhile (<= maxLen) (findIndices isSpace s)) of (n:_) -> let (t, _:d) = splitAt n s in Plai...
2,294
fitLines maxLen inlineBits = concatMap (map reverse . fitWords') inlineBits where splitStyled :: Styled -> [Styled] splitStyled (Plain s) | length s > maxLen = case reverse (takeWhile (<= maxLen) (findIndices isSpace s)) of (n:_) -> let (t, _:d) = splitAt n s in Plai...
2,294
false
false
12
16
791
821
409
412
null
null
zepto-lang/zepto-js
src/Zepto/Primitives.hs
gpl-2.0
eval env conti (List [SimpleVal (Atom "vector-fill!"), SimpleVal (Atom var), object]) = do obj <- eval env (nullCont env) object vec <- eval env (nullCont env) =<< getVar env var result <- eval env (nullCont env) (fillVector vec obj) >>= setVar env var contEval env conti result where fillVector (Vecto...
540
eval env conti (List [SimpleVal (Atom "vector-fill!"), SimpleVal (Atom var), object]) = do obj <- eval env (nullCont env) object vec <- eval env (nullCont env) =<< getVar env var result <- eval env (nullCont env) (fillVector vec obj) >>= setVar env var contEval env conti result where fillVector (Vecto...
540
eval env conti (List [SimpleVal (Atom "vector-fill!"), SimpleVal (Atom var), object]) = do obj <- eval env (nullCont env) object vec <- eval env (nullCont env) =<< getVar env var result <- eval env (nullCont env) (fillVector vec obj) >>= setVar env var contEval env conti result where fillVector (Vecto...
540
false
false
2
14
140
237
111
126
null
null
DaMSL/K3
src/Language/K3/Analysis/HMTypes/Inference.hs
apache-2.0
-- `Shallow' substitution tvchase :: TVEnv -> K3 QType -> K3 QType tvchase tve t = acyclicChase [] t where acyclicChase path qt@(tag -> QTVar v) | v `elem` path = qt | Just nt <- tvlkup tve v = acyclicChase (v:path) nt acyclicChase _ qt = qt -- 'Shallow' substitution, additionally returni...
365
tvchase :: TVEnv -> K3 QType -> K3 QType tvchase tve t = acyclicChase [] t where acyclicChase path qt@(tag -> QTVar v) | v `elem` path = qt | Just nt <- tvlkup tve v = acyclicChase (v:path) nt acyclicChase _ qt = qt -- 'Shallow' substitution, additionally returning the last variable in --...
339
tvchase tve t = acyclicChase [] t where acyclicChase path qt@(tag -> QTVar v) | v `elem` path = qt | Just nt <- tvlkup tve v = acyclicChase (v:path) nt acyclicChase _ qt = qt -- 'Shallow' substitution, additionally returning the last variable in -- the chased chain.
298
true
true
1
9
92
134
62
72
null
null
bartavelle/manglingrules
Mangling.hs
gpl-3.0
showPos _ x = Left $ "Not yet implemented " ++ show x
53
showPos _ x = Left $ "Not yet implemented " ++ show x
53
showPos _ x = Left $ "Not yet implemented " ++ show x
53
false
false
3
6
12
23
10
13
null
null
brendanhay/gogol
gen/src/Gen/AST/Solve.hs
mpl-2.0
getSolved :: Global -> AST Solved getSolved g = loc "getSolved" g $ Solved False g <$> getPrefix g <*> getSchema g <*> getType g <*> getDerive g
182
getSolved :: Global -> AST Solved getSolved g = loc "getSolved" g $ Solved False g <$> getPrefix g <*> getSchema g <*> getType g <*> getDerive g
182
getSolved g = loc "getSolved" g $ Solved False g <$> getPrefix g <*> getSchema g <*> getType g <*> getDerive g
148
false
true
0
10
65
63
28
35
null
null
christiaanb/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v (LLe ITNative) [l, r] = v ++ "UINTOP(<=," ++ creg l ++ ", " ++ creg r ++ ")"
83
doOp v (LLe ITNative) [l, r] = v ++ "UINTOP(<=," ++ creg l ++ ", " ++ creg r ++ ")"
83
doOp v (LLe ITNative) [l, r] = v ++ "UINTOP(<=," ++ creg l ++ ", " ++ creg r ++ ")"
83
false
false
1
12
20
56
25
31
null
null
siddhanathan/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
floatDataConName = mkWiredInDataConName UserSyntax gHC_TYPES (fsLit "F#") floatDataConKey floatDataCon
109
floatDataConName = mkWiredInDataConName UserSyntax gHC_TYPES (fsLit "F#") floatDataConKey floatDataCon
109
floatDataConName = mkWiredInDataConName UserSyntax gHC_TYPES (fsLit "F#") floatDataConKey floatDataCon
109
false
false
0
7
15
23
11
12
null
null
triclops200/PongHs
main.hs
apache-2.0
bindRight (x,y) obj = obj { x = (fromIntegral x) }
52
bindRight (x,y) obj = obj { x = (fromIntegral x) }
52
bindRight (x,y) obj = obj { x = (fromIntegral x) }
52
false
false
0
8
12
31
17
14
null
null
input-output-hk/pos-haskell-prototype
wallet/src/Cardano/Wallet/Types/UtxoStatistics.hs
mit
log10 :: BoundType log10 = Log10
32
log10 :: BoundType log10 = Log10
32
log10 = Log10
13
false
true
0
4
5
11
6
5
null
null
nicolasbrugneaux/redis-haskell
src/Main.hs
bsd-3-clause
commandProcessor :: Handle -> TVar DB -> IO () commandProcessor handle db = do reply <- hGetReplies handle replyParser let command = parseReply reply runCommand handle command db
184
commandProcessor :: Handle -> TVar DB -> IO () commandProcessor handle db = do reply <- hGetReplies handle replyParser let command = parseReply reply runCommand handle command db
184
commandProcessor handle db = do reply <- hGetReplies handle replyParser let command = parseReply reply runCommand handle command db
137
false
true
0
10
33
66
29
37
null
null
sgillespie/ghc
compiler/coreSyn/TrieMap.hs
bsd-3-clause
emptyTypeMap :: TypeMap a emptyTypeMap = emptyTM
48
emptyTypeMap :: TypeMap a emptyTypeMap = emptyTM
48
emptyTypeMap = emptyTM
22
false
true
0
5
6
14
7
7
null
null
pparkkin/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
tagOf_PrimOp PopCnt32Op = _ILIT(61)
35
tagOf_PrimOp PopCnt32Op = _ILIT(61)
35
tagOf_PrimOp PopCnt32Op = _ILIT(61)
35
false
false
0
6
3
15
7
8
null
null
strager/b-shake
B/Shake/Directory.hs
bsd-3-clause
-- optimisation removeFiles dir pat = f "" >> return () where test = let ps = map (?==) pat in \x -> any ($ x) ps -- dir </> dir2 is the part to operate on, return True if you cleaned everything f :: FilePath -> IO Bool f dir2 = do xs <- fmap (map (dir2 </>)) $ contents ...
878
removeFiles dir pat = f "" >> return () where test = let ps = map (?==) pat in \x -> any ($ x) ps -- dir </> dir2 is the part to operate on, return True if you cleaned everything f :: FilePath -> IO Bool f dir2 = do xs <- fmap (map (dir2 </>)) $ contents $ dir </> dir2 ...
862
removeFiles dir pat = f "" >> return () where test = let ps = map (?==) pat in \x -> any ($ x) ps -- dir </> dir2 is the part to operate on, return True if you cleaned everything f :: FilePath -> IO Bool f dir2 = do xs <- fmap (map (dir2 </>)) $ contents $ dir </> dir2 ...
862
true
false
0
16
278
257
126
131
null
null
stevezhee/pec
src/Pec.hs
bsd-3-clause
rmrf :: FilePath -> IO () rmrf fn = do r <- doesDirectoryExist fn when r $ removeDirectoryRecursive fn
106
rmrf :: FilePath -> IO () rmrf fn = do r <- doesDirectoryExist fn when r $ removeDirectoryRecursive fn
106
rmrf fn = do r <- doesDirectoryExist fn when r $ removeDirectoryRecursive fn
80
false
true
0
8
22
46
20
26
null
null
hirokai/PaperServer
Handler/Utils.hs
bsd-2-clause
linkClass Downloaded = "link-ready"
35
linkClass Downloaded = "link-ready"
35
linkClass Downloaded = "link-ready"
35
false
false
0
5
3
9
4
5
null
null
Baranowski/SourceGraph
Analyse.hs
gpl-3.0
mkLegendGraph :: [(Int,Attributes)] -> [(Int,Int,Attributes)] -> DotGraph Node mkLegendGraph ns es = DotGraph { strictGraph = False , directedGraph = True , graphID = Nothing , graphStatemen...
1,323
mkLegendGraph :: [(Int,Attributes)] -> [(Int,Int,Attributes)] -> DotGraph Node mkLegendGraph ns es = DotGraph { strictGraph = False , directedGraph = True , graphID = Nothing , graphStatemen...
1,323
mkLegendGraph ns es = DotGraph { strictGraph = False , directedGraph = True , graphID = Nothing , graphStatements = DotStmts { attrStmts = atts ...
1,215
false
true
4
10
798
269
154
115
null
null
arybczak/happstack-server
src/Happstack/Server/Internal/Types.hs
bsd-3-clause
rqURL :: Request -> String rqURL rq = '/':intercalate "/" (rqPaths rq) ++ (rqQuery rq)
86
rqURL :: Request -> String rqURL rq = '/':intercalate "/" (rqPaths rq) ++ (rqQuery rq)
86
rqURL rq = '/':intercalate "/" (rqPaths rq) ++ (rqQuery rq)
59
false
true
2
8
14
51
22
29
null
null
wouwouwou/module_8
src/main/haskell/series6/FP_Grammar.hs
apache-2.0
op = SyntCat Op
22
op = SyntCat Op
22
op = SyntCat Op
22
false
false
0
5
10
9
4
5
null
null
GaloisInc/pads-haskell
Examples/First.hs
bsd-3-clause
expect_intRangeP24 = (24,0,"")
30
expect_intRangeP24 = (24,0,"")
30
expect_intRangeP24 = (24,0,"")
30
false
false
0
5
2
15
9
6
null
null
jiayuanmark/Haxl
tests/BatchTests.hs
bsd-3-clause
batching3_ = do let a = id1 >>= friendsOf b = id2 >>= friendsOf length <$> a .++ b -- -- Test batching over both arguments of (+) --
143
batching3_ = do let a = id1 >>= friendsOf b = id2 >>= friendsOf length <$> a .++ b -- -- Test batching over both arguments of (+) --
143
batching3_ = do let a = id1 >>= friendsOf b = id2 >>= friendsOf length <$> a .++ b -- -- Test batching over both arguments of (+) --
143
false
false
0
10
39
42
22
20
null
null
brendanhay/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Devices/Patch.hs
mpl-2.0
-- | The ID of the user. dpUserId :: Lens' DevicesPatch Text dpUserId = lens _dpUserId (\ s a -> s{_dpUserId = a})
114
dpUserId :: Lens' DevicesPatch Text dpUserId = lens _dpUserId (\ s a -> s{_dpUserId = a})
89
dpUserId = lens _dpUserId (\ s a -> s{_dpUserId = a})
53
true
true
0
9
22
47
23
24
null
null
kaizhang/bioinformatics-toolkit
bioinformatics-toolkit/src/Bio/Utils/Functions.hs
mit
-- | Jensen-Shannon divergence: JS(X,Y) = 1\/2 KL(X,(X+Y)\/2) + 1\/2 KL(Y,(X+Y)\/2). jsd :: (G.Vector v Double, G.Vector v (Double, Double)) => v Double -> v Double -> Double jsd xs ys = 0.5 * kld xs zs + 0.5 * kld ys zs where zs = G.zipWith (\x y -> (x + y) / 2) xs ys
272
jsd :: (G.Vector v Double, G.Vector v (Double, Double)) => v Double -> v Double -> Double jsd xs ys = 0.5 * kld xs zs + 0.5 * kld ys zs where zs = G.zipWith (\x y -> (x + y) / 2) xs ys
187
jsd xs ys = 0.5 * kld xs zs + 0.5 * kld ys zs where zs = G.zipWith (\x y -> (x + y) / 2) xs ys
97
true
true
0
10
59
124
62
62
null
null
yu-i9/HaSC
src/HaSC/Prim/ASTtoIntermed.hs
mit
convExpr (A_UnaryPrim _ "*" e) = do dest <- freshVar (vars, stmts) <- convExpr e return (dest:vars, stmts ++ [IRead dest (result vars)])
158
convExpr (A_UnaryPrim _ "*" e) = do dest <- freshVar (vars, stmts) <- convExpr e return (dest:vars, stmts ++ [IRead dest (result vars)])
158
convExpr (A_UnaryPrim _ "*" e) = do dest <- freshVar (vars, stmts) <- convExpr e return (dest:vars, stmts ++ [IRead dest (result vars)])
158
false
false
0
13
44
76
37
39
null
null
qnikst/distributed-process
src/Control/Distributed/Process/Internal/Types.hs
bsd-3-clause
-- | Turn any serializable term into an unencodede/local message, without -- evalutaing it! This is a dangerous business. unsafeCreateUnencodedMessage :: Serializable a => a -> Message unsafeCreateUnencodedMessage a = UnencodedMessage (fingerprint a) a
252
unsafeCreateUnencodedMessage :: Serializable a => a -> Message unsafeCreateUnencodedMessage a = UnencodedMessage (fingerprint a) a
130
unsafeCreateUnencodedMessage a = UnencodedMessage (fingerprint a) a
67
true
true
0
7
33
38
19
19
null
null
vitiaaap29/fcm1
src/Fcm.hs
bsd-3-clause
haming::Object -> Object -> Double haming [] [] = 0
51
haming::Object -> Object -> Double haming [] [] = 0
51
haming [] [] = 0
16
false
true
0
6
9
28
14
14
null
null
sopvop/cabal
Cabal/Distribution/Simple/Utils.hs
bsd-3-clause
-- | @takeWhileEndLE p@ is equivalent to @reverse . takeWhile p . reverse@, but -- is usually faster (as well as being easier to read). takeWhileEndLE :: (a -> Bool) -> [a] -> [a] takeWhileEndLE p = fst . foldr go ([], False) where go x (rest, done) | not done && p x = (x:rest, False) | otherwise = (r...
536
takeWhileEndLE :: (a -> Bool) -> [a] -> [a] takeWhileEndLE p = fst . foldr go ([], False) where go x (rest, done) | not done && p x = (x:rest, False) | otherwise = (rest, True) -- | Like "Data.List.nub", but has @O(n log n)@ complexity instead of -- @O(n^2)@. Code for 'ordNub' and 'listUnion' taken f...
400
takeWhileEndLE p = fst . foldr go ([], False) where go x (rest, done) | not done && p x = (x:rest, False) | otherwise = (rest, True) -- | Like "Data.List.nub", but has @O(n log n)@ complexity instead of -- @O(n^2)@. Code for 'ordNub' and 'listUnion' taken from Niklas Hambüchen's -- <http://github.com...
356
true
true
0
9
107
116
63
53
null
null
dmpots/fibon
tools/fibon-run/Fibon/Run/CommandLine.hs
bsd-3-clause
options :: [OptDescr OptionParser] options = [ Option ['h'] ["help"] (NoArg (\(e, opt) -> (e, opt {optHelpMsg = Just usage}))) "print a help message" , Option ['c'] ["config"] (ReqArg (\c (e, opt) -> (e, opt {optConfig = c})) "ConfigId") "default config settings" , Option ['t...
1,987
options :: [OptDescr OptionParser] options = [ Option ['h'] ["help"] (NoArg (\(e, opt) -> (e, opt {optHelpMsg = Just usage}))) "print a help message" , Option ['c'] ["config"] (ReqArg (\c (e, opt) -> (e, opt {optConfig = c})) "ConfigId") "default config settings" , Option ['t...
1,987
options = [ Option ['h'] ["help"] (NoArg (\(e, opt) -> (e, opt {optHelpMsg = Just usage}))) "print a help message" , Option ['c'] ["config"] (ReqArg (\c (e, opt) -> (e, opt {optConfig = c})) "ConfigId") "default config settings" , Option ['t'] ["tune"] (ReqArg (\t (e, o...
1,952
false
true
0
18
642
712
402
310
null
null
pjones/byline
src/Byline/Internal/Stylized.hs
bsd-2-clause
renderText :: RenderMode -> Stylized Text -> Text renderText mode stylized = foldMap go (renderInstructions mode stylized) where go :: RenderInstruction -> Text go = \case RenderText t -> t RenderSGR s -> -- NOTE: The \STX character below is not a real terminal -- escape character....
580
renderText :: RenderMode -> Stylized Text -> Text renderText mode stylized = foldMap go (renderInstructions mode stylized) where go :: RenderInstruction -> Text go = \case RenderText t -> t RenderSGR s -> -- NOTE: The \STX character below is not a real terminal -- escape character....
580
renderText mode stylized = foldMap go (renderInstructions mode stylized) where go :: RenderInstruction -> Text go = \case RenderText t -> t RenderSGR s -> -- NOTE: The \STX character below is not a real terminal -- escape character. Instead it is intercepted by Haskeline. ...
530
false
true
0
12
131
98
50
48
null
null
tmishima/Hinecraft
test/DB/WithSqlite3Spec.hs
apache-2.0
withConnect fn = do tmp <- newChan conn <- initProcess ":memory:" --conn <- initProcess "tmp.db" ret <- fn conn exitProcess tmp conn return ret
157
withConnect fn = do tmp <- newChan conn <- initProcess ":memory:" --conn <- initProcess "tmp.db" ret <- fn conn exitProcess tmp conn return ret
157
withConnect fn = do tmp <- newChan conn <- initProcess ":memory:" --conn <- initProcess "tmp.db" ret <- fn conn exitProcess tmp conn return ret
157
false
false
1
9
37
55
21
34
null
null
charringer/gonimo-back
src/Gonimo/Server/Error.hs
agpl-3.0
guardWith :: Member (Exc SomeException) r => ServerError -> Bool -> Eff r () guardWith exc cond = unless cond $ throwServer exc
127
guardWith :: Member (Exc SomeException) r => ServerError -> Bool -> Eff r () guardWith exc cond = unless cond $ throwServer exc
127
guardWith exc cond = unless cond $ throwServer exc
50
false
true
0
9
22
60
27
33
null
null
drets/scheme-haskell-48h
src/Scheme/Eval.hs
bsd-3-clause
ccase' env [List ((Atom "else"):expressions)] _ = evalExpressions env expressions
81
ccase' env [List ((Atom "else"):expressions)] _ = evalExpressions env expressions
81
ccase' env [List ((Atom "else"):expressions)] _ = evalExpressions env expressions
81
false
false
0
11
9
37
18
19
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/ProjectPlanning.hs
bsd-3-clause
-- The first pass does three things: -- -- * Set the build targets based on the user targets (but not rev deps yet). -- * A first go at determining which optional stanzas (testsuites, benchmarks) -- are needed. We have a second go in the next pass. -- * Take the dependency closure using pruned dependencies. We prune ...
4,604
pruneInstallPlanPass1 :: Map InstalledPackageId [PackageTarget] -> [ElaboratedPlanPackage] -> [ElaboratedPlanPackage] pruneInstallPlanPass1 perPkgTargetsMap pkgs = map fst $ dependencyClosure (installedPackageId . fst) -- the pkg id snd ...
4,122
pruneInstallPlanPass1 perPkgTargetsMap pkgs = map fst $ dependencyClosure (installedPackageId . fst) -- the pkg id snd -- the pruned deps [ (pkg', pruneOptionalDependencies pkg') | pkg <- pkgs , let pkg' = mapConfiguredPackage (pruneOpt...
3,960
true
true
16
12
1,280
600
309
291
null
null
markflorisson/hpack
testrepo/bytestring-0.9.1.9/Data/ByteString.hs
bsd-3-clause
empty :: ByteString empty = PS nullForeignPtr 0 0
49
empty :: ByteString empty = PS nullForeignPtr 0 0
49
empty = PS nullForeignPtr 0 0
29
false
true
0
6
8
27
10
17
null
null
unsw-comp4181/accelerate-c-stub
Data/Array/Accelerate/C/Exp.hs
bsd-3-clause
primToC (PrimAsinh ty) [a] = ccall (FloatingNumType ty `postfix` "asinh") [a]
89
primToC (PrimAsinh ty) [a] = ccall (FloatingNumType ty `postfix` "asinh") [a]
89
primToC (PrimAsinh ty) [a] = ccall (FloatingNumType ty `postfix` "asinh") [a]
89
false
false
1
8
22
41
21
20
null
null
mjhopkins/alerta-client
src/Alerta/Util.hs
bsd-3-clause
toOpts :: Int -> Int -> AesonOpts -> Aeson.Options toOpts k n (AesonOpts f u) = Aeson.defaultOptions { fieldLabelModifier = uncapitalise . onCamelComponents (drop k) , constructorTagModifier = uncapitalise . onCamelComponents (dropRight n) , omitNothingFields = True , allNullaryToStringTag = True ...
445
toOpts :: Int -> Int -> AesonOpts -> Aeson.Options toOpts k n (AesonOpts f u) = Aeson.defaultOptions { fieldLabelModifier = uncapitalise . onCamelComponents (drop k) , constructorTagModifier = uncapitalise . onCamelComponents (dropRight n) , omitNothingFields = True , allNullaryToStringTag = True ...
445
toOpts k n (AesonOpts f u) = Aeson.defaultOptions { fieldLabelModifier = uncapitalise . onCamelComponents (drop k) , constructorTagModifier = uncapitalise . onCamelComponents (dropRight n) , omitNothingFields = True , allNullaryToStringTag = True , unwrapUnaryRecords = u , sumEncoding ...
394
false
true
0
10
96
120
67
53
null
null
PeterCxy/peterbot-haskell
src/TgMonad.hs
mit
isBlacklisted :: Maybe TgUser -> TgBotI Bool isBlacklisted u = do res <- liftIdentity $ runMaybeT $ isBlacklisted' u return $ defVal res False
146
isBlacklisted :: Maybe TgUser -> TgBotI Bool isBlacklisted u = do res <- liftIdentity $ runMaybeT $ isBlacklisted' u return $ defVal res False
146
isBlacklisted u = do res <- liftIdentity $ runMaybeT $ isBlacklisted' u return $ defVal res False
101
false
true
0
9
27
54
24
30
null
null
brendanhay/gogol
gogol-run/gen/Network/Google/Run/Types/Product.hs
mpl-2.0
-- | Creates a value of 'SecretKeySelector' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'sksKey' -- -- * 'sksName' -- -- * 'sksLocalObjectReference' -- -- * 'sksOptional' secretKeySelector :: SecretKeySelector secretKeySelector...
468
secretKeySelector :: SecretKeySelector secretKeySelector = SecretKeySelector' { _sksKey = Nothing , _sksName = Nothing , _sksLocalObjectReference = Nothing , _sksOptional = Nothing }
208
secretKeySelector = SecretKeySelector' { _sksKey = Nothing , _sksName = Nothing , _sksLocalObjectReference = Nothing , _sksOptional = Nothing }
165
true
true
0
6
94
48
34
14
null
null
thomie/cabal
cabal-install/tests/SolverQuickCheck.hs
bsd-3-clause
tests :: TestTree tests = testGroup "Solver QuickCheck" [ testGroup "UnitTests.Distribution.Solver.Modular.QuickCheck" UnitTests.Distribution.Solver.Modular.QuickCheck.tests ]
189
tests :: TestTree tests = testGroup "Solver QuickCheck" [ testGroup "UnitTests.Distribution.Solver.Modular.QuickCheck" UnitTests.Distribution.Solver.Modular.QuickCheck.tests ]
189
tests = testGroup "Solver QuickCheck" [ testGroup "UnitTests.Distribution.Solver.Modular.QuickCheck" UnitTests.Distribution.Solver.Modular.QuickCheck.tests ]
171
false
true
0
8
26
38
18
20
null
null
imuli/gitit
Network/Gitit/Export.hs
gpl-2.0
respondPlain :: String -> Pandoc -> Handler respondPlain = respondS "plain" "text/plain; charset=utf-8" "" writePlain defaultRespOptions
138
respondPlain :: String -> Pandoc -> Handler respondPlain = respondS "plain" "text/plain; charset=utf-8" "" writePlain defaultRespOptions
138
respondPlain = respondS "plain" "text/plain; charset=utf-8" "" writePlain defaultRespOptions
94
false
true
0
6
17
32
15
17
null
null
nvasilakis/lsh
Types.hs
bsd-3-clause
defaultUni :: Uni defaultUni = Universe [] Map.empty Map.empty [] 0 Map.empty
77
defaultUni :: Uni defaultUni = Universe [] Map.empty Map.empty [] 0 Map.empty
77
defaultUni = Universe [] Map.empty Map.empty [] 0 Map.empty
59
false
true
0
6
11
34
17
17
null
null
triplepointfive/wmexchanger
src/API/WebMoney/Internal/Request.hs
mit
queryString :: [(String, Maybe Int)] -> String queryString = intercalate "&" . map (\(k, v) -> k ++ "=" ++ (show $ fromJust v)) . filter (isJust . snd)
151
queryString :: [(String, Maybe Int)] -> String queryString = intercalate "&" . map (\(k, v) -> k ++ "=" ++ (show $ fromJust v)) . filter (isJust . snd)
151
queryString = intercalate "&" . map (\(k, v) -> k ++ "=" ++ (show $ fromJust v)) . filter (isJust . snd)
104
false
true
0
13
28
83
44
39
null
null
rueshyna/gogol
gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Operations/Cancel.hs
mpl-2.0
-- | The server-assigned \`name\` of the operation. pzocOperationId :: Lens' ProjectsZonesOperationsCancel Text pzocOperationId = lens _pzocOperationId (\ s a -> s{_pzocOperationId = a})
194
pzocOperationId :: Lens' ProjectsZonesOperationsCancel Text pzocOperationId = lens _pzocOperationId (\ s a -> s{_pzocOperationId = a})
142
pzocOperationId = lens _pzocOperationId (\ s a -> s{_pzocOperationId = a})
82
true
true
0
8
31
43
22
21
null
null
TomMD/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
eqTag_RDR = dataQual_RDR gHC_TYPES (fsLit "EQ")
61
eqTag_RDR = dataQual_RDR gHC_TYPES (fsLit "EQ")
61
eqTag_RDR = dataQual_RDR gHC_TYPES (fsLit "EQ")
61
false
false
0
7
19
17
8
9
null
null
ku-fpg/ecc-manifold
src/ECC/Tester.hs
bsd-3-clause
eccMerger :: IO () eccMerger = do args <- getArgs if null args then error $ "usage: <name> [-v<n>] [-b<n>] [-m<n>] [-l<file or dir/>] [-c] log/<file> log/<file>" else do let opts = parseOptions args $ defaultOptions "merge/" -- print opts -- now we try load the files. logs <...
2,575
eccMerger :: IO () eccMerger = do args <- getArgs if null args then error $ "usage: <name> [-v<n>] [-b<n>] [-m<n>] [-l<file or dir/>] [-c] log/<file> log/<file>" else do let opts = parseOptions args $ defaultOptions "merge/" -- print opts -- now we try load the files. logs <...
2,575
eccMerger = do args <- getArgs if null args then error $ "usage: <name> [-v<n>] [-b<n>] [-m<n>] [-l<file or dir/>] [-c] log/<file> log/<file>" else do let opts = parseOptions args $ defaultOptions "merge/" -- print opts -- now we try load the files. logs <- sequence ...
2,556
false
true
1
26
1,081
727
351
376
null
null
Heather/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reifyTTBinderApp reif f [t, k] | f == reflm "Pi" = liftM2 (Pi RigW Nothing) (reif t) (reif k)
115
reifyTTBinderApp reif f [t, k] | f == reflm "Pi" = liftM2 (Pi RigW Nothing) (reif t) (reif k)
115
reifyTTBinderApp reif f [t, k] | f == reflm "Pi" = liftM2 (Pi RigW Nothing) (reif t) (reif k)
115
false
false
0
9
40
59
28
31
null
null
jwiegley/ghc-release
libraries/base/Data/List.hs
gpl-3.0
-- | The 'zipWith7' function takes a function which combines seven -- elements, as well as seven lists and returns a list of their point-wise -- combination, analogous to 'zipWith'. zipWith7 :: (a->b->c->d->e->f->g->h) -> [a]->[b]->[c]->[d]->[e]->[f]->[g]->[h] zipWith7 z (a:as)...
434
zipWith7 :: (a->b->c->d->e->f->g->h) -> [a]->[b]->[c]->[d]->[e]->[f]->[g]->[h] zipWith7 z (a:as) (b:bs) (c:cs) (d:ds) (e:es) (f:fs) (g:gs) = z a b c d e f g : zipWith7 z as bs cs ds es fs gs
252
zipWith7 z (a:as) (b:bs) (c:cs) (d:ds) (e:es) (f:fs) (g:gs) = z a b c d e f g : zipWith7 z as bs cs ds es fs gs
131
true
true
0
13
124
203
110
93
null
null
thsutton/tincan
src/Learning/TinCan/Validation.hs
bsd-2-clause
validateAuthority json@(Object _) = fail "No implementation for validateAuthority"
82
validateAuthority json@(Object _) = fail "No implementation for validateAuthority"
82
validateAuthority json@(Object _) = fail "No implementation for validateAuthority"
82
false
false
0
8
8
21
10
11
null
null
keera-studios/hsQt
Qtc/Gui/QIconEngineV2.hs
bsd-2-clause
qIconEngineV2_delete1 :: QIconEngineV2 a -> IO () qIconEngineV2_delete1 x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QIconEngineV2_delete1 cobj_x0
147
qIconEngineV2_delete1 :: QIconEngineV2 a -> IO () qIconEngineV2_delete1 x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QIconEngineV2_delete1 cobj_x0
147
qIconEngineV2_delete1 x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QIconEngineV2_delete1 cobj_x0
97
false
true
0
7
22
41
19
22
null
null
haskell-distributed/distributed-process
src/Control/Distributed/Process/Internal/CQueue.hs
bsd-3-clause
-- Splits a list of matches into chunks. -- -- > concatMap (either (map MatchMsg) (map MatchChan)) . chunkMatches == id -- chunkMatches :: [MatchOn m a] -> MatchChunks m a chunkMatches [] = []
192
chunkMatches :: [MatchOn m a] -> MatchChunks m a chunkMatches [] = []
69
chunkMatches [] = []
20
true
true
0
7
34
39
21
18
null
null
keithodulaigh/Hets
VSE/Parse.hs
gpl-2.0
reservedWords :: [String] reservedWords = let rs = [ "in", "out", "begin", "end", "abort", "skip", "return", "declare" , "if", "then", "else", "fi", "while", "do", "od" , "defprocs", "defprocsend", "restricted" ] in [ "<:", ":>"] ++ declWords ++ rs ++ map (map toUpper) rs
288
reservedWords :: [String] reservedWords = let rs = [ "in", "out", "begin", "end", "abort", "skip", "return", "declare" , "if", "then", "else", "fi", "while", "do", "od" , "defprocs", "defprocsend", "restricted" ] in [ "<:", ":>"] ++ declWords ++ rs ++ map (map toUpper) rs
288
reservedWords = let rs = [ "in", "out", "begin", "end", "abort", "skip", "return", "declare" , "if", "then", "else", "fi", "while", "do", "od" , "defprocs", "defprocsend", "restricted" ] in [ "<:", ":>"] ++ declWords ++ rs ++ map (map toUpper) rs
262
false
true
0
10
58
108
64
44
null
null
jeremyjh/free-agent
core/src/FreeAgent/AgentPrelude.hs
bsd-3-clause
tryAnyConvT :: (MonadBaseControl IO io, Convertible SomeException e) => io a -> ExceptT e io a tryAnyConvT ma = lift (tryAny ma) >>= convExceptT
156
tryAnyConvT :: (MonadBaseControl IO io, Convertible SomeException e) => io a -> ExceptT e io a tryAnyConvT ma = lift (tryAny ma) >>= convExceptT
156
tryAnyConvT ma = lift (tryAny ma) >>= convExceptT
49
false
true
0
8
35
60
29
31
null
null
zepto-lang/zepto-js
src/Zepto/Macro.hs
gpl-2.0
checkLocal localEnv identifiers hasEllipsis pattern@(List _) input@(List _) = loadLocal localEnv identifiers pattern input False hasEllipsis
142
checkLocal localEnv identifiers hasEllipsis pattern@(List _) input@(List _) = loadLocal localEnv identifiers pattern input False hasEllipsis
142
checkLocal localEnv identifiers hasEllipsis pattern@(List _) input@(List _) = loadLocal localEnv identifiers pattern input False hasEllipsis
142
false
false
0
8
17
52
24
28
null
null
text-utf8/text
Data/Text/Lazy.hs
bsd-2-clause
tail Empty = emptyError "tail"
37
tail Empty = emptyError "tail"
37
tail Empty = emptyError "tail"
37
false
false
0
5
11
12
5
7
null
null
tbarnetlamb/hyphen
hyphen/lowlevel_src/HyphenGHC.hs
gpl-2.0
transformGHCTyNSElt :: Text -> GHC.TyCon -> Maybe (Text, TyNSElt) transformGHCTyNSElt import_module tyc = let ghcName = GHC.getName tyc oname = T.pack . GHCOccName.occNameString $ GHC.getOccName ghcName fullname = T.concat [import_module, T.pack ".", oname] args = [ Var . (T.append $ T.p...
2,287
transformGHCTyNSElt :: Text -> GHC.TyCon -> Maybe (Text, TyNSElt) transformGHCTyNSElt import_module tyc = let ghcName = GHC.getName tyc oname = T.pack . GHCOccName.occNameString $ GHC.getOccName ghcName fullname = T.concat [import_module, T.pack ".", oname] args = [ Var . (T.append $ T.p...
2,287
transformGHCTyNSElt import_module tyc = let ghcName = GHC.getName tyc oname = T.pack . GHCOccName.occNameString $ GHC.getOccName ghcName fullname = T.concat [import_module, T.pack ".", oname] args = [ Var . (T.append $ T.pack "arg_") . T.pack . show $ i | i <- [1..GHCTyC...
2,221
false
true
2
21
558
439
229
210
null
null
bfpg/brisparks.info
src/Site.hs
mit
httpErrorJson :: Int -> BS.ByteString -> String -> AppHandler a httpErrorJson status statusMsg msg = do modifyResponse $ setResponseStatus status statusMsg writeJSON (object ["errorMessage" .= msg]) getResponse >>= finishWith
231
httpErrorJson :: Int -> BS.ByteString -> String -> AppHandler a httpErrorJson status statusMsg msg = do modifyResponse $ setResponseStatus status statusMsg writeJSON (object ["errorMessage" .= msg]) getResponse >>= finishWith
231
httpErrorJson status statusMsg msg = do modifyResponse $ setResponseStatus status statusMsg writeJSON (object ["errorMessage" .= msg]) getResponse >>= finishWith
167
false
true
0
11
34
73
34
39
null
null
acowley/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
isFFIImportResultTy :: DynFlags -> Type -> Validity isFFIImportResultTy dflags ty = checkRepTyCon (legalFIResultTyCon dflags) ty
130
isFFIImportResultTy :: DynFlags -> Type -> Validity isFFIImportResultTy dflags ty = checkRepTyCon (legalFIResultTyCon dflags) ty
130
isFFIImportResultTy dflags ty = checkRepTyCon (legalFIResultTyCon dflags) ty
78
false
true
0
7
16
40
18
22
null
null
basile-henry/hs-ipfs-api
src/Network/IPFS.hs
mit
add :: ByteString -> IPFS FileHash add raw = maybe (error "Failed to add.") id . JSON.decode <$> callWithContent ["add"] [("q", "true")] [] (Raw raw)
153
add :: ByteString -> IPFS FileHash add raw = maybe (error "Failed to add.") id . JSON.decode <$> callWithContent ["add"] [("q", "true")] [] (Raw raw)
153
add raw = maybe (error "Failed to add.") id . JSON.decode <$> callWithContent ["add"] [("q", "true")] [] (Raw raw)
118
false
true
2
8
28
78
37
41
null
null
keithodulaigh/Hets
LF/Analysis.hs
gpl-2.0
-- symbol map analysis for LF symbMapAnalysis :: [SYMB_MAP_ITEMS] -> Result (Map.Map RAW_SYM RAW_SYM) symbMapAnalysis ss = Result [] $ Just $ foldl (\ m s -> Map.union m (makeSymbMap s)) Map.empty ss
201
symbMapAnalysis :: [SYMB_MAP_ITEMS] -> Result (Map.Map RAW_SYM RAW_SYM) symbMapAnalysis ss = Result [] $ Just $ foldl (\ m s -> Map.union m (makeSymbMap s)) Map.empty ss
171
symbMapAnalysis ss = Result [] $ Just $ foldl (\ m s -> Map.union m (makeSymbMap s)) Map.empty ss
99
true
true
0
11
34
80
40
40
null
null
5outh/Bang
src/Bang/Interface/Base.hs
mit
m5 :: Monoid a => a -> a -> a -> a -> a -> a m5 a b c d e = mconcat [a, b, c, d, e]
83
m5 :: Monoid a => a -> a -> a -> a -> a -> a m5 a b c d e = mconcat [a, b, c, d, e]
83
m5 a b c d e = mconcat [a, b, c, d, e]
38
false
true
0
12
28
72
36
36
null
null
tuura/fantasi
src/Tuura/Fantasi/VHDL/Internal/EnvironmentWriter.hs
mit
register :: String register = "\tCOMPONENT Generic_register IS\n" ++ "\t\tGENERIC (N : integer);\n" ++ "\t\tPORT (\n" ++ "\t\t\tCLK\t: IN\tstd_logic;\n" ++ "\t\t\tRST\t: IN\tstd_logic;\n" ++ "\t\t\tEN\t: IN\tstd_logic;\n" ++ "\t\t\tDIN\...
474
register :: String register = "\tCOMPONENT Generic_register IS\n" ++ "\t\tGENERIC (N : integer);\n" ++ "\t\tPORT (\n" ++ "\t\t\tCLK\t: IN\tstd_logic;\n" ++ "\t\t\tRST\t: IN\tstd_logic;\n" ++ "\t\t\tEN\t: IN\tstd_logic;\n" ++ "\t\t\tDIN\...
474
register = "\tCOMPONENT Generic_register IS\n" ++ "\t\tGENERIC (N : integer);\n" ++ "\t\tPORT (\n" ++ "\t\t\tCLK\t: IN\tstd_logic;\n" ++ "\t\t\tRST\t: IN\tstd_logic;\n" ++ "\t\t\tEN\t: IN\tstd_logic;\n" ++ "\t\t\tDIN\t: IN\tstd_logic_ve...
455
false
true
0
12
149
43
22
21
null
null
beni55/aeson
Data/Aeson/Types/Instances.hs
bsd-3-clause
encodeWithKey :: (ToJSON k, ToJSON v) => ((k -> v -> Series -> Series) -> Series -> m -> Series) -> m -> B.Builder encodeWithKey foldrWithKey xs = E.series '{' '}' . foldrWithKey go mempty $ xs where go k v c = Value (encodePair k v) <> c
271
encodeWithKey :: (ToJSON k, ToJSON v) => ((k -> v -> Series -> Series) -> Series -> m -> Series) -> m -> B.Builder encodeWithKey foldrWithKey xs = E.series '{' '}' . foldrWithKey go mempty $ xs where go k v c = Value (encodePair k v) <> c
271
encodeWithKey foldrWithKey xs = E.series '{' '}' . foldrWithKey go mempty $ xs where go k v c = Value (encodePair k v) <> c
125
false
true
0
13
81
129
61
68
null
null
rodrigogribeiro/mptc
src/Language/Haskell/Exts/Build.hs
bsd-3-clause
-- | Put parentheses around an expression. paren :: Exp -> Exp paren = Paren
76
paren :: Exp -> Exp paren = Paren
33
paren = Paren
13
true
true
0
5
14
16
9
7
null
null
rahulmutt/ghcvm
compiler/Eta/TypeCheck/TcRnTypes.hs
bsd-3-clause
consCts :: Ct -> Cts -> Cts consCts = consBag
45
consCts :: Ct -> Cts -> Cts consCts = consBag
45
consCts = consBag
17
false
true
0
8
9
26
11
15
null
null
WesternU2016/HaskellCrypto
project.hs
gpl-3.0
decode :: Int -> Char decode i = decodeChar (decodeInt i)
62
decode :: Int -> Char decode i = decodeChar (decodeInt i)
57
decode i = decodeChar (decodeInt i)
35
false
true
0
7
15
29
13
16
null
null
teh/teh-ssh
src/SSH/Session.hs
bsd-3-clause
getPacket :: Session () getPacket = do s <- get h <- gets ssThem case s of Final { ssGotNEWKEYS = True , ssInCipher = Cipher _ _ bs _ , ssInHMAC = HMAC ms f , ssInSeq = is } -> do let firstChunk = max 8 bs f...
1,861
getPacket :: Session () getPacket = do s <- get h <- gets ssThem case s of Final { ssGotNEWKEYS = True , ssInCipher = Cipher _ _ bs _ , ssInHMAC = HMAC ms f , ssInSeq = is } -> do let firstChunk = max 8 bs f...
1,861
getPacket = do s <- get h <- gets ssThem case s of Final { ssGotNEWKEYS = True , ssInCipher = Cipher _ _ bs _ , ssInHMAC = HMAC ms f , ssInSeq = is } -> do let firstChunk = max 8 bs firstEnc <- liftIO $ LBS....
1,837
false
true
2
19
733
658
318
340
null
null