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
mihaimaruseac/blog-demos
conduit/conduit-2.hs
mit
sink :: Sink String IO () sink = do mstr <- await case mstr of Nothing -> return () Just str -> do liftIO $ putStrLn str sink
149
sink :: Sink String IO () sink = do mstr <- await case mstr of Nothing -> return () Just str -> do liftIO $ putStrLn str sink
149
sink = do mstr <- await case mstr of Nothing -> return () Just str -> do liftIO $ putStrLn str sink
123
false
true
0
13
51
67
30
37
null
null
mharrys/reversi
src/Reversi.hs
gpl-2.0
headToLast [x] = [x]
23
headToLast [x] = [x]
23
headToLast [x] = [x]
23
false
false
0
5
6
16
8
8
null
null
wjzz/GoStat
src/Configuration.hs
bsd-3-clause
----------------------------------------------- -- Loading and saving a configuration file -- ----------------------------------------------- configurationPath :: IO FilePath configurationPath = getDataFileName "CONFIG"
222
configurationPath :: IO FilePath configurationPath = getDataFileName "CONFIG"
77
configurationPath = getDataFileName "CONFIG"
44
true
true
0
6
20
25
12
13
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/types/TypeRep.hs
bsd-3-clause
tyVarsOfType (AppTy fun arg) = tyVarsOfType fun `unionVarSet` tyVarsOfType arg
82
tyVarsOfType (AppTy fun arg) = tyVarsOfType fun `unionVarSet` tyVarsOfType arg
82
tyVarsOfType (AppTy fun arg) = tyVarsOfType fun `unionVarSet` tyVarsOfType arg
82
false
false
0
6
13
30
14
16
null
null
norm2782/uuagc
src/RhsCheck.hs
bsd-3-clause
getPos (Err _ pos) = pos
33
getPos (Err _ pos) = pos
33
getPos (Err _ pos) = pos
33
false
false
0
7
14
17
8
9
null
null
kim/amazonka
amazonka-lambda/gen/Network/AWS/Lambda/UpdateFunctionCode.hs
mpl-2.0
-- | 'UpdateFunctionCode' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'ufc1FunctionName' @::@ 'Text' -- -- * 'ufc1ZipFile' @::@ 'Base64' -- updateFunctionCode :: Text -- ^ 'ufc1FunctionName' -> Base64 -- ^ 'ufc1ZipFile' -> UpdateFunctionCode u...
428
updateFunctionCode :: Text -- ^ 'ufc1FunctionName' -> Base64 -- ^ 'ufc1ZipFile' -> UpdateFunctionCode updateFunctionCode p1 p2 = UpdateFunctionCode { _ufc1FunctionName = p1 , _ufc1ZipFile = p2 }
249
updateFunctionCode p1 p2 = UpdateFunctionCode { _ufc1FunctionName = p1 , _ufc1ZipFile = p2 }
109
true
true
0
6
107
48
31
17
null
null
phischu/fragnix
tests/packages/scotty/Data.Text.Lazy.hs
bsd-3-clause
-- | /O(n)/ 'takeEnd' @n@ @t@ returns the suffix remaining after -- taking @n@ characters from the end of @t@. -- -- Examples: -- -- > takeEnd 3 "foobar" == "bar" takeEnd :: Int64 -> Text -> Text takeEnd n t0 | n <= 0 = empty | otherwise = takeChunk n empty . L.reverse . toChunks $ t0 where takeChunk _ acc...
733
takeEnd :: Int64 -> Text -> Text takeEnd n t0 | n <= 0 = empty | otherwise = takeChunk n empty . L.reverse . toChunks $ t0 where takeChunk _ acc [] = acc takeChunk i acc (t:ts) | i <= l = chunk (T.takeEnd (fromIntegral i) t) acc | otherwise = takeChunk (i-l) (Chunk t acc) ts ...
570
takeEnd n t0 | n <= 0 = empty | otherwise = takeChunk n empty . L.reverse . toChunks $ t0 where takeChunk _ acc [] = acc takeChunk i acc (t:ts) | i <= l = chunk (T.takeEnd (fromIntegral i) t) acc | otherwise = takeChunk (i-l) (Chunk t acc) ts where l = fromIntegral ...
537
true
true
4
9
189
214
97
117
null
null
keithshep/txt-sushi
Database/TxtSushi/SQLExecution.hs
bsd-3-clause
toGroupContext :: EvaluationContext a -> EvaluationContext [a] toGroupContext ctxt = grpCtxt where grpCtxt funExpr@(FunctionExpression _ _ _) rowGrp = evalWithContext grpCtxt funExpr rowGrp grpCtxt expr rowGrp = GroupedData $ map (ctxt expr) rowGrp
268
toGroupContext :: EvaluationContext a -> EvaluationContext [a] toGroupContext ctxt = grpCtxt where grpCtxt funExpr@(FunctionExpression _ _ _) rowGrp = evalWithContext grpCtxt funExpr rowGrp grpCtxt expr rowGrp = GroupedData $ map (ctxt expr) rowGrp
268
toGroupContext ctxt = grpCtxt where grpCtxt funExpr@(FunctionExpression _ _ _) rowGrp = evalWithContext grpCtxt funExpr rowGrp grpCtxt expr rowGrp = GroupedData $ map (ctxt expr) rowGrp
205
false
true
0
8
52
85
41
44
null
null
scolobb/fgl
Data/Graph/Inductive/Query/DFS.hs
bsd-3-clause
dffWith' :: (Graph gr) => CFun a b c -> gr a b -> [Tree c] dffWith' f = fixNodes (dffWith f)
92
dffWith' :: (Graph gr) => CFun a b c -> gr a b -> [Tree c] dffWith' f = fixNodes (dffWith f)
92
dffWith' f = fixNodes (dffWith f)
33
false
true
0
11
21
63
29
34
null
null
kelnage/tamarin-prover
lib/term/src/Term/LTerm.hs
gpl-3.0
-- | If the term is a message variable, return it, nothing otherwise. getMsgVar :: LNTerm -> Maybe [LVar] getMsgVar (viewTerm -> Lit (Var v)) | (lvarSort v == LSortMsg) = Just [v]
179
getMsgVar :: LNTerm -> Maybe [LVar] getMsgVar (viewTerm -> Lit (Var v)) | (lvarSort v == LSortMsg) = Just [v]
109
getMsgVar (viewTerm -> Lit (Var v)) | (lvarSort v == LSortMsg) = Just [v]
73
true
true
0
10
32
63
31
32
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/notElem_6.hs
mit
not MyFalse = MyTrue
20
not MyFalse = MyTrue
20
not MyFalse = MyTrue
20
false
false
0
4
3
10
4
6
null
null
erochest/github
Github/Data.hs
bsd-3-clause
(.:<) :: (FromJSON a) => Object -> T.Text -> Parser [a] obj .:< key = case Map.lookup key obj of Nothing -> pure mzero Just v -> parseJSON v -- | Produce all values for the given key.
223
(.:<) :: (FromJSON a) => Object -> T.Text -> Parser [a] obj .:< key = case Map.lookup key obj of Nothing -> pure mzero Just v -> parseJSON v -- | Produce all values for the given key.
223
obj .:< key = case Map.lookup key obj of Nothing -> pure mzero Just v -> parseJSON v -- | Produce all values for the given key.
167
false
true
0
11
77
80
39
41
null
null
ben-schulz/Idris-dev
src/Idris/Primitives.hs
bsd-3-clause
p_strCons _ = Nothing
21
p_strCons _ = Nothing
21
p_strCons _ = Nothing
21
false
false
0
5
3
9
4
5
null
null
kajigor/uKanren_transformations
test/auto/Test/Helper.hs
bsd-3-clause
manyAssertCustom :: (Eq a, Show a) => String -> (a -> a -> Bool) -> [a] -> [a] -> Assertion manyAssertCustom str check expected actual = assertBool str (all (\a -> isJust $ find (check a) expected) actual)
209
manyAssertCustom :: (Eq a, Show a) => String -> (a -> a -> Bool) -> [a] -> [a] -> Assertion manyAssertCustom str check expected actual = assertBool str (all (\a -> isJust $ find (check a) expected) actual)
209
manyAssertCustom str check expected actual = assertBool str (all (\a -> isJust $ find (check a) expected) actual)
117
false
true
0
13
41
104
54
50
null
null
jystic/ssa-anf
src/SSA/ToANF.hs
bsd-3-clause
paramsOfBinding (SSA.Call _ _ _ b) ns = paramsOfBinding b ns
64
paramsOfBinding (SSA.Call _ _ _ b) ns = paramsOfBinding b ns
64
paramsOfBinding (SSA.Call _ _ _ b) ns = paramsOfBinding b ns
64
false
false
0
8
14
30
14
16
null
null
MichielDerhaeg/stack
src/Stack/Constants/Config.hs
bsd-3-clause
-- | The filename used for modification check of .cabal configCabalMod :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => Path Abs Dir -- ^ Package directory. -> m (Path Abs File) configCabalMod dir = liftM (</> $(mkRelFile "stack-cabal-mod")) (distDirFromDi...
326
configCabalMod :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => Path Abs Dir -- ^ Package directory. -> m (Path Abs File) configCabalMod dir = liftM (</> $(mkRelFile "stack-cabal-mod")) (distDirFromDir dir)
270
configCabalMod dir = liftM (</> $(mkRelFile "stack-cabal-mod")) (distDirFromDir dir)
104
true
true
0
9
95
81
41
40
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/deSugar/Check.hs
bsd-3-clause
-- Always succeeds might_fail_pat _ = False
71
might_fail_pat _ = False
52
might_fail_pat _ = False
52
true
false
0
4
34
11
5
6
null
null
wavewave/loopdiagram
src/HEP/Physics/LoopCalculation/Graph.hs
bsd-3-clause
conjugateKind NP_D = Just NP_Dc
35
conjugateKind NP_D = Just NP_Dc
35
conjugateKind NP_D = Just NP_Dc
35
false
false
0
5
8
12
5
7
null
null
afroisalreadyinu/LogAnalyzer
daemon/Search.hs
gpl-2.0
heuristicRESearch :: RESearchState -> Heuristic -> IO [REChain] heuristicRESearch reState heuristic = if heuristic (reLogLines reState) (reNodeChains . currentRENode $ reState) == 0 then return (reNodeChains . currentRENode $ reState) else let children = nextStates reState childrenVals =...
962
heuristicRESearch :: RESearchState -> Heuristic -> IO [REChain] heuristicRESearch reState heuristic = if heuristic (reLogLines reState) (reNodeChains . currentRENode $ reState) == 0 then return (reNodeChains . currentRENode $ reState) else let children = nextStates reState childrenVals =...
962
heuristicRESearch reState heuristic = if heuristic (reLogLines reState) (reNodeChains . currentRENode $ reState) == 0 then return (reNodeChains . currentRENode $ reState) else let children = nextStates reState childrenVals = map (\x -> (x, heuristic (reLogLines reState) (reNodeChains x))...
898
false
true
0
21
257
275
139
136
null
null
stgm/prac-testing
week4/TAMO.hs
mit
square1 :: Integer -> Integer square1 x = x^2
45
square1 :: Integer -> Integer square1 x = x^2
45
square1 x = x^2
15
false
true
2
7
8
30
12
18
null
null
siddhanathan/yi
yi-core/src/Yi/Editor.hs
gpl-2.0
-- | Clear the status line clrStatus :: EditorM () clrStatus = setStatus ([""], defaultStyle)
93
clrStatus :: EditorM () clrStatus = setStatus ([""], defaultStyle)
66
clrStatus = setStatus ([""], defaultStyle)
42
true
true
1
7
14
32
16
16
null
null
uuhan/Idris-dev
src/IRTS/Portable.hs
bsd-3-clause
-- Update the version when the format changes formatVersion :: Int formatVersion = 3
84
formatVersion :: Int formatVersion = 3
38
formatVersion = 3
17
true
true
0
4
13
12
7
5
null
null
jstolarek/ghc
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
bsd-3-clause
mkName :: String -> Name -- The string can have a '.', thus "Foo.baz", -- giving a dynamically-bound qualified name, -- in which case we want to generate a NameQ -- -- Parse the string to see if it has a "." in it -- so we know whether to generate a qualified or unqualified name -- It's a bit tricky because we need to ...
1,693
mkName :: String -> Name mkName str = split [] (reverse str) where split occ [] = Name (mkOccName occ) NameS split occ ('.':rev) | not (null occ) , is_rev_mod_name rev = Name (mkOccName occ) (NameQ (mkModName (reverse rev))) -- The 'not (null oc...
1,311
mkName str = split [] (reverse str) where split occ [] = Name (mkOccName occ) NameS split occ ('.':rev) | not (null occ) , is_rev_mod_name rev = Name (mkOccName occ) (NameQ (mkModName (reverse rev))) -- The 'not (null occ)' guard ensures that ...
1,286
true
true
3
11
516
341
166
175
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F05.hs
bsd-3-clause
-- glDeleteFencesAPPLE --------------------------------------------------------- glDeleteFencesAPPLE :: MonadIO m => GLsizei -- ^ @n@. -> Ptr GLuint -- ^ @fences@ pointing to @n@ elements of type @FenceNV@. -> m () glDeleteFencesAPPLE v1 v2 = liftIO $ dyn200 ptr_glDeleteFencesAPPLE v1 v2
297
glDeleteFencesAPPLE :: MonadIO m => GLsizei -- ^ @n@. -> Ptr GLuint -- ^ @fences@ pointing to @n@ elements of type @FenceNV@. -> m () glDeleteFencesAPPLE v1 v2 = liftIO $ dyn200 ptr_glDeleteFencesAPPLE v1 v2
215
glDeleteFencesAPPLE v1 v2 = liftIO $ dyn200 ptr_glDeleteFencesAPPLE v1 v2
73
true
true
0
10
46
57
27
30
null
null
asilvestre/haskell-neo4j-rest-client
src/Database/Neo4j/Graph.hs
mit
-- | Get a relationship in the graph getRelationship :: RelIdentifier a => a -> Graph -> Maybe Relationship getRelationship r g = getRelPath r `M.lookup` rels g
160
getRelationship :: RelIdentifier a => a -> Graph -> Maybe Relationship getRelationship r g = getRelPath r `M.lookup` rels g
123
getRelationship r g = getRelPath r `M.lookup` rels g
52
true
true
0
9
27
53
25
28
null
null
FranklinChen/music-score
sketch/old/trans/trans2.hs
bsd-3-clause
swap (x,y) = (y,x)
18
swap (x,y) = (y,x)
18
swap (x,y) = (y,x)
18
false
false
0
6
3
21
12
9
null
null
ckaestne/CIDE
CIDE_Language_Haskell/test/fromviral/RowGameLib.hs
gpl-3.0
-- Definition of a style for Position posStyle = Data [vStyle]
67
posStyle = Data [vStyle]
24
posStyle = Data [vStyle]
24
true
false
0
6
15
13
7
6
null
null
brendanhay/gogol
gogol-accessapproval/gen/Network/Google/Resource/AccessApproval/Organizations/UpdateAccessApprovalSettings.hs
mpl-2.0
-- | The resource name of the settings. Format is one of: * -- \"projects\/{project}\/accessApprovalSettings\" * -- \"folders\/{folder}\/accessApprovalSettings\" * -- \"organizations\/{organization}\/accessApprovalSettings\" ouaasName :: Lens' OrganizationsUpdateAccessApprovalSettings Text ouaasName = lens _ouaasName...
349
ouaasName :: Lens' OrganizationsUpdateAccessApprovalSettings Text ouaasName = lens _ouaasName (\ s a -> s{_ouaasName = a})
124
ouaasName = lens _ouaasName (\ s a -> s{_ouaasName = a})
58
true
true
0
9
38
45
25
20
null
null
leshchevds/ganeti
src/Ganeti/THH/PyRPC.hs
bsd-2-clause
-- | A helper function that nests a block of generated output by the default -- step (see 'pythonIndentStep'). nest' :: Doc -> Doc nest' = nest pythonIndentStep
160
nest' :: Doc -> Doc nest' = nest pythonIndentStep
49
nest' = nest pythonIndentStep
29
true
true
0
7
27
27
12
15
null
null
phischu/pem-images
src/ImageQuery/Printer.hs
bsd-3-clause
tableQueryPrinter (IslandQuery NumberOfIslands) = "table_number_of_islands"
79
tableQueryPrinter (IslandQuery NumberOfIslands) = "table_number_of_islands"
79
tableQueryPrinter (IslandQuery NumberOfIslands) = "table_number_of_islands"
79
false
false
0
7
8
15
7
8
null
null
aparent/qacg
src/QACG/CircGen/Bit/Shift.hs
bsd-3-clause
applyContShift ctrl (x0:x1:xs) = Gate "tof" [x0,x1] : Gate "tof" [ctrl,x1,x0] : Gate "tof" [x0,x1] : applyContShift ctrl (x1:xs)
231
applyContShift ctrl (x0:x1:xs) = Gate "tof" [x0,x1] : Gate "tof" [ctrl,x1,x0] : Gate "tof" [x0,x1] : applyContShift ctrl (x1:xs)
231
applyContShift ctrl (x0:x1:xs) = Gate "tof" [x0,x1] : Gate "tof" [ctrl,x1,x0] : Gate "tof" [x0,x1] : applyContShift ctrl (x1:xs)
231
false
false
0
9
121
82
43
39
null
null
jwiegley/ghc-release
libraries/base/Numeric.hs
gpl-3.0
-- | Show a signed 'RealFloat' value -- using standard decimal notation for arguments whose absolute value lies -- between @0.1@ and @9,999,999@, and scientific notation otherwise. -- -- In the call @'showGFloat' digs val@, if @digs@ is 'Nothing', -- the value is shown to full precision; if @digs@ is @'Just' d@, -- the...
496
showGFloat :: (RealFloat a) => Maybe Int -> a -> ShowS showEFloat d x = showString (formatRealFloat FFExponent d x)
119
showEFloat d x = showString (formatRealFloat FFExponent d x)
61
true
true
0
7
88
56
31
25
null
null
nmk/Spock
src/Web/Spock/Internal/CoreAction.hs
bsd-3-clause
-- | Modify the vault (useful for sharing data between middleware and app) modifyVault :: MonadIO m => (V.Vault -> V.Vault) -> ActionCtxT ctx m () modifyVault f = do vaultIf <- asks ri_vaultIf liftIO $ vi_modifyVault vaultIf f
238
modifyVault :: MonadIO m => (V.Vault -> V.Vault) -> ActionCtxT ctx m () modifyVault f = do vaultIf <- asks ri_vaultIf liftIO $ vi_modifyVault vaultIf f
163
modifyVault f = do vaultIf <- asks ri_vaultIf liftIO $ vi_modifyVault vaultIf f
91
true
true
0
9
50
68
32
36
null
null
eigengrau/hlint
data/Default.hs
bsd-3-clause
error = concatMap (maybeToList . f) ==> Data.Maybe.mapMaybe f
61
error = concatMap (maybeToList . f) ==> Data.Maybe.mapMaybe f
61
error = concatMap (maybeToList . f) ==> Data.Maybe.mapMaybe f
61
false
false
2
6
8
26
12
14
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Hooks/DebugEvents.hs
bsd-2-clause
dumpMDBlocks :: Int -> Decoder Bool dumpMDBlocks _ = propSimple "(drop site info)"
85
dumpMDBlocks :: Int -> Decoder Bool dumpMDBlocks _ = propSimple "(drop site info)"
85
dumpMDBlocks _ = propSimple "(drop site info)"
47
false
true
0
6
15
24
11
13
null
null
Philonous/pontarius-xmpp
source/Network/Xmpp/Lens.hs
bsd-3-clause
-- | Return all the values a Traversal is pointing to in a list getAll :: Traversal a b -> a -> [b] getAll t = getCollection . t (Collect . pure)
145
getAll :: Traversal a b -> a -> [b] getAll t = getCollection . t (Collect . pure)
81
getAll t = getCollection . t (Collect . pure)
45
true
true
0
8
31
45
23
22
null
null
dorchard/gram_lang
frontend/src/Language/Granule/Syntax/Helpers.hs
bsd-3-clause
lookupVar :: Monad m => IdSyntacticCategory -> Id -> Freshener m (Maybe String) lookupVar cat v = do st <- get case cat of Value -> return . lookup (sourceName v) . varMap $ st Type -> return . lookup (sourceName v) . tyMap $ st
242
lookupVar :: Monad m => IdSyntacticCategory -> Id -> Freshener m (Maybe String) lookupVar cat v = do st <- get case cat of Value -> return . lookup (sourceName v) . varMap $ st Type -> return . lookup (sourceName v) . tyMap $ st
242
lookupVar cat v = do st <- get case cat of Value -> return . lookup (sourceName v) . varMap $ st Type -> return . lookup (sourceName v) . tyMap $ st
162
false
true
0
16
59
116
53
63
null
null
ZjMNZHgG5jMXw/smallcaps
src/smallcaps/Text/SmallCaps/TeXLaTeXParser.hs
bsd-3-clause
skipMacro :: Text -> Parser TeXElement skipMacro name' = satisfy (liftM2 (&&) isMacro ((name' ==) . content))
109
skipMacro :: Text -> Parser TeXElement skipMacro name' = satisfy (liftM2 (&&) isMacro ((name' ==) . content))
109
skipMacro name' = satisfy (liftM2 (&&) isMacro ((name' ==) . content))
70
false
true
0
10
16
51
26
25
null
null
Chobbes/Chug
src/Parser.hs
mit
blockStatement :: (TokenParsing m, DeltaParsing m) => m (Stmnt Span) blockStatement = spannotate1 Block <$> spanned (braces (many cStatement)) <?> "block statement"
169
blockStatement :: (TokenParsing m, DeltaParsing m) => m (Stmnt Span) blockStatement = spannotate1 Block <$> spanned (braces (many cStatement)) <?> "block statement"
169
blockStatement = spannotate1 Block <$> spanned (braces (many cStatement)) <?> "block statement"
100
false
true
2
10
26
63
30
33
null
null
kawamuray/ganeti
test/hs/Test/Ganeti/HTools/Instance.hs
gpl-2.0
-- | Generates an instance with nodes on a node list. -- The following rules are respected: -- 1. The instance is never bigger than its primary node -- 2. If possible the instance has different pnode and snode -- 3. Else disk templates which require secondary nodes are disabled genInstanceOnNodeList :: Node.List -> Gen...
842
genInstanceOnNodeList :: Node.List -> Gen Instance.Instance genInstanceOnNodeList nl = do let nsize = Container.size nl pnode <- choose (0, nsize-1) let (snodefilter, dtfilter) = if nsize >= 2 then ((/= pnode), const True) else (const True, not . Instance.hasSecondary) snode <- choos...
563
genInstanceOnNodeList nl = do let nsize = Container.size nl pnode <- choose (0, nsize-1) let (snodefilter, dtfilter) = if nsize >= 2 then ((/= pnode), const True) else (const True, not . Instance.hasSecondary) snode <- choose (0, nsize-1) `suchThat` snodefilter i <- genInstanceSmal...
503
true
true
0
13
165
198
106
92
null
null
jtdaugherty/vty-ui-builder
src/Graphics/Vty/Widgets/Builder/Handlers/Pad.hs
bsd-3-clause
paddingExprFromPadInfo :: PadInfo -> Hs.Exp paddingExprFromPadInfo padding = -- Mapping of projections and the function names we should -- use when generating source let padFunctions = [ (padTop, "padTop") , (padBottom, "padBottom") , (padLeft, "padLeft") ...
968
paddingExprFromPadInfo :: PadInfo -> Hs.Exp paddingExprFromPadInfo padding = -- Mapping of projections and the function names we should -- use when generating source let padFunctions = [ (padTop, "padTop") , (padBottom, "padBottom") , (padLeft, "padLeft") ...
968
paddingExprFromPadInfo padding = -- Mapping of projections and the function names we should -- use when generating source let padFunctions = [ (padTop, "padTop") , (padBottom, "padBottom") , (padLeft, "padLeft") , (padRight, "padRight") ...
924
false
true
0
18
405
250
134
116
null
null
adept/hledger
hledger-lib/Hledger/Data/Journal.hs
gpl-3.0
-- | A query for Profit & Loss accounts in this journal. -- Cf <http://en.wikipedia.org/wiki/Chart_of_accounts#Profit_.26_Loss_accounts>. journalProfitAndLossAccountQuery :: Journal -> Query journalProfitAndLossAccountQuery j = Or [journalRevenueAccountQuery j ,journalExpenseAcc...
373
journalProfitAndLossAccountQuery :: Journal -> Query journalProfitAndLossAccountQuery j = Or [journalRevenueAccountQuery j ,journalExpenseAccountQuery j ]
235
journalProfitAndLossAccountQuery j = Or [journalRevenueAccountQuery j ,journalExpenseAccountQuery j ]
181
true
true
0
7
109
35
18
17
null
null
markcwhitfield/nunavut
test/Nunavut/Util/TestUtils.hs
mit
isTotal3 :: (Arbitrary a, Show a, Arbitrary b, Show b, Arbitrary c, Show c) => (a -> b -> c -> d) -> Spec isTotal3 f = it "is a total function" $ property $ \x y z -> f x y z `seq` True
205
isTotal3 :: (Arbitrary a, Show a, Arbitrary b, Show b, Arbitrary c, Show c) => (a -> b -> c -> d) -> Spec isTotal3 f = it "is a total function" $ property $ \x y z -> f x y z `seq` True
205
isTotal3 f = it "is a total function" $ property $ \x y z -> f x y z `seq` True
99
false
true
0
11
64
111
55
56
null
null
bezirg/hlogo
src/Language/Logo/Prim.hs
bsd-3-clause
link_length :: C Link _s' STM Double link_length = do (MkLink {end1_ =f, end2_ = t},_,_) <- Reader.ask MkTurtle {xcor_ = fx, ycor_ = fy} <- turtle f MkTurtle {xcor_ = tx, ycor_ = ty} <- turtle t x <- lift $ readTVar fx y <- lift $ readTVar fy x' <- lift $ readTVar tx y' <- lift $ readTVar ty...
2,260
link_length :: C Link _s' STM Double link_length = do (MkLink {end1_ =f, end2_ = t},_,_) <- Reader.ask MkTurtle {xcor_ = fx, ycor_ = fy} <- turtle f MkTurtle {xcor_ = tx, ycor_ = ty} <- turtle t x <- lift $ readTVar fx y <- lift $ readTVar fy x' <- lift $ readTVar tx y' <- lift $ readTVar ty...
2,260
link_length = do (MkLink {end1_ =f, end2_ = t},_,_) <- Reader.ask MkTurtle {xcor_ = fx, ycor_ = fy} <- turtle f MkTurtle {xcor_ = tx, ycor_ = ty} <- turtle t x <- lift $ readTVar fx y <- lift $ readTVar fy x' <- lift $ readTVar tx y' <- lift $ readTVar ty return $ sqrt (delta x x' (max_p...
2,223
false
true
0
15
661
259
148
111
null
null
ihc/futhark
src/Futhark/Optimise/MemoryBlockMerging/ActualVariables.hs
isc
lookInStm :: LoreConstraints lore => Stm lore -> FindM lore () lookInStm stm@(Let (Pattern patctxelems patvalelems) _ e) = do forM_ patvalelems $ \(PatElem var bindage _) -> case bindage of BindInPlace orig _ -> do -- Record that when coalescing an in-place update statement, also look ...
8,792
lookInStm :: LoreConstraints lore => Stm lore -> FindM lore () lookInStm stm@(Let (Pattern patctxelems patvalelems) _ e) = do forM_ patvalelems $ \(PatElem var bindage _) -> case bindage of BindInPlace orig _ -> do -- Record that when coalescing an in-place update statement, also look ...
8,792
lookInStm stm@(Let (Pattern patctxelems patvalelems) _ e) = do forM_ patvalelems $ \(PatElem var bindage _) -> case bindage of BindInPlace orig _ -> do -- Record that when coalescing an in-place update statement, also look -- at the original array. let actuals = S.fromList [var, orig...
8,716
false
true
9
27
2,831
1,439
729
710
null
null
xrchz/ot
OpenTheory/Proof.hs
gpl-3.0
concl (AbsThm v th) = eq ty (AbsTerm v t1) (AbsTerm v t2) where (tt,t1,t2) = destEqTy (concl th) (Var (_,tv)) = v ty = tv --> tt
146
concl (AbsThm v th) = eq ty (AbsTerm v t1) (AbsTerm v t2) where (tt,t1,t2) = destEqTy (concl th) (Var (_,tv)) = v ty = tv --> tt
146
concl (AbsThm v th) = eq ty (AbsTerm v t1) (AbsTerm v t2) where (tt,t1,t2) = destEqTy (concl th) (Var (_,tv)) = v ty = tv --> tt
146
false
false
2
9
45
95
48
47
null
null
siddhanathan/yi
yi-mode-javascript/src/Yi/Verifier/JavaScript.hs
gpl-2.0
-- | Given a 'FunDecl', returns its inner body as a list. funBody :: Statement t -> [Statement t] funBody (FunDecl _ _ _ blk) = case blk of Block _ stmts _ -> toList stmts BlockOne stmt -> [stmt] _ -> []
241
funBody :: Statement t -> [Statement t] funBody (FunDecl _ _ _ blk) = case blk of Block _ stmts _ -> toList stmts BlockOne stmt -> [stmt] _ -> []
183
funBody (FunDecl _ _ _ blk) = case blk of Block _ stmts _ -> toList stmts BlockOne stmt -> [stmt] _ -> []
143
true
true
0
8
80
80
39
41
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/ShippingSettings/GetsupportedpickupServices.hs
mpl-2.0
-- | V1 error format. ssgsXgafv :: Lens' ShippingSettingsGetsupportedpickupServices (Maybe Xgafv) ssgsXgafv = lens _ssgsXgafv (\ s a -> s{_ssgsXgafv = a})
156
ssgsXgafv :: Lens' ShippingSettingsGetsupportedpickupServices (Maybe Xgafv) ssgsXgafv = lens _ssgsXgafv (\ s a -> s{_ssgsXgafv = a})
134
ssgsXgafv = lens _ssgsXgafv (\ s a -> s{_ssgsXgafv = a})
58
true
true
1
9
23
52
25
27
null
null
noughtmare/yi
yi-core/src/Yi/Editor.hs
gpl-2.0
-- | Set the "background" status line setStatus :: MonadEditor m => Status -> m () setStatus = setTmpStatus maxBound
116
setStatus :: MonadEditor m => Status -> m () setStatus = setTmpStatus maxBound
78
setStatus = setTmpStatus maxBound
33
true
true
0
8
19
31
15
16
null
null
ku-fpg/kansas-amber
System/Hardware/Haskino/Show.hs
bsd-3-clause
showCommand (AnalogWriteE p w) = showCommand2 "AnalogWriteE" p w
64
showCommand (AnalogWriteE p w) = showCommand2 "AnalogWriteE" p w
64
showCommand (AnalogWriteE p w) = showCommand2 "AnalogWriteE" p w
64
false
false
0
7
8
24
11
13
null
null
ricardopenyamari/ir2haskell
clir-parser-haskell-master/lib/sexp-grammar/src/Language/SexpGrammar.hs
gpl-2.0
---------------------------------------------------------------------- -- ByteString interface (machine-oriented) -- | Deserialize a value from a lazy 'ByteString'. The input must -- contain exactly one S-expression. Comments are ignored. decode :: SexpIso a => TL.Text -> Either String a decode = decodeWith sexpIso
319
decode :: SexpIso a => TL.Text -> Either String a decode = decodeWith sexpIso
79
decode = decodeWith sexpIso
29
true
true
0
7
41
36
19
17
null
null
Brightgalrs/con-lang-gen
src/Gen/Phonology.hs
mit
makeConsonants :: [Place] -> [Manner] -> [Phonation] -> [Airstream] -> [Phoneme] -> [Phoneme] makeConsonants places manners phonations airstreams exceptions = output where -- Create all possible consonants from place, manner, phonation, and phonations cns = Consonant <$> places <*> manners <*> phonations <*> airstr...
447
makeConsonants :: [Place] -> [Manner] -> [Phonation] -> [Airstream] -> [Phoneme] -> [Phoneme] makeConsonants places manners phonations airstreams exceptions = output where -- Create all possible consonants from place, manner, phonation, and phonations cns = Consonant <$> places <*> manners <*> phonations <*> airstr...
447
makeConsonants places manners phonations airstreams exceptions = output where -- Create all possible consonants from place, manner, phonation, and phonations cns = Consonant <$> places <*> manners <*> phonations <*> airstreams -- Filter out exceptions output = filter (`notElem` exceptions) cns -- Make the plac...
353
false
true
0
12
70
107
59
48
null
null
rzil/honours
LeavittPathAlgebras/Example13.hs
mit
d' = WLPA.AEdge "d" 1
21
d' = WLPA.AEdge "d" 1
21
d' = WLPA.AEdge "d" 1
21
false
false
1
5
4
18
6
12
null
null
karamellpelle/grid
source/Game/Run/RunWorld/Scene/Fancy/Values.hs
gpl-3.0
valueTweakOsc0L :: Float valueTweakOsc0L = 0.637
48
valueTweakOsc0L :: Float valueTweakOsc0L = 0.637
48
valueTweakOsc0L = 0.637
23
false
true
0
4
5
11
6
5
null
null
keent/stack
src/Stack/Sig.hs
bsd-3-clause
-- | The URL of the running signature service to use (sig-service) url :: Parser String url = strOption (long "url" <> short 'u' <> metavar "URL" <> showDefault <> value "https://sig.commercialhaskell.org")
250
url :: Parser String url = strOption (long "url" <> short 'u' <> metavar "URL" <> showDefault <> value "https://sig.commercialhaskell.org")
183
url = strOption (long "url" <> short 'u' <> metavar "URL" <> showDefault <> value "https://sig.commercialhaskell.org")
162
true
true
1
11
75
52
23
29
null
null
judah/tensorflow-haskell
tensorflow/src/TensorFlow/BuildOp.hs
apache-2.0
pureOp :: PureResult a => [Int64] -> Build OpDef -> a pureOp sizes o = flip evalState (ResultState 0 sizes) (runReaderT pureResult o)
133
pureOp :: PureResult a => [Int64] -> Build OpDef -> a pureOp sizes o = flip evalState (ResultState 0 sizes) (runReaderT pureResult o)
133
pureOp sizes o = flip evalState (ResultState 0 sizes) (runReaderT pureResult o)
79
false
true
0
8
22
60
29
31
null
null
Botje/crystal
Crystal/Type.hs
gpl-2.0
isTor (Tor _) = True
20
isTor (Tor _) = True
20
isTor (Tor _) = True
20
false
false
0
7
4
15
7
8
null
null
EduPH/Problemas
FizzBuzz/src/FizzBuzz.hs
gpl-3.0
tens :: Int -> String tens n | n >= 2 && n <= 9 = answers !! (n-2) where answers = words "twenty thirty forty fifty sixty seventy eighty ninety"
170
tens :: Int -> String tens n | n >= 2 && n <= 9 = answers !! (n-2) where answers = words "twenty thirty forty fifty sixty seventy eighty ninety"
170
tens n | n >= 2 && n <= 9 = answers !! (n-2) where answers = words "twenty thirty forty fifty sixty seventy eighty ninety"
148
false
true
3
10
56
68
29
39
null
null
scravy/nodash
doc/Function/compose.hs
mit
compose g f = \x -> g (f x)
27
compose g f = \x -> g (f x)
27
compose g f = \x -> g (f x)
27
false
false
1
8
8
29
12
17
null
null
olsner/ghc
compiler/simplStg/UnariseStg.hs
bsd-3-clause
unariseBinding :: UnariseEnv -> StgBinding -> UniqSM StgBinding unariseBinding rho (StgNonRec x rhs) = StgNonRec x <$> unariseRhs rho rhs
139
unariseBinding :: UnariseEnv -> StgBinding -> UniqSM StgBinding unariseBinding rho (StgNonRec x rhs) = StgNonRec x <$> unariseRhs rho rhs
139
unariseBinding rho (StgNonRec x rhs) = StgNonRec x <$> unariseRhs rho rhs
75
false
true
0
7
21
47
22
25
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_RGBA16I :: GLenum gl_RGBA16I = 0x8D88
40
gl_RGBA16I :: GLenum gl_RGBA16I = 0x8D88
40
gl_RGBA16I = 0x8D88
19
false
true
0
4
5
11
6
5
null
null
mwotton/ctkl
src/Text/CTK/Common.hs
bsd-3-clause
isNopos _ = False
25
isNopos _ = False
25
isNopos _ = False
25
false
false
0
4
11
10
4
6
null
null
lostbean/Hammer
src/Hammer/VoxConn/Types.hs
gpl-3.0
updateDB_SP :: (GridConn g)=> Vector g -> Int -> VoxBoxRange -> Sparse3 Int -> Sparse3 Int updateDB_SP set gid _ sp = let vec = V.map (\p -> (vp2spIn $ toVoxelPos p, gid)) set in SP.adjust vec sp
199
updateDB_SP :: (GridConn g)=> Vector g -> Int -> VoxBoxRange -> Sparse3 Int -> Sparse3 Int updateDB_SP set gid _ sp = let vec = V.map (\p -> (vp2spIn $ toVoxelPos p, gid)) set in SP.adjust vec sp
199
updateDB_SP set gid _ sp = let vec = V.map (\p -> (vp2spIn $ toVoxelPos p, gid)) set in SP.adjust vec sp
108
false
true
0
14
41
100
49
51
null
null
snapframework/heist
src/Heist/Internal/Types.hs
bsd-3-clause
scCompiledTemplateFilter :: Functor f => ((TPath -> Bool) -> f (TPath -> Bool)) -> SpliceConfig m -> f (SpliceConfig m) scCompiledTemplateFilter = lens _scCompiledTemplateFilter setter where setter sc v = sc { _scCompiledTemplateFilter = v }
259
scCompiledTemplateFilter :: Functor f => ((TPath -> Bool) -> f (TPath -> Bool)) -> SpliceConfig m -> f (SpliceConfig m) scCompiledTemplateFilter = lens _scCompiledTemplateFilter setter where setter sc v = sc { _scCompiledTemplateFilter = v }
259
scCompiledTemplateFilter = lens _scCompiledTemplateFilter setter where setter sc v = sc { _scCompiledTemplateFilter = v }
127
false
true
1
12
53
101
46
55
null
null
colinba/tip-toi-reveng
src/GMEWriter.hs
mit
putCondOp Lt = mapM_ putWord8 [0xFB, 0xFF]
43
putCondOp Lt = mapM_ putWord8 [0xFB, 0xFF]
43
putCondOp Lt = mapM_ putWord8 [0xFB, 0xFF]
43
false
false
0
6
7
20
10
10
null
null
rueshyna/gogol
gogol-admin-reports/gen/Network/Google/Reports/Types/Product.hs
mpl-2.0
-- | Creates a value of 'ActivityId' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'aiTime' -- -- * 'aiUniqueQualifier' -- -- * 'aiCustomerId' -- -- * 'aiApplicationName' activityId :: ActivityId activityId = ActivityId' ...
445
activityId :: ActivityId activityId = ActivityId' { _aiTime = Nothing , _aiUniqueQualifier = Nothing , _aiCustomerId = Nothing , _aiApplicationName = Nothing }
187
activityId = ActivityId' { _aiTime = Nothing , _aiUniqueQualifier = Nothing , _aiCustomerId = Nothing , _aiApplicationName = Nothing }
158
true
true
1
7
96
55
35
20
null
null
tamaralipowski/courseography
hs/Css/Constants.hs
gpl-3.0
graphicsDark :: T.Text graphicsDark = "#66A366"
47
graphicsDark :: T.Text graphicsDark = "#66A366"
47
graphicsDark = "#66A366"
24
false
true
0
7
5
20
8
12
null
null
brendanhay/gogol
gogol-tagmanager/gen/Network/Google/TagManager/Types/Product.hs
mpl-2.0
-- | Creates a value of 'ListTagsResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'lisNextPageToken' -- -- * 'lisTag' listTagsResponse :: ListTagsResponse listTagsResponse = ListTagsResponse' {_lisNextPageToken = Nothing...
340
listTagsResponse :: ListTagsResponse listTagsResponse = ListTagsResponse' {_lisNextPageToken = Nothing, _lisTag = Nothing}
128
listTagsResponse = ListTagsResponse' {_lisNextPageToken = Nothing, _lisTag = Nothing}
87
true
true
1
7
55
36
22
14
null
null
ksaveljev/hake-2
src/Constants.hs
bsd-3-clause
sffSystem = 0x10 :: Int
23
sffSystem = 0x10 :: Int
23
sffSystem = 0x10 :: Int
23
false
false
0
4
4
9
5
4
null
null
narurien/ganeti-ceph
src/Ganeti/HTools/Backend/Luxi.hs
gpl-2.0
-- | Parse a instance list in JSON format. getInstances :: NameAssoc -> JSValue -> Result [(String, Instance.Instance)] getInstances ktn arr = extractArray arr >>= mapM (parseInstance ktn)
214
getInstances :: NameAssoc -> JSValue -> Result [(String, Instance.Instance)] getInstances ktn arr = extractArray arr >>= mapM (parseInstance ktn)
171
getInstances ktn arr = extractArray arr >>= mapM (parseInstance ktn)
68
true
true
0
10
53
55
28
27
null
null
randen/cabal
cabal-install/Distribution/Client/Tar.hs
bsd-3-clause
filterEntriesM :: (Monad m) => (Entry -> m Bool) -> Entries -> m Entries filterEntriesM p = foldrEntriesM (\entry rest -> do include <- p entry if include then return $ Next entry rest else return rest) (return Done) (return . Fail)
270
filterEntriesM :: (Monad m) => (Entry -> m Bool) -> Entries -> m Entries filterEntriesM p = foldrEntriesM (\entry rest -> do include <- p entry if include then return $ Next entry rest else return rest) (return Done) (return . Fail)
270
filterEntriesM p = foldrEntriesM (\entry rest -> do include <- p entry if include then return $ Next entry rest else return rest) (return Done) (return . Fail)
197
false
true
0
11
79
109
53
56
null
null
adarqui/99problems-hs
Experimentation/P01.hs
gpl-3.0
test_last_nat_3 = TestCase (assertEqualX "for (last_nat_3 [1,2,9,9]" 9 (last_nat_3 [1,2,9,9]))
94
test_last_nat_3 = TestCase (assertEqualX "for (last_nat_3 [1,2,9,9]" 9 (last_nat_3 [1,2,9,9]))
94
test_last_nat_3 = TestCase (assertEqualX "for (last_nat_3 [1,2,9,9]" 9 (last_nat_3 [1,2,9,9]))
94
false
false
0
10
9
37
20
17
null
null
dillonhuff/IntLang
src/Parser.hs
bsd-3-clause
nameTok :: (Monad m) => String -> ParsecT [Token] u m Token nameTok name = ilTok (hasName name)
95
nameTok :: (Monad m) => String -> ParsecT [Token] u m Token nameTok name = ilTok (hasName name)
95
nameTok name = ilTok (hasName name)
35
false
true
0
8
17
48
24
24
null
null
rodrigosetti/messagepack
Data/MessagePack/Spec.hs
mit
-- 11001101 uint32 = 0xce
28
uint32 = 0xce
16
uint32 = 0xce
16
true
false
1
5
7
11
4
7
null
null
cirquit/hjc
test/CmmParserSpec.hs
mit
spec :: Spec spec = do describe "CmmParser" $ do describe "should be successful for small test" $ do let showTypeErrors = True successfulTitle = "should have zero length of typescope errors in " pathToTestFile = "examples/MiniJava_Examples/Small/" ...
2,656
spec :: Spec spec = do describe "CmmParser" $ do describe "should be successful for small test" $ do let showTypeErrors = True successfulTitle = "should have zero length of typescope errors in " pathToTestFile = "examples/MiniJava_Examples/Small/" ...
2,656
spec = do describe "CmmParser" $ do describe "should be successful for small test" $ do let showTypeErrors = True successfulTitle = "should have zero length of typescope errors in " pathToTestFile = "examples/MiniJava_Examples/Small/" ...
2,643
false
true
0
24
1,392
413
223
190
null
null
oreshinya/refty
src/Refty.hs
mit
references :: Builder -> [(T.Text, Value)] references (Builder res refs) = map (reference res) refs
99
references :: Builder -> [(T.Text, Value)] references (Builder res refs) = map (reference res) refs
99
references (Builder res refs) = map (reference res) refs
56
false
true
0
8
14
48
25
23
null
null
acowley/ghc
compiler/main/BreakArray.hs
bsd-3-clause
-- create a new break array and initialise elements to zero newBreakArray :: DynFlags -> Int -> IO BreakArray newBreakArray dflags entries@(I# sz) = do BA array <- allocBA (entries * wORD_SIZE dflags) case breakOff of W# off -> do -- Todo: there must be a better way to write zero as a Word! ...
542
newBreakArray :: DynFlags -> Int -> IO BreakArray newBreakArray dflags entries@(I# sz) = do BA array <- allocBA (entries * wORD_SIZE dflags) case breakOff of W# off -> do -- Todo: there must be a better way to write zero as a Word! let loop n | isTrue# (n ==# sz) = return () ...
482
newBreakArray dflags entries@(I# sz) = do BA array <- allocBA (entries * wORD_SIZE dflags) case breakOff of W# off -> do -- Todo: there must be a better way to write zero as a Word! let loop n | isTrue# (n ==# sz) = return () | otherwise = do ...
432
true
true
6
15
210
157
72
85
null
null
snoyberg/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
gHC_PARR' :: Module gHC_PARR' = mkBaseModule (fsLit "GHC.PArr")
63
gHC_PARR' :: Module gHC_PARR' = mkBaseModule (fsLit "GHC.PArr")
63
gHC_PARR' = mkBaseModule (fsLit "GHC.PArr")
43
false
true
0
7
7
20
10
10
null
null
mightybyte/reflex-dom-stubs
src/GHCJS/DOM/HTMLElement.hs
bsd-3-clause
ghcjs_dom_html_element_get_is_content_editable = undefined
58
ghcjs_dom_html_element_get_is_content_editable = undefined
58
ghcjs_dom_html_element_get_is_content_editable = undefined
58
false
false
0
4
2
6
3
3
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_CARET_EVEN :: Int wxSTC_CARET_EVEN = 8
44
wxSTC_CARET_EVEN :: Int wxSTC_CARET_EVEN = 8
44
wxSTC_CARET_EVEN = 8
20
false
true
0
4
5
11
6
5
null
null
ekmett/hmpfr
src/Data/Number/MPFR/Arithmetic.hs
bsd-3-clause
pow_ :: RoundMode -> Precision -> MPFR -> MPFR -> (MPFR, Int) pow_ r p d1 d2 = withMPFRsBA r p d1 d2 mpfr_pow
118
pow_ :: RoundMode -> Precision -> MPFR -> MPFR -> (MPFR, Int) pow_ r p d1 d2 = withMPFRsBA r p d1 d2 mpfr_pow
118
pow_ r p d1 d2 = withMPFRsBA r p d1 d2 mpfr_pow
47
false
true
0
11
32
58
28
30
null
null
wilbowma/accelerate
Data/Array/Accelerate/Interpreter.hs
bsd-3-clause
evalLt (NonNumScalarType ty) | NonNumDict <- nonNumDict ty = uncurry (<)
79
evalLt (NonNumScalarType ty) | NonNumDict <- nonNumDict ty = uncurry (<)
79
evalLt (NonNumScalarType ty) | NonNumDict <- nonNumDict ty = uncurry (<)
79
false
false
0
9
17
34
15
19
null
null
iamkingmaker/HLearn
src/HLearn/Data/SpaceTree/CoverTree.hs
bsd-3-clause
rmCloseChildren :: ( ValidCT exprat childC leafC dp ) => AddChildMethod exprat childC leafC dp -> dp -> [CoverTree_ exprat childC leafC dp] -> ( [CoverTree_ exprat childC leafC dp] , [CoverTree_ exprat childC leafC dp] ) rmCloseChildren addChild dp cts = {-# SCC rmCloseChildr...
434
rmCloseChildren :: ( ValidCT exprat childC leafC dp ) => AddChildMethod exprat childC leafC dp -> dp -> [CoverTree_ exprat childC leafC dp] -> ( [CoverTree_ exprat childC leafC dp] , [CoverTree_ exprat childC leafC dp] ) rmCloseChildren addChild dp cts = {-# SCC rmCloseChildr...
434
rmCloseChildren addChild dp cts = {-# SCC rmCloseChildren #-} (map fst xs, P.concat $ map snd xs) where xs = map (extractCloseChildren addChild dp) cts
169
false
true
0
13
123
142
71
71
null
null
eligottlieb/chaitin
src/Evaluator.hs
mit
eqvp [(DottedList xs x), (DottedList ys y)] = eqvp [List $ xs ++ [x], List $ ys ++ [y]]
89
eqvp [(DottedList xs x), (DottedList ys y)] = eqvp [List $ xs ++ [x], List $ ys ++ [y]]
89
eqvp [(DottedList xs x), (DottedList ys y)] = eqvp [List $ xs ++ [x], List $ ys ++ [y]]
89
false
false
0
8
20
63
33
30
null
null
ancientlanguage/haskell-analysis
prepare/src/Prepare/Decompose.hs
mit
decomposeChar '\xF99E' = "\x54BD"
33
decomposeChar '\xF99E' = "\x54BD"
33
decomposeChar '\xF99E' = "\x54BD"
33
false
false
1
5
3
13
4
9
null
null
brendanhay/gogol
gogol-driveactivity/gen/Network/Google/DriveActivity/Types/Product.hs
mpl-2.0
-- | The type of Data Leak Prevention (DLP) change. dlpcType :: Lens' DataLeakPreventionChange (Maybe DataLeakPreventionChangeType) dlpcType = lens _dlpcType (\ s a -> s{_dlpcType = a})
185
dlpcType :: Lens' DataLeakPreventionChange (Maybe DataLeakPreventionChangeType) dlpcType = lens _dlpcType (\ s a -> s{_dlpcType = a})
133
dlpcType = lens _dlpcType (\ s a -> s{_dlpcType = a})
53
true
true
0
9
26
46
25
21
null
null
sinelaw/infernu
docs/semantics.hs
gpl-2.0
push :: Id -> Location -> Env -> Env push x l (Env bs rs) = Env ((x, l) : bs) rs
80
push :: Id -> Location -> Env -> Env push x l (Env bs rs) = Env ((x, l) : bs) rs
80
push x l (Env bs rs) = Env ((x, l) : bs) rs
43
false
true
0
11
21
61
30
31
null
null
rvion/ride
jetpack/src/Network/Wai/Handler/Warp/AsWai.hs
bsd-3-clause
-- constructor :: FilePath -> Integer -> HTTPDate -> ByteString -> FileInfo wai_mk'FileInfo = I.FileInfo
105
wai_mk'FileInfo = I.FileInfo
29
wai_mk'FileInfo = I.FileInfo
29
true
false
0
5
15
9
5
4
null
null
markflorisson/hpack
testrepo/bytestring-0.9.1.9/Data/ByteString/Lazy/Char8.hs
bsd-3-clause
-- | 'span' @p xs@ breaks the ByteString into two segments. It is -- equivalent to @('takeWhile' p xs, 'dropWhile' p xs)@ span :: (Char -> Bool) -> ByteString -> (ByteString, ByteString) span f = L.span (f . w2c)
212
span :: (Char -> Bool) -> ByteString -> (ByteString, ByteString) span f = L.span (f . w2c)
90
span f = L.span (f . w2c)
25
true
true
0
7
38
49
27
22
null
null
brendanhay/gogol
gogol-jobs/gen/Network/Google/Jobs/Types/Product.hs
mpl-2.0
-- | Output only. Derived details about the company. cDerivedInfo :: Lens' Company (Maybe CompanyDerivedInfo) cDerivedInfo = lens _cDerivedInfo (\ s a -> s{_cDerivedInfo = a})
177
cDerivedInfo :: Lens' Company (Maybe CompanyDerivedInfo) cDerivedInfo = lens _cDerivedInfo (\ s a -> s{_cDerivedInfo = a})
124
cDerivedInfo = lens _cDerivedInfo (\ s a -> s{_cDerivedInfo = a})
67
true
true
0
9
27
48
25
23
null
null
lekto/haskell
Project-Euler-Solutions/problem0018.hs
mit
higher (x:xs) (y:ys:yss) = [ x + max y ys ] ++ higher xs (ys:yss)
65
higher (x:xs) (y:ys:yss) = [ x + max y ys ] ++ higher xs (ys:yss)
65
higher (x:xs) (y:ys:yss) = [ x + max y ys ] ++ higher xs (ys:yss)
65
false
false
1
9
14
60
29
31
null
null
typedvar/hLand
hcore/GCompiler.hs
mit
compiledPrimitives :: [GMCompiledSC] compiledPrimitives = [ ("+", 2, [Push 1, Eval, Push 1, Eval, Add, Update 2, Pop 2, Unwind]) , ("-", 2, [Push 1, Eval, Push 1, Eval, Sub, Update 2, Pop 2, Unwind]) , ("*", 2, [Push 1, Eval, Push 1, Eval, Mul, Update 2, Pop 2, Unwind]) , ("/", 2, [Push 1, Ev...
969
compiledPrimitives :: [GMCompiledSC] compiledPrimitives = [ ("+", 2, [Push 1, Eval, Push 1, Eval, Add, Update 2, Pop 2, Unwind]) , ("-", 2, [Push 1, Eval, Push 1, Eval, Sub, Update 2, Pop 2, Unwind]) , ("*", 2, [Push 1, Eval, Push 1, Eval, Mul, Update 2, Pop 2, Unwind]) , ("/", 2, [Push 1, Ev...
969
compiledPrimitives = [ ("+", 2, [Push 1, Eval, Push 1, Eval, Add, Update 2, Pop 2, Unwind]) , ("-", 2, [Push 1, Eval, Push 1, Eval, Sub, Update 2, Pop 2, Unwind]) , ("*", 2, [Push 1, Eval, Push 1, Eval, Mul, Update 2, Pop 2, Unwind]) , ("/", 2, [Push 1, Eval, Push 1, Eval, Div, Update 2, Pop ...
932
false
true
0
10
246
592
342
250
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Collections/Get.hs
mpl-2.0
-- | Required. The ID of the account that contains the collection. This -- account cannot be a multi-client account. cgMerchantId :: Lens' CollectionsGet Int64 cgMerchantId = lens _cgMerchantId (\ s a -> s{_cgMerchantId = a}) . _Coerce
243
cgMerchantId :: Lens' CollectionsGet Int64 cgMerchantId = lens _cgMerchantId (\ s a -> s{_cgMerchantId = a}) . _Coerce
126
cgMerchantId = lens _cgMerchantId (\ s a -> s{_cgMerchantId = a}) . _Coerce
83
true
true
2
8
45
52
25
27
null
null
nevrenato/Hets_Fork
CommonLogic/ATC_CommonLogic.hs
gpl-2.0
_tcCLTextTypeTc :: TyCon _tcCLTextTypeTc = mkTyCon "CommonLogic.Sublogic.CLTextType"
84
_tcCLTextTypeTc :: TyCon _tcCLTextTypeTc = mkTyCon "CommonLogic.Sublogic.CLTextType"
84
_tcCLTextTypeTc = mkTyCon "CommonLogic.Sublogic.CLTextType"
59
false
true
0
6
6
20
8
12
null
null
brendanhay/gogol
gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs
mpl-2.0
-- | Populated for regression models and explicit feedback type matrix -- factorization models. emRegressionMetrics :: Lens' EvaluationMetrics (Maybe RegressionMetrics) emRegressionMetrics = lens _emRegressionMetrics (\ s a -> s{_emRegressionMetrics = a})
263
emRegressionMetrics :: Lens' EvaluationMetrics (Maybe RegressionMetrics) emRegressionMetrics = lens _emRegressionMetrics (\ s a -> s{_emRegressionMetrics = a})
167
emRegressionMetrics = lens _emRegressionMetrics (\ s a -> s{_emRegressionMetrics = a})
94
true
true
0
9
38
49
26
23
null
null
mcschroeder/smc
Formula.hs
mit
ands :: [Formula] -> Formula ands [] = Lit (Neg 0)
54
ands :: [Formula] -> Formula ands [] = Lit (Neg 0)
54
ands [] = Lit (Neg 0)
25
false
true
0
8
14
37
17
20
null
null
y-kamiya/parallel-concurrent-haskell
src/Stm/Async.hs
gpl-2.0
timeout :: Int -> IO a -> IO (Maybe a) timeout n io | n < 0 = fmap Just io | n == 0 = return Nothing | otherwise = do r <- race (threadDelay n) io case r of Left _ -> return Nothing Right a -> return $ Just a
234
timeout :: Int -> IO a -> IO (Maybe a) timeout n io | n < 0 = fmap Just io | n == 0 = return Nothing | otherwise = do r <- race (threadDelay n) io case r of Left _ -> return Nothing Right a -> return $ Just a
234
timeout n io | n < 0 = fmap Just io | n == 0 = return Nothing | otherwise = do r <- race (threadDelay n) io case r of Left _ -> return Nothing Right a -> return $ Just a
195
false
true
0
13
78
139
60
79
null
null
Teaspot-Studio/GPipe-Core
src/Graphics/GPipe/Internal/Texture.hs
mit
readTexture2DToBuffer t@(Texture2D texn _ ml) l (V2 x y) (V2 w h) b i | l < 0 || l >= ml = error "readTexture2DToBuffer, level out of bounds" | x < 0 || x >= mx = error "readTexture2DToBuffer, x out of bounds" | w < 0 || x+w > mx = error "readTexture2DToBuffer, w out of bounds" | y < 0 || y >= my = err...
1,242
readTexture2DToBuffer t@(Texture2D texn _ ml) l (V2 x y) (V2 w h) b i | l < 0 || l >= ml = error "readTexture2DToBuffer, level out of bounds" | x < 0 || x >= mx = error "readTexture2DToBuffer, x out of bounds" | w < 0 || x+w > mx = error "readTexture2DToBuffer, w out of bounds" | y < 0 || y >= my = err...
1,242
readTexture2DToBuffer t@(Texture2D texn _ ml) l (V2 x y) (V2 w h) b i | l < 0 || l >= ml = error "readTexture2DToBuffer, level out of bounds" | x < 0 || x >= mx = error "readTexture2DToBuffer, x out of bounds" | w < 0 || x+w > mx = error "readTexture2DToBuffer, w out of bounds" | y < 0 || y >= my = err...
1,242
false
false
1
13
418
406
186
220
null
null
jtdaugherty/mix-assembler
tests/Tests/MIXWord.hs
bsd-3-clause
testClearByte :: Test testClearByte = let desc = "clearByte does the right thing" mask = (1 `B.shiftL` (fromEnum bitsPerByte)) - 1 in testProperty desc $ forAll (choose (0, 5)) $ \i -> forAll mixInt $ \mi -> let tst = clearByte i mi == expected expecte...
1,097
testClearByte :: Test testClearByte = let desc = "clearByte does the right thing" mask = (1 `B.shiftL` (fromEnum bitsPerByte)) - 1 in testProperty desc $ forAll (choose (0, 5)) $ \i -> forAll mixInt $ \mi -> let tst = clearByte i mi == expected expecte...
1,097
testClearByte = let desc = "clearByte does the right thing" mask = (1 `B.shiftL` (fromEnum bitsPerByte)) - 1 in testProperty desc $ forAll (choose (0, 5)) $ \i -> forAll mixInt $ \mi -> let tst = clearByte i mi == expected expected = mi B..&. preserved...
1,075
false
true
0
23
494
324
168
156
null
null
urbanslug/ghc
testsuite/tests/lib/integer/integerGmpInternals.hs
bsd-3-clause
powModInteger :: Integer -> Integer -> Integer -> Integer powModInteger = I.powModInteger
89
powModInteger :: Integer -> Integer -> Integer -> Integer powModInteger = I.powModInteger
89
powModInteger = I.powModInteger
31
false
true
0
7
11
25
13
12
null
null