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
wskplho/idris-bash
src/IRTS/CodegenBash.hs
mit
showBareVar v = error $ "Variable " ++ show v ++ " is not supported"
74
showBareVar v = error $ "Variable " ++ show v ++ " is not supported"
74
showBareVar v = error $ "Variable " ++ show v ++ " is not supported"
74
false
false
0
7
20
24
11
13
null
null
thinkpad20/rowling
src/Language/Rowling/Parser.hs
mit
pParens :: Parser Expr pParens = between (schar '(') (schar ')') getValues where getValues = do bareExprs <- getBareExprs keyVals <- getKeyVals case (bareExprs, keyVals) of ([e], []) -> return e (es, kvs) -> return $ Record $ H.fromList $ makeTuple es <> kvs getBareExprs = bareExpr `sepEndBy...
484
pParens :: Parser Expr pParens = between (schar '(') (schar ')') getValues where getValues = do bareExprs <- getBareExprs keyVals <- getKeyVals case (bareExprs, keyVals) of ([e], []) -> return e (es, kvs) -> return $ Record $ H.fromList $ makeTuple es <> kvs getBareExprs = bareExpr `sepEndBy...
484
pParens = between (schar '(') (schar ')') getValues where getValues = do bareExprs <- getBareExprs keyVals <- getKeyVals case (bareExprs, keyVals) of ([e], []) -> return e (es, kvs) -> return $ Record $ H.fromList $ makeTuple es <> kvs getBareExprs = bareExpr `sepEndBy` schar ',' bareExpr ...
461
false
true
11
13
108
228
106
122
null
null
thalerjonathan/phd
coding/prototyping/haskell/HerosAndCowards/src/HACDetRNG.hs
gpl-3.0
detSplit :: DeterministicGen -> (DeterministicGen, DeterministicGen) detSplit g = (g, g)
88
detSplit :: DeterministicGen -> (DeterministicGen, DeterministicGen) detSplit g = (g, g)
88
detSplit g = (g, g)
19
false
true
0
6
10
30
17
13
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
action_284 (142#) = happyShift action_197
41
action_284 (142#) = happyShift action_197
41
action_284 (142#) = happyShift action_197
41
false
false
0
6
4
15
7
8
null
null
uduki/hsQt
Qtc/Enums/Gui/QPrinter.hs
bsd-2-clause
eSmallFormat :: PaperSource eSmallFormat = iePaperSource $ 8
62
eSmallFormat :: PaperSource eSmallFormat = iePaperSource $ 8
62
eSmallFormat = iePaperSource $ 8
34
false
true
2
6
9
23
9
14
null
null
rimmington/cabal
Cabal/Distribution/System.hs
bsd-3-clause
buildPlatform :: Platform buildPlatform = Platform buildArch buildOS
68
buildPlatform :: Platform buildPlatform = Platform buildArch buildOS
68
buildPlatform = Platform buildArch buildOS
42
false
true
0
6
7
22
9
13
null
null
sdiehl/ghc
testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs
bsd-3-clause
mainPass :: ModGuts -> CoreM ModGuts mainPass guts = do putMsgS "Simple Plugin Pass Run" (_, anns) <- getAnnotations deserializeWithData guts bindsOnlyPass (mapM (changeBind anns Nothing)) guts
205
mainPass :: ModGuts -> CoreM ModGuts mainPass guts = do putMsgS "Simple Plugin Pass Run" (_, anns) <- getAnnotations deserializeWithData guts bindsOnlyPass (mapM (changeBind anns Nothing)) guts
205
mainPass guts = do putMsgS "Simple Plugin Pass Run" (_, anns) <- getAnnotations deserializeWithData guts bindsOnlyPass (mapM (changeBind anns Nothing)) guts
168
false
true
0
11
38
67
31
36
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT37.hs
gpl-3.0
fac (S x) = S x * fac x
23
fac (S x) = S x * fac x
23
fac (S x) = S x * fac x
23
false
false
1
6
8
27
11
16
null
null
tobyp/bills
bills.hs
mit
shareTransaction :: [Share] -> Money -> [Share] -> [Transaction] shareTransaction = go [] where go txs [] _ [] = txs go txs [] m ((Share p w):ds) = go ((Transaction p (w * m)):txs) [] m ds go txs ((Share p w):cs) m ds = go ((Transaction p (-w * m)):txs) cs m ds -- apply a transaction to a l...
367
shareTransaction :: [Share] -> Money -> [Share] -> [Transaction] shareTransaction = go [] where go txs [] _ [] = txs go txs [] m ((Share p w):ds) = go ((Transaction p (w * m)):txs) [] m ds go txs ((Share p w):cs) m ds = go ((Transaction p (-w * m)):txs) cs m ds -- apply a transaction to a l...
367
shareTransaction = go [] where go txs [] _ [] = txs go txs [] m ((Share p w):ds) = go ((Transaction p (w * m)):txs) [] m ds go txs ((Share p w):cs) m ds = go ((Transaction p (-w * m)):txs) cs m ds -- apply a transaction to a list of accounts: before -> transaction -> after
302
false
true
1
12
97
203
98
105
null
null
dvekeman/vpw
app1/app.hs
bsd-3-clause
-- Like trace but has no output debug_ :: String -> String debug_ text = debug text ""
86
debug_ :: String -> String debug_ text = debug text ""
54
debug_ text = debug text ""
27
true
true
0
7
17
29
13
16
null
null
gridaphobe/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
-- | No signature or a partial signature noCompleteSig :: Maybe TcSigInfo -> Bool noCompleteSig (Just (TcIdSig sig)) = isPartialSig sig
135
noCompleteSig :: Maybe TcSigInfo -> Bool noCompleteSig (Just (TcIdSig sig)) = isPartialSig sig
94
noCompleteSig (Just (TcIdSig sig)) = isPartialSig sig
53
true
true
0
9
20
37
18
19
null
null
itchyny/py2bf.hs
Language/Brainfuck/Py2Bf/Bfpointer.hs
mit
cvt :: [Bfp] -> Bfpstate -> (Bfpstate, [Bfprim]) cvt (Addp p i : bf) s | i > 0 = (move s p++) <$> (replicate i BfIncr++) <$> cvt bf p | i < 0 = (move s p++) <$> (replicate (-i) BfDecr++) <$> cvt bf p | otherwise = cvt bf s
236
cvt :: [Bfp] -> Bfpstate -> (Bfpstate, [Bfprim]) cvt (Addp p i : bf) s | i > 0 = (move s p++) <$> (replicate i BfIncr++) <$> cvt bf p | i < 0 = (move s p++) <$> (replicate (-i) BfDecr++) <$> cvt bf p | otherwise = cvt bf s
236
cvt (Addp p i : bf) s | i > 0 = (move s p++) <$> (replicate i BfIncr++) <$> cvt bf p | i < 0 = (move s p++) <$> (replicate (-i) BfDecr++) <$> cvt bf p | otherwise = cvt bf s
187
false
true
0
11
66
163
80
83
null
null
fujimura/knob
test/KnobTests.hs
mit
test_Close :: Test test_Close = assertions "close" $ do k <- newKnob "abcde" h <- newFileHandle k "foo.txt" ReadMode liftIO $ hClose h $expect $ throwsEq (GHC.IOError (Just h) GHC.IllegalOperation "hGetBuf" "handle is closed" Nothing (Just "foo.txt")) (Data.ByteString.hGet h 1) $exp...
465
test_Close :: Test test_Close = assertions "close" $ do k <- newKnob "abcde" h <- newFileHandle k "foo.txt" ReadMode liftIO $ hClose h $expect $ throwsEq (GHC.IOError (Just h) GHC.IllegalOperation "hGetBuf" "handle is closed" Nothing (Just "foo.txt")) (Data.ByteString.hGet h 1) $exp...
465
test_Close = assertions "close" $ do k <- newKnob "abcde" h <- newFileHandle k "foo.txt" ReadMode liftIO $ hClose h $expect $ throwsEq (GHC.IOError (Just h) GHC.IllegalOperation "hGetBuf" "handle is closed" Nothing (Just "foo.txt")) (Data.ByteString.hGet h 1) $expect $ throwsEq ...
446
false
true
2
13
108
167
75
92
null
null
stites/reinforce
reinforce-environments/src/Environments/Blackjack.hs
bsd-3-clause
isNatural :: Hand -> Bool isNatural = \case Start (Ace, C10) -> True Start (C10, Ace) -> True _ -> False
125
isNatural :: Hand -> Bool isNatural = \case Start (Ace, C10) -> True Start (C10, Ace) -> True _ -> False
125
isNatural = \case Start (Ace, C10) -> True Start (C10, Ace) -> True _ -> False
99
false
true
4
5
41
50
28
22
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs
mit
decomposeChar '\x1EC5' = "\x0065\x0302\x0303"
45
decomposeChar '\x1EC5' = "\x0065\x0302\x0303"
45
decomposeChar '\x1EC5' = "\x0065\x0302\x0303"
45
false
false
0
4
3
10
4
6
null
null
JeffHeard/Hieroglyph
Graphics/Rendering/Hieroglyph/UIBehaviour.hs
bsd-2-clause
snapToBookmarkDialogResponseBehaviour b = consumeFullyQualifiedEventWith b responseGrp dialogueSrc "Snap to bookmark" $ \event -> do let (w,e,s,n) = tryJust "should be an ortho by this point" . ortho $ hdata hdata = getHieroglyphData . eventdata $ renderDataE renderDataE = tryJust "snap to bookmark ...
862
snapToBookmarkDialogResponseBehaviour b = consumeFullyQualifiedEventWith b responseGrp dialogueSrc "Snap to bookmark" $ \event -> do let (w,e,s,n) = tryJust "should be an ortho by this point" . ortho $ hdata hdata = getHieroglyphData . eventdata $ renderDataE renderDataE = tryJust "snap to bookmark ...
862
snapToBookmarkDialogResponseBehaviour b = consumeFullyQualifiedEventWith b responseGrp dialogueSrc "Snap to bookmark" $ \event -> do let (w,e,s,n) = tryJust "should be an ortho by this point" . ortho $ hdata hdata = getHieroglyphData . eventdata $ renderDataE renderDataE = tryJust "snap to bookmark ...
862
false
false
0
20
185
259
132
127
null
null
sdiehl/ghc
compiler/types/Class.hs
bsd-3-clause
-- No default method pprDefMethInfo (Just (n, VanillaDM)) = text "Default method" <+> ppr n
94
pprDefMethInfo (Just (n, VanillaDM)) = text "Default method" <+> ppr n
73
pprDefMethInfo (Just (n, VanillaDM)) = text "Default method" <+> ppr n
73
true
false
0
8
17
32
16
16
null
null
craffit/flexdb
src/DB/Flex/Monad.hs
bsd-3-clause
runDbIO_ :: HDBC.IConnection c => c -> DbT IO a -> IO a runDbIO_ conn db = do res <- runDb_ conn db `onException` rollback conn commit conn return res
162
runDbIO_ :: HDBC.IConnection c => c -> DbT IO a -> IO a runDbIO_ conn db = do res <- runDb_ conn db `onException` rollback conn commit conn return res
162
runDbIO_ conn db = do res <- runDb_ conn db `onException` rollback conn commit conn return res
106
false
true
0
9
41
74
33
41
null
null
TomMD/ghc
compiler/types/TyCon.hs
bsd-3-clause
mkPromotedTyCon :: TyCon -> Kind -> TyCon mkPromotedTyCon tc kind = PromotedTyCon { tyConName = getName tc, tyConUnique = getUnique tc, tyConArity = tyConArity tc, tyConKind = kind, ty_con = tc }
249
mkPromotedTyCon :: TyCon -> Kind -> TyCon mkPromotedTyCon tc kind = PromotedTyCon { tyConName = getName tc, tyConUnique = getUnique tc, tyConArity = tyConArity tc, tyConKind = kind, ty_con = tc }
249
mkPromotedTyCon tc kind = PromotedTyCon { tyConName = getName tc, tyConUnique = getUnique tc, tyConArity = tyConArity tc, tyConKind = kind, ty_con = tc }
207
false
true
0
8
85
74
38
36
null
null
mamapanda/8-Puzzle-Solver
src/Main.hs
bsd-3-clause
getInputPuzzle::IO (Maybe [[Int]]) getInputPuzzle = getPuzzleRec [] where getPuzzleRec puzzle@[_, _, _] = return $ Just puzzle getPuzzleRec puzzle = putStr "Row>> " >> hFlush stdout >> getLine >>= \input -> let row = mapMaybe readMaybe $ words input ::[Int] in...
487
getInputPuzzle::IO (Maybe [[Int]]) getInputPuzzle = getPuzzleRec [] where getPuzzleRec puzzle@[_, _, _] = return $ Just puzzle getPuzzleRec puzzle = putStr "Row>> " >> hFlush stdout >> getLine >>= \input -> let row = mapMaybe readMaybe $ words input ::[Int] in...
487
getInputPuzzle = getPuzzleRec [] where getPuzzleRec puzzle@[_, _, _] = return $ Just puzzle getPuzzleRec puzzle = putStr "Row>> " >> hFlush stdout >> getLine >>= \input -> let row = mapMaybe readMaybe $ words input ::[Int] in if length row /= 3 th...
452
false
true
1
13
152
149
77
72
null
null
snoyberg/ghc
compiler/hsSyn/HsDoc.hs
bsd-3-clause
ppr_mbDoc Nothing = empty
28
ppr_mbDoc Nothing = empty
28
ppr_mbDoc Nothing = empty
28
false
false
0
5
6
9
4
5
null
null
maruks/haskell-book
app/Main.hs
gpl-3.0
main :: IO () main = Ch5.main
29
main :: IO () main = Ch5.main
29
main = Ch5.main
15
false
true
1
6
6
22
9
13
null
null
castaway/pandoc
src/Text/Pandoc/Readers/RST.hs
gpl-2.0
titleTransform :: [Block] -- ^ list of blocks -> ([Block], [Inline]) -- ^ modified list of blocks, title titleTransform ((Header 1 head1):(Header 2 head2):rest) | not (any (isHeader 1) rest || any (isHeader 2) rest) = -- both title & subtitle (promoteHeaders 2 rest, head1 ++ [Str ":"...
338
titleTransform :: [Block] -- ^ list of blocks -> ([Block], [Inline]) titleTransform ((Header 1 head1):(Header 2 head2):rest) | not (any (isHeader 1) rest || any (isHeader 2) rest) = -- both title & subtitle (promoteHeaders 2 rest, head1 ++ [Str ":", Space] ++ head2)
301
titleTransform ((Header 1 head1):(Header 2 head2):rest) | not (any (isHeader 1) rest || any (isHeader 2) rest) = -- both title & subtitle (promoteHeaders 2 rest, head1 ++ [Str ":", Space] ++ head2)
204
true
true
0
13
86
135
69
66
null
null
psibi/yesod
yesod-bin/AddHandler.hs
mit
getCabal :: IO FilePath getCabal = do allFiles <- getDirectoryContents "." case filter (".cabal" `isSuffixOf`) allFiles of [x] -> return x [] -> error "No cabal file found" _ -> error "Too many cabal files found"
244
getCabal :: IO FilePath getCabal = do allFiles <- getDirectoryContents "." case filter (".cabal" `isSuffixOf`) allFiles of [x] -> return x [] -> error "No cabal file found" _ -> error "Too many cabal files found"
244
getCabal = do allFiles <- getDirectoryContents "." case filter (".cabal" `isSuffixOf`) allFiles of [x] -> return x [] -> error "No cabal file found" _ -> error "Too many cabal files found"
220
false
true
0
11
67
80
37
43
null
null
JPMoresmau/leksah
src/IDE/Core/State.hs
gpl-2.0
triggerEventIDE :: MonadIDE m => IDEEvent -> m IDEEvent triggerEventIDE e = liftIDE $ ask >>= \ideR -> triggerEvent ideR e
122
triggerEventIDE :: MonadIDE m => IDEEvent -> m IDEEvent triggerEventIDE e = liftIDE $ ask >>= \ideR -> triggerEvent ideR e
122
triggerEventIDE e = liftIDE $ ask >>= \ideR -> triggerEvent ideR e
66
false
true
0
8
20
50
23
27
null
null
spacekitteh/smcghc
compiler/cmm/CLabel.hs
bsd-3-clause
mkCmmClosureLabel pkg str = CmmLabel pkg str CmmClosure
61
mkCmmClosureLabel pkg str = CmmLabel pkg str CmmClosure
61
mkCmmClosureLabel pkg str = CmmLabel pkg str CmmClosure
61
false
false
0
5
13
18
8
10
null
null
andyarvanitis/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
vinstances i (Bind x b sc) = instancesB b + vinstances (i + 1) sc where instancesB (Let t v) = vinstances i v instancesB _ = 0
136
vinstances i (Bind x b sc) = instancesB b + vinstances (i + 1) sc where instancesB (Let t v) = vinstances i v instancesB _ = 0
136
vinstances i (Bind x b sc) = instancesB b + vinstances (i + 1) sc where instancesB (Let t v) = vinstances i v instancesB _ = 0
136
false
false
0
8
37
76
34
42
null
null
thomasjm/IHaskell
ipython-kernel/src/IHaskell/IPython/EasyKernel.hs
mit
replyTo config _ _ req@CompleteRequest{} replyHeader = do let code = getCode req pos = getCursorPos req (matchedText, completions) <- completion config code pos let start = pos - T.length matchedText end = pos reply = CompleteReply replyHeader completions start end Map.empty True return reply
320
replyTo config _ _ req@CompleteRequest{} replyHeader = do let code = getCode req pos = getCursorPos req (matchedText, completions) <- completion config code pos let start = pos - T.length matchedText end = pos reply = CompleteReply replyHeader completions start end Map.empty True return reply
320
replyTo config _ _ req@CompleteRequest{} replyHeader = do let code = getCode req pos = getCursorPos req (matchedText, completions) <- completion config code pos let start = pos - T.length matchedText end = pos reply = CompleteReply replyHeader completions start end Map.empty True return reply
320
false
false
0
12
71
113
54
59
null
null
urbanslug/ghc
testsuite/tests/stranal/sigs/BottomFromInnerLambda.hs
bsd-3-clause
expensive :: Int -> Int expensive 0 = 0
39
expensive :: Int -> Int expensive 0 = 0
39
expensive 0 = 0
15
false
true
0
5
8
18
9
9
null
null
candide-guevara/programming_challenges
haskell_learning/sudoku.hs
gpl-2.0
sym_substraction :: Symbols -> Symbols -> Symbols sym_substraction op1 op2 = filter (\x -> not $ elem x op2) op1
112
sym_substraction :: Symbols -> Symbols -> Symbols sym_substraction op1 op2 = filter (\x -> not $ elem x op2) op1
112
sym_substraction op1 op2 = filter (\x -> not $ elem x op2) op1
62
false
true
0
9
19
46
23
23
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/gcd_1.hs
mit
primRemInt (Pos x) (Neg (Succ y)) = Pos (primModNatS x (Succ y))
64
primRemInt (Pos x) (Neg (Succ y)) = Pos (primModNatS x (Succ y))
64
primRemInt (Pos x) (Neg (Succ y)) = Pos (primModNatS x (Succ y))
64
false
false
0
8
11
48
22
26
null
null
batterseapower/supercompilation-by-evaluation
IdSupply.hs
bsd-3-clause
-- | Splits a supply of unique identifiers to yield an infinite list of them. splitIdSupplyL :: IdSupply -> [IdSupply] splitIdSupplyL ids = ids1 : splitIdSupplyL ids2 where (ids1, ids2) = splitIdSupply ids -- | Yields the unique identifier from a supply.
265
splitIdSupplyL :: IdSupply -> [IdSupply] splitIdSupplyL ids = ids1 : splitIdSupplyL ids2 where (ids1, ids2) = splitIdSupply ids -- | Yields the unique identifier from a supply.
187
splitIdSupplyL ids = ids1 : splitIdSupplyL ids2 where (ids1, ids2) = splitIdSupply ids -- | Yields the unique identifier from a supply.
146
true
true
0
7
52
47
25
22
null
null
kmilner/tamarin-prover
lib/theory/src/Theory/Constraint/System.hs
gpl-3.0
-- | Returns the LHS or RHS proof-context of a diff proof context. eitherProofContext :: DiffProofContext -> Side -> ProofContext eitherProofContext ctxt s = if s==LHS then L.get dpcPCLeft ctxt else L.get dpcPCRight ctxt
220
eitherProofContext :: DiffProofContext -> Side -> ProofContext eitherProofContext ctxt s = if s==LHS then L.get dpcPCLeft ctxt else L.get dpcPCRight ctxt
153
eitherProofContext ctxt s = if s==LHS then L.get dpcPCLeft ctxt else L.get dpcPCRight ctxt
90
true
true
0
8
33
56
27
29
null
null
mruegenberg/PHCPack-hs
Setup.hs
bsd-3-clause
main = do let hooks = simpleUserHooks { preConf = \args cnfFlags -> do info <- (preConf simpleUserHooks) args cnfFlags checkPHC return info } defaultMainWithHooks hooks
221
main = do let hooks = simpleUserHooks { preConf = \args cnfFlags -> do info <- (preConf simpleUserHooks) args cnfFlags checkPHC return info } defaultMainWithHooks hooks
221
main = do let hooks = simpleUserHooks { preConf = \args cnfFlags -> do info <- (preConf simpleUserHooks) args cnfFlags checkPHC return info } defaultMainWithHooks hooks
221
false
false
0
18
78
63
29
34
null
null
chwarr/bond
compiler/src/Language/Bond/Syntax/Util.hs
mit
isScalar BT_Int32 = True
24
isScalar BT_Int32 = True
24
isScalar BT_Int32 = True
24
false
false
0
5
3
9
4
5
null
null
francesco-kriegel/conexp-hs
src/FormalContext/FormalContexts.hs
apache-2.0
nominalScale n = fromPredicate (==) d d where d = [1..n]
62
nominalScale n = fromPredicate (==) d d where d = [1..n]
62
nominalScale n = fromPredicate (==) d d where d = [1..n]
62
false
false
0
5
16
31
16
15
null
null
kawu/nerf
src/NLP/Nerf/Server.hs
bsd-2-clause
------------------------------------------------- -- Server ------------------------------------------------- -- | Run a Nerf server on a given port. runNerfServer :: Nerf -> N.PortID -> IO () runNerfServer nerf port = N.withSocketsDo $ do sock <- N.listenOn port forever $ sockHandler nerf sock
305
runNerfServer :: Nerf -> N.PortID -> IO () runNerfServer nerf port = N.withSocketsDo $ do sock <- N.listenOn port forever $ sockHandler nerf sock
153
runNerfServer nerf port = N.withSocketsDo $ do sock <- N.listenOn port forever $ sockHandler nerf sock
110
true
true
0
11
47
70
33
37
null
null
kim/amazonka
amazonka-autoscaling/gen/Network/AWS/AutoScaling/Types.hs
mpl-2.0
-- | The name of the Auto Scaling group associated with the instance. asidAutoScalingGroupName :: Lens' AutoScalingInstanceDetails Text asidAutoScalingGroupName = lens _asidAutoScalingGroupName (\s a -> s { _asidAutoScalingGroupName = a })
251
asidAutoScalingGroupName :: Lens' AutoScalingInstanceDetails Text asidAutoScalingGroupName = lens _asidAutoScalingGroupName (\s a -> s { _asidAutoScalingGroupName = a })
181
asidAutoScalingGroupName = lens _asidAutoScalingGroupName (\s a -> s { _asidAutoScalingGroupName = a })
115
true
true
0
9
42
40
22
18
null
null
neothemachine/monadiccp
src/Control/Monatron/Operations.hs
bsd-3-clause
toAlg :: (Functor f, Monad m) => Model f m -> AlgModel f (Codensity m) toAlg op t = codensity $ \k -> op (fmap k t)
123
toAlg :: (Functor f, Monad m) => Model f m -> AlgModel f (Codensity m) toAlg op t = codensity $ \k -> op (fmap k t)
123
toAlg op t = codensity $ \k -> op (fmap k t)
46
false
true
0
9
34
72
35
37
null
null
np/ling
Ling/Free.hs
bsd-3-clause
bcProc :: Fold Proc Channel bcProc f = \case Act act -> Act <$> bcAct f act Procs procs -> Procs <$> bcProcs f procs p@Replicate{}-> pure p Dot{} -> error "bcProc: Dot" LetP defs p -> LetP defs <$> bcProc f p
232
bcProc :: Fold Proc Channel bcProc f = \case Act act -> Act <$> bcAct f act Procs procs -> Procs <$> bcProcs f procs p@Replicate{}-> pure p Dot{} -> error "bcProc: Dot" LetP defs p -> LetP defs <$> bcProc f p
232
bcProc f = \case Act act -> Act <$> bcAct f act Procs procs -> Procs <$> bcProcs f procs p@Replicate{}-> pure p Dot{} -> error "bcProc: Dot" LetP defs p -> LetP defs <$> bcProc f p
204
false
true
5
7
66
70
37
33
null
null
sthiele/hasple
ASP.hs
gpl-3.0
mkSubtraction a (Negation b) = (mkAddition a b)
47
mkSubtraction a (Negation b) = (mkAddition a b)
47
mkSubtraction a (Negation b) = (mkAddition a b)
47
false
false
0
7
7
25
12
13
null
null
spechub/Hets
Maude/Printing.hs
gpl-2.0
-- * Combinators -- | Convert every item in @list@, combine with @dsep@, wrap with @wrap@. combine :: (Pretty a) => (Doc -> Doc) -> ([Doc] -> Doc) -> [a] -> Doc combine _ _ [] = empty
184
combine :: (Pretty a) => (Doc -> Doc) -> ([Doc] -> Doc) -> [a] -> Doc combine _ _ [] = empty
92
combine _ _ [] = empty
22
true
true
0
11
38
69
36
33
null
null
PPitson/Deque
test/unit/HUnitTests.hs
bsd-3-clause
-- front of empty deque test23 = TestCase (assertEqual "take front from empty deque" 0 (length $ takeFrontDEQ 1 (fromListDEQ [])) )
131
test23 = TestCase (assertEqual "take front from empty deque" 0 (length $ takeFrontDEQ 1 (fromListDEQ [])) )
107
test23 = TestCase (assertEqual "take front from empty deque" 0 (length $ takeFrontDEQ 1 (fromListDEQ [])) )
107
true
false
0
13
21
40
20
20
null
null
pauloborba/plc
src/InterpretacaoEAnaliseEstaticaDelinguagens.hs
cc0-1.0
-- Chamando o interpretador com o ambiente e a memória vazios. at t = int [] t []
82
at t = int [] t []
18
at t = int [] t []
18
true
false
0
6
18
21
10
11
null
null
Dananji/MailchimpSimple
src/MailchimpSimple.hs
bsd-3-clause
removeSubscriber :: String -> String -> String -> IO Bool removeSubscriber apiKey email listName = do let url = endPointUrl apiKey listid <- getListID apiKey listName let subhash = createHash email let rUrl = url ++ "/lists/" ++ listid ++ "/members/" ++ subhash response <...
793
removeSubscriber :: String -> String -> String -> IO Bool removeSubscriber apiKey email listName = do let url = endPointUrl apiKey listid <- getListID apiKey listName let subhash = createHash email let rUrl = url ++ "/lists/" ++ listid ++ "/members/" ++ subhash response <...
793
removeSubscriber apiKey email listName = do let url = endPointUrl apiKey listid <- getListID apiKey listName let subhash = createHash email let rUrl = url ++ "/lists/" ++ listid ++ "/members/" ++ subhash response <- processEmptyRequest rUrl apiKey methodDelete let status = statusCode $ responseStatu...
704
false
true
2
13
202
217
102
115
null
null
vluukkal/aspreify
testaspparse.hs
mit
tgenrel15 = TestCase $ assertEqual "genrel 15" (Card (Sym (Const "any")) (Sym (Const "any")) [Plain (Const "blub") [Sym (Var "Foo"),Sym (Const "\"Bar\""),Sym (Var "Goo")] True] True) (wrapparser_bl' genrel "" "{blub(Foo,\"Bar\",Goo)}")
235
tgenrel15 = TestCase $ assertEqual "genrel 15" (Card (Sym (Const "any")) (Sym (Const "any")) [Plain (Const "blub") [Sym (Var "Foo"),Sym (Const "\"Bar\""),Sym (Var "Goo")] True] True) (wrapparser_bl' genrel "" "{blub(Foo,\"Bar\",Goo)}")
235
tgenrel15 = TestCase $ assertEqual "genrel 15" (Card (Sym (Const "any")) (Sym (Const "any")) [Plain (Const "blub") [Sym (Var "Foo"),Sym (Const "\"Bar\""),Sym (Var "Goo")] True] True) (wrapparser_bl' genrel "" "{blub(Foo,\"Bar\",Goo)}")
235
false
false
0
14
29
115
57
58
null
null
acowley/ghc
compiler/utils/Pretty.hs
bsd-3-clause
-- | Produce spacing for indenting the amount specified. -- -- an old version inserted tabs being 8 columns apart in the output. spaces :: Int -> String spaces !n = replicate n ' '
180
spaces :: Int -> String spaces !n = replicate n ' '
51
spaces !n = replicate n ' '
27
true
true
0
6
34
27
14
13
null
null
juhp/stack
src/Stack/Package.hs
bsd-3-clause
buildOtherSources :: BuildInfo -> RIO Ctx [DotCabalPath] buildOtherSources build = do cwd <- liftIO getCurrentDir dir <- asks (parent . ctxFile) file <- asks ctxFile let resolveDirFiles files toCabalPath = forMaybeM files $ \fp -> do result <- resolveDirFile dir fp ...
741
buildOtherSources :: BuildInfo -> RIO Ctx [DotCabalPath] buildOtherSources build = do cwd <- liftIO getCurrentDir dir <- asks (parent . ctxFile) file <- asks ctxFile let resolveDirFiles files toCabalPath = forMaybeM files $ \fp -> do result <- resolveDirFile dir fp ...
741
buildOtherSources build = do cwd <- liftIO getCurrentDir dir <- asks (parent . ctxFile) file <- asks ctxFile let resolveDirFiles files toCabalPath = forMaybeM files $ \fp -> do result <- resolveDirFile dir fp case result of Nothing -> do ...
684
false
true
0
20
245
204
92
112
null
null
sdiehl/ghc
compiler/utils/Outputable.hs
bsd-3-clause
withPprStyle :: PprStyle -> SDoc -> SDoc withPprStyle sty d = SDoc $ \ctxt -> runSDoc d ctxt{sdocStyle=sty}
107
withPprStyle :: PprStyle -> SDoc -> SDoc withPprStyle sty d = SDoc $ \ctxt -> runSDoc d ctxt{sdocStyle=sty}
107
withPprStyle sty d = SDoc $ \ctxt -> runSDoc d ctxt{sdocStyle=sty}
66
false
true
0
9
17
46
24
22
null
null
haskell-game/fungen
examples/worms/worms.hs
bsd-3-clause
tail0Pos = (45.0,75.0)
22
tail0Pos = (45.0,75.0)
22
tail0Pos = (45.0,75.0)
22
false
false
0
5
2
12
7
5
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/MouseEvent.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent.toElement Mozilla MouseEvent.toElement documentation> getToElement :: (MonadDOM m, IsMouseEvent self) => self -> m (Maybe Node) getToElement self = liftDOM (((toMouseEvent self) ^. js "toElement") >>= fromJSVal)
293
getToElement :: (MonadDOM m, IsMouseEvent self) => self -> m (Maybe Node) getToElement self = liftDOM (((toMouseEvent self) ^. js "toElement") >>= fromJSVal)
172
getToElement self = liftDOM (((toMouseEvent self) ^. js "toElement") >>= fromJSVal)
85
true
true
0
11
44
69
35
34
null
null
shnarazk/mios
src/SAT/Mios/Criteria.hs
gpl-3.0
varDecayActivity :: Solver -> IO () varDecayActivity Solver{..} = return ()
75
varDecayActivity :: Solver -> IO () varDecayActivity Solver{..} = return ()
75
varDecayActivity Solver{..} = return ()
39
false
true
0
7
10
34
16
18
null
null
spechub/Hets
CoCASL/Logic_CoCASL.hs
gpl-2.0
parseCo :: String -> Maybe (Bool, String) parseCo s = case stripPrefix "Co" s of Just r | not $ isPrefixOf "nd" r -> Just (True, r) _ -> Just (False, s)
156
parseCo :: String -> Maybe (Bool, String) parseCo s = case stripPrefix "Co" s of Just r | not $ isPrefixOf "nd" r -> Just (True, r) _ -> Just (False, s)
156
parseCo s = case stripPrefix "Co" s of Just r | not $ isPrefixOf "nd" r -> Just (True, r) _ -> Just (False, s)
114
false
true
0
12
35
88
42
46
null
null
mcschroeder/ghc
compiler/basicTypes/OccName.hs
bsd-3-clause
isValOcc _ = False
37
isValOcc _ = False
37
isValOcc _ = False
37
false
false
0
5
22
9
4
5
null
null
seereason/wl-pprint-text
Text/PrettyPrint/Leijen/Text/Monadic.hs
bsd-3-clause
-- | The document @(align x)@ renders document @x@ with the nesting -- level set to the current column. It is used for example to -- implement 'hang'. -- -- As an example, we will put a document right above another one, -- regardless of the current nesting level: -- -- > x $$ y = align (x <$> y) -- -- > tes...
506
align :: (Monad m) => m Doc -> m Doc align = liftM PP.align
59
align = liftM PP.align
22
true
true
0
8
129
58
35
23
null
null
lfairy/sylvia
Sylvia/Render/Backend/Cairo.hs
gpl-3.0
testRender :: IO () testRender = writePNG "result.png" . stackHorizontally $ map render es where es = map (fromRight . parseExp) $ [ "L 0" , "LL 1" , "LL 0" , "LLL 2 0 (1 0)" , "(L 0 0) (L 0 0)" , "L (L 1 (0 0)) (L 1 (0 0))" ]
288
testRender :: IO () testRender = writePNG "result.png" . stackHorizontally $ map render es where es = map (fromRight . parseExp) $ [ "L 0" , "LL 1" , "LL 0" , "LLL 2 0 (1 0)" , "(L 0 0) (L 0 0)" , "L (L 1 (0 0)) (L 1 (0 0))" ]
288
testRender = writePNG "result.png" . stackHorizontally $ map render es where es = map (fromRight . parseExp) $ [ "L 0" , "LL 1" , "LL 0" , "LLL 2 0 (1 0)" , "(L 0 0) (L 0 0)" , "L (L 1 (0 0)) (L 1 (0 0))" ]
268
false
true
0
8
116
72
38
34
null
null
joelburget/material-ui-hs
Main.hs
mit
main :: IO () main = do Just doc <- currentDocument Just elem <- documentGetElementById doc ("inject" :: JSString) render (pageWrapper_ [] ()) elem
159
main :: IO () main = do Just doc <- currentDocument Just elem <- documentGetElementById doc ("inject" :: JSString) render (pageWrapper_ [] ()) elem
159
main = do Just doc <- currentDocument Just elem <- documentGetElementById doc ("inject" :: JSString) render (pageWrapper_ [] ()) elem
145
false
true
0
11
35
73
32
41
null
null
qmenoret/gitlab-report-generator
src/json-parser/Milestone.hs
bsd-3-clause
getComparator "description" = comparing Milestone.description
65
getComparator "description" = comparing Milestone.description
65
getComparator "description" = comparing Milestone.description
65
false
false
0
6
8
14
6
8
null
null
lukexi/rumpus
src/Rumpus/Systems/Shared.hs
bsd-3-clause
defineComponentKeyWithType "State" [t|Dynamic|] -- | Pairs a filename along with an expression -- to evaluate in that filename's environment once compiled type CodeFile = (FilePath, String)
195
defineComponentKeyWithType "State" [t|Dynamic|] -- | Pairs a filename along with an expression -- to evaluate in that filename's environment once compiled type CodeFile = (FilePath, String)
195
defineComponentKeyWithType "State" [t|Dynamic|] -- | Pairs a filename along with an expression -- to evaluate in that filename's environment once compiled type CodeFile = (FilePath, String)
195
false
false
0
5
31
28
17
11
null
null
aslatter/blog
Blog/Templates.hs
gpl-3.0
renderWith :: (TemplateState App -> TemplateState App) -> ByteString -> App Response renderWith f name = do ts <- appTemplate renderInternal (f ts) name -- | Call a template with the given arguments.
204
renderWith :: (TemplateState App -> TemplateState App) -> ByteString -> App Response renderWith f name = do ts <- appTemplate renderInternal (f ts) name -- | Call a template with the given arguments.
204
renderWith f name = do ts <- appTemplate renderInternal (f ts) name -- | Call a template with the given arguments.
119
false
true
0
9
37
62
29
33
null
null
mmachenry/final-fortune
src/CardDB.hs
bsd-2-clause
cards :: [Card] cards = [ --------------------- -- Storm win --------------------- spell Sorcery "Tendrils of Agony" "2BB" $ stormWin 10 , spell Instant "Brain Freeze" "1U" $ stormWin 18 , spell Sorcery "Grapeshot" "1R" $ modify $ \g-> let o = opponent g l = opponentLife o new...
4,389
cards :: [Card] cards = [ --------------------- -- Storm win --------------------- spell Sorcery "Tendrils of Agony" "2BB" $ stormWin 10 , spell Instant "Brain Freeze" "1U" $ stormWin 18 , spell Sorcery "Grapeshot" "1R" $ modify $ \g-> let o = opponent g l = opponentLife o newL...
4,388
cards = [ --------------------- -- Storm win --------------------- spell Sorcery "Tendrils of Agony" "2BB" $ stormWin 10 , spell Instant "Brain Freeze" "1U" $ stormWin 18 , spell Sorcery "Grapeshot" "1R" $ modify $ \g-> let o = opponent g l = opponentLife o newLife = max (l - (...
4,372
false
true
0
19
1,068
1,145
557
588
null
null
XeCycle/bamboo-shoot3
util/bsic/PBS/BSIParse.hs
gpl-3.0
__ = skipMany ((space >> return ()) <|> comment)
48
__ = skipMany ((space >> return ()) <|> comment)
48
__ = skipMany ((space >> return ()) <|> comment)
48
false
false
0
11
8
28
14
14
null
null
brendanhay/gogol
gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Product.hs
mpl-2.0
-- | List of migration warnings. sqlivessrWarnings :: Lens' SQLInstancesVerifyExternalSyncSettingsResponse [SQLExternalSyncSettingError] sqlivessrWarnings = lens _sqlivessrWarnings (\ s a -> s{_sqlivessrWarnings = a}) . _Default . _Coerce
258
sqlivessrWarnings :: Lens' SQLInstancesVerifyExternalSyncSettingsResponse [SQLExternalSyncSettingError] sqlivessrWarnings = lens _sqlivessrWarnings (\ s a -> s{_sqlivessrWarnings = a}) . _Default . _Coerce
225
sqlivessrWarnings = lens _sqlivessrWarnings (\ s a -> s{_sqlivessrWarnings = a}) . _Default . _Coerce
121
true
true
2
8
45
57
28
29
null
null
jeroennoels/exact-real
src/Ternary/List/FiniteExact.hs
mit
truncateLift :: Int -> (Exact -> Exact) -> FiniteExact -> FiniteExact truncateLift n f x = takeFinite cut inf where inf = f (infiniteExact x) cut = n + finiteLength x -- The caller takes responsibility for ensuring finite data.
238
truncateLift :: Int -> (Exact -> Exact) -> FiniteExact -> FiniteExact truncateLift n f x = takeFinite cut inf where inf = f (infiniteExact x) cut = n + finiteLength x -- The caller takes responsibility for ensuring finite data.
238
truncateLift n f x = takeFinite cut inf where inf = f (infiniteExact x) cut = n + finiteLength x -- The caller takes responsibility for ensuring finite data.
168
false
true
4
9
50
84
37
47
null
null
philopon/apiary-benchmark
src/yesod.hs
mit
handleNum57R :: Handler TypedContent; handleNum57R = returnBS "deep"
68
handleNum57R :: Handler TypedContent handleNum57R = returnBS "deep"
67
handleNum57R = returnBS "deep"
30
false
true
1
5
7
21
9
12
null
null
johnpmayer/elm-compiler
src/Type/Constrain/Expression.hs
bsd-3-clause
constrainCase :: Env.Environment -> R.Region -> Canonical.Expr -> [(P.CanonicalPattern, Canonical.Expr)] -> Type -> IO TypeConstraint constrainCase env region expr branches tipe = do exprVar <- variable Flexible exprCon <- constrain env expr (varN exprVar) (branchInfo, branchExpr...
1,021
constrainCase :: Env.Environment -> R.Region -> Canonical.Expr -> [(P.CanonicalPattern, Canonical.Expr)] -> Type -> IO TypeConstraint constrainCase env region expr branches tipe = do exprVar <- variable Flexible exprCon <- constrain env expr (varN exprVar) (branchInfo, branchExpr...
1,021
constrainCase env region expr branches tipe = do exprVar <- variable Flexible exprCon <- constrain env expr (varN exprVar) (branchInfo, branchExprCons) <- unzip <$> mapM (branch (varN exprVar)) branches (vars, cons) <- pairCons region Error.CaseBranch varToCon branchInfo return $...
863
false
true
0
13
287
327
160
167
null
null
keithodulaigh/Hets
ConstraintCASL/Formula.hs
gpl-2.0
simplerelation :: [String] -> AParser st RELATION simplerelation k = do emptyRelationT return Empty_Relation <|> do equalityRelationT return Equal_Relation <|> do oParenT r <- relation k cParenT return r <|> do ide <- parseId k return (Id_Relation ide) ...
400
simplerelation :: [String] -> AParser st RELATION simplerelation k = do emptyRelationT return Empty_Relation <|> do equalityRelationT return Equal_Relation <|> do oParenT r <- relation k cParenT return r <|> do ide <- parseId k return (Id_Relation ide) ...
400
simplerelation k = do emptyRelationT return Empty_Relation <|> do equalityRelationT return Equal_Relation <|> do oParenT r <- relation k cParenT return r <|> do ide <- parseId k return (Id_Relation ide) <|> do inverseT r <- relation k ...
350
false
true
12
10
135
142
62
80
null
null
shouya/projz
assembler/Assembler.hs
bsd-2-clause
validateArgument (Addr) (AddrA _) = True
44
validateArgument (Addr) (AddrA _) = True
44
validateArgument (Addr) (AddrA _) = True
44
false
false
1
7
9
23
10
13
null
null
TomMD/irc-core
src/Irc/Model.hs
bsd-3-clause
-- | Add a message to the client state for users and channels. -- The user or channel record should be added if it does not already -- exist. recordMessage :: IrcMessage -> Identifier {- ^ target -} -> IrcConnection -> Logic IrcConnection recordMessage mesg target conn = do let mesg1 = set mesgMe isMe mesg ...
527
recordMessage :: IrcMessage -> Identifier {- ^ target -} -> IrcConnection -> Logic IrcConnection recordMessage mesg target conn = do let mesg1 = set mesgMe isMe mesg recordFor target mesg1 return conn where isMe = isMyNick (views mesgSender userNick mesg) conn -- | Predicate to determine if a ...
385
recordMessage mesg target conn = do let mesg1 = set mesgMe isMe mesg recordFor target mesg1 return conn where isMe = isMyNick (views mesgSender userNick mesg) conn -- | Predicate to determine if a given identifier is the primary nick -- for the given connection.
280
true
true
0
10
113
92
45
47
null
null
rvion/ride
jetpack/src/Data/HashMap/Strict/AsHm.hs
bsd-3-clause
-- hm_filter :: forall v k. (v -> Bool) -> HashMap k v -> HashMap k v hm_filter = I.filter
90
hm_filter = I.filter
20
hm_filter = I.filter
20
true
false
0
5
19
9
5
4
null
null
forste/haReFork
refactorer/RefacUnfoldAsPatterns.hs
bsd-3-clause
myMap f i (x:xs) = f i x : myMap f (i+1) xs
43
myMap f i (x:xs) = f i x : myMap f (i+1) xs
43
myMap f i (x:xs) = f i x : myMap f (i+1) xs
43
false
false
0
8
12
43
21
22
null
null
brendanhay/gogol
gogol-people/gen/Network/Google/People/Types/Product.hs
mpl-2.0
-- | Output only. The total number of contacts in the group irrespective of -- max members in specified in the request. cgMemberCount :: Lens' ContactGroup (Maybe Int32) cgMemberCount = lens _cgMemberCount (\ s a -> s{_cgMemberCount = a}) . mapping _Coerce
270
cgMemberCount :: Lens' ContactGroup (Maybe Int32) cgMemberCount = lens _cgMemberCount (\ s a -> s{_cgMemberCount = a}) . mapping _Coerce
150
cgMemberCount = lens _cgMemberCount (\ s a -> s{_cgMemberCount = a}) . mapping _Coerce
100
true
true
0
10
55
56
29
27
null
null
pparkkin/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpHasSideEffects AtomicModifyMutVarOp = True
48
primOpHasSideEffects AtomicModifyMutVarOp = True
48
primOpHasSideEffects AtomicModifyMutVarOp = True
48
false
false
0
5
3
9
4
5
null
null
michalkonecny/aern
aern-poly-plot-gtk/demos/plotPicard.hs
bsd-3-clause
picardStepwise :: Bool -- ^ use non-rigorous Picard operator (no explicit error margins, no checking of inclusion) -> Bool -- ^ whether to parametrise the solving over uncertainty in initial values -> ([Fn] -> [Fn]) -- ^ field -> [Var Fn] -- ^ variables -> [CF] -- ^ initial values -> [CF] -- ...
3,315
picardStepwise :: Bool -- ^ use non-rigorous Picard operator (no explicit error margins, no checking of inclusion) -> Bool -- ^ whether to parametrise the solving over uncertainty in initial values -> ([Fn] -> [Fn]) -- ^ field -> [Var Fn] -- ^ variables -> [CF] -- ^ initial values -> [CF] -- ...
3,315
picardStepwise useClassical useFlow field paramVars initValues partition initialWidening limits iters = foldl picardOnSegment ([],initValues) partition where picardOnSegment (resultsForPrevSegments, segmentInitValues) segment ...
2,800
false
true
10
19
1,205
642
326
316
null
null
AlexanderPankiv/ghc
compiler/cmm/CmmExpr.hs
bsd-3-clause
globalRegType _ (DoubleReg _) = cmmFloat W64
53
globalRegType _ (DoubleReg _) = cmmFloat W64
53
globalRegType _ (DoubleReg _) = cmmFloat W64
53
false
false
0
7
15
20
9
11
null
null
kmate/HaRe
old/testing/asPatterns/A4.hs
bsd-3-clause
main :: BTree Int main = buildtree [3,1,2]
42
main :: BTree Int main = buildtree [3,1,2]
42
main = buildtree [3,1,2]
24
false
true
0
6
7
31
15
16
null
null
ezyang/ghc
compiler/prelude/THNames.hs
bsd-3-clause
thSyn, thLib, qqLib :: Module thSyn = mkTHModule (fsLit "Language.Haskell.TH.Syntax")
85
thSyn, thLib, qqLib :: Module thSyn = mkTHModule (fsLit "Language.Haskell.TH.Syntax")
85
thSyn = mkTHModule (fsLit "Language.Haskell.TH.Syntax")
55
false
true
0
7
9
24
14
10
null
null
ducis/haAni
hs/common/Graphics/Rendering/OpenGL/GL/Fog.hs
gpl-2.0
fogf :: FogParameter -> GLfloat -> IO () fogf = glFogf . marshalFogParameter
76
fogf :: FogParameter -> GLfloat -> IO () fogf = glFogf . marshalFogParameter
76
fogf = glFogf . marshalFogParameter
35
false
true
0
8
12
28
14
14
null
null
shlevy/ghc
compiler/basicTypes/Module.hs
bsd-3-clause
addBootSuffix_maybe :: Bool -> FilePath -> FilePath -- ^ Add the @-boot@ suffix if the @Bool@ argument is @True@ addBootSuffix_maybe is_boot path | is_boot = addBootSuffix path | otherwise = path
199
addBootSuffix_maybe :: Bool -> FilePath -> FilePath addBootSuffix_maybe is_boot path | is_boot = addBootSuffix path | otherwise = path
138
addBootSuffix_maybe is_boot path | is_boot = addBootSuffix path | otherwise = path
86
true
true
1
7
34
42
20
22
null
null
mitchellwrosen/language-lua2
src/Language/Lua/Parser/Internal.hs
bsd-3-clause
mkFloat :: L Token -> Expression NodeInfo mkFloat a@(L _ (TkFloatLit s)) = Float (nodeInfo a) s
95
mkFloat :: L Token -> Expression NodeInfo mkFloat a@(L _ (TkFloatLit s)) = Float (nodeInfo a) s
95
mkFloat a@(L _ (TkFloatLit s)) = Float (nodeInfo a) s
53
false
true
0
9
16
56
26
30
null
null
scslab/hails
Hails/Web/Controller.hs
mit
respond :: Routeable r => r -> Controller r respond = return
60
respond :: Routeable r => r -> Controller r respond = return
60
respond = return
16
false
true
0
7
11
25
12
13
null
null
rvion/ride
jetpack/src/Control/Concurrent/STM/AsStm.hs
bsd-3-clause
-- stm_newTBQueue :: forall a. Int -> STM (TBQueue a) stm_newTBQueue = I.newTBQueue
83
stm_newTBQueue = I.newTBQueue
29
stm_newTBQueue = I.newTBQueue
29
true
false
1
6
12
13
5
8
null
null
hguenther/smtlib2
extras/composite/Language/SMTLib2/Composite/List.hs
gpl-3.0
safeGenericIndex [] _ = Nothing
31
safeGenericIndex [] _ = Nothing
31
safeGenericIndex [] _ = Nothing
31
false
false
0
5
4
15
6
9
null
null
urbanslug/ghc
testsuite/tests/haddock/should_compile_noflag_nohaddock/haddockD001.hs
bsd-3-clause
- xc,zxcz -} main = putStrLn "hej"
35
main = putStrLn "hej"
21
main = putStrLn "hej"
21
true
false
4
5
7
26
10
16
null
null
xaverdh/hmail
HMail/Header.hs
gpl-3.0
asTextMap :: Header -> M.Map T.Text T.Text asTextMap (Header mp) = M.mapKeys Enc.decodeUtf8 mp
94
asTextMap :: Header -> M.Map T.Text T.Text asTextMap (Header mp) = M.mapKeys Enc.decodeUtf8 mp
94
asTextMap (Header mp) = M.mapKeys Enc.decodeUtf8 mp
51
false
true
0
9
13
49
22
27
null
null
nomeata/ghc
compiler/codeGen/CgCallConv.hs
bsd-3-clause
mkRegTbl' :: [GlobalReg] -> [Int] -> [Int] -> [Int] -> [Int] -> ([Int], [Int], [Int], [Int]) mkRegTbl' regs_in_use vanillas floats doubles longs = (ok_vanilla, ok_float, ok_double, ok_long) where ok_vanilla = mapCatMaybes (select (\i -> VanillaReg i VNonGcPtr)) vanillas -- ptrhood ...
945
mkRegTbl' :: [GlobalReg] -> [Int] -> [Int] -> [Int] -> [Int] -> ([Int], [Int], [Int], [Int]) mkRegTbl' regs_in_use vanillas floats doubles longs = (ok_vanilla, ok_float, ok_double, ok_long) where ok_vanilla = mapCatMaybes (select (\i -> VanillaReg i VNonGcPtr)) vanillas -- ptrhood ...
945
mkRegTbl' regs_in_use vanillas floats doubles longs = (ok_vanilla, ok_float, ok_double, ok_long) where ok_vanilla = mapCatMaybes (select (\i -> VanillaReg i VNonGcPtr)) vanillas -- ptrhood isn't looked at, hence we can use any old rep. ok_float = mapCatMaybes (select FloatReg) floats...
842
false
true
0
11
277
251
137
114
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
lucidly = id
12
lucidly = id
12
lucidly = id
12
false
false
0
4
2
6
3
3
null
null
ivanperez-keera/Yampa
yampa/tests/TestsLaws.hs
bsd-3-clause
laws_t6_lhs :: [(Double, Double)] laws_t6_lhs = testSF1 (arr dup >>> (first integral >>> arr (id *** (+3.0))))
110
laws_t6_lhs :: [(Double, Double)] laws_t6_lhs = testSF1 (arr dup >>> (first integral >>> arr (id *** (+3.0))))
110
laws_t6_lhs = testSF1 (arr dup >>> (first integral >>> arr (id *** (+3.0))))
76
false
true
0
13
16
64
32
32
null
null
ssaavedra/liquidhaskell
benchmarks/hmatrix-0.15.0.1/examples/vector.hs
bsd-3-clause
w = subVector 2 3 (linspace 5 (0,1)) :: Vector Double
53
w = subVector 2 3 (linspace 5 (0,1)) :: Vector Double
53
w = subVector 2 3 (linspace 5 (0,1)) :: Vector Double
53
false
false
0
8
10
36
18
18
null
null
input-output-hk/pos-haskell-prototype
wallet/src/Cardano/Wallet/Kernel/DB/Sqlite.hs
mit
-- | 'DataType' declaration to convince @Beam@ treating 'Core.Coin(s) as -- SQLite BIG INTEGER. coinDT :: DataType SqliteDataTypeSyntax Core.Coin coinDT = DataType sqliteBigIntType
180
coinDT :: DataType SqliteDataTypeSyntax Core.Coin coinDT = DataType sqliteBigIntType
84
coinDT = DataType sqliteBigIntType
34
true
true
0
6
22
23
12
11
null
null
BenedictEggers/haskell_brainfuck
Main.hs
mit
moveRight t = error "Already at right end of tape"
50
moveRight t = error "Already at right end of tape"
50
moveRight t = error "Already at right end of tape"
50
false
false
1
5
9
16
5
11
null
null
seliopou/webbits
src/BrownPLT/JavaScript/Environment.hs
bsd-3-clause
empty :: Partial empty = Partial M.empty M.empty []
51
empty :: Partial empty = Partial M.empty M.empty []
51
empty = Partial M.empty M.empty []
34
false
true
0
6
8
24
12
12
null
null
ml9951/ghc
compiler/types/CoAxiom.hs
bsd-3-clause
coAxiomBranches :: CoAxiom br -> Branches br coAxiomBranches = co_ax_branches
77
coAxiomBranches :: CoAxiom br -> Branches br coAxiomBranches = co_ax_branches
77
coAxiomBranches = co_ax_branches
32
false
true
0
6
9
21
10
11
null
null
rueshyna/gogol
gogol-games/gen/Network/Google/Games/Types/Product.hs
mpl-2.0
-- | The score submissions. psslScores :: Lens' PlayerScoreSubmissionList [ScoreSubmission] psslScores = lens _psslScores (\ s a -> s{_psslScores = a}) . _Default . _Coerce
186
psslScores :: Lens' PlayerScoreSubmissionList [ScoreSubmission] psslScores = lens _psslScores (\ s a -> s{_psslScores = a}) . _Default . _Coerce
158
psslScores = lens _psslScores (\ s a -> s{_psslScores = a}) . _Default . _Coerce
94
true
true
0
11
38
53
28
25
null
null
diku-dk/futhark
src/Futhark/IR/Mem.hs
isc
expReturns (BasicOp (Index v slice)) = do pure . varInfoToExpReturns <$> sliceInfo v slice
92
expReturns (BasicOp (Index v slice)) = do pure . varInfoToExpReturns <$> sliceInfo v slice
92
expReturns (BasicOp (Index v slice)) = do pure . varInfoToExpReturns <$> sliceInfo v slice
92
false
false
0
8
15
40
18
22
null
null
tonicebrian/tetris-haskell
test/StageSpec.hs
gpl-3.0
s4 = mkState [] [OKind,OKind]
29
s4 = mkState [] [OKind,OKind]
29
s4 = mkState [] [OKind,OKind]
29
false
false
1
5
4
23
10
13
null
null
pparkkin/eta
compiler/ETA/Utils/Util.hs
bsd-3-clause
third3 :: (c -> d) -> (a, b, c) -> (a, b, d) third3 f (a, b, c) = (a, b, f c)
77
third3 :: (c -> d) -> (a, b, c) -> (a, b, d) third3 f (a, b, c) = (a, b, f c)
77
third3 f (a, b, c) = (a, b, f c)
32
false
true
0
7
22
75
42
33
null
null
TomMD/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
pprCmdArg (HsCmdTop cmd _ _ _) = parens (ppr_lcmd cmd)
56
pprCmdArg (HsCmdTop cmd _ _ _) = parens (ppr_lcmd cmd)
56
pprCmdArg (HsCmdTop cmd _ _ _) = parens (ppr_lcmd cmd)
56
false
false
0
6
11
31
14
17
null
null
futtetennista/IntroductionToFunctionalProgramming
src/MonadTransformersPlayground.hs
mit
runEval2 :: Eval2 a -> Either T.Text a runEval2 = runIdentity . runExceptT . unwrapEvalFail
93
runEval2 :: Eval2 a -> Either T.Text a runEval2 = runIdentity . runExceptT . unwrapEvalFail
93
runEval2 = runIdentity . runExceptT . unwrapEvalFail
54
false
true
1
8
16
39
17
22
null
null
gcampax/ghc
compiler/simplCore/SimplMonad.hs
bsd-3-clause
getFamEnvs :: SimplM (FamInstEnv, FamInstEnv) getFamEnvs = SM (\st_env us sc -> return (st_fams st_env, us, sc))
112
getFamEnvs :: SimplM (FamInstEnv, FamInstEnv) getFamEnvs = SM (\st_env us sc -> return (st_fams st_env, us, sc))
112
getFamEnvs = SM (\st_env us sc -> return (st_fams st_env, us, sc))
66
false
true
0
10
16
50
27
23
null
null