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
Ofenhed/Steganography
src/CommandLineMain.hs
gpl-2.0
fastMode :: Argument.Option Bool fastMode = Argument.option ['q'] ["quick"] Argument.boolean False "Quick mode. This will simply write pixels instead of moving them around, which will be quicker but make Steganalysis (detection of hidden data) easier."
252
fastMode :: Argument.Option Bool fastMode = Argument.option ['q'] ["quick"] Argument.boolean False "Quick mode. This will simply write pixels instead of moving them around, which will be quicker but make Steganalysis (detection of hidden data) easier."
252
fastMode = Argument.option ['q'] ["quick"] Argument.boolean False "Quick mode. This will simply write pixels instead of moving them around, which will be quicker but make Steganalysis (detection of hidden data) easier."
219
false
true
0
6
34
37
19
18
null
null
gnn/Hets
OMDoc/Import.hs
gpl-2.0
initialEnv :: HetcatsOpts -> ImpEnv initialEnv opts = ImpEnv { libMap = Map.empty , nsymbMap = Map.empty , hetsOptions = opts }
177
initialEnv :: HetcatsOpts -> ImpEnv initialEnv opts = ImpEnv { libMap = Map.empty , nsymbMap = Map.empty , hetsOptions = opts }
177
initialEnv opts = ImpEnv { libMap = Map.empty , nsymbMap = Map.empty , hetsOptions = opts }
141
false
true
0
7
71
42
24
18
null
null
matthew-eads/agpl
CodeGen.hs
isc
turnTypeDec :: Q [Dec] turnTypeDec = do {return [TySynD (mkName "Turn") [] (ConT (mkName "Player"))]}
128
turnTypeDec :: Q [Dec] turnTypeDec = do {return [TySynD (mkName "Turn") [] (ConT (mkName "Player"))]}
128
turnTypeDec = do {return [TySynD (mkName "Turn") [] (ConT (mkName "Player"))]}
105
false
true
0
14
41
61
29
32
null
null
zaxtax/hakaru
haskell/Tests/Disintegrate.hs
bsd-3-clause
pendulum' :: Cond 'HReal 'HReal pendulum' = lam $ \t -> normal (real_ 42) (prob_ 1) >>= \theta -> weight (densityNormal (real_ 0) (prob_ 1) (t - sin theta)) >>= \_ -> dirac theta
194
pendulum' :: Cond 'HReal 'HReal pendulum' = lam $ \t -> normal (real_ 42) (prob_ 1) >>= \theta -> weight (densityNormal (real_ 0) (prob_ 1) (t - sin theta)) >>= \_ -> dirac theta
194
pendulum' = lam $ \t -> normal (real_ 42) (prob_ 1) >>= \theta -> weight (densityNormal (real_ 0) (prob_ 1) (t - sin theta)) >>= \_ -> dirac theta
162
false
true
2
10
49
110
52
58
null
null
dave4420/mosh-clone
src/Mosh.hs
bsd-3-clause
group' :: Int -> [a] -> [[a]] group' _ [] = []
46
group' :: Int -> [a] -> [[a]] group' _ [] = []
46
group' _ [] = []
16
false
true
0
8
11
37
20
17
null
null
mhwombat/creatur-audio-wains
src/ALife/Creatur/Wain/Audio/Pattern.hs
bsd-3-clause
dropSmallestChanges' n xs = dropSmallestChanges' (n-1) xs' where x = minimumBy (comparing fst) xs xs' = dropFirstOccurrence x xs
138
dropSmallestChanges' n xs = dropSmallestChanges' (n-1) xs' where x = minimumBy (comparing fst) xs xs' = dropFirstOccurrence x xs
138
dropSmallestChanges' n xs = dropSmallestChanges' (n-1) xs' where x = minimumBy (comparing fst) xs xs' = dropFirstOccurrence x xs
138
false
false
3
7
28
63
25
38
null
null
pparkkin/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpHasSideEffects WriteArrayOp = True
40
primOpHasSideEffects WriteArrayOp = True
40
primOpHasSideEffects WriteArrayOp = True
40
false
false
0
5
3
9
4
5
null
null
christiaanb/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
staticPtrDataConName :: Name staticPtrDataConName = conName gHC_STATICPTR (fsLit "StaticPtr") staticPtrDataConKey
117
staticPtrDataConName :: Name staticPtrDataConName = conName gHC_STATICPTR (fsLit "StaticPtr") staticPtrDataConKey
117
staticPtrDataConName = conName gHC_STATICPTR (fsLit "StaticPtr") staticPtrDataConKey
88
false
true
0
7
13
24
12
12
null
null
juhp/network-uri
Network/URI.hs
bsd-3-clause
pathAbs :: URIParser String pathAbs = do { _ <- char '/' ; ss <- option "" pathRootLess ; return $ '/':ss }
136
pathAbs :: URIParser String pathAbs = do { _ <- char '/' ; ss <- option "" pathRootLess ; return $ '/':ss }
136
pathAbs = do { _ <- char '/' ; ss <- option "" pathRootLess ; return $ '/':ss }
108
false
true
0
8
51
51
25
26
null
null
vito/atomo-old
Atomo/Parser.hs
mit
parens = P.parens atomo
30
parens = P.parens atomo
30
parens = P.parens atomo
30
false
false
0
6
10
11
5
6
null
null
cmc-haskell-2016/fluids
src/Main.hs
bsd-3-clause
drawPol5 :: Picture drawPol5 = (color (makeColor 0.5 0.8 0.8 1) (Polygon [( winSizeX / 2, winSizeY / 2) , ( -winSizeX / 2, winSizeY / 2) , ( -winSizeX / 2, boxY)]))
216
drawPol5 :: Picture drawPol5 = (color (makeColor 0.5 0.8 0.8 1) (Polygon [( winSizeX / 2, winSizeY / 2) , ( -winSizeX / 2, winSizeY / 2) , ( -winSizeX / 2, boxY)]))
216
drawPol5 = (color (makeColor 0.5 0.8 0.8 1) (Polygon [( winSizeX / 2, winSizeY / 2) , ( -winSizeX / 2, winSizeY / 2) , ( -winSizeX / 2, boxY)]))
196
false
true
0
12
84
88
49
39
null
null
iurdan/haskell-life
src/Life.hs
gpl-3.0
-- Next generation tick :: Grid -> IO Grid tick world = R.computeP $ R.zipWith destiny world neighbours where neighbours = mapStencil2 (R.BoundConst 0) sten world
166
tick :: Grid -> IO Grid tick world = R.computeP $ R.zipWith destiny world neighbours where neighbours = mapStencil2 (R.BoundConst 0) sten world
147
tick world = R.computeP $ R.zipWith destiny world neighbours where neighbours = mapStencil2 (R.BoundConst 0) sten world
123
true
true
3
8
29
68
30
38
null
null
vwwv/easy-bitcoin
Examples/Example3.hs
bsd-3-clause
-- So far so good :) ....but it is not working, the btc client only accepts signatures if the were signed on the same order as the signature were defined on -- the redeem_script!! That is, if the redeem script was (RedeemScript n [sigA,sigB,sigC,sigD]), first we need to sign with D, then C, then B and so on... -- -- We...
602
signed_by_bob_then_alice = signed_by_alice_then_bob & scriptSig utxo . escrowSignaturesFor redeemScript %~ reverse
114
signed_by_bob_then_alice = signed_by_alice_then_bob & scriptSig utxo . escrowSignaturesFor redeemScript %~ reverse
114
true
false
0
8
98
29
16
13
null
null
balez/ag-a-la-carte
Language/Grammars/AGalacarte/Product.hs
gpl-3.0
ppure (TCons t ts) x = x :. ppure ts x
38
ppure (TCons t ts) x = x :. ppure ts x
38
ppure (TCons t ts) x = x :. ppure ts x
38
false
false
0
7
10
28
13
15
null
null
uduki/hsQt
Qtc/ClassTypes/Gui.hs
bsd-2-clause
qValidatorFromPtr :: Ptr (TQValidator a) -> IO (QValidator a) qValidatorFromPtr p = objectFromPtr_nf p
104
qValidatorFromPtr :: Ptr (TQValidator a) -> IO (QValidator a) qValidatorFromPtr p = objectFromPtr_nf p
104
qValidatorFromPtr p = objectFromPtr_nf p
42
false
true
0
9
15
43
19
24
null
null
hargettp/raft
tests/TestRaft.hs
mit
test5Cluster10Consistency :: (IO Transport) -> RaftConfiguration -> Assertion test5Cluster10Consistency transportF cfg = do transport <- transportF with5Servers transport cfg $ \vRafts -> do pause errOrResult <- race (do _ <- waitForLeader vRafts threadDelay $ 45 ...
1,634
test5Cluster10Consistency :: (IO Transport) -> RaftConfiguration -> Assertion test5Cluster10Consistency transportF cfg = do transport <- transportF with5Servers transport cfg $ \vRafts -> do pause errOrResult <- race (do _ <- waitForLeader vRafts threadDelay $ 45 ...
1,634
test5Cluster10Consistency transportF cfg = do transport <- transportF with5Servers transport cfg $ \vRafts -> do pause errOrResult <- race (do _ <- waitForLeader vRafts threadDelay $ 45 * 1000 * 1000 return ()) (withClient transport "cl...
1,556
false
true
0
24
749
433
191
242
null
null
luite/selinux
src/System/Linux/SELinux.hs
bsd-3-clause
queryPathCon :: String -> (CString -> Ptr CSecurityContext -> IO CInt) -> FilePath -> IO SecurityContext queryPathCon e f p = withCString p $ \p' -> queryCon e (f p')
167
queryPathCon :: String -> (CString -> Ptr CSecurityContext -> IO CInt) -> FilePath -> IO SecurityContext queryPathCon e f p = withCString p $ \p' -> queryCon e (f p')
166
queryPathCon e f p = withCString p $ \p' -> queryCon e (f p')
61
false
true
2
11
30
78
36
42
null
null
zwxxx/Tiger_Haskell
test/LexerTest.hs
bsd-3-clause
test :: String -> [Token] -> Assertion test fileName expected = do path <- getDataFileName ("test\\testcases\\" ++ fileName) content <- readFile path let actual = alexScanTokens content assertEqual "" actual expected
233
test :: String -> [Token] -> Assertion test fileName expected = do path <- getDataFileName ("test\\testcases\\" ++ fileName) content <- readFile path let actual = alexScanTokens content assertEqual "" actual expected
233
test fileName expected = do path <- getDataFileName ("test\\testcases\\" ++ fileName) content <- readFile path let actual = alexScanTokens content assertEqual "" actual expected
194
false
true
0
11
47
82
36
46
null
null
craigbilner/advent-of-code-2016
day-6.hs
apache-2.0
getFrequentLetter f m lineCount = do line <- getLine let updatedMap = foldr updateMap m $ zip [1..] line getFrequentLetter f updatedMap (lineCount - 1)
164
getFrequentLetter f m lineCount = do line <- getLine let updatedMap = foldr updateMap m $ zip [1..] line getFrequentLetter f updatedMap (lineCount - 1)
164
getFrequentLetter f m lineCount = do line <- getLine let updatedMap = foldr updateMap m $ zip [1..] line getFrequentLetter f updatedMap (lineCount - 1)
164
false
false
0
12
37
63
29
34
null
null
m-alvarez/jhc
src/Grin/Show.hs
mit
prettyExp vl y = vl <> tshow y
30
prettyExp vl y = vl <> tshow y
30
prettyExp vl y = vl <> tshow y
30
false
false
0
6
7
18
8
10
null
null
alekar/hugs
packages/base/Data/Set.hs
bsd-3-clause
trim cmplo cmphi t@(Bin sx x l r) = case cmplo x of LT -> case cmphi x of GT -> t le -> trim cmplo cmphi l ge -> trim cmplo cmphi r
173
trim cmplo cmphi t@(Bin sx x l r) = case cmplo x of LT -> case cmphi x of GT -> t le -> trim cmplo cmphi l ge -> trim cmplo cmphi r
173
trim cmplo cmphi t@(Bin sx x l r) = case cmplo x of LT -> case cmphi x of GT -> t le -> trim cmplo cmphi l ge -> trim cmplo cmphi r
173
false
false
2
9
75
83
38
45
null
null
d0kt0r0/Tidal
vis/Sound/Tidal/Vis2.hs
gpl-3.0
levelHeight = totalWidth * ratio
32
levelHeight = totalWidth * ratio
32
levelHeight = totalWidth * ratio
32
false
false
0
5
4
10
5
5
null
null
GaloisInc/mistral
src/Mistral/Parser/LexerCore.hs
bsd-3-clause
-- | Generate an atom token. mkAtom :: Action mkAtom src chunk sc = (Just (Atom (tail (L.unpack chunk)) `at` src), sc)
118
mkAtom :: Action mkAtom src chunk sc = (Just (Atom (tail (L.unpack chunk)) `at` src), sc)
89
mkAtom src chunk sc = (Just (Atom (tail (L.unpack chunk)) `at` src), sc)
72
true
true
0
14
21
54
29
25
null
null
kolmodin/cabal
cabal-install/Distribution/Client/InstallPlan.hs
bsd-3-clause
stateDependencyRelation (Configured _) (Configured _) = True
64
stateDependencyRelation (Configured _) (Configured _) = True
64
stateDependencyRelation (Configured _) (Configured _) = True
64
false
false
0
7
10
23
11
12
null
null
felixsch/drivingthesky
src/Road.hs
gpl-2.0
buildBlockObject :: RoadDefinition -> Int -> Int -> Int -> Maybe [Object Block] buildBlockObject def i j typ = Just $ maybe [] (\x -> [Object pos nullVector x]) $ getBlockType def typ where pos = V3 x 0.0 z x = roadStartX + (fromIntegral j * defaultBlockWidth) z = - (fromIntegral i * defaultBlockHeigh...
322
buildBlockObject :: RoadDefinition -> Int -> Int -> Int -> Maybe [Object Block] buildBlockObject def i j typ = Just $ maybe [] (\x -> [Object pos nullVector x]) $ getBlockType def typ where pos = V3 x 0.0 z x = roadStartX + (fromIntegral j * defaultBlockWidth) z = - (fromIntegral i * defaultBlockHeigh...
322
buildBlockObject def i j typ = Just $ maybe [] (\x -> [Object pos nullVector x]) $ getBlockType def typ where pos = V3 x 0.0 z x = roadStartX + (fromIntegral j * defaultBlockWidth) z = - (fromIntegral i * defaultBlockHeight)
242
false
true
0
11
72
134
67
67
null
null
juodaspaulius/clafer
src/Language/Clafer/Intermediate/Tracing.hs
mit
printAstNode (AstCard x) = printTree x
38
printAstNode (AstCard x) = printTree x
38
printAstNode (AstCard x) = printTree x
38
false
false
0
7
5
18
8
10
null
null
kajigor/uKanren_transformations
app/console/Main.hs
bsd-3-clause
outputParser :: Parser FilePath outputParser = strOption ( long "output" <> short 'o' <> metavar "OUTPUT" <> help "Where to put the transformation results." )
169
outputParser :: Parser FilePath outputParser = strOption ( long "output" <> short 'o' <> metavar "OUTPUT" <> help "Where to put the transformation results." )
169
outputParser = strOption ( long "output" <> short 'o' <> metavar "OUTPUT" <> help "Where to put the transformation results." )
137
false
true
1
10
35
48
20
28
null
null
jgoerzen/darcs-buildpackage
darcs-buildpackage.hs
gpl-2.0
main = do initLogging ver <- getVerFromCL pkg <- getPkgFromCL let (upsv, debv) = splitVer ver case debv of Nothing -> infoM "main" "Debian-native package; not building upstream" Just dv -> do buildorig pkg upsv debv args <- getArgs ...
557
main = do initLogging ver <- getVerFromCL pkg <- getPkgFromCL let (upsv, debv) = splitVer ver case debv of Nothing -> infoM "main" "Debian-native package; not building upstream" Just dv -> do buildorig pkg upsv debv args <- getArgs ...
557
main = do initLogging ver <- getVerFromCL pkg <- getPkgFromCL let (upsv, debv) = splitVer ver case debv of Nothing -> infoM "main" "Debian-native package; not building upstream" Just dv -> do buildorig pkg upsv debv args <- getArgs ...
557
false
false
0
13
189
157
73
84
null
null
ducis/haAni
hs/common/Graphics/Rendering/OpenGL/GL/PixelRectangles/Convolution.hs
gpl-2.0
marshalConvolutionBorderMode' :: ConvolutionBorderMode' -> GLint marshalConvolutionBorderMode' x = fromIntegral $ case x of Reduce' -> gl_REDUCE ConstantBorder' -> gl_CONSTANT_BORDER ReplicateBorder' -> gl_REPLICATE_BORDER
231
marshalConvolutionBorderMode' :: ConvolutionBorderMode' -> GLint marshalConvolutionBorderMode' x = fromIntegral $ case x of Reduce' -> gl_REDUCE ConstantBorder' -> gl_CONSTANT_BORDER ReplicateBorder' -> gl_REPLICATE_BORDER
231
marshalConvolutionBorderMode' x = fromIntegral $ case x of Reduce' -> gl_REDUCE ConstantBorder' -> gl_CONSTANT_BORDER ReplicateBorder' -> gl_REPLICATE_BORDER
166
false
true
3
6
30
49
22
27
null
null
siddhanathan/ghc
testsuite/tests/typecheck/should_compile/T7891.hs
bsd-3-clause
b :: Char b = f 'b'
19
b :: Char b = f 'b'
19
b = f 'b'
9
false
true
0
6
6
20
8
12
null
null
hferreiro/replay
compiler/cmm/PprC.hs
bsd-3-clause
signedOp (MO_S_Neg _) = True
32
signedOp (MO_S_Neg _) = True
32
signedOp (MO_S_Neg _) = True
32
false
false
0
6
8
16
7
9
null
null
elieux/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
toIntegerClassOpKey = mkPreludeMiscIdUnique 192
48
toIntegerClassOpKey = mkPreludeMiscIdUnique 192
48
toIntegerClassOpKey = mkPreludeMiscIdUnique 192
48
false
false
0
5
4
9
4
5
null
null
marcelosousa/poet
src/Test/Examples/ExFour.hs
gpl-2.0
t21_4' s = let v = safeLookup "t21" s (BS.pack "pcq") in case v of IntVal 1 -> let pcVal = (IntVal 2) zVal = (IntVal 1) ns = insert (BS.pack "pcq") pcVal s ns' = insert (BS.pack "z") zVal ns in [ns'] _ -> []
261
t21_4' s = let v = safeLookup "t21" s (BS.pack "pcq") in case v of IntVal 1 -> let pcVal = (IntVal 2) zVal = (IntVal 1) ns = insert (BS.pack "pcq") pcVal s ns' = insert (BS.pack "z") zVal ns in [ns'] _ -> []
261
t21_4' s = let v = safeLookup "t21" s (BS.pack "pcq") in case v of IntVal 1 -> let pcVal = (IntVal 2) zVal = (IntVal 1) ns = insert (BS.pack "pcq") pcVal s ns' = insert (BS.pack "z") zVal ns in [ns'] _ -> []
261
false
false
1
17
99
131
62
69
null
null
clockworkdevstudio/Idlewild-Lang
Semantics.hs
bsd-2-clause
addFunction :: Symbol -> String -> CodeTransformation () addFunction newFunction name = do state <- get put state {semanticStateSymbols = (Map.insert (map toLower (removeTypeTag name)) newFunction (semanticStateSymbols state))}
246
addFunction :: Symbol -> String -> CodeTransformation () addFunction newFunction name = do state <- get put state {semanticStateSymbols = (Map.insert (map toLower (removeTypeTag name)) newFunction (semanticStateSymbols state))}
246
addFunction newFunction name = do state <- get put state {semanticStateSymbols = (Map.insert (map toLower (removeTypeTag name)) newFunction (semanticStateSymbols state))}
189
false
true
0
15
46
82
40
42
null
null
karamellpelle/grid
source/Game/Grid/Helpers/Camera.hs
gpl-3.0
-- | follow path by turning -- fixme: see StepDT cameraToPathTurn :: Camera -> Path -> Camera cameraToPathTurn camera path = let turn = cameraTurnIdeal camera turn' = pathTurn path in if turn == turn' then camera else let b = cameraTurnB camera b' = cameraTurnBIdeal cam...
1,053
cameraToPathTurn :: Camera -> Path -> Camera cameraToPathTurn camera path = let turn = cameraTurnIdeal camera turn' = pathTurn path in if turn == turn' then camera else let b = cameraTurnB camera b' = cameraTurnBIdeal camera balpha = cameraTurnBAlpha camera...
1,001
cameraToPathTurn camera path = let turn = cameraTurnIdeal camera turn' = pathTurn path in if turn == turn' then camera else let b = cameraTurnB camera b' = cameraTurnBIdeal camera balpha = cameraTurnBAlpha camera a = cameraTurnA camera ...
956
true
true
0
13
426
188
102
86
null
null
vTurbine/ghc
compiler/hsSyn/HsBinds.hs
bsd-3-clause
ppr_sig (SpecInstSig _ ty) = pragBrackets (text "SPECIALIZE instance" <+> ppr ty)
83
ppr_sig (SpecInstSig _ ty) = pragBrackets (text "SPECIALIZE instance" <+> ppr ty)
83
ppr_sig (SpecInstSig _ ty) = pragBrackets (text "SPECIALIZE instance" <+> ppr ty)
83
false
false
0
8
13
33
15
18
null
null
mariefarrell/Hets
CommonLogic/Sublogic.hs
gpl-2.0
{- | determines the sublogic for terms inside of a term-sequence, given predicates of the super-text -} sl_termInSeq :: Set.Set NAME -> CommonLogicSL -> TERM -> CommonLogicSL sl_termInSeq prds cs term = case term of Name_term n -> sl_nameInTermSeq prds cs n Funct_term t tseq _ -> comp_list $ f...
492
sl_termInSeq :: Set.Set NAME -> CommonLogicSL -> TERM -> CommonLogicSL sl_termInSeq prds cs term = case term of Name_term n -> sl_nameInTermSeq prds cs n Funct_term t tseq _ -> comp_list $ folsl : sl_term prds cs t : map (sl_termSeq prds cs) tseq Comment_term t _ _ -> sl_term prds cs t ...
388
sl_termInSeq prds cs term = case term of Name_term n -> sl_nameInTermSeq prds cs n Funct_term t tseq _ -> comp_list $ folsl : sl_term prds cs t : map (sl_termSeq prds cs) tseq Comment_term t _ _ -> sl_term prds cs t That_term {} -> impsl -- | determines sublogic for basic items
317
true
true
0
11
119
132
63
69
null
null
keera-studios/hsQt
Qtc/Enums/Core/QFile.hs
bsd-2-clause
fWriteUser :: Permissions fWriteUser = ifPermissions $ 512
60
fWriteUser :: Permissions fWriteUser = ifPermissions $ 512
60
fWriteUser = ifPermissions $ 512
34
false
true
0
6
9
18
8
10
null
null
vladimir-ipatov/ganeti
src/Ganeti/Constants.hs
gpl-2.0
sshConfigDir :: String sshConfigDir = AutoConf.sshConfigDir
59
sshConfigDir :: String sshConfigDir = AutoConf.sshConfigDir
59
sshConfigDir = AutoConf.sshConfigDir
36
false
true
0
6
5
20
8
12
null
null
MedeaMelana/FlingSolver
Fling.hs
bsd-3-clause
mirrorX :: Point -> Point mirrorX [] = []
41
mirrorX :: Point -> Point mirrorX [] = []
41
mirrorX [] = []
15
false
true
0
6
8
22
11
11
null
null
ndmitchell/hogle-dead
src/Action/Server.hs
bsd-3-clause
showResults :: Query -> [[ItemEx]] -> String showResults query results = unlines $ ["<h1>" ++ renderQuery query ++ "</h1>"] ++ ["<p>No results found</p>" | null results] ++ ["<div class=result>" ++ "<div class=ans><a href=\"" ++ itemURL ++ "\">" ++ displayItem query itemItem ++ "</a></div>" ++ "<d...
553
showResults :: Query -> [[ItemEx]] -> String showResults query results = unlines $ ["<h1>" ++ renderQuery query ++ "</h1>"] ++ ["<p>No results found</p>" | null results] ++ ["<div class=result>" ++ "<div class=ans><a href=\"" ++ itemURL ++ "\">" ++ displayItem query itemItem ++ "</a></div>" ++ "<d...
553
showResults query results = unlines $ ["<h1>" ++ renderQuery query ++ "</h1>"] ++ ["<p>No results found</p>" | null results] ++ ["<div class=result>" ++ "<div class=ans><a href=\"" ++ itemURL ++ "\">" ++ displayItem query itemItem ++ "</a></div>" ++ "<div class=from>" ++ showFroms is ++ "</div>" ...
508
false
true
4
19
114
188
91
97
null
null
spl/generic-deriving-extras
src/Generics/Deriving/Zipper.hs
bsd-3-clause
leaveM :: Monad m => Loc a -> m a leaveM = return . leave
57
leaveM :: Monad m => Loc a -> m a leaveM = return . leave
57
leaveM = return . leave
23
false
true
0
8
14
38
16
22
null
null
kylcarte/threepenny-extras
src/Examples/ContactTest.hs
bsd-3-clause
-- }}} -- Content {{{ content :: Row [IO Element] content = paddedRow
71
content :: Row [IO Element] content = paddedRow
47
content = paddedRow
19
true
true
2
6
14
29
12
17
null
null
dysinger/amazonka
amazonka-s3/gen/Network/AWS/S3/CreateMultipartUpload.hs
mpl-2.0
-- | Allows grantee to write the ACL for the applicable object. cmuGrantWriteACP :: Lens' CreateMultipartUpload (Maybe Text) cmuGrantWriteACP = lens _cmuGrantWriteACP (\s a -> s { _cmuGrantWriteACP = a })
204
cmuGrantWriteACP :: Lens' CreateMultipartUpload (Maybe Text) cmuGrantWriteACP = lens _cmuGrantWriteACP (\s a -> s { _cmuGrantWriteACP = a })
140
cmuGrantWriteACP = lens _cmuGrantWriteACP (\s a -> s { _cmuGrantWriteACP = a })
79
true
true
0
9
30
46
25
21
null
null
erikd/yesod
yesod-core/Yesod/Core.hs
mit
showIntegral :: Integral a => a -> String showIntegral x = show (fromIntegral x :: Integer)
91
showIntegral :: Integral a => a -> String showIntegral x = show (fromIntegral x :: Integer)
91
showIntegral x = show (fromIntegral x :: Integer)
49
false
true
0
8
15
43
19
24
null
null
unaizalakain/snorkels-hs
src/Snorkels/Board.hs
gpl-3.0
-- | -- Check whether a given 'Group' is trapped by having all its surrounding -- positions taken by 'Stone's or 'Snorkel's from some other 'Player'. isTrapped :: Board -> Group -> Bool isTrapped board group = all (isBlocking (group&player) . getPiece board) (Set.toList $ areNeighbours board...
339
isTrapped :: Board -> Group -> Bool isTrapped board group = all (isBlocking (group&player) . getPiece board) (Set.toList $ areNeighbours board $ group&positions)
189
isTrapped board group = all (isBlocking (group&player) . getPiece board) (Set.toList $ areNeighbours board $ group&positions)
153
true
true
0
10
76
72
37
35
null
null
zchn/ethereum-analyzer
ethereum-analyzer/src/Ethereum/Analyzer/EVM/IR.hs
apache-2.0
evmOps2HplCfg el@((loc, _):_) = do l <- labelFor loc jpLabel <- myFreshLabel doEvmOps2HplCfg (mkLast $ HpJump jpLabel l) (mkFirst $ CoOp l) el where doEvmOps2HplCfg :: HplCfg -> Graph HplOp C O -> [(Word256, Operation)] -> WordLabelMapM HplCfg ...
1,123
evmOps2HplCfg el@((loc, _):_) = do l <- labelFor loc jpLabel <- myFreshLabel doEvmOps2HplCfg (mkLast $ HpJump jpLabel l) (mkFirst $ CoOp l) el where doEvmOps2HplCfg :: HplCfg -> Graph HplOp C O -> [(Word256, Operation)] -> WordLabelMapM HplCfg ...
1,123
evmOps2HplCfg el@((loc, _):_) = do l <- labelFor loc jpLabel <- myFreshLabel doEvmOps2HplCfg (mkLast $ HpJump jpLabel l) (mkFirst $ CoOp l) el where doEvmOps2HplCfg :: HplCfg -> Graph HplOp C O -> [(Word256, Operation)] -> WordLabelMapM HplCfg ...
1,123
false
false
1
19
365
455
216
239
null
null
castaway/pandoc
src/Text/Pandoc/Parsing.hs
gpl-2.0
testStringWith :: (Show a) => GenParser Char ParserState a -> String -> IO () testStringWith parser str = UTF8.putStrLn $ show $ readWith parser defaultParserState str
225
testStringWith :: (Show a) => GenParser Char ParserState a -> String -> IO () testStringWith parser str = UTF8.putStrLn $ show $ readWith parser defaultParserState str
225
testStringWith parser str = UTF8.putStrLn $ show $ readWith parser defaultParserState str
117
false
true
0
9
83
62
30
32
null
null
ellchow/pgrep
src/ParsecTree.hs
apache-2.0
whitespace1Parser :: Parser String whitespace1Parser = many1' $ space
69
whitespace1Parser :: Parser String whitespace1Parser = many1' $ space
69
whitespace1Parser = many1' $ space
34
false
true
1
6
8
22
9
13
null
null
beni55/snap-server
test/suite/Snap/Internal/Http/Server/Tests.hs
bsd-3-clause
testMethodParsing :: Test testMethodParsing = testCase "server/method parsing" $ Prelude.mapM_ testOneMethod ms where ms = [ GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT ]
190
testMethodParsing :: Test testMethodParsing = testCase "server/method parsing" $ Prelude.mapM_ testOneMethod ms where ms = [ GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT ]
190
testMethodParsing = testCase "server/method parsing" $ Prelude.mapM_ testOneMethod ms where ms = [ GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT ]
164
false
true
0
7
34
57
32
25
null
null
jml/graphql-api
src/GraphQL/Internal/Syntax/Parser.hs
bsd-3-clause
between :: Parser Text -> Parser Text -> Parser a -> Parser a between open close p = tok open *> p <* tok close
111
between :: Parser Text -> Parser Text -> Parser a -> Parser a between open close p = tok open *> p <* tok close
111
between open close p = tok open *> p <* tok close
49
false
true
0
9
24
60
26
34
null
null
cameronbwhite/ComputationalStructures
Haskell/RegExp.hs
bsd-3-clause
evalutateBinary :: (Bool -> Bool -> Bool) -> LogicExp -> LogicExp -> [(Char, Bool)] -> Bool evalutateBinary operator exp1 exp2 xs = exp1' `operator` exp2' where exp1' = evaluate exp1 xs; exp2' = evaluate exp2 xs
245
evalutateBinary :: (Bool -> Bool -> Bool) -> LogicExp -> LogicExp -> [(Char, Bool)] -> Bool evalutateBinary operator exp1 exp2 xs = exp1' `operator` exp2' where exp1' = evaluate exp1 xs; exp2' = evaluate exp2 xs
245
evalutateBinary operator exp1 exp2 xs = exp1' `operator` exp2' where exp1' = evaluate exp1 xs; exp2' = evaluate exp2 xs
133
false
true
0
10
69
86
46
40
null
null
geraldus/yesod
yesod-core/test/YesodCoreTest/Cache.hs
mit
runner :: Session () -> IO () runner f = toWaiApp C >>= runSession f
68
runner :: Session () -> IO () runner f = toWaiApp C >>= runSession f
68
runner f = toWaiApp C >>= runSession f
38
false
true
0
7
14
41
18
23
null
null
yesodweb/persistent
persistent/Database/Persist/Quasi/Internal.hs
mit
defaultPersistSettings, upperCaseSettings, lowerCaseSettings :: PersistSettings defaultPersistSettings = PersistSettings { psToDBName = id , psToFKName = \(EntityNameHS entName) (ConstraintNameHS conName) -> entName <> conName , psStrictFields = True , psIdName = "id" }
296
defaultPersistSettings, upperCaseSettings, lowerCaseSettings :: PersistSettings defaultPersistSettings = PersistSettings { psToDBName = id , psToFKName = \(EntityNameHS entName) (ConstraintNameHS conName) -> entName <> conName , psStrictFields = True , psIdName = "id" }
296
defaultPersistSettings = PersistSettings { psToDBName = id , psToFKName = \(EntityNameHS entName) (ConstraintNameHS conName) -> entName <> conName , psStrictFields = True , psIdName = "id" }
216
false
true
0
9
57
64
39
25
null
null
elieux/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
pprSkolInfo (IPSkol ips) = ptext (sLit "the implicit-parameter binding") <> plural ips <+> ptext (sLit "for") <+> pprWithCommas ppr ips
172
pprSkolInfo (IPSkol ips) = ptext (sLit "the implicit-parameter binding") <> plural ips <+> ptext (sLit "for") <+> pprWithCommas ppr ips
172
pprSkolInfo (IPSkol ips) = ptext (sLit "the implicit-parameter binding") <> plural ips <+> ptext (sLit "for") <+> pprWithCommas ppr ips
172
false
false
0
10
56
54
24
30
null
null
GU-CLASP/TypedFlow
TypedFlow/Broadcast.hs
lgpl-3.0
generateBC' :: (forall n s t proxy. KnownTyp t => KnownShape s => KnownNat n => Unique -> Bool -> proxy n -> T s t -> G (T (n : s) t)) -> (forall s' t'. KnownTyp t' => SShape s' -> T s' t' -> G (T s' t')) -> forall s t. KnownTyp t => SShape s -> T s t -> G (T ...
692
generateBC' :: (forall n s t proxy. KnownTyp t => KnownShape s => KnownNat n => Unique -> Bool -> proxy n -> T s t -> G (T (n : s) t)) -> (forall s' t'. KnownTyp t' => SShape s' -> T s' t' -> G (T s' t')) -> forall s t. KnownTyp t => SShape s -> T s t -> G (T ...
692
generateBC' broadcast rec (n@Sat :* sR) (Zip3T _ _s1 _s2 _s3 f x y z) = knownSShape sR ?> do u <- getUnique -- ATTN: it is critical not to do recursive calls to x,y,z here. Doing so would create new nodes, loosing sharing, and creating problems down the line. a' <- rec sR (f (Unbroadcast n u x) (Unbroadcast n u y...
367
false
true
7
18
208
286
145
141
null
null
seliopou/typo
Language/Typo/Prelude.hs
bsd-3-clause
prelude :: String prelude = "\ \-------------------------------------------------------------------------------\n\ \-- BEGIN PRELUDE --------------------------------------------------------------\n\ \-------------------------------------------------------------------------------\n\ \\n\ \{-# LANGUAGE NoImplicitPrelude ...
4,967
prelude :: String prelude = "\ \-------------------------------------------------------------------------------\n\ \-- BEGIN PRELUDE --------------------------------------------------------------\n\ \-------------------------------------------------------------------------------\n\ \\n\ \{-# LANGUAGE NoImplicitPrelude ...
4,967
prelude = "\ \-------------------------------------------------------------------------------\n\ \-- BEGIN PRELUDE --------------------------------------------------------------\n\ \-------------------------------------------------------------------------------\n\ \\n\ \{-# LANGUAGE NoImplicitPrelude #-}\n\ \{-# LANGUA...
4,949
false
true
0
4
1,130
11
6
5
null
null
bitemyapp/roshask
src/Ros/Internal/SetupUtil.hs
bsd-3-clause
rosBuild :: PackageDescription -> LocalBuildInfo -> UserHooks -> BuildFlags -> IO () rosBuild pkg lbi uh bfs = do binfo <- addRosMsgPaths targets let pkg' = updatePackageDescription binfo pkg (buildHook simpleUserHooks) pkg' lbi uh bfs where exe...
867
rosBuild :: PackageDescription -> LocalBuildInfo -> UserHooks -> BuildFlags -> IO () rosBuild pkg lbi uh bfs = do binfo <- addRosMsgPaths targets let pkg' = updatePackageDescription binfo pkg (buildHook simpleUserHooks) pkg' lbi uh bfs where exe...
867
rosBuild pkg lbi uh bfs = do binfo <- addRosMsgPaths targets let pkg' = updatePackageDescription binfo pkg (buildHook simpleUserHooks) pkg' lbi uh bfs where exeTargets = map exeName $ executables pkg targets = case library pkg of ...
769
false
true
1
10
240
141
67
74
null
null
rkoeninger/GameCom
src/lib/PPU.hs
mit
renderPixel :: Color -> [Maybe Word8] -> Word8 -> MachineState -> MachineState renderPixel baseColor spriteIndicies x state0 = do let (bgColor, state1) = ifs showBackground (getBackgroundPixel x) (Nothing,) state0 let (spColor, state2) = ifs showSprites (getSpritePixel spriteIndicies x (isJust bgColor)) (Nothin...
475
renderPixel :: Color -> [Maybe Word8] -> Word8 -> MachineState -> MachineState renderPixel baseColor spriteIndicies x state0 = do let (bgColor, state1) = ifs showBackground (getBackgroundPixel x) (Nothing,) state0 let (spColor, state2) = ifs showSprites (getSpritePixel spriteIndicies x (isJust bgColor)) (Nothin...
475
renderPixel baseColor spriteIndicies x state0 = do let (bgColor, state1) = ifs showBackground (getBackgroundPixel x) (Nothing,) state0 let (spColor, state2) = ifs showSprites (getSpritePixel spriteIndicies x (isJust bgColor)) (Nothing,) state1 let color = blitPixel baseColor bgColor spColor putPixel (x,...
396
false
true
0
14
76
164
82
82
null
null
phischu/fragnix
tests/packages/scotty/Network.Wai.Handler.Warp.HTTP2.File.hs
bsd-3-clause
ifUnmodifiedSince :: ValueTable -> Maybe HTTPDate ifUnmodifiedSince reqtbl = getHeaderValue tokenIfUnmodifiedSince reqtbl >>= parseHTTPDate
139
ifUnmodifiedSince :: ValueTable -> Maybe HTTPDate ifUnmodifiedSince reqtbl = getHeaderValue tokenIfUnmodifiedSince reqtbl >>= parseHTTPDate
139
ifUnmodifiedSince reqtbl = getHeaderValue tokenIfUnmodifiedSince reqtbl >>= parseHTTPDate
89
false
true
0
6
13
30
14
16
null
null
alanz/machines-play
Main.hs
bsd-3-clause
m3TransitionFmSi I1 = (S1 O0,Mealy m3TransitionFmS1)
52
m3TransitionFmSi I1 = (S1 O0,Mealy m3TransitionFmS1)
52
m3TransitionFmSi I1 = (S1 O0,Mealy m3TransitionFmS1)
52
false
false
0
6
5
21
10
11
null
null
mankyKitty/SimplyEasy
src/dpt/DependentlyTyped.hs
mit
substIn i r (e1 :@: e2) = substIn i r e1 :@: substOut i r e2
60
substIn i r (e1 :@: e2) = substIn i r e1 :@: substOut i r e2
60
substIn i r (e1 :@: e2) = substIn i r e1 :@: substOut i r e2
60
false
false
0
6
15
41
18
23
null
null
m-alvarez/jhc
src/Ho/Build.hs
mit
dumpDeps targets memap cug = case optDeps options of Nothing -> return () Just fp -> do let (sfps,sdps,ls) = collectDeps memap cug let yaml = Map.fromList [ ("Target",toNode targets), ("LibraryDesc",toNode [ fp | BuildHl fp <- [optMode options]]), ...
491
dumpDeps targets memap cug = case optDeps options of Nothing -> return () Just fp -> do let (sfps,sdps,ls) = collectDeps memap cug let yaml = Map.fromList [ ("Target",toNode targets), ("LibraryDesc",toNode [ fp | BuildHl fp <- [optMode options]]), ...
491
dumpDeps targets memap cug = case optDeps options of Nothing -> return () Just fp -> do let (sfps,sdps,ls) = collectDeps memap cug let yaml = Map.fromList [ ("Target",toNode targets), ("LibraryDesc",toNode [ fp | BuildHl fp <- [optMode options]]), ...
491
false
false
0
21
178
174
87
87
null
null
chreekat/snowdrift
Handler/Project.hs
agpl-3.0
getProjectContactR :: Text -> Handler Html getProjectContactR project_handle = do (project_contact_form, _) <- generateFormPost projectContactForm Entity _ project <- runYDB $ getBy404 (UniqueProjectHandle project_handle) defaultLayout $ do snowdriftTitle $ "Contact " <> projectName project ...
351
getProjectContactR :: Text -> Handler Html getProjectContactR project_handle = do (project_contact_form, _) <- generateFormPost projectContactForm Entity _ project <- runYDB $ getBy404 (UniqueProjectHandle project_handle) defaultLayout $ do snowdriftTitle $ "Contact " <> projectName project ...
351
getProjectContactR project_handle = do (project_contact_form, _) <- generateFormPost projectContactForm Entity _ project <- runYDB $ getBy404 (UniqueProjectHandle project_handle) defaultLayout $ do snowdriftTitle $ "Contact " <> projectName project $(widgetFile "project_contact")
308
false
true
0
12
63
93
42
51
null
null
brendanhay/gogol
gogol-classroom/gen/Network/Google/Classroom/Types/Product.hs
mpl-2.0
-- | Optional description of this course work material. The text must be a -- valid UTF-8 string containing no more than 30,000 characters. cwmDescription :: Lens' CourseWorkMaterial (Maybe Text) cwmDescription = lens _cwmDescription (\ s a -> s{_cwmDescription = a})
275
cwmDescription :: Lens' CourseWorkMaterial (Maybe Text) cwmDescription = lens _cwmDescription (\ s a -> s{_cwmDescription = a})
135
cwmDescription = lens _cwmDescription (\ s a -> s{_cwmDescription = a})
79
true
true
1
9
48
53
26
27
null
null
scvalex/interpol
Test/Standalone.hs
gpl-3.0
okVal :: Int okVal = 23
23
okVal :: Int okVal = 23
23
okVal = 23
10
false
true
0
4
5
11
6
5
null
null
sfindeisen/algebra-toys
toys.hs
gpl-3.0
fibo n = snd (fib_pair n 0 1) where fib_pair k f1 f2 = if (1 == k) then (f1, f2) else fib_pair (k-1) f2 (f1+f2) -- Fibonacci sequence (infinite)
213
fibo n = snd (fib_pair n 0 1) where fib_pair k f1 f2 = if (1 == k) then (f1, f2) else fib_pair (k-1) f2 (f1+f2) -- Fibonacci sequence (infinite)
213
fibo n = snd (fib_pair n 0 1) where fib_pair k f1 f2 = if (1 == k) then (f1, f2) else fib_pair (k-1) f2 (f1+f2) -- Fibonacci sequence (infinite)
213
false
false
0
8
98
79
42
37
null
null
jaalonso/I1M-Cod-Temas
src/Tema_11.hs
gpl-2.0
aplica Res x y = x - y
22
aplica Res x y = x - y
22
aplica Res x y = x - y
22
false
false
1
5
7
22
8
14
null
null
xicesky/sky-haskell-playground
src/Sky/Parsing/Invertible3/TH.hs
bsd-3-clause
-- Get all constructors of a type getConstrs :: Name -> Q [ConstrInfo] getConstrs name = do info <- reify name case info of TyConI (DataD _ name' tyVarBndr constrs _) -> return $ map conInfo constrs _ -> error $ "Cannot handle: " ++ show info -- Get the ConstrInfo from a constructor name
313
getConstrs :: Name -> Q [ConstrInfo] getConstrs name = do info <- reify name case info of TyConI (DataD _ name' tyVarBndr constrs _) -> return $ map conInfo constrs _ -> error $ "Cannot handle: " ++ show info -- Get the ConstrInfo from a constructor name
279
getConstrs name = do info <- reify name case info of TyConI (DataD _ name' tyVarBndr constrs _) -> return $ map conInfo constrs _ -> error $ "Cannot handle: " ++ show info -- Get the ConstrInfo from a constructor name
242
true
true
0
12
79
92
44
48
null
null
AbleNetInc/EqualsAssessment
src/EqCommon.hs
gpl-3.0
rawTotal :: Assessment -> Int rawTotal a = foldl1 (+) $ score <$> (lessons a)
77
rawTotal :: Assessment -> Int rawTotal a = foldl1 (+) $ score <$> (lessons a)
77
rawTotal a = foldl1 (+) $ score <$> (lessons a)
47
false
true
0
7
14
37
19
18
null
null
bacher09/yandex-translate
src/Network/Yandex/Translate/Internal.hs
mit
baseOptions :: (MonadIO m) => YandexApiT m Options baseOptions = do ykey <- view $ _config.apikey opt <- view $ _config.httpOptions return $ opt & param "key" .~ [ykey]
180
baseOptions :: (MonadIO m) => YandexApiT m Options baseOptions = do ykey <- view $ _config.apikey opt <- view $ _config.httpOptions return $ opt & param "key" .~ [ykey]
180
baseOptions = do ykey <- view $ _config.apikey opt <- view $ _config.httpOptions return $ opt & param "key" .~ [ykey]
129
false
true
0
9
40
78
36
42
null
null
fmapfmapfmap/amazonka
amazonka-route53-domains/gen/Network/AWS/Route53Domains/GetDomainDetail.hs
mpl-2.0
-- | The fully qualified name of the WHOIS server that can answer the WHOIS -- query for the domain. -- -- Type: String gddrsWhoIsServer :: Lens' GetDomainDetailResponse (Maybe Text) gddrsWhoIsServer = lens _gddrsWhoIsServer (\ s a -> s{_gddrsWhoIsServer = a})
260
gddrsWhoIsServer :: Lens' GetDomainDetailResponse (Maybe Text) gddrsWhoIsServer = lens _gddrsWhoIsServer (\ s a -> s{_gddrsWhoIsServer = a})
140
gddrsWhoIsServer = lens _gddrsWhoIsServer (\ s a -> s{_gddrsWhoIsServer = a})
77
true
true
0
9
40
49
28
21
null
null
rfranek/duckling
Duckling/Numeral/NL/Rules.hs
bsd-3-clause
ruleDozen :: Rule ruleDozen = Rule { name = "dozen" , pattern = [ regex "dozijn" ] , prod = \_ -> integer 12 >>= withGrain 1 }
142
ruleDozen :: Rule ruleDozen = Rule { name = "dozen" , pattern = [ regex "dozijn" ] , prod = \_ -> integer 12 >>= withGrain 1 }
142
ruleDozen = Rule { name = "dozen" , pattern = [ regex "dozijn" ] , prod = \_ -> integer 12 >>= withGrain 1 }
124
false
true
0
10
43
56
30
26
null
null
IreneKnapp/cabal-app
Distribution/Compat/Filesystem/Windows.hs
mit
removeFileSilently :: FilePath -> IO () removeFileSilently path = do error "Unimplemented."
93
removeFileSilently :: FilePath -> IO () removeFileSilently path = do error "Unimplemented."
93
removeFileSilently path = do error "Unimplemented."
53
false
true
0
7
13
29
13
16
null
null
mrakgr/futhark
src/Futhark/CodeGen/ImpGen.hs
bsd-3-clause
lookupArray :: VName -> ImpM op ArrayEntry lookupArray name = do res <- lookupVar name case res of ArrayVar entry -> return entry _ -> throwError $ "ImpGen.lookupArray: not an array: " ++ textual name
225
lookupArray :: VName -> ImpM op ArrayEntry lookupArray name = do res <- lookupVar name case res of ArrayVar entry -> return entry _ -> throwError $ "ImpGen.lookupArray: not an array: " ++ textual name
225
lookupArray name = do res <- lookupVar name case res of ArrayVar entry -> return entry _ -> throwError $ "ImpGen.lookupArray: not an array: " ++ textual name
182
false
true
0
11
59
69
31
38
null
null
DougBurke/swish
tests/RDFQueryTest.hs
lgpl-2.1
res21 :: [RDFGraph] res21 = rdfQuerySubs var21 result21
55
res21 :: [RDFGraph] res21 = rdfQuerySubs var21 result21
55
res21 = rdfQuerySubs var21 result21
35
false
true
0
7
7
25
11
14
null
null
spechub/Hets
Haskell/HatAna.hs
gpl-2.0
preludeConstrs :: Set.Set String preludeConstrs = Set.filter ( \ s -> not (null s) && isUpper (head s)) preludeValues
121
preludeConstrs :: Set.Set String preludeConstrs = Set.filter ( \ s -> not (null s) && isUpper (head s)) preludeValues
121
preludeConstrs = Set.filter ( \ s -> not (null s) && isUpper (head s)) preludeValues
88
false
true
1
11
22
57
26
31
null
null
andrewthad/vinyl-vectors
src/Data/Vector/Vinyl/Default/NonEmpty/Monomorphic.hs
bsd-3-clause
-- Monadic folds -- ------------- -- | /O(n)/ Monadic fold foldM :: (Monad m, G.Vector Vector (Rec Identity rs)) => (r -> Rec Identity rs -> m r) -> r -> Vector (Rec Identity rs) -> m r foldM = G.foldM
204
foldM :: (Monad m, G.Vector Vector (Rec Identity rs)) => (r -> Rec Identity rs -> m r) -> r -> Vector (Rec Identity rs) -> m r foldM = G.foldM
144
foldM = G.foldM
15
true
true
0
12
43
94
46
48
null
null
fujiisat/CubicSpline3D
src/Math/CubicSpline3D.hs
bsd-3-clause
tdma mat = V.fromList $ foldl substitution [snd pq0] pq where (m0, m03) : ms = mat pq0 : pq = foldl elimination [(m0 ! 1 / m0 ! 0, m03 ^/ m0 ! 0)] ms -- | Forward elimination loop of TDMA
204
tdma mat = V.fromList $ foldl substitution [snd pq0] pq where (m0, m03) : ms = mat pq0 : pq = foldl elimination [(m0 ! 1 / m0 ! 0, m03 ^/ m0 ! 0)] ms -- | Forward elimination loop of TDMA
204
tdma mat = V.fromList $ foldl substitution [snd pq0] pq where (m0, m03) : ms = mat pq0 : pq = foldl elimination [(m0 ! 1 / m0 ! 0, m03 ^/ m0 ! 0)] ms -- | Forward elimination loop of TDMA
204
false
false
0
10
59
94
48
46
null
null
edgarklerks/document-indexer
IndexProjectDir.hs
bsd-2-clause
main :: IO () main = do xs <- getArgs case xs of [dir, project] -> analyzeDir dir project _ -> error "Need a project dir and project name"
158
main :: IO () main = do xs <- getArgs case xs of [dir, project] -> analyzeDir dir project _ -> error "Need a project dir and project name"
158
main = do xs <- getArgs case xs of [dir, project] -> analyzeDir dir project _ -> error "Need a project dir and project name"
144
false
true
0
10
48
56
27
29
null
null
vikraman/ghc
libraries/template-haskell/Language/Haskell/TH/Lib.hs
bsd-3-clause
litE :: Lit -> ExpQ litE c = return (LitE c)
44
litE :: Lit -> ExpQ litE c = return (LitE c)
44
litE c = return (LitE c)
24
false
true
0
7
10
32
14
18
null
null
kazu-yamamoto/http2
Network/HTTP2/Frame/Types.hs
bsd-3-clause
isPaddingDefined PushPromiseFrame{} = True
43
isPaddingDefined PushPromiseFrame{} = True
43
isPaddingDefined PushPromiseFrame{} = True
43
false
false
0
6
4
13
6
7
null
null
GaloisInc/halvm-ghc
compiler/main/DynFlags.hs
bsd-3-clause
addImportPath, addLibraryPath, addIncludePath, addFrameworkPath :: FilePath -> DynP () -- -i on its own deletes the import paths addImportPath "" = upd (\s -> s{importPaths = []})
180
addImportPath, addLibraryPath, addIncludePath, addFrameworkPath :: FilePath -> DynP () addImportPath "" = upd (\s -> s{importPaths = []})
137
addImportPath "" = upd (\s -> s{importPaths = []})
50
true
true
0
10
27
51
30
21
null
null
nevrenato/HetsAlloy
CommonLogic/Parse_CLIF.hs
gpl-2.0
aFormula :: PrefixMap -> AnnoState.AParser st (Annotation.Annoted TEXT_META) aFormula pm = AnnoState.allAnnoParser (cltext pm)
126
aFormula :: PrefixMap -> AnnoState.AParser st (Annotation.Annoted TEXT_META) aFormula pm = AnnoState.allAnnoParser (cltext pm)
126
aFormula pm = AnnoState.allAnnoParser (cltext pm)
49
false
true
0
9
13
44
21
23
null
null
mumuki/mulang
src/Language/Mulang/Interpreter/Runner.hs
gpl-3.0
getTests :: Mu.Expression -> [MuTest] getTests expr = getAllTestsFromExpr [] expr
81
getTests :: Mu.Expression -> [MuTest] getTests expr = getAllTestsFromExpr [] expr
81
getTests expr = getAllTestsFromExpr [] expr
43
false
true
0
8
10
35
16
19
null
null
ganeti/ganeti
src/Ganeti/Utils.hs
bsd-2-clause
parseUnit :: (MonadFail m, Integral a, Read a) => String -> m a parseUnit = parseUnitEx False
93
parseUnit :: (MonadFail m, Integral a, Read a) => String -> m a parseUnit = parseUnitEx False
93
parseUnit = parseUnitEx False
29
false
true
0
8
16
47
22
25
null
null
mcschroeder/ghc
compiler/hsSyn/HsPat.hs
bsd-3-clause
looksLazyPatBind :: HsBind id -> Bool -- Returns True of anything *except* -- a StrictHsBind (as above) or -- a VarPat -- In particular, returns True of a pattern binding with a compound pattern, like (I# x) looksLazyPatBind (PatBind { pat_lhs = p }) = looksLazyLPat p
276
looksLazyPatBind :: HsBind id -> Bool looksLazyPatBind (PatBind { pat_lhs = p }) = looksLazyLPat p
98
looksLazyPatBind (PatBind { pat_lhs = p }) = looksLazyLPat p
60
true
true
0
9
54
40
22
18
null
null
fffej/haskellprojects
6502/Em6502.hs
bsd-2-clause
execute cpu (JSR addressMode) = undefined
41
execute cpu (JSR addressMode) = undefined
41
execute cpu (JSR addressMode) = undefined
41
false
false
0
7
5
17
8
9
null
null
mostalive/yesod-splittest
fay/Tags.hs
mit
render (Tag at t cs) = concat [ "<", t, " ", concat $ map renderAt at,">", concat $ map render cs, "</", t, ">" ]
114
render (Tag at t cs) = concat [ "<", t, " ", concat $ map renderAt at,">", concat $ map render cs, "</", t, ">" ]
114
render (Tag at t cs) = concat [ "<", t, " ", concat $ map renderAt at,">", concat $ map render cs, "</", t, ">" ]
114
false
false
0
8
26
67
36
31
null
null
headprogrammingczar/cabal
cabal-install/Distribution/Client/Upload.hs
bsd-3-clause
report :: Verbosity -> RepoContext -> Maybe Username -> Maybe Password -> IO () report verbosity repoCtxt mUsername mPassword = do Username username <- maybe promptUsername return mUsername Password password <- maybe promptPassword return mPassword let auth = (username, password) repos = repoCo...
1,472
report :: Verbosity -> RepoContext -> Maybe Username -> Maybe Password -> IO () report verbosity repoCtxt mUsername mPassword = do Username username <- maybe promptUsername return mUsername Password password <- maybe promptPassword return mPassword let auth = (username, password) repos = repoCo...
1,472
report verbosity repoCtxt mUsername mPassword = do Username username <- maybe promptUsername return mUsername Password password <- maybe promptPassword return mPassword let auth = (username, password) repos = repoContextRepos repoCtxt remoteRepos = catMaybes (map maybeRepoRemote repos) ...
1,392
false
true
0
27
469
386
181
205
null
null
zachsully/hakaru
haskell/Tests/Array.hs
bsd-3-clause
-- Test conjugacy of dirichlet and categorical testConj :: Assertion testConj = testSS [ lam $ \as -> lam $ \coin -> normalize (app (app d as) coin) ] (lam $ \as -> lam $ \coin -> posterior as coin) where d = maybe (error "testConj") id . determine $ disintegrate joint
315
testConj :: Assertion testConj = testSS [ lam $ \as -> lam $ \coin -> normalize (app (app d as) coin) ] (lam $ \as -> lam $ \coin -> posterior as coin) where d = maybe (error "testConj") id . determine $ disintegrate joint
268
testConj = testSS [ lam $ \as -> lam $ \coin -> normalize (app (app d as) coin) ] (lam $ \as -> lam $ \coin -> posterior as coin) where d = maybe (error "testConj") id . determine $ disintegrate joint
246
true
true
1
14
97
124
59
65
null
null
edsko/cabal
cabal-install/Distribution/Client/Targets.hs
bsd-3-clause
readUserTarget :: String -> IO (Either UserTargetProblem UserTarget) readUserTarget targetstr = case testNamedTargets targetstr of Just (Dependency (PackageName "world") verrange) | verrange == anyVersion -> return (Right UserTargetWorld) | otherwise -> return (Left UserTargetBad...
2,717
readUserTarget :: String -> IO (Either UserTargetProblem UserTarget) readUserTarget targetstr = case testNamedTargets targetstr of Just (Dependency (PackageName "world") verrange) | verrange == anyVersion -> return (Right UserTargetWorld) | otherwise -> return (Left UserTargetBad...
2,717
readUserTarget targetstr = case testNamedTargets targetstr of Just (Dependency (PackageName "world") verrange) | verrange == anyVersion -> return (Right UserTargetWorld) | otherwise -> return (Left UserTargetBadWorldPkg) Just dep -> return (Right (UserTarg...
2,648
false
true
0
20
921
708
326
382
null
null
bhickey/catamad
src/Simulate.hs
gpl-3.0
simulation_loop :: GameSchedule -> GameState -> IO () simulation_loop schedule@(Schedule t _) game = do case getEvent $ schedule of Nothing -> return () Just ((Event _ act), s) -> do result <- runEvent t act game case result of Left (game', maybeEvent) -> simulation_loop (updateSchedule m...
411
simulation_loop :: GameSchedule -> GameState -> IO () simulation_loop schedule@(Schedule t _) game = do case getEvent $ schedule of Nothing -> return () Just ((Event _ act), s) -> do result <- runEvent t act game case result of Left (game', maybeEvent) -> simulation_loop (updateSchedule m...
411
simulation_loop schedule@(Schedule t _) game = do case getEvent $ schedule of Nothing -> return () Just ((Event _ act), s) -> do result <- runEvent t act game case result of Left (game', maybeEvent) -> simulation_loop (updateSchedule maybeEvent s) game' Right _ -> return () -- Don...
357
false
true
0
17
100
149
72
77
null
null
jcristovao/data-easy
src/Data/Easy.hs
bsd-3-clause
maybeToMonoid (Just x) = x
26
maybeToMonoid (Just x) = x
26
maybeToMonoid (Just x) = x
26
false
false
0
7
4
15
7
8
null
null
tomtitchener/Canon
tests/Canon/UtilsTest.hs
cc0-1.0
mIxD = IndexedPitch 1 0
23
mIxD = IndexedPitch 1 0
23
mIxD = IndexedPitch 1 0
23
false
false
0
5
4
11
5
6
null
null
fgaz/yabi
yabi.hs
mit
bfParse (char:str) prog = bfParse str $ prog ++ instruction where instruction = case char2instruction char of Just a -> [a] Nothing -> [] --comments
197
bfParse (char:str) prog = bfParse str $ prog ++ instruction where instruction = case char2instruction char of Just a -> [a] Nothing -> [] --comments
197
bfParse (char:str) prog = bfParse str $ prog ++ instruction where instruction = case char2instruction char of Just a -> [a] Nothing -> [] --comments
197
false
false
0
8
73
65
32
33
null
null
oldmanmike/ghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
pprData (CmmStaticLit lit) = pprDataItem lit
44
pprData (CmmStaticLit lit) = pprDataItem lit
44
pprData (CmmStaticLit lit) = pprDataItem lit
44
false
false
0
7
5
18
8
10
null
null
asmyczek/hreviewboard
Tests/TestsWithServer.hs
bsd-3-clause
assertTrue s False = throwError $ "Assertion: " ++ s
52
assertTrue s False = throwError $ "Assertion: " ++ s
52
assertTrue s False = throwError $ "Assertion: " ++ s
52
false
false
1
6
9
24
9
15
null
null
brendanhay/gogol
gogol-container/gen/Network/Google/Resource/Container/Projects/Locations/Clusters/Create.hs
mpl-2.0
-- | OAuth access token. plccAccessToken :: Lens' ProjectsLocationsClustersCreate (Maybe Text) plccAccessToken = lens _plccAccessToken (\ s a -> s{_plccAccessToken = a})
177
plccAccessToken :: Lens' ProjectsLocationsClustersCreate (Maybe Text) plccAccessToken = lens _plccAccessToken (\ s a -> s{_plccAccessToken = a})
152
plccAccessToken = lens _plccAccessToken (\ s a -> s{_plccAccessToken = a})
82
true
true
0
8
29
49
25
24
null
null
tolysz/prepare-ghcjs
spec-lts8/aeson/Data/Aeson/TH.hs
bsd-3-clause
tvbToType :: TyVarBndr -> Type tvbToType (PlainTV n) = VarT n
64
tvbToType :: TyVarBndr -> Type tvbToType (PlainTV n) = VarT n
64
tvbToType (PlainTV n) = VarT n
33
false
true
0
7
13
27
13
14
null
null