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
rafaelcgs10/project-euler
p14.hs
gpl-3.0
biggestTuple [] a = a
21
biggestTuple [] a = a
21
biggestTuple [] a = a
21
false
false
1
5
4
18
6
12
null
null
numberten/zhenya_bot
Bot/Component/Impl/Reboot.hs
mit
-- | Help for setExitCode that takes an `ExitCode` setExitCode' exitCode = liftBot $ modify (\s -> s {exitCode = Just exitCode})
128
setExitCode' exitCode = liftBot $ modify (\s -> s {exitCode = Just exitCode})
77
setExitCode' exitCode = liftBot $ modify (\s -> s {exitCode = Just exitCode})
77
true
false
1
11
21
39
19
20
null
null
vikraman/ghc
compiler/prelude/THNames.hs
bsd-3-clause
-- data FamFlavour = ... typeFamName, dataFamName :: Name typeFamName = libFun (fsLit "typeFam") typeFamIdKey
109
typeFamName, dataFamName :: Name typeFamName = libFun (fsLit "typeFam") typeFamIdKey
84
typeFamName = libFun (fsLit "typeFam") typeFamIdKey
51
true
true
0
7
14
25
14
11
null
null
vikraman/ghc
compiler/nativeGen/PPC/Regs.hs
bsd-3-clause
mkVirtualReg :: Unique -> Format -> VirtualReg mkVirtualReg u format | not (isFloatFormat format) = VirtualRegI u | otherwise = case format of FF32 -> VirtualRegD u FF64 -> VirtualRegD u _ -> panic "mkVirtualReg"
257
mkVirtualReg :: Unique -> Format -> VirtualReg mkVirtualReg u format | not (isFloatFormat format) = VirtualRegI u | otherwise = case format of FF32 -> VirtualRegD u FF64 -> VirtualRegD u _ -> panic "mkVirtualReg"
257
mkVirtualReg u format | not (isFloatFormat format) = VirtualRegI u | otherwise = case format of FF32 -> VirtualRegD u FF64 -> VirtualRegD u _ -> panic "mkVirtualReg"
210
false
true
0
10
79
89
39
50
null
null
Potregon/while
src/Parser/While.hs
gpl-3.0
-- | A helper function used by 'reduce' which pops the correct number of states -- from the stack and performs a 'goto' to push the next state on the stack. reduceAndGoto :: RuleNumber -> StateStack -> StateStack reduceAndGoto rule states = newState : states' where states' = drop (reduceNumber rule) state...
448
reduceAndGoto :: RuleNumber -> StateStack -> StateStack reduceAndGoto rule states = newState : states' where states' = drop (reduceNumber rule) states newState = goto (head states') (lhs rule) -- | Returns the number of states to be popped from the stack for a given rule.
289
reduceAndGoto rule states = newState : states' where states' = drop (reduceNumber rule) states newState = goto (head states') (lhs rule) -- | Returns the number of states to be popped from the stack for a given rule.
227
true
true
0
8
94
77
38
39
null
null
noughtmare/yi
yi-dynamic-configuration/src/Yi/Main.hs
gpl-2.0
getConfig :: [OptDescr Opts] -> Bool -> (Config, ConsoleConfig) -> Opts -> Either OptionError (Config, ConsoleConfig) getConfig options shouldOpenInTabs (cfg, cfgcon) opt = case opt of Frontend _ -> fail "Panic: frontend not found" Help -> Left $ OptionError (usage options) ExitSuccess ...
2,078
getConfig :: [OptDescr Opts] -> Bool -> (Config, ConsoleConfig) -> Opts -> Either OptionError (Config, ConsoleConfig) getConfig options shouldOpenInTabs (cfg, cfgcon) opt = case opt of Frontend _ -> fail "Panic: frontend not found" Help -> Left $ OptionError (usage options) ExitSuccess ...
2,078
getConfig options shouldOpenInTabs (cfg, cfgcon) opt = case opt of Frontend _ -> fail "Panic: frontend not found" Help -> Left $ OptionError (usage options) ExitSuccess Version -> Left $ OptionError versinfo ExitSuccess Debug -> return (cfg { debugMode = True }, cfg...
1,960
false
true
0
21
618
604
301
303
null
null
kwangkim/pigment
src-lib/Tactics/Matching.hs
mit
matchValue' zs (C cty :>: (C cs, C ct)) = case halfZip cs ct of Nothing -> lift $ throwDTmStr "matchValue: unmatched constructors!" Just cst -> do (mapStateT $ mapStateT $ liftError' (\ v -> convertErrorVALs (fmap fst v))) (canTy (chevMatchValue zs) (cty :>: cst)) retu...
325
matchValue' zs (C cty :>: (C cs, C ct)) = case halfZip cs ct of Nothing -> lift $ throwDTmStr "matchValue: unmatched constructors!" Just cst -> do (mapStateT $ mapStateT $ liftError' (\ v -> convertErrorVALs (fmap fst v))) (canTy (chevMatchValue zs) (cty :>: cst)) retu...
325
matchValue' zs (C cty :>: (C cs, C ct)) = case halfZip cs ct of Nothing -> lift $ throwDTmStr "matchValue: unmatched constructors!" Just cst -> do (mapStateT $ mapStateT $ liftError' (\ v -> convertErrorVALs (fmap fst v))) (canTy (chevMatchValue zs) (cty :>: cst)) retu...
325
false
false
0
18
97
132
63
69
null
null
atilaneves/mqtt_hs
tests/Mqtt/Broker/Test.hs
bsd-3-clause
testWildcardPlus :: Assertion testWildcardPlus = do topicMatches "foo/bar/baz" "foo/bar/baz" @?= True topicMatches "foo/bar" "foo/+" @?= True topicMatches "foo/baz" "foo/+" @?= True topicMatches "foo/bar/baz" "foo/+" @?= False topicMatches "foo/bar" "foo/#" @?= True topicMatches "foo/bar/baz" "bar/#" @?= Fa...
843
testWildcardPlus :: Assertion testWildcardPlus = do topicMatches "foo/bar/baz" "foo/bar/baz" @?= True topicMatches "foo/bar" "foo/+" @?= True topicMatches "foo/baz" "foo/+" @?= True topicMatches "foo/bar/baz" "foo/+" @?= False topicMatches "foo/bar" "foo/#" @?= True topicMatches "foo/bar/baz" "bar/#" @?= Fa...
843
testWildcardPlus = do topicMatches "foo/bar/baz" "foo/bar/baz" @?= True topicMatches "foo/bar" "foo/+" @?= True topicMatches "foo/baz" "foo/+" @?= True topicMatches "foo/bar/baz" "foo/+" @?= False topicMatches "foo/bar" "foo/#" @?= True topicMatches "foo/bar/baz" "bar/#" @?= False topicMatches "topics/bar...
813
false
true
0
8
117
203
86
117
null
null
gaeldeest/NaBot
src/NaBot/Core.hs
mit
writeMessage :: IRCMessage -> BotMonad () writeMessage m = do h <- getHandle let (IRCMessage _ msg) = m let str = show msg liftIO $ do printf "> %s\n" str hPrintf h "%s\r\n" str
193
writeMessage :: IRCMessage -> BotMonad () writeMessage m = do h <- getHandle let (IRCMessage _ msg) = m let str = show msg liftIO $ do printf "> %s\n" str hPrintf h "%s\r\n" str
193
writeMessage m = do h <- getHandle let (IRCMessage _ msg) = m let str = show msg liftIO $ do printf "> %s\n" str hPrintf h "%s\r\n" str
151
false
true
1
7
50
65
32
33
null
null
kim/amazonka
amazonka-swf/gen/Network/AWS/SWF/Types.hs
mpl-2.0
-- | The id of the 'TimerStarted' event that was recorded when this timer was -- started. This information can be useful for diagnosing problems by tracing -- back the chain of events leading up to this event. tfeaStartedEventId :: Lens' TimerFiredEventAttributes Integer tfeaStartedEventId = lens _tfeaStartedEventI...
361
tfeaStartedEventId :: Lens' TimerFiredEventAttributes Integer tfeaStartedEventId = lens _tfeaStartedEventId (\s a -> s { _tfeaStartedEventId = a })
151
tfeaStartedEventId = lens _tfeaStartedEventId (\s a -> s { _tfeaStartedEventId = a })
89
true
true
0
9
59
42
24
18
null
null
winterland1989/stdio
Data/Primitive/PrimArray.hs
bsd-3-clause
setPrimArray (MutablePrimArray mba) = setByteArray mba
54
setPrimArray (MutablePrimArray mba) = setByteArray mba
54
setPrimArray (MutablePrimArray mba) = setByteArray mba
54
false
false
0
6
5
19
8
11
null
null
olsner/ghc
compiler/ghci/ByteCodeInstr.hs
bsd-3-clause
bciStackUse PUSH_PRIMOP{} = 1
37
bciStackUse PUSH_PRIMOP{} = 1
37
bciStackUse PUSH_PRIMOP{} = 1
37
false
false
0
6
11
13
6
7
null
null
julianespinel/training
hackerrank/Grading.hs
mit
readGrades :: String -> [String] readGrades = tail . lines
58
readGrades :: String -> [String] readGrades = tail . lines
58
readGrades = tail . lines
25
false
true
1
8
9
30
13
17
null
null
gibiansky/hlint
data/Default.hs
bsd-3-clause
warn = not (even x) ==> odd x
30
warn = not (even x) ==> odd x
30
warn = not (even x) ==> odd x
30
false
false
2
6
8
26
10
16
null
null
shlevy/ghc
compiler/prelude/THNames.hs
bsd-3-clause
primCallIdKey = mkPreludeMiscIdUnique 423
47
primCallIdKey = mkPreludeMiscIdUnique 423
47
primCallIdKey = mkPreludeMiscIdUnique 423
47
false
false
0
5
9
9
4
5
null
null
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/ARB/ShaderStorageBufferObject.hs
bsd-3-clause
gl_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS :: GLenum gl_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 0x90D7
94
gl_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS :: GLenum gl_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 0x90D7
94
gl_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 0x90D7
46
false
true
0
4
5
11
6
5
null
null
ctlab/gShell
src/Gshell/Unionfs.hs
mit
unmountWorkspace :: FilePath -> IO Result unmountWorkspace toUmount = runEitherT $ do mounted <- lift $ isMountPoint toUmount result <- if mounted then lift $ unmountWorkspace' $ toUmount else return $ Right $ ResultInfo $ [toUmount ++ " is not mounted"] case result of Right b -> ret...
350
unmountWorkspace :: FilePath -> IO Result unmountWorkspace toUmount = runEitherT $ do mounted <- lift $ isMountPoint toUmount result <- if mounted then lift $ unmountWorkspace' $ toUmount else return $ Right $ ResultInfo $ [toUmount ++ " is not mounted"] case result of Right b -> ret...
350
unmountWorkspace toUmount = runEitherT $ do mounted <- lift $ isMountPoint toUmount result <- if mounted then lift $ unmountWorkspace' $ toUmount else return $ Right $ ResultInfo $ [toUmount ++ " is not mounted"] case result of Right b -> return b Left b -> left b
308
false
true
0
12
97
112
53
59
null
null
isomorphism/hackage2
Main.hs
bsd-3-clause
restoreAction :: RestoreFlags -> [String] -> IO () restoreAction _ [] = die "No restore tarball given."
103
restoreAction :: RestoreFlags -> [String] -> IO () restoreAction _ [] = die "No restore tarball given."
103
restoreAction _ [] = die "No restore tarball given."
52
false
true
0
8
16
37
18
19
null
null
mjgpy3/butters
test/Butters/TestParser.hs
bsd-3-clause
test_multiple_statements_parse_successfully :: Bool test_multiple_statements_parse_successfully = length v == 4 where (Right v) = parseAll $ concat ["data Nat | [] | [Nat]\n\n", "data OddNat | [[]] | [[OddNat]]\n\n", "empty : (List Int) = []\...
383
test_multiple_statements_parse_successfully :: Bool test_multiple_statements_parse_successfully = length v == 4 where (Right v) = parseAll $ concat ["data Nat | [] | [Nat]\n\n", "data OddNat | [[]] | [[OddNat]]\n\n", "empty : (List Int) = []\...
383
test_multiple_statements_parse_successfully = length v == 4 where (Right v) = parseAll $ concat ["data Nat | [] | [Nat]\n\n", "data OddNat | [[]] | [[OddNat]]\n\n", "empty : (List Int) = []\n\n", "Nat subsum...
331
false
true
0
7
149
51
27
24
null
null
carlostome/wlp-engine
src/Expr.hs
bsd-3-clause
simplify (Lit _) = Nothing
26
simplify (Lit _) = Nothing
26
simplify (Lit _) = Nothing
26
false
false
0
6
4
16
7
9
null
null
green-haskell/ghc
compiler/coreSyn/PprCore.hs
bsd-3-clause
pprRule (Rule { ru_name = name, ru_act = act, ru_fn = fn, ru_bndrs = tpl_vars, ru_args = tpl_args, ru_rhs = rhs }) = hang (doubleQuotes (ftext name) <+> ppr act) 4 (sep [ptext (sLit "forall") <+> sep (map (pprCoreBinder LambdaBind) tpl_vars) <> dot, ...
446
pprRule (Rule { ru_name = name, ru_act = act, ru_fn = fn, ru_bndrs = tpl_vars, ru_args = tpl_args, ru_rhs = rhs }) = hang (doubleQuotes (ftext name) <+> ppr act) 4 (sep [ptext (sLit "forall") <+> sep (map (pprCoreBinder LambdaBind) tpl_vars) <> dot, ...
446
pprRule (Rule { ru_name = name, ru_act = act, ru_fn = fn, ru_bndrs = tpl_vars, ru_args = tpl_args, ru_rhs = rhs }) = hang (doubleQuotes (ftext name) <+> ppr act) 4 (sep [ptext (sLit "forall") <+> sep (map (pprCoreBinder LambdaBind) tpl_vars) <> dot, ...
446
false
false
0
15
161
176
91
85
null
null
michaelbeaumont/pandoc
src/Text/Pandoc/Readers/Docx/Parse.hs
gpl-2.0
elemToTblLook _ _ = throwError WrongElem
40
elemToTblLook _ _ = throwError WrongElem
40
elemToTblLook _ _ = throwError WrongElem
40
false
false
0
5
5
14
6
8
null
null
daleooo/barrelfish
tools/flounder/THCStubsBackend.hs
mit
-- Name of the struct holding message args for SAR ptr_msg_argstruct_name :: String -> String -> String ptr_msg_argstruct_name ifn n = idscope ifn n "ptr_args_t"
161
ptr_msg_argstruct_name :: String -> String -> String ptr_msg_argstruct_name ifn n = idscope ifn n "ptr_args_t"
110
ptr_msg_argstruct_name ifn n = idscope ifn n "ptr_args_t"
57
true
true
0
6
24
32
16
16
null
null
Fizzixnerd/xmonad-config
Battery.hs
gpl-3.0
-- | Find the first power source that is a battery in the list. The -- simple heuristic is a substring search on 'BAT' firstBattery :: [ObjectPath] -> Maybe ObjectPath firstBattery = find (isInfixOf "BAT" . formatObjectPath)
225
firstBattery :: [ObjectPath] -> Maybe ObjectPath firstBattery = find (isInfixOf "BAT" . formatObjectPath)
105
firstBattery = find (isInfixOf "BAT" . formatObjectPath)
56
true
true
0
8
37
36
19
17
null
null
davidpdrsn/keep
src/Main.hs
bsd-3-clause
createList :: String -> Keep -> Keep createList name = M.insert name M.empty
76
createList :: String -> Keep -> Keep createList name = M.insert name M.empty
76
createList name = M.insert name M.empty
39
false
true
0
6
12
31
15
16
null
null
kazu-yamamoto/network-uri
tests/uri001.hs
bsd-3-clause
testOddballList = [ TF.testCase "testMail01" testMail01 , TF.testCase "testMail02" testMail02 , TF.testCase "testMail03" testMail03 , TF.testCase "testMail11" testMail11 , TF.testCase "testMail12" testMail12 , TF.testCase "testMail13" testMail13 , TF.testCase "testMail14" testMail14 , TF.testCase "test...
422
testOddballList = [ TF.testCase "testMail01" testMail01 , TF.testCase "testMail02" testMail02 , TF.testCase "testMail03" testMail03 , TF.testCase "testMail11" testMail11 , TF.testCase "testMail12" testMail12 , TF.testCase "testMail13" testMail13 , TF.testCase "testMail14" testMail14 , TF.testCase "test...
422
testOddballList = [ TF.testCase "testMail01" testMail01 , TF.testCase "testMail02" testMail02 , TF.testCase "testMail03" testMail03 , TF.testCase "testMail11" testMail11 , TF.testCase "testMail12" testMail12 , TF.testCase "testMail13" testMail13 , TF.testCase "testMail14" testMail14 , TF.testCase "test...
422
false
false
0
7
65
106
53
53
null
null
denibertovic/haskell
kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs
bsd-3-clause
-- | 'v1beta1MutatingWebhookConfigurationMetadata' Lens v1beta1MutatingWebhookConfigurationMetadataL :: Lens_' V1beta1MutatingWebhookConfiguration (Maybe V1ObjectMeta) v1beta1MutatingWebhookConfigurationMetadataL f V1beta1MutatingWebhookConfiguration{..} = (\v1beta1MutatingWebhookConfigurationMetadata -> V1beta1Mutatin...
444
v1beta1MutatingWebhookConfigurationMetadataL :: Lens_' V1beta1MutatingWebhookConfiguration (Maybe V1ObjectMeta) v1beta1MutatingWebhookConfigurationMetadataL f V1beta1MutatingWebhookConfiguration{..} = (\v1beta1MutatingWebhookConfigurationMetadata -> V1beta1MutatingWebhookConfiguration { v1beta1MutatingWebhookConfigurat...
388
v1beta1MutatingWebhookConfigurationMetadataL f V1beta1MutatingWebhookConfiguration{..} = (\v1beta1MutatingWebhookConfigurationMetadata -> V1beta1MutatingWebhookConfiguration { v1beta1MutatingWebhookConfigurationMetadata, ..} ) <$> f v1beta1MutatingWebhookConfigurationMetadata
276
true
true
0
8
23
57
30
27
null
null
quyse/flaw
flaw-font/Flaw/Graphics/Font/Script.hs
mit
fontScriptCarian :: FontScript fontScriptCarian = fontScript "Cari"
96
fontScriptCarian :: FontScript fontScriptCarian = fontScript "Cari"
96
fontScriptCarian = fontScript "Cari"
51
false
true
0
5
35
14
7
7
null
null
romanb/amazonka
amazonka-dynamodb/gen/Network/AWS/DynamoDB/Types.hs
mpl-2.0
-- | A string that identifies one or more attributes to retrieve from the table. -- These attributes can include scalars, sets, or elements of a JSON document. -- The attributes in the /ProjectionExpression/ must be separated by commas. -- -- If no attribute names are specified, then all attributes will be returned. --...
865
kaaProjectionExpression :: Lens' KeysAndAttributes (Maybe Text) kaaProjectionExpression = lens _kaaProjectionExpression (\s a -> s { _kaaProjectionExpression = a })
168
kaaProjectionExpression = lens _kaaProjectionExpression (\s a -> s { _kaaProjectionExpression = a })
104
true
true
0
9
117
57
36
21
null
null
zalora/http-kit
src/Network/HTTP/Toolkit/Request.hs
mit
-- | Read request from provided `InputStream`. -- -- The second argument is passed to `makeChunkedReader`. -- -- Throws: -- -- * `InvalidRequestLine` if request-line is malformed. -- -- * `HeaderTooLarge` if request-line and headers together exceed the specified size `Limit` -- -- * `InvalidHeader` if request-line is m...
659
readRequestWithLimit :: Limit -> Bool -> InputStream -> IO (Request BodyReader) readRequestWithLimit limit raw c = do (startLine, headers) <- readMessageHeader limit c (method, path) <- parseRequestLine_ startLine Request method path headers <$> makeBodyReader raw (determineRequestBodyType headers) c
307
readRequestWithLimit limit raw c = do (startLine, headers) <- readMessageHeader limit c (method, path) <- parseRequestLine_ startLine Request method path headers <$> makeBodyReader raw (determineRequestBodyType headers) c
227
true
true
0
11
97
116
60
56
null
null
quchen/stg
src/Stg/Prelude/Number.hs
bsd-3-clause
-- | Less-than for boxed integers lt_Int = binaryOp "lt_Int" Lt primToBool
74
lt_Int = binaryOp "lt_Int" Lt primToBool
40
lt_Int = binaryOp "lt_Int" Lt primToBool
40
true
false
0
5
11
14
7
7
null
null
ideas-edu/ideas
src/Ideas/Text/UTF8.hs
apache-2.0
------------------------------------------------------------------ -- Test encoding -- | QuickCheck internal encoding/decoding functions propEncoding :: Property propEncoding = forAll (sized gen) valid where gen n = replicateM n someChar someChar = chr <$> oneof -- To get a nice distribution over...
480
propEncoding :: Property propEncoding = forAll (sized gen) valid where gen n = replicateM n someChar someChar = chr <$> oneof -- To get a nice distribution over the number of bytes used -- in the encoding [ choose (0, 127), choose (128, 2047) , choose (2048, 65535), choose (65536, ...
337
propEncoding = forAll (sized gen) valid where gen n = replicateM n someChar someChar = chr <$> oneof -- To get a nice distribution over the number of bytes used -- in the encoding [ choose (0, 127), choose (128, 2047) , choose (2048, 65535), choose (65536, 1114111) ]
312
true
true
1
8
112
106
57
49
null
null
Lainepress/hledger
hledger-lib/Hledger/Data/Ledger.hs
gpl-3.0
accounttreeat :: Ledger -> Account -> Maybe (Tree Account) accounttreeat = ledgerAccountTreeAt
94
accounttreeat :: Ledger -> Account -> Maybe (Tree Account) accounttreeat = ledgerAccountTreeAt
94
accounttreeat = ledgerAccountTreeAt
35
false
true
0
9
11
28
14
14
null
null
ulricha/dsh
src/Database/DSH/NKL/Kure.hs
bsd-3-clause
litR :: Monad m => Rewrite NestedCtx m Expr litR = constExprT Const
67
litR :: Monad m => Rewrite NestedCtx m Expr litR = constExprT Const
67
litR = constExprT Const
23
false
true
0
7
12
34
14
20
null
null
isturdy/q
bench/Data/Queue/SeqBench.hs
unlicense
pop_all :: Seq a -> () pop_all q = go (pop q) where go (Just (e,q')) = go $ pop q' go Nothing = ()
114
pop_all :: Seq a -> () pop_all q = go (pop q) where go (Just (e,q')) = go $ pop q' go Nothing = ()
114
pop_all q = go (pop q) where go (Just (e,q')) = go $ pop q' go Nothing = ()
91
false
true
1
8
40
71
35
36
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT01.hs
gpl-3.0
subset (x:xs) ys = x `elem` xs && subset xs ys
46
subset (x:xs) ys = x `elem` xs && subset xs ys
46
subset (x:xs) ys = x `elem` xs && subset xs ys
46
false
false
0
7
10
33
17
16
null
null
RossMeikleham/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
-- Return all names, free or globally bound, in the given term. allNamesIn :: PTerm -> [Name] allNamesIn tm = nub $ ni [] tm where -- TODO THINK added niTacImp, but is it right? ni env (PRef _ _ n) | not (n `elem` env) = [n] ni env (PPatvar _ n) = [n] ni env (PApp _ f as) = ni env f ++ concatMa...
1,546
allNamesIn :: PTerm -> [Name] allNamesIn tm = nub $ ni [] tm where -- TODO THINK added niTacImp, but is it right? ni env (PRef _ _ n) | not (n `elem` env) = [n] ni env (PPatvar _ n) = [n] ni env (PApp _ f as) = ni env f ++ concatMap (ni env) (map getTm as) ni env (PAppBind _ f as) = ni env...
1,481
allNamesIn tm = nub $ ni [] tm where -- TODO THINK added niTacImp, but is it right? ni env (PRef _ _ n) | not (n `elem` env) = [n] ni env (PPatvar _ n) = [n] ni env (PApp _ f as) = ni env f ++ concatMap (ni env) (map getTm as) ni env (PAppBind _ f as) = ni env f ++ concatMap (ni env) (map ...
1,451
true
true
22
25
523
849
420
429
null
null
nicball/playground
particle/src/Main.hs
mit
destroyDrawer :: Drawer -> IO () destroyDrawer (Drawer vao_front vao_back vbo_front vbo_back r prog comp) = do deleteObjectName vao_front deleteObjectName vao_back deleteObjectName vbo_front deleteObjectName vbo_back deleteObjectName prog deleteObjectName comp
284
destroyDrawer :: Drawer -> IO () destroyDrawer (Drawer vao_front vao_back vbo_front vbo_back r prog comp) = do deleteObjectName vao_front deleteObjectName vao_back deleteObjectName vbo_front deleteObjectName vbo_back deleteObjectName prog deleteObjectName comp
284
destroyDrawer (Drawer vao_front vao_back vbo_front vbo_back r prog comp) = do deleteObjectName vao_front deleteObjectName vao_back deleteObjectName vbo_front deleteObjectName vbo_back deleteObjectName prog deleteObjectName comp
251
false
true
0
9
52
82
33
49
null
null
pigworker/CS410-14
Ex5/HaskellSetup.hs
unlicense
act (SendText s) = putStr s
27
act (SendText s) = putStr s
27
act (SendText s) = putStr s
27
false
false
0
6
5
19
8
11
null
null
mcschroeder/ghc
compiler/prelude/PrelRules.hs
bsd-3-clause
primOpRules nm Narrow8IntOp = mkPrimOpRule nm 1 [ liftLit narrow8IntLit , subsumedByPrimOp Narrow8IntOp , Narrow8IntOp `subsumesPrimOp` Narrow16IntOp , Narrow8IntOp `su...
349
primOpRules nm Narrow8IntOp = mkPrimOpRule nm 1 [ liftLit narrow8IntLit , subsumedByPrimOp Narrow8IntOp , Narrow8IntOp `subsumesPrimOp` Narrow16IntOp , Narrow8IntOp `su...
349
primOpRules nm Narrow8IntOp = mkPrimOpRule nm 1 [ liftLit narrow8IntLit , subsumedByPrimOp Narrow8IntOp , Narrow8IntOp `subsumesPrimOp` Narrow16IntOp , Narrow8IntOp `su...
349
false
false
0
7
173
48
26
22
null
null
tvh/llvm-general-quote
src/LLVM/General/Quote/Parser/Monad.hs
bsd-3-clause
setCurToken :: L Token -> P () setCurToken tok = modify $ \s -> s { curToken = tok }
84
setCurToken :: L Token -> P () setCurToken tok = modify $ \s -> s { curToken = tok }
84
setCurToken tok = modify $ \s -> s { curToken = tok }
53
false
true
0
8
19
43
22
21
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F30.hs
bsd-3-clause
ptr_glVertexAttrib4iv :: FunPtr (GLuint -> Ptr GLint -> IO ()) ptr_glVertexAttrib4iv = unsafePerformIO $ getCommand "glVertexAttrib4iv"
135
ptr_glVertexAttrib4iv :: FunPtr (GLuint -> Ptr GLint -> IO ()) ptr_glVertexAttrib4iv = unsafePerformIO $ getCommand "glVertexAttrib4iv"
135
ptr_glVertexAttrib4iv = unsafePerformIO $ getCommand "glVertexAttrib4iv"
72
false
true
0
10
15
40
19
21
null
null
ihc/futhark
src/Futhark/Internalise/Bindings.hs
isc
bindingLambdaParams :: [E.TypeParam] -> [E.Pattern] -> [I.Type] -> (ConstParams -> [I.LParam] -> InternaliseM a) -> InternaliseM a bindingLambdaParams tparams params ts m = do (params_idents, params_types) <- unzip . concat <$> mapM flattenPattern params let bound = bound...
807
bindingLambdaParams :: [E.TypeParam] -> [E.Pattern] -> [I.Type] -> (ConstParams -> [I.LParam] -> InternaliseM a) -> InternaliseM a bindingLambdaParams tparams params ts m = do (params_idents, params_types) <- unzip . concat <$> mapM flattenPattern params let bound = bound...
807
bindingLambdaParams tparams params ts m = do (params_idents, params_types) <- unzip . concat <$> mapM flattenPattern params let bound = boundInTypes tparams param_names = M.fromList $ zip (boundByPatterns params) (map snd params_idents) (params_ts, shape_ctx, cm) <- internaliseParamTypes bound param...
636
false
true
0
18
169
269
134
135
null
null
rueshyna/gogol
gogol-billing/gen/Network/Google/Resource/CloudBilling/BillingAccounts/Projects/List.hs
mpl-2.0
-- | OAuth access token. baplAccessToken :: Lens' BillingAccountsProjectsList (Maybe Text) baplAccessToken = lens _baplAccessToken (\ s a -> s{_baplAccessToken = a})
173
baplAccessToken :: Lens' BillingAccountsProjectsList (Maybe Text) baplAccessToken = lens _baplAccessToken (\ s a -> s{_baplAccessToken = a})
148
baplAccessToken = lens _baplAccessToken (\ s a -> s{_baplAccessToken = a})
82
true
true
0
9
29
48
25
23
null
null
keithodulaigh/Hets
Comorphisms/HetLogicGraph.hs
gpl-2.0
reduceToWellSupported :: HetSublogicGraph -> HetSublogicGraph reduceToWellSupported hsg = hsg { sublogicNodes = wellSupN , comorphismEdges = wellSupE } where wellSupN = Map.filter isWellSupN $ sublogicNodes hsg wellSupE = Map.filterWithKey isWellSupE $ comorphismEdges hsg isWellSupN ...
679
reduceToWellSupported :: HetSublogicGraph -> HetSublogicGraph reduceToWellSupported hsg = hsg { sublogicNodes = wellSupN , comorphismEdges = wellSupE } where wellSupN = Map.filter isWellSupN $ sublogicNodes hsg wellSupE = Map.filterWithKey isWellSupE $ comorphismEdges hsg isWellSupN ...
679
reduceToWellSupported hsg = hsg { sublogicNodes = wellSupN , comorphismEdges = wellSupE } where wellSupN = Map.filter isWellSupN $ sublogicNodes hsg wellSupE = Map.filterWithKey isWellSupE $ comorphismEdges hsg isWellSupN (G_sublogics lid _) = hasProver lid || (case sta...
617
false
true
6
9
255
192
89
103
null
null
Frefreak/Gideon
src/Constant.hs
bsd-3-clause
urlCharacterInfo :: String urlCharacterInfo = "https://login.eveonline.com/oauth/verify"
88
urlCharacterInfo :: String urlCharacterInfo = "https://login.eveonline.com/oauth/verify"
88
urlCharacterInfo = "https://login.eveonline.com/oauth/verify"
61
false
true
0
4
5
11
6
5
null
null
drakedevel/wcc
Language/While/Parser.hs
bsd-3-clause
astToAbt :: AST -> [String] -> Either String (ABT, Map String Identifier) astToAbt ast params = flip runStateT empty $ do mapM_ newVar params astToAbt' ast where astToAbt' a = do b <- get case a of Initialize v -> do vi <- getVarOrAdd v return $ Initialize vi I...
1,122
astToAbt :: AST -> [String] -> Either String (ABT, Map String Identifier) astToAbt ast params = flip runStateT empty $ do mapM_ newVar params astToAbt' ast where astToAbt' a = do b <- get case a of Initialize v -> do vi <- getVarOrAdd v return $ Initialize vi I...
1,122
astToAbt ast params = flip runStateT empty $ do mapM_ newVar params astToAbt' ast where astToAbt' a = do b <- get case a of Initialize v -> do vi <- getVarOrAdd v return $ Initialize vi Increment v -> do vi <- getVar v return $ Increment vi ...
1,048
false
true
4
13
486
461
194
267
null
null
scvalex/landler
Language/Landler/Parser.hs
gpl-3.0
ltype = (reserved lexer) "type"
31
ltype = (reserved lexer) "type"
31
ltype = (reserved lexer) "type"
31
false
false
0
7
4
15
7
8
null
null
yliu120/K3
src/Language/K3/Metaprogram/Evaluation.hs
apache-2.0
evalTApply _ a = return a
25
evalTApply _ a = return a
25
evalTApply _ a = return a
25
false
false
0
5
5
14
6
8
null
null
adinapoli/Shelly.hs
src/Shelly.hs
bsd-3-clause
bash_ :: FilePath -> [Text] -> Sh () bash_ fp args = escaping False $ run_ "bash" $ bashArgs fp args
100
bash_ :: FilePath -> [Text] -> Sh () bash_ fp args = escaping False $ run_ "bash" $ bashArgs fp args
100
bash_ fp args = escaping False $ run_ "bash" $ bashArgs fp args
63
false
true
0
8
20
51
24
27
null
null
ganeti-github-testing/ganeti-test-1
src/Ganeti/HTools/Cluster.hs
bsd-2-clause
printSolutionLine :: Node.List -- ^ The node list -> Instance.List -- ^ The instance list -> Int -- ^ Maximum node name length -> Int -- ^ Maximum instance name length -> Placement -- ^ The current placement ...
1,401
printSolutionLine :: Node.List -- ^ The node list -> Instance.List -- ^ The instance list -> Int -- ^ Maximum node name length -> Int -- ^ Maximum instance name length -> Placement -- ^ The current placement ...
1,401
printSolutionLine nl il nmlen imlen plc pos = let pmlen = (2*nmlen + 1) (i, p, s, mv, c) = plc old_sec = Instance.sNode inst inst = Container.find i il inam = Instance.alias inst npri = Node.alias $ Container.find p nl nsec = Node.alias $ Container.find s nl opri = Node.alias...
932
false
true
0
13
515
348
186
162
null
null
gennady-em/haskel
src/E_Yi.hs
gpl-2.0
versinfo = putStrLn $ package++" "++version
43
versinfo = putStrLn $ package++" "++version
43
versinfo = putStrLn $ package++" "++version
43
false
false
5
5
5
24
9
15
null
null
mortberg/AlgTop
AlgTop/SimplicialComplex.hs
bsd-3-clause
subset :: Eq a => [a] -> [a] -> Bool subset xs ys = and [ x `elem` ys | x <- xs ]
81
subset :: Eq a => [a] -> [a] -> Bool subset xs ys = and [ x `elem` ys | x <- xs ]
81
subset xs ys = and [ x `elem` ys | x <- xs ]
44
false
true
0
8
23
57
30
27
null
null
chreekat/stack
src/Stack/Setup.hs
bsd-3-clause
setup7z :: (MonadReader env m, HasHttpManager env, MonadThrow m, MonadIO m, MonadIO n, MonadLogger m, MonadBaseControl IO m) => SetupInfo -> Config -> m (Path Abs Dir -> Path Abs File -> n ()) setup7z si config = do chattyDownload "7z.dll" (siSevenzDll si) dll chattyDownload "7z.exe" (si...
800
setup7z :: (MonadReader env m, HasHttpManager env, MonadThrow m, MonadIO m, MonadIO n, MonadLogger m, MonadBaseControl IO m) => SetupInfo -> Config -> m (Path Abs Dir -> Path Abs File -> n ()) setup7z si config = do chattyDownload "7z.dll" (siSevenzDll si) dll chattyDownload "7z.exe" (si...
800
setup7z si config = do chattyDownload "7z.dll" (siSevenzDll si) dll chattyDownload "7z.exe" (siSevenzExe si) exe return $ \outdir archive -> liftIO $ do ec <- rawSystem (toFilePath exe) [ "x" , "-o" ++ toFilePath outdir , "-y" , toFilePath archive ...
583
false
true
0
17
246
274
132
142
null
null
tamarin-prover/tamarin-prover
lib/theory/src/Theory/Tools/Wellformedness.hs
gpl-3.0
unboundReport :: OpenTranslatedTheory -> WfErrorReport unboundReport thy = do RuleItem ru' <- get thyItems thy let ru = get oprRuleE ru' unboundCheck ("rule " ++ quote (showRuleCaseName ru) ++ " has unbound variables: " ) ru -- | Report on sort clashes.
301
unboundReport :: OpenTranslatedTheory -> WfErrorReport unboundReport thy = do RuleItem ru' <- get thyItems thy let ru = get oprRuleE ru' unboundCheck ("rule " ++ quote (showRuleCaseName ru) ++ " has unbound variables: " ) ru -- | Report on sort clashes.
301
unboundReport thy = do RuleItem ru' <- get thyItems thy let ru = get oprRuleE ru' unboundCheck ("rule " ++ quote (showRuleCaseName ru) ++ " has unbound variables: " ) ru -- | Report on sort clashes.
246
false
true
0
13
89
76
35
41
null
null
gcross/LogicGrowsOnTrees
LogicGrowsOnTrees/sources/LogicGrowsOnTrees/Examples/Queens/Advanced.hs
bsd-2-clause
nqueensCSearch updater finalizeValue value size window_start NQueensSearchState{..} = case updater of CountUpdater → do multiplier ← getWordSum <$> finalizeValue value let number_found = fromIntegral . unsafePerformIO $ ...
2,248
nqueensCSearch updater finalizeValue value size window_start NQueensSearchState{..} = case updater of CountUpdater → do multiplier ← getWordSum <$> finalizeValue value let number_found = fromIntegral . unsafePerformIO $ ...
2,248
nqueensCSearch updater finalizeValue value size window_start NQueensSearchState{..} = case updater of CountUpdater → do multiplier ← getWordSum <$> finalizeValue value let number_found = fromIntegral . unsafePerformIO $ ...
2,248
false
false
0
22
764
389
181
208
null
null
rob-b/pivotal
src/Pivotal/Types.hs
bsd-3-clause
setCheckStatus :: Wreq.Options -> Wreq.Options setCheckStatus options = options & checkStatus .~ (Just $ \_ _ _ -> Nothing)
123
setCheckStatus :: Wreq.Options -> Wreq.Options setCheckStatus options = options & checkStatus .~ (Just $ \_ _ _ -> Nothing)
123
setCheckStatus options = options & checkStatus .~ (Just $ \_ _ _ -> Nothing)
76
false
true
0
8
18
46
24
22
null
null
jdreaver/iris
examples/Mandelbrot.hs
mit
mandelbrotInit :: Behavior MandelbrotData -> IO (Behavior DrawNode) mandelbrotInit mandelDataB = do prog <- simpleShaderProgramBS vertSource fragSource mbuf <- meshBuffer (Faces meshFaceVerts meshFaceIndices) let item = MandelbrotItem prog mbuf <$> mandelDataB return $ DrawNode <$> (drawMandelbrot <$> ...
325
mandelbrotInit :: Behavior MandelbrotData -> IO (Behavior DrawNode) mandelbrotInit mandelDataB = do prog <- simpleShaderProgramBS vertSource fragSource mbuf <- meshBuffer (Faces meshFaceVerts meshFaceIndices) let item = MandelbrotItem prog mbuf <$> mandelDataB return $ DrawNode <$> (drawMandelbrot <$> ...
325
mandelbrotInit mandelDataB = do prog <- simpleShaderProgramBS vertSource fragSource mbuf <- meshBuffer (Faces meshFaceVerts meshFaceIndices) let item = MandelbrotItem prog mbuf <$> mandelDataB return $ DrawNode <$> (drawMandelbrot <$> item)
257
false
true
0
11
54
96
44
52
null
null
jeremyjh/free-agent
core/src/FreeAgent/Core/Protocol/Executive.hs
bsd-3-clause
-- | Used with 'addListener' - defines a 'Listener' that will -- receive a 'Result' for each 'Action' executed where both the Action and Result -- match the predicate arguments. -- If you need the 'ActionMatcher' predicate to have access to the underlying -- concrete type, then pass the typed predicate to 'matchA' to m...
527
resultListener :: Portable b => ActionMatcher -> (b -> Bool) -> NodeId -> String -> Listener resultListener af rf = ResultMatching af (matchResult rf)
180
resultListener af rf = ResultMatching af (matchResult rf)
57
true
true
0
9
111
63
34
29
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F19.hs
bsd-3-clause
-- glPNTrianglesiATI ----------------------------------------------------------- glPNTrianglesiATI :: MonadIO m => GLenum -- ^ @pname@ of type [PNTrianglesPNameATI](Graphics-GL-Groups.html#PNTrianglesPNameATI). -> GLint -- ^ @param@. -> m () glPNTrianglesiATI v1 v2 = liftIO $ dyn58 ptr_glPNTrianglesiATI v1 v2
319
glPNTrianglesiATI :: MonadIO m => GLenum -- ^ @pname@ of type [PNTrianglesPNameATI](Graphics-GL-Groups.html#PNTrianglesPNameATI). -> GLint -- ^ @param@. -> m () glPNTrianglesiATI v1 v2 = liftIO $ dyn58 ptr_glPNTrianglesiATI v1 v2
237
glPNTrianglesiATI v1 v2 = liftIO $ dyn58 ptr_glPNTrianglesiATI v1 v2
68
true
true
0
10
41
54
26
28
null
null
snoyberg/photosorter
fay/Language/Fay/JQuery.hs
bsd-2-clause
replaceWithJQuery :: JQuery -> JQuery -> Fay JQuery replaceWithJQuery = ffi "%2['replaceWith'](%1)"
99
replaceWithJQuery :: JQuery -> JQuery -> Fay JQuery replaceWithJQuery = ffi "%2['replaceWith'](%1)"
99
replaceWithJQuery = ffi "%2['replaceWith'](%1)"
47
false
true
0
7
11
25
12
13
null
null
mightymoose/liquidhaskell
benchmarks/containers-0.5.0.0/Data/Sequence.hs
bsd-3-clause
-- | Given the size of a digit and the digit itself, efficiently converts -- it to a FingerTree. digitToTree' :: Int -> Digit a -> FingerTree a digitToTree' n (Four a b c d) = Deep n (Two a b) Empty (Two c d)
208
digitToTree' :: Int -> Digit a -> FingerTree a digitToTree' n (Four a b c d) = Deep n (Two a b) Empty (Two c d)
111
digitToTree' n (Four a b c d) = Deep n (Two a b) Empty (Two c d)
64
true
true
0
10
44
73
35
38
null
null
ethercrow/docopt.hs
System/Console/Docopt/Types.hs
mit
humanize :: Option -> String humanize opt = case opt of Command name -> name Argument name -> name LongOption name -> "--"++name ShortOption c -> ['-',c] AnyOption -> "[options]" -- | Used when parsing through the available option descriptions. -- Holds a list of synonymous options, Maybe a de...
589
humanize :: Option -> String humanize opt = case opt of Command name -> name Argument name -> name LongOption name -> "--"++name ShortOption c -> ['-',c] AnyOption -> "[options]" -- | Used when parsing through the available option descriptions. -- Holds a list of synonymous options, Maybe a de...
589
humanize opt = case opt of Command name -> name Argument name -> name LongOption name -> "--"++name ShortOption c -> ['-',c] AnyOption -> "[options]" -- | Used when parsing through the available option descriptions. -- Holds a list of synonymous options, Maybe a default value (if specified), -...
560
false
true
0
8
125
79
41
38
null
null
ehlemur/HLearn
src/HLearn/Data/SpaceTree/CoverTree.hs
bsd-3-clause
ctAdoptNodes :: ( ValidCT exprat childC leafC dp ) => CoverTree_ exprat childC leafC dp -> CoverTree_ exprat childC leafC dp ctAdoptNodes ct = ct { children = fromList $ map ctAdoptNodes $ go [] $ toList $ children ct } where go acc [] = acc go acc (x:xs) = go (x { children = (from...
1,587
ctAdoptNodes :: ( ValidCT exprat childC leafC dp ) => CoverTree_ exprat childC leafC dp -> CoverTree_ exprat childC leafC dp ctAdoptNodes ct = ct { children = fromList $ map ctAdoptNodes $ go [] $ toList $ children ct } where go acc [] = acc go acc (x:xs) = go (x { children = (from...
1,587
ctAdoptNodes ct = ct { children = fromList $ map ctAdoptNodes $ go [] $ toList $ children ct } where go acc [] = acc go acc (x:xs) = go (x { children = (fromList accchildren+fromList xschildren+children x)}:acc') xs' where betterMoveNode y c = distance (nodedp x) (nod...
1,448
false
true
0
15
483
378
196
182
null
null
TOSPIO/yi
src/library/Yi/File.hs
gpl-2.0
-- | Revert to the contents of the file on disk revertE :: YiM () revertE = withCurrentBuffer (gets file) >>= \case Just fp -> do now <- io getCurrentTime rf <- liftBase $ R.readFile fp >>= \case Left m -> print ("Can't revert: " <> m) >> return Nothing Right (c, cv) -> return $ Just (...
680
revertE :: YiM () revertE = withCurrentBuffer (gets file) >>= \case Just fp -> do now <- io getCurrentTime rf <- liftBase $ R.readFile fp >>= \case Left m -> print ("Can't revert: " <> m) >> return Nothing Right (c, cv) -> return $ Just (c, Just cv) case rf of Nothing -> r...
632
revertE = withCurrentBuffer (gets file) >>= \case Just fp -> do now <- io getCurrentTime rf <- liftBase $ R.readFile fp >>= \case Left m -> print ("Can't revert: " <> m) >> return Nothing Right (c, cv) -> return $ Just (c, Just cv) case rf of Nothing -> return () Ju...
614
true
true
1
21
194
209
97
112
null
null
steveshogren/haskell-katas
src/BookCalendar.hs
bsd-3-clause
dailyCounts :: t -> UTCTime -> [String] dailyCounts goal today = let days = filter (\n -> not $ isWeekend $ addToDay today n) [1..35] dayStrings = map (buildDate today) days in map (\(n, d) -> (show n) ++ d) $ zip futureCounts dayStrings
244
dailyCounts :: t -> UTCTime -> [String] dailyCounts goal today = let days = filter (\n -> not $ isWeekend $ addToDay today n) [1..35] dayStrings = map (buildDate today) days in map (\(n, d) -> (show n) ++ d) $ zip futureCounts dayStrings
244
dailyCounts goal today = let days = filter (\n -> not $ isWeekend $ addToDay today n) [1..35] dayStrings = map (buildDate today) days in map (\(n, d) -> (show n) ++ d) $ zip futureCounts dayStrings
204
false
true
0
13
50
126
63
63
null
null
oldmanmike/ghc
compiler/iface/IfaceType.hs
bsd-3-clause
eqIfaceType _ (IfaceLitTy l1) (IfaceLitTy l2) = l1 == l2
58
eqIfaceType _ (IfaceLitTy l1) (IfaceLitTy l2) = l1 == l2
58
eqIfaceType _ (IfaceLitTy l1) (IfaceLitTy l2) = l1 == l2
58
false
false
0
7
11
29
14
15
null
null
jcristovao/enclosed-exceptions-either
src/Control/Exception/Enclosed/Either.hs
bsd-3-clause
eExIO = EitherT . tryAnyDeep
30
eExIO = EitherT . tryAnyDeep
30
eExIO = EitherT . tryAnyDeep
30
false
false
1
5
6
13
5
8
null
null
Quid2/model
src/Data/Model/Types.hs
bsd-3-clause
-- |Return the list of constructors in definition order constructors :: ConTree name ref -> [(name, Fields name ref)] constructors (Con n f) = [(n,f)]
154
constructors :: ConTree name ref -> [(name, Fields name ref)] constructors (Con n f) = [(n,f)]
98
constructors (Con n f) = [(n,f)]
36
true
true
0
8
28
55
30
25
null
null
gavilancomun/kakuro-haskell
Kakuro.hs
apache-2.0
drawRow row = (concatMap draw row) ++ "\n"
42
drawRow row = (concatMap draw row) ++ "\n"
42
drawRow row = (concatMap draw row) ++ "\n"
42
false
false
0
7
7
21
10
11
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/mapM_1.hs
mit
gtGtEsMaybe Nothing k = Nothing
31
gtGtEsMaybe Nothing k = Nothing
31
gtGtEsMaybe Nothing k = Nothing
31
false
false
0
5
4
11
5
6
null
null
adizere/nifty-urb
src/Nifty/URB.hs
mit
egressChanLength :: Int egressChanLength = 10
45
egressChanLength :: Int egressChanLength = 10
45
egressChanLength = 10
21
false
true
0
6
5
18
7
11
null
null
danr/hipspec
examples/old-examples/hip/NatDoubleSlow.hs
gpl-3.0
S (S x) + y = S (S x + y)
25
S (S x) + y = S (S x + y)
25
S (S x) + y = S (S x + y)
25
false
false
0
8
10
34
15
19
null
null
wavewave/hoodle-types
src/Data/Hoodle/Predefined.hs
bsd-2-clause
rgbaToHEX :: (Double,Double,Double,Double) -> String rgbaToHEX (r,g,b,a) = let i :: Integer = floor (255*a) + 256*floor (255*b) + 256*256*floor (255*g) + 256*256*256*floor (255*r) in printf "#%08x" i
205
rgbaToHEX :: (Double,Double,Double,Double) -> String rgbaToHEX (r,g,b,a) = let i :: Integer = floor (255*a) + 256*floor (255*b) + 256*256*floor (255*g) + 256*256*256*floor (255*r) in printf "#%08x" i
205
rgbaToHEX (r,g,b,a) = let i :: Integer = floor (255*a) + 256*floor (255*b) + 256*256*floor (255*g) + 256*256*256*floor (255*r) in printf "#%08x" i
152
false
true
0
20
33
139
72
67
null
null
oldmanmike/ghc
compiler/stgSyn/CoreToStg.hs
bsd-3-clause
topLevelBound _ = False
41
topLevelBound _ = False
41
topLevelBound _ = False
41
false
false
0
4
21
10
4
6
null
null
IreneKnapp/Faction
libfaction/tests/Test/Distribution/Version.hs
bsd-3-clause
prop_notThisVersion :: Version -> Version -> Bool prop_notThisVersion v v' = withinRange v' (notThisVersion v) == (v' /= v)
130
prop_notThisVersion :: Version -> Version -> Bool prop_notThisVersion v v' = withinRange v' (notThisVersion v) == (v' /= v)
130
prop_notThisVersion v v' = withinRange v' (notThisVersion v) == (v' /= v)
80
false
true
1
7
25
48
24
24
null
null
snapframework/heist
src/Heist/Common.hs
bsd-3-clause
heistErrMsg :: Monad m => Text -> HeistT n m Text heistErrMsg msg = do tf <- getsHS _curTemplateFile return $ (maybe "" ((`mappend` ": ") . T.pack) tf) `mappend` msg ------------------------------------------------------------------------------ -- | Adds an error message to the list of splice processing error...
322
heistErrMsg :: Monad m => Text -> HeistT n m Text heistErrMsg msg = do tf <- getsHS _curTemplateFile return $ (maybe "" ((`mappend` ": ") . T.pack) tf) `mappend` msg ------------------------------------------------------------------------------ -- | Adds an error message to the list of splice processing error...
322
heistErrMsg msg = do tf <- getsHS _curTemplateFile return $ (maybe "" ((`mappend` ": ") . T.pack) tf) `mappend` msg ------------------------------------------------------------------------------ -- | Adds an error message to the list of splice processing errors.
272
false
true
0
13
54
87
44
43
null
null
rueshyna/gogol
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/Teachers/List.hs
mpl-2.0
-- | OAuth bearer token. ctlBearerToken :: Lens' CoursesTeachersList (Maybe Text) ctlBearerToken = lens _ctlBearerToken (\ s a -> s{_ctlBearerToken = a})
161
ctlBearerToken :: Lens' CoursesTeachersList (Maybe Text) ctlBearerToken = lens _ctlBearerToken (\ s a -> s{_ctlBearerToken = a})
136
ctlBearerToken = lens _ctlBearerToken (\ s a -> s{_ctlBearerToken = a})
79
true
true
0
9
29
48
25
23
null
null
kongra/kask-base
app/Test007.hs
bsd-3-clause
show21 :: T2 -> T.Text show21 A2 = T.pack "A2"
46
show21 :: T2 -> T.Text show21 A2 = T.pack "A2"
46
show21 A2 = T.pack "A2"
23
false
true
0
8
9
31
13
18
null
null
sdiehl/ghc
testsuite/tests/dependent/should_compile/dynamic-paper.hs
bsd-3-clause
mkT :: (Typeable a, Typeable b) => (b -> b) -> a -> a mkT f x = case (cast f) of Just g -> g x Nothing -> x
134
mkT :: (Typeable a, Typeable b) => (b -> b) -> a -> a mkT f x = case (cast f) of Just g -> g x Nothing -> x
134
mkT f x = case (cast f) of Just g -> g x Nothing -> x
80
false
true
0
9
56
80
38
42
null
null
rrnewton/accelerate
Data/Array/Accelerate/Interpreter.hs
bsd-3-clause
-- Program execution -- ----------------- -- | Run a complete embedded array program using the reference interpreter. -- run :: Arrays a => Sugar.Acc a -> a run acc = let a = convertAccWith config acc in evalOpenAcc a Empty
231
run :: Arrays a => Sugar.Acc a -> a run acc = let a = convertAccWith config acc in evalOpenAcc a Empty
109
run acc = let a = convertAccWith config acc in evalOpenAcc a Empty
73
true
true
0
9
47
60
28
32
null
null
keithodulaigh/Hets
Comorphisms/Hs2HOLCFaux.hs
gpl-2.0
getMainInstType :: HsInstance -> HsType getMainInstType (i, _) = getInstType i
78
getMainInstType :: HsInstance -> HsType getMainInstType (i, _) = getInstType i
78
getMainInstType (i, _) = getInstType i
38
false
true
0
5
10
31
15
16
null
null
coompany/slackbots
src/Asana.hs
mit
runServer :: Int -> WebhookHandler a -> IO () runServer port handler = run port (app handler)
93
runServer :: Int -> WebhookHandler a -> IO () runServer port handler = run port (app handler)
93
runServer port handler = run port (app handler)
47
false
true
0
8
16
43
20
23
null
null
antalsz/hs-to-coq
src/lib/HsToCoq/ConvertHaskell/InfixNames.hs
mit
-- An operator's user-facing name in Coq (a notation) infixToPrefix :: Op -> Ident infixToPrefix = ("_" <>) . (<> "_")
118
infixToPrefix :: Op -> Ident infixToPrefix = ("_" <>) . (<> "_")
64
infixToPrefix = ("_" <>) . (<> "_")
35
true
true
0
6
20
28
17
11
null
null
NCrashed/servant-auth-token
src/Servant/Server/Auth/Token/Model.hs
bsd-3-clause
-- | Ensures that DB has at leas one admin, if not, creates a new one -- with specified info. ensureAdmin :: HasStorage m => Int -> Login -> Password -> Email -> m () ensureAdmin strength login pass email = do madmin <- getFirstUserByPerm adminPerm whenNothing madmin $ void $ createAdmin strength login pass email ...
347
ensureAdmin :: HasStorage m => Int -> Login -> Password -> Email -> m () ensureAdmin strength login pass email = do madmin <- getFirstUserByPerm adminPerm whenNothing madmin $ void $ createAdmin strength login pass email -- | Apply patches for user
253
ensureAdmin strength login pass email = do madmin <- getFirstUserByPerm adminPerm whenNothing madmin $ void $ createAdmin strength login pass email -- | Apply patches for user
180
true
true
0
11
66
84
40
44
null
null
wavewave/xournal-render
src/Graphics/Xournal/Render/BBoxMapPDF.hs
bsd-2-clause
tlayerBBoxFromTLayerBBoxBuf :: TLayerBBoxBuf a -> TLayerBBox tlayerBBoxFromTLayerBBoxBuf (GLayerBuf _ strs) = GLayer strs
121
tlayerBBoxFromTLayerBBoxBuf :: TLayerBBoxBuf a -> TLayerBBox tlayerBBoxFromTLayerBBoxBuf (GLayerBuf _ strs) = GLayer strs
121
tlayerBBoxFromTLayerBBoxBuf (GLayerBuf _ strs) = GLayer strs
60
false
true
0
7
12
32
15
17
null
null
thomie/cabal
cabal-install/tests/UnitTests/Distribution/Client/Sandbox/Timestamp.hs
bsd-3-clause
timestampRecord :: [TimestampFileRecord] timestampRecord = [("i386-linux-ghc-8.0.0.20160204",[("/foo/bar/Baz",ModTime 1455350946)]) ,("i386-linux-ghc-7.10.3",[("/foo/bar/Baz",ModTime 1455484719)])]
201
timestampRecord :: [TimestampFileRecord] timestampRecord = [("i386-linux-ghc-8.0.0.20160204",[("/foo/bar/Baz",ModTime 1455350946)]) ,("i386-linux-ghc-7.10.3",[("/foo/bar/Baz",ModTime 1455484719)])]
201
timestampRecord = [("i386-linux-ghc-8.0.0.20160204",[("/foo/bar/Baz",ModTime 1455350946)]) ,("i386-linux-ghc-7.10.3",[("/foo/bar/Baz",ModTime 1455484719)])]
160
false
true
0
10
12
63
35
28
null
null
elizabrock/Hapless-Path
HAppS/src/ExecuteQuery.hs
mit
elemsNamed :: String -> [XMLElement] -> [XMLElement] --elemsNamed name elems = elems elemsNamed name [] = []
110
elemsNamed :: String -> [XMLElement] -> [XMLElement] elemsNamed name [] = []
76
elemsNamed name [] = []
23
true
true
0
7
18
35
19
16
null
null
capn-freako/lambda-ccc
src/LambdaCCC/Unused/CoreEncode.hs
bsd-3-clause
castIntoTyLamR :: ReExpr castIntoTyLamR = do Lam a e `Cast` ForAllCo a' co <- id let e' | a == a' = e | otherwise = subst [(a, Var a')] e return $ Lam a' (e' `mkCast` co) -- | u v `cast` co ==> (u `cast` (refl -> co)) v
255
castIntoTyLamR :: ReExpr castIntoTyLamR = do Lam a e `Cast` ForAllCo a' co <- id let e' | a == a' = e | otherwise = subst [(a, Var a')] e return $ Lam a' (e' `mkCast` co) -- | u v `cast` co ==> (u `cast` (refl -> co)) v
255
castIntoTyLamR = do Lam a e `Cast` ForAllCo a' co <- id let e' | a == a' = e | otherwise = subst [(a, Var a')] e return $ Lam a' (e' `mkCast` co) -- | u v `cast` co ==> (u `cast` (refl -> co)) v
230
false
true
0
14
86
101
50
51
null
null
headprogrammingczar/cabal
cabal-install/Distribution/Solver/Modular.hs
bsd-3-clause
-- | Ties the two worlds together: classic cabal-install vs. the modular -- solver. Performs the necessary translations before and after. modularResolver :: SolverConfig -> DependencyResolver loc modularResolver sc (Platform arch os) cinfo iidx sidx pkgConfigDB pprefs pcs pns = fmap (uncurry postprocess) $ -- co...
1,323
modularResolver :: SolverConfig -> DependencyResolver loc modularResolver sc (Platform arch os) cinfo iidx sidx pkgConfigDB pprefs pcs pns = fmap (uncurry postprocess) $ -- convert install plan logToProgress (maxBackjumps sc) $ -- convert log format into progress format solve sc cinfo idx pkgConfigDB pprefs ...
1,185
modularResolver sc (Platform arch os) cinfo iidx sidx pkgConfigDB pprefs pcs pns = fmap (uncurry postprocess) $ -- convert install plan logToProgress (maxBackjumps sc) $ -- convert log format into progress format solve sc cinfo idx pkgConfigDB pprefs gcs pns where -- Indices have to be converted in...
1,127
true
true
0
11
316
292
150
142
null
null
siddhanathan/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
gHC_NUM = mkBaseModule (fsLit "GHC.Num")
48
gHC_NUM = mkBaseModule (fsLit "GHC.Num")
48
gHC_NUM = mkBaseModule (fsLit "GHC.Num")
48
false
false
0
7
12
15
7
8
null
null
juhp/stack
src/Stack/Dot.hs
bsd-3-clause
-- | @pruneGraph dontPrune toPrune graph@ prunes all packages in -- @graph@ with a name in @toPrune@ and removes resulting orphans -- unless they are in @dontPrune@ pruneGraph :: (F.Foldable f, F.Foldable g, Eq a) => f PackageName -> g PackageName -> Map PackageName (Set PackageName, a)...
720
pruneGraph :: (F.Foldable f, F.Foldable g, Eq a) => f PackageName -> g PackageName -> Map PackageName (Set PackageName, a) -> Map PackageName (Set PackageName, a) pruneGraph dontPrune names = pruneUnreachable dontPrune . Map.mapMaybeWithKey (\pkg (pkgDeps,x) -> if pkg `...
555
pruneGraph dontPrune names = pruneUnreachable dontPrune . Map.mapMaybeWithKey (\pkg (pkgDeps,x) -> if pkg `F.elem` names then Nothing else let filtered = Set.filter (\n -> n `F.notElem` names) pkgDeps in if Set.null filtered && not (Set.null pkgDeps) then Nothing ...
348
true
true
0
17
198
205
108
97
null
null
yasukun/make-ac-dict-ghc
src/Lib.hs
mit
parseURL :: URL -> IO (Maybe [Library]) parseURL url = scrapeURL url targets
76
parseURL :: URL -> IO (Maybe [Library]) parseURL url = scrapeURL url targets
76
parseURL url = scrapeURL url targets
36
false
true
0
9
12
35
17
18
null
null
brendanhay/gogol
gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs
mpl-2.0
-- | Link to previous page for this Analytics data query. mdPreviousLink :: Lens' McfData (Maybe Text) mdPreviousLink = lens _mdPreviousLink (\ s a -> s{_mdPreviousLink = a})
182
mdPreviousLink :: Lens' McfData (Maybe Text) mdPreviousLink = lens _mdPreviousLink (\ s a -> s{_mdPreviousLink = a})
124
mdPreviousLink = lens _mdPreviousLink (\ s a -> s{_mdPreviousLink = a})
79
true
true
0
9
35
48
25
23
null
null
mavenraven/chronic-haskell
src/Parsing/Chronic.hs
bsd-3-clause
endianPrecedence x o = o {_endianPrecedence = x}
48
endianPrecedence x o = o {_endianPrecedence = x}
48
endianPrecedence x o = o {_endianPrecedence = x}
48
false
false
0
6
7
19
10
9
null
null
urv/fixhs
src/Data/FIX/Spec/FIX43.hs
lgpl-2.1
tLegalConfirm :: FIXTag tLegalConfirm = FIXTag { tName = "LegalConfirm" , tnum = 650 , tparser = toFIXBool , arbitraryValue = FIXBool <$> arbitrary }
162
tLegalConfirm :: FIXTag tLegalConfirm = FIXTag { tName = "LegalConfirm" , tnum = 650 , tparser = toFIXBool , arbitraryValue = FIXBool <$> arbitrary }
162
tLegalConfirm = FIXTag { tName = "LegalConfirm" , tnum = 650 , tparser = toFIXBool , arbitraryValue = FIXBool <$> arbitrary }
138
false
true
0
8
37
45
26
19
null
null
rvion/lamdu
Lamdu/GUI/WidgetIds.hs
gpl-3.0
backgroundCursorId :: AnimId backgroundCursorId = ["background cursor"]
71
backgroundCursorId :: AnimId backgroundCursorId = ["background cursor"]
71
backgroundCursorId = ["background cursor"]
42
false
true
0
5
6
14
8
6
null
null
tpsinnem/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v (LExternal eqp) [x, y] | eqp == sUN "prim__eqPtr" = v ++ "MKINT((i_int)(GETPTR(" ++ creg x ++ ") == GETPTR(" ++ creg y ++ ")))"
138
doOp v (LExternal eqp) [x, y] | eqp == sUN "prim__eqPtr" = v ++ "MKINT((i_int)(GETPTR(" ++ creg x ++ ") == GETPTR(" ++ creg y ++ ")))"
138
doOp v (LExternal eqp) [x, y] | eqp == sUN "prim__eqPtr" = v ++ "MKINT((i_int)(GETPTR(" ++ creg x ++ ") == GETPTR(" ++ creg y ++ ")))"
138
false
false
2
9
30
69
30
39
null
null
masaedw/evolution-hs
src/Evolution/Gene.hs
bsd-3-clause
delta Southwest = (-1, 1)
26
delta Southwest = (-1, 1)
26
delta Southwest = (-1, 1)
26
false
false
0
6
5
17
9
8
null
null
wfleming/advent-of-code-2016
2016/src/D17Lib.hs
bsd-3-clause
unlocked :: Vault -> Direction -> Bool unlocked Vault { seed = s, path = p } d = doorChar d `elem` openChars where hash = md5 (s ++ p) openChars = ['b'..'f'] doorChar U = hash !! 0 doorChar D = hash !! 1 doorChar L = hash !! 2 doorChar R = hash !! 3
275
unlocked :: Vault -> Direction -> Bool unlocked Vault { seed = s, path = p } d = doorChar d `elem` openChars where hash = md5 (s ++ p) openChars = ['b'..'f'] doorChar U = hash !! 0 doorChar D = hash !! 1 doorChar L = hash !! 2 doorChar R = hash !! 3
275
unlocked Vault { seed = s, path = p } d = doorChar d `elem` openChars where hash = md5 (s ++ p) openChars = ['b'..'f'] doorChar U = hash !! 0 doorChar D = hash !! 1 doorChar L = hash !! 2 doorChar R = hash !! 3
236
false
true
5
11
82
129
65
64
null
null