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
gbaz/cabal
cabal-install/Distribution/Client/Dependency/Modular/IndexConversion.hs
bsd-3-clause
-- | Convenience function to delete a 'FlaggedDep' if it's -- for a 'PN' that isn't actually real. filterIPNs :: IPNs -> Dependency -> FlaggedDep Component PN -> FlaggedDeps Component PN filterIPNs ipns (Dependency pn _) fd | S.notMember pn ipns = [fd] | otherwise = []
287
filterIPNs :: IPNs -> Dependency -> FlaggedDep Component PN -> FlaggedDeps Component PN filterIPNs ipns (Dependency pn _) fd | S.notMember pn ipns = [fd] | otherwise = []
188
filterIPNs ipns (Dependency pn _) fd | S.notMember pn ipns = [fd] | otherwise = []
100
true
true
0
9
64
77
37
40
null
null
mainland/dph
dph-lifted-copy/Data/Array/Parallel/Lifted/Combinators.hs
bsd-3-clause
slicePA_l (PArray n# is) (PArray _ lens) (PArray _ xss) = PArray n# $ case xss of { PNested segd xs -> PNested segd' $ bpermutePD xs (elementsSegd# segd') (U.zipWith (+) (U.indices_s segd') (U.replicate_s segd' (U.zipWith (...
649
slicePA_l (PArray n# is) (PArray _ lens) (PArray _ xss) = PArray n# $ case xss of { PNested segd xs -> PNested segd' $ bpermutePD xs (elementsSegd# segd') (U.zipWith (+) (U.indices_s segd') (U.replicate_s segd' (U.zipWith (...
649
slicePA_l (PArray n# is) (PArray _ lens) (PArray _ xss) = PArray n# $ case xss of { PNested segd xs -> PNested segd' $ bpermutePD xs (elementsSegd# segd') (U.zipWith (+) (U.indices_s segd') (U.replicate_s segd' (U.zipWith (...
649
false
false
2
18
223
163
82
81
null
null
rahulmutt/ghcvm
compiler/Eta/BasicTypes/DataCon.hs
bsd-3-clause
dataConFieldLabels :: DataCon -> [FieldLabel] dataConFieldLabels = dcFields
75
dataConFieldLabels :: DataCon -> [FieldLabel] dataConFieldLabels = dcFields
75
dataConFieldLabels = dcFields
29
false
true
0
6
7
18
10
8
null
null
DaMSL/K3
src/Language/K3/Parser/ProgramBuilder.hs
apache-2.0
{- Runtime functions -} openBuiltinFn :: K3 Expression openBuiltinFn = EC.variable "openBuiltin"
96
openBuiltinFn :: K3 Expression openBuiltinFn = EC.variable "openBuiltin"
72
openBuiltinFn = EC.variable "openBuiltin"
41
true
true
0
6
11
20
10
10
null
null
kmate/raw-feldspar
src/Feldspar/Data/Vector.hs
bsd-3-clause
-- | Append two vectors to make a 'Push' vector (++) :: (Pushy m vec1 a, Pushy m vec2 a, Monad m) => vec1 -> vec2 -> Push m a vec1 ++ vec2 = Push (len1 + length v2) $ \write -> dumpPush v1 write >> dumpPush v2 (write . (+len1)) where v1 = toPush vec1 v2 = toPush vec2 len1 = length v1 -- Concatena...
356
(++) :: (Pushy m vec1 a, Pushy m vec2 a, Monad m) => vec1 -> vec2 -> Push m a vec1 ++ vec2 = Push (len1 + length v2) $ \write -> dumpPush v1 write >> dumpPush v2 (write . (+len1)) where v1 = toPush vec1 v2 = toPush vec2 len1 = length v1 -- Concatenate nested vectors to a 'Push' vector
308
vec1 ++ vec2 = Push (len1 + length v2) $ \write -> dumpPush v1 write >> dumpPush v2 (write . (+len1)) where v1 = toPush vec1 v2 = toPush vec2 len1 = length v1 -- Concatenate nested vectors to a 'Push' vector
230
true
true
0
11
94
140
71
69
null
null
huggablemonad/smooch
app/tests/ParseCelSpec.hs
gpl-3.0
-- | Old style with invalid height. invalidOldCel4 :: ByteString invalidOldCel4 = let header = makeOldHeader 1 0 celData = BS.singleton 0x00 in BS.concat [header, celData]
181
invalidOldCel4 :: ByteString invalidOldCel4 = let header = makeOldHeader 1 0 celData = BS.singleton 0x00 in BS.concat [header, celData]
145
invalidOldCel4 = let header = makeOldHeader 1 0 celData = BS.singleton 0x00 in BS.concat [header, celData]
116
true
true
0
10
35
55
26
29
null
null
FranklinChen/Idris-dev
src/Idris/Core/Evaluate.hs
bsd-3-clause
canonical (VUType _) = True
27
canonical (VUType _) = True
27
canonical (VUType _) = True
27
false
false
0
7
4
15
7
8
null
null
amccausl/Swish
Swish/HaskellRDF/N3ParserTest.hs
lgpl-2.1
tx1630 = arc b5 p2 o2
21
tx1630 = arc b5 p2 o2
21
tx1630 = arc b5 p2 o2
21
false
false
0
5
5
13
6
7
null
null
SEEK-Org/evaporate
src/Stack.hs
mit
throwIfStackFailed a = throwM $ StackOperationFailed a
66
throwIfStackFailed a = throwM $ StackOperationFailed a
66
throwIfStackFailed a = throwM $ StackOperationFailed a
66
false
false
0
6
18
16
7
9
null
null
vito/hummus
src/Hummus/Types.hs
bsd-3-clause
toList :: Value ans -> [Value ans] toList (Pair a b) = a : toList b
67
toList :: Value ans -> [Value ans] toList (Pair a b) = a : toList b
67
toList (Pair a b) = a : toList b
32
false
true
2
9
15
49
21
28
null
null
sgillespie/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
isSigMaybe (ConArgCtxt n) = Just n
36
isSigMaybe (ConArgCtxt n) = Just n
36
isSigMaybe (ConArgCtxt n) = Just n
36
false
false
0
7
7
18
8
10
null
null
klarh/hasdy
test/NeighborList.hs
apache-2.0
triplify (x:y:z:rest) = (x, y, z):triplify rest
47
triplify (x:y:z:rest) = (x, y, z):triplify rest
47
triplify (x:y:z:rest) = (x, y, z):triplify rest
47
false
false
0
9
6
40
21
19
null
null
Zigazou/containers
Data/Tree.hs
bsd-3-clause
unfoldForestM f = Prelude.mapM (unfoldTreeM f)
46
unfoldForestM f = Prelude.mapM (unfoldTreeM f)
46
unfoldForestM f = Prelude.mapM (unfoldTreeM f)
46
false
false
1
7
5
23
9
14
null
null
anton-dessiatov/stack
src/Stack/Types/Config.hs
bsd-3-clause
installationRootDeps :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => m (Path Abs Dir) installationRootDeps = do root <- view stackRootL -- TODO: also useShaPathOnWindows here, once #1173 is resolved. psc <- platformSnapAndCompilerRel return $ root </> $(mkRelDir "snapshots") </> psc -- | Inst...
344
installationRootDeps :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => m (Path Abs Dir) installationRootDeps = do root <- view stackRootL -- TODO: also useShaPathOnWindows here, once #1173 is resolved. psc <- platformSnapAndCompilerRel return $ root </> $(mkRelDir "snapshots") </> psc -- | Inst...
344
installationRootDeps = do root <- view stackRootL -- TODO: also useShaPathOnWindows here, once #1173 is resolved. psc <- platformSnapAndCompilerRel return $ root </> $(mkRelDir "snapshots") </> psc -- | Installation root for locals
248
false
true
0
11
63
92
43
49
null
null
mietek/untitled-wai
src/Access.hs
bsd-3-clause
createPrivsTable :: DB -> IO () createPrivsTable db = do execute_ db [sql| CREATE TABLE privs ( priv_id serial PRIMARY KEY , priv_name text NOT NULL UNIQUE ) |] createAudit db "privs"
229
createPrivsTable :: DB -> IO () createPrivsTable db = do execute_ db [sql| CREATE TABLE privs ( priv_id serial PRIMARY KEY , priv_name text NOT NULL UNIQUE ) |] createAudit db "privs"
229
createPrivsTable db = do execute_ db [sql| CREATE TABLE privs ( priv_id serial PRIMARY KEY , priv_name text NOT NULL UNIQUE ) |] createAudit db "privs"
197
false
true
0
7
77
43
21
22
null
null
mrmonday/Idris-dev
src/Idris/Primitives.hs
bsd-3-clause
bUn (ITFixed IT16) op [B16 x] = Just $ B16 (op x)
53
bUn (ITFixed IT16) op [B16 x] = Just $ B16 (op x)
53
bUn (ITFixed IT16) op [B16 x] = Just $ B16 (op x)
53
false
false
0
8
15
38
18
20
null
null
chwthewke/horbits
testsuite/Horbits/UI/CameraTest.hs
bsd-3-clause
genCamera :: Gen (OrthoCamera Double) genCamera = do cx <- double cy <- double cz <- double col <- choose (0, pi) lng <- choose (0, 2 * pi) s <- double w <- int h <- int return $ OrthoCamera (V3 cx cy cz) col lng s w h $ linearZoom 1 (1, 10) where double = choose (0, 1000) `suc...
361
genCamera :: Gen (OrthoCamera Double) genCamera = do cx <- double cy <- double cz <- double col <- choose (0, pi) lng <- choose (0, 2 * pi) s <- double w <- int h <- int return $ OrthoCamera (V3 cx cy cz) col lng s w h $ linearZoom 1 (1, 10) where double = choose (0, 1000) `suc...
361
genCamera = do cx <- double cy <- double cz <- double col <- choose (0, pi) lng <- choose (0, 2 * pi) s <- double w <- int h <- int return $ OrthoCamera (V3 cx cy cz) col lng s w h $ linearZoom 1 (1, 10) where double = choose (0, 1000) `suchThat` (> 0) int = choose (100, 20...
323
false
true
4
11
114
196
92
104
null
null
Fuuzetsu/cabal2nix
src/Distribution/Nixpkgs/Haskell/FromCabal/Normalize.hs
bsd-3-clause
quote [] = []
22
quote [] = []
22
quote [] = []
22
false
false
0
6
12
13
6
7
null
null
DavidAlphaFox/ghc
libraries/bytestring/Data/ByteString/Char8.hs
bsd-3-clause
unlines :: [ByteString] -> ByteString unlines [] = empty
56
unlines :: [ByteString] -> ByteString unlines [] = empty
56
unlines [] = empty
18
false
true
0
6
8
23
12
11
null
null
llllllllll/htst
Htst/Runner.hs
gpl-2.0
-- drop the root '/' -- | Recursive copy of a directory into the tmpDir. -- Only copies the files that match the predicate. cpR :: (String -> Bool) -> FilePath -> IO () cpR pred d = find always applyPred d >>= mapM_ cp where cp p = doesDirectoryExist p >>= \b -> (if b th...
510
cpR :: (String -> Bool) -> FilePath -> IO () cpR pred d = find always applyPred d >>= mapM_ cp where cp p = doesDirectoryExist p >>= \b -> (if b then createDirectoryIfMissing True else copyFile p) $ underTmp p applyPred = pred <$> filePath |...
384
cpR pred d = find always applyPred d >>= mapM_ cp where cp p = doesDirectoryExist p >>= \b -> (if b then createDirectoryIfMissing True else copyFile p) $ underTmp p applyPred = pred <$> filePath ||? (== Directory) <$> fileType -- | Runs an...
339
true
true
14
9
163
143
67
76
null
null
GRACeFUL-project/GRACe
examples/CLD.hs
bsd-3-clause
constructSum :: [Port Sign] -> GCM (Port Sign) constructSum [] = do p <- createPort set p 0 return p
106
constructSum :: [Port Sign] -> GCM (Port Sign) constructSum [] = do p <- createPort set p 0 return p
106
constructSum [] = do p <- createPort set p 0 return p
59
false
true
0
9
25
61
26
35
null
null
co-dan/warm_fuzzy_things
src/Data/Functor/Algebra.hs
bsd-3-clause
optPlus = optPlus'
18
optPlus = optPlus'
18
optPlus = optPlus'
18
false
false
0
4
2
6
3
3
null
null
ulricha/algebra-sql
src/Database/Algebra/SQL/Render/Query.hs
bsd-3-clause
renderExtractField ExtractMonth = kw "month"
44
renderExtractField ExtractMonth = kw "month"
44
renderExtractField ExtractMonth = kw "month"
44
false
false
0
5
4
12
5
7
null
null
Gwin73/Schemini
src/one-file-version/Schemini.hs
mit
primEnv = M.fromList [("+", Function $ intIntBinop (+)), ("-", Function $ intIntBinop (-)), ("*", Function $ intIntBinop (*)), ("/", Function $ intIntBinop div), ("mod", Function $ intIntBinop mod), ("=", Function $ intBoolBinop (==)), (">", Function $ intBoolBinop (>)), (">=", Funct...
1,207
primEnv = M.fromList [("+", Function $ intIntBinop (+)), ("-", Function $ intIntBinop (-)), ("*", Function $ intIntBinop (*)), ("/", Function $ intIntBinop div), ("mod", Function $ intIntBinop mod), ("=", Function $ intBoolBinop (==)), (">", Function $ intBoolBinop (>)), (">=", Funct...
1,207
primEnv = M.fromList [("+", Function $ intIntBinop (+)), ("-", Function $ intIntBinop (-)), ("*", Function $ intIntBinop (*)), ("/", Function $ intIntBinop div), ("mod", Function $ intIntBinop mod), ("=", Function $ intBoolBinop (==)), (">", Function $ intBoolBinop (>)), (">=", Funct...
1,207
false
false
0
10
254
472
273
199
null
null
sleepomeno/TForth
src/TF/Util.hs
apache-2.0
fromThree' (Three' (x,y)) = (x,y) & both %~ view _Wrapped & uncurry zip
71
fromThree' (Three' (x,y)) = (x,y) & both %~ view _Wrapped & uncurry zip
71
fromThree' (Three' (x,y)) = (x,y) & both %~ view _Wrapped & uncurry zip
71
false
false
0
8
12
45
23
22
null
null
sebaste/dotfiles
.xmonad/xmonad.hs
mit
-- Border color for focused window. myFocusedBorderColor = "#2973bc"
68
myFocusedBorderColor = "#2973bc"
32
myFocusedBorderColor = "#2973bc"
32
true
false
0
4
8
7
4
3
null
null
kovach/libsbp
haskell/src/SwiftNav/SBP/Piksi.hs
lgpl-3.0
msgResetFilters :: Word16 msgResetFilters = 0x0022
50
msgResetFilters :: Word16 msgResetFilters = 0x0022
50
msgResetFilters = 0x0022
24
false
true
0
6
5
18
7
11
null
null
hferreiro/replay
compiler/cmm/CLabel.hs
bsd-3-clause
needsCDecl (LargeBitmapLabel _) = False
47
needsCDecl (LargeBitmapLabel _) = False
47
needsCDecl (LargeBitmapLabel _) = False
47
false
false
0
7
12
15
7
8
null
null
oldmanmike/ghc
compiler/main/DynFlags.hs
bsd-3-clause
package_flags_deps :: [(Deprecation, Flag (CmdLineP DynFlags))] package_flags_deps = [ ------- Packages ---------------------------------------------------- make_ord_flag defFlag "package-db" (HasArg (addPkgConfRef . PkgConfFile)) , make_ord_flag defFlag "clear-package-db" (NoArg clearPkgConf) ...
2,925
package_flags_deps :: [(Deprecation, Flag (CmdLineP DynFlags))] package_flags_deps = [ ------- Packages ---------------------------------------------------- make_ord_flag defFlag "package-db" (HasArg (addPkgConfRef . PkgConfFile)) , make_ord_flag defFlag "clear-package-db" (NoArg clearPkgConf) ...
2,925
package_flags_deps = [ ------- Packages ---------------------------------------------------- make_ord_flag defFlag "package-db" (HasArg (addPkgConfRef . PkgConfFile)) , make_ord_flag defFlag "clear-package-db" (NoArg clearPkgConf) , make_ord_flag defFlag "no-global-package-db" (NoArg removeG...
2,861
false
true
0
14
780
526
271
255
null
null
khajavi/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
escapedChar :: GenParser Char ParserState Inline escapedChar = do char '\\' state <- getState result <- option '\\' $ if stateStrict state then oneOf "\\`*_{}[]()>#+-.!~" else satisfy (not . isAlphaNum) return $ case result of ' ' -> S...
465
escapedChar :: GenParser Char ParserState Inline escapedChar = do char '\\' state <- getState result <- option '\\' $ if stateStrict state then oneOf "\\`*_{}[]()>#+-.!~" else satisfy (not . isAlphaNum) return $ case result of ' ' -> S...
465
escapedChar = do char '\\' state <- getState result <- option '\\' $ if stateStrict state then oneOf "\\`*_{}[]()>#+-.!~" else satisfy (not . isAlphaNum) return $ case result of ' ' -> Str "\160" -- "\ " is a nonbreaking space ...
416
false
true
1
13
181
113
52
61
null
null
mdsteele/fallback
src/Fallback/State/Tags.hs
gpl-3.0
abilityName RopeDart = "Rope Dart"
34
abilityName RopeDart = "Rope Dart"
34
abilityName RopeDart = "Rope Dart"
34
false
false
1
5
4
13
4
9
null
null
polachok/hs-nginx
src/Nginx/Main.hs
mit
eventsD = EventsDirective <$> (string "events" *> skipSpace *> char '{' *> skipSpace *> many events <* skipSpace <* char '}')
125
eventsD = EventsDirective <$> (string "events" *> skipSpace *> char '{' *> skipSpace *> many events <* skipSpace <* char '}')
125
eventsD = EventsDirective <$> (string "events" *> skipSpace *> char '{' *> skipSpace *> many events <* skipSpace <* char '}')
125
false
false
1
14
20
53
23
30
null
null
sonyandy/tnt
Control/Monad/Code/Opcode.hs
bsd-3-clause
d2f :: Word8 d2f = 0x90
23
d2f :: Word8 d2f = 0x90
23
d2f = 0x90
10
false
true
0
6
5
18
7
11
null
null
jcgruenhage/dendrite
vendor/src/github.com/apache/thrift/lib/hs/src/Thrift/Protocol/Binary.hs
apache-2.0
parseBinaryValue T_DOUBLE = TDouble . bsToDouble <$> P.take 8
61
parseBinaryValue T_DOUBLE = TDouble . bsToDouble <$> P.take 8
61
parseBinaryValue T_DOUBLE = TDouble . bsToDouble <$> P.take 8
61
false
false
0
7
8
22
10
12
null
null
kearnh/HToyRayTracer
src/OBJParser.hs
bsd-3-clause
handleParserResult :: a -> Either ParseError a -> IO a handleParserResult def pr = do case pr of Left e -> do putStrLn "Failed parsing input file:" print e return def Right x -> return x
255
handleParserResult :: a -> Either ParseError a -> IO a handleParserResult def pr = do case pr of Left e -> do putStrLn "Failed parsing input file:" print e return def Right x -> return x
255
handleParserResult def pr = do case pr of Left e -> do putStrLn "Failed parsing input file:" print e return def Right x -> return x
200
false
true
0
12
104
78
33
45
null
null
YellPika/Hannel
src/Control/Concurrent/Transactional/Event/Trail.hs
mit
dependencies :: Trail -> [Trail] dependencies trail = trail : case path trail of [] -> [] Choose _:xs -> dependencies (trail { path = xs }) Swap partner cRef1 cRef2 : xs -> extend partner (Swap (trail { path = xs }) cRef2 cRef1) : dependencies trail { path = xs } ...
355
dependencies :: Trail -> [Trail] dependencies trail = trail : case path trail of [] -> [] Choose _:xs -> dependencies (trail { path = xs }) Swap partner cRef1 cRef2 : xs -> extend partner (Swap (trail { path = xs }) cRef2 cRef1) : dependencies trail { path = xs } ...
355
dependencies trail = trail : case path trail of [] -> [] Choose _:xs -> dependencies (trail { path = xs }) Swap partner cRef1 cRef2 : xs -> extend partner (Swap (trail { path = xs }) cRef2 cRef1) : dependencies trail { path = xs } ++ dependencies partn...
322
false
true
0
16
123
134
68
66
null
null
lukexi/bindings-Oculus
test/case1/GLFWWindow.hs
apache-2.0
keyPress s _ GLFW.Key'A _ GLFW.KeyState'Released _ = writeIORef (lKey s) 0
81
keyPress s _ GLFW.Key'A _ GLFW.KeyState'Released _ = writeIORef (lKey s) 0
81
keyPress s _ GLFW.Key'A _ GLFW.KeyState'Released _ = writeIORef (lKey s) 0
81
false
false
0
7
18
34
16
18
null
null
abuiles/turbinado-blog
Turbinado/Environment/Logger.hs
bsd-3-clause
criticalM :: (HasEnvironment m) => String -> m () criticalM = wrapLoggerLock (L.logM "Turbinado" L.CRITICAL)
112
criticalM :: (HasEnvironment m) => String -> m () criticalM = wrapLoggerLock (L.logM "Turbinado" L.CRITICAL)
112
criticalM = wrapLoggerLock (L.logM "Turbinado" L.CRITICAL)
62
false
true
0
9
18
49
23
26
null
null
brownplt/webbits
src/BrownPLT/JavaScript/Analysis/Environment.hs
bsd-3-clause
nest :: Partial -> Partial nest partial = Partial M.empty M.empty [partial]
75
nest :: Partial -> Partial nest partial = Partial M.empty M.empty [partial]
75
nest partial = Partial M.empty M.empty [partial]
48
false
true
0
6
11
32
16
16
null
null
forste/haReFork
tools/hs2alfa/tst1.hs
bsd-3-clause
mapLengthProp f xs = length (map f xs) == length xs
51
mapLengthProp f xs = length (map f xs) == length xs
51
mapLengthProp f xs = length (map f xs) == length xs
51
false
false
1
8
10
33
13
20
null
null
jamesdarcy/DicomH
src/Data/Dicom/Tag.hs
bsd-3-clause
-- | Group 0x0028 nUMBER_OF_FRAMES :: DicomTag nUMBER_OF_FRAMES = 0x00280008
76
nUMBER_OF_FRAMES :: DicomTag nUMBER_OF_FRAMES = 0x00280008
58
nUMBER_OF_FRAMES = 0x00280008
29
true
true
0
4
9
12
7
5
null
null
jameshsmith/HRL
Server/Main.hs
mit
-- | Read an Int from an ASCII bytestring readInt :: BS.ByteString -> Int readInt = BS.foldl' (\x y -> x * 10 + (fromIntegral (y - 48))) 0
138
readInt :: BS.ByteString -> Int readInt = BS.foldl' (\x y -> x * 10 + (fromIntegral (y - 48))) 0
96
readInt = BS.foldl' (\x y -> x * 10 + (fromIntegral (y - 48))) 0
64
true
true
0
12
28
56
30
26
null
null
ml9951/ghc
compiler/basicTypes/Module.hs
bsd-3-clause
mkModuleEnv :: [(Module, a)] -> ModuleEnv a mkModuleEnv xs = ModuleEnv (Map.fromList xs)
88
mkModuleEnv :: [(Module, a)] -> ModuleEnv a mkModuleEnv xs = ModuleEnv (Map.fromList xs)
88
mkModuleEnv xs = ModuleEnv (Map.fromList xs)
44
false
true
0
8
12
41
21
20
null
null
peterstuart/dark-sky
test/ResponseSpec.hs
mit
emptyDataPoint :: POSIXTime -> DP.DataPoint emptyDataPoint time = DP.emptyDataPoint { DP.time = time }
108
emptyDataPoint :: POSIXTime -> DP.DataPoint emptyDataPoint time = DP.emptyDataPoint { DP.time = time }
108
emptyDataPoint time = DP.emptyDataPoint { DP.time = time }
64
false
true
0
8
19
41
19
22
null
null
prt2121/haskell-practice
parconc/distrib-ping/ping.hs
apache-2.0
-- >> -- <<master master :: Process () master = do node <- getSelfNode -- <1> say $ printf "spawning on %s" (show node) pid <- spawn node $(mkStaticClosure 'pingServer) -- <2> mypid <- getSelfPid -- <3> say $ printf "sending ping to %s" (show pid...
531
master :: Process () master = do node <- getSelfNode -- <1> say $ printf "spawning on %s" (show node) pid <- spawn node $(mkStaticClosure 'pingServer) -- <2> mypid <- getSelfPid -- <3> say $ printf "sending ping to %s" (show pid) send pid (Ping ...
512
master = do node <- getSelfNode -- <1> say $ printf "spawning on %s" (show node) pid <- spawn node $(mkStaticClosure 'pingServer) -- <2> mypid <- getSelfPid -- <3> say $ printf "sending ping to %s" (show pid) send pid (Ping mypid) ...
491
true
true
0
11
252
129
62
67
null
null
qrilka/xlsx
src/Codec/Xlsx/Types/Internal.hs
mit
unsafeRefId :: Int -> RefId unsafeRefId num = RefId $ "rId" <> txti num
71
unsafeRefId :: Int -> RefId unsafeRefId num = RefId $ "rId" <> txti num
71
unsafeRefId num = RefId $ "rId" <> txti num
43
false
true
0
6
13
29
14
15
null
null
bflyblue/parse-quote
Datalink.hs
unlicense
datalink :: Link -> Get Datalink datalink DLT_EN10MB = ethernet
63
datalink :: Link -> Get Datalink datalink DLT_EN10MB = ethernet
63
datalink DLT_EN10MB = ethernet
30
false
true
0
7
9
26
11
15
null
null
hspec/hspec
hspec-core/src/Test/Hspec/Core/Config.hs
mit
readConfigFiles :: IO [ConfigFile] readConfigFiles = do global <- readGlobalConfigFile local <- readLocalConfigFile return $ catMaybes [global, local]
156
readConfigFiles :: IO [ConfigFile] readConfigFiles = do global <- readGlobalConfigFile local <- readLocalConfigFile return $ catMaybes [global, local]
156
readConfigFiles = do global <- readGlobalConfigFile local <- readLocalConfigFile return $ catMaybes [global, local]
121
false
true
0
9
23
47
23
24
null
null
ihc/futhark
src/Futhark/Internalise/TypesValues.hs
isc
internaliseUniqueness E.Unique = I.Unique
41
internaliseUniqueness E.Unique = I.Unique
41
internaliseUniqueness E.Unique = I.Unique
41
false
false
0
6
3
13
6
7
null
null
yu-i9/thih
src/Thih/Static/Prelude.hs
bsd-3-clause
tBool = TCon (Tycon "Bool" Star)
36
tBool = TCon (Tycon "Bool" Star)
36
tBool = TCon (Tycon "Bool" Star)
36
false
false
0
7
9
17
8
9
null
null
mightymoose/liquidhaskell
tests/pos/GhcSort2.hs
bsd-3-clause
wrap :: a -> [a] wrap x = [x]
29
wrap :: a -> [a] wrap x = [x]
29
wrap x = [x]
12
false
true
0
8
8
30
14
16
null
null
lshemesh/Slide
src/Board.hs
mit
getCoords :: Int -> Coords getCoords x = swap $ x `divMod` 3
60
getCoords :: Int -> Coords getCoords x = swap $ x `divMod` 3
60
getCoords x = swap $ x `divMod` 3
33
false
true
2
7
12
34
16
18
null
null
kmilner/tamarin-prover
lib/theory/src/Theory/Proof.hs
gpl-3.0
annotateProof :: (ProofStep a -> [b] -> b) -> Proof a -> Proof b annotateProof f = go where go (LNode step@(ProofStep method _) cs) = LNode (ProofStep method info') cs' where cs' = M.map go cs info' = f step (map (psInfo . root . snd) (M.toList cs')) -- | Annotate a proof in a b...
337
annotateProof :: (ProofStep a -> [b] -> b) -> Proof a -> Proof b annotateProof f = go where go (LNode step@(ProofStep method _) cs) = LNode (ProofStep method info') cs' where cs' = M.map go cs info' = f step (map (psInfo . root . snd) (M.toList cs')) -- | Annotate a proof in a b...
337
annotateProof f = go where go (LNode step@(ProofStep method _) cs) = LNode (ProofStep method info') cs' where cs' = M.map go cs info' = f step (map (psInfo . root . snd) (M.toList cs')) -- | Annotate a proof in a bottom-up fashion.
272
false
true
0
12
98
140
70
70
null
null
beni55/hermit
src/HERMIT/Name.hs
bsd-2-clause
findInNSModGuts :: (LiftCoreM m, HasHermitMEnv m, MonadIO m, MonadThings m) => NameSpace -> HermitName -> m Named findInNSModGuts ns nm = do rdrEnv <- liftM mg_rdr_env getModGuts case lookupGRE_RdrName (toRdrName ns nm) rdrEnv of [gre] -> nameToNamed $ gre_name gre [] -> findI...
468
findInNSModGuts :: (LiftCoreM m, HasHermitMEnv m, MonadIO m, MonadThings m) => NameSpace -> HermitName -> m Named findInNSModGuts ns nm = do rdrEnv <- liftM mg_rdr_env getModGuts case lookupGRE_RdrName (toRdrName ns nm) rdrEnv of [gre] -> nameToNamed $ gre_name gre [] -> findI...
468
findInNSModGuts ns nm = do rdrEnv <- liftM mg_rdr_env getModGuts case lookupGRE_RdrName (toRdrName ns nm) rdrEnv of [gre] -> nameToNamed $ gre_name gre [] -> findInNSPackageDB ns nm _ -> fail "findInNSModGuts: multiple names returned" -- | Looks for Named in package database, or ...
338
false
true
0
12
118
130
61
69
null
null
colinba/tip-toi-reveng
src/GMEWriter.hs
mit
offsetsAndThen :: [SPut] -> SPut offsetsAndThen = mapFstMapSnd . map go where go x = FunSplit putWord32 (getAddress x)
122
offsetsAndThen :: [SPut] -> SPut offsetsAndThen = mapFstMapSnd . map go where go x = FunSplit putWord32 (getAddress x)
122
offsetsAndThen = mapFstMapSnd . map go where go x = FunSplit putWord32 (getAddress x)
89
false
true
0
9
22
46
23
23
null
null
39aldo39/klfc
src/Ahk.hs
gpl-3.0
printAhk' ∷ Ahk → String printAhk' (Ahk singletonKeys keys) = unlines $ [ "; Generated by KLFC " ⊕ versionStr , "; https://github.com/39aldo39/klfc" , "" , "#MaxHotkeysPerInterval 200" , "#MaxThreadsPerHotkey 10" , "" , "SendUps(ByRef modifiers) {" , " for index, modifier in modifiers {...
2,604
printAhk' ∷ Ahk → String printAhk' (Ahk singletonKeys keys) = unlines $ [ "; Generated by KLFC " ⊕ versionStr , "; https://github.com/39aldo39/klfc" , "" , "#MaxHotkeysPerInterval 200" , "#MaxThreadsPerHotkey 10" , "" , "SendUps(ByRef modifiers) {" , " for index, modifier in modifiers {...
2,604
printAhk' (Ahk singletonKeys keys) = unlines $ [ "; Generated by KLFC " ⊕ versionStr , "; https://github.com/39aldo39/klfc" , "" , "#MaxHotkeysPerInterval 200" , "#MaxThreadsPerHotkey 10" , "" , "SendUps(ByRef modifiers) {" , " for index, modifier in modifiers {" , " if (modifier...
2,579
false
true
2
8
802
266
167
99
null
null
x456/binary
benchmarks/Builder.hs
bsd-3-clause
fromWord8s (x:xs) = singleton x <> fromWord8s xs
48
fromWord8s (x:xs) = singleton x <> fromWord8s xs
48
fromWord8s (x:xs) = singleton x <> fromWord8s xs
48
false
false
0
7
7
26
12
14
null
null
Icelandjack/lens
src/Control/Lens/Setter.hs
bsd-3-clause
-- | Adjust every target of an 'IndexedSetter', 'IndexedLens' or 'IndexedTraversal' -- with access to the index. -- -- @ -- ('%@~') ≡ 'iover' -- @ -- -- When you do not need access to the index then ('%~') is more liberal in what it can accept. -- -- @ -- l '%~' f ≡ l '%@~' 'const' f -- @ -- -- @ -- ('%@~') :: 'Indexed...
599
(%@~) :: AnIndexedSetter i s t a b -> (i -> a -> b) -> s -> t l %@~ f = l %~ Indexed f
86
l %@~ f = l %~ Indexed f
24
true
true
0
10
156
82
49
33
null
null
ambiata/mafia
src/Mafia/Process.hs
bsd-3-clause
callFrom_ :: (Functor m, MonadIO m, MonadCatch m) => (ProcessError -> e) -> Directory -> File -> [Argument] -> EitherT e m () callFrom_ up dir cmd args = do Pass <- callFrom up dir cmd args return () -- | Capture the output of a process when it fails. --
310
callFrom_ :: (Functor m, MonadIO m, MonadCatch m) => (ProcessError -> e) -> Directory -> File -> [Argument] -> EitherT e m () callFrom_ up dir cmd args = do Pass <- callFrom up dir cmd args return () -- | Capture the output of a process when it fails. --
309
callFrom_ up dir cmd args = do Pass <- callFrom up dir cmd args return () -- | Capture the output of a process when it fails. --
133
false
true
0
12
106
107
52
55
null
null
girving/duck
duck/InferMonad.hs
bsd-3-clause
typeReError :: (Pretty s, MonadError TypeError m) => SrcLoc -> s -> m a -> m a typeReError l m f = catchError f $ \te -> typeError l $ nestedPunct ':' m te
155
typeReError :: (Pretty s, MonadError TypeError m) => SrcLoc -> s -> m a -> m a typeReError l m f = catchError f $ \te -> typeError l $ nestedPunct ':' m te
155
typeReError l m f = catchError f $ \te -> typeError l $ nestedPunct ':' m te
76
false
true
0
9
33
79
38
41
null
null
andyarvanitis/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v (LGe ITChar) [l, r] = doOp v (LGe ITNative) [l, r]
57
doOp v (LGe ITChar) [l, r] = doOp v (LGe ITNative) [l, r]
57
doOp v (LGe ITChar) [l, r] = doOp v (LGe ITNative) [l, r]
57
false
false
0
7
12
44
23
21
null
null
wayofthepie/audire
src/Lib.hs
bsd-3-clause
parseEtherFrame :: Parser EthernetFrame parseEtherFrame = EthernetFrame <$> take 6 <*> take 6 <*> take 2 <*> takeByteString
139
parseEtherFrame :: Parser EthernetFrame parseEtherFrame = EthernetFrame <$> take 6 <*> take 6 <*> take 2 <*> takeByteString
139
parseEtherFrame = EthernetFrame <$> take 6 <*> take 6 <*> take 2 <*> takeByteString
99
false
true
0
9
33
39
18
21
null
null
da-x/ghc
compiler/main/DriverPipeline.hs
bsd-3-clause
-- | What phase to run after one of the backend code generators has run hscPostBackendPhase :: DynFlags -> HscSource -> HscTarget -> Phase hscPostBackendPhase _ HsBootFile _ = StopLn
186
hscPostBackendPhase :: DynFlags -> HscSource -> HscTarget -> Phase hscPostBackendPhase _ HsBootFile _ = StopLn
114
hscPostBackendPhase _ HsBootFile _ = StopLn
47
true
true
0
7
33
31
16
15
null
null
jean-edouard/manager
apptool/OVF/AllocationUnit.hs
gpl-2.0
int_p = many1 digit >>= return . (read :: String -> Integer)
60
int_p = many1 digit >>= return . (read :: String -> Integer)
60
int_p = many1 digit >>= return . (read :: String -> Integer)
60
false
false
0
7
11
27
14
13
null
null
vikraman/ghc
compiler/basicTypes/IdInfo.hs
bsd-3-clause
setInlinePragInfo :: IdInfo -> InlinePragma -> IdInfo setInlinePragInfo info pr = pr `seq` info { inlinePragInfo = pr }
119
setInlinePragInfo :: IdInfo -> InlinePragma -> IdInfo setInlinePragInfo info pr = pr `seq` info { inlinePragInfo = pr }
119
setInlinePragInfo info pr = pr `seq` info { inlinePragInfo = pr }
65
false
true
0
8
18
47
23
24
null
null
aquatir/remember_java_api
code-sample-haskell/typed_fp_basics_cource/02_function_in_haskell/code.hs
mit
funk :: Int -> Int funk x = undefined
37
funk :: Int -> Int funk x = undefined
37
funk x = undefined
18
false
true
0
5
8
18
9
9
null
null
mikebenfield/ftensor
test/Tests/Math/Ftensor/General.hs
isc
case_v1 :: Assertion case_v1 = case v1 of Tensor arr -> arr @?= fromList [1::Int,2,3]
89
case_v1 :: Assertion case_v1 = case v1 of Tensor arr -> arr @?= fromList [1::Int,2,3]
89
case_v1 = case v1 of Tensor arr -> arr @?= fromList [1::Int,2,3]
68
false
true
0
10
18
49
24
25
null
null
diagrams/diagrams-reflex
example/src/Colors.hs
bsd-3-clause
textD :: (Show a, Monoid m) => a -> QDiagram B V2 Double m textD = fmap (annotate mempty) . D.text . show
105
textD :: (Show a, Monoid m) => a -> QDiagram B V2 Double m textD = fmap (annotate mempty) . D.text . show
105
textD = fmap (annotate mempty) . D.text . show
46
false
true
0
9
22
58
29
29
null
null
mboes/vCard
Text/VCard/Format/Directory.hs
lgpl-3.0
writeVCard :: VCard -> B.ByteString writeVCard (VCard ver attrs) = D.printDirectory' $ [begin, version] ++ concat (Map.elems attrs) ++ [end] where attr typ val = D.Prop (D.nakedType typ) [] val begin = D.Prop (D.nakedType "BEGIN") [] (D.Text "VCARD") end = D.Prop (D.nakedType "END") []...
534
writeVCard :: VCard -> B.ByteString writeVCard (VCard ver attrs) = D.printDirectory' $ [begin, version] ++ concat (Map.elems attrs) ++ [end] where attr typ val = D.Prop (D.nakedType typ) [] val begin = D.Prop (D.nakedType "BEGIN") [] (D.Text "VCARD") end = D.Prop (D.nakedType "END") []...
534
writeVCard (VCard ver attrs) = D.printDirectory' $ [begin, version] ++ concat (Map.elems attrs) ++ [end] where attr typ val = D.Prop (D.nakedType typ) [] val begin = D.Prop (D.nakedType "BEGIN") [] (D.Text "VCARD") end = D.Prop (D.nakedType "END") [] (D.Text "VCARD") version ...
498
false
true
6
10
169
237
110
127
null
null
CulpaBS/wbBach
src/Futhark/Optimise/Fusion.hs
bsd-3-clause
bindRes :: FusedRes -> FusionGM a -> FusionGM a bindRes rrr = local (\x -> x { fusedRes = rrr })
96
bindRes :: FusedRes -> FusionGM a -> FusionGM a bindRes rrr = local (\x -> x { fusedRes = rrr })
96
bindRes rrr = local (\x -> x { fusedRes = rrr })
48
false
true
0
9
20
47
24
23
null
null
ntc2/cryptol
src/Cryptol/ModuleSystem/Monad.hs
bsd-3-clause
getSolverConfig :: ModuleM T.SolverConfig getSolverConfig = ModuleT $ do me <- get return (meSolverConfig me)
114
getSolverConfig :: ModuleM T.SolverConfig getSolverConfig = ModuleT $ do me <- get return (meSolverConfig me)
114
getSolverConfig = ModuleT $ do me <- get return (meSolverConfig me)
72
false
true
0
10
19
39
18
21
null
null
arowM/haskell-bookkeeping
test/Doctest.hs
mit
ghcExtensions :: [String] ghcExtensions = [ "-XOverloadedStrings" , "-XRecordWildCards" , "-XStrict" , "-XStrictData" ]
139
ghcExtensions :: [String] ghcExtensions = [ "-XOverloadedStrings" , "-XRecordWildCards" , "-XStrict" , "-XStrictData" ]
139
ghcExtensions = [ "-XOverloadedStrings" , "-XRecordWildCards" , "-XStrict" , "-XStrictData" ]
113
false
true
0
5
33
26
16
10
null
null
clockworkdevstudio/Idlewild-Lang
Semantics.hs
bsd-2-clause
nullExpressionSemantics (Statement {statementID = EXPRESSION_NULL}) = do let value = 0 ints <- gets semanticStateInts if Map.lookup value ints == Nothing then addInt value else return ()
238
nullExpressionSemantics (Statement {statementID = EXPRESSION_NULL}) = do let value = 0 ints <- gets semanticStateInts if Map.lookup value ints == Nothing then addInt value else return ()
238
nullExpressionSemantics (Statement {statementID = EXPRESSION_NULL}) = do let value = 0 ints <- gets semanticStateInts if Map.lookup value ints == Nothing then addInt value else return ()
238
false
false
0
10
78
70
33
37
null
null
fcostantini/PlEb
src/Xspf.hs
gpl-3.0
xspfPrelude :: String -> String xspfPrelude name = "<?wpl version=\"1.0\" encoding=\"UTF-8\"?>\n" ++ "<playlist xmlns=\"http://xspf.org/ns/0/\" xmlns:vlc=\"http://www.videolan.org/vlc/playlist/ns/0/\" version=\"1\">\n" ++ "<title>" ++ name ++ "</title>\n" ++ "<tr...
331
xspfPrelude :: String -> String xspfPrelude name = "<?wpl version=\"1.0\" encoding=\"UTF-8\"?>\n" ++ "<playlist xmlns=\"http://xspf.org/ns/0/\" xmlns:vlc=\"http://www.videolan.org/vlc/playlist/ns/0/\" version=\"1\">\n" ++ "<title>" ++ name ++ "</title>\n" ++ "<tr...
331
xspfPrelude name = "<?wpl version=\"1.0\" encoding=\"UTF-8\"?>\n" ++ "<playlist xmlns=\"http://xspf.org/ns/0/\" xmlns:vlc=\"http://www.videolan.org/vlc/playlist/ns/0/\" version=\"1\">\n" ++ "<title>" ++ name ++ "</title>\n" ++ "<trackList>\n"
299
false
true
0
9
80
42
20
22
null
null
thalerjonathan/phd
coding/libraries/chimera/src/FRP/Chimera/Environment/Discrete.hs
gpl-3.0
topLeftDelta :: Discrete2dCoord topLeftDelta = (-1, -1)
60
topLeftDelta :: Discrete2dCoord topLeftDelta = (-1, -1)
60
topLeftDelta = (-1, -1)
28
false
true
0
6
11
21
12
9
null
null
bartoszw/wtk
Text/WtkParser.hs
bsd-3-clause
many :: Parser a -> Parser [a] many (Parser p) = Parser many' where many' x = case p x of Left err -> Right (x,[]) Right (x',a) -> let Right (x'',rest) = many' x' in Right (x'',a:rest)
276
many :: Parser a -> Parser [a] many (Parser p) = Parser many' where many' x = case p x of Left err -> Right (x,[]) Right (x',a) -> let Right (x'',rest) = many' x' in Right (x'',a:rest)
275
many (Parser p) = Parser many' where many' x = case p x of Left err -> Right (x,[]) Right (x',a) -> let Right (x'',rest) = many' x' in Right (x'',a:rest)
244
false
true
0
13
129
130
62
68
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/nativeGen/PPC/Ppr.hs
bsd-3-clause
pprInstr (MULLW_MayOflo reg1 reg2 reg3) = vcat [ hcat [ ptext (sLit "\tmullwo\t"), pprReg reg1, ptext (sLit ", "), pprReg reg2, ptext (sLit ", "), pprReg reg3 ], hcat [ ptext (sLit "\tmfxer\t"), pprReg reg1 ], ...
536
pprInstr (MULLW_MayOflo reg1 reg2 reg3) = vcat [ hcat [ ptext (sLit "\tmullwo\t"), pprReg reg1, ptext (sLit ", "), pprReg reg2, ptext (sLit ", "), pprReg reg3 ], hcat [ ptext (sLit "\tmfxer\t"), pprReg reg1 ], ...
536
pprInstr (MULLW_MayOflo reg1 reg2 reg3) = vcat [ hcat [ ptext (sLit "\tmullwo\t"), pprReg reg1, ptext (sLit ", "), pprReg reg2, ptext (sLit ", "), pprReg reg3 ], hcat [ ptext (sLit "\tmfxer\t"), pprReg reg1 ], ...
536
false
false
0
11
259
172
85
87
null
null
dalaing/free
src/Control/Applicative/Trans/Free.hs
bsd-3-clause
liftApT :: Applicative g => f a -> ApT f g a liftApT x = ApT (pure (Ap x (pure id)))
84
liftApT :: Applicative g => f a -> ApT f g a liftApT x = ApT (pure (Ap x (pure id)))
84
liftApT x = ApT (pure (Ap x (pure id)))
39
false
true
0
11
20
58
27
31
null
null
forgit/Rosalind
lcsm.hs
gpl-2.0
aaa (x:xs) xx = map (lcstr x) (filter (/= x) xx) ++ aaa xs xx
61
aaa (x:xs) xx = map (lcstr x) (filter (/= x) xx) ++ aaa xs xx
61
aaa (x:xs) xx = map (lcstr x) (filter (/= x) xx) ++ aaa xs xx
61
false
false
0
9
14
51
25
26
null
null
beni55/hermit
src/HERMIT/Kure/Universes.hs
bsd-2-clause
-- | Promote a rewrite on 'CoreBind'. promoteBindR :: (Monad m, Injection CoreBind g) => Rewrite c m CoreBind -> Rewrite c m g promoteBindR = promoteWithFailMsgR "This rewrite can only succeed at binding group nodes."
217
promoteBindR :: (Monad m, Injection CoreBind g) => Rewrite c m CoreBind -> Rewrite c m g promoteBindR = promoteWithFailMsgR "This rewrite can only succeed at binding group nodes."
179
promoteBindR = promoteWithFailMsgR "This rewrite can only succeed at binding group nodes."
90
true
true
0
7
35
50
25
25
null
null
bitemyapp/Haskell-Turtle-Library
src/Turtle/Pattern.hs
bsd-3-clause
{-| Match an unsigned decimal number >>> match decimal "123" [123] >>> match decimal "-123" [] -} decimal :: Num n => Pattern n decimal = do ds <- some digit return (foldl' step 0 ds) where step n d = n * 10 + fromIntegral (ord d - ord '0') {-| Transform a numeric parser to accept an optional leading @...
471
decimal :: Num n => Pattern n decimal = do ds <- some digit return (foldl' step 0 ds) where step n d = n * 10 + fromIntegral (ord d - ord '0') {-| Transform a numeric parser to accept an optional leading @\'+\'@ or @\'-\'@ sign >>> match (signed decimal) "+123" [123] >>> match (signed decimal) "-123...
371
decimal = do ds <- some digit return (foldl' step 0 ds) where step n d = n * 10 + fromIntegral (ord d - ord '0') {-| Transform a numeric parser to accept an optional leading @\'+\'@ or @\'-\'@ sign >>> match (signed decimal) "+123" [123] >>> match (signed decimal) "-123" [-123] >>> match (signed dec...
341
true
true
4
9
106
97
41
56
null
null
hansbugge/cubicaltt
Eval.hs
mit
pathComp :: Name -> Val -> Val -> Val -> System Val -> Val pathComp i a u u' us = VPath j $ comp i a (u `face` (i ~> 0)) us' where j = fresh (Atom i,a,us,u,u') us' = insertsSystem [(j ~> 0, u), (j ~> 1, u')] us -- Grad Lemma, takes an iso f, a system us and a value v, s.t. f us = -- border v. Outputs (u,p)...
374
pathComp :: Name -> Val -> Val -> Val -> System Val -> Val pathComp i a u u' us = VPath j $ comp i a (u `face` (i ~> 0)) us' where j = fresh (Atom i,a,us,u,u') us' = insertsSystem [(j ~> 0, u), (j ~> 1, u')] us -- Grad Lemma, takes an iso f, a system us and a value v, s.t. f us = -- border v. Outputs (u,p)...
374
pathComp i a u u' us = VPath j $ comp i a (u `face` (i ~> 0)) us' where j = fresh (Atom i,a,us,u,u') us' = insertsSystem [(j ~> 0, u), (j ~> 1, u')] us -- Grad Lemma, takes an iso f, a system us and a value v, s.t. f us = -- border v. Outputs (u,p) s.t. border u = us and a path p between v -- and f u.
315
false
true
1
10
101
145
79
66
null
null
DavidAlphaFox/ghc
libraries/filepath/System/FilePath/Internal.hs
bsd-3-clause
hasLeadingPathSeparator x = isPathSeparator (head x)
52
hasLeadingPathSeparator x = isPathSeparator (head x)
52
hasLeadingPathSeparator x = isPathSeparator (head x)
52
false
false
0
7
5
18
8
10
null
null
apyrgio/snf-ganeti
src/Ganeti/DataCollectors/Drbd.hs
bsd-2-clause
buildDCReport :: FilePath -> Maybe FilePath -> IO DCReport buildDCReport statusFile pairingFile = buildJsonReport statusFile pairingFile >>= buildReport dcName dcVersion dcFormatVersion dcCategory dcKind
209
buildDCReport :: FilePath -> Maybe FilePath -> IO DCReport buildDCReport statusFile pairingFile = buildJsonReport statusFile pairingFile >>= buildReport dcName dcVersion dcFormatVersion dcCategory dcKind
209
buildDCReport statusFile pairingFile = buildJsonReport statusFile pairingFile >>= buildReport dcName dcVersion dcFormatVersion dcCategory dcKind
150
false
true
0
7
28
50
23
27
null
null
jeffreyrosenbluth/NYC-meetup
meetup/DiagramTree.hs
mit
example :: Diagram B example = connectOutside' arrow1 "circle" "<>" . connectOutside' arrow1 "square" "<>" . connectOutside' arrow1 "arrow" "scale" . connectOutside' arrow1 "<>" "scale" $ vsep 3 [d, vsep 4 [c, hsep 1 [a, b, r] # centerX]] where arrow1 = with & arrowHead .~ noHead & g...
2,357
example :: Diagram B example = connectOutside' arrow1 "circle" "<>" . connectOutside' arrow1 "square" "<>" . connectOutside' arrow1 "arrow" "scale" . connectOutside' arrow1 "<>" "scale" $ vsep 3 [d, vsep 4 [c, hsep 1 [a, b, r] # centerX]] where arrow1 = with & arrowHead .~ noHead & g...
2,357
example = connectOutside' arrow1 "circle" "<>" . connectOutside' arrow1 "square" "<>" . connectOutside' arrow1 "arrow" "scale" . connectOutside' arrow1 "<>" "scale" $ vsep 3 [d, vsep 4 [c, hsep 1 [a, b, r] # centerX]] where arrow1 = with & arrowHead .~ noHead & gaps .~ 10 -- exampl...
2,336
false
true
0
12
877
164
103
61
null
null
wxwxwwxxx/ghc
compiler/cmm/MkGraph.hs
bsd-3-clause
catAGraphs :: [CmmAGraph] -> CmmAGraph catAGraphs = concatOL
69
catAGraphs :: [CmmAGraph] -> CmmAGraph catAGraphs = concatOL
69
catAGraphs = concatOL
26
false
true
0
7
16
25
11
14
null
null
tpsinnem/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
hdr_export :: Export -> String hdr_export (ExportData n) = "typedef VAL " ++ cdesc n ++ ";\n"
93
hdr_export :: Export -> String hdr_export (ExportData n) = "typedef VAL " ++ cdesc n ++ ";\n"
93
hdr_export (ExportData n) = "typedef VAL " ++ cdesc n ++ ";\n"
62
false
true
0
9
16
41
18
23
null
null
mettekou/ghc
compiler/simplCore/SetLevels.hs
bsd-3-clause
-- Don't share cases lvlMFE strict_ctxt env ann_expr | floatTopLvlOnly env && not (isTopLvl dest_lvl) -- Only floating to the top level is allowed. || isUnliftedType (exprType expr) -- Can't let-bind it; see Note [Unlifted MFEs] -- This includes coercions, which we don't want to float a...
5,213
lvlMFE strict_ctxt env ann_expr | floatTopLvlOnly env && not (isTopLvl dest_lvl) -- Only floating to the top level is allowed. || isUnliftedType (exprType expr) -- Can't let-bind it; see Note [Unlifted MFEs] -- This includes coercions, which we don't want to float anyway -- NB: ...
5,191
lvlMFE strict_ctxt env ann_expr | floatTopLvlOnly env && not (isTopLvl dest_lvl) -- Only floating to the top level is allowed. || isUnliftedType (exprType expr) -- Can't let-bind it; see Note [Unlifted MFEs] -- This includes coercions, which we don't want to float anyway -- NB: ...
5,191
true
false
5
16
1,405
317
168
149
null
null
brownsys/nettle-openflow
src/Nettle/OpenFlow/MessagesBinary.hs
bsd-3-clause
----------------------------------------- -- Stats Reply parser ----------------------------------------- getStatsReply :: Int -> Get StatsReply getStatsReply headerLen = do statsType <- getWord16be flags <- getWord16be let bodyLen = headerLen - (headerSize + 4) let moreFlag = flags == 0x0001 if statsTy...
1,618
getStatsReply :: Int -> Get StatsReply getStatsReply headerLen = do statsType <- getWord16be flags <- getWord16be let bodyLen = headerLen - (headerSize + 4) let moreFlag = flags == 0x0001 if statsType == ofpstFlow then do flowStats <- getFlowStatsReplies bodyLen return (FlowStatsReply m...
1,511
getStatsReply headerLen = do statsType <- getWord16be flags <- getWord16be let bodyLen = headerLen - (headerSize + 4) let moreFlag = flags == 0x0001 if statsType == ofpstFlow then do flowStats <- getFlowStatsReplies bodyLen return (FlowStatsReply moreFlag flowStats) else if statsType...
1,472
true
true
1
15
607
305
145
160
null
null
christiaanb/ghc
compiler/simplCore/CoreMonad.hs
bsd-3-clause
tickString (UnfoldingDone _) = "UnfoldingDone"
57
tickString (UnfoldingDone _) = "UnfoldingDone"
57
tickString (UnfoldingDone _) = "UnfoldingDone"
57
false
false
0
7
15
15
7
8
null
null
polarina/sdl2
Graphics/UI/SDL/Event.hs
bsd-3-clause
gameControllerMappingForGUID :: MonadIO m => JoystickGUID -> m CString gameControllerMappingForGUID guid = liftIO . alloca $ \ptr -> do poke ptr guid gameControllerMappingForGUID' ptr
188
gameControllerMappingForGUID :: MonadIO m => JoystickGUID -> m CString gameControllerMappingForGUID guid = liftIO . alloca $ \ptr -> do poke ptr guid gameControllerMappingForGUID' ptr
188
gameControllerMappingForGUID guid = liftIO . alloca $ \ptr -> do poke ptr guid gameControllerMappingForGUID' ptr
117
false
true
0
9
28
55
25
30
null
null
susu/haskell-problems
ProjectEuler/Numbering.hs
gpl-3.0
is_prime x = length dividers == 0 where dividers = (filter (dividable x) [2..floor (sqrt (fromIntegral x))])
112
is_prime x = length dividers == 0 where dividers = (filter (dividable x) [2..floor (sqrt (fromIntegral x))])
112
is_prime x = length dividers == 0 where dividers = (filter (dividable x) [2..floor (sqrt (fromIntegral x))])
112
false
false
0
12
20
58
28
30
null
null
ezyang/ghc
testsuite/tests/pmcheck/should_compile/T9951.hs
bsd-3-clause
f :: [a] -> () f x = case x of [] -> () (_:_) -> ()
55
f :: [a] -> () f x = case x of [] -> () (_:_) -> ()
55
f x = case x of [] -> () (_:_) -> ()
40
false
true
0
9
20
58
28
30
null
null
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types.hs
mpl-2.0
-- | The number of secondary private IP addresses. You can't specify this option -- and specify more than one private IP address using the private IP addresses -- option. inisSecondaryPrivateIpAddressCount :: Lens' InstanceNetworkInterfaceSpecification (Maybe Int) inisSecondaryPrivateIpAddressCount = lens _inisSeco...
410
inisSecondaryPrivateIpAddressCount :: Lens' InstanceNetworkInterfaceSpecification (Maybe Int) inisSecondaryPrivateIpAddressCount = lens _inisSecondaryPrivateIpAddressCount (\s a -> s { _inisSecondaryPrivateIpAddressCount = a })
239
inisSecondaryPrivateIpAddressCount = lens _inisSecondaryPrivateIpAddressCount (\s a -> s { _inisSecondaryPrivateIpAddressCount = a })
145
true
true
0
8
60
49
27
22
null
null
chpatrick/slither-bot
src/SlitherBot/UtilityGrid.hs
bsd-3-clause
foodRadius :: Double foodRadius = 20
36
foodRadius :: Double foodRadius = 20
36
foodRadius = 20
15
false
true
0
4
5
11
6
5
null
null
Valiev/contests
darkus/201509/Ant.hs
mit
change_price P L K H = 25
25
change_price P L K H = 25
25
change_price P L K H = 25
25
false
false
0
5
6
18
7
11
null
null
feliposz/learning-stuff
haskell/c9lectures-ch2.hs
mit
{- Function calls in haskell vs other languages Math: f(a,b) + cd f(x) f(x,y) f(g(x)) f(x, g(y)) f(x)g(y) C#, Java, C, etc: f(a,b) + c*d f(x) f(x,y) f(g(x) f(x, g(y)) f(x)*g(y) Haskell: f a b + c * d f x f x y f (g x) f x (g y) f x * g y -} f x = x * 3
304
f x = x * 3
11
f x = x * 3
11
true
false
0
5
114
14
7
7
null
null
ambiata/mafia
src/Mafia/Twine/Parallel.hs
bsd-3-clause
consume :: forall a b c e . (Queue a -> IO b) -> Int -> (a -> IO (Either e c)) -> IO (Either (RunError e) (b, [c])) consume pro fork action = flip catchAll (pure . Left . BlowUpError) $ do q <- newQueue fork -- not fork producer <- async $ pro q workers <- (emptyWorkers :: IO (Workers c)) sem <- new fork earl...
1,404
consume :: forall a b c e . (Queue a -> IO b) -> Int -> (a -> IO (Either e c)) -> IO (Either (RunError e) (b, [c])) consume pro fork action = flip catchAll (pure . Left . BlowUpError) $ do q <- newQueue fork -- not fork producer <- async $ pro q workers <- (emptyWorkers :: IO (Workers c)) sem <- new fork earl...
1,404
consume pro fork action = flip catchAll (pure . Left . BlowUpError) $ do q <- newQueue fork -- not fork producer <- async $ pro q workers <- (emptyWorkers :: IO (Workers c)) sem <- new fork early <- newEmptyMVar terminator <- async $ takeMVar early let spawn :: IO () spawn = do m <- tryRead...
1,288
false
true
0
27
490
565
266
299
null
null
michalkonecny/polypaver
src/PolyPaver/DeriveBounds.hs
bsd-3-clause
scanHypotheses :: (Eq l, HasDefaultValue l, Hashable l) => Form l -> IMap.IntMap (Maybe Rational, Maybe Rational) -> IMap.IntMap (Maybe Rational, Maybe Rational) scanHypotheses (Implies h c) = scanHypotheses c . scanHypothesis h
249
scanHypotheses :: (Eq l, HasDefaultValue l, Hashable l) => Form l -> IMap.IntMap (Maybe Rational, Maybe Rational) -> IMap.IntMap (Maybe Rational, Maybe Rational) scanHypotheses (Implies h c) = scanHypotheses c . scanHypothesis h
249
scanHypotheses (Implies h c) = scanHypotheses c . scanHypothesis h
70
false
true
0
11
53
99
47
52
null
null
ChrisPenner/rasa
rasa-ext-cursors/src/Rasa/Ext/Cursors/Internal/Base.hs
gpl-3.0
-- | Adds a new range to the list of ranges. addRange :: CrdRange -> BufAction () addRange r = overRanges (r:)
110
addRange :: CrdRange -> BufAction () addRange r = overRanges (r:)
65
addRange r = overRanges (r:)
28
true
true
0
8
21
36
17
19
null
null