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
tsiliakis/xmobar
src/Plugins/Monitors/Disk.hs
bsd-3-clause
devTemplates :: [(String, String)] -> [(DevName, Path)] -> [(DevName, [Float])] -> [(String, [Float])] devTemplates disks mounted dat = map (\(d, p) -> (findTempl d p disks, findData d)) mounted where findData dev = case find ((==dev) . fst) dat of ...
390
devTemplates :: [(String, String)] -> [(DevName, Path)] -> [(DevName, [Float])] -> [(String, [Float])] devTemplates disks mounted dat = map (\(d, p) -> (findTempl d p disks, findData d)) mounted where findData dev = case find ((==dev) . fst) dat of ...
390
devTemplates disks mounted dat = map (\(d, p) -> (findTempl d p disks, findData d)) mounted where findData dev = case find ((==dev) . fst) dat of Nothing -> [0, 0, 0] Just (_, xs) -> xs
239
false
true
0
10
151
168
95
73
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 620517 = 1923
33
getValueFromProduct 620517 = 1923
33
getValueFromProduct 620517 = 1923
33
false
false
0
5
3
9
4
5
null
null
brendanhay/gogol
gogol-bigquery/gen/Network/Google/Resource/BigQuery/RowAccessPolicies/List.hs
mpl-2.0
-- | The maximum number of results to return in a single response page. -- Leverage the page tokens to iterate through the entire collection. raplPageSize :: Lens' RowAccessPoliciesList (Maybe Int32) raplPageSize = lens _raplPageSize (\ s a -> s{_raplPageSize = a}) . mapping _Coerce
291
raplPageSize :: Lens' RowAccessPoliciesList (Maybe Int32) raplPageSize = lens _raplPageSize (\ s a -> s{_raplPageSize = a}) . mapping _Coerce
149
raplPageSize = lens _raplPageSize (\ s a -> s{_raplPageSize = a}) . mapping _Coerce
91
true
true
0
10
52
56
29
27
null
null
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/RegionBackendServices/Get.hs
mpl-2.0
-- | Creates a value of 'RegionBackendServicesGet' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'rbsgProject' -- -- * 'rbsgRegion' -- -- * 'rbsgBackendService' regionBackendServicesGet :: Text -- ^ 'rbsgProject' -> Text -- ^...
629
regionBackendServicesGet :: Text -- ^ 'rbsgProject' -> Text -- ^ 'rbsgRegion' -> Text -- ^ 'rbsgBackendService' -> RegionBackendServicesGet regionBackendServicesGet pRbsgProject_ pRbsgRegion_ pRbsgBackendService_ = RegionBackendServicesGet' { _rbsgProject = pRbsgProject_ , _rbsgRegion = pRbsgR...
381
regionBackendServicesGet pRbsgProject_ pRbsgRegion_ pRbsgBackendService_ = RegionBackendServicesGet' { _rbsgProject = pRbsgProject_ , _rbsgRegion = pRbsgRegion_ , _rbsgBackendService = pRbsgBackendService_ }
225
true
true
0
7
112
62
40
22
null
null
fibsifan/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
rawHtmlInline :: MarkdownParser (F Inlines) rawHtmlInline = do guardEnabled Ext_raw_html inHtmlBlock <- stateInHtmlBlock <$> getState let isCloseBlockTag t = case inHtmlBlock of Just t' -> t ~== TagClose t' Nothing -> False mdInHtml <- option False $...
740
rawHtmlInline :: MarkdownParser (F Inlines) rawHtmlInline = do guardEnabled Ext_raw_html inHtmlBlock <- stateInHtmlBlock <$> getState let isCloseBlockTag t = case inHtmlBlock of Just t' -> t ~== TagClose t' Nothing -> False mdInHtml <- option False $...
740
rawHtmlInline = do guardEnabled Ext_raw_html inHtmlBlock <- stateInHtmlBlock <$> getState let isCloseBlockTag t = case inHtmlBlock of Just t' -> t ~== TagClose t' Nothing -> False mdInHtml <- option False $ ( guardEnabled Ext_markd...
696
false
true
1
16
300
185
86
99
null
null
quchen/HaskellEuler
src/CommonFunctions.hs
bsd-3-clause
-- | Binomial coefficient. Error for n or k < 0, and for n < k. choose :: (Integral a) => a -> a -> a choose n !k | n < k = error "choose n k with n < k" | n < 0 = error "choose n k with n < 0" | k < 0 = error "choose n k with k < 0" | k == 0 = 1 | n == 0 = 0 | n - ...
402
choose :: (Integral a) => a -> a -> a choose n !k | n < k = error "choose n k with n < k" | n < 0 = error "choose n k with n < 0" | k < 0 = error "choose n k with k < 0" | k == 0 = 1 | n == 0 = 0 | n - k < k = choose n (n - k) | otherwise = (n - k + 1) * choos...
338
choose n !k | n < k = error "choose n k with n < k" | n < 0 = error "choose n k with n < 0" | k < 0 = error "choose n k with k < 0" | k == 0 = 1 | n == 0 = 0 | n - k < k = choose n (n - k) | otherwise = (n - k + 1) * choose n (k-1) `quot` k
300
true
true
0
10
165
177
85
92
null
null
ghcjs/ghcjs
test/ghc/th/tH_unresolvedInfix.hs
mit
-------------- Parens _t13 = (1 `Plus` (1 `Times` 1)) `Plus` (1 `Times` 1) :: $( ((parensT ((int $+? int) $*? int)) $+? int) $*? int )
134
_t13 = (1 `Plus` (1 `Times` 1)) `Plus` (1 `Times` 1) :: $( ((parensT ((int $+? int) $*? int)) $+? int) $*? int )
112
_t13 = (1 `Plus` (1 `Times` 1)) `Plus` (1 `Times` 1) :: $( ((parensT ((int $+? int) $*? int)) $+? int) $*? int )
112
true
false
0
15
25
78
47
31
null
null
et4te/zero
src-shared/Zero/Authentication/Internal.hs
bsd-3-clause
defaultAuthFinishResult = AuthFinishSuccess "<m2-hex>" "<bundle-hex>"
71
defaultAuthFinishResult = AuthFinishSuccess "<m2-hex>" "<bundle-hex>"
71
defaultAuthFinishResult = AuthFinishSuccess "<m2-hex>" "<bundle-hex>"
71
false
false
0
5
6
12
5
7
null
null
bno1/adventofcode_2016
d09/main.hs
mit
-- drops n characters from the state string ssDrop :: Int -> State String () ssDrop n = modify (drop n)
103
ssDrop :: Int -> State String () ssDrop n = modify (drop n)
59
ssDrop n = modify (drop n)
26
true
true
0
7
20
35
17
18
null
null
bitemyapp/ghc
compiler/cmm/CmmNode.hs
bsd-3-clause
wrapRecExpM f e = f e
40
wrapRecExpM f e = f e
40
wrapRecExpM f e = f e
40
false
false
0
5
24
14
6
8
null
null
timjb/protocol-buffers
hprotoc/Text/ProtocolBuffers/ProtoCompile/Gen.hs
apache-2.0
defun :: String -> [Pat] -> Exp -> Decl defun s p r = FunBind [match s p r]
76
defun :: String -> [Pat] -> Exp -> Decl defun s p r = FunBind [match s p r]
76
defun s p r = FunBind [match s p r]
36
false
true
0
9
19
51
24
27
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeGroups/Update.hs
mpl-2.0
-- | V1 error format. cguXgafv :: Lens' CreativeGroupsUpdate (Maybe Xgafv) cguXgafv = lens _cguXgafv (\ s a -> s{_cguXgafv = a})
128
cguXgafv :: Lens' CreativeGroupsUpdate (Maybe Xgafv) cguXgafv = lens _cguXgafv (\ s a -> s{_cguXgafv = a})
106
cguXgafv = lens _cguXgafv (\ s a -> s{_cguXgafv = a})
53
true
true
0
9
21
46
25
21
null
null
keera-studios/hsQt
Qtc/Gui/QTextFormat.hs
bsd-2-clause
isCharFormat :: QTextFormat a -> (()) -> IO (Bool) isCharFormat x0 () = withBoolResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QTextFormat_isCharFormat cobj_x0
166
isCharFormat :: QTextFormat a -> (()) -> IO (Bool) isCharFormat x0 () = withBoolResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QTextFormat_isCharFormat cobj_x0
166
isCharFormat x0 () = withBoolResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QTextFormat_isCharFormat cobj_x0
115
false
true
4
9
31
66
30
36
null
null
alpha22jp/simplenote.hs
Simplenote.hs
mit
deleteNote :: String -> SimplenoteManager () deleteNote nKey = do (mgr, email, token) <- ask let params = [("email", email), ("auth", token)] req <- liftIO $ defaultRequest ("api2/data/" ++ nKey) "DELETE" params res <- lift . safeAction $ httpLbs req mgr lift $ checkStatusCode res "Update note status error: "...
338
deleteNote :: String -> SimplenoteManager () deleteNote nKey = do (mgr, email, token) <- ask let params = [("email", email), ("auth", token)] req <- liftIO $ defaultRequest ("api2/data/" ++ nKey) "DELETE" params res <- lift . safeAction $ httpLbs req mgr lift $ checkStatusCode res "Update note status error: "...
338
deleteNote nKey = do (mgr, email, token) <- ask let params = [("email", email), ("auth", token)] req <- liftIO $ defaultRequest ("api2/data/" ++ nKey) "DELETE" params res <- lift . safeAction $ httpLbs req mgr lift $ checkStatusCode res "Update note status error: " (\_ -> return ())
293
false
true
0
12
63
138
70
68
null
null
tekul/cryptonite
Crypto/MAC/Poly1305.hs
bsd-3-clause
- | initialize a Poly1305 context initialize :: ByteArrayAccess key => key -> CryptoFailable State initialize key | B.length key /= 32 = CryptoFailed $ CryptoError_MacKeyInvalid | otherwise = CryptoPassed $ State $ B.allocAndFreeze 84 $ \ctxPtr -> B.withByteArray key $ \ke...
380
initialize :: ByteArrayAccess key => key -> CryptoFailable State initialize key | B.length key /= 32 = CryptoFailed $ CryptoError_MacKeyInvalid | otherwise = CryptoPassed $ State $ B.allocAndFreeze 84 $ \ctxPtr -> B.withByteArray key $ \keyPtr -> c_poly1305_ini...
345
initialize key | B.length key /= 32 = CryptoFailed $ CryptoError_MacKeyInvalid | otherwise = CryptoPassed $ State $ B.allocAndFreeze 84 $ \ctxPtr -> B.withByteArray key $ \keyPtr -> c_poly1305_init (castPtr ctxPtr) keyPtr
258
true
true
3
11
106
112
53
59
null
null
coddinkn/sns
app/Main.hs
bsd-3-clause
main :: IO () main = do pwd <- getCurrentDirectory images <- load_tiles pwd play (InWindow "Skeletons 'n Stuff" (1280, 1024) (10, 10)) black 10 (World 0 [] images "Skeletons 'n Stuff!") render_world handle_input step_world
270
main :: IO () main = do pwd <- getCurrentDirectory images <- load_tiles pwd play (InWindow "Skeletons 'n Stuff" (1280, 1024) (10, 10)) black 10 (World 0 [] images "Skeletons 'n Stuff!") render_world handle_input step_world
270
main = do pwd <- getCurrentDirectory images <- load_tiles pwd play (InWindow "Skeletons 'n Stuff" (1280, 1024) (10, 10)) black 10 (World 0 [] images "Skeletons 'n Stuff!") render_world handle_input step_world
256
false
true
0
11
82
93
44
49
null
null
armoredsoftware/protocol
tpm/mainline/src/TPM/Digest.hs
bsd-3-clause
------------------------------------------------------------------------------- -- Create a new nonce value by using cryptographically ------------------------------------------------------------------------------- tpm_digest_random :: IO TPM_DIGEST tpm_digest_random = SSL.randBytes 20 >>= return . TPM_DIGEST . (\c->fr...
333
tpm_digest_random :: IO TPM_DIGEST tpm_digest_random = SSL.randBytes 20 >>= return . TPM_DIGEST . (\c->fromChunks [c])
118
tpm_digest_random = SSL.randBytes 20 >>= return . TPM_DIGEST . (\c->fromChunks [c])
83
true
true
0
9
25
48
26
22
null
null
flipstone/orville
orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/Insert.hs
mit
insertToInsertExpr (InsertReturning _ expr) = expr
50
insertToInsertExpr (InsertReturning _ expr) = expr
50
insertToInsertExpr (InsertReturning _ expr) = expr
50
false
false
0
6
5
18
8
10
null
null
patrikja/LearningHaskellDataAnalysis
LearnHaskDA/Chapter5.hs
bsd-3-clause
-- almost equal would be enough sanitycheck :: Bool sanitycheck = 1 == sum (map (\k -> probabilityMassFunction k 1000 0.5) [0..1000])
133
sanitycheck :: Bool sanitycheck = 1 == sum (map (\k -> probabilityMassFunction k 1000 0.5) [0..1000])
101
sanitycheck = 1 == sum (map (\k -> probabilityMassFunction k 1000 0.5) [0..1000])
81
true
true
0
11
21
47
25
22
null
null
brendanhay/gogol
gogol-videointelligence/gen/Network/Google/VideoIntelligence/Types/Product.hs
mpl-2.0
-- | Creates a value of 'GoogleLongrunning_OperationResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'glorAddtional' googleLongrunning_OperationResponse :: HashMap Text JSONValue -- ^ 'glorAddtional' -> GoogleLongrunni...
482
googleLongrunning_OperationResponse :: HashMap Text JSONValue -- ^ 'glorAddtional' -> GoogleLongrunning_OperationResponse googleLongrunning_OperationResponse pGlorAddtional_ = GoogleLongrunning_OperationResponse' {_glorAddtional = _Coerce # pGlorAddtional_}
271
googleLongrunning_OperationResponse pGlorAddtional_ = GoogleLongrunning_OperationResponse' {_glorAddtional = _Coerce # pGlorAddtional_}
141
true
true
0
7
66
41
24
17
null
null
bitemyapp/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
-- | Fake array constructors -- -- * These constructors are never really used to represent array values; -- however, they are very convenient during desugaring (and, in particular, -- in the pattern matching compiler) to treat array pattern just like -- yet another constructor pattern -- parrFakeCon ...
404
parrFakeCon :: Arity -> DataCon parrFakeCon i | i > mAX_TUPLE_SIZE = mkPArrFakeCon i
109
parrFakeCon i | i > mAX_TUPLE_SIZE = mkPArrFakeCon i
54
true
true
0
8
91
38
21
17
null
null
ganeti/ganeti
src/Ganeti/HTools/Node.hs
bsd-2-clause
-- | Changes the index. -- -- This is used only during the building of the data structures. setIdx :: Node -> T.Ndx -> Node setIdx t i = t {idx = i}
148
setIdx :: Node -> T.Ndx -> Node setIdx t i = t {idx = i}
56
setIdx t i = t {idx = i}
24
true
true
0
7
32
37
21
16
null
null
ganeti/htools
Ganeti/HTools/Loader.hs
gpl-2.0
-- | Checks the cluster data for consistency. checkData :: Node.List -> Instance.List -> ([String], Node.List) checkData nl il = Container.mapAccum (\ msgs node -> let nname = Node.name node nilst = map (`Container.find` il) (Node.pList node) dilst = ...
1,239
checkData :: Node.List -> Instance.List -> ([String], Node.List) checkData nl il = Container.mapAccum (\ msgs node -> let nname = Node.name node nilst = map (`Container.find` il) (Node.pList node) dilst = filter (not . Instance.running) nilst ...
1,193
checkData nl il = Container.mapAccum (\ msgs node -> let nname = Node.name node nilst = map (`Container.find` il) (Node.pList node) dilst = filter (not . Instance.running) nilst adj_mem = sum . map Instance.mem $ dilst delta_me...
1,118
true
true
0
19
598
313
162
151
null
null
randen/haddock
haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
bsd-2-clause
ppr_tylit (HsStrTy _ s) = toHtml (show s)
41
ppr_tylit (HsStrTy _ s) = toHtml (show s)
41
ppr_tylit (HsStrTy _ s) = toHtml (show s)
41
false
false
0
6
7
27
12
15
null
null
google/haskell-indexer
haskell-indexer-backend-ghc/tests/Language/Haskell/Indexer/Backend/Ghc/Test/TestHelper.hs
apache-2.0
analyse :: [String] -> [String] -> ReaderT TestEnv IO (NonEmpty XRef) analyse extraFiles relativeArgs = do dataDir <- asks testDataDirectory let convertToFullPath = mapM (makeFullPath dataDir) args <- liftIO $ convertToFullPath relativeArgs extraFullPaths <- fmap lefts . liftIO $ convertToFullPath extra...
754
analyse :: [String] -> [String] -> ReaderT TestEnv IO (NonEmpty XRef) analyse extraFiles relativeArgs = do dataDir <- asks testDataDirectory let convertToFullPath = mapM (makeFullPath dataDir) args <- liftIO $ convertToFullPath relativeArgs extraFullPaths <- fmap lefts . liftIO $ convertToFullPath extra...
754
analyse extraFiles relativeArgs = do dataDir <- asks testDataDirectory let convertToFullPath = mapM (makeFullPath dataDir) args <- liftIO $ convertToFullPath relativeArgs extraFullPaths <- fmap lefts . liftIO $ convertToFullPath extraFiles analyiseFullPath extraFullPaths args where makeFullPat...
684
false
true
0
12
172
204
93
111
null
null
urbanslug/ghc
libraries/template-haskell/Language/Haskell/TH/Lib.hs
bsd-3-clause
unboxedTupleT :: Int -> TypeQ unboxedTupleT i = return (UnboxedTupleT i)
72
unboxedTupleT :: Int -> TypeQ unboxedTupleT i = return (UnboxedTupleT i)
72
unboxedTupleT i = return (UnboxedTupleT i)
42
false
true
0
7
10
27
13
14
null
null
bitemyapp/located-base
src/Data/List/Located.hs
bsd-3-clause
minimum :: (?callStack :: CallStack, Ord a) => [a] -> a minimum [] = L.error "Prelude.minimum: empty list"
106
minimum :: (?callStack :: CallStack, Ord a) => [a] -> a minimum [] = L.error "Prelude.minimum: empty list"
106
minimum [] = L.error "Prelude.minimum: empty list"
50
false
true
0
7
17
43
23
20
null
null
haskell-infra/hackage-server
tests/HackageClientUtils.hs
bsd-3-clause
find :: FilePath -> (FilePath -> Bool) -> IO [FilePath] find dir p = (map (dir </>) . filter p) `liftM` getDirectoryContents dir
128
find :: FilePath -> (FilePath -> Bool) -> IO [FilePath] find dir p = (map (dir </>) . filter p) `liftM` getDirectoryContents dir
128
find dir p = (map (dir </>) . filter p) `liftM` getDirectoryContents dir
72
false
true
0
9
22
63
33
30
null
null
sonyandy/fd
benchmarks/sudoku.hs
bsd-3-clause
solve :: [Term s] -> FDT s m [Int] solve xs = do forM_ xs $ \ x -> do x #>= 1 x #<= 9 mapM_ distinct $ rows xs mapM_ distinct $ columns xs mapM_ distinct $ boxes xs forM xs label
196
solve :: [Term s] -> FDT s m [Int] solve xs = do forM_ xs $ \ x -> do x #>= 1 x #<= 9 mapM_ distinct $ rows xs mapM_ distinct $ columns xs mapM_ distinct $ boxes xs forM xs label
196
solve xs = do forM_ xs $ \ x -> do x #>= 1 x #<= 9 mapM_ distinct $ rows xs mapM_ distinct $ columns xs mapM_ distinct $ boxes xs forM xs label
161
false
true
0
11
61
110
48
62
null
null
ndmitchell/extra
src/Data/List/Extra.hs
bsd-3-clause
-- | Like 'merge', but with a custom ordering function. mergeBy :: (a -> a -> Ordering) -> [a] -> [a] -> [a] mergeBy f xs [] = xs
129
mergeBy :: (a -> a -> Ordering) -> [a] -> [a] -> [a] mergeBy f xs [] = xs
73
mergeBy f xs [] = xs
20
true
true
0
10
28
59
30
29
null
null
peteg/ADHOC
Tests/08_Kesterel/143a_nondet_exn.hs
gpl-2.0
nextBitP = "next bit"
21
nextBitP = "next bit"
21
nextBitP = "next bit"
21
false
false
0
4
3
6
3
3
null
null
bkoropoff/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
bcc i (SLIDE n) = indent i ++ "SLIDE(vm, " ++ show n ++ ");\n"
62
bcc i (SLIDE n) = indent i ++ "SLIDE(vm, " ++ show n ++ ");\n"
62
bcc i (SLIDE n) = indent i ++ "SLIDE(vm, " ++ show n ++ ");\n"
62
false
false
0
8
14
37
16
21
null
null
ohua-dev/ohua-core
tests/src/TailRecSpec.hs
epl-1.0
-- (Let "a" -- (Lambda -- "i" -- (Let "p" -- (("math/minus" `Apply` "i") `Apply` 10) -- (Let "x" -- (("math/lt" `Apply` "p") `Apply` 0) -- (Let "c" -- (Apply -- ...
1,270
notTailRecursive2 :: Expression notTailRecursive2 = [embedALang| let a = ohua.lang/Y (\i -> let p = math/minus i 10 in let x = math/lt p 0 in let c = ohua.lang/ifThenElse x (\_1 -> p) (\_2 -> ohua.lang/recur p) in ...
392
notTailRecursive2 = [embedALang| let a = ohua.lang/Y (\i -> let p = math/minus i 10 in let x = math/lt p 0 in let c = ohua.lang/ifThenElse x (\_1 -> p) (\_2 -> ohua.lang/recur p) in math/times10 c) in let...
360
true
true
0
4
757
34
29
5
null
null
mrakgr/futhark
src/Futhark/CodeGen/ImpGen/Kernels.hs
bsd-3-clause
inKernelExpCompiler _ e = return $ ImpGen.CompileExp e
56
inKernelExpCompiler _ e = return $ ImpGen.CompileExp e
56
inKernelExpCompiler _ e = return $ ImpGen.CompileExp e
56
false
false
3
5
9
22
9
13
null
null
yiannist/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
oobPowerOff :: String oobPowerOff = Types.oobCommandToRaw OobPowerOff
69
oobPowerOff :: String oobPowerOff = Types.oobCommandToRaw OobPowerOff
69
oobPowerOff = Types.oobCommandToRaw OobPowerOff
47
false
true
0
6
6
16
8
8
null
null
ml9951/ghc
compiler/deSugar/DsArrows.hs
bsd-3-clause
dsCmd ids local_vars stack_ty res_ty (HsCmdLam (MG { mg_alts = [L _ (Match _ pats _ (GRHSs [L _ (GRHS [] body)] _ ))] })) env_ids = do let pat_vars = mkVarSet (collectPatsBinders pats) local_vars' = pat_vars `unionVarSet` local_vars (pat...
1,430
dsCmd ids local_vars stack_ty res_ty (HsCmdLam (MG { mg_alts = [L _ (Match _ pats _ (GRHSs [L _ (GRHS [] body)] _ ))] })) env_ids = do let pat_vars = mkVarSet (collectPatsBinders pats) local_vars' = pat_vars `unionVarSet` local_vars (pat...
1,430
dsCmd ids local_vars stack_ty res_ty (HsCmdLam (MG { mg_alts = [L _ (Match _ pats _ (GRHSs [L _ (GRHS [] body)] _ ))] })) env_ids = do let pat_vars = mkVarSet (collectPatsBinders pats) local_vars' = pat_vars `unionVarSet` local_vars (pat...
1,430
false
false
0
22
362
327
163
164
null
null
enolan/cabal
cabal-install/Main.hs
bsd-3-clause
getAction :: GetFlags -> [String] -> Action getAction getFlags extraArgs globalFlags = do let verbosity = fromFlag (getVerbosity getFlags) targets <- readUserTargets verbosity extraArgs (_useSandbox, config) <- loadConfigOrSandboxConfig verbosity (globalFlags { globalRequireSandbox = Fl...
500
getAction :: GetFlags -> [String] -> Action getAction getFlags extraArgs globalFlags = do let verbosity = fromFlag (getVerbosity getFlags) targets <- readUserTargets verbosity extraArgs (_useSandbox, config) <- loadConfigOrSandboxConfig verbosity (globalFlags { globalRequireSandbox = Fl...
500
getAction getFlags extraArgs globalFlags = do let verbosity = fromFlag (getVerbosity getFlags) targets <- readUserTargets verbosity extraArgs (_useSandbox, config) <- loadConfigOrSandboxConfig verbosity (globalFlags { globalRequireSandbox = Flag False }) let globalFlags' = savedGlobal...
456
false
true
0
13
103
141
67
74
null
null
rfranek/duckling
Duckling/Time/PL/Rules.hs
bsd-3-clause
ruleHourofdayIntegerAsRelativeMinutes :: Rule ruleHourofdayIntegerAsRelativeMinutes = Rule { name = "<hour-of-day> <integer> (as relative minutes)" , pattern = [ Predicate isAnHourOfDay , Predicate $ isIntegerBetween 1 59 ] , prod = \tokens -> case tokens of (Token Time TimeData {TTime.form = Ju...
478
ruleHourofdayIntegerAsRelativeMinutes :: Rule ruleHourofdayIntegerAsRelativeMinutes = Rule { name = "<hour-of-day> <integer> (as relative minutes)" , pattern = [ Predicate isAnHourOfDay , Predicate $ isIntegerBetween 1 59 ] , prod = \tokens -> case tokens of (Token Time TimeData {TTime.form = Ju...
478
ruleHourofdayIntegerAsRelativeMinutes = Rule { name = "<hour-of-day> <integer> (as relative minutes)" , pattern = [ Predicate isAnHourOfDay , Predicate $ isIntegerBetween 1 59 ] , prod = \tokens -> case tokens of (Token Time TimeData {TTime.form = Just (TTime.TimeOfDay (Just hours) _)}: t...
432
false
true
0
22
124
144
73
71
null
null
PseudoPower/AFSM
draft/demo.hs
mit
colors = [red, green, blue]
27
colors = [red, green, blue]
27
colors = [red, green, blue]
27
false
false
0
5
4
15
9
6
null
null
ihc/futhark
src/Futhark/Optimise/MemoryBlockMerging/MemoryAliases.hs
isc
coerce :: (ExplicitMemorish flore, ExplicitMemorish tlore) => FindM flore a -> FindM tlore a coerce = FindM . unFindM
127
coerce :: (ExplicitMemorish flore, ExplicitMemorish tlore) => FindM flore a -> FindM tlore a coerce = FindM . unFindM
127
coerce = FindM . unFindM
24
false
true
1
8
28
51
23
28
null
null
kim/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types.hs
mpl-2.0
-- | 'InternetGateway' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'igAttachments' @::@ ['InternetGatewayAttachment'] -- -- * 'igInternetGatewayId' @::@ 'Text' -- -- * 'igTags' @::@ ['Tag'] -- internetGateway :: Text -- ^ 'igInternetGatewayId' -> InternetGateway in...
464
internetGateway :: Text -- ^ 'igInternetGatewayId' -> InternetGateway internetGateway p1 = InternetGateway { _igInternetGatewayId = p1 , _igAttachments = mempty , _igTags = mempty }
232
internetGateway p1 = InternetGateway { _igInternetGatewayId = p1 , _igAttachments = mempty , _igTags = mempty }
146
true
true
0
7
107
58
35
23
null
null
ganeti-github-testing/ganeti-test-1
src/Ganeti/OpParams.hs
bsd-2-clause
pDiskChgAmount :: Field pDiskChgAmount = withDoc "Disk amount to add or grow to" . renameField "DiskChgAmount" $ simpleField "amount" [t| NonNegative Int |]
160
pDiskChgAmount :: Field pDiskChgAmount = withDoc "Disk amount to add or grow to" . renameField "DiskChgAmount" $ simpleField "amount" [t| NonNegative Int |]
160
pDiskChgAmount = withDoc "Disk amount to add or grow to" . renameField "DiskChgAmount" $ simpleField "amount" [t| NonNegative Int |]
136
false
true
0
6
26
40
19
21
null
null
AlexanderPankiv/ghc
compiler/main/HscTypes.hs
bsd-3-clause
tyThingParent_maybe (ATyCon tc) = case tyConAssoc_maybe tc of Just cls -> Just (ATyCon (classTyCon cls)) Nothing -> Nothing
202
tyThingParent_maybe (ATyCon tc) = case tyConAssoc_maybe tc of Just cls -> Just (ATyCon (classTyCon cls)) Nothing -> Nothing
202
tyThingParent_maybe (ATyCon tc) = case tyConAssoc_maybe tc of Just cls -> Just (ATyCon (classTyCon cls)) Nothing -> Nothing
202
false
false
0
12
96
52
24
28
null
null
kumasento/accelerate-cuda
Data/Array/Accelerate/CUDA/CodeGen/PrefixSum.hs
bsd-3-clause
-- Wrappers -- -------- mkScanl, mkScanr :: Elt e => DeviceProperties -> Gamma aenv -> CUFun2 aenv (e -> e -> e) -> CUExp aenv e -> CUDelayedAcc aenv DIM1 e -> [CUTranslSkel aenv (Vector e)] mkScanl dev aenv f z a = [ mkScan L dev aenv f (Just z) a , mkScanUp1 L dev aenv f a , mkSc...
349
mkScanl, mkScanr :: Elt e => DeviceProperties -> Gamma aenv -> CUFun2 aenv (e -> e -> e) -> CUExp aenv e -> CUDelayedAcc aenv DIM1 e -> [CUTranslSkel aenv (Vector e)] mkScanl dev aenv f z a = [ mkScan L dev aenv f (Just z) a , mkScanUp1 L dev aenv f a , mkScanUp2 L dev aenv f (Just ...
324
mkScanl dev aenv f z a = [ mkScan L dev aenv f (Just z) a , mkScanUp1 L dev aenv f a , mkScanUp2 L dev aenv f (Just z) ]
129
true
true
0
14
105
154
77
77
null
null
bramgg/99haskell
Script.hs
mit
aceValue :: Ace -> Fay String aceValue = ffi "%1.getSession().getValue()"
73
aceValue :: Ace -> Fay String aceValue = ffi "%1.getSession().getValue()"
73
aceValue = ffi "%1.getSession().getValue()"
43
false
true
0
6
9
21
10
11
null
null
SRechenberger/grammata
src/Grammata/Interpreter/Compilation.hs
gpl-3.0
compileBinaryOperator "!=" = return $ \ops -> case ops of [a,b] -> M.Boolean <$> a =/= b others -> fail $ "ERROR " ++ show others ++ " are no valid operands for '!='."
187
compileBinaryOperator "!=" = return $ \ops -> case ops of [a,b] -> M.Boolean <$> a =/= b others -> fail $ "ERROR " ++ show others ++ " are no valid operands for '!='."
187
compileBinaryOperator "!=" = return $ \ops -> case ops of [a,b] -> M.Boolean <$> a =/= b others -> fail $ "ERROR " ++ show others ++ " are no valid operands for '!='."
187
false
false
0
12
53
65
33
32
null
null
meiersi/scyther-proof
src/Scyther/Facts.hs
gpl-3.0
-- | Delete an event order fact. deleteEvOrd :: Cert (Event, Event) -> Facts -> Facts deleteEvOrd ord prems = prems { eventOrd = S.delete (certified ord) (eventOrd prems) }
174
deleteEvOrd :: Cert (Event, Event) -> Facts -> Facts deleteEvOrd ord prems = prems { eventOrd = S.delete (certified ord) (eventOrd prems) }
141
deleteEvOrd ord prems = prems { eventOrd = S.delete (certified ord) (eventOrd prems) }
88
true
true
0
10
31
70
34
36
null
null
gik0geck0/CLikeHaskellCompiler
visitor.hs
mit
-- returns the next A. This is SAFE for empty children lists getNextAvailableA :: (a->a) -> [((Node,a), [(Node,a)])] -> a getNextAvailableA incA (lastEntry@(parentPair, childList):rest) = if length childList == 0 then incA $ snd parentPair else incA $ snd $ last childList
280
getNextAvailableA :: (a->a) -> [((Node,a), [(Node,a)])] -> a getNextAvailableA incA (lastEntry@(parentPair, childList):rest) = if length childList == 0 then incA $ snd parentPair else incA $ snd $ last childList
219
getNextAvailableA incA (lastEntry@(parentPair, childList):rest) = if length childList == 0 then incA $ snd parentPair else incA $ snd $ last childList
158
true
true
0
10
49
105
59
46
null
null
yaccz/git-yrp
tests/unit/main.hs
bsd-3-clause
succOrFail :: Result -> IO () succOrFail (Success _ _ _) = return ()
68
succOrFail :: Result -> IO () succOrFail (Success _ _ _) = return ()
68
succOrFail (Success _ _ _) = return ()
38
false
true
0
7
13
38
18
20
null
null
ezyang/ghc
testsuite/tests/gadt/nbe.hs
bsd-3-clause
-- evaluation ------------------------------------------------------------------ var :: Var g t -> g -> t var ZVar (_,t) = t
128
var :: Var g t -> g -> t var ZVar (_,t) = t
47
var ZVar (_,t) = t
22
true
true
0
9
20
42
20
22
null
null
izuk/elephant-pig
src/Main.hs
bsd-3-clause
downcase :: String -> String downcase = map toLower
51
downcase :: String -> String downcase = map toLower
51
downcase = map toLower
22
false
true
0
5
8
18
9
9
null
null
KHs000/haskellToys
src/modules/List.hs
mit
insertL :: (Ord a) => a -> List a -> List a insertL value Empty = singleton value
81
insertL :: (Ord a) => a -> List a -> List a insertL value Empty = singleton value
81
insertL value Empty = singleton value
37
false
true
0
8
17
42
20
22
null
null
dec9ue/jhc_copygc
src/Fixer/Fixer.hs
gpl-2.0
readRawValue :: (Fixable a,MonadIO m) => Value a -> m a readRawValue (IV v) = liftIO $ do readIORef (current v)
115
readRawValue :: (Fixable a,MonadIO m) => Value a -> m a readRawValue (IV v) = liftIO $ do readIORef (current v)
115
readRawValue (IV v) = liftIO $ do readIORef (current v)
59
false
true
0
10
24
65
30
35
null
null
GaloisInc/pads-haskell
Examples/First.hs
bsd-3-clause
input_digitListLenG = "123456"
30
input_digitListLenG = "123456"
30
input_digitListLenG = "123456"
30
false
false
0
4
2
6
3
3
null
null
tanishiking/hscc
src/Semantic.hs
mit
checkExternalDecl (FuncProt _ _ _ _) = return []
63
checkExternalDecl (FuncProt _ _ _ _) = return []
63
checkExternalDecl (FuncProt _ _ _ _) = return []
63
false
false
0
7
23
26
12
14
null
null
nrolland/react-flux
src/React/Flux/DOM.hs
bsd-3-clause
base_ :: Term eventHandler arg result => arg -> result; base_ = term "base"
75
base_ :: Term eventHandler arg result => arg -> result base_ = term "base"
74
base_ = term "base"
19
false
true
0
6
13
30
15
15
null
null
trxeste/wrk
haskell/haskellTextEditor/haskellEd.hs
bsd-3-clause
putChars (x:xs)= do putChar x putChars xs -- imprime linhas
66
putChars (x:xs)= do putChar x putChars xs -- imprime linhas
66
putChars (x:xs)= do putChar x putChars xs -- imprime linhas
66
false
false
0
7
16
29
13
16
null
null
rodrigofegui/UnB
2017.2/Linguagens de Programação/Trab 2/F6LAE.hs
gpl-3.0
avaliar (Let var val corpo) sbsP funcs = avaliar appLmd subsP funcs where appLmd = (AppLambda (Lambda var corpo) val) expV = ExpV val sbsP subsP = (var, expV):sbsP
207
avaliar (Let var val corpo) sbsP funcs = avaliar appLmd subsP funcs where appLmd = (AppLambda (Lambda var corpo) val) expV = ExpV val sbsP subsP = (var, expV):sbsP
207
avaliar (Let var val corpo) sbsP funcs = avaliar appLmd subsP funcs where appLmd = (AppLambda (Lambda var corpo) val) expV = ExpV val sbsP subsP = (var, expV):sbsP
207
false
false
0
10
72
78
40
38
null
null
thalerjonathan/phd
public/ArtIterating/code/haskell/PureAgentsAct/src/SpacialGameMsg/RunSGMsg.hs
gpl-3.0
redC :: (Double, Double, Double) redC = (0.7, 0.0, 0.0)
55
redC :: (Double, Double, Double) redC = (0.7, 0.0, 0.0)
55
redC = (0.7, 0.0, 0.0)
22
false
true
0
7
9
36
19
17
null
null
SRechenberger/grammata
src/Grammata/Machine.hs
gpl-3.0
iIf :: () => CoreExpression m -- ^ Condition c. -> [CoreStatement m] -- ^ then-block a. -> [CoreStatement m] -- ^ else-block b. -> CoreStatement m -- if statement. iIf = IIf
225
iIf :: () => CoreExpression m -- ^ Condition c. -> [CoreStatement m] -- ^ then-block a. -> [CoreStatement m] -- ^ else-block b. -> CoreStatement m iIf = IIf
199
iIf = IIf
9
true
true
0
11
84
55
28
27
null
null
christiaanb/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
step_RDR, alt_RDR, reset_RDR, prec_RDR, pfail_RDR :: RdrName step_RDR = varQual_RDR rEAD_PREC (fsLit "step")
124
step_RDR, alt_RDR, reset_RDR, prec_RDR, pfail_RDR :: RdrName step_RDR = varQual_RDR rEAD_PREC (fsLit "step")
124
step_RDR = varQual_RDR rEAD_PREC (fsLit "step")
63
false
true
0
7
28
30
19
11
null
null
phischu/fragnix
builtins/ghc-prim/GHC.Prim.hs
bsd-3-clause
readDoubleArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s,Double# #) readDoubleArray# = readDoubleArray#
121
readDoubleArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s,Double# #) readDoubleArray# = readDoubleArray#
121
readDoubleArray# = readDoubleArray#
35
false
true
0
9
16
37
18
19
null
null
ekmett/ekg
System/Remote/Snap.hs
bsd-3-clause
breakDiscard :: Word8 -> S.ByteString -> (S.ByteString, S.ByteString) breakDiscard w s = let (x, y) = S.break (== w) s in (x, S.drop 1 y)
145
breakDiscard :: Word8 -> S.ByteString -> (S.ByteString, S.ByteString) breakDiscard w s = let (x, y) = S.break (== w) s in (x, S.drop 1 y)
145
breakDiscard w s = let (x, y) = S.break (== w) s in (x, S.drop 1 y)
75
false
true
0
10
32
78
41
37
null
null
zaxtax/hakaru
commands/HKC.hs
bsd-3-clause
main :: IO () main = do opts <- parseOpts prog <- readFromFile (fileIn opts) runReaderT (compileHakaru prog) opts
119
main :: IO () main = do opts <- parseOpts prog <- readFromFile (fileIn opts) runReaderT (compileHakaru prog) opts
119
main = do opts <- parseOpts prog <- readFromFile (fileIn opts) runReaderT (compileHakaru prog) opts
105
false
true
0
10
24
53
24
29
null
null
nevrenato/Hets_Fork
Common/Lexer.hs
gpl-2.0
splitString :: CharParser () a -> String -> (a, String) splitString p = parseString $ do hd <- p tl <- getInput return (hd, tl) -- * digit, number, fraction, float
170
splitString :: CharParser () a -> String -> (a, String) splitString p = parseString $ do hd <- p tl <- getInput return (hd, tl) -- * digit, number, fraction, float
170
splitString p = parseString $ do hd <- p tl <- getInput return (hd, tl) -- * digit, number, fraction, float
114
false
true
0
9
37
66
33
33
null
null
FranklinChen/hugs98-plus-Sep2006
packages/HaXml/src/Text/XML/HaXml/Parse.hs
bsd-3-clause
flattenEV :: EntityValue -> String flattenEV (EntityValue evs) = concatMap flatten evs where flatten (EVString s) = s flatten (EVRef (RefEntity r)) = "&" ++r++";" flatten (EVRef (RefChar r)) = "&#"++show r++";" -- flatten (EVPERef n) = "%" ++n++";" ---- Misc ----
301
flattenEV :: EntityValue -> String flattenEV (EntityValue evs) = concatMap flatten evs where flatten (EVString s) = s flatten (EVRef (RefEntity r)) = "&" ++r++";" flatten (EVRef (RefChar r)) = "&#"++show r++";" -- flatten (EVPERef n) = "%" ++n++";" ---- Misc ----
301
flattenEV (EntityValue evs) = concatMap flatten evs where flatten (EVString s) = s flatten (EVRef (RefEntity r)) = "&" ++r++";" flatten (EVRef (RefChar r)) = "&#"++show r++";" -- flatten (EVPERef n) = "%" ++n++";" ---- Misc ----
266
false
true
0
11
79
106
53
53
null
null
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | Creates a value of 'CreativeRotation' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'crWeightCalculationStrategy' -- -- * 'crCreativeAssignments' -- -- * 'crCreativeOptimizationConfigurationId' -- -- * 'crType' creativeRotation ...
553
creativeRotation :: CreativeRotation creativeRotation = CreativeRotation' { _crWeightCalculationStrategy = Nothing , _crCreativeAssignments = Nothing , _crCreativeOptimizationConfigurationId = Nothing , _crType = Nothing }
250
creativeRotation = CreativeRotation' { _crWeightCalculationStrategy = Nothing , _crCreativeAssignments = Nothing , _crCreativeOptimizationConfigurationId = Nothing , _crType = Nothing }
209
true
true
0
7
96
58
36
22
null
null
tamarin-prover/tamarin-prover
lib/theory/src/Theory.hs
gpl-3.0
-- | Find the open protocol rule with the given name. lookupOpenDiffProtoDiffRule :: ProtoRuleName -> OpenDiffTheory -> Maybe DiffProtoRule lookupOpenDiffProtoDiffRule name = find ((name ==) . L.get (preName . rInfo . dprRule)) . diffTheoryDiffRules
253
lookupOpenDiffProtoDiffRule :: ProtoRuleName -> OpenDiffTheory -> Maybe DiffProtoRule lookupOpenDiffProtoDiffRule name = find ((name ==) . L.get (preName . rInfo . dprRule)) . diffTheoryDiffRules
199
lookupOpenDiffProtoDiffRule name = find ((name ==) . L.get (preName . rInfo . dprRule)) . diffTheoryDiffRules
113
true
true
0
12
37
60
31
29
null
null
ecaustin/haskhol-deductive
src/HaskHOL/Lib/Itab.hs
bsd-2-clause
ruleITAUT :: (HOLTermRep tm cls thry, BoolCtxt thry) => tm -> HOL cls thry HOLThm ruleITAUT tm = prove tm tacITAUT
125
ruleITAUT :: (HOLTermRep tm cls thry, BoolCtxt thry) => tm -> HOL cls thry HOLThm ruleITAUT tm = prove tm tacITAUT
125
ruleITAUT tm = prove tm tacITAUT
32
false
true
0
8
31
55
25
30
null
null
mydaum/cabal
cabal-install/Distribution/Client/TargetSelector.hs
bsd-3-clause
-- | Combine two matchers. This is similar to 'matchPlus' with the -- difference that an exact match from the left matcher shadows any exact -- match on the right. Inexact matches are still collected however. -- -- This operator is associative, has unit 'mzero' and is not commutative. -- matchPlusShadowing :: Match a -...
385
matchPlusShadowing :: Match a -> Match a -> Match a matchPlusShadowing a@(ExactMatch _ _) _ = a
96
matchPlusShadowing a@(ExactMatch _ _) _ = a
44
true
true
0
8
67
50
27
23
null
null
psibi/yesod
yesod-form/Yesod/Form/I18n/Czech.hs
mit
czechFormMessage MsgBoolNo = "Ne"
33
czechFormMessage MsgBoolNo = "Ne"
33
czechFormMessage MsgBoolNo = "Ne"
33
false
false
1
5
3
13
4
9
null
null
zarazek/concurrency-simulator
Concurrency/Simulator.hs
bsd-3-clause
emptyBindings :: Bindings emptyBindings = Bindings M.empty 0
60
emptyBindings :: Bindings emptyBindings = Bindings M.empty 0
60
emptyBindings = Bindings M.empty 0
34
false
true
0
6
7
18
9
9
null
null
jml/hazard
lib/Hazard/Views.hs
apache-2.0
internalError :: Show a => a -> b internalError = error . Text.unpack . show
76
internalError :: Show a => a -> b internalError = error . Text.unpack . show
76
internalError = error . Text.unpack . show
42
false
true
0
7
14
32
16
16
null
null
kim/amazonka
amazonka-ec2/gen/Network/AWS/EC2/CreateNetworkAclEntry.hs
mpl-2.0
-- | Indicates whether this is an egress rule (rule is applied to traffic leaving -- the subnet). cnaeEgress :: Lens' CreateNetworkAclEntry Bool cnaeEgress = lens _cnaeEgress (\s a -> s { _cnaeEgress = a })
206
cnaeEgress :: Lens' CreateNetworkAclEntry Bool cnaeEgress = lens _cnaeEgress (\s a -> s { _cnaeEgress = a })
108
cnaeEgress = lens _cnaeEgress (\s a -> s { _cnaeEgress = a })
61
true
true
0
9
35
41
23
18
null
null
ChrisLane/leksah
src/IDE/Pane/Modules.hs
gpl-2.0
insertNodesInTree li@(hd@(str1,Nothing):tl) (Node p@(str2,mbPair) forest) = case partition (\ (Node (s,_) _) -> s == str1) forest of ([found],rest) -> Node p (insertNodesInTree tl found : rest) ([],rest) -> Node p (makeNodes li : forest) (found,rest) -> Node p (insertNodesInTree tl...
355
insertNodesInTree li@(hd@(str1,Nothing):tl) (Node p@(str2,mbPair) forest) = case partition (\ (Node (s,_) _) -> s == str1) forest of ([found],rest) -> Node p (insertNodesInTree tl found : rest) ([],rest) -> Node p (makeNodes li : forest) (found,rest) -> Node p (insertNodesInTree tl...
355
insertNodesInTree li@(hd@(str1,Nothing):tl) (Node p@(str2,mbPair) forest) = case partition (\ (Node (s,_) _) -> s == str1) forest of ([found],rest) -> Node p (insertNodesInTree tl found : rest) ([],rest) -> Node p (makeNodes li : forest) (found,rest) -> Node p (insertNodesInTree tl...
355
false
false
2
14
85
194
99
95
null
null
rueshyna/gogol
gogol-adexchange-seller/gen/Network/Google/AdExchangeSeller/Types/Product.hs
mpl-2.0
-- | Unique identifier of this saved report. sId :: Lens' SavedReport (Maybe Text) sId = lens _sId (\ s a -> s{_sId = a})
121
sId :: Lens' SavedReport (Maybe Text) sId = lens _sId (\ s a -> s{_sId = a})
76
sId = lens _sId (\ s a -> s{_sId = a})
38
true
true
1
9
24
49
25
24
null
null
orion-42/numerics-physics-stuff
Combinatorics.hs
mit
permutations xs = [x:xs' | x <- xs, xs' <- permutations $ delete x xs]
70
permutations xs = [x:xs' | x <- xs, xs' <- permutations $ delete x xs]
70
permutations xs = [x:xs' | x <- xs, xs' <- permutations $ delete x xs]
70
false
false
0
9
14
41
20
21
null
null
int-e/hint
src/Hint/InterpreterT.hs
bsd-3-clause
runGhcImpl :: (MonadIO m, MonadMask m #if __GLASGOW_HASKELL__ < 800 , MonadThrow m, Functor m #endif ) => RunGhc (InterpreterT m) a runGhcImpl a = InterpreterT (lift a) `catches` [Handler (\(e :: GHC.SourceError) -> do dynFlags <- runGhc GHC.getSessionDynFlags throwM $ c...
669
runGhcImpl :: (MonadIO m, MonadMask m #if __GLASGOW_HASKELL__ < 800 , MonadThrow m, Functor m #endif ) => RunGhc (InterpreterT m) a runGhcImpl a = InterpreterT (lift a) `catches` [Handler (\(e :: GHC.SourceError) -> do dynFlags <- runGhc GHC.getSessionDynFlags throwM $ c...
669
runGhcImpl a = InterpreterT (lift a) `catches` [Handler (\(e :: GHC.SourceError) -> do dynFlags <- runGhc GHC.getSessionDynFlags throwM $ compilationError dynFlags e) ,Handler (\(e :: GHC.GhcApiError) -> throwM $ GhcException $ show e) ,Handler (\(e :: GHC.GhcException) -> throwM $ GhcExceptio...
507
false
true
3
14
170
233
116
117
null
null
f1u77y/xmonad-contrib
XMonad/Layout/Groups.hs
bsd-3-clause
-- | Compare the ids of two 'WithID' values sameID :: WithID l a -> WithID l a -> Bool sameID (ID id1 _) (ID id2 _) = id1 == id2
128
sameID :: WithID l a -> WithID l a -> Bool sameID (ID id1 _) (ID id2 _) = id1 == id2
84
sameID (ID id1 _) (ID id2 _) = id1 == id2
41
true
true
0
10
30
61
28
33
null
null
DaMSL/K3
src/Language/K3/Metaprogram/Evaluation.hs
apache-2.0
evalTApply :: SpliceContext -> Annotation Type -> GeneratorM (Annotation Type) evalTApply sctxt (TApplyGen n csenv) = evalBindings sctxt csenv >>= return . TApplyGen n
167
evalTApply :: SpliceContext -> Annotation Type -> GeneratorM (Annotation Type) evalTApply sctxt (TApplyGen n csenv) = evalBindings sctxt csenv >>= return . TApplyGen n
167
evalTApply sctxt (TApplyGen n csenv) = evalBindings sctxt csenv >>= return . TApplyGen n
88
false
true
0
9
23
60
28
32
null
null
richardfontana/postmaster
Postmaster/FSM.hs
gpl-3.0
event (SayHelo _) = do _ <- trigger ResetState whoami <- myHeloName say 2 5 0 (showString whoami " Postmaster; pleased to meet you.")
139
event (SayHelo _) = do _ <- trigger ResetState whoami <- myHeloName say 2 5 0 (showString whoami " Postmaster; pleased to meet you.")
139
event (SayHelo _) = do _ <- trigger ResetState whoami <- myHeloName say 2 5 0 (showString whoami " Postmaster; pleased to meet you.")
139
false
false
0
9
29
52
23
29
null
null
rudymatela/llcheck
bench/dets.hs
bsd-3-clause
prop4 p = p /= bug4
19
prop4 p = p /= bug4
19
prop4 p = p /= bug4
19
false
false
1
5
5
16
6
10
null
null
isomorphism/webgl
src/Graphics/Rendering/WebGL/Constants.hs
mit
gl_WRITE_ONLY :: GLenum gl_WRITE_ONLY = 0x88B9
46
gl_WRITE_ONLY :: GLenum gl_WRITE_ONLY = 0x88B9
46
gl_WRITE_ONLY = 0x88B9
22
false
true
0
4
5
11
6
5
null
null
kwf/data-kiln
Data/Kiln/Examples.hs
bsd-3-clause
setCar :: MSLL s a -> a -> Squishy s () setCar x = modifyClay x . composedly . first . const
93
setCar :: MSLL s a -> a -> Squishy s () setCar x = modifyClay x . composedly . first . const
93
setCar x = modifyClay x . composedly . first . const
53
false
true
0
8
22
49
23
26
null
null
sboosali/Haskell-DragonNaturallySpeaking
sources/Commands/OSX/Constants.hs
mit
-- | line 236 of </System/Library/Frameworks/IOKit.framework/Versions/A/Headers/hidsystem/IOLLEvent.h> -- @instance IsString BitVector@ mask :: Modifier -> BitVector mask Command = 0x00100000
192
mask :: Modifier -> BitVector mask Command = 0x00100000
56
mask Command = 0x00100000
26
true
true
0
7
19
26
12
14
null
null
mrshannon/lorenz-old
Main.hs
mit
drawAxes :: IO () drawAxes = preservingMatrix $ do scale s s s -- Axes lines. drawVector red xVector3f drawVector green yVector3f drawVector blue zVector3f -- Draw point at origin. drawPoint 5.0 white originVertex3f where s = 0.7 :: GLfloat
311
drawAxes :: IO () drawAxes = preservingMatrix $ do scale s s s -- Axes lines. drawVector red xVector3f drawVector green yVector3f drawVector blue zVector3f -- Draw point at origin. drawPoint 5.0 white originVertex3f where s = 0.7 :: GLfloat
311
drawAxes = preservingMatrix $ do scale s s s -- Axes lines. drawVector red xVector3f drawVector green yVector3f drawVector blue zVector3f -- Draw point at origin. drawPoint 5.0 white originVertex3f where s = 0.7 :: GLfloat
293
false
true
0
8
110
77
35
42
null
null
tomahawkins/risk
RISK/Kernel.hs
bsd-2-clause
-- Get the kernel spec. spec :: RISK Spec spec = getMeta >>= return . fst
73
spec :: RISK Spec spec = getMeta >>= return . fst
49
spec = getMeta >>= return . fst
31
true
true
0
6
15
23
12
11
null
null
silky/Tidal
Sound/Tidal/Tempo.hs
gpl-3.0
getServerPort :: IO Int getServerPort = fmap read (getEnvDefault "9160" "TIDAL_TEMPO_PORT")
91
getServerPort :: IO Int getServerPort = fmap read (getEnvDefault "9160" "TIDAL_TEMPO_PORT")
91
getServerPort = fmap read (getEnvDefault "9160" "TIDAL_TEMPO_PORT")
67
false
true
0
7
10
27
13
14
null
null
byteally/webapi
webapi-swagger/src/Constants.hs
bsd-3-clause
localRouteMethodTypesModuleName :: String localRouteMethodTypesModuleName = "Types"
83
localRouteMethodTypesModuleName :: String localRouteMethodTypesModuleName = "Types"
83
localRouteMethodTypesModuleName = "Types"
41
false
true
0
4
5
11
6
5
null
null
kojiromike/Idris-dev
src/IRTS/JavaScript/AST.hs
bsd-3-clause
jsStmt2Text (JsExprStmt e) = T.concat [jsAst2Text e, ";"]
57
jsStmt2Text (JsExprStmt e) = T.concat [jsAst2Text e, ";"]
57
jsStmt2Text (JsExprStmt e) = T.concat [jsAst2Text e, ";"]
57
false
false
0
7
7
29
14
15
null
null
jaiyalas/creepy-waffle
LeHavre/src/LeHavre.hs
mit
-- wK :: (Int, Int) -> Map (Int, Int) Cat -> Map (Int, Int) Cat wK xy m = update (const (Just K)) xy m
102
wK :: (Int, Int) -> Map (Int, Int) Cat -> Map (Int, Int) Cat wK xy m = update (const (Just K)) xy m
99
wK xy m = update (const (Just K)) xy m
38
true
true
0
9
24
72
38
34
null
null
sopvop/cabal
cabal-install/Distribution/Client/BuildTarget.hs
bsd-3-clause
nubMatchErrors (InexactMatch d xs) = InexactMatch d xs
56
nubMatchErrors (InexactMatch d xs) = InexactMatch d xs
56
nubMatchErrors (InexactMatch d xs) = InexactMatch d xs
56
false
false
0
7
9
22
10
12
null
null
marcellussiegburg/autotool
collection/src/CSP/Derive/Quiz.hs
gpl-2.0
reject_roller :: ( ToDoc a, Ord a ) => Config a -> IO ( (Bool, Int), (Process a, S.Set a )) reject_roller conf = do outs <- forM [ 1 .. generator_repeats conf ] $ \ k -> do p <- CSP.Roll.roll_free ( how_to_iterate conf ) ( process_alphabet conf ) ( process...
725
reject_roller :: ( ToDoc a, Ord a ) => Config a -> IO ( (Bool, Int), (Process a, S.Set a )) reject_roller conf = do outs <- forM [ 1 .. generator_repeats conf ] $ \ k -> do p <- CSP.Roll.roll_free ( how_to_iterate conf ) ( process_alphabet conf ) ( process...
725
reject_roller conf = do outs <- forM [ 1 .. generator_repeats conf ] $ \ k -> do p <- CSP.Roll.roll_free ( how_to_iterate conf ) ( process_alphabet conf ) ( process_size conf ) let sigma = CSP.Syntax.alphabet p let ok = CSP.Property.Guarded.ok p ...
617
false
true
0
16
251
245
121
124
null
null
pyr/himpy
himpy.hs
mit
main :: IO () main = do Snmp.initialize index <- initIndex args <- getArgs config <- configure $ get_conf_path args let (Hosts intval ttl host port logfile _ thresholds) = config logchan <- log_start logfile chan <- riemann_start logchan host port ttl thresholds log_info logchan "starting himpy" start...
429
main :: IO () main = do Snmp.initialize index <- initIndex args <- getArgs config <- configure $ get_conf_path args let (Hosts intval ttl host port logfile _ thresholds) = config logchan <- log_start logfile chan <- riemann_start logchan host port ttl thresholds log_info logchan "starting himpy" start...
429
main = do Snmp.initialize index <- initIndex args <- getArgs config <- configure $ get_conf_path args let (Hosts intval ttl host port logfile _ thresholds) = config logchan <- log_start logfile chan <- riemann_start logchan host port ttl thresholds log_info logchan "starting himpy" start_collectors ch...
415
false
true
0
12
82
155
70
85
null
null
ewestern/geos
src/Data/Geometry/Geos/Raw/Geometry.hs
mit
createGeometryFromCoords :: Geometry b => ( I.GEOSContextHandle_t -> Ptr I.GEOSCoordSequence -> IO (Ptr I.GEOSGeometry) ) -> CoordSeqConst -> Geos b createGeometryFromCoords f c = withGeos $ \h -> withCoordinateSequence c $ \pcs -> do ptr <- f h pcs constructGeometry h ptr
307
createGeometryFromCoords :: Geometry b => ( I.GEOSContextHandle_t -> Ptr I.GEOSCoordSequence -> IO (Ptr I.GEOSGeometry) ) -> CoordSeqConst -> Geos b createGeometryFromCoords f c = withGeos $ \h -> withCoordinateSequence c $ \pcs -> do ptr <- f h pcs constructGeometry h ptr
307
createGeometryFromCoords f c = withGeos $ \h -> withCoordinateSequence c $ \pcs -> do ptr <- f h pcs constructGeometry h ptr
134
false
true
0
14
75
109
50
59
null
null
phischu/fragnix
tests/packages/scotty/Data.Text.hs
bsd-3-clause
-- ----------------------------------------------------------------------------- -- * Reducing 'Text's (folds) -- | /O(n)/ 'foldl', applied to a binary operator, a starting value -- (typically the left-identity of the operator), and a 'Text', -- reduces the 'Text' using the binary operator, from left to right. -- Subj...
415
foldl :: (a -> Char -> a) -> a -> Text -> a foldl f z t = S.foldl f z (stream t)
80
foldl f z t = S.foldl f z (stream t)
36
true
true
0
9
68
68
35
33
null
null
IreneKnapp/Faction
libfaction/Distribution/Simple/Program/Db.hs
bsd-3-clause
emptyProgramDb :: ProgramDb emptyProgramDb = ProgramDb Map.empty Map.empty
74
emptyProgramDb :: ProgramDb emptyProgramDb = ProgramDb Map.empty Map.empty
74
emptyProgramDb = ProgramDb Map.empty Map.empty
46
false
true
0
6
7
26
11
15
null
null
rglew/rwh
ch3/count.hs
mit
count :: Num a => [t] -> a count (x:xs) = 1 + count xs
54
count :: Num a => [t] -> a count (x:xs) = 1 + count xs
54
count (x:xs) = 1 + count xs
27
false
true
0
7
14
42
21
21
null
null
beni55/hdbc-postgresql
Database/HDBC/PostgreSQL/ErrorCodes.hs
bsd-3-clause
-- |Is set to @\"2F000\"@. sqlRoutineException :: String sqlRoutineException = "2F000"
86
sqlRoutineException :: String sqlRoutineException = "2F000"
59
sqlRoutineException = "2F000"
29
true
true
0
4
10
12
7
5
null
null
kdungs/adventofcode2016
04.hs
mit
main = do input <- getContents let rooms = parse parseRooms "" input let legalRooms = onlyLegalRooms <$> rooms let result = sumSectorIds <$> legalRooms putStrLn . show $ result let decryptedRooms = (map decrypt) <$> legalRooms putStrLn . show $ (map show) <...
337
main = do input <- getContents let rooms = parse parseRooms "" input let legalRooms = onlyLegalRooms <$> rooms let result = sumSectorIds <$> legalRooms putStrLn . show $ result let decryptedRooms = (map decrypt) <$> legalRooms putStrLn . show $ (map show) <...
337
main = do input <- getContents let rooms = parse parseRooms "" input let legalRooms = onlyLegalRooms <$> rooms let result = sumSectorIds <$> legalRooms putStrLn . show $ result let decryptedRooms = (map decrypt) <$> legalRooms putStrLn . show $ (map show) <...
337
false
false
1
12
107
110
49
61
null
null