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
pepeiborra/muterm-framework
MuTerm/Framework/Output.hs
bsd-3-clause
toHtmlProof = foldFree (\prob -> p<<(pPrint prob $$ text "RESULT: not solved yet")) work where work DontKnow{} = toHtml "Don't know" work Success{..} = p << problem +++ br +++ procInfo +++ br +++ divyes work Refuted{..} = p << problem +++ br +++ ...
1,023
toHtmlProof = foldFree (\prob -> p<<(pPrint prob $$ text "RESULT: not solved yet")) work where work DontKnow{} = toHtml "Don't know" work Success{..} = p << problem +++ br +++ procInfo +++ br +++ divyes work Refuted{..} = p << problem +++ br +++ ...
1,023
toHtmlProof = foldFree (\prob -> p<<(pPrint prob $$ text "RESULT: not solved yet")) work where work DontKnow{} = toHtml "Don't know" work Success{..} = p << problem +++ br +++ procInfo +++ br +++ divyes work Refuted{..} = p << problem +++ br +++ ...
1,023
false
false
44
11
389
285
122
163
null
null
diagrams/diagrams-contrib
src/Diagrams/Color/XKCD.hs
bsd-3-clause
lightishRed = fromJust $ readHexColor "#fe2f4a"
57
lightishRed = fromJust $ readHexColor "#fe2f4a"
57
lightishRed = fromJust $ readHexColor "#fe2f4a"
57
false
false
0
6
15
13
6
7
null
null
nakamuray/htig
HTIG/Database.hs
bsd-3-clause
getTLLastStatusId :: String -> Connection -> IO (Maybe Integer) getTLLastStatusId = getLastStatusId "timeline"
110
getTLLastStatusId :: String -> Connection -> IO (Maybe Integer) getTLLastStatusId = getLastStatusId "timeline"
110
getTLLastStatusId = getLastStatusId "timeline"
46
false
true
0
10
12
36
16
20
null
null
elopez/QuickFuzz
app/Args.hs
gpl-3.0
-- |Args sanitizing, e.g: check lower/upper bounds, -- check executable existense, etc. sanitize :: QFCommand -> IO QFCommand sanitize cmd@(Test {}) = checkBounds cmd >>= checkSeedTries >>= checkMaxTries
203
sanitize :: QFCommand -> IO QFCommand sanitize cmd@(Test {}) = checkBounds cmd >>= checkSeedTries >>= checkMaxTries
115
sanitize cmd@(Test {}) = checkBounds cmd >>= checkSeedTries >>= checkMaxTries
77
true
true
8
6
27
48
26
22
null
null
timjb/pfds-visualizations
src/VisualizationData/Queue/Amortized.hs
bsd-3-clause
tail :: AQueue a -> Maybe (AQueue a) tail q = snd <$> uncons q
64
tail :: AQueue a -> Maybe (AQueue a) tail q = snd <$> uncons q
64
tail q = snd <$> uncons q
27
false
true
0
8
16
37
17
20
null
null
hellok/PetaBricks
scripts/oldtuner2/src/GP/GrammarParser.hs
mit
parseTerm :: Parser Term parseTerm = do parseNonterminal <|> parseGeneratedTerm <|> parseTerminal
97
parseTerm :: Parser Term parseTerm = do parseNonterminal <|> parseGeneratedTerm <|> parseTerminal
97
parseTerm = do parseNonterminal <|> parseGeneratedTerm <|> parseTerminal
72
false
true
0
8
11
31
13
18
null
null
kim/amazonka
amazonka-kinesis/gen/Network/AWS/Kinesis/ListStreams.hs
mpl-2.0
-- | The maximum number of streams to list. lsLimit :: Lens' ListStreams (Maybe Natural) lsLimit = lens _lsLimit (\s a -> s { _lsLimit = a }) . mapping _Nat
156
lsLimit :: Lens' ListStreams (Maybe Natural) lsLimit = lens _lsLimit (\s a -> s { _lsLimit = a }) . mapping _Nat
112
lsLimit = lens _lsLimit (\s a -> s { _lsLimit = a }) . mapping _Nat
67
true
true
0
10
30
53
28
25
null
null
aslatter/hmumps
HMumps/Parsers.hs
gpl-3.0
stringOrPrefix1 (x:xs) = do char_ (toUpper x) <|> char_ (toLower x) <|> char_ x stringOrPrefix xs
125
stringOrPrefix1 (x:xs) = do char_ (toUpper x) <|> char_ (toLower x) <|> char_ x stringOrPrefix xs
125
stringOrPrefix1 (x:xs) = do char_ (toUpper x) <|> char_ (toLower x) <|> char_ x stringOrPrefix xs
125
false
false
0
11
43
54
24
30
null
null
DavidAlphaFox/ghc
libraries/containers/Data/Map/Base.hs
bsd-3-clause
union t1 t2 = hedgeUnion NothingS NothingS t1 t2
48
union t1 t2 = hedgeUnion NothingS NothingS t1 t2
48
union t1 t2 = hedgeUnion NothingS NothingS t1 t2
48
false
false
1
5
8
27
9
18
null
null
melted/llvm-pretty
src/Text/LLVM/AST.hs
bsd-3-clause
ppFloatType Float = text "float"
36
ppFloatType Float = text "float"
36
ppFloatType Float = text "float"
36
false
false
0
5
8
13
5
8
null
null
brendanhay/amazonka-limited
src/Network/AWS/Internal/Instances.hs
mpl-2.0
lowerBool :: Bool -> ByteString lowerBool True = "true"
56
lowerBool :: Bool -> ByteString lowerBool True = "true"
56
lowerBool True = "true"
24
false
true
0
5
9
18
9
9
null
null
forste/haReFork
refactorer/RefacSimplify.hs
bsd-3-clause
zipPatExp e (Exp (HsCase e' alts)) a@(HsAlt _ p (HsGuard e2) ds) pats = (Exp (HsCase e' [a]))
93
zipPatExp e (Exp (HsCase e' alts)) a@(HsAlt _ p (HsGuard e2) ds) pats = (Exp (HsCase e' [a]))
93
zipPatExp e (Exp (HsCase e' alts)) a@(HsAlt _ p (HsGuard e2) ds) pats = (Exp (HsCase e' [a]))
93
false
false
0
10
17
67
34
33
null
null
danchoi/sqltmpl
Main.hs
mit
escapeStringLiteral (x:xs) = x : escapeStringLiteral xs
55
escapeStringLiteral (x:xs) = x : escapeStringLiteral xs
55
escapeStringLiteral (x:xs) = x : escapeStringLiteral xs
55
false
false
0
7
6
23
11
12
null
null
upwawet/vision
src/Properties.hs
gpl-3.0
withProperties :: WithRegistry => (WithProperties => IO a) -> IO a withProperties = withModel
93
withProperties :: WithRegistry => (WithProperties => IO a) -> IO a withProperties = withModel
93
withProperties = withModel
26
false
true
0
9
13
34
16
18
null
null
DavidAlphaFox/ghc
libraries/deepseq/tests/Main.hs
bsd-3-clause
case_4_2 = testCase "Case4.2" $ withSeqState 0x3 $ do evaluate $ rnf $ (Case4b (SeqSet 0) (SeqSet 1) :: Case4 SeqSet)
121
case_4_2 = testCase "Case4.2" $ withSeqState 0x3 $ do evaluate $ rnf $ (Case4b (SeqSet 0) (SeqSet 1) :: Case4 SeqSet)
121
case_4_2 = testCase "Case4.2" $ withSeqState 0x3 $ do evaluate $ rnf $ (Case4b (SeqSet 0) (SeqSet 1) :: Case4 SeqSet)
121
false
false
0
12
24
57
27
30
null
null
bjornbm/network
tests/Simple.hs
bsd-3-clause
------------------------------------------------------------------------ -- Test harness main :: IO () main = withSocketsDo $ defaultMain tests
144
main :: IO () main = withSocketsDo $ defaultMain tests
54
main = withSocketsDo $ defaultMain tests
40
true
true
1
6
14
28
13
15
null
null
NCrashed/bitmap
Data/Bitmap/IO.hs
bsd-3-clause
xtractChannels :: PixelComponent t => IOBitmap t -> Maybe Alignment -> IO [IOBitmap t] extractChannels bm malign = mapM (extractSingleChannel bm malign) [0..nchn-1] where nchn = bitmapNChannels bm
205
extractChannels :: PixelComponent t => IOBitmap t -> Maybe Alignment -> IO [IOBitmap t] extractChannels bm malign = mapM (extractSingleChannel bm malign) [0..nchn-1] where nchn = bitmapNChannels bm
205
extractChannels bm malign = mapM (extractSingleChannel bm malign) [0..nchn-1] where nchn = bitmapNChannels bm
117
false
true
0
10
36
79
37
42
null
null
heathweiss/Tricad
src/Tests/ParseJuicyTest.hs
gpl-2.0
calculatePixelsPerMillmeterTest = TestCase $ assertEqual "calculatePixelsPerMillmeterTest" (18.14220374220374) (calculatePixelsPerMillmeter 2592 390 37 101 )
211
calculatePixelsPerMillmeterTest = TestCase $ assertEqual "calculatePixelsPerMillmeterTest" (18.14220374220374) (calculatePixelsPerMillmeter 2592 390 37 101 )
211
calculatePixelsPerMillmeterTest = TestCase $ assertEqual "calculatePixelsPerMillmeterTest" (18.14220374220374) (calculatePixelsPerMillmeter 2592 390 37 101 )
211
false
false
0
6
66
34
16
18
null
null
frenetic-lang/netcore-1.0
src/Frenetic/CoFiniteSet.hs
bsd-3-clause
inter (Finite elts1) (Finite elts2) = Finite (elts1 `S.intersection` elts2)
75
inter (Finite elts1) (Finite elts2) = Finite (elts1 `S.intersection` elts2)
75
inter (Finite elts1) (Finite elts2) = Finite (elts1 `S.intersection` elts2)
75
false
false
1
7
9
39
19
20
null
null
elasticdog/learnhaskell
src/CIS194/Homework01.hs
isc
hanoi n from to using = (hanoi (n - 1) from using to) ++ [(from, to)] ++ (hanoi (n - 1) using to from)
104
hanoi n from to using = (hanoi (n - 1) from using to) ++ [(from, to)] ++ (hanoi (n - 1) using to from)
104
hanoi n from to using = (hanoi (n - 1) from using to) ++ [(from, to)] ++ (hanoi (n - 1) using to from)
104
false
false
0
10
25
70
37
33
null
null
clinty/Juicy.Pixels
src/Codec/Picture/Gif.hs
bsd-3-clause
gif87aSignature, gif89aSignature :: B.ByteString gif87aSignature = B.pack $ map (fromIntegral . fromEnum) "GIF87a"
114
gif87aSignature, gif89aSignature :: B.ByteString gif87aSignature = B.pack $ map (fromIntegral . fromEnum) "GIF87a"
114
gif87aSignature = B.pack $ map (fromIntegral . fromEnum) "GIF87a"
65
false
true
0
8
12
33
18
15
null
null
crogers1/manager
xenmgr/Vm/Config.hs
gpl-2.0
vmExtraHvm num = property $ "config.extra-hvm." ++ show num
59
vmExtraHvm num = property $ "config.extra-hvm." ++ show num
59
vmExtraHvm num = property $ "config.extra-hvm." ++ show num
59
false
false
0
6
8
20
9
11
null
null
mocnik-science/chorale
src/Chorale/Common.hs
mit
-- | remove first argument of a 5-tuple removeFst5 :: (a, b, c, d, e) -> (b, c, d, e) removeFst5 (_, b, c, d, e) = (b, c, d, e)
127
removeFst5 :: (a, b, c, d, e) -> (b, c, d, e) removeFst5 (_, b, c, d, e) = (b, c, d, e)
87
removeFst5 (_, b, c, d, e) = (b, c, d, e)
41
true
true
0
6
30
73
46
27
null
null
lisphacker/codewars
PointInPolygon_flymake.hs
bsd-2-clause
angle p1 p2 = acos ((vdot p1 p2) / ((vmod p1) * (vmod p2)))
59
angle p1 p2 = acos ((vdot p1 p2) / ((vmod p1) * (vmod p2)))
59
angle p1 p2 = acos ((vdot p1 p2) / ((vmod p1) * (vmod p2)))
59
false
false
0
11
13
48
24
24
null
null
CulpaBS/wbBach
src/Language/Futhark/Attributes.hs
bsd-3-clause
typeOf (Unzip _ ts _) = Tuple $ map unInfo ts
47
typeOf (Unzip _ ts _) = Tuple $ map unInfo ts
47
typeOf (Unzip _ ts _) = Tuple $ map unInfo ts
47
false
false
2
6
12
30
13
17
null
null
guibou/AdventOfCode2016
src/Day22.hs
bsd-3-clause
neightboor :: Coord -> [Coord] neightboor (x, y) = do (dx, dy) <- [(-1, 0), (1, 0), (0, -1), (0, 1)] let x' = x + dx y' = y + dy return (x', y')
202
neightboor :: Coord -> [Coord] neightboor (x, y) = do (dx, dy) <- [(-1, 0), (1, 0), (0, -1), (0, 1)] let x' = x + dx y' = y + dy return (x', y')
202
neightboor (x, y) = do (dx, dy) <- [(-1, 0), (1, 0), (0, -1), (0, 1)] let x' = x + dx y' = y + dy return (x', y')
171
false
true
0
10
92
114
65
49
null
null
lambdax-x/payback
src/Payback/Parse.hs
mit
unordered :: Parser a -> Parser b -> Parser (a, b) unordered pa pb = try ((,) <$> pa <*> pb) <|> flip (,) <$> pb <*> pa
133
unordered :: Parser a -> Parser b -> Parser (a, b) unordered pa pb = try ((,) <$> pa <*> pb) <|> flip (,) <$> pb <*> pa
133
unordered pa pb = try ((,) <$> pa <*> pb) <|> flip (,) <$> pb <*> pa
82
false
true
8
9
41
86
42
44
null
null
hsinhuang/codebase
h99/H4.hs
gpl-2.0
myLength (_ : xs) = 1 + myLength xs
35
myLength (_ : xs) = 1 + myLength xs
35
myLength (_ : xs) = 1 + myLength xs
35
false
false
0
7
8
23
11
12
null
null
fiigii/fJS
Interpreter.hs
mit
eval (LetExpr binds body) = do env <- getContext let newBinds = map (\(var, term) -> (var, runReader (eval term) env)) binds local (const (Map.union (Map.fromList newBi...
342
eval (LetExpr binds body) = do env <- getContext let newBinds = map (\(var, term) -> (var, runReader (eval term) env)) binds local (const (Map.union (Map.fromList newBi...
342
eval (LetExpr binds body) = do env <- getContext let newBinds = map (\(var, term) -> (var, runReader (eval term) env)) binds local (const (Map.union (Map.fromList newBi...
342
false
false
0
16
181
107
53
54
null
null
beni55/haste-compiler
libraries/ghc-7.8/base/Foreign/C/Error.hs
bsd-3-clause
isValidErrno :: Errno -> Bool -- -- the configure script sets all invalid "errno"s to -1 -- isValidErrno (Errno errno) = errno /= -1
147
isValidErrno :: Errno -> Bool isValidErrno (Errno errno) = errno /= -1
85
isValidErrno (Errno errno) = errno /= -1
41
true
true
0
7
38
33
18
15
null
null
mietek/experiment-floyd-warshall
src/RegExp.hs
mit
eval :: (KleeneAlgebra a) => (l -> a) -> RegExp l -> a eval _ (RegExp None) = zero
89
eval :: (KleeneAlgebra a) => (l -> a) -> RegExp l -> a eval _ (RegExp None) = zero
89
eval _ (RegExp None) = zero
34
false
true
0
8
25
49
25
24
null
null
phaazon/ghc-mod
src/GHCMod.hs
bsd-3-clause
rootInfoCmd = withParseCmd [] $ \[] -> rootInfo
49
rootInfoCmd = withParseCmd [] $ \[] -> rootInfo
49
rootInfoCmd = withParseCmd [] $ \[] -> rootInfo
49
false
false
0
7
9
22
11
11
null
null
ben-schulz/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v (LSLt ATFloat) [l, r] = v ++ "FLOATBOP(<," ++ creg l ++ ", " ++ creg r ++ ")"
84
doOp v (LSLt ATFloat) [l, r] = v ++ "FLOATBOP(<," ++ creg l ++ ", " ++ creg r ++ ")"
84
doOp v (LSLt ATFloat) [l, r] = v ++ "FLOATBOP(<," ++ creg l ++ ", " ++ creg r ++ ")"
84
false
false
0
9
20
54
25
29
null
null
sdiehl/ghc
compiler/GHC/Stg/Syntax.hs
bsd-3-clause
-- general case pprStgExpr (StgApp func args) = hang (ppr func) 4 (sep (map (ppr) args))
90
pprStgExpr (StgApp func args) = hang (ppr func) 4 (sep (map (ppr) args))
74
pprStgExpr (StgApp func args) = hang (ppr func) 4 (sep (map (ppr) args))
74
true
false
0
10
17
48
24
24
null
null
danieldietrich/llrbtree
Data/Set/Splay.hs
bsd-3-clause
printSet :: Show a => Splay a -> IO () printSet = putStr . showSet
66
printSet :: Show a => Splay a -> IO () printSet = putStr . showSet
66
printSet = putStr . showSet
27
false
true
0
8
14
34
16
18
null
null
maarons/Cortex
Miranda/test/ValueTree_Test.hs
agpl-3.0
main :: IO Counts main = runTestTT tests
40
main :: IO Counts main = runTestTT tests
40
main = runTestTT tests
22
false
true
0
5
7
17
8
9
null
null
headprogrammingczar/cabal
cabal-install/Distribution/Client/Setup.hs
bsd-3-clause
infoCommand :: CommandUI InfoFlags infoCommand = CommandUI { commandName = "info", commandSynopsis = "Display detailed information about a particular package.", commandDescription = Just $ \_ -> wrapText $ "If there is a sandbox in the current directory and " ++ "config:ignore-s...
1,392
infoCommand :: CommandUI InfoFlags infoCommand = CommandUI { commandName = "info", commandSynopsis = "Display detailed information about a particular package.", commandDescription = Just $ \_ -> wrapText $ "If there is a sandbox in the current directory and " ++ "config:ignore-s...
1,392
infoCommand = CommandUI { commandName = "info", commandSynopsis = "Display detailed information about a particular package.", commandDescription = Just $ \_ -> wrapText $ "If there is a sandbox in the current directory and " ++ "config:ignore-sandbox is False, use the sandbox pac...
1,356
false
true
0
15
382
192
109
83
null
null
wuerges/vlsi_verification
src/BDDGraph.hs
bsd-3-clause
layers :: T -> [[Node]] layers gr = map (map fst) $ groupBy g $ sortBy f ns' where ns :: [(Node, V)] ns = labNodes gr ns' = filter t ns f a b = ginput a `compare` ginput b g a b = ginput a == ginput b t a = ginput a > 0
261
layers :: T -> [[Node]] layers gr = map (map fst) $ groupBy g $ sortBy f ns' where ns :: [(Node, V)] ns = labNodes gr ns' = filter t ns f a b = ginput a `compare` ginput b g a b = ginput a == ginput b t a = ginput a > 0
261
layers gr = map (map fst) $ groupBy g $ sortBy f ns' where ns :: [(Node, V)] ns = labNodes gr ns' = filter t ns f a b = ginput a `compare` ginput b g a b = ginput a == ginput b t a = ginput a > 0
237
false
true
5
9
98
139
70
69
null
null
PlausibleReality/the-subtle-machine
app/Main.hs
bsd-3-clause
displayWorld :: World -> Channel -> IO (Maybe Int) displayWorld world channel = do Concurrent.threadDelay(1000*16) publishMsg channel "myExchange" "myKey" newMsg {msgBody = (runPut $ serialiseWorld world), msgDeliveryMode = Just Persistent}
251
displayWorld :: World -> Channel -> IO (Maybe Int) displayWorld world channel = do Concurrent.threadDelay(1000*16) publishMsg channel "myExchange" "myKey" newMsg {msgBody = (runPut $ serialiseWorld world), msgDeliveryMode = Just Persistent}
251
displayWorld world channel = do Concurrent.threadDelay(1000*16) publishMsg channel "myExchange" "myKey" newMsg {msgBody = (runPut $ serialiseWorld world), msgDeliveryMode = Just Persistent}
200
false
true
0
12
40
87
43
44
null
null
ulricha/dsh
src/Database/DSH/CL/Parser.hs
bsd-3-clause
kw :: String -> CLParser () kw s = void $ lexeme (string s)
59
kw :: String -> CLParser () kw s = void $ lexeme (string s)
59
kw s = void $ lexeme (string s)
31
false
true
0
8
13
39
18
21
null
null
vincenthz/hs-foundation
foundation/Foundation/Collection/Zippable.hs
bsd-3-clause
uncurry2 :: (a -> b -> c) -> (a, b) -> c uncurry2 = Prelude.uncurry
67
uncurry2 :: (a -> b -> c) -> (a, b) -> c uncurry2 = Prelude.uncurry
67
uncurry2 = Prelude.uncurry
26
false
true
0
8
14
38
21
17
null
null
robstewart57/ripl
src/Compiler.hs
bsd-3-clause
compile :: R.Program -> Integer -> (CalProject, Dimension, [String],(Int,Int)) compile (R.ProgramC _ functions imRead@(R.ImageInC imReadLhsIdent colourType w h) assignments dataOut@(R.DataOutC outIdent)) numFrames = let x = 1 -- let !inlinedStmts = inlineFunctions functions stmts -- astToIr = -- infer...
1,692
compile :: R.Program -> Integer -> (CalProject, Dimension, [String],(Int,Int)) compile (R.ProgramC _ functions imRead@(R.ImageInC imReadLhsIdent colourType w h) assignments dataOut@(R.DataOutC outIdent)) numFrames = let x = 1 -- let !inlinedStmts = inlineFunctions functions stmts -- astToIr = -- infer...
1,692
compile (R.ProgramC _ functions imRead@(R.ImageInC imReadLhsIdent colourType w h) assignments dataOut@(R.DataOutC outIdent)) numFrames = let x = 1 -- let !inlinedStmts = inlineFunctions functions stmts -- astToIr = -- inferStreamDimensionsChannelsBitWidth imRead -- . deriveDataflow imRead outI...
1,613
false
true
0
17
414
322
177
145
null
null
SmallImprovements/spring-clean
src/Java/References.hs
mit
parseExplConstrInv (Just (SuperInvoke r a)) = concat $ map parseRefType r ++ map parseExp a
91
parseExplConstrInv (Just (SuperInvoke r a)) = concat $ map parseRefType r ++ map parseExp a
91
parseExplConstrInv (Just (SuperInvoke r a)) = concat $ map parseRefType r ++ map parseExp a
91
false
false
0
9
14
41
19
22
null
null
da-x/lamdu
bottlelib/Data/Store/Transaction.hs
gpl-3.0
getStore :: Monad m => Transaction m (Store m) getStore = liftAskable $ Reader.asks (Lens.view aStore)
102
getStore :: Monad m => Transaction m (Store m) getStore = liftAskable $ Reader.asks (Lens.view aStore)
102
getStore = liftAskable $ Reader.asks (Lens.view aStore)
55
false
true
2
9
15
52
23
29
null
null
Rydgel/advent-of-code
src/Day11.hs
bsd-3-clause
incStr :: String -> String incStr = snd . foldr inc (True, [])
62
incStr :: String -> String incStr = snd . foldr inc (True, [])
62
incStr = snd . foldr inc (True, [])
35
false
true
0
8
12
32
17
15
null
null
koengit/turbospec
TurboSpec.hs
mit
fun2 :: (Typeable a, Typeable b, Typeable c) => (a -> b -> c) -> [Dynamic] -> Dynamic fun2 f [x,y] = toDyn (f (fromDyn x undefined) (fromDyn y undefined))
154
fun2 :: (Typeable a, Typeable b, Typeable c) => (a -> b -> c) -> [Dynamic] -> Dynamic fun2 f [x,y] = toDyn (f (fromDyn x undefined) (fromDyn y undefined))
154
fun2 f [x,y] = toDyn (f (fromDyn x undefined) (fromDyn y undefined))
68
false
true
0
9
29
92
48
44
null
null
gbataille/pandoc
src/Text/Pandoc/Writers/Docbook.hs
gpl-2.0
hasLineBreaks :: [Inline] -> Bool hasLineBreaks = getAny . query isLineBreak . walk removeNote where removeNote :: Inline -> Inline removeNote (Note _) = Str "" removeNote x = x isLineBreak :: Inline -> Any isLineBreak LineBreak = Any True isLineBreak _ = Any False
291
hasLineBreaks :: [Inline] -> Bool hasLineBreaks = getAny . query isLineBreak . walk removeNote where removeNote :: Inline -> Inline removeNote (Note _) = Str "" removeNote x = x isLineBreak :: Inline -> Any isLineBreak LineBreak = Any True isLineBreak _ = Any False
291
hasLineBreaks = getAny . query isLineBreak . walk removeNote where removeNote :: Inline -> Inline removeNote (Note _) = Str "" removeNote x = x isLineBreak :: Inline -> Any isLineBreak LineBreak = Any True isLineBreak _ = Any False
257
false
true
1
7
70
118
52
66
null
null
briansteffens/basm
src/Definitions.hs
gpl-2.0
sizeInt :: Size -> Int sizeInt BYTE = 1
40
sizeInt :: Size -> Int sizeInt BYTE = 1
40
sizeInt BYTE = 1
17
false
true
0
5
9
18
9
9
null
null
ComputationWithBoundedResources/ara-inference
src/Data/Rewriting/ARA/ByInferenceRules/ConstraintSolver/SMT/ConvertToSMTProblem.hs
mit
addShareConditions :: (Show a, Monad m) => Int -> [(ADatatype dt a, Comparison, [ADatatype dt a])] -> StateT SMTProblem m () addShareConditions vecLen shareCond = do mapM_ (\(a,_,c) -> addVarsBy (fromADatatype vecLen) [a]) shareCond mapM_ (\(a,_,c) -> addVa...
465
addShareConditions :: (Show a, Monad m) => Int -> [(ADatatype dt a, Comparison, [ADatatype dt a])] -> StateT SMTProblem m () addShareConditions vecLen shareCond = do mapM_ (\(a,_,c) -> addVarsBy (fromADatatype vecLen) [a]) shareCond mapM_ (\(a,_,c) -> addVa...
465
addShareConditions vecLen shareCond = do mapM_ (\(a,_,c) -> addVarsBy (fromADatatype vecLen) [a]) shareCond mapM_ (\(a,_,c) -> addVarsBy (fromADatatype vecLen) c) shareCond mapM_ (addConstraintBy2 (fromADatatype vecLen) (fromListBy (fromADatatype vecLen))) shareCond
281
false
true
0
13
123
182
94
88
null
null
jekor/vocabulink
hs/Vocabulink/Article.hs
agpl-3.0
articleLinkHtml :: Article -> Html articleLinkHtml article = a ! href (toValue $ "/article/" ++ articleFilename article) $ toMarkup $ articleTitle article
156
articleLinkHtml :: Article -> Html articleLinkHtml article = a ! href (toValue $ "/article/" ++ articleFilename article) $ toMarkup $ articleTitle article
156
articleLinkHtml article = a ! href (toValue $ "/article/" ++ articleFilename article) $ toMarkup $ articleTitle article
121
false
true
0
11
23
50
24
26
null
null
monkeybits/rpgame
src/GameState.hs
bsd-3-clause
promptCommand :: IO Command promptCommand = promptData "Command:" tryParseCommand "unrecognized command, c = continue, q = quit"
128
promptCommand :: IO Command promptCommand = promptData "Command:" tryParseCommand "unrecognized command, c = continue, q = quit"
128
promptCommand = promptData "Command:" tryParseCommand "unrecognized command, c = continue, q = quit"
100
false
true
0
5
16
21
10
11
null
null
melted/llvm-pretty
src/Text/LLVM.hs
bsd-3-clause
band :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value) band = binop (Bit And)
90
band :: (IsValue a, IsValue b) => Typed a -> b -> BB (Typed Value) band = binop (Bit And)
90
band = binop (Bit And)
23
false
true
0
10
20
55
27
28
null
null
kojiromike/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
constDocs c@(AType ATFloat) = "Double-precision floating-point numbers"
86
constDocs c@(AType ATFloat) = "Double-precision floating-point numbers"
86
constDocs c@(AType ATFloat) = "Double-precision floating-point numbers"
86
false
false
1
8
21
23
9
14
null
null
nikita-volkov/graph-db
library/GraphDB/Macros/Analysis.hs
mit
sumConType :: T.SumConstructor -> Type sumConType (_, t) = t
60
sumConType :: T.SumConstructor -> Type sumConType (_, t) = t
60
sumConType (_, t) = t
21
false
true
0
6
9
26
14
12
null
null
mapinguari/SC_HS_Proxy
src/Proxy/PotentialFields/PathfindingPotential.hs
mit
bListToGraph :: [[Tile]] -> Gr Tile Int bListToGraph xs = mkGraph a (dup (filter legalEdge adjacencies)) where legalEdge (x,y,_) = not $ x `member` b || y `member` b adjacencies = [(i,j,1)| i <- range (0,c), j <- (adjacent i), j<i] dup = foldr g [] g (x,y,z) zs = (x,y,z):(y,x,z):zs w =...
946
bListToGraph :: [[Tile]] -> Gr Tile Int bListToGraph xs = mkGraph a (dup (filter legalEdge adjacencies)) where legalEdge (x,y,_) = not $ x `member` b || y `member` b adjacencies = [(i,j,1)| i <- range (0,c), j <- (adjacent i), j<i] dup = foldr g [] g (x,y,z) zs = (x,y,z):(y,x,z):zs w =...
946
bListToGraph xs = mkGraph a (dup (filter legalEdge adjacencies)) where legalEdge (x,y,_) = not $ x `member` b || y `member` b adjacencies = [(i,j,1)| i <- range (0,c), j <- (adjacent i), j<i] dup = foldr g [] g (x,y,z) zs = (x,y,z):(y,x,z):zs w = length.head $ xs h = length xs ...
906
false
true
26
27
346
687
369
318
null
null
sdiehl/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
ordEQDataCon = pcDataCon ordEQDataConName [] [] orderingTyCon
62
ordEQDataCon = pcDataCon ordEQDataConName [] [] orderingTyCon
62
ordEQDataCon = pcDataCon ordEQDataConName [] [] orderingTyCon
62
false
false
0
6
7
19
9
10
null
null
TachoMex/MiniSequel
src/MiniSequel/Expression.hs
mit
isValue (SequelSymbol _) = True
31
isValue (SequelSymbol _) = True
31
isValue (SequelSymbol _) = True
31
false
false
0
7
4
15
7
8
null
null
Zankoku-Okuno/octopus
Language/Octopus/Basis.hs
gpl-3.0
ensureThunk _ = Nothing
23
ensureThunk _ = Nothing
23
ensureThunk _ = Nothing
23
false
false
0
4
3
10
4
6
null
null
nitroFamily/hamming
test/Test.hs
bsd-3-clause
encodeDecode :: Test encodeDecode = TestCase $ (snd . decode hc $ encode hc msg) @?= msg
92
encodeDecode :: Test encodeDecode = TestCase $ (snd . decode hc $ encode hc msg) @?= msg
92
encodeDecode = TestCase $ (snd . decode hc $ encode hc msg) @?= msg
71
false
true
0
10
20
38
19
19
null
null
brodyberg/Notes
ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/SquareCubeChapter9.hs
mit
tuples = [(x,y) | x <- mySquare, y <- myCube]
45
tuples = [(x,y) | x <- mySquare, y <- myCube]
45
tuples = [(x,y) | x <- mySquare, y <- myCube]
45
false
false
1
8
9
35
17
18
null
null
agentm/project-m36
test/Relation/Basic.hs
unlicense
validateAttrTypesMatchTupleAttrTypes :: Relation -> Either RelationalError Relation validateAttrTypesMatchTupleAttrTypes rel@(Relation attrs tupSet) = foldr (\tuple acc -> if tupleAttributes tuple == attrs && tupleAtomCheck tuple then ...
1,144
validateAttrTypesMatchTupleAttrTypes :: Relation -> Either RelationalError Relation validateAttrTypesMatchTupleAttrTypes rel@(Relation attrs tupSet) = foldr (\tuple acc -> if tupleAttributes tuple == attrs && tupleAtomCheck tuple then ...
1,144
validateAttrTypesMatchTupleAttrTypes rel@(Relation attrs tupSet) = foldr (\tuple acc -> if tupleAttributes tuple == attrs && tupleAtomCheck tuple then acc ...
1,060
false
true
1
15
579
218
108
110
null
null
mbakke/ganeti
src/Ganeti/UDSServer.hs
bsd-2-clause
clientLoop :: (J.JSON o, MonadBase IO m, MonadLog m) => Handler i m o -> Client -> m () clientLoop handler client = do result <- handleClient handler client {- It's been observed sometimes that reading immediately after sending a response leads to worse performance, as there is nothing to read ...
707
clientLoop :: (J.JSON o, MonadBase IO m, MonadLog m) => Handler i m o -> Client -> m () clientLoop handler client = do result <- handleClient handler client {- It's been observed sometimes that reading immediately after sending a response leads to worse performance, as there is nothing to read ...
707
clientLoop handler client = do result <- handleClient handler client {- It's been observed sometimes that reading immediately after sending a response leads to worse performance, as there is nothing to read and the system calls are just wasted. Thus yielding before reading gives other threads a chanc...
603
false
true
0
10
163
108
52
56
null
null
graninas/Andromeda
src/Andromeda/Types/Language/Hardware/HDL.hs
bsd-3-clause
sensor :: ComponentDef -> ComponentIndex -> Par -> Hdl () sensor c idx p = liftF (SensorDef c idx p ())
103
sensor :: ComponentDef -> ComponentIndex -> Par -> Hdl () sensor c idx p = liftF (SensorDef c idx p ())
103
sensor c idx p = liftF (SensorDef c idx p ())
45
false
true
0
9
20
52
25
27
null
null
schell/hdevtools
src/CommandLoop.hs
mit
newConfig :: CommandExtra -> IO Config newConfig cmdExtra = do mbCabalConfig <- traverse (\path -> mkCabalConfig path (ceCabalOptions cmdExtra)) $ ceCabalConfig cmdExtra mbStackConfig <- getStackConfig cmdExtra return $ Config { configGhcOpts = "-O0" : ceGhcOptions cmdExtra , configCaba...
409
newConfig :: CommandExtra -> IO Config newConfig cmdExtra = do mbCabalConfig <- traverse (\path -> mkCabalConfig path (ceCabalOptions cmdExtra)) $ ceCabalConfig cmdExtra mbStackConfig <- getStackConfig cmdExtra return $ Config { configGhcOpts = "-O0" : ceGhcOptions cmdExtra , configCaba...
409
newConfig cmdExtra = do mbCabalConfig <- traverse (\path -> mkCabalConfig path (ceCabalOptions cmdExtra)) $ ceCabalConfig cmdExtra mbStackConfig <- getStackConfig cmdExtra return $ Config { configGhcOpts = "-O0" : ceGhcOptions cmdExtra , configCabal = mbCabalConfig ,...
370
false
true
0
14
117
106
51
55
null
null
tjakway/ghcjvm
compiler/cmm/PprC.hs
bsd-3-clause
pprStatics dflags (CmmStaticLit (CmmFloat f W32) : rest) -- floats are padded to a word by padLitToWord, see #1852 | wORD_SIZE dflags == 8, CmmStaticLit (CmmInt 0 W32) : rest' <- rest = pprLit1 (floatToWord dflags f) : pprStatics dflags rest' | wORD_SIZE dflags == 4 = pprLit1 (floatToWord dflags f) : pprStati...
581
pprStatics dflags (CmmStaticLit (CmmFloat f W32) : rest) -- floats are padded to a word by padLitToWord, see #1852 | wORD_SIZE dflags == 8, CmmStaticLit (CmmInt 0 W32) : rest' <- rest = pprLit1 (floatToWord dflags f) : pprStatics dflags rest' | wORD_SIZE dflags == 4 = pprLit1 (floatToWord dflags f) : pprStati...
581
pprStatics dflags (CmmStaticLit (CmmFloat f W32) : rest) -- floats are padded to a word by padLitToWord, see #1852 | wORD_SIZE dflags == 8, CmmStaticLit (CmmInt 0 W32) : rest' <- rest = pprLit1 (floatToWord dflags f) : pprStatics dflags rest' | wORD_SIZE dflags == 4 = pprLit1 (floatToWord dflags f) : pprStati...
581
false
false
1
12
155
200
94
106
null
null
ocharles/hackage-server
Distribution/Server/Packages/Types.hs
bsd-3-clause
pkgLatestUploadTime :: PkgInfo -> UTCTime pkgLatestUploadTime = fst . pkgLatestUploadInfo
89
pkgLatestUploadTime :: PkgInfo -> UTCTime pkgLatestUploadTime = fst . pkgLatestUploadInfo
89
pkgLatestUploadTime = fst . pkgLatestUploadInfo
47
false
true
0
5
9
19
10
9
null
null
cgswords/Grift
Compiler/Emit.hs
mit
emitOp Minus = "sub i64"
25
emitOp Minus = "sub i64"
25
emitOp Minus = "sub i64"
25
false
false
0
5
5
9
4
5
null
null
fmapfmapfmap/amazonka
amazonka-swf/gen/Network/AWS/SWF/Types/Product.hs
mpl-2.0
-- | /Optional./ Data attached to the event that can be used by the decider -- in subsequent decision tasks. This data is not sent to the activity. scweieaControl :: Lens' StartChildWorkflowExecutionInitiatedEventAttributes (Maybe Text) scweieaControl = lens _scweieaControl (\ s a -> s{_scweieaControl = a})
308
scweieaControl :: Lens' StartChildWorkflowExecutionInitiatedEventAttributes (Maybe Text) scweieaControl = lens _scweieaControl (\ s a -> s{_scweieaControl = a})
160
scweieaControl = lens _scweieaControl (\ s a -> s{_scweieaControl = a})
71
true
true
0
9
44
47
26
21
null
null
shlevy/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
isDoubleTy = is_tc doubleTyConKey
37
isDoubleTy = is_tc doubleTyConKey
37
isDoubleTy = is_tc doubleTyConKey
37
false
false
1
5
7
13
4
9
null
null
danmane/abalone
unsupported/hs/src/abalone.hs
mit
update :: Game -> Move -> Game update (Game b p remaining perMove lossThreshold) m@(Move s dir) = newGame where -- Pieces to move ownPieces = segPieces s enemyPieces | broadside m = [] | inline m = fromJust $ inlineMoved b m -- New game state updated = filter (onBoard b) . map (|> dir) (whiteM...
812
update :: Game -> Move -> Game update (Game b p remaining perMove lossThreshold) m@(Move s dir) = newGame where -- Pieces to move ownPieces = segPieces s enemyPieces | broadside m = [] | inline m = fromJust $ inlineMoved b m -- New game state updated = filter (onBoard b) . map (|> dir) (whiteM...
812
update (Game b p remaining perMove lossThreshold) m@(Move s dir) = newGame where -- Pieces to move ownPieces = segPieces s enemyPieces | broadside m = [] | inline m = fromJust $ inlineMoved b m -- New game state updated = filter (onBoard b) . map (|> dir) (whiteMoved, blackMoved) | p == White ...
781
false
true
14
9
197
314
156
158
null
null
deech/stack
src/Stack/Build/Execute.hs
bsd-3-clause
mungeBuildOutput :: (MonadIO m, MonadCatch m) => Bool -- ^ exclude TH loading? -> Bool -- ^ convert paths to absolute? -> Path Abs Dir -- ^ package's root directory -> ConduitM Text Text m () mungeBuildOutput excludeTHLoading makeAbsolute pkgDir = void...
1,853
mungeBuildOutput :: (MonadIO m, MonadCatch m) => Bool -- ^ exclude TH loading? -> Bool -- ^ convert paths to absolute? -> Path Abs Dir -- ^ package's root directory -> ConduitM Text Text m () mungeBuildOutput excludeTHLoading makeAbsolute pkgDir = void...
1,853
mungeBuildOutput excludeTHLoading makeAbsolute pkgDir = void $ CT.lines =$ CL.map stripCR =$ CL.filter (not . isTHLoading) =$ CL.mapM toAbsolutePath where -- | Is this line a Template Haskell "Loading package" line -- ByteString isTHLoading :: Text -> Bool isTHLoading _ | not excludeTH...
1,593
false
true
5
19
623
513
254
259
null
null
oldmanmike/ghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
pprFormatFormatRegReg :: LitString -> Format -> Format -> Reg -> Reg -> SDoc pprFormatFormatRegReg name format1 format2 reg1 reg2 = hcat [ char '\t', ptext name, pprFormat format1, pprFormat format2, space, pprReg format1 reg1, comma, pprReg format2 reg2...
326
pprFormatFormatRegReg :: LitString -> Format -> Format -> Reg -> Reg -> SDoc pprFormatFormatRegReg name format1 format2 reg1 reg2 = hcat [ char '\t', ptext name, pprFormat format1, pprFormat format2, space, pprReg format1 reg1, comma, pprReg format2 reg2...
326
pprFormatFormatRegReg name format1 format2 reg1 reg2 = hcat [ char '\t', ptext name, pprFormat format1, pprFormat format2, space, pprReg format1 reg1, comma, pprReg format2 reg2 ]
249
false
true
0
9
108
91
46
45
null
null
alexvong1995/pandoc
src/Text/Pandoc/Writers/HTML.hs
gpl-2.0
-- | Annotates a MathML expression with the tex source annotateMML :: XML.Element -> String -> XML.Element annotateMML e tex = math (unode "semantics" [cs, unode "annotation" (annotAttrs, tex)]) where cs = case elChildren e of [] -> unode "mrow" () [x] -> x xs -> unode "mrow" xs ...
531
annotateMML :: XML.Element -> String -> XML.Element annotateMML e tex = math (unode "semantics" [cs, unode "annotation" (annotAttrs, tex)]) where cs = case elChildren e of [] -> unode "mrow" () [x] -> x xs -> unode "mrow" xs math childs = XML.Element q as [XML.Elem childs] l ...
476
annotateMML e tex = math (unode "semantics" [cs, unode "annotation" (annotAttrs, tex)]) where cs = case elChildren e of [] -> unode "mrow" () [x] -> x xs -> unode "mrow" xs math childs = XML.Element q as [XML.Elem childs] l where (XML.Element q as _ l) = e annot...
424
true
true
3
9
139
196
91
105
null
null
corajr/adventofcode2015
13/Seating.hs
mit
edgesToIEdges people edges = let lookUp p = fromMaybe (-1) (elemIndex p people) f (Datum p1 v p2) = ((lookUp p1, lookUp p2), v) in map f edges
152
edgesToIEdges people edges = let lookUp p = fromMaybe (-1) (elemIndex p people) f (Datum p1 v p2) = ((lookUp p1, lookUp p2), v) in map f edges
152
edgesToIEdges people edges = let lookUp p = fromMaybe (-1) (elemIndex p people) f (Datum p1 v p2) = ((lookUp p1, lookUp p2), v) in map f edges
152
false
false
1
11
37
90
41
49
null
null
kallisti-dev/hs-webdriver
src/Test/WebDriver/Commands.hs
bsd-3-clause
-- |Grab a screenshot as a base-64 encoded PNG image. This is the protocol-defined format. screenshotBase64 :: (HasCallStack, WebDriver wd) => wd LBS.ByteString screenshotBase64 = TL.encodeUtf8 <$> doSessCommand methodGet "/screenshot" Null
240
screenshotBase64 :: (HasCallStack, WebDriver wd) => wd LBS.ByteString screenshotBase64 = TL.encodeUtf8 <$> doSessCommand methodGet "/screenshot" Null
149
screenshotBase64 = TL.encodeUtf8 <$> doSessCommand methodGet "/screenshot" Null
79
true
true
0
7
30
43
22
21
null
null
magthe/lat
src/RepEng.hs
gpl-3.0
_jiraCreateIssue :: String -- ^ url -> String -- ^ session token -> Value -- ^ issue description -> IO String _jiraCreateIssue url session desc = do res <- remote url "jira1.createIssue" session desc liftM fromRight $ runErrorT (fromValue $ fromJust $ lookup "key" res)
319
_jiraCreateIssue :: String -- ^ url -> String -- ^ session token -> Value -- ^ issue description -> IO String _jiraCreateIssue url session desc = do res <- remote url "jira1.createIssue" session desc liftM fromRight $ runErrorT (fromValue $ fromJust $ lookup "key" res)
319
_jiraCreateIssue url session desc = do res <- remote url "jira1.createIssue" session desc liftM fromRight $ runErrorT (fromValue $ fromJust $ lookup "key" res)
167
false
true
0
11
94
82
39
43
null
null
carlosavieira/self-study
programming/Haskell/99 problems/solutions/12.hs
gpl-3.0
decodeModified :: [Count a] -> [a] decodeModified [] = error "Empty List"
73
decodeModified :: [Count a] -> [a] decodeModified [] = error "Empty List"
73
decodeModified [] = error "Empty List"
38
false
true
0
7
11
32
16
16
null
null
facebookincubator/duckling
Duckling/Ordinal/DA/Rules.hs
bsd-3-clause
ruleSpelledOutOrdinals :: Rule ruleSpelledOutOrdinals = Rule { name = "ordinals, 20 to 99, spelled-out" , pattern = [ regex (concat ["((?:en|to|tre|fire|fem|seks|syv|otte|ni)og)?", "(tyvende", "|tredivte", "|fyrr(?:etyv)?ende", ...
814
ruleSpelledOutOrdinals :: Rule ruleSpelledOutOrdinals = Rule { name = "ordinals, 20 to 99, spelled-out" , pattern = [ regex (concat ["((?:en|to|tre|fire|fem|seks|syv|otte|ni)og)?", "(tyvende", "|tredivte", "|fyrr(?:etyv)?ende", ...
814
ruleSpelledOutOrdinals = Rule { name = "ordinals, 20 to 99, spelled-out" , pattern = [ regex (concat ["((?:en|to|tre|fire|fem|seks|syv|otte|ni)og)?", "(tyvende", "|tredivte", "|fyrr(?:etyv)?ende", "|halvtreds(?:indstyv)?ende", ...
783
false
true
0
18
272
178
94
84
null
null
shlevy/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
newStablePtr_RDR :: RdrName newStablePtr_RDR = nameRdrName newStablePtrName
82
newStablePtr_RDR :: RdrName newStablePtr_RDR = nameRdrName newStablePtrName
82
newStablePtr_RDR = nameRdrName newStablePtrName
54
false
true
0
5
13
14
7
7
null
null
green-haskell/ghc
compiler/basicTypes/BasicTypes.hs
bsd-3-clause
notInsideLam = False
20
notInsideLam = False
20
notInsideLam = False
20
false
false
0
4
2
6
3
3
null
null
rhofour/PlayingAtari
src/SimpleExperiment.hs
apache-2.0
main = do args <- getArgs let n = read $ head $ args runExperiment (doExperiments n)
90
main = do args <- getArgs let n = read $ head $ args runExperiment (doExperiments n)
90
main = do args <- getArgs let n = read $ head $ args runExperiment (doExperiments n)
90
false
false
1
12
22
46
19
27
null
null
Happstack/ixset
src/Data/IxSet.hs
bsd-3-clause
-- | Returns the subset with an index less than or equal to the -- provided key. The set must be indexed over key type, doing -- otherwise results in runtime error. getLTE :: (Indexable a, Typeable a, Ord a, Typeable k) => k -> IxSet a -> IxSet a getLTE = getOrd2 True True False
287
getLTE :: (Indexable a, Typeable a, Ord a, Typeable k) => k -> IxSet a -> IxSet a getLTE = getOrd2 True True False
121
getLTE = getOrd2 True True False
32
true
true
0
9
63
67
33
34
null
null
shlevy/ghc
compiler/prelude/THNames.hs
bsd-3-clause
conPName = libFun (fsLit "conP") conPIdKey
46
conPName = libFun (fsLit "conP") conPIdKey
46
conPName = libFun (fsLit "conP") conPIdKey
46
false
false
0
7
9
17
8
9
null
null
pauloborba/plc
src/InterpretacaoEAnaliseEstaticaDelinguagens.hs
cc0-1.0
-- int :: [(Id, Valor)] -> Termo -> [(Id, Valor)] -> (Valor, [(Id, Valor)]) -- int :: Ambiente -> Termo -> Estado -> (Valor, Estado) -- int a (Var x) e = (search x (a ++ e), e)
177
int a (Var x) e = (search x (a ++ e), e)
40
int a (Var x) e = (search x (a ++ e), e)
40
true
false
0
8
38
41
22
19
null
null
kawamuray/ganeti
src/Ganeti/Daemon.hs
gpl-2.0
defaultBindAddr :: Int -- ^ The port we want -> Socket.Family -- ^ The cluster IP family -> Result (Socket.Family, Socket.SockAddr) defaultBindAddr port Socket.AF_INET = Ok (Socket.AF_INET, Socket.SockAddrInet (fromIntegral port) Socket.iNADDR_ANY)
312
defaultBindAddr :: Int -- ^ The port we want -> Socket.Family -- ^ The cluster IP family -> Result (Socket.Family, Socket.SockAddr) defaultBindAddr port Socket.AF_INET = Ok (Socket.AF_INET, Socket.SockAddrInet (fromIntegral port) Socket.iNADDR_ANY)
312
defaultBindAddr port Socket.AF_INET = Ok (Socket.AF_INET, Socket.SockAddrInet (fromIntegral port) Socket.iNADDR_ANY)
124
false
true
0
10
94
74
37
37
null
null
fehu/hsgc
Test/Gravity.hs
mit
objPosition = _objPosition . _objP
34
objPosition = _objPosition . _objP
34
objPosition = _objPosition . _objP
34
false
false
0
5
4
10
5
5
null
null
gcross/habit-of-fate
sources/library/HabitOfFate/Data/Scale.hs
agpl-3.0
displayScale Low = "Low"
24
displayScale Low = "Low"
24
displayScale Low = "Low"
24
false
false
0
5
3
9
4
5
null
null
andrewthad/vinyl-vectors
src/Data/Vector/Vinyl/Default/NonEmpty/Monomorphic.hs
bsd-3-clause
-- Monadic mapping -- --------------- -- | /O(n)/ Apply the monadic action to all elements of the vector, yielding a -- vector of results mapM :: (Monad m, G.Vector Vector (Rec Identity rs), G.Vector Vector (Rec Identity ss)) => (Rec Identity rs -> m (Rec Identity ss)) -> Vector (Rec Identity rs) -> m (Vector (Rec I...
346
mapM :: (Monad m, G.Vector Vector (Rec Identity rs), G.Vector Vector (Rec Identity ss)) => (Rec Identity rs -> m (Rec Identity ss)) -> Vector (Rec Identity rs) -> m (Vector (Rec Identity ss)) mapM = G.mapM
207
mapM = G.mapM
13
true
true
0
13
63
127
63
64
null
null
batterseapower/edit-distance
Text/EditDistance/EditCosts.hs
bsd-3-clause
cost (VariableCost f) x = f x
29
cost (VariableCost f) x = f x
29
cost (VariableCost f) x = f x
29
false
false
0
7
6
20
9
11
null
null
prb/perpubplat
src/Blog/FrontEnd/Syndication.hs
bsd-3-clause
assemble_feed :: (F.Feedable f) => f -> B.Model -> [B.Item] -> String assemble_feed g m items = A.toXml $ A.Feed ( [ A.Author C.author_name C.author_uri C.author_email ] ++ (map A.Category categories) ++ [ A.Generator C.generator_name C.generator_uri C.generator_ver...
783
assemble_feed :: (F.Feedable f) => f -> B.Model -> [B.Item] -> String assemble_feed g m items = A.toXml $ A.Feed ( [ A.Author C.author_name C.author_uri C.author_email ] ++ (map A.Category categories) ++ [ A.Generator C.generator_name C.generator_uri C.generator_ver...
783
assemble_feed g m items = A.toXml $ A.Feed ( [ A.Author C.author_name C.author_uri C.author_email ] ++ (map A.Category categories) ++ [ A.Generator C.generator_name C.generator_uri C.generator_version , A.Id $ F.build_id g ...
713
false
true
0
15
333
245
124
121
null
null
paf31/typescript-docs
src/Main.hs
mit
term :: Term (IO ()) term = docGen <$> inputFiles <*> outputFile
64
term :: Term (IO ()) term = docGen <$> inputFiles <*> outputFile
64
term = docGen <$> inputFiles <*> outputFile
43
false
true
1
8
11
34
15
19
null
null
olorin/amazonka
amazonka-config/test/Test/AWS/Gen/Config.hs
mpl-2.0
testDescribeConfigurationRecorderStatusResponse :: DescribeConfigurationRecorderStatusResponse -> TestTree testDescribeConfigurationRecorderStatusResponse = res "DescribeConfigurationRecorderStatusResponse" "fixture/DescribeConfigurationRecorderStatusResponse.proto" config (Proxy :: Proxy DescribeConfig...
342
testDescribeConfigurationRecorderStatusResponse :: DescribeConfigurationRecorderStatusResponse -> TestTree testDescribeConfigurationRecorderStatusResponse = res "DescribeConfigurationRecorderStatusResponse" "fixture/DescribeConfigurationRecorderStatusResponse.proto" config (Proxy :: Proxy DescribeConfig...
342
testDescribeConfigurationRecorderStatusResponse = res "DescribeConfigurationRecorderStatusResponse" "fixture/DescribeConfigurationRecorderStatusResponse.proto" config (Proxy :: Proxy DescribeConfigurationRecorderStatus)
235
false
true
0
6
30
36
17
19
null
null
lukexi/ghc-7.8-arm64
utils/genprimopcode/Syntax.hs
bsd-3-clause
lookup_attrib :: String -> [Option] -> Maybe Option lookup_attrib _ [] = Nothing
80
lookup_attrib :: String -> [Option] -> Maybe Option lookup_attrib _ [] = Nothing
80
lookup_attrib _ [] = Nothing
28
false
true
0
7
12
32
16
16
null
null
denibertovic/haskell
kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs
bsd-3-clause
-- | 'v1RoleBindingMetadata' Lens v1RoleBindingMetadataL :: Lens_' V1RoleBinding (Maybe V1ObjectMeta) v1RoleBindingMetadataL f V1RoleBinding{..} = (\v1RoleBindingMetadata -> V1RoleBinding { v1RoleBindingMetadata, ..} ) <$> f v1RoleBindingMetadata
246
v1RoleBindingMetadataL :: Lens_' V1RoleBinding (Maybe V1ObjectMeta) v1RoleBindingMetadataL f V1RoleBinding{..} = (\v1RoleBindingMetadata -> V1RoleBinding { v1RoleBindingMetadata, ..} ) <$> f v1RoleBindingMetadata
212
v1RoleBindingMetadataL f V1RoleBinding{..} = (\v1RoleBindingMetadata -> V1RoleBinding { v1RoleBindingMetadata, ..} ) <$> f v1RoleBindingMetadata
144
true
true
1
8
23
62
30
32
null
null
svenpanne/Vulkan
RegistryProcessor/src/MangledRegistry.hs
bsd-3-clause
parseRegistry :: ToEnumType -> String -> Either String Registry parseRegistry toEnumType str = toRegistry toEnumType `fmap` R.parseRegistry str
143
parseRegistry :: ToEnumType -> String -> Either String Registry parseRegistry toEnumType str = toRegistry toEnumType `fmap` R.parseRegistry str
143
parseRegistry toEnumType str = toRegistry toEnumType `fmap` R.parseRegistry str
79
false
true
0
7
17
43
21
22
null
null
benekastah/ebitor
src/Ebitor/Rope.hs
bsd-3-clause
findIndexFrom :: Int -> (Char -> Bool) -> Rope -> Maybe Int findIndexFrom i test r = let (a, b) = Ebitor.Rope.splitAt i r in fmap (+ (Ebitor.Rope.length a)) (findIndex test b)
184
findIndexFrom :: Int -> (Char -> Bool) -> Rope -> Maybe Int findIndexFrom i test r = let (a, b) = Ebitor.Rope.splitAt i r in fmap (+ (Ebitor.Rope.length a)) (findIndex test b)
184
findIndexFrom i test r = let (a, b) = Ebitor.Rope.splitAt i r in fmap (+ (Ebitor.Rope.length a)) (findIndex test b)
124
false
true
0
11
40
92
47
45
null
null
forsyde/type-level
src/Data/TypeLevel/Bool.hs
bsd-3-clause
-- | value-level reflection function for the 'And' type-level relation (&&) :: And b1 b2 b3 => b1 -> b2 -> b3 (&&) = undefined
126
(&&) :: And b1 b2 b3 => b1 -> b2 -> b3 (&&) = undefined
55
(&&) = undefined
16
true
true
0
9
24
42
21
21
null
null
dbp/email-postmark
src/Network/Mail/Postmark.hs
bsd-3-clause
maybeAesonResult (Success a) = Just a
37
maybeAesonResult (Success a) = Just a
37
maybeAesonResult (Success a) = Just a
37
false
false
0
6
5
19
8
11
null
null
nishiuramakoto/erasm-plusplus
src/haskell/Combinators.hs
gpl-3.0
-- * Point-free definitions of uncurried versions of the basic combinators -- | The uncurried split combinator. split :: (a -> b, a -> c) -> (a -> (b,c)) split = curry ((app >< app) . ((fst >< id) /\ (snd >< id)))
218
split :: (a -> b, a -> c) -> (a -> (b,c)) split = curry ((app >< app) . ((fst >< id) /\ (snd >< id)))
101
split = curry ((app >< app) . ((fst >< id) /\ (snd >< id)))
59
true
true
0
11
47
89
48
41
null
null
futtetennista/IntroductionToFunctionalProgramming
RWH/src/Ch26/src/BloomFilter/Hash.hs
mit
hash :: Hashable a => a -> Word64 hash = hashSalt 0x106fc397cf62f64d3
71
hash :: Hashable a => a -> Word64 hash = hashSalt 0x106fc397cf62f64d3
71
hash = hashSalt 0x106fc397cf62f64d3
37
false
true
0
8
13
31
13
18
null
null