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
joelwilliamson/reddit-digest
Persist.hs
gpl-3.0
currentTime Hour t = (floor (utctDayTime t) `mod` 3600) `div` 60
64
currentTime Hour t = (floor (utctDayTime t) `mod` 3600) `div` 60
64
currentTime Hour t = (floor (utctDayTime t) `mod` 3600) `div` 60
64
false
false
0
10
10
35
19
16
null
null
clupascu/codegolf
135541-toggle-the-box/toggleBox_golfed.hs
mit
t y|h y=((map m).m)y|1<2=b y
28
t y|h y=((map m).m)y|1<2=b y
28
t y|h y=((map m).m)y|1<2=b y
28
false
false
0
10
4
48
21
27
null
null
awagner83/identifiers
src/Data/TrieMap.hs
bsd-3-clause
createNode (k:ks) v = Vertical k $ createNode ks v
50
createNode (k:ks) v = Vertical k $ createNode ks v
50
createNode (k:ks) v = Vertical k $ createNode ks v
50
false
false
0
7
9
30
14
16
null
null
GaloisInc/halvm-ghc
compiler/iface/IfaceType.hs
bsd-3-clause
ppr_co ctxt_prec co@(IfaceForAllCo {}) = maybeParen ctxt_prec FunPrec (pprIfaceForAllCoPart tvs (pprIfaceCoercion inner_co)) where (tvs, inner_co) = split_co co split_co (IfaceForAllCo (name, _) kind_co co') = let (tvs, co'') = split_co co' in ((name,kind_co):tvs,co'') split_co co' = ([], co')
317
ppr_co ctxt_prec co@(IfaceForAllCo {}) = maybeParen ctxt_prec FunPrec (pprIfaceForAllCoPart tvs (pprIfaceCoercion inner_co)) where (tvs, inner_co) = split_co co split_co (IfaceForAllCo (name, _) kind_co co') = let (tvs, co'') = split_co co' in ((name,kind_co):tvs,co'') split_co co' = ([], co')
317
ppr_co ctxt_prec co@(IfaceForAllCo {}) = maybeParen ctxt_prec FunPrec (pprIfaceForAllCoPart tvs (pprIfaceCoercion inner_co)) where (tvs, inner_co) = split_co co split_co (IfaceForAllCo (name, _) kind_co co') = let (tvs, co'') = split_co co' in ((name,kind_co):tvs,co'') split_co co' = ([], co')
317
false
false
0
9
60
138
72
66
null
null
tjakway/ghcjvm
compiler/prelude/PrelNames.hs
bsd-3-clause
toListName = varQual gHC_EXTS (fsLit "toList") toListClassOpKey
71
toListName = varQual gHC_EXTS (fsLit "toList") toListClassOpKey
71
toListName = varQual gHC_EXTS (fsLit "toList") toListClassOpKey
71
false
false
0
7
14
19
9
10
null
null
stephane-rolland/aastraal
aastraal-client-brick/src/Command.hs
gpl-3.0
parseElems ("task-set-status" : args) = parseTaskSetStatus args
63
parseElems ("task-set-status" : args) = parseTaskSetStatus args
63
parseElems ("task-set-status" : args) = parseTaskSetStatus args
63
false
false
0
6
6
20
9
11
null
null
fpco/schoolofhaskell
soh-client/src/View/Build.hs
mit
buildTab (Building _ (UpdateStatusFailed err)) = text $ "Build failed: " <> err
79
buildTab (Building _ (UpdateStatusFailed err)) = text $ "Build failed: " <> err
79
buildTab (Building _ (UpdateStatusFailed err)) = text $ "Build failed: " <> err
79
false
false
0
8
12
32
15
17
null
null
moonKimura/vector-0.10.9.1
Data/Vector/Fusion/Stream/Monadic.hs
bsd-3-clause
iterateN n f x0 = iterateNM n (return . f) x0
45
iterateN n f x0 = iterateNM n (return . f) x0
45
iterateN n f x0 = iterateNM n (return . f) x0
45
false
false
1
7
10
33
13
20
null
null
tolysz/prepare-ghcjs
spec-lts8/base/GHC/Event/Internal.hs
bsd-3-clause
elEvent :: EventLifetime -> Event elEvent (EL x) = Event (x .&. 0x7)
68
elEvent :: EventLifetime -> Event elEvent (EL x) = Event (x .&. 0x7)
68
elEvent (EL x) = Event (x .&. 0x7)
34
false
true
0
9
12
40
18
22
null
null
xmonad/xmonad-contrib
XMonad/Actions/OnScreen.hs
bsd-3-clause
-- | Switch to workspace @i@ on screen @sc@. If @i@ is visible use @greedyView@ -- to switch the current workspace with workspace @i@. greedyViewOnScreen :: ScreenId -- ^ screen id -> WorkspaceId -- ^ index of the workspace -> WindowSet -- ^ current stack ->...
409
greedyViewOnScreen :: ScreenId -- ^ screen id -> WorkspaceId -- ^ index of the workspace -> WindowSet -- ^ current stack -> WindowSet greedyViewOnScreen sid i = onScreen (greedyView i) (FocusTagVisible i) sid
274
greedyViewOnScreen sid i = onScreen (greedyView i) (FocusTagVisible i) sid
78
true
true
0
7
122
52
28
24
null
null
hackern/halfs
test/fuse/src/Halfs.hs
bsd-3-clause
halfsRemoveLink :: HalfsCapable b t r l m => HalfsSpecific b r l m -> FilePath -> m Errno halfsRemoveLink hsp@HS{ hspLogger = log } fp = do log $ "halfsRemoveLink: fp = " ++ show fp execDefault hsp $ rmlink fp
264
halfsRemoveLink :: HalfsCapable b t r l m => HalfsSpecific b r l m -> FilePath -> m Errno halfsRemoveLink hsp@HS{ hspLogger = log } fp = do log $ "halfsRemoveLink: fp = " ++ show fp execDefault hsp $ rmlink fp
264
halfsRemoveLink hsp@HS{ hspLogger = log } fp = do log $ "halfsRemoveLink: fp = " ++ show fp execDefault hsp $ rmlink fp
123
false
true
0
9
96
90
42
48
null
null
Mr-Click/PFQ
user/Haskell/Network/PFq/Default.hs
gpl-2.0
-- | Evaluate to the /tot_len/ field of the IP header. ip_tot_len = Property "ip_tot_len" () () () () () () () ()
113
ip_tot_len = Property "ip_tot_len" () () () () () () () ()
58
ip_tot_len = Property "ip_tot_len" () () () () () () () ()
58
true
false
0
6
22
42
21
21
null
null
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Core31/Tokens.hs
bsd-3-clause
gl_POLYGON_OFFSET_LINE :: GLenum gl_POLYGON_OFFSET_LINE = 0x2A02
64
gl_POLYGON_OFFSET_LINE :: GLenum gl_POLYGON_OFFSET_LINE = 0x2A02
64
gl_POLYGON_OFFSET_LINE = 0x2A02
31
false
true
0
4
5
11
6
5
null
null
beni55/haste-compiler
libraries/ghc-7.10/ghc-prim/GHC/Prim.hs
bsd-3-clause
reallyUnsafePtrEquality# :: a -> a -> Int# reallyUnsafePtrEquality# = let x = x in x
84
reallyUnsafePtrEquality# :: a -> a -> Int# reallyUnsafePtrEquality# = let x = x in x
84
reallyUnsafePtrEquality# = let x = x in x
41
false
true
0
8
14
37
16
21
null
null
turion/haskell-asteroids
src/Physics.hs
mit
collideAsteroids :: GameObject -> GameObject -> Event CollisionResult collideAsteroids object other | overlap object other = Event (Correction (objectCollisionCorrection , otherCollisionCorrection)) | norm difference < 0.00000001 = NoEvent | otherwise = NoEvent where -- calculate collisio...
1,706
collideAsteroids :: GameObject -> GameObject -> Event CollisionResult collideAsteroids object other | overlap object other = Event (Correction (objectCollisionCorrection , otherCollisionCorrection)) | norm difference < 0.00000001 = NoEvent | otherwise = NoEvent where -- calculate collisio...
1,706
collideAsteroids object other | overlap object other = Event (Correction (objectCollisionCorrection , otherCollisionCorrection)) | norm difference < 0.00000001 = NoEvent | otherwise = NoEvent where -- calculate collision normal difference = location object ^-^ location other ...
1,636
false
true
1
10
442
319
167
152
null
null
chreekat/snowdrift
View/Comment.hs
agpl-3.0
-- | Helper function for commentForestWidget/commentTreeWidget that takes an -- ActionPermissionsMap (as opposed to a MakeActionPermissionsMap). Unexported. commentTreeWidget' :: Tree (Entity Comment) -> Maybe UserId -- ^ Viewer. -> CommentRoutes -> ActionPermissionsMap ...
3,191
commentTreeWidget' :: Tree (Entity Comment) -> Maybe UserId -- ^ Viewer. -> CommentRoutes -> ActionPermissionsMap -> [CommentClosing] -- ^ Earlier closures. -> [CommentRetracting] -- ^ Earlier retracts. -> Map UserId User -> Map CommentId C...
3,034
commentTreeWidget' (Node root_entity@(Entity root_id root) children) mviewer_id comment_routes action_permissions_map earlier_closures earlier_retracts user_map close_map retract_map ticket_map claim_map flag_map is_...
2,308
true
true
0
20
1,262
428
220
208
null
null
wjt/bustle
Bustle/StatisticsPane.hs
lgpl-2.1
addTextRenderer :: TreeViewColumn -> ListStore a -> Bool -> (a -> Marquee) -> IO CellRendererText addTextRenderer col store expand f = do renderer <- cellRendererTextNew cellLayoutPackStart col renderer expand set renderer [ cellTextSizePoints ...
468
addTextRenderer :: TreeViewColumn -> ListStore a -> Bool -> (a -> Marquee) -> IO CellRendererText addTextRenderer col store expand f = do renderer <- cellRendererTextNew cellLayoutPackStart col renderer expand set renderer [ cellTextSizePoints ...
468
addTextRenderer col store expand f = do renderer <- cellRendererTextNew cellLayoutPackStart col renderer expand set renderer [ cellTextSizePoints := 7 ] cellLayoutSetAttributes col renderer store $ \x -> [ cellTextMarkup := (Just . Marquee.toPangoMarkup) $ f x ] return renderer
306
false
true
0
14
146
129
61
68
null
null
Philonous/hs-otr
source/Otr.hs
mit
-- randomIntegerBytes :: Int ->Otr Integer randomIntegerBytes :: (CRandom.CPRG g, MonadRandom g m) => Int -> m Integer randomIntegerBytes b = (rollInteger . BS.unpack) `liftM` getBytes b
205
randomIntegerBytes :: (CRandom.CPRG g, MonadRandom g m) => Int -> m Integer randomIntegerBytes b = (rollInteger . BS.unpack) `liftM` getBytes b
162
randomIntegerBytes b = (rollInteger . BS.unpack) `liftM` getBytes b
67
true
true
0
8
45
59
31
28
null
null
Pitometsu/bake
src/General/HTML.hs
bsd-3-clause
h1_ = tag_ "h1"
15
h1_ = tag_ "h1"
15
h1_ = tag_ "h1"
15
false
false
1
5
3
12
4
8
null
null
input-output-hk/pos-haskell-prototype
auxx/src/Lang/Argument.hs
mit
lookupArgSingle :: Name -> [Arg Value] -> Either ArgumentError (Value, [Arg Value]) lookupArgSingle name args = do let (mValue, args') = lookupArgOpt name args case mValue of Nothing -> Left mempty { aeMissingKeys = Set.singleton name } Just v -> return (v, args')
304
lookupArgSingle :: Name -> [Arg Value] -> Either ArgumentError (Value, [Arg Value]) lookupArgSingle name args = do let (mValue, args') = lookupArgOpt name args case mValue of Nothing -> Left mempty { aeMissingKeys = Set.singleton name } Just v -> return (v, args')
304
lookupArgSingle name args = do let (mValue, args') = lookupArgOpt name args case mValue of Nothing -> Left mempty { aeMissingKeys = Set.singleton name } Just v -> return (v, args')
205
false
true
0
14
82
116
57
59
null
null
achirkin/easytensor
easytensor/test/Numeric/DataFrame/BasicTest.hs
bsd-3-clause
prop_comparisonsVanillaOrdFloat :: SomeDataFrame '[Float, Float] -> Property prop_comparisonsVanillaOrdFloat (SomeDataFrame (x :*: y :*: Z)) = comparisons x y .&&. vanillaOrdComparisons x y
191
prop_comparisonsVanillaOrdFloat :: SomeDataFrame '[Float, Float] -> Property prop_comparisonsVanillaOrdFloat (SomeDataFrame (x :*: y :*: Z)) = comparisons x y .&&. vanillaOrdComparisons x y
191
prop_comparisonsVanillaOrdFloat (SomeDataFrame (x :*: y :*: Z)) = comparisons x y .&&. vanillaOrdComparisons x y
114
false
true
0
10
23
60
30
30
null
null
oldmanmike/ghc
compiler/codeGen/StgCmmUtils.hs
bsd-3-clause
mk_float_switch :: Width -> CmmExpr -> BlockId -> LitBound -> [(Literal,BlockId)] -> FCode CmmAGraph mk_float_switch rep scrut deflt _bounds [(lit,blk)] = do dflags <- getDynFlags return $ mkCbranch (cond dflags) deflt blk Nothing where cond dflags = CmmMachOp ne...
427
mk_float_switch :: Width -> CmmExpr -> BlockId -> LitBound -> [(Literal,BlockId)] -> FCode CmmAGraph mk_float_switch rep scrut deflt _bounds [(lit,blk)] = do dflags <- getDynFlags return $ mkCbranch (cond dflags) deflt blk Nothing where cond dflags = CmmMachOp ne...
427
mk_float_switch rep scrut deflt _bounds [(lit,blk)] = do dflags <- getDynFlags return $ mkCbranch (cond dflags) deflt blk Nothing where cond dflags = CmmMachOp ne [scrut, CmmLit cmm_lit] where cmm_lit = mkSimpleLit dflags lit ne = MO_F_Ne rep
284
false
true
0
11
135
137
69
68
null
null
ckaestne/CIDE
CIDE_Language_Haskell/test/WSP/Webserver/Response.hs
gpl-3.0
serviceUnavailableResponse = error_resp 503
43
serviceUnavailableResponse = error_resp 503
43
serviceUnavailableResponse = error_resp 503
43
false
false
0
5
3
9
4
5
null
null
Lemmih/haskell-tc
src/Language/Haskell/TypeCheck/Subsumption.hs
mit
-- coercion :: sigma -> rho instantiate :: Sigma s -> TI s (Rho s, TcCoercion s) instantiate (TcForall [] (TcQual [] ty)) = do -- debug $ "Instatiate: Silly forall" instantiate ty
183
instantiate :: Sigma s -> TI s (Rho s, TcCoercion s) instantiate (TcForall [] (TcQual [] ty)) = do -- debug $ "Instatiate: Silly forall" instantiate ty
155
instantiate (TcForall [] (TcQual [] ty)) = do -- debug $ "Instatiate: Silly forall" instantiate ty
102
true
true
0
10
36
66
32
34
null
null
pachopepe/Calculational
examples/Examples.hs
mit
maxSalaryByAge' :: Set (Integer,Infty Integer) maxSalaryByAge' = [calc| { p <- persons, e <- employees | : (age p,(max x<-[1] | personIdE e == personId p : Value (salary e))) } |]
179
maxSalaryByAge' :: Set (Integer,Infty Integer) maxSalaryByAge' = [calc| { p <- persons, e <- employees | : (age p,(max x<-[1] | personIdE e == personId p : Value (salary e))) } |]
179
maxSalaryByAge' = [calc| { p <- persons, e <- employees | : (age p,(max x<-[1] | personIdE e == personId p : Value (salary e))) } |]
132
false
true
2
6
31
34
16
18
null
null
wjdhamilton/ig-haskell
test/IGSpec.hs
bsd-3-clause
spec :: Spec spec = do describe "host" hostSpec describe "apiError" apiErrorSpec describe "decodeError" decodeErrorSpec
125
spec :: Spec spec = do describe "host" hostSpec describe "apiError" apiErrorSpec describe "decodeError" decodeErrorSpec
125
spec = do describe "host" hostSpec describe "apiError" apiErrorSpec describe "decodeError" decodeErrorSpec
112
false
true
0
8
20
42
16
26
null
null
laurencer/confluence-sync
vendor/haxr/PrettyNoMin.hs
bsd-3-clause
containsDoubleQuote :: [EV] -> Bool containsDoubleQuote evs = any csq evs where csq (EVString s) = '"' `elem` BU.fromString s csq _ = False
164
containsDoubleQuote :: [EV] -> Bool containsDoubleQuote evs = any csq evs where csq (EVString s) = '"' `elem` BU.fromString s csq _ = False
164
containsDoubleQuote evs = any csq evs where csq (EVString s) = '"' `elem` BU.fromString s csq _ = False
128
false
true
0
7
48
68
32
36
null
null
spacekitteh/smcghc
libraries/base/System/IO/Error.hs
bsd-3-clause
-- | I\/O error where the operation is not possible. isIllegalOperationErrorType :: IOErrorType -> Bool isIllegalOperationErrorType IllegalOperation = True
155
isIllegalOperationErrorType :: IOErrorType -> Bool isIllegalOperationErrorType IllegalOperation = True
102
isIllegalOperationErrorType IllegalOperation = True
51
true
true
0
5
18
19
10
9
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/lexDigits_1.hs
mit
span :: (a -> MyBool) -> (List a) -> Tup2 (List a) (List a); span p Nil = span3 p Nil
91
span :: (a -> MyBool) -> (List a) -> Tup2 (List a) (List a) span p Nil = span3 p Nil
90
span p Nil = span3 p Nil
24
false
true
1
9
26
69
31
38
null
null
rifung/nand2tetris
projects/compiler/src/Translator/Parser.hs
gpl-3.0
labelValidChars :: S.Set Char labelValidChars = S.fromList $ ['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] ++ ['_', '.', ':']
122
labelValidChars :: S.Set Char labelValidChars = S.fromList $ ['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] ++ ['_', '.', ':']
122
labelValidChars = S.fromList $ ['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] ++ ['_', '.', ':']
92
false
true
2
7
20
65
33
32
null
null
mettekou/ghc
compiler/utils/Bag.hs
bsd-3-clause
bagToList :: Bag a -> [a] bagToList b = foldrBag (:) [] b
57
bagToList :: Bag a -> [a] bagToList b = foldrBag (:) [] b
57
bagToList b = foldrBag (:) [] b
31
false
true
0
6
12
35
18
17
null
null
phischu/fragnix
benchmarks/containers/Data.Map.Base.hs
bsd-3-clause
-- | /O(n)/. Build a map from an ascending list of distinct elements in linear time. -- /The precondition is not checked./ -- -- > fromDistinctAscList [(3,"b"), (5,"a")] == fromList [(3, "b"), (5, "a")] -- > valid (fromDistinctAscList [(3,"b"), (5,"a")]) == True -- > valid (fromDistinctAscList [(3,"b"), (5,"a"...
543
fromDistinctAscList :: [(k,a)] -> Map k a fromDistinctAscList [] = Tip
70
fromDistinctAscList [] = Tip
28
true
true
0
8
94
47
27
20
null
null
olsner/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
isAnyTy = is_tc anyTyConKey
34
isAnyTy = is_tc anyTyConKey
34
isAnyTy = is_tc anyTyConKey
34
false
false
1
5
10
13
4
9
null
null
mcschroeder/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
-- applications don't display anything themselves isQuietHsExpr (HsApp _ _) = True
89
isQuietHsExpr (HsApp _ _) = True
39
isQuietHsExpr (HsApp _ _) = True
39
true
false
0
6
18
19
9
10
null
null
patperry/permutation
lib/Data/Permute/Base.hs
bsd-3-clause
getSizeSTPermute :: STPermute s -> ST s Int getSizeSTPermute (STPermute marr) = ArrST.getNumElements marr
105
getSizeSTPermute :: STPermute s -> ST s Int getSizeSTPermute (STPermute marr) = ArrST.getNumElements marr
105
getSizeSTPermute (STPermute marr) = ArrST.getNumElements marr
61
false
true
0
7
13
37
17
20
null
null
d-day/relation
include/pointfree-style/pointfree-1.0.4.3/Plugin/Pl/Rules.hs
bsd-3-clause
-- use only this rewrite rule rr0 r1 r2 = RR r1' r2' where r1' = getRewrite r1 r2' = getRewrite r2
102
rr0 r1 r2 = RR r1' r2' where r1' = getRewrite r1 r2' = getRewrite r2
72
rr0 r1 r2 = RR r1' r2' where r1' = getRewrite r1 r2' = getRewrite r2
72
true
false
0
5
25
34
17
17
null
null
mightymoose/liquidhaskell
docs/slides/BOS14/hs/start/02_AbstractRefinements.hs
bsd-3-clause
{-@ qual2 :: y:_ -> ys:_ -> {v:_ | size v <= 1 + size ys} @-} qual2 :: a -> List a -> List a qual2 y ys = undefined
117
qual2 :: a -> List a -> List a qual2 y ys = undefined
53
qual2 y ys = undefined
22
true
true
0
8
32
36
16
20
null
null
loadimpact/http2-test
hs-src/reh-mimic.hs
bsd-3-clause
configureLoggingToConsole :: IO () configureLoggingToConsole = do s <- streamHandler stderr DEBUG >>= \lh -> return $ setFormatter lh (simpleLogFormatter "[$time : $loggername : $prio] $msg") setLoggerLevels s
228
configureLoggingToConsole :: IO () configureLoggingToConsole = do s <- streamHandler stderr DEBUG >>= \lh -> return $ setFormatter lh (simpleLogFormatter "[$time : $loggername : $prio] $msg") setLoggerLevels s
228
configureLoggingToConsole = do s <- streamHandler stderr DEBUG >>= \lh -> return $ setFormatter lh (simpleLogFormatter "[$time : $loggername : $prio] $msg") setLoggerLevels s
193
false
true
0
13
46
58
27
31
null
null
michaeljklein/git-details
src/Data/Char/Parse.hs
bsd-3-clause
-- | Escape a `Char`, per -- <https://downloads.haskell.org/~ghc/6.12.2/docs/html/libraries/base-4.2.0.1/src/Text-Read-Lex.html Text.Read.Lex> escapeChar :: Char -> Char escapeChar c = case c of 'a' -> '\a' 'b' -> '\b' 'f' -> '\f' 'n' -> '\n' ...
512
escapeChar :: Char -> Char escapeChar c = case c of 'a' -> '\a' 'b' -> '\b' 'f' -> '\f' 'n' -> '\n' 'r' -> '\r' 't' -> '\t' 'v' -> '\v' '\\' -> '\\' '\"' -> '\"' ...
369
escapeChar c = case c of 'a' -> '\a' 'b' -> '\b' 'f' -> '\f' 'n' -> '\n' 'r' -> '\r' 't' -> '\t' 'v' -> '\v' '\\' -> '\\' '\"' -> '\"' '\'' -> '\'' ...
342
true
true
0
7
240
90
46
44
null
null
m-alvarez/jhc
src/Doc/Pretty.hs
mit
align d = column (\k -> nesting (\i -> nest (k - i) d))
81
align d = column (\k -> nesting (\i -> nest (k - i) d))
81
align d = column (\k -> nesting (\i -> nest (k - i) d))
81
false
false
0
13
39
43
22
21
null
null
JacquesCarette/literate-scientific-software
code/drasil-example/Drasil/GamePhysics/DesignDec/Arbiter.hs
bsd-2-clause
vNormal = makeVC "normal" (nounPhrase "normal") (Atomic "normal")
77
vNormal = makeVC "normal" (nounPhrase "normal") (Atomic "normal")
77
vNormal = makeVC "normal" (nounPhrase "normal") (Atomic "normal")
77
false
false
0
7
19
25
12
13
null
null
lfairy/sparkle
Sparkle/Types.hs
agpl-3.0
replaceTask :: Pos -> Task -> Update Project () replaceTask pos x = withTasks (replaceTask' pos x)
98
replaceTask :: Pos -> Task -> Update Project () replaceTask pos x = withTasks (replaceTask' pos x)
98
replaceTask pos x = withTasks (replaceTask' pos x)
50
false
true
0
8
16
42
20
22
null
null
hengchu/CoreLang
CoreLang/TInst.hs
mit
showStkNode heap node = showNode node
37
showStkNode heap node = showNode node
37
showStkNode heap node = showNode node
37
false
false
1
5
5
19
6
13
null
null
Oscarzhao/haskell
learnyouahaskell/solving_problem/groupof/groupof.hs
apache-2.0
groupOf n xs = take n xs : groupOf n (drop n xs)
48
groupOf n xs = take n xs : groupOf n (drop n xs)
48
groupOf n xs = take n xs : groupOf n (drop n xs)
48
false
false
0
8
12
33
15
18
null
null
bitemyapp/text-pipes
Pipes/Text.hs
bsd-3-clause
-- | Return the minimum 'Char' within a text stream (surely very useful!) minimum :: (Monad m) => Producer Text m () -> m (Maybe Char) minimum = P.fold step Nothing id where step mc txt = if (T.null txt) then mc else case mc of Nothing -> Just (T.minimum txt) Just c...
353
minimum :: (Monad m) => Producer Text m () -> m (Maybe Char) minimum = P.fold step Nothing id where step mc txt = if (T.null txt) then mc else case mc of Nothing -> Just (T.minimum txt) Just c -> Just (min c (T.minimum txt))
279
minimum = P.fold step Nothing id where step mc txt = if (T.null txt) then mc else case mc of Nothing -> Just (T.minimum txt) Just c -> Just (min c (T.minimum txt))
218
true
true
0
14
113
129
64
65
null
null
ilyasergey/GHC-XAppFix
compiler/main/DynFlags.hs
bsd-3-clause
pgm_l :: DynFlags -> (String,[Option]) pgm_l dflags = sPgm_l (settings dflags)
94
pgm_l :: DynFlags -> (String,[Option]) pgm_l dflags = sPgm_l (settings dflags)
94
pgm_l dflags = sPgm_l (settings dflags)
39
false
true
0
7
26
36
19
17
null
null
nna774/term
Testing/Term.hs
gpl-3.0
getForm (ForAllBounded _ _ f) = f
33
getForm (ForAllBounded _ _ f) = f
33
getForm (ForAllBounded _ _ f) = f
33
false
false
0
6
6
20
9
11
null
null
stone-guru/tmmha
test/src/SelectorTest.hs
gpl-3.0
p20Tests = TestList [TestLabel "testAt" testAt]
47
p20Tests = TestList [TestLabel "testAt" testAt]
47
p20Tests = TestList [TestLabel "testAt" testAt]
47
false
false
1
6
5
20
8
12
null
null
eelcoh/cryptochallenge
src/Crypto/AES.hs
bsd-3-clause
get_randoms :: StdGen -> Int -> (B.ByteString, StdGen) get_randoms g keysz = let create_randoms = iterate (\rg -> random (snd rg) :: (Word8, StdGen)) to_byte_string rgs = map fst rgs |> B.pack |> (flip (,)) (last rgs |> snd) in create_randoms (0x00, g) |> take keysz |> ...
334
get_randoms :: StdGen -> Int -> (B.ByteString, StdGen) get_randoms g keysz = let create_randoms = iterate (\rg -> random (snd rg) :: (Word8, StdGen)) to_byte_string rgs = map fst rgs |> B.pack |> (flip (,)) (last rgs |> snd) in create_randoms (0x00, g) |> take keysz |> ...
334
get_randoms g keysz = let create_randoms = iterate (\rg -> random (snd rg) :: (Word8, StdGen)) to_byte_string rgs = map fst rgs |> B.pack |> (flip (,)) (last rgs |> snd) in create_randoms (0x00, g) |> take keysz |> to_byte_string
279
false
true
4
14
97
139
72
67
null
null
SnowOnion/GrahamHaskellPractice
ch09/Parsing.hs
mit
natural :: Parser Int natural = token nat
86
natural :: Parser Int natural = token nat
86
natural = token nat
42
false
true
0
5
52
17
8
9
null
null
cfredric/arithmoi
test-suite/Math/NumberTheory/Primes/FactorisationTests.hs
mit
factoriseProperty6 :: (Integer, [(Integer, Int)]) -> Assertion factoriseProperty6 (n, fs) = assertEqual (show n) (sort fs) (sort (factorise n))
143
factoriseProperty6 :: (Integer, [(Integer, Int)]) -> Assertion factoriseProperty6 (n, fs) = assertEqual (show n) (sort fs) (sort (factorise n))
143
factoriseProperty6 (n, fs) = assertEqual (show n) (sort fs) (sort (factorise n))
80
false
true
0
9
18
70
38
32
null
null
xmonad/xmonad-contrib
XMonad/Actions/CycleWorkspaceByScreen.hs
bsd-3-clause
handleKeyEvent :: EventType -> KeySym -> X () -> EventType -> KeySym -> Maybe (X ()) handleKeyEvent eventType key action = helper where helper et k | et == eventType && k == key = Just action | otherwise = Nothing
300
handleKeyEvent :: EventType -> KeySym -> X () -> EventType -> KeySym -> Maybe (X ()) handleKeyEvent eventType key action = helper where helper et k | et == eventType && k == key = Just action | otherwise = Nothing
300
handleKeyEvent eventType key action = helper where helper et k | et == eventType && k == key = Just action | otherwise = Nothing
140
false
true
0
13
127
97
45
52
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV :: GLenum gl_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV = 0x8C4D
94
gl_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV :: GLenum gl_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV = 0x8C4D
94
gl_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV = 0x8C4D
46
false
true
0
4
5
11
6
5
null
null
rosenbergdm/language-r
src/Language/R/Lexer.hs
bsd-3-clause
hexadecimal = T.hexadecimal rlang
39
hexadecimal = T.hexadecimal rlang
39
hexadecimal = T.hexadecimal rlang
39
false
false
0
6
9
11
5
6
null
null
JacquesCarette/literate-scientific-software
code/drasil-gool/GOOL/Drasil/LanguageRenderer/LanguagePolymorphic.hs
bsd-2-clause
listInnerType :: (RenderSym repr) => VS (repr (Type repr)) -> VS (repr (Type repr)) listInnerType t = t >>= (convType . getInnerType . getType)
146
listInnerType :: (RenderSym repr) => VS (repr (Type repr)) -> VS (repr (Type repr)) listInnerType t = t >>= (convType . getInnerType . getType)
146
listInnerType t = t >>= (convType . getInnerType . getType)
59
false
true
0
12
26
77
37
40
null
null
tjakway/ghcjvm
compiler/main/TidyPgm.hs
bsd-3-clause
tidyProgram :: HscEnv -> ModGuts -> IO (CgGuts, ModDetails) tidyProgram hsc_env (ModGuts { mg_module = mod , mg_exports = exports , mg_rdr_env = rdr_env , mg_tcs = tcs , mg_insts = c...
5,953
tidyProgram :: HscEnv -> ModGuts -> IO (CgGuts, ModDetails) tidyProgram hsc_env (ModGuts { mg_module = mod , mg_exports = exports , mg_rdr_env = rdr_env , mg_tcs = tcs , mg_insts = c...
5,953
tidyProgram hsc_env (ModGuts { mg_module = mod , mg_exports = exports , mg_rdr_env = rdr_env , mg_tcs = tcs , mg_insts = cls_insts , mg_fam_insts = fam_...
5,893
false
true
0
19
2,581
853
471
382
null
null
ItsLastDay/academic_university_2016-2018
subjects/Haskell/coursework_tests.hs
gpl-3.0
betaEq :: Expr -> Expr -> Bool betaEq a b = alphaEq (nf a) (nf b)
66
betaEq :: Expr -> Expr -> Bool betaEq a b = alphaEq (nf a) (nf b)
65
betaEq a b = alphaEq (nf a) (nf b)
34
false
true
0
7
16
45
21
24
null
null
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/ARB/Compatibility/Tokens.hs
bsd-3-clause
gl_ZOOM_Y :: GLenum gl_ZOOM_Y = 0x0D17
38
gl_ZOOM_Y :: GLenum gl_ZOOM_Y = 0x0D17
38
gl_ZOOM_Y = 0x0D17
18
false
true
0
4
5
11
6
5
null
null
ericTsiliacos/stethoscope
src/Web/Server.hs
bsd-3-clause
getParam :: (Eq a) => [(a, b)] -> a -> Maybe b getParam [] paramName = Nothing
78
getParam :: (Eq a) => [(a, b)] -> a -> Maybe b getParam [] paramName = Nothing
78
getParam [] paramName = Nothing
31
false
true
0
8
16
47
25
22
null
null
bnordbo/keiretsu
src/Keiretsu/Process.hs
mpl-2.0
catchError :: a -> SomeException -> IO a catchError a _ = return a
66
catchError :: a -> SomeException -> IO a catchError a _ = return a
66
catchError a _ = return a
25
false
true
0
8
13
34
15
19
null
null
yliu120/K3
src/Language/K3/Analysis/HMTypes/Inference.hs
apache-2.0
tiexte :: TIEnv -> Identifier -> QPType -> TIEnv tiexte env x t = env {tenv=text (tenv env) x t}
96
tiexte :: TIEnv -> Identifier -> QPType -> TIEnv tiexte env x t = env {tenv=text (tenv env) x t}
96
tiexte env x t = env {tenv=text (tenv env) x t}
47
false
true
0
9
19
51
26
25
null
null
achirkin/BuildWrapper
test/Language/Haskell/BuildWrapper/CMDTests.hs
bsd-3-clause
startAPIProcess :: FilePath -> String -> [String] -> IO (Handle, Handle, Handle, ProcessHandle) startAPIProcess root command args= do cd<-getCurrentDirectory let fullargs=[command,"--tempfolder=.dist-buildwrapper","--cabalpath=cabal","--cabalfile="++ testCabalFile root] ++ args exePath<-filterM...
592
startAPIProcess :: FilePath -> String -> [String] -> IO (Handle, Handle, Handle, ProcessHandle) startAPIProcess root command args= do cd<-getCurrentDirectory let fullargs=[command,"--tempfolder=.dist-buildwrapper","--cabalpath=cabal","--cabalfile="++ testCabalFile root] ++ args exePath<-filterM...
592
startAPIProcess root command args= do cd<-getCurrentDirectory let fullargs=[command,"--tempfolder=.dist-buildwrapper","--cabalpath=cabal","--cabalfile="++ testCabalFile root] ++ args exePath<-filterM doesFileExist [".dist-buildwrapper/dist/build/buildwrapper/buildwrapper" <.> exeExtension,"dist...
496
false
true
0
13
90
157
79
78
null
null
tonyday567/hdcharts
src/Chart/BarW.hs
mit
barWCss :: String -> Css barWCss s = do Css.element (Css.pack s<>" rect") ? do Css.shapeRendering Css.crispEdges Css.fill Css.steelblue "path.domain" ? Css.opacity 0.5 "g.tick" ? do "line" ? Css.stroke Css.black "text" ? Css.fontSize (Css.px 10)
267
barWCss :: String -> Css barWCss s = do Css.element (Css.pack s<>" rect") ? do Css.shapeRendering Css.crispEdges Css.fill Css.steelblue "path.domain" ? Css.opacity 0.5 "g.tick" ? do "line" ? Css.stroke Css.black "text" ? Css.fontSize (Css.px 10)
267
barWCss s = do Css.element (Css.pack s<>" rect") ? do Css.shapeRendering Css.crispEdges Css.fill Css.steelblue "path.domain" ? Css.opacity 0.5 "g.tick" ? do "line" ? Css.stroke Css.black "text" ? Css.fontSize (Css.px 10)
242
false
true
0
14
56
115
51
64
null
null
zaxtax/hakaru
haskell/Language/Hakaru/Syntax/AST/Sing.hs
bsd-3-clause
sing_PrimOp Impl = (sing `Cons1` sing `Cons1` Nil1, sing)
65
sing_PrimOp Impl = (sing `Cons1` sing `Cons1` Nil1, sing)
65
sing_PrimOp Impl = (sing `Cons1` sing `Cons1` Nil1, sing)
65
false
false
0
7
16
27
16
11
null
null
alphaHeavy/protocol-buffers
Text/ProtocolBuffers/WireMessage.hs
apache-2.0
runGetOnLazy :: Get r -> ByteString -> Either String (r,ByteString) runGetOnLazy parser bs = resolve (runGetAll parser bs) where resolve :: Result r -> Either String (r,ByteString) resolve (Failed i s) = Left ("Failed at "++show i++" : "++s) resolve (Finished bsOut _i r) = Right (r,bsOut) reso...
413
runGetOnLazy :: Get r -> ByteString -> Either String (r,ByteString) runGetOnLazy parser bs = resolve (runGetAll parser bs) where resolve :: Result r -> Either String (r,ByteString) resolve (Failed i s) = Left ("Failed at "++show i++" : "++s) resolve (Finished bsOut _i r) = Right (r,bsOut) reso...
413
runGetOnLazy parser bs = resolve (runGetAll parser bs) where resolve :: Result r -> Either String (r,ByteString) resolve (Failed i s) = Left ("Failed at "++show i++" : "++s) resolve (Finished bsOut _i r) = Right (r,bsOut) resolve (Partial op) = resolve (op Nothing) -- should be impossible -- ...
345
false
true
4
10
90
160
82
78
null
null
ezyang/ghc
utils/testremove/checkremove.hs
bsd-3-clause
beforeFileInfo :: FileInfo beforeFileInfo = noFileInfo { fiBefore = True }
75
beforeFileInfo :: FileInfo beforeFileInfo = noFileInfo { fiBefore = True }
75
beforeFileInfo = noFileInfo { fiBefore = True }
48
false
true
0
6
11
19
11
8
null
null
dnvriend/study-category-theory
funprog/C9_Functional_Programming_Fundamentals/Week4/functions.hs
apache-2.0
main :: IO () main = do echo "abs' 1: " $ show $ abs' 1 echo "abs' (-1): " $ show $ abs' (-1) echo "head' [1,2,3]: " $ show $ head' [1,2,3] -- Homework 1. -- Homework 2. -- Homework 3. -- Homework 4.
232
main :: IO () main = do echo "abs' 1: " $ show $ abs' 1 echo "abs' (-1): " $ show $ abs' (-1) echo "head' [1,2,3]: " $ show $ head' [1,2,3] -- Homework 1. -- Homework 2. -- Homework 3. -- Homework 4.
232
main = do echo "abs' 1: " $ show $ abs' 1 echo "abs' (-1): " $ show $ abs' (-1) echo "head' [1,2,3]: " $ show $ head' [1,2,3] -- Homework 1. -- Homework 2. -- Homework 3. -- Homework 4.
218
false
true
0
10
78
85
42
43
null
null
ian-ross/cabal
Cabal/Distribution/Simple/Setup.hs
bsd-3-clause
optionNumJobs :: (flags -> Flag (Maybe Int)) -> (Flag (Maybe Int) -> flags -> flags) -> OptionField flags optionNumJobs get set = option "j" ["jobs"] "Run NUM jobs simultaneously (or '$ncpus' if no NUM is given)." get set (optArg "NUM" (fmap Flag numJobsParser) ...
1,088
optionNumJobs :: (flags -> Flag (Maybe Int)) -> (Flag (Maybe Int) -> flags -> flags) -> OptionField flags optionNumJobs get set = option "j" ["jobs"] "Run NUM jobs simultaneously (or '$ncpus' if no NUM is given)." get set (optArg "NUM" (fmap Flag numJobsParser) ...
1,088
optionNumJobs get set = option "j" ["jobs"] "Run NUM jobs simultaneously (or '$ncpus' if no NUM is given)." get set (optArg "NUM" (fmap Flag numJobsParser) (Flag Nothing) (map (Just . maybe "$ncpus" show) . flagToList)) where numJobsParser :: ReadE (Maybe Int) ...
954
false
true
4
15
341
276
130
146
null
null
travitch/dalvik
src/Dalvik/Types.hs
bsd-3-clause
getTypeName :: (E.MonadThrow f) => DexFile -> TypeId -> f BS.ByteString getTypeName dex i = maybe (E.throwM (NoTypeAtIndex i)) (getStr dex) $ Map.lookup i (dexTypeNames dex)
175
getTypeName :: (E.MonadThrow f) => DexFile -> TypeId -> f BS.ByteString getTypeName dex i = maybe (E.throwM (NoTypeAtIndex i)) (getStr dex) $ Map.lookup i (dexTypeNames dex)
175
getTypeName dex i = maybe (E.throwM (NoTypeAtIndex i)) (getStr dex) $ Map.lookup i (dexTypeNames dex)
103
false
true
0
10
27
83
40
43
null
null
peterokagey/haskellOEIS
src/Sandbox/WichitaPoset/test/A999998Spec.hs
apache-2.0
main :: IO () main = hspec spec
31
main :: IO () main = hspec spec
31
main = hspec spec
17
false
true
0
6
7
19
9
10
null
null
forsyde/forsyde-atom
src/ForSyDe/Atom/MoC/SDF/CSDF.hs
bsd-3-clause
actor43 fs s1 = kernel43 (scenSelect fs s1) s1
46
actor43 fs s1 = kernel43 (scenSelect fs s1) s1
46
actor43 fs s1 = kernel43 (scenSelect fs s1) s1
46
false
false
1
7
8
28
11
17
null
null
kuribas/hmetafont
Typography/HMetafont.hs
bsd-3-clause
y1l = var "y1l"
15
y1l = var "y1l"
15
y1l = var "y1l"
15
false
false
0
5
3
9
4
5
null
null
leshchevds/ganeti
src/Ganeti/Ssconf.hs
bsd-2-clause
-- | Read the list of IP addresses of the master candidates of the cluster. getMasterCandidatesIps :: Maybe FilePath -> IO (Result [String]) getMasterCandidatesIps optPath = do result <- readSSConfFile optPath Nothing SSMasterCandidatesIps return $ liftM lines result -- | Read the name of the master node.
311
getMasterCandidatesIps :: Maybe FilePath -> IO (Result [String]) getMasterCandidatesIps optPath = do result <- readSSConfFile optPath Nothing SSMasterCandidatesIps return $ liftM lines result -- | Read the name of the master node.
235
getMasterCandidatesIps optPath = do result <- readSSConfFile optPath Nothing SSMasterCandidatesIps return $ liftM lines result -- | Read the name of the master node.
170
true
true
0
9
51
61
29
32
null
null
mhcurylo/scheme-haskell-tutorial
src/LispVal.hs
bsd-3-clause
eqLispVal xs@(List _) ys@(List _) = showLispVal xs == showLispVal ys
68
eqLispVal xs@(List _) ys@(List _) = showLispVal xs == showLispVal ys
68
eqLispVal xs@(List _) ys@(List _) = showLispVal xs == showLispVal ys
68
false
false
0
8
10
39
19
20
null
null
tpsinnem/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
showEnvDbg env t = showEnv' env t True
38
showEnvDbg env t = showEnv' env t True
38
showEnvDbg env t = showEnv' env t True
38
false
false
1
5
7
22
8
14
null
null
langthom/data-structures
Queue/Haskell/Stack.hs
bsd-3-clause
-- -------------------------------------------------------- -- Checks whether a Stack is empty or not -- -------------------------------------------------------- isEmpty :: STACK a -> Bool isEmpty EmptyStack = True
214
isEmpty :: STACK a -> Bool isEmpty EmptyStack = True
52
isEmpty EmptyStack = True
25
true
true
0
6
22
24
13
11
null
null
JacquesCarette/literate-scientific-software
code/drasil-printers/Language/Drasil/Printing/Import.hs
bsd-2-clause
layLabelled _ (LblC _ (Bib bib)) = T.Bib $ map layCite bib
66
layLabelled _ (LblC _ (Bib bib)) = T.Bib $ map layCite bib
66
layLabelled _ (LblC _ (Bib bib)) = T.Bib $ map layCite bib
66
false
false
1
8
19
38
17
21
null
null
rleshchinskiy/vector
Data/Vector/Fusion/Bundle/Monadic.hs
bsd-3-clause
zipWith4M f sa sb sc sd = zipWithM (\(a,b) (c,d) -> f a b c d) (zip sa sb) (zip sc sd)
88
zipWith4M f sa sb sc sd = zipWithM (\(a,b) (c,d) -> f a b c d) (zip sa sb) (zip sc sd)
88
zipWith4M f sa sb sc sd = zipWithM (\(a,b) (c,d) -> f a b c d) (zip sa sb) (zip sc sd)
88
false
false
0
8
23
71
37
34
null
null
rleshchinskiy/vector
Data/Vector/Primitive.hs
bsd-3-clause
fold1M'_ = G.fold1M'_
21
fold1M'_ = G.fold1M'_
21
fold1M'_ = G.fold1M'_
21
false
false
0
5
2
8
4
4
null
null
unclechu/haskell-qm-interpolated-string
test/QMB/Spec.hs
unlicense
testFoo2 :: TestFoo2 testFoo2 = TestFoo2 testFoo
48
testFoo2 :: TestFoo2 testFoo2 = TestFoo2 testFoo
48
testFoo2 = TestFoo2 testFoo
27
false
true
0
5
6
14
7
7
null
null
alexhausen/examples
haskell/tut.hs
mit
charName 'b' = "Broseph"
24
charName 'b' = "Broseph"
24
charName 'b' = "Broseph"
24
false
false
0
5
3
9
4
5
null
null
gibiansky/jupyter-haskell
tests/Jupyter/Test/Install.hs
mit
testCorrectJupyterVersionsAccepted :: TestTree testCorrectJupyterVersionsAccepted = testCase "Correct jupyter versions accepted" $ do assertBool "Version 3 supported" $ jupyterVersionSupported $ JupyterVersion 3 0 0 assertBool "Version 3.1 supported" $ jupyterVersionSupported $ JupyterVersion 3 1 0 assertBool "Ve...
665
testCorrectJupyterVersionsAccepted :: TestTree testCorrectJupyterVersionsAccepted = testCase "Correct jupyter versions accepted" $ do assertBool "Version 3 supported" $ jupyterVersionSupported $ JupyterVersion 3 0 0 assertBool "Version 3.1 supported" $ jupyterVersionSupported $ JupyterVersion 3 1 0 assertBool "Ve...
665
testCorrectJupyterVersionsAccepted = testCase "Correct jupyter versions accepted" $ do assertBool "Version 3 supported" $ jupyterVersionSupported $ JupyterVersion 3 0 0 assertBool "Version 3.1 supported" $ jupyterVersionSupported $ JupyterVersion 3 1 0 assertBool "Version 4 supported" $ jupyterVersionSupported $ ...
618
false
true
0
11
95
152
67
85
null
null
sru-systems/protobuf-simple
src/Data/ProtoBuf/WireFormat.hs
mit
-- | Decode a required message field. getMessage :: (Default a, Required a, WireMessage a) => Get a getMessage = do bytes <- getBytes case runGetOrFail getGroup bytes of Left (_, _, err) -> fail err Right (_, _, obj) -> return obj -- | Decode an optional message field.
296
getMessage :: (Default a, Required a, WireMessage a) => Get a getMessage = do bytes <- getBytes case runGetOrFail getGroup bytes of Left (_, _, err) -> fail err Right (_, _, obj) -> return obj -- | Decode an optional message field.
258
getMessage = do bytes <- getBytes case runGetOrFail getGroup bytes of Left (_, _, err) -> fail err Right (_, _, obj) -> return obj -- | Decode an optional message field.
196
true
true
0
11
76
98
50
48
null
null
mimi1vx/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
getIndexReferences s = fromMaybe [] $ do match <- matchRegex re s index <- match !!! 0 return $ matchAllStrings variableNameRegex index where re = mkRegex "(\\[.*\\])"
185
getIndexReferences s = fromMaybe [] $ do match <- matchRegex re s index <- match !!! 0 return $ matchAllStrings variableNameRegex index where re = mkRegex "(\\[.*\\])"
185
getIndexReferences s = fromMaybe [] $ do match <- matchRegex re s index <- match !!! 0 return $ matchAllStrings variableNameRegex index where re = mkRegex "(\\[.*\\])"
185
false
false
1
9
44
68
28
40
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/EC2SpotFleet.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-spotfleet.html#cfn-ec2-spotfleet-spotfleetrequestconfigdata ecsfSpotFleetRequestConfigData :: Lens' EC2SpotFleet EC2SpotFleetSpotFleetRequestConfigData ecsfSpotFleetRequestConfigData = lens _eC2SpotFleetSpotFleetRequestConfigData (\s a ...
373
ecsfSpotFleetRequestConfigData :: Lens' EC2SpotFleet EC2SpotFleetSpotFleetRequestConfigData ecsfSpotFleetRequestConfigData = lens _eC2SpotFleetSpotFleetRequestConfigData (\s a -> s { _eC2SpotFleetSpotFleetRequestConfigData = a })
229
ecsfSpotFleetRequestConfigData = lens _eC2SpotFleetSpotFleetRequestConfigData (\s a -> s { _eC2SpotFleetSpotFleetRequestConfigData = a })
137
true
true
0
9
20
40
22
18
null
null
siddhanathan/ghc
testsuite/tests/rename/should_compile/timing001.hs
bsd-3-clause
a248 = a249
11
a248 = a249
11
a248 = a249
11
false
false
1
5
2
10
3
7
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
3022 = 3021
11
3022 = 3021
11
3022 = 3021
11
false
false
1
5
2
10
3
7
null
null
apunktbau/co4
test/CO4/Example/HangStandalone.hs
gpl-3.0
primitive :: Hang -> Bool primitive h = not $ or $ zipWith matching h $ tail h
78
primitive :: Hang -> Bool primitive h = not $ or $ zipWith matching h $ tail h
78
primitive h = not $ or $ zipWith matching h $ tail h
52
false
true
0
7
17
43
19
24
null
null
xich/scotty
Network/Wai/Middleware/Static.hs
bsd-3-clause
-- | Serve static files out of the application root (current directory). -- If file is found, it is streamed to the client and no further middleware is run. static :: Middleware static = staticPolicy mempty
206
static :: Middleware static = staticPolicy mempty
49
static = staticPolicy mempty
28
true
true
0
5
35
16
9
7
null
null
graninas/Haskell-Algorithms
Tests/ExprParsingTest.hs
gpl-3.0
str1 = "3 + (2 - 1) * 5"
24
str1 = "3 + (2 - 1) * 5"
24
str1 = "3 + (2 - 1) * 5"
24
false
false
0
4
8
6
3
3
null
null
bitemyapp/twitter-conduit
Web/Twitter/Conduit/Parameters/TH.hs
bsd-2-clause
defineHasParamClassString :: String -> Q [Dec] defineHasParamClassString = defineHasParamClass 'PVString 'unPVString [t|Text|]
130
defineHasParamClassString :: String -> Q [Dec] defineHasParamClassString = defineHasParamClass 'PVString 'unPVString [t|Text|]
130
defineHasParamClassString = defineHasParamClass 'PVString 'unPVString [t|Text|]
83
false
true
0
7
15
34
20
14
null
null
AndrewRademacher/wai
warp/Network/Wai/Handler/Warp/FdCache.hs
mit
clean :: FdCache -> IO (FdCache -> FdCache) clean old = do new <- pruneWith old prune return $ merge new
112
clean :: FdCache -> IO (FdCache -> FdCache) clean old = do new <- pruneWith old prune return $ merge new
112
clean old = do new <- pruneWith old prune return $ merge new
68
false
true
0
9
28
55
24
31
null
null
ejlilley/AbstractMusic
FiveLimit.hs
gpl-3.0
_P1 = int Perf Unison
21
_P1 = int Perf Unison
21
_P1 = int Perf Unison
21
false
false
1
5
4
16
5
11
null
null
spechub/Hets
Common/Doc.hs
gpl-2.0
toTextAux :: Doc -> Pretty.Doc toTextAux = foldDoc anyRecord { foldEmpty = const Pretty.empty , foldText = \ _ k s -> case k of TopKey n -> Pretty.text $ s ++ replicate (n - length s) ' ' _ -> Pretty.text s , foldCat = \ d c l -> case d of Cat _ ds@(_ : _) -> if all hasSpace $ in...
904
toTextAux :: Doc -> Pretty.Doc toTextAux = foldDoc anyRecord { foldEmpty = const Pretty.empty , foldText = \ _ k s -> case k of TopKey n -> Pretty.text $ s ++ replicate (n - length s) ' ' _ -> Pretty.text s , foldCat = \ d c l -> case d of Cat _ ds@(_ : _) -> if all hasSpace $ in...
904
toTextAux = foldDoc anyRecord { foldEmpty = const Pretty.empty , foldText = \ _ k s -> case k of TopKey n -> Pretty.text $ s ++ replicate (n - length s) ' ' _ -> Pretty.text s , foldCat = \ d c l -> case d of Cat _ ds@(_ : _) -> if all hasSpace $ init ds then (case c of...
873
false
true
0
18
345
360
183
177
null
null
TWal/ENS_adac
src/Asm.hs
bsd-3-clause
orl = ins2 "orl"
16
orl = ins2 "orl"
16
orl = ins2 "orl"
16
false
false
0
5
3
9
4
5
null
null
sashabu/libcspm
src/CSPM/Evaluator/ValueSet.hs
bsd-3-clause
unions vs = foldr1 union vs
27
unions vs = foldr1 union vs
27
unions vs = foldr1 union vs
27
false
false
0
5
5
14
6
8
null
null
headprogrammingczar/Data
data-eval/IRC/Data/L.hs
bsd-3-clause
go x = text "You have been eaten by a grue"
43
go x = text "You have been eaten by a grue"
43
go x = text "You have been eaten by a grue"
43
false
false
1
5
10
16
5
11
null
null
jdcannon/hascheme
src/Scheme.hs
gpl-3.0
showError (NumArgs expected found) = "Expected " ++ show expected ++ " args; Found Values: " ++ unwordList found
157
showError (NumArgs expected found) = "Expected " ++ show expected ++ " args; Found Values: " ++ unwordList found
157
showError (NumArgs expected found) = "Expected " ++ show expected ++ " args; Found Values: " ++ unwordList found
157
false
false
0
8
63
35
16
19
null
null
keera-studios/hsQt
Qtc/Enums/Gui/QGraphicsPathItem.hs
bsd-2-clause
ieQGraphicsPathItem__ :: Int -> QGraphicsPathItem__ ieQGraphicsPathItem__ x = QEnum (CQGraphicsPathItem__ x)
108
ieQGraphicsPathItem__ :: Int -> QGraphicsPathItem__ ieQGraphicsPathItem__ x = QEnum (CQGraphicsPathItem__ x)
108
ieQGraphicsPathItem__ x = QEnum (CQGraphicsPathItem__ x)
56
false
true
0
7
10
32
14
18
null
null
TomMD/ghc
compiler/backpack/ShPackageKey.hs
bsd-3-clause
generalizeHolePackageKey :: DynFlags -> PackageKey -> IO PackageKey generalizeHolePackageKey dflags pk = do shpk <- lookupPackageKey dflags pk case shpk of ShDefinitePackageKey _ -> return pk ShPackageKey { shPackageKeyUnitName = pn, shPackageKeyLibraryName = vh, ...
695
generalizeHolePackageKey :: DynFlags -> PackageKey -> IO PackageKey generalizeHolePackageKey dflags pk = do shpk <- lookupPackageKey dflags pk case shpk of ShDefinitePackageKey _ -> return pk ShPackageKey { shPackageKeyUnitName = pn, shPackageKeyLibraryName = vh, ...
695
generalizeHolePackageKey dflags pk = do shpk <- lookupPackageKey dflags pk case shpk of ShDefinitePackageKey _ -> return pk ShPackageKey { shPackageKeyUnitName = pn, shPackageKeyLibraryName = vh, shPackageKeyInsts = insts0 } -> let insts = ...
627
false
true
0
19
185
143
72
71
null
null