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
oherrala/haskell-stun
src/Network/STUN/Internal.hs
mit
isNonce :: STUNAttribute -> Bool isNonce (Nonce _) = True
57
isNonce :: STUNAttribute -> Bool isNonce (Nonce _) = True
57
isNonce (Nonce _) = True
24
false
true
0
7
9
24
12
12
null
null
cbrghostrider/Hacking
HackerRank/FunctionalProgramming/Recursion/cellular_automata_memoize.hs
mit
main :: IO () main = do rulestr <- getLine treestr <- getLine teststr <- getLine let rule = createRule (read rulestr) let tree = createInitTree (concat . words $ treestr) let tests = read teststr let alltrees = (automataTrees tree rule) runTestCases alltrees rule tests 0
289
main :: IO () main = do rulestr <- getLine treestr <- getLine teststr <- getLine let rule = createRule (read rulestr) let tree = createInitTree (concat . words $ treestr) let tests = read teststr let alltrees = (automataTrees tree rule) runTestCases alltrees rule tests 0
289
main = do rulestr <- getLine treestr <- getLine teststr <- getLine let rule = createRule (read rulestr) let tree = createInitTree (concat . words $ treestr) let tests = read teststr let alltrees = (automataTrees tree rule) runTestCases alltrees rule tests 0
275
false
true
0
13
64
119
54
65
null
null
harrisi/on-being-better
list-expansion/Haskell/cis194/02/02-lists.hs
cc0-1.0
doStuff1 [_] = 0
16
doStuff1 [_] = 0
16
doStuff1 [_] = 0
16
false
false
0
6
3
12
6
6
null
null
grnet/snf-ganeti
src/Ganeti/Constants.hs
bsd-2-clause
qlangOpEqualLegacy :: String qlangOpEqualLegacy = "="
53
qlangOpEqualLegacy :: String qlangOpEqualLegacy = "="
53
qlangOpEqualLegacy = "="
24
false
true
0
6
5
18
7
11
null
null
dimara/ganeti
src/Ganeti/Types.hs
bsd-2-clause
-- | Smart constructor for 'NonNegative'. mkNonNegative :: (Monad m, Num a, Ord a, Show a) => a -> m (NonNegative a) mkNonNegative i | i >= 0 = return (NonNegative i) | otherwise = fail $ "Invalid value for non-negative type '" ++ show i ++ "'"
290
mkNonNegative :: (Monad m, Num a, Ord a, Show a) => a -> m (NonNegative a) mkNonNegative i | i >= 0 = return (NonNegative i) | otherwise = fail $ "Invalid value for non-negative type '" ++ show i ++ "'"
248
mkNonNegative i | i >= 0 = return (NonNegative i) | otherwise = fail $ "Invalid value for non-negative type '" ++ show i ++ "'"
173
true
true
0
10
93
105
49
56
null
null
kawamuray/ganeti
test/hs/Test/Ganeti/Network.hs
gpl-2.0
-- | Check that all internally reserved ips are included in 'allReservations'. allReservationsSubsumesInternal :: AddressPool -> Bool allReservationsSubsumesInternal a = bitVectorSubsumes (allReservations a) (reservations a)
226
allReservationsSubsumesInternal :: AddressPool -> Bool allReservationsSubsumesInternal a = bitVectorSubsumes (allReservations a) (reservations a)
147
allReservationsSubsumesInternal a = bitVectorSubsumes (allReservations a) (reservations a)
92
true
true
0
7
26
36
18
18
null
null
romanb/amazonka
amazonka-s3/gen/Network/AWS/S3/DeleteObjects.hs
mpl-2.0
dor1Errors :: Lens' DeleteObjectsResponse [S3ServiceError] dor1Errors = lens _dor1Errors (\s a -> s { _dor1Errors = a }) . _List
128
dor1Errors :: Lens' DeleteObjectsResponse [S3ServiceError] dor1Errors = lens _dor1Errors (\s a -> s { _dor1Errors = a }) . _List
128
dor1Errors = lens _dor1Errors (\s a -> s { _dor1Errors = a }) . _List
69
false
true
1
10
19
52
25
27
null
null
sol/doctest
src/Options.hs
mit
parseOptions :: [String] -> Result Run parseOptions args | "--info" `elem` args = Output info | "--interactive" `elem` args = Result Run { runWarnings = [] , runOptions = filter (/= "--interactive") args , runMagicMode = False , runFastMode = False , runPreserveIt = False , run...
793
parseOptions :: [String] -> Result Run parseOptions args | "--info" `elem` args = Output info | "--interactive" `elem` args = Result Run { runWarnings = [] , runOptions = filter (/= "--interactive") args , runMagicMode = False , runFastMode = False , runPreserveIt = False , run...
793
parseOptions args | "--info" `elem` args = Output info | "--interactive" `elem` args = Result Run { runWarnings = [] , runOptions = filter (/= "--interactive") args , runMagicMode = False , runFastMode = False , runPreserveIt = False , runVerbose = False } | any (`elem`...
754
false
true
5
11
233
269
138
131
null
null
Kyly/liquidhaskell
benchmarks/icfp15/pos/DataBase.hs
bsd-3-clause
{-@ assume (Prelude.++) :: xs:[a] -> ys:[a] -> {v:[a] | listElts v = Set_cup (listElts xs) (listElts ys)} @-} {-@ assume Prelude.elem :: x:a -> xs:[a] -> {v:Bool | Prop v <=> Set_mem x (listElts xs)} @-} {-@ filter :: (a -> Bool) -> xs:[a] -> {v:[a] | Set_sub (listElts v) (listElts xs)} @-} filter :: (a -> Bool) -> [a...
347
filter :: (a -> Bool) -> [a] -> [a] filter _ [] = []
54
filter _ [] = []
18
true
true
0
9
70
50
26
24
null
null
michalkonecny/aern
aern-mpfr-rounded/src/Numeric/AERN/MPFRBasis/Interval.hs
bsd-3-clause
-- | Outward rounded absolute value absOut :: MI -> MI absOut = RAROR.absOut
76
absOut :: MI -> MI absOut = RAROR.absOut
40
absOut = RAROR.absOut
21
true
true
0
5
13
18
10
8
null
null
ndmitchell/shake
src/Development/Shake/Internal/Errors.hs
bsd-3-clause
errorNoApply :: TypeRep -> Maybe String -> String -> SomeException errorNoApply tk k msg = errorStructured "Build system error - cannot currently introduce a dependency (e.g. calling 'apply')" [("Reason", Just msg) ,("Key type", Just $ show tk) ,("Key value", k)] "Move the call earlier/later"
313
errorNoApply :: TypeRep -> Maybe String -> String -> SomeException errorNoApply tk k msg = errorStructured "Build system error - cannot currently introduce a dependency (e.g. calling 'apply')" [("Reason", Just msg) ,("Key type", Just $ show tk) ,("Key value", k)] "Move the call earlier/later"
313
errorNoApply tk k msg = errorStructured "Build system error - cannot currently introduce a dependency (e.g. calling 'apply')" [("Reason", Just msg) ,("Key type", Just $ show tk) ,("Key value", k)] "Move the call earlier/later"
246
false
true
0
8
63
79
41
38
null
null
forked-upstream-packages-for-ghcjs/ghcjs
ghcjs/src/Gen2/Optimizer.hs
mit
intInfixOp ModOp i1 i2 = ValE (IntV (i1 `mod` i2))
58
intInfixOp ModOp i1 i2 = ValE (IntV (i1 `mod` i2))
58
intInfixOp ModOp i1 i2 = ValE (IntV (i1 `mod` i2))
58
false
false
0
9
17
31
16
15
null
null
khumba/khph
src/Khph/Util.hs
agpl-3.0
stripTrailingPathSeparators str = if isPathSeparator $ last str then reverse $ dropWhile isPathSeparator $ reverse str else str
133
stripTrailingPathSeparators str = if isPathSeparator $ last str then reverse $ dropWhile isPathSeparator $ reverse str else str
133
stripTrailingPathSeparators str = if isPathSeparator $ last str then reverse $ dropWhile isPathSeparator $ reverse str else str
133
false
false
0
8
23
38
18
20
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/simplCore/SetLevels.hs
bsd-3-clause
extendCaseBndrEnv env _ _ = env
31
extendCaseBndrEnv env _ _ = env
31
extendCaseBndrEnv env _ _ = env
31
false
false
0
5
5
13
6
7
null
null
sseefried/funky-foto
Handler/Root.hs
bsd-2-clause
-- | 'About' page. -- getAboutR :: Handler RepHtml getAboutR = defaultLayout $ addWidget $(widgetFile "about")
110
getAboutR :: Handler RepHtml getAboutR = defaultLayout $ addWidget $(widgetFile "about")
88
getAboutR = defaultLayout $ addWidget $(widgetFile "about")
59
true
true
1
9
15
33
15
18
null
null
ulricha/dsh-sql
src/Database/DSH/Backend/Sql/Opt/Rewrite/Basic.hs
bsd-3-clause
pullProjectThetaJoinLeft :: TARule AllProps pullProjectThetaJoinLeft q = $(dagPatMatch 'q "(Project p (q1)) [ThetaJoin | LeftOuterJoin]@op jp (q2)" [| do colsLeft <- fmap fst . pCols . bu <$> properties $(v "q1") colsRight <- fmap fst . pCols . bu <$> properties $(v "q2") predic...
788
pullProjectThetaJoinLeft :: TARule AllProps pullProjectThetaJoinLeft q = $(dagPatMatch 'q "(Project p (q1)) [ThetaJoin | LeftOuterJoin]@op jp (q2)" [| do colsLeft <- fmap fst . pCols . bu <$> properties $(v "q1") colsRight <- fmap fst . pCols . bu <$> properties $(v "q2") predic...
788
pullProjectThetaJoinLeft q = $(dagPatMatch 'q "(Project p (q1)) [ThetaJoin | LeftOuterJoin]@op jp (q2)" [| do colsLeft <- fmap fst . pCols . bu <$> properties $(v "q1") colsRight <- fmap fst . pCols . bu <$> properties $(v "q2") predicate $ S.null $ S.intersection colsLeft colsR...
744
false
true
0
7
273
32
17
15
null
null
jugalps/edX
FP101x/week3/test.hs
mit
-- True && True = True -- _ && _ = False --a && b = if a -- then -- if b -- then True -- else False -- else -- False a && b = if b then a else False
214
a && b = if b then a else False
31
a && b = if b then a else False
31
true
false
2
6
108
29
19
10
null
null
sjakobi/brick
src/Brick/Util.hs
bsd-3-clause
-- | Build an attribute from a foreground color and a background color. -- Intended to be used infix. on :: Color -- ^ The foreground color -> Color -- ^ The background color -> Attr on f b = defAttr `withForeColor` f `withBackColor` b
264
on :: Color -- ^ The foreground color -> Color -- ^ The background color -> Attr on f b = defAttr `withForeColor` f `withBackColor` b
162
on f b = defAttr `withForeColor` f `withBackColor` b
69
true
true
0
8
73
46
25
21
null
null
silkapp/tagsoup
dead/parser/Compiler/Parser.hs
bsd-3-clause
getBracket ('(':xs) = Just ')'
30
getBracket ('(':xs) = Just ')'
30
getBracket ('(':xs) = Just ')'
30
false
false
0
6
4
20
9
11
null
null
diminishedprime/.org
programmey_stuff/write_yourself_a_scheme/ch_05/hello.hs
mit
numericBinop :: (Integer -> Integer -> Integer) -> [LispVal] -> ThrowsError LispVal numericBinop op [] = throwError $ NumArgs 2 []
141
numericBinop :: (Integer -> Integer -> Integer) -> [LispVal] -> ThrowsError LispVal numericBinop op [] = throwError $ NumArgs 2 []
141
numericBinop op [] = throwError $ NumArgs 2 []
57
false
true
0
8
31
54
27
27
null
null
23Skidoo/erp
ERP.hs
gpl-3.0
interpret' _ (AStr s) = Right (VStr s)
40
interpret' _ (AStr s) = Right (VStr s)
40
interpret' _ (AStr s) = Right (VStr s)
40
false
false
0
7
9
26
12
14
null
null
lloydmeta/ip-parsing-hs
src/Data/IpAddress/Internal.hs
mit
twoRaised16Exp :: [Integer] twoRaised16Exp = fmap ((2 ^ 16) ^) [0,1 ..]
71
twoRaised16Exp :: [Integer] twoRaised16Exp = fmap ((2 ^ 16) ^) [0,1 ..]
71
twoRaised16Exp = fmap ((2 ^ 16) ^) [0,1 ..]
43
false
true
0
7
11
45
23
22
null
null
ian-ross/c2hs-macos-test
c2hs-0.26.1/src/C2HS/Gen/Bind.hs
mit
showExtType (PrimET CBoolPT) = impm "CInt{-bool-}"
57
showExtType (PrimET CBoolPT) = impm "CInt{-bool-}"
57
showExtType (PrimET CBoolPT) = impm "CInt{-bool-}"
57
false
false
0
7
12
18
8
10
null
null
isheff/hetcons
src/Hetcons/Quorums.hs
mit
-- | The union of two edges: all the pairs found in either (reduced, for efficiency). e_union :: Observer_Graph_Edge -> Observer_Graph_Edge -> Observer_Graph_Edge e_union x y = reduce $ union x y
195
e_union :: Observer_Graph_Edge -> Observer_Graph_Edge -> Observer_Graph_Edge e_union x y = reduce $ union x y
109
e_union x y = reduce $ union x y
32
true
true
2
8
31
42
18
24
null
null
awgn/ass
src/Ass/Compiler.hs
gpl-2.0
getCompilerVersion Clang35 = "3.5"
34
getCompilerVersion Clang35 = "3.5"
34
getCompilerVersion Clang35 = "3.5"
34
false
false
0
4
3
10
4
6
null
null
ben-schulz/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reflectCtorArg :: RCtorArg -> Raw reflectCtorArg (RCtorParameter arg) = RApp (Var $ tacN "CtorParameter") (reflectArg arg)
122
reflectCtorArg :: RCtorArg -> Raw reflectCtorArg (RCtorParameter arg) = RApp (Var $ tacN "CtorParameter") (reflectArg arg)
122
reflectCtorArg (RCtorParameter arg) = RApp (Var $ tacN "CtorParameter") (reflectArg arg)
88
false
true
0
8
15
45
22
23
null
null
solidsnack/bytestring-nums
Data/ByteString/Nums/Careless/Int.hs
bsd-3-clause
lazy_signed :: (Num n) => Lazy.ByteString -> n lazy_signed bytes | Lazy.null bytes = 0 | Lazy.head bytes == '-' = fold negative 0 (Lazy.tail bytes) | Lazy.head bytes == '+' = fold positive 0 (Lazy.tail bytes) | otherwise = fold positive 0 bytes where fold ...
366
lazy_signed :: (Num n) => Lazy.ByteString -> n lazy_signed bytes | Lazy.null bytes = 0 | Lazy.head bytes == '-' = fold negative 0 (Lazy.tail bytes) | Lazy.head bytes == '+' = fold positive 0 (Lazy.tail bytes) | otherwise = fold positive 0 bytes where fold ...
366
lazy_signed bytes | Lazy.null bytes = 0 | Lazy.head bytes == '-' = fold negative 0 (Lazy.tail bytes) | Lazy.head bytes == '+' = fold positive 0 (Lazy.tail bytes) | otherwise = fold positive 0 bytes where fold = Lazy.foldlChunks . foldl'
302
false
true
1
10
132
139
65
74
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F30.hs
bsd-3-clause
ptr_glVertexAttrib3fNV :: FunPtr (GLuint -> GLfloat -> GLfloat -> GLfloat -> IO ()) ptr_glVertexAttrib3fNV = unsafePerformIO $ getCommand "glVertexAttrib3fNV"
158
ptr_glVertexAttrib3fNV :: FunPtr (GLuint -> GLfloat -> GLfloat -> GLfloat -> IO ()) ptr_glVertexAttrib3fNV = unsafePerformIO $ getCommand "glVertexAttrib3fNV"
158
ptr_glVertexAttrib3fNV = unsafePerformIO $ getCommand "glVertexAttrib3fNV"
74
false
true
0
12
18
45
22
23
null
null
juodaspaulius/clafer
src/Language/Clafer/Intermediate/Desugarer.hs
mit
reduceIExp x = x
16
reduceIExp x = x
16
reduceIExp x = x
16
false
false
1
5
3
13
4
9
null
null
romhack/GoldenSunCompression
gsLzssByteFlags/src/Codec.hs
mit
encode :: Bs.ByteString -> Bs.ByteString encode decodedBlock = Bs.pack . writeLzEntries . encodeLz . Bs.unpack $ decodedBlock
127
encode :: Bs.ByteString -> Bs.ByteString encode decodedBlock = Bs.pack . writeLzEntries . encodeLz . Bs.unpack $ decodedBlock
125
encode decodedBlock = Bs.pack . writeLzEntries . encodeLz . Bs.unpack $ decodedBlock
84
false
true
0
9
18
42
21
21
null
null
AlbinTheander/oden
src/Oden/Lexer.hs
mit
maybeList :: Parser [a] -> Parser [a] maybeList p = try p <|> return []
71
maybeList :: Parser [a] -> Parser [a] maybeList p = try p <|> return []
71
maybeList p = try p <|> return []
33
false
true
0
7
14
42
20
22
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Text/Greek/Sublist.hs
mit
buildSublistR :: TopLevel b e t -> StateR b e t -> StateR b e t buildSublistR _ e@(StateRError _) = e
121
buildSublistR :: TopLevel b e t -> StateR b e t -> StateR b e t buildSublistR _ e@(StateRError _) = e
121
buildSublistR _ e@(StateRError _) = e
51
false
true
3
7
41
57
27
30
null
null
abakst/symmetry
checker/tests/todo/SrcConcDB.hs
mit
database :: CDBSem repr => repr ([(Int,Int)] -> Process repr ()) database = lam $ \l -> do app (fixM f_database) l ret tt
153
database :: CDBSem repr => repr ([(Int,Int)] -> Process repr ()) database = lam $ \l -> do app (fixM f_database) l ret tt
153
database = lam $ \l -> do app (fixM f_database) l ret tt
88
false
true
2
11
55
80
37
43
null
null
batterseapower/supercompilation-by-evaluation
Utilities.hs
bsd-3-clause
traceRender :: Pretty a => a -> b -> b traceRender x | qUIET = id | otherwise = trace (pPrintRender x)
120
traceRender :: Pretty a => a -> b -> b traceRender x | qUIET = id | otherwise = trace (pPrintRender x)
120
traceRender x | qUIET = id | otherwise = trace (pPrintRender x)
81
false
true
0
8
39
53
24
29
null
null
pierzchalski/cs3161a1
MinHS/Evaluator.hs
mit
bindLam env (arg : args) body = lam $ \v -> let env' = E.add env (arg, v) in bindLam env' args body
110
bindLam env (arg : args) body = lam $ \v -> let env' = E.add env (arg, v) in bindLam env' args body
110
bindLam env (arg : args) body = lam $ \v -> let env' = E.add env (arg, v) in bindLam env' args body
110
false
false
3
11
33
69
30
39
null
null
olorin/amazonka
amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/Types/Product.hs
mpl-2.0
-- | Creates a value of 'EventDescription' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'edRequestId' -- -- * 'edTemplateName' -- -- * 'edSeverity' -- -- * 'edVersionLabel' -- -- * 'edEnvironmentName' -- -- * 'edApplicationName' -- ...
693
eventDescription :: EventDescription eventDescription = EventDescription' { _edRequestId = Nothing , _edTemplateName = Nothing , _edSeverity = Nothing , _edVersionLabel = Nothing , _edEnvironmentName = Nothing , _edApplicationName = Nothing , _edEventDate = Nothing , _edMessage =...
334
eventDescription = EventDescription' { _edRequestId = Nothing , _edTemplateName = Nothing , _edSeverity = Nothing , _edVersionLabel = Nothing , _edEnvironmentName = Nothing , _edApplicationName = Nothing , _edEventDate = Nothing , _edMessage = Nothing }
293
true
true
1
7
144
87
59
28
null
null
danstiner/transpiler
src/CSharp/Printer.hs
mit
expression (StringExpr str) = "\"" ++ assertSingleLine (escapeString str) ++ "\""
81
expression (StringExpr str) = "\"" ++ assertSingleLine (escapeString str) ++ "\""
81
expression (StringExpr str) = "\"" ++ assertSingleLine (escapeString str) ++ "\""
81
false
false
0
9
10
33
15
18
null
null
eijian/raytracer
src/Parser.hs
bsd-3-clause
rEmittance :: String rEmittance = "emittance"
45
rEmittance :: String rEmittance = "emittance"
45
rEmittance = "emittance"
24
false
true
0
6
5
18
7
11
null
null
input-output-hk/pos-haskell-prototype
wallet/test/integration/Test/Integration/Scenario/Addresses.hs
mit
spec :: Scenarios Context spec = do scenario "address is available after it's been created" $ do fixture <- setup defaultSetup response <- request $ Client.postAddress $- NewAddress noSpendingPassword defaultAccountId (fixture ^. wallet . walletId) verif...
3,343
spec :: Scenarios Context spec = do scenario "address is available after it's been created" $ do fixture <- setup defaultSetup response <- request $ Client.postAddress $- NewAddress noSpendingPassword defaultAccountId (fixture ^. wallet . walletId) verif...
3,343
spec = do scenario "address is available after it's been created" $ do fixture <- setup defaultSetup response <- request $ Client.postAddress $- NewAddress noSpendingPassword defaultAccountId (fixture ^. wallet . walletId) verify response [ e...
3,317
false
true
0
19
1,157
710
344
366
null
null
ndmitchell/qed
src/Proof/Exp/Core.hs
bsd-3-clause
toExp (Case x y) = H.Case (toExp x) (map toAlt y)
49
toExp (Case x y) = H.Case (toExp x) (map toAlt y)
49
toExp (Case x y) = H.Case (toExp x) (map toAlt y)
49
false
false
0
7
10
38
18
20
null
null
bitemyapp/dejafu
Test/DejaFu/Deterministic/IO.hs
mit
-- | Lift an 'IO' action into the 'ConcIO' monad. liftIO :: IO a -> ConcIO t a liftIO ma = C $ cont lifted where lifted c = ALift $ c <$> ma -- | Run the provided computation concurrently, returning the result.
213
liftIO :: IO a -> ConcIO t a liftIO ma = C $ cont lifted where lifted c = ALift $ c <$> ma -- | Run the provided computation concurrently, returning the result.
163
liftIO ma = C $ cont lifted where lifted c = ALift $ c <$> ma -- | Run the provided computation concurrently, returning the result.
134
true
true
0
6
46
52
26
26
null
null
termite2/synthesis
Synthesis/CG.hs
bsd-3-clause
foldMF init list func = foldM func init list
44
foldMF init list func = foldM func init list
44
foldMF init list func = foldM func init list
44
false
false
1
5
8
25
9
16
null
null
SKA-ScienceDataProcessor/RC
MS6/dna/flow/Flow/Vector.hs
apache-2.0
-- | Convert the given vector into a C vector. The passed vector is -- consumed. toCVector :: Storable a => Vector a -> IO (Vector a) toCVector v@CVector{} = return v
171
toCVector :: Storable a => Vector a -> IO (Vector a) toCVector v@CVector{} = return v
90
toCVector v@CVector{} = return v
37
true
true
0
9
36
49
24
25
null
null
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_CHARSET_DEFAULT :: Int wxSTC_CHARSET_DEFAULT = 1
54
wxSTC_CHARSET_DEFAULT :: Int wxSTC_CHARSET_DEFAULT = 1
54
wxSTC_CHARSET_DEFAULT = 1
25
false
true
0
6
5
18
7
11
null
null
rueshyna/gogol
gogol-games/gen/Network/Google/Resource/Games/Scores/List.hs
mpl-2.0
-- | The collection of scores you\'re requesting. sllCollection :: Lens' ScoresList ScoresListCollection sllCollection = lens _sllCollection (\ s a -> s{_sllCollection = a})
181
sllCollection :: Lens' ScoresList ScoresListCollection sllCollection = lens _sllCollection (\ s a -> s{_sllCollection = a})
131
sllCollection = lens _sllCollection (\ s a -> s{_sllCollection = a})
76
true
true
0
9
31
42
22
20
null
null
Heather/stack
src/Stack/Coverage.hs
bsd-3-clause
dirnameString :: Path r Dir -> String dirnameString = dropWhileEnd isPathSeparator . toFilePath . dirname
105
dirnameString :: Path r Dir -> String dirnameString = dropWhileEnd isPathSeparator . toFilePath . dirname
105
dirnameString = dropWhileEnd isPathSeparator . toFilePath . dirname
67
false
true
2
7
14
35
15
20
null
null
CloudI/CloudI
src/api/haskell/external/bytestring-0.10.10.0/Data/ByteString/Char8.hs
mit
-- | 'foldr1' is a variant of 'foldr' that has no starting value argument, -- and thus must be applied to non-empty 'ByteString's foldr1 :: (Char -> Char -> Char) -> ByteString -> Char foldr1 f ps = w2c (B.foldr1 (\x y -> c2w (f (w2c x) (w2c y))) ps)
250
foldr1 :: (Char -> Char -> Char) -> ByteString -> Char foldr1 f ps = w2c (B.foldr1 (\x y -> c2w (f (w2c x) (w2c y))) ps)
120
foldr1 f ps = w2c (B.foldr1 (\x y -> c2w (f (w2c x) (w2c y))) ps)
65
true
true
0
14
49
83
43
40
null
null
romanb/amazonka
amazonka-ml/gen/Network/AWS/MachineLearning/DescribeBatchPredictions.hs
mpl-2.0
-- | The less than or equal to operator. The 'BatchPrediction' results will have 'FilterVariable' values that are less than or equal to the value specified with 'LE'. dbpLE :: Lens' DescribeBatchPredictions (Maybe Text) dbpLE = lens _dbpLE (\s a -> s { _dbpLE = a })
266
dbpLE :: Lens' DescribeBatchPredictions (Maybe Text) dbpLE = lens _dbpLE (\s a -> s { _dbpLE = a })
99
dbpLE = lens _dbpLE (\s a -> s { _dbpLE = a })
46
true
true
1
9
46
50
25
25
null
null
uduki/hsQt
Qtc/ClassTypes/Gui.hs
bsd-2-clause
qCast_QTreeView :: Object a -> IO (QTreeView ()) qCast_QTreeView _qobj = return (objectCast _qobj)
100
qCast_QTreeView :: Object a -> IO (QTreeView ()) qCast_QTreeView _qobj = return (objectCast _qobj)
100
qCast_QTreeView _qobj = return (objectCast _qobj)
51
false
true
0
10
15
46
20
26
null
null
nikki-and-the-robots/nikki
src/Sorts/Robots/Jetpack.hs
lgpl-3.0
hover True angle = rotateVector angle (Vector 0 (- force)) where force = acceleration * jetpackMass
109
hover True angle = rotateVector angle (Vector 0 (- force)) where force = acceleration * jetpackMass
109
hover True angle = rotateVector angle (Vector 0 (- force)) where force = acceleration * jetpackMass
109
false
false
1
9
25
45
20
25
null
null
silkapp/bumper
src/Version.hs
bsd-3-clause
addVersionToRange :: Version -> VersionRange -> VersionRange addVersionToRange new r = if withinRange new r then r else let cVersion = const (thisVersion new) c2Version = const $ const (thisVersion new) in foldVersionRange' anyVersion -- any cVersion -- (==) cVe...
646
addVersionToRange :: Version -> VersionRange -> VersionRange addVersionToRange new r = if withinRange new r then r else let cVersion = const (thisVersion new) c2Version = const $ const (thisVersion new) in foldVersionRange' anyVersion -- any cVersion -- (==) cVe...
646
addVersionToRange new r = if withinRange new r then r else let cVersion = const (thisVersion new) c2Version = const $ const (thisVersion new) in foldVersionRange' anyVersion -- any cVersion -- (==) cVersion -- > cVersion -- < cVersi...
585
false
true
0
14
256
162
80
82
null
null
fmapfmapfmap/amazonka
amazonka-cloudformation/gen/Network/AWS/CloudFormation/DescribeStackEvents.hs
mpl-2.0
-- | String that identifies the start of the next list of events, if there is -- one. -- -- Default: There is no default value. dseNextToken :: Lens' DescribeStackEvents (Maybe Text) dseNextToken = lens _dseNextToken (\ s a -> s{_dseNextToken = a})
248
dseNextToken :: Lens' DescribeStackEvents (Maybe Text) dseNextToken = lens _dseNextToken (\ s a -> s{_dseNextToken = a})
120
dseNextToken = lens _dseNextToken (\ s a -> s{_dseNextToken = a})
65
true
true
1
9
42
52
28
24
null
null
haskell-streaming/streaming
benchmarks/old/Stream/Combinators.hs
bsd-3-clause
unfoldM :: (Functor f, Monad m) => (a -> m (Either r (f a))) -> a -> Stream f m r unfoldM f = let loop = Delay . liftM (either Return (Step . fmap loop)) . f in loop
184
unfoldM :: (Functor f, Monad m) => (a -> m (Either r (f a))) -> a -> Stream f m r unfoldM f = let loop = Delay . liftM (either Return (Step . fmap loop)) . f in loop
184
unfoldM f = let loop = Delay . liftM (either Return (Step . fmap loop)) . f in loop
96
false
true
0
16
58
113
54
59
null
null
nathantypanski/my-xmonad
my-xmonad.hs
bsd-3-clause
colorComment :: String colorComment = "#dddddd"
47
colorComment :: String colorComment = "#dddddd"
47
colorComment = "#dddddd"
24
false
true
0
4
5
11
6
5
null
null
sboosali/workflow-osx
workflow-osx/sources/Workflow/OSX/Marshall.hs
mit
{- | -} toCGKeyCode :: Key -> CGKeyCode toCGKeyCode = \case AKey -> VK_ANSI_A SKey -> VK_ANSI_S DKey -> VK_ANSI_D FKey -> VK_ANSI_F HKey -> VK_ANSI_H GKey -> VK_ANSI_G ZKey -> VK_ANSI_Z XKey -> VK_ANSI_X CKey ...
2,690
toCGKeyCode :: Key -> CGKeyCode toCGKeyCode = \case AKey -> VK_ANSI_A SKey -> VK_ANSI_S DKey -> VK_ANSI_D FKey -> VK_ANSI_F HKey -> VK_ANSI_H GKey -> VK_ANSI_G ZKey -> VK_ANSI_Z XKey -> VK_ANSI_X CKey -...
2,681
toCGKeyCode = \case AKey -> VK_ANSI_A SKey -> VK_ANSI_S DKey -> VK_ANSI_D FKey -> VK_ANSI_F HKey -> VK_ANSI_H GKey -> VK_ANSI_G ZKey -> VK_ANSI_Z XKey -> VK_ANSI_X CKey -> VK_ANSI_C VKey ->...
2,649
true
true
84
5
1,133
691
264
427
null
null
yesodweb/cabal-meta
main.hs
bsd-2-clause
assertCabalDependencies CabalDev = do mcd <- shelly $ which "cabal-dev" case mcd of Just _ -> return False Nothing -> error "--dev requires cabal-dev to be installed"
186
assertCabalDependencies CabalDev = do mcd <- shelly $ which "cabal-dev" case mcd of Just _ -> return False Nothing -> error "--dev requires cabal-dev to be installed"
186
assertCabalDependencies CabalDev = do mcd <- shelly $ which "cabal-dev" case mcd of Just _ -> return False Nothing -> error "--dev requires cabal-dev to be installed"
186
false
false
0
10
46
52
22
30
null
null
olsner/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
pprParendLExpr :: (OutputableBndrId id) => LHsExpr id -> SDoc pprParendLExpr (L _ e) = pprParendExpr e
102
pprParendLExpr :: (OutputableBndrId id) => LHsExpr id -> SDoc pprParendLExpr (L _ e) = pprParendExpr e
102
pprParendLExpr (L _ e) = pprParendExpr e
40
false
true
0
7
15
41
20
21
null
null
akhileshs/stack
src/Stack/Options.hs
bsd-3-clause
solverOptsParser :: Parser Bool solverOptsParser = boolFlags False "modify-stack-yaml" "Automatically modify stack.yaml with the solver's recommendations" idm
170
solverOptsParser :: Parser Bool solverOptsParser = boolFlags False "modify-stack-yaml" "Automatically modify stack.yaml with the solver's recommendations" idm
170
solverOptsParser = boolFlags False "modify-stack-yaml" "Automatically modify stack.yaml with the solver's recommendations" idm
138
false
true
0
5
28
26
11
15
null
null
snoyberg/servius
app/servius.hs
mit
unsafe :: Text -> Bool unsafe s | T.null s = False | T.head s == '.' = True | otherwise = T.any (== '/') s
118
unsafe :: Text -> Bool unsafe s | T.null s = False | T.head s == '.' = True | otherwise = T.any (== '/') s
118
unsafe s | T.null s = False | T.head s == '.' = True | otherwise = T.any (== '/') s
95
false
true
0
10
37
76
34
42
null
null
alexander-at-github/eta
compiler/ETA/CodeGen/Rts.hs
bsd-3-clause
hsResultType = obj hsResult
32
hsResultType = obj hsResult
32
hsResultType = obj hsResult
32
false
false
0
5
8
9
4
5
null
null
jgm/pandoc-citeproc
src/Text/CSL/Util.hs
bsd-3-clause
onBlocks :: ([Inline] -> [Inline]) -> [Block] -> [Block] onBlocks f = walk f' where f' (Para ils) = Para (f ils) f' (Plain ils) = Plain (f ils) f' x = x
181
onBlocks :: ([Inline] -> [Inline]) -> [Block] -> [Block] onBlocks f = walk f' where f' (Para ils) = Para (f ils) f' (Plain ils) = Plain (f ils) f' x = x
181
onBlocks f = walk f' where f' (Para ils) = Para (f ils) f' (Plain ils) = Plain (f ils) f' x = x
124
false
true
2
8
61
99
51
48
null
null
SEEK-Org/evaporate
src/S3.hs
mit
uploadFileToS3 :: AWSConstraint r m => BucketName -> Text -> Text -> m () uploadFileToS3 bucketName filePath altFilePath = do let key = S3.ObjectKey altFilePath body <- chunkedFile defaultChunkSize (unpack filePath) let req = S3.putObject bucketName key body liftIO . logEvaporate $ logFileUpload filePath altFil...
356
uploadFileToS3 :: AWSConstraint r m => BucketName -> Text -> Text -> m () uploadFileToS3 bucketName filePath altFilePath = do let key = S3.ObjectKey altFilePath body <- chunkedFile defaultChunkSize (unpack filePath) let req = S3.putObject bucketName key body liftIO . logEvaporate $ logFileUpload filePath altFil...
356
uploadFileToS3 bucketName filePath altFilePath = do let key = S3.ObjectKey altFilePath body <- chunkedFile defaultChunkSize (unpack filePath) let req = S3.putObject bucketName key body liftIO . logEvaporate $ logFileUpload filePath altFilePath bucketName void . send $ req
282
false
true
0
11
60
128
57
71
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
action_2 (158#) = happyShift action_52
38
action_2 (158#) = happyShift action_52
38
action_2 (158#) = happyShift action_52
38
false
false
0
6
4
15
7
8
null
null
aurapm/aura
aura/lib/Aura/Languages.hs
gpl-3.0
backupCache_8 :: Language -> Doc AnsiStyle backupCache_8 = \case Japanese -> "バックアップ中。数分かかるかもしれません。" Polish -> "Tworzenie kopii zapasowej. To może potrwać kilka minut..." Croatian -> "Stvaranje sigurnosne kopije. Ovo može potrajati nekoliko minuta..." Swedish -> "Tar backup. Det här kan ta et...
1,253
backupCache_8 :: Language -> Doc AnsiStyle backupCache_8 = \case Japanese -> "バックアップ中。数分かかるかもしれません。" Polish -> "Tworzenie kopii zapasowej. To może potrwać kilka minut..." Croatian -> "Stvaranje sigurnosne kopije. Ovo može potrajati nekoliko minuta..." Swedish -> "Tar backup. Det här kan ta et...
1,253
backupCache_8 = \case Japanese -> "バックアップ中。数分かかるかもしれません。" Polish -> "Tworzenie kopii zapasowej. To może potrwać kilka minut..." Croatian -> "Stvaranje sigurnosne kopije. Ovo može potrajati nekoliko minuta..." Swedish -> "Tar backup. Det här kan ta ett tag..." German -> "Sichere. Dies ...
1,210
false
true
17
6
283
155
61
94
null
null
shlevy/ghc
compiler/basicTypes/MkId.hs
bsd-3-clause
{- ************************************************************************ * * \subsection{Un-definable} * * ************************************************************************...
1,343
unsafeCoerceName, nullAddrName, seqName, realWorldName, voidPrimIdName, coercionTokenName, magicDictName, coerceName, proxyName :: Name unsafeCoerceName = mkWiredInIdName gHC_PRIM (fsLit "unsafeCoerce#") unsafeCoerceIdKey unsafeCoerceId
246
unsafeCoerceName = mkWiredInIdName gHC_PRIM (fsLit "unsafeCoerce#") unsafeCoerceIdKey unsafeCoerceId
104
true
true
3
7
316
50
30
20
null
null
vluzko/test
haskell/trivial/ControlFlow.hs
mit
fibonacci n = fib_help n 0 1 where fib_help n i sum | i == n = sum | otherwise = fib_help n (i+1) (sum+i)
125
fibonacci n = fib_help n 0 1 where fib_help n i sum | i == n = sum | otherwise = fib_help n (i+1) (sum+i)
125
fibonacci n = fib_help n 0 1 where fib_help n i sum | i == n = sum | otherwise = fib_help n (i+1) (sum+i)
125
false
false
0
8
44
71
33
38
null
null
emk/haskell-probability-monads
examples/Probability.hs
bsd-3-clause
-- > bayes (uniformAll :: FDist' MsgType) -- [Perhaps Spam 50.0%,Perhaps Ham 50.0%] characteristic f = f uniformAll
116
characteristic f = f uniformAll
31
characteristic f = f uniformAll
31
true
false
0
5
18
14
7
7
null
null
airobert/yices_haskell
Math/SMT/Yices/Syntax.hs
bsd-3-clause
showTypY (SUBRANGE e1 e2) = paren $ showString "subrange " . showsPrec 0 e1 . space . showsPrec 0 e2
100
showTypY (SUBRANGE e1 e2) = paren $ showString "subrange " . showsPrec 0 e1 . space . showsPrec 0 e2
100
showTypY (SUBRANGE e1 e2) = paren $ showString "subrange " . showsPrec 0 e1 . space . showsPrec 0 e2
100
false
false
0
9
19
46
21
25
null
null
kadena-io/pact
src-tool/Pact/Analyze/Eval/Core.hs
bsd-3-clause
evalObjMerge' :: HasCallStack => (SBV (ConcreteObj schema1) , SingList schema1) -> (SBV (ConcreteObj schema2) , SingList schema2) -> SingList schema -> SBV (ConcreteObj schema) evalObjMerge' _ _ (SingList SNil) = literal ()
233
evalObjMerge' :: HasCallStack => (SBV (ConcreteObj schema1) , SingList schema1) -> (SBV (ConcreteObj schema2) , SingList schema2) -> SingList schema -> SBV (ConcreteObj schema) evalObjMerge' _ _ (SingList SNil) = literal ()
233
evalObjMerge' _ _ (SingList SNil) = literal ()
46
false
true
0
12
41
98
46
52
null
null
brendanhay/gogol
gogol-iam/gen/Network/Google/Resource/IAM/Projects/Roles/Patch.hs
mpl-2.0
-- | A mask describing which fields in the Role have changed. prpUpdateMask :: Lens' ProjectsRolesPatch (Maybe GFieldMask) prpUpdateMask = lens _prpUpdateMask (\ s a -> s{_prpUpdateMask = a})
199
prpUpdateMask :: Lens' ProjectsRolesPatch (Maybe GFieldMask) prpUpdateMask = lens _prpUpdateMask (\ s a -> s{_prpUpdateMask = a})
137
prpUpdateMask = lens _prpUpdateMask (\ s a -> s{_prpUpdateMask = a})
76
true
true
1
9
36
52
25
27
null
null
ndmitchell/nsis
src/Development/NSIS/Plugins/WinMessages.hs
bsd-3-clause
dbt_CONFIGCHANGECANCELED = 0x0019
40
dbt_CONFIGCHANGECANCELED = 0x0019
40
dbt_CONFIGCHANGECANCELED = 0x0019
40
false
false
0
4
9
6
3
3
null
null
bgamari/minir
Data/BiHashMap.hs
bsd-3-clause
-- | Take the union of two BiHashMaps. This is not a great operation -- performance-wise as one must rebuild the reverse map from scratch unionWith :: (Hashable k, Eq k, Ord k, Ord v) => (v -> v -> v) -> BiHashMap k v -> BiHashMap k v -> BiHashMap k v unionWith f (BiHashMap fa _) (BiHashMap fb _) = fromHa...
348
unionWith :: (Hashable k, Eq k, Ord k, Ord v) => (v -> v -> v) -> BiHashMap k v -> BiHashMap k v -> BiHashMap k v unionWith f (BiHashMap fa _) (BiHashMap fb _) = fromHashMap $ HM.unionWith f fa fb
210
unionWith f (BiHashMap fa _) (BiHashMap fb _) = fromHashMap $ HM.unionWith f fa fb
86
true
true
0
9
81
114
57
57
null
null
nazrhom/vcs-clojure
src/Language/Clojure/Parser.hs
bsd-3-clause
parseAsExprList = do top <- parseTop return $ walkSeq top -- whiteSpace lexer *> (many parseSingleExpr) <* whiteSpace lexer <* eof
136
parseAsExprList = do top <- parseTop return $ walkSeq top -- whiteSpace lexer *> (many parseSingleExpr) <* whiteSpace lexer <* eof
136
parseAsExprList = do top <- parseTop return $ walkSeq top -- whiteSpace lexer *> (many parseSingleExpr) <* whiteSpace lexer <* eof
136
false
false
0
8
26
24
11
13
null
null
rolph-recto/HLisp
src/Language/HLisp/Parse.hs
mit
comment = char ';' >> commentBody
33
comment = char ';' >> commentBody
33
comment = char ';' >> commentBody
33
false
false
0
6
5
13
6
7
null
null
danr/hipspec
examples/old-examples/quickspec/ProductiveUseOfFailure2.hs
gpl-3.0
_ || _ = True
14
_ || _ = True
14
_ || _ = True
14
false
false
0
5
5
12
5
7
null
null
coolhacks/scripts-hacks
examples/shellcheck-master/ShellCheck/Parser.hs
mit
g_Case = tryWordToken "case" T_Case
35
g_Case = tryWordToken "case" T_Case
35
g_Case = tryWordToken "case" T_Case
35
false
false
0
5
4
11
5
6
null
null
Bodigrim/exp-pairs
tests/MenzerNowak.hs
gpl-3.0
testMonotonic :: Sorted (Positive Integer, Positive Integer, Positive Integer, Positive Integer) -> Bool testMonotonic (Sorted (Positive a, Positive c, Positive b, Positive d)) = (a == c && b == d) || zab > zcd where zab = optimalValue $ menzerNowak a b zcd = optimalValue $ menzerNowak c d
309
testMonotonic :: Sorted (Positive Integer, Positive Integer, Positive Integer, Positive Integer) -> Bool testMonotonic (Sorted (Positive a, Positive c, Positive b, Positive d)) = (a == c && b == d) || zab > zcd where zab = optimalValue $ menzerNowak a b zcd = optimalValue $ menzerNowak c d
309
testMonotonic (Sorted (Positive a, Positive c, Positive b, Positive d)) = (a == c && b == d) || zab > zcd where zab = optimalValue $ menzerNowak a b zcd = optimalValue $ menzerNowak c d
204
false
true
2
10
68
139
65
74
null
null
mattgreen/hython
src/Hython/Types.hs
gpl-3.0
toStr obj@(Object {}) = do str <- invoke obj "__str__" [] case str of String s -> return . T.unpack $ s _ -> toStr str
155
toStr obj@(Object {}) = do str <- invoke obj "__str__" [] case str of String s -> return . T.unpack $ s _ -> toStr str
155
toStr obj@(Object {}) = do str <- invoke obj "__str__" [] case str of String s -> return . T.unpack $ s _ -> toStr str
155
false
false
0
12
62
70
33
37
null
null
Ian-Stewart-Binks/courseography
hs/Scripts.hs
gpl-3.0
drawScripts :: H.Html drawScripts = do sequence_ (map toScript $ ["/static/js/draw/variables.js", "/static/js/draw/path.js", "/static/js/draw/draw.js", "/static/js/draw/setup.js"])
219
drawScripts :: H.Html drawScripts = do sequence_ (map toScript $ ["/static/js/draw/variables.js", "/static/js/draw/path.js", "/static/js/draw/draw.js", "/static/js/draw/setup.js"])
219
drawScripts = do sequence_ (map toScript $ ["/static/js/draw/variables.js", "/static/js/draw/path.js", "/static/js/draw/draw.js", "/static/js/draw/setup.js"])
197
false
true
0
10
52
41
22
19
null
null
biegunka/biegunka
src/Control/Biegunka/Execute/Describe.hs
mit
toString :: Builder -> String toString = Text.unpack . Builder.toLazyText
73
toString :: Builder -> String toString = Text.unpack . Builder.toLazyText
73
toString = Text.unpack . Builder.toLazyText
43
false
true
0
6
9
23
12
11
null
null
nikita-volkov/hasql
library/Hasql/Private/Session.hs
mit
-- | -- Possibly a multi-statement query, -- which however cannot be parameterized or prepared, -- nor can any results of it be collected. sql :: ByteString -> Session () sql sql = Session $ ReaderT $ \(Connection.Connection pqConnectionRef integerDatetimes registry) -> ExceptT $ fmap (mapLeft (QueryError sql [])...
691
sql :: ByteString -> Session () sql sql = Session $ ReaderT $ \(Connection.Connection pqConnectionRef integerDatetimes registry) -> ExceptT $ fmap (mapLeft (QueryError sql [])) $ withMVar pqConnectionRef $ \pqConnection -> do r1 <- IO.sendNonparametricStatement pqConnection sql r2 <- IO.getResults pqC...
552
sql sql = Session $ ReaderT $ \(Connection.Connection pqConnectionRef integerDatetimes registry) -> ExceptT $ fmap (mapLeft (QueryError sql [])) $ withMVar pqConnectionRef $ \pqConnection -> do r1 <- IO.sendNonparametricStatement pqConnection sql r2 <- IO.getResults pqConnection integerDatetimes decod...
520
true
true
0
15
129
155
77
78
null
null
tangboyun/miranda
src/MiRanda/Diagram/Alignment.hs
gpl-3.0
plotSeqStas isBW ts = map (plot . sortBy (flip compare `on` per) . tpToList) ts where tpToList (a,c,g,t,u) = let entropy f = if f == 0 then 0 else negate $ f * logBase 2 f r = 2 - sum (map entropy [a,c,g,t+u]) in [A $ a * r, C $ c * r, G ...
2,179
plotSeqStas isBW ts = map (plot . sortBy (flip compare `on` per) . tpToList) ts where tpToList (a,c,g,t,u) = let entropy f = if f == 0 then 0 else negate $ f * logBase 2 f r = 2 - sum (map entropy [a,c,g,t+u]) in [A $ a * r, C $ c * r, G ...
2,179
plotSeqStas isBW ts = map (plot . sortBy (flip compare `on` per) . tpToList) ts where tpToList (a,c,g,t,u) = let entropy f = if f == 0 then 0 else negate $ f * logBase 2 f r = 2 - sum (map entropy [a,c,g,t+u]) in [A $ a * r, C $ c * r, G ...
2,179
false
false
5
26
1,178
739
369
370
null
null
riottracker/modfile
examples/readIT.hs
bsd-3-clause
pprintInstrument :: Instrument -> IO () pprintInstrument Instrument{..} = do putStr $ "(" ++ show globalVolume ++ "): " BL.putStrLn $ BL.pack name
154
pprintInstrument :: Instrument -> IO () pprintInstrument Instrument{..} = do putStr $ "(" ++ show globalVolume ++ "): " BL.putStrLn $ BL.pack name
154
pprintInstrument Instrument{..} = do putStr $ "(" ++ show globalVolume ++ "): " BL.putStrLn $ BL.pack name
114
false
true
0
9
30
61
28
33
null
null
fiigii/dataflow
LiveVariables.hs
mit
killLV _ _ = Set.empty
22
killLV _ _ = Set.empty
22
killLV _ _ = Set.empty
22
false
false
0
5
4
13
6
7
null
null
kumasento/accelerate-cuda
Data/Array/Accelerate/CUDA/Foreign/Export.hs
bsd-3-clause
genCompileFun _ _ _ = error "Invalid accelerate function"
67
genCompileFun _ _ _ = error "Invalid accelerate function"
67
genCompileFun _ _ _ = error "Invalid accelerate function"
67
false
false
1
5
18
17
6
11
null
null
ice1000/OI-codes
codewars/301-400/tiny-three-pass-compiler.hs
agpl-3.0
addop = binOp "+" Add <|> binOp "-" Sub
39
addop = binOp "+" Add <|> binOp "-" Sub
39
addop = binOp "+" Add <|> binOp "-" Sub
39
false
false
0
6
8
20
9
11
null
null
momomimachli/Hedsql
src/Database/Hedsql/Common/Constructor.hs
gpl-3.0
-- | Create a constraint which shall then be applied on a column. colConstraint :: String -> ColConstraintType dbVendor -> ColConstraint dbVendor colConstraint name = ColConstraint (maybeString name)
199
colConstraint :: String -> ColConstraintType dbVendor -> ColConstraint dbVendor colConstraint name = ColConstraint (maybeString name)
133
colConstraint name = ColConstraint (maybeString name)
53
true
true
0
7
27
38
18
20
null
null
gspia/reflex-dom-htmlea
lib/src/Reflex/Dom/HTML5/Attrs/Aria.hs
bsd-3-clause
aColcount = aNmVal "colcount"
37
aColcount = aNmVal "colcount"
37
aColcount = aNmVal "colcount"
37
false
false
0
5
11
9
4
5
null
null
narrative/stack
src/Stack/Build/Haddock.hs
bsd-3-clause
-- | Determine whether to build haddocks for dependencies. shouldHaddockDeps :: BuildOpts -> Bool shouldHaddockDeps bopts = fromMaybe (boptsHaddock bopts) (boptsHaddockDeps bopts)
179
shouldHaddockDeps :: BuildOpts -> Bool shouldHaddockDeps bopts = fromMaybe (boptsHaddock bopts) (boptsHaddockDeps bopts)
120
shouldHaddockDeps bopts = fromMaybe (boptsHaddock bopts) (boptsHaddockDeps bopts)
81
true
true
0
7
21
41
19
22
null
null
fmapfmapfmap/amazonka
amazonka-rds/gen/Network/AWS/RDS/CreateEventSubscription.hs
mpl-2.0
-- | The list of identifiers of the event sources for which events will be -- returned. If not specified, then all sources are included in the -- response. An identifier must begin with a letter and must contain only -- ASCII letters, digits, and hyphens; it cannot end with a hyphen or -- contain two consecutive hyphen...
945
cesSourceIds :: Lens' CreateEventSubscription [Text] cesSourceIds = lens _cesSourceIds (\ s a -> s{_cesSourceIds = a}) . _Default . _Coerce
139
cesSourceIds = lens _cesSourceIds (\ s a -> s{_cesSourceIds = a}) . _Default . _Coerce
86
true
true
0
11
185
67
44
23
null
null
cbrghostrider/Hacking
HackerRank/FunctionalProgramming/MemoizationAndDP/passwordCracker.hs
mit
runTestCases n = do _ <- getLine psstrs <- getLine teststr <- getLine let cache = passwordCracker teststr (words psstrs) let strs = reverse $ getValidCombo cache (length teststr - 1) putStrLn $ if null strs || null teststr then "WRONG PASSWORD" else unwords strs runTestCases (n-1)
303
runTestCases n = do _ <- getLine psstrs <- getLine teststr <- getLine let cache = passwordCracker teststr (words psstrs) let strs = reverse $ getValidCombo cache (length teststr - 1) putStrLn $ if null strs || null teststr then "WRONG PASSWORD" else unwords strs runTestCases (n-1)
303
runTestCases n = do _ <- getLine psstrs <- getLine teststr <- getLine let cache = passwordCracker teststr (words psstrs) let strs = reverse $ getValidCombo cache (length teststr - 1) putStrLn $ if null strs || null teststr then "WRONG PASSWORD" else unwords strs runTestCases (n-1)
303
false
false
0
14
68
119
54
65
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxLANGUAGE_SPANISH_PARAGUAY :: Int wxLANGUAGE_SPANISH_PARAGUAY = 190
68
wxLANGUAGE_SPANISH_PARAGUAY :: Int wxLANGUAGE_SPANISH_PARAGUAY = 190
68
wxLANGUAGE_SPANISH_PARAGUAY = 190
33
false
true
0
4
5
11
6
5
null
null
Minoru/hakyll
src/Hakyll/Commands.hs
bsd-3-clause
------------------------------------------------------------------------------- -- | Build the site build :: Configuration -> Logger -> Rules a -> IO ExitCode build conf logger rules = fst <$> run conf logger rules
215
build :: Configuration -> Logger -> Rules a -> IO ExitCode build conf logger rules = fst <$> run conf logger rules
114
build conf logger rules = fst <$> run conf logger rules
55
true
true
2
9
28
54
25
29
null
null
vmchale/EMD
src/Edmonds.hs
bsd-3-clause
leftovers :: Acc (Array DIM1 Int) -> Acc (Array DIM1 Int) -> IndexList leftovers s t = acond (sl >* tl) (lift (A.drop tl s, empty)) (lift (empty, A.drop sl t)) where sl = A.size s tl = A.size t empty = A.filter (\x -> constant False) (toVect [1::Int])
287
leftovers :: Acc (Array DIM1 Int) -> Acc (Array DIM1 Int) -> IndexList leftovers s t = acond (sl >* tl) (lift (A.drop tl s, empty)) (lift (empty, A.drop sl t)) where sl = A.size s tl = A.size t empty = A.filter (\x -> constant False) (toVect [1::Int])
287
leftovers s t = acond (sl >* tl) (lift (A.drop tl s, empty)) (lift (empty, A.drop sl t)) where sl = A.size s tl = A.size t empty = A.filter (\x -> constant False) (toVect [1::Int])
216
false
true
2
9
84
158
79
79
null
null
hamishmack/haskell-gi
lib/Data/GI/CodeGen/Inheritance.hs
lgpl-2.1
-- | List all methods defined for an interface, including those -- defined by its prerequisites. fullInterfaceMethodList :: Name -> Interface -> CodeGen [(Name, Method)] fullInterfaceMethodList n i = fullInterfaceInheritableList n i >>= removeDuplicates False
289
fullInterfaceMethodList :: Name -> Interface -> CodeGen [(Name, Method)] fullInterfaceMethodList n i = fullInterfaceInheritableList n i >>= removeDuplicates False
192
fullInterfaceMethodList n i = fullInterfaceInheritableList n i >>= removeDuplicates False
119
true
true
0
10
64
54
27
27
null
null
raichoo/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reflectTTQuotePattern unq (Constant c) = do fill $ reflCall "TConst" [reflectConstant c] solve
103
reflectTTQuotePattern unq (Constant c) = do fill $ reflCall "TConst" [reflectConstant c] solve
103
reflectTTQuotePattern unq (Constant c) = do fill $ reflCall "TConst" [reflectConstant c] solve
103
false
false
0
10
21
38
17
21
null
null
awakenetworks/gRPC-haskell
src/Network/GRPC/HighLevel/Server/Unregistered.hs
apache-2.0
dispatchLoop :: Server -> (String -> IO ()) -> MetadataMap -> [Handler 'Normal] -> [Handler 'ClientStreaming] -> [Handler 'ServerStreaming] -> [Handler 'BiDiStreaming] -> IO () dispatchLoop s logger md hN hC hS hB = forever $ U...
2,037
dispatchLoop :: Server -> (String -> IO ()) -> MetadataMap -> [Handler 'Normal] -> [Handler 'ClientStreaming] -> [Handler 'ServerStreaming] -> [Handler 'BiDiStreaming] -> IO () dispatchLoop s logger md hN hC hS hB = forever $ U...
2,037
dispatchLoop s logger md hN hC hS hB = forever $ U.withServerCallAsync s $ \sc -> case findHandler sc allHandlers of Just (AnyHandler ah) -> case ah of UnaryHandler _ h -> unaryHandler sc h ClientStreamHandler _ h -> csHandler sc h ServerStreamHandler _ h -> ssHandler sc h ...
1,769
false
true
8
15
564
755
355
400
null
null
keithodulaigh/Hets
CSL/Parse_AS_Basic.hs
gpl-2.0
impOrFormula :: OperatorState st => CharParser st EXPRESSION impOrFormula = do let ops = [ OP_or, OP_impl ] f1 <- andFormula opfs <- many $ pair (lexemeParser $ Lexer.keyWord $ tryString (show OP_or) <|> tryString (show OP_impl)) andFormula return $ if null opfs then f1 else f...
421
impOrFormula :: OperatorState st => CharParser st EXPRESSION impOrFormula = do let ops = [ OP_or, OP_impl ] f1 <- andFormula opfs <- many $ pair (lexemeParser $ Lexer.keyWord $ tryString (show OP_or) <|> tryString (show OP_impl)) andFormula return $ if null opfs then f1 else f...
421
impOrFormula = do let ops = [ OP_or, OP_impl ] f1 <- andFormula opfs <- many $ pair (lexemeParser $ Lexer.keyWord $ tryString (show OP_or) <|> tryString (show OP_impl)) andFormula return $ if null opfs then f1 else foldl (\ a (op, b) -> mkFromOps ops op [a, b]) f1 opfs -- | a...
360
false
true
0
16
112
157
77
80
null
null
sgillespie/ghc
compiler/simplStg/UnariseStg.hs
bsd-3-clause
unariseConArg :: UnariseEnv -> InStgArg -> [OutStgArg] unariseConArg rho (StgVarArg x) = case lookupVarEnv rho x of Just (UnaryVal arg) -> [arg] Just (MultiVal as) -> as -- 'as' can be empty Nothing | isVoidTy (idType x) -> [] -- e.g. C realWorld# -- Here real...
461
unariseConArg :: UnariseEnv -> InStgArg -> [OutStgArg] unariseConArg rho (StgVarArg x) = case lookupVarEnv rho x of Just (UnaryVal arg) -> [arg] Just (MultiVal as) -> as -- 'as' can be empty Nothing | isVoidTy (idType x) -> [] -- e.g. C realWorld# -- Here real...
461
unariseConArg rho (StgVarArg x) = case lookupVarEnv rho x of Just (UnaryVal arg) -> [arg] Just (MultiVal as) -> as -- 'as' can be empty Nothing | isVoidTy (idType x) -> [] -- e.g. C realWorld# -- Here realWorld# is not in the envt, but ...
406
false
true
0
13
165
123
59
64
null
null
purcell/adventofcode2016
src/Day25.hs
bsd-3-clause
parseInstr :: Parser Instr parseInstr = (Dec <$> (string "dec " *> reg)) <|> (Inc <$> (string "inc " *> reg)) <|> (JumpNotZero <$> (string "jnz " *> val) <*> (string " " *> val)) <|> (Toggle <$> (string "tgl " *> val)) <|> (Copy <$> (string "cpy " *> val) <*> (string " " *> reg)) <|> (Out <$> (string "out " *...
584
parseInstr :: Parser Instr parseInstr = (Dec <$> (string "dec " *> reg)) <|> (Inc <$> (string "inc " *> reg)) <|> (JumpNotZero <$> (string "jnz " *> val) <*> (string " " *> val)) <|> (Toggle <$> (string "tgl " *> val)) <|> (Copy <$> (string "cpy " *> val) <*> (string " " *> reg)) <|> (Out <$> (string "out " *...
584
parseInstr = (Dec <$> (string "dec " *> reg)) <|> (Inc <$> (string "inc " *> reg)) <|> (JumpNotZero <$> (string "jnz " *> val) <*> (string " " *> val)) <|> (Toggle <$> (string "tgl " *> val)) <|> (Copy <$> (string "cpy " *> val) <*> (string " " *> reg)) <|> (Out <$> (string "out " *> val)) where reg = R...
557
false
true
0
14
185
263
135
128
null
null