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
rvion/lamdu
Lamdu/GUI/ExpressionEdit/EventMap.hs
gpl-3.0
mkEventMapWithPickers :: (Functor f, MonadA m) => HolePickers m -> [ModKey] -> E.Doc -> (f Sugar.EntityId -> T m Widget.Id) -> f Sugar.EntityId -> EventHandlers (T m) mkEventMapWithPickers holePickers keys doc f = E.keyPresses keys doc . liftA2 mappend (ExprGuiM.holePickersAction holePickers...
365
mkEventMapWithPickers :: (Functor f, MonadA m) => HolePickers m -> [ModKey] -> E.Doc -> (f Sugar.EntityId -> T m Widget.Id) -> f Sugar.EntityId -> EventHandlers (T m) mkEventMapWithPickers holePickers keys doc f = E.keyPresses keys doc . liftA2 mappend (ExprGuiM.holePickersAction holePickers...
365
mkEventMapWithPickers holePickers keys doc f = E.keyPresses keys doc . liftA2 mappend (ExprGuiM.holePickersAction holePickers) . fmap Widget.eventResultFromCursor . f
178
false
true
0
13
77
133
64
69
null
null
christiaanb/ghc
utils/genprimopcode/Main.hs
bsd-3-clause
ppType (TyApp (TyCon "MutableArray#") [x,y]) = "mkMutableArrayPrimTy " ++ ppType x ++ " " ++ ppType y
155
ppType (TyApp (TyCon "MutableArray#") [x,y]) = "mkMutableArrayPrimTy " ++ ppType x ++ " " ++ ppType y
155
ppType (TyApp (TyCon "MutableArray#") [x,y]) = "mkMutableArrayPrimTy " ++ ppType x ++ " " ++ ppType y
155
false
false
0
8
70
48
23
25
null
null
mcmaniac/ghc
compiler/iface/BinIface.hs
bsd-3-clause
knownKeyNamesMap :: UniqFM Name knownKeyNamesMap = listToUFM_Directly [(nameUnique n, n) | n <- knownKeyNames] where knownKeyNames :: [Name] knownKeyNames = map getName wiredInThings ++ basicKnownKeyNames -- See Note [Symbol table representation of names]
267
knownKeyNamesMap :: UniqFM Name knownKeyNamesMap = listToUFM_Directly [(nameUnique n, n) | n <- knownKeyNames] where knownKeyNames :: [Name] knownKeyNames = map getName wiredInThings ++ basicKnownKeyNames -- See Note [Symbol table representation of names]
267
knownKeyNamesMap = listToUFM_Directly [(nameUnique n, n) | n <- knownKeyNames] where knownKeyNames :: [Name] knownKeyNames = map getName wiredInThings ++ basicKnownKeyNames -- See Note [Symbol table representation of names]
235
false
true
0
8
44
63
33
30
null
null
brendanhay/gogol
gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Filters/Update.hs
mpl-2.0
-- | Multipart request metadata. mfuPayload :: Lens' ManagementFiltersUpdate Filter mfuPayload = lens _mfuPayload (\ s a -> s{_mfuPayload = a})
145
mfuPayload :: Lens' ManagementFiltersUpdate Filter mfuPayload = lens _mfuPayload (\ s a -> s{_mfuPayload = a})
112
mfuPayload = lens _mfuPayload (\ s a -> s{_mfuPayload = a})
61
true
true
1
9
22
46
22
24
null
null
ngzax/lyah
double_me.hs
unlicense
doubleMe x = x + x
18
doubleMe x = x + x
18
doubleMe x = x + x
18
false
false
0
5
5
13
6
7
null
null
ezyang/hoopl
src/Compiler/Hoopl/GraphUtil.hs
bsd-3-clause
---------------------------------------------------------------- -- | A block is "front biased" if the left child of every -- concatenation operation is a node, not a general block; a -- front-biased block is analogous to an ordinary list. If a block is -- front-biased, then its nodes can be traversed from front to b...
544
frontBiasBlock :: Block n e x -> Block n e x frontBiasBlock b@(BFirst {}) = b
78
frontBiasBlock b@(BFirst {}) = b
33
true
true
0
8
90
49
28
21
null
null
daoo/musictheory
src/Music/Theory/Scale.hs
bsd-3-clause
unsafeTest :: Word16 -> Int -> Bool unsafeTest a (I# i) = isTrue# (andI# (uncheckedIShiftRL# a' i) 1#) where !(I# a') = fromIntegral a
140
unsafeTest :: Word16 -> Int -> Bool unsafeTest a (I# i) = isTrue# (andI# (uncheckedIShiftRL# a' i) 1#) where !(I# a') = fromIntegral a
140
unsafeTest a (I# i) = isTrue# (andI# (uncheckedIShiftRL# a' i) 1#) where !(I# a') = fromIntegral a
104
false
true
0
10
29
73
33
40
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/lookup_1.hs
mit
lookup k (Cons (Tup2 x y) xys) = lookup2 k (Cons (Tup2 x y) xys)
64
lookup k (Cons (Tup2 x y) xys) = lookup2 k (Cons (Tup2 x y) xys)
64
lookup k (Cons (Tup2 x y) xys) = lookup2 k (Cons (Tup2 x y) xys)
64
false
false
0
9
14
50
23
27
null
null
rrnewton/accelerate
Data/Array/Accelerate/Pretty/Traverse.hs
bsd-3-clause
labelForPrimFun (PrimTruncate _ _) = "PrimTruncate"
55
labelForPrimFun (PrimTruncate _ _) = "PrimTruncate"
55
labelForPrimFun (PrimTruncate _ _) = "PrimTruncate"
55
false
false
0
7
9
17
8
9
null
null
raichoo/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
ibc i (IBCCGFlag tgt n) f = return f { ibc_cgflags = (tgt, n) : ibc_cgflags f }
79
ibc i (IBCCGFlag tgt n) f = return f { ibc_cgflags = (tgt, n) : ibc_cgflags f }
79
ibc i (IBCCGFlag tgt n) f = return f { ibc_cgflags = (tgt, n) : ibc_cgflags f }
79
false
false
1
9
17
48
23
25
null
null
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | Identifies what kind of resource this is. Value: the fixed string -- \"dfareporting#order\". oKind :: Lens' Order Text oKind = lens _oKind (\ s a -> s{_oKind = a})
168
oKind :: Lens' Order Text oKind = lens _oKind (\ s a -> s{_oKind = a})
70
oKind = lens _oKind (\ s a -> s{_oKind = a})
44
true
true
1
9
30
46
23
23
null
null
abakst/liquidhaskell
src/Language/Haskell/Liquid/Transforms/CoreToLogic.hs
bsd-3-clause
coreToPd :: C.CoreExpr -> LogicM Pred coreToPd (C.Let b p) = subst1 <$> coreToPd p <*> makesub b
98
coreToPd :: C.CoreExpr -> LogicM Pred coreToPd (C.Let b p) = subst1 <$> coreToPd p <*> makesub b
98
coreToPd (C.Let b p) = subst1 <$> coreToPd p <*> makesub b
60
false
true
0
8
19
47
22
25
null
null
CulpaBS/wbBach
src/Futhark/Analysis/HORepresentation/SOAC.hs
bsd-3-clause
lambda (Scan _ _ lam _ ) = lam
39
lambda (Scan _ _ lam _ ) = lam
39
lambda (Scan _ _ lam _ ) = lam
39
false
false
0
7
17
21
10
11
null
null
kite-lang/kite
src/Kite/Environment.hs
mit
-- | Shorthand for an empty subsitution nullSubst = Map.empty
61
nullSubst = Map.empty
21
nullSubst = Map.empty
21
true
false
1
6
9
13
5
8
null
null
yoo-e/yesod-helpers
Yesod/Helpers/Aeson.hs
bsd-3-clause
(+.:) :: (FromJSON a) => Object -> Text -> SubFieldParser a obj +.: key = atField (.:) obj key return
101
(+.:) :: (FromJSON a) => Object -> Text -> SubFieldParser a obj +.: key = atField (.:) obj key return
101
obj +.: key = atField (.:) obj key return
41
false
true
0
8
19
50
26
24
null
null
vdweegen/UvA-Software_Testing
Lab2/Final/Exercises.hs
gpl-3.0
one, two, three, four :: Int -> Bool one = (\x -> even x && x > 3)
66
one, two, three, four :: Int -> Bool one = (\x -> even x && x > 3)
66
one = (\x -> even x && x > 3)
29
false
true
0
9
17
40
24
16
null
null
haskell/haddock
haddock-library/src/Documentation/Haddock/Parser/Monad.hs
bsd-2-clause
decimal :: Integral a => Parser a decimal = foldl' step 0 `fmap` Parsec.many1 Parsec.digit where step a c = a * 10 + fromIntegral (ord c - 48) -- | Parse a hexadecimal number.
178
decimal :: Integral a => Parser a decimal = foldl' step 0 `fmap` Parsec.many1 Parsec.digit where step a c = a * 10 + fromIntegral (ord c - 48) -- | Parse a hexadecimal number.
178
decimal = foldl' step 0 `fmap` Parsec.many1 Parsec.digit where step a c = a * 10 + fromIntegral (ord c - 48) -- | Parse a hexadecimal number.
144
false
true
0
9
37
73
36
37
null
null
dbueno/funsat
src/Funsat/Solver.hs
bsd-3-clause
portSolution :: Solution -> FunMonad s (Solution, Stats, Maybe ResolutionTrace) reportSolution s = do stats <- extractStats case s of Sat _ -> return (s, stats, Nothing) Unsat _ -> do resTrace <- constructResTrace s return (s, stats, Just resTrace) -- | A default configuratio...
530
reportSolution :: Solution -> FunMonad s (Solution, Stats, Maybe ResolutionTrace) reportSolution s = do stats <- extractStats case s of Sat _ -> return (s, stats, Nothing) Unsat _ -> do resTrace <- constructResTrace s return (s, stats, Just resTrace) -- | A default configurat...
530
reportSolution s = do stats <- extractStats case s of Sat _ -> return (s, stats, Nothing) Unsat _ -> do resTrace <- constructResTrace s return (s, stats, Just resTrace) -- | A default configuration based on the formula to solve. -- -- * restarts every 100 conflicts -- -- * ...
448
false
true
0
14
134
119
62
57
null
null
kazu-yamamoto/llrbtree
Data/Heap/Binominal.hs
bsd-3-clause
{-| Singleton heap. -} singleton :: a -> Heap a singleton x = Heap [Node 0 x []]
81
singleton :: a -> Heap a singleton x = Heap [Node 0 x []]
57
singleton x = Heap [Node 0 x []]
32
true
true
0
8
18
37
18
19
null
null
judah/tensorflow-haskell
tensorflow/src/TensorFlow/Types.hs
apache-2.0
protoShape :: Lens' TensorShapeProto Shape protoShape = iso protoToShape shapeToProto where protoToShape = Shape . fmap (view size) . view dim shapeToProto (Shape ds) = (def :: TensorShapeProto) & dim .~ fmap (\d -> def & size .~ d) ds
245
protoShape :: Lens' TensorShapeProto Shape protoShape = iso protoToShape shapeToProto where protoToShape = Shape . fmap (view size) . view dim shapeToProto (Shape ds) = (def :: TensorShapeProto) & dim .~ fmap (\d -> def & size .~ d) ds
245
protoShape = iso protoToShape shapeToProto where protoToShape = Shape . fmap (view size) . view dim shapeToProto (Shape ds) = (def :: TensorShapeProto) & dim .~ fmap (\d -> def & size .~ d) ds
202
false
true
0
10
49
98
49
49
null
null
phischu/fragnix
tests/packages/scotty/Data.Vector.Fusion.Bundle.Size.hs
bsd-3-clause
smaller Unknown (Max n) = Max n
37
smaller Unknown (Max n) = Max n
37
smaller Unknown (Max n) = Max n
37
false
false
0
7
12
20
9
11
null
null
qrilka/xmlhdbc
Application.hs
bsd-3-clause
getHomeR :: Handler RepHtml getHomeR = defaultLayout $ do addScriptRemote "https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" addScript $ StaticR jquery_form_js toWidget [lucius| form { display: inline }|] toWidget [julius| function refresh() { $.get("@{ListR "test"}", function(data, status) { ...
1,723
getHomeR :: Handler RepHtml getHomeR = defaultLayout $ do addScriptRemote "https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" addScript $ StaticR jquery_form_js toWidget [lucius| form { display: inline }|] toWidget [julius| function refresh() { $.get("@{ListR "test"}", function(data, status) { ...
1,723
getHomeR = defaultLayout $ do addScriptRemote "https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" addScript $ StaticR jquery_form_js toWidget [lucius| form { display: inline }|] toWidget [julius| function refresh() { $.get("@{ListR "test"}", function(data, status) { console.log(data, status...
1,695
false
true
2
8
300
68
33
35
null
null
tel/index-basic
src/Control/IMonad/State.hs
bsd-3-clause
on1 :: (a := i) :* b -> (a, b i) on1 (P (V a) b) = (a, unsafeCoerce b)
70
on1 :: (a := i) :* b -> (a, b i) on1 (P (V a) b) = (a, unsafeCoerce b)
70
on1 (P (V a) b) = (a, unsafeCoerce b)
37
false
true
0
11
19
67
33
34
null
null
medik/lang-hack
Haskell/haskell-tuts.hs
gpl-3.0
roundVal = round 9.999
22
roundVal = round 9.999
22
roundVal = round 9.999
22
false
false
0
5
3
9
4
5
null
null
facebookincubator/duckling
Duckling/Time/SV/Rules.hs
bsd-3-clause
ruleRelativeMinutesTotillbeforeIntegerHourofday :: Rule ruleRelativeMinutesTotillbeforeIntegerHourofday = Rule { name = "relative minutes to|till|before <integer> (hour-of-day)" , pattern = [ Predicate $ isIntegerBetween 1 59 , regex "i" , Predicate isAnHourOfDay ] , prod = \tokens -> case tokens ...
456
ruleRelativeMinutesTotillbeforeIntegerHourofday :: Rule ruleRelativeMinutesTotillbeforeIntegerHourofday = Rule { name = "relative minutes to|till|before <integer> (hour-of-day)" , pattern = [ Predicate $ isIntegerBetween 1 59 , regex "i" , Predicate isAnHourOfDay ] , prod = \tokens -> case tokens ...
456
ruleRelativeMinutesTotillbeforeIntegerHourofday = Rule { name = "relative minutes to|till|before <integer> (hour-of-day)" , pattern = [ Predicate $ isIntegerBetween 1 59 , regex "i" , Predicate isAnHourOfDay ] , prod = \tokens -> case tokens of (token:_:Token Time td:_) -> do n <- ge...
400
false
true
0
16
108
125
63
62
null
null
tjakway/ghcjvm
compiler/utils/Bag.hs
bsd-3-clause
foldBag t u e (UnitBag x) = u x `t` e
41
foldBag t u e (UnitBag x) = u x `t` e
41
foldBag t u e (UnitBag x) = u x `t` e
41
false
false
0
7
14
30
15
15
null
null
bionikspoon/playing-with-haskell---oreilly
ch03/Tree.hs
mit
simpleTree :: Tree String simpleTree = Node "parent" (Node "left child" Empty Empty) (Node "right child" Empty Empty)
147
simpleTree :: Tree String simpleTree = Node "parent" (Node "left child" Empty Empty) (Node "right child" Empty Empty)
147
simpleTree = Node "parent" (Node "left child" Empty Empty) (Node "right child" Empty Empty)
121
false
true
0
7
47
41
20
21
null
null
mrlovre/LMTetrys
src/Display.hs
gpl-2.0
display :: DisplayReaderCallback display = do boardVar <- asks board lift $ do b <- get boardVar clearScreen draw b 20 (Position 0 0) flush
179
display :: DisplayReaderCallback display = do boardVar <- asks board lift $ do b <- get boardVar clearScreen draw b 20 (Position 0 0) flush
179
display = do boardVar <- asks board lift $ do b <- get boardVar clearScreen draw b 20 (Position 0 0) flush
146
false
true
0
12
64
62
27
35
null
null
athanclark/sets
src/Data/Set/Unordered/Unique.hs
mit
isSubsetOf :: Eq a => UUSet a -> UUSet a -> Bool isSubsetOf (UUSet xs) (UUSet ys) = foldr go True xs where go x b | List.elem x ys = b | otherwise = False -- | /O(n*(m^2))/
195
isSubsetOf :: Eq a => UUSet a -> UUSet a -> Bool isSubsetOf (UUSet xs) (UUSet ys) = foldr go True xs where go x b | List.elem x ys = b | otherwise = False -- | /O(n*(m^2))/
195
isSubsetOf (UUSet xs) (UUSet ys) = foldr go True xs where go x b | List.elem x ys = b | otherwise = False -- | /O(n*(m^2))/
146
false
true
0
9
61
93
42
51
null
null
urbanslug/ghc
testsuite/tests/codeGen/should_run/CopySmallArray.hs
bsd-3-clause
copyMutableArray :: MArray s a -> Int -> MArray s a -> Int -> Int -> ST s () copyMutableArray src (I# six#) dst (I# dix#) (I# n#) = ST $ \ s# -> case copySmallMutableArray# (unMArray src) six# (unMArray dst) dix# n# s# of s2# -> (# s2#, () #)
254
copyMutableArray :: MArray s a -> Int -> MArray s a -> Int -> Int -> ST s () copyMutableArray src (I# six#) dst (I# dix#) (I# n#) = ST $ \ s# -> case copySmallMutableArray# (unMArray src) six# (unMArray dst) dix# n# s# of s2# -> (# s2#, () #)
254
copyMutableArray src (I# six#) dst (I# dix#) (I# n#) = ST $ \ s# -> case copySmallMutableArray# (unMArray src) six# (unMArray dst) dix# n# s# of s2# -> (# s2#, () #)
177
false
true
0
11
62
128
63
65
null
null
sol/pandoc
src/Text/Pandoc/Writers/Man.hs
gpl-2.0
-- | Convert Pandoc inline element to man. inlineToMan :: WriterOptions -> Inline -> State WriterState Doc inlineToMan opts (Emph lst) = do contents <- inlineListToMan opts lst return $ text "\\f[I]" <> contents <> text "\\f[]"
232
inlineToMan :: WriterOptions -> Inline -> State WriterState Doc inlineToMan opts (Emph lst) = do contents <- inlineListToMan opts lst return $ text "\\f[I]" <> contents <> text "\\f[]"
189
inlineToMan opts (Emph lst) = do contents <- inlineListToMan opts lst return $ text "\\f[I]" <> contents <> text "\\f[]"
125
true
true
0
10
41
69
32
37
null
null
isomorphism/Delineate
Control/Delineate.hs
bsd-3-clause
fstWith :: x & y ⊢ x fstWith = Lin (\k -> Not $ \(With (Not xy)) -> xy . Plus $ Left k )
88
fstWith :: x & y ⊢ x fstWith = Lin (\k -> Not $ \(With (Not xy)) -> xy . Plus $ Left k )
88
fstWith = Lin (\k -> Not $ \(With (Not xy)) -> xy . Plus $ Left k )
67
false
true
0
13
24
62
32
30
null
null
blancas/trex
src/Fields.hs
mit
parseCmd a@(x:xs) = if x == "-t" || x == "--types" then (True, xs) else (False, a)
82
parseCmd a@(x:xs) = if x == "-t" || x == "--types" then (True, xs) else (False, a)
82
parseCmd a@(x:xs) = if x == "-t" || x == "--types" then (True, xs) else (False, a)
82
false
false
0
8
16
51
29
22
null
null
DanielSchuessler/hstri
ToPython.hs
gpl-3.0
parens x = "("++x++")"
22
parens x = "("++x++")"
22
parens x = "("++x++")"
22
false
false
5
5
3
25
8
17
null
null
hsinhuang/codebase
h99/H7.hs
gpl-2.0
flatten :: NestedList a -> [a] flatten (Elem x) = [x]
53
flatten :: NestedList a -> [a] flatten (Elem x) = [x]
53
flatten (Elem x) = [x]
22
false
true
0
7
10
33
17
16
null
null
ssaavedra/liquidhaskell
tests/pos/pair00.hs
bsd-3-clause
chk (x, [y]) = liquidAssertB (x < y)
36
chk (x, [y]) = liquidAssertB (x < y)
36
chk (x, [y]) = liquidAssertB (x < y)
36
false
false
0
7
7
29
15
14
null
null
abakst/liquidhaskell
tests/neg/Variance.hs
bsd-3-clause
{-@ check_covariant :: Foo a b {v:Int | v > 0} c -> Foo a b {v:Int | v = 1} c @-} check_covariant :: Foo a b Int c -> Foo a b Int c check_covariant r = r
153
check_covariant :: Foo a b Int c -> Foo a b Int c check_covariant r = r
71
check_covariant r = r
21
true
true
0
7
39
42
19
23
null
null
Peaker/FreeTypeGL
src/Graphics/FreetypeGL/TextBuffer.hs
bsd-3-clause
c'Align AlignCenter = TB.c'ALIGN_CENTER
39
c'Align AlignCenter = TB.c'ALIGN_CENTER
39
c'Align AlignCenter = TB.c'ALIGN_CENTER
39
false
false
0
5
3
12
5
7
null
null
rahulmutt/ghcvm
compiler/Eta/BasicTypes/Literal.hs
bsd-3-clause
double2FloatLit (MachDouble d) = MachFloat d
45
double2FloatLit (MachDouble d) = MachFloat d
45
double2FloatLit (MachDouble d) = MachFloat d
45
false
false
0
7
6
18
8
10
null
null
apyrgio/ganeti
src/Ganeti/Locking/Locks.hs
bsd-2-clause
lockName NodeLockSet = "node/[lockset]"
39
lockName NodeLockSet = "node/[lockset]"
39
lockName NodeLockSet = "node/[lockset]"
39
false
false
0
5
3
9
4
5
null
null
Daniel-Diaz/processing
Graphics/Web/Processing/Simple.hs
bsd-3-clause
interactiveFigure :: CustomValue w => Maybe Int -- ^ Width (if none, takes as much as is available). -> Maybe Int -- ^ Height (if none, takes as much as is available). -> Int -- ^ Frame rate. -> w -- ^ Initial state. -> (w -> Figure) -- ^ How to print the state. -> (w -> Color) -- ^ Background color, depend...
1,728
interactiveFigure :: CustomValue w => Maybe Int -- ^ Width (if none, takes as much as is available). -> Maybe Int -- ^ Height (if none, takes as much as is available). -> Int -- ^ Frame rate. -> w -- ^ Initial state. -> (w -> Figure) -- ^ How to print the state. -> (w -> Color) -- ^ Background color, depend...
1,728
interactiveFigure mw mh framerate s0 _print bg step onclick keyevents = execScriptM $ do let w = maybe screenWidth fromInt mw h = maybe screenHeight fromInt mh v <- newVarC s0 keyv <- newVar false on Setup $ do setFrameRate $ fromInt framerate on Draw $ do size w h translate (intToFloat ...
822
false
true
0
18
527
443
205
238
null
null
elieux/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
eqWord_RDR = varQual_RDR gHC_PRIM (fsLit "eqWord#")
56
eqWord_RDR = varQual_RDR gHC_PRIM (fsLit "eqWord#")
56
eqWord_RDR = varQual_RDR gHC_PRIM (fsLit "eqWord#")
56
false
false
0
7
10
17
8
9
null
null
brendanhay/gogol
gogol-books/gen/Network/Google/Resource/Books/MyLibrary/Bookshelves/MoveVolume.hs
mpl-2.0
-- | OAuth access token. mlbmvAccessToken :: Lens' MyLibraryBookshelvesMoveVolume (Maybe Text) mlbmvAccessToken = lens _mlbmvAccessToken (\ s a -> s{_mlbmvAccessToken = a})
180
mlbmvAccessToken :: Lens' MyLibraryBookshelvesMoveVolume (Maybe Text) mlbmvAccessToken = lens _mlbmvAccessToken (\ s a -> s{_mlbmvAccessToken = a})
155
mlbmvAccessToken = lens _mlbmvAccessToken (\ s a -> s{_mlbmvAccessToken = a})
85
true
true
0
9
29
48
25
23
null
null
1HaskellADay/1HAD
src/HAD.hs
mit
-- Runs the doctest of Exercise.hs file of te given date module. -- Example: -- -- >>> check =<< date 2014 02 24 check :: DateCommand (IO ()) check = checkFile "Exercise"
171
check :: DateCommand (IO ()) check = checkFile "Exercise"
57
check = checkFile "Exercise"
28
true
true
0
8
32
29
16
13
null
null
hsyl20/ViperVM
haskus-system/src/lib/Haskus/System/Linux/Internals/Graphics.hs
bsd-3-clause
ioctlGetPlane :: MonadInIO m => StructGetPlane -> Handle -> FlowT '[ErrorCode] m StructGetPlane ioctlGetPlane = drmIoctl 0xB6
125
ioctlGetPlane :: MonadInIO m => StructGetPlane -> Handle -> FlowT '[ErrorCode] m StructGetPlane ioctlGetPlane = drmIoctl 0xB6
125
ioctlGetPlane = drmIoctl 0xB6
29
false
true
0
10
16
41
20
21
null
null
cbaatz/hamu8080
src/Hamu8080/Compute.hs
mit
-- MOV C, H doOp 0x4D = setReg C =<< getReg L
45
doOp 0x4D = setReg C =<< getReg L
33
doOp 0x4D = setReg C =<< getReg L
33
true
false
0
6
11
20
9
11
null
null
NCrashed/JuicyPixels-blp
src/Codec/Picture/Blp/Internal/Data.hs
bsd-3-clause
-- | Helper to display bytestring as placeholder with length showBinary :: ByteString -> Builder showBinary v = "<bslength " <> tl v <> ">" where tl = showb . BS.length -- | Helper to display bytestring as placeholder with length
236
showBinary :: ByteString -> Builder showBinary v = "<bslength " <> tl v <> ">" where tl = showb . BS.length -- | Helper to display bytestring as placeholder with length
175
showBinary v = "<bslength " <> tl v <> ">" where tl = showb . BS.length -- | Helper to display bytestring as placeholder with length
139
true
true
0
7
47
45
23
22
null
null
yu-i9/thih
src/Thih/TI/Pred.hs
bsd-3-clause
inHnf :: Pred -> Bool inHnf (IsIn c t) = hnf t where hnf (TVar v) = True hnf (TCon tc) = False hnf (TAp t _) = hnf t
138
inHnf :: Pred -> Bool inHnf (IsIn c t) = hnf t where hnf (TVar v) = True hnf (TCon tc) = False hnf (TAp t _) = hnf t
138
inHnf (IsIn c t) = hnf t where hnf (TVar v) = True hnf (TCon tc) = False hnf (TAp t _) = hnf t
110
false
true
0
9
51
88
39
49
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/general/haskellforall/src/X_2012_01_04_state.hs
unlicense
xquadruple2 :: XState Int () xquadruple2 = xbind xget (\x -> xbind (xadd2 x) (\_ -> xbind xget (\y -> xadd2 y ))) -- then back to xadd0 using do -- do notation not just syntactic sugar for stateful functions, syntactic sugar for anything that's a monad -- an...
491
xquadruple2 :: XState Int () xquadruple2 = xbind xget (\x -> xbind (xadd2 x) (\_ -> xbind xget (\y -> xadd2 y ))) -- then back to xadd0 using do -- do notation not just syntactic sugar for stateful functions, syntactic sugar for anything that's a monad -- an...
491
xquadruple2 = xbind xget (\x -> xbind (xadd2 x) (\_ -> xbind xget (\y -> xadd2 y ))) -- then back to xadd0 using do -- do notation not just syntactic sugar for stateful functions, syntactic sugar for anything that's a monad -- and State s is just a monads -...
462
false
true
0
14
187
105
55
50
null
null
kmate/HaRe
old/testing/moveDefBtwMods/C2_TokOut.hs
bsd-3-clause
sumTree (Branch left right) = sumTree left + sumTree right
58
sumTree (Branch left right) = sumTree left + sumTree right
58
sumTree (Branch left right) = sumTree left + sumTree right
58
false
false
2
6
9
30
12
18
null
null
psibi/persistent
persistent/Database/Persist/Sql/Class.hs
mit
to8 :: ((a,b),(c,d),(e,f),(g,h)) -> (a,b,c,d,e,f,g,h) to8 ((a,b),(c,d),(e,f),(g,h)) = (a,b,c,d,e,f,g,h)
103
to8 :: ((a,b),(c,d),(e,f),(g,h)) -> (a,b,c,d,e,f,g,h) to8 ((a,b),(c,d),(e,f),(g,h)) = (a,b,c,d,e,f,g,h)
103
to8 ((a,b),(c,d),(e,f),(g,h)) = (a,b,c,d,e,f,g,h)
49
false
true
0
9
8
144
90
54
null
null
ghcjs/ghcjs
lib/ghc/autogen/Config.hs
mit
cBooterVersion :: String cBooterVersion = "8.10.1"
64
cBooterVersion :: String cBooterVersion = "8.10.1"
64
cBooterVersion = "8.10.1"
32
false
true
0
4
19
11
6
5
null
null
tomjaguarpaw/postgresql-simple
src/Database/PostgreSQL/Simple/TypeInfo/Static.hs
bsd-3-clause
array_inet :: TypeInfo array_inet = Array { typoid = array_inetOid, typcategory = 'A', typdelim = ',', typname = "_inet", typelem = inet }
177
array_inet :: TypeInfo array_inet = Array { typoid = array_inetOid, typcategory = 'A', typdelim = ',', typname = "_inet", typelem = inet }
177
array_inet = Array { typoid = array_inetOid, typcategory = 'A', typdelim = ',', typname = "_inet", typelem = inet }
154
false
true
0
6
61
43
27
16
null
null
michalkonecny/aern2
aern2-mfun/src/AERN2/BoxFunMinMax/Expressions/Translators/FPTaylor.hs
bsd-3-clause
-- expressionToFPTaylor (Float e s) = "rnd32(" ++ expressionToFPTaylor e ++ ")" --TODO: FPTaylor only supports 16,32,64,128 floats. Use these numbers in PP2? variableBoundsToFPTaylor :: VarMap -> String variableBoundsToFPTaylor [] = ""
236
variableBoundsToFPTaylor :: VarMap -> String variableBoundsToFPTaylor [] = ""
77
variableBoundsToFPTaylor [] = ""
32
true
true
0
8
32
27
12
15
null
null
roelvandijk/aeson
Data/Aeson/Encode/Builder.hs
bsd-3-clause
-- | Encode a JSON value to a "Data.ByteString" 'B.Builder'. -- -- Use this function if you are encoding over the wire, or need to -- prepend or append further bytes to the encoded JSON value. encodeToBuilder :: Value -> Builder encodeToBuilder Null = null_
263
encodeToBuilder :: Value -> Builder encodeToBuilder Null = null_
70
encodeToBuilder Null = null_
34
true
true
0
5
50
22
13
9
null
null
forste/haReFork
refactorer/RefacUnGuard.hs
bsd-3-clause
dmerge [x] _ = [x]
18
dmerge [x] _ = [x]
18
dmerge [x] _ = [x]
18
false
false
0
5
4
19
9
10
null
null
tolysz/prepare-ghcjs
spec-lts8/base/GHC/Event/PSQ.hs
bsd-3-clause
lbalance, rbalance :: Key -> Prio -> a -> LTree a -> Key -> LTree a -> LTree a lbalance k p v l m r | size' l + size' r < 2 = lloser k p v l m r | size' r > omega * size' l = lbalanceLeft k p v l m r | size' l > omega * size' r = lbalanceRight k p v l m r | otherwise = llose...
340
lbalance, rbalance :: Key -> Prio -> a -> LTree a -> Key -> LTree a -> LTree a lbalance k p v l m r | size' l + size' r < 2 = lloser k p v l m r | size' r > omega * size' l = lbalanceLeft k p v l m r | size' l > omega * size' r = lbalanceRight k p v l m r | otherwise = lloser...
339
lbalance k p v l m r | size' l + size' r < 2 = lloser k p v l m r | size' r > omega * size' l = lbalanceLeft k p v l m r | size' l > omega * size' r = lbalanceRight k p v l m r | otherwise = lloser k p v l m r
260
false
true
1
11
135
188
87
101
null
null
purebred-mua/purebred
src/Purebred/UI/Help/Main.hs
agpl-3.0
ppKey KLeft = "<Left>"
22
ppKey KLeft = "<Left>"
22
ppKey KLeft = "<Left>"
22
false
false
0
5
3
9
4
5
null
null
TOSPIO/yi
src/library/Yi/UI/Pango/Control.hs
gpl-2.0
-- | Map GTK long names to Keys keyTable :: Map.Map Text Key keyTable = Map.fromList [("Down", KDown) ,("Up", KUp) ,("Left", KLeft) ,("Right", KRight) ,("Home", KHome) ,("End", KEnd) ,("BackSpace", KBS) ,("Delete", KDel) ,("Page_Up", KPag...
495
keyTable :: Map.Map Text Key keyTable = Map.fromList [("Down", KDown) ,("Up", KUp) ,("Left", KLeft) ,("Right", KRight) ,("Home", KHome) ,("End", KEnd) ,("BackSpace", KBS) ,("Delete", KDel) ,("Page_Up", KPageUp) ,("Page_Down", KPageDo...
463
keyTable = Map.fromList [("Down", KDown) ,("Up", KUp) ,("Left", KLeft) ,("Right", KRight) ,("Home", KHome) ,("End", KEnd) ,("BackSpace", KBS) ,("Delete", KDel) ,("Page_Up", KPageUp) ,("Page_Down", KPageDown) ,("Insert", KIns)...
434
true
true
0
6
176
159
102
57
null
null
caryoscelus/folivora-ge
demos/gomoku/Main.hs
gpl-3.0
main :: IO () main = do (window, graphics) <- initGL texs <- (load :: IO GomokuTextures) glGo texs (window, graphics) clockSession_ game
158
main :: IO () main = do (window, graphics) <- initGL texs <- (load :: IO GomokuTextures) glGo texs (window, graphics) clockSession_ game
158
main = do (window, graphics) <- initGL texs <- (load :: IO GomokuTextures) glGo texs (window, graphics) clockSession_ game
144
false
true
0
9
44
63
32
31
null
null
maciejspychala/haskell-server
src/Config.hs
mit
{-| Reads config from file at give path -} getConfig :: String -> MaybeT IO Config getConfig path = (liftIO $ readFile path) >>= parseConfig
144
getConfig :: String -> MaybeT IO Config getConfig path = (liftIO $ readFile path) >>= parseConfig
97
getConfig path = (liftIO $ readFile path) >>= parseConfig
57
true
true
0
8
28
38
19
19
null
null
dbp/karamaan-opaleye
Karamaan/Opaleye/ExprArr.hs
bsd-3-clause
constant :: ShowConstant a => a -> Expr (Wire a) constant = constantLit . showConstant
86
constant :: ShowConstant a => a -> Expr (Wire a) constant = constantLit . showConstant
86
constant = constantLit . showConstant
37
false
true
0
10
14
41
18
23
null
null
phischu/fragnix
tests/packages/scotty/Data.Text.Lazy.hs
bsd-3-clause
-- | /O(n)/ Left-justify a string to the given length, using the -- specified fill character on the right. Subject to fusion. Performs -- replacement on invalid scalar values. -- -- Examples: -- -- > justifyLeft 7 'x' "foo" == "fooxxxx" -- > justifyLeft 3 'x' "foobar" == "foobar" justifyLeft :: Int64 -> Char -> Tex...
444
justifyLeft :: Int64 -> Char -> Text -> Text justifyLeft k c t | len >= k = t | otherwise = t `append` replicateChar (k-len) c where len = length t
159
justifyLeft k c t | len >= k = t | otherwise = t `append` replicateChar (k-len) c where len = length t
114
true
true
1
9
96
100
49
51
null
null
plow-technologies/xlsx-simple
test/Xlsx/SimpleSpec.hs
bsd-3-clause
testIbtext :: CellData testIbtext = ibText "estIbtex"
69
testIbtext :: CellData testIbtext = ibText "estIbtex"
57
testIbtext = ibText "estIbtex"
32
false
true
0
6
22
21
8
13
null
null
amccausl/Swish
Swish/HaskellUtils/LookupMapTest.hs
lgpl-2.1
tm101 = newMap [(1,"a"),(2,"bb"),(3,"ccc"),(4,"dddd")]
68
tm101 = newMap [(1,"a"),(2,"bb"),(3,"ccc"),(4,"dddd")]
68
tm101 = newMap [(1,"a"),(2,"bb"),(3,"ccc"),(4,"dddd")]
68
false
false
1
6
17
48
28
20
null
null
phischu/fragnix
benchmarks/containers/Data.IntMap.Base.hs
bsd-3-clause
lookupLE :: Key -> IntMap a -> Maybe (Key, a) lookupLE k t = k `seq` case t of Bin _ m l r | m < 0 -> if k >= 0 then go r l else go Nil r _ -> go Nil t where go def (Bin p m l r) | nomatch k p m = if k < p then unsafeFindMax def else unsafeFindMax r | zero k m = go def l ...
852
lookupLE :: Key -> IntMap a -> Maybe (Key, a) lookupLE k t = k `seq` case t of Bin _ m l r | m < 0 -> if k >= 0 then go r l else go Nil r _ -> go Nil t where go def (Bin p m l r) | nomatch k p m = if k < p then unsafeFindMax def else unsafeFindMax r | zero k m = go def l ...
852
lookupLE k t = k `seq` case t of Bin _ m l r | m < 0 -> if k >= 0 then go r l else go Nil r _ -> go Nil t where go def (Bin p m l r) | nomatch k p m = if k < p then unsafeFindMax def else unsafeFindMax r | zero k m = go def l | otherwise = go l r go d...
806
false
true
1
12
269
259
127
132
null
null
RossMeikleham/GPC
src/GPC/Interpreter.hs
bsd-2-clause
performDivision (Number (Right n1)) (Number (Right n2)) = Right $ ExpLit $ Number (Right $ n1 / n2)
99
performDivision (Number (Right n1)) (Number (Right n2)) = Right $ ExpLit $ Number (Right $ n1 / n2)
99
performDivision (Number (Right n1)) (Number (Right n2)) = Right $ ExpLit $ Number (Right $ n1 / n2)
99
false
false
0
9
17
57
28
29
null
null
Lykos/Sara
src/lib/Sara/Codegen/CodeGenerator.hs
gpl-3.0
binaryInstruction (T.TypedBinOp GreaterThan T.Integer T.Integer) a b = instr $ ICmp IP.SGT a b []
99
binaryInstruction (T.TypedBinOp GreaterThan T.Integer T.Integer) a b = instr $ ICmp IP.SGT a b []
99
binaryInstruction (T.TypedBinOp GreaterThan T.Integer T.Integer) a b = instr $ ICmp IP.SGT a b []
99
false
false
0
8
16
46
22
24
null
null
shlevy/ghc
testsuite/tests/partial-sigs/should_compile/T14715.hs
bsd-3-clause
encrypt :: forall z zp zq. Reduce z zq => Cyc z -> Cyc zp -> IO (CT zp (Cyc zq)) encrypt = undefined
100
encrypt :: forall z zp zq. Reduce z zq => Cyc z -> Cyc zp -> IO (CT zp (Cyc zq)) encrypt = undefined
100
encrypt = undefined
19
false
true
0
13
23
58
29
29
null
null
mstksg/hledger
hledger-lib/Hledger/Data/Journal.hs
gpl-3.0
-- | Keep only postings matching the query expression. -- This can leave unbalanced transactions. filterJournalPostings :: Query -> Journal -> Journal filterJournalPostings q j@Journal{jtxns=ts} = j{jtxns=map (filterTransactionPostings q) ts}
242
filterJournalPostings :: Query -> Journal -> Journal filterJournalPostings q j@Journal{jtxns=ts} = j{jtxns=map (filterTransactionPostings q) ts}
144
filterJournalPostings q j@Journal{jtxns=ts} = j{jtxns=map (filterTransactionPostings q) ts}
91
true
true
4
10
29
64
32
32
null
null
bredelings/BAli-Phy
haskell/Range.hs
gpl-2.0
realLine = OpenInterval Nothing Nothing
39
realLine = OpenInterval Nothing Nothing
39
realLine = OpenInterval Nothing Nothing
39
false
false
0
5
4
11
5
6
null
null
itchyny/miv
src/Git.hs
mit
gitUrl xs = "https://github.com/" <> xs
39
gitUrl xs = "https://github.com/" <> xs
39
gitUrl xs = "https://github.com/" <> xs
39
false
false
0
5
5
13
6
7
null
null
SamirTalwar/Smoke
src/app/Test/Smoke/App/Options.hs
mit
testLocationParser :: Parser (Vector FilePath) testLocationParser = Vector.fromList <$> some (argument str (metavar "TEST-LOCATION..."))
138
testLocationParser :: Parser (Vector FilePath) testLocationParser = Vector.fromList <$> some (argument str (metavar "TEST-LOCATION..."))
138
testLocationParser = Vector.fromList <$> some (argument str (metavar "TEST-LOCATION..."))
91
false
true
0
10
15
43
21
22
null
null
erikd/hs-tls
core/Network/TLS/Crypto.hs
bsd-3-clause
hashInit SHA1_MD5 = HashContextSSL H.hashInit H.hashInit
56
hashInit SHA1_MD5 = HashContextSSL H.hashInit H.hashInit
56
hashInit SHA1_MD5 = HashContextSSL H.hashInit H.hashInit
56
false
false
0
6
5
18
8
10
null
null
jeffbr13/conway.hs
conway.hs
bsd-3-clause
-- glider glider = [newCell 0 0, newCell 1 1, newCell 2 1, newCell 0 2, newCell 1 2]
84
glider = [newCell 0 0, newCell 1 1, newCell 2 1, newCell 0 2, newCell 1 2]
74
glider = [newCell 0 0, newCell 1 1, newCell 2 1, newCell 0 2, newCell 1 2]
74
true
false
1
7
18
51
24
27
null
null
c00w/BitToll
haskell/BT/Redis.hs
mit
get :: PersistentConns -> B.ByteString -> B.ByteString -> B.ByteString -> IO (Maybe B.ByteString) get conn itemType item key = do ok <- liftIO $ DR.runRedis (redis conn) $ DR.hget (BC.append itemType item) key getRightRedis ok
242
get :: PersistentConns -> B.ByteString -> B.ByteString -> B.ByteString -> IO (Maybe B.ByteString) get conn itemType item key = do ok <- liftIO $ DR.runRedis (redis conn) $ DR.hget (BC.append itemType item) key getRightRedis ok
242
get conn itemType item key = do ok <- liftIO $ DR.runRedis (redis conn) $ DR.hget (BC.append itemType item) key getRightRedis ok
144
false
true
0
12
50
102
48
54
null
null
mcschroeder/ghc
compiler/deSugar/DsArrows.hs
bsd-3-clause
dsCmd :: DsCmdEnv -- arrow combinators -> IdSet -- set of local vars available to this command -> Type -- type of the stack (right-nested tuple) -> Type -- return type of the command -> HsCmd Id -- command to desuga...
1,639
dsCmd :: DsCmdEnv -- arrow combinators -> IdSet -- set of local vars available to this command -> Type -- type of the stack (right-nested tuple) -> Type -- return type of the command -> HsCmd Id -- command to desuga...
1,414
dsCmd ids local_vars stack_ty res_ty (HsCmdArrApp arrow arg arrow_ty HsFirstOrderApp _) env_ids = do let (a_arg_ty, _res_ty') = tcSplitAppTy arrow_ty (_a_ty, arg_ty) = tcSplitAppTy a_arg_ty core_arrow <- dsLExpr arrow core_arg <- dsLExpr arg stack_id <- newSysLocalDs ...
808
true
true
0
14
619
224
118
106
null
null
amccausl/Swish
Swish/HaskellUtils/ParseTest.hs
lgpl-2.1
testParseAlphaNum3 = testParser "parseAlphaNum3" parseAlphaNum "z//" [('z',"//")]
81
testParseAlphaNum3 = testParser "parseAlphaNum3" parseAlphaNum "z//" [('z',"//")]
81
testParseAlphaNum3 = testParser "parseAlphaNum3" parseAlphaNum "z//" [('z',"//")]
81
false
false
0
7
6
24
13
11
null
null
Jiggins/Matrix
Math/Vector.hs
gpl-3.0
-- * Vector Creation -- | Vector a relative to b newVector :: (Num a) => Point a -> Point a -> Vector a newVector a b = pointToVector $ b - a
142
newVector :: (Num a) => Point a -> Point a -> Vector a newVector a b = pointToVector $ b - a
92
newVector a b = pointToVector $ b - a
37
true
true
0
9
33
57
27
30
null
null
duplode/threepenny-gui
src/Reactive/Threepenny.hs
bsd-3-clause
-- | Return all event occurrences that fulfill the time-varying predicate, -- discard the rest. Generalization of 'filterE'. filterApply :: Behavior (a -> Bool) -> Event a -> Event a filterApply bp = fmap snd . filterE fst . apply ((\p a -> (p a,a)) <$> bp)
257
filterApply :: Behavior (a -> Bool) -> Event a -> Event a filterApply bp = fmap snd . filterE fst . apply ((\p a -> (p a,a)) <$> bp)
132
filterApply bp = fmap snd . filterE fst . apply ((\p a -> (p a,a)) <$> bp)
74
true
true
0
12
46
83
42
41
null
null
JoshuaGross/haskell-learning-log
Code/Haskellbook/DataProc.hs
mit
-- safe cuz it can handle empty lists sumDb :: [DatabaseItem] -> Integer sumDb = sum . filterDbNumber
101
sumDb :: [DatabaseItem] -> Integer sumDb = sum . filterDbNumber
63
sumDb = sum . filterDbNumber
28
true
true
0
7
17
30
14
16
null
null
neobrain/neobot
mediawiki/MediaWiki/API/Action/Undelete.hs
bsd-3-clause
emptyUndeleteRequest :: UndeleteRequest emptyUndeleteRequest = UndeleteRequest { udelTitle = "" , udelToken = "" , udelReason = Nothing , udelTimestamps = [] }
179
emptyUndeleteRequest :: UndeleteRequest emptyUndeleteRequest = UndeleteRequest { udelTitle = "" , udelToken = "" , udelReason = Nothing , udelTimestamps = [] }
179
emptyUndeleteRequest = UndeleteRequest { udelTitle = "" , udelToken = "" , udelReason = Nothing , udelTimestamps = [] }
139
false
true
0
8
42
43
25
18
null
null
brendanhay/gogol
gogol-bigtableadmin/gen/Network/Google/Resource/BigtableAdmin/Operations/Projects/Operations/List.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). opolUploadType :: Lens' OperationsProjectsOperationsList (Maybe Text) opolUploadType = lens _opolUploadType (\ s a -> s{_opolUploadType = a})
220
opolUploadType :: Lens' OperationsProjectsOperationsList (Maybe Text) opolUploadType = lens _opolUploadType (\ s a -> s{_opolUploadType = a})
149
opolUploadType = lens _opolUploadType (\ s a -> s{_opolUploadType = a})
79
true
true
1
9
34
52
25
27
null
null
alphaHeavy/cabal
Cabal/Distribution/Simple/Utils.hs
bsd-3-clause
normaliseLineEndings ('\r':'\n':s) = '\n' : normaliseLineEndings s
66
normaliseLineEndings ('\r':'\n':s) = '\n' : normaliseLineEndings s
66
normaliseLineEndings ('\r':'\n':s) = '\n' : normaliseLineEndings s
66
false
false
0
7
6
23
11
12
null
null
mgax/beancount
lib/haskell/LedgerParser.hs
gpl-2.0
time :: Parser () time = do count 2 digit char ':' count 2 digit char ':' count 2 digit return ()
147
time :: Parser () time = do count 2 digit char ':' count 2 digit char ':' count 2 digit return ()
147
time = do count 2 digit char ':' count 2 digit char ':' count 2 digit return ()
129
false
true
1
9
71
64
24
40
null
null
olsner/ghc
utils/ghctags/Main.hs
bsd-3-clause
targetsAtOneGo :: [FileName] -> (Maybe Handle, Maybe Handle) -> Ghc () -- load a list of targets targetsAtOneGo hsfiles handles = do targets <- mapM (\f -> guessTarget f Nothing) hsfiles setTargets targets modgraph <- depanal [] False let mods = flattenSCCs $ topSortModuleGraph False modgraph Nothing graphDat...
334
targetsAtOneGo :: [FileName] -> (Maybe Handle, Maybe Handle) -> Ghc () targetsAtOneGo hsfiles handles = do targets <- mapM (\f -> guessTarget f Nothing) hsfiles setTargets targets modgraph <- depanal [] False let mods = flattenSCCs $ topSortModuleGraph False modgraph Nothing graphData mods handles
308
targetsAtOneGo hsfiles handles = do targets <- mapM (\f -> guessTarget f Nothing) hsfiles setTargets targets modgraph <- depanal [] False let mods = flattenSCCs $ topSortModuleGraph False modgraph Nothing graphData mods handles
237
true
true
0
12
59
123
56
67
null
null
Purview/purview
src/Control/Monad/Progress.hs
gpl-3.0
-- | Runs a pure progress procedure and, if the procedure completes a -- step, returns the 'TaskStack' at that step and the continuation of -- the procedure, or, if the procedure is complete, returns the -- computed value. runProgress :: Progress l a -- ^ The progress procedure to run -> Either (Prog...
385
runProgress :: Progress l a -- ^ The progress procedure to run -> Either (Progress l a, TaskStack l) a runProgress = runIdentity . runProgressT
162
runProgress = runIdentity . runProgressT
40
true
true
0
8
82
48
26
22
null
null
alonho/bottle
src/Graphics/UI/Bottle/Widgets/GridView.hs
gpl-3.0
unzip2d :: [[(a, b)]] -> ([[a]], [[b]]) unzip2d = unzip . map unzip
67
unzip2d :: [[(a, b)]] -> ([[a]], [[b]]) unzip2d = unzip . map unzip
67
unzip2d = unzip . map unzip
27
false
true
0
8
12
52
31
21
null
null
rjwright/js-typeomatic
ParseJS.hs
apache-2.0
akeJSASTExpression :: JSNode -> ExprWithSourceSpan makeJSASTExpression (NS (JSArguments args) srcSpan) = toJSASTArguments args srcSpan
139
makeJSASTExpression :: JSNode -> ExprWithSourceSpan makeJSASTExpression (NS (JSArguments args) srcSpan) = toJSASTArguments args srcSpan
139
makeJSASTExpression (NS (JSArguments args) srcSpan) = toJSASTArguments args srcSpan
87
false
true
0
9
18
37
18
19
null
null
stgm/prac-testing
week1/Sol1.hs
mit
blowupChar :: Char -> Int -> String blowupChar c 0 = ""
55
blowupChar :: Char -> Int -> String blowupChar c 0 = ""
55
blowupChar c 0 = ""
19
false
true
0
6
11
24
12
12
null
null
erochest/c18sgml
src/C18/Balance.hs
apache-2.0
denestTag _ stack t@(TagComment{}) = (stack, [t])
50
denestTag _ stack t@(TagComment{}) = (stack, [t])
50
denestTag _ stack t@(TagComment{}) = (stack, [t])
50
false
false
0
8
7
32
18
14
null
null
jeffreyrosenbluth/stackage
Stackage/Upload.hs
mit
uploadDocMap :: UploadDocMap -> Manager -> IO (Response LByteString) uploadDocMap UploadDocMap {..} man = do docmap <- docsListing udmPlan udmDocDir req1 <- parseUrl $ unpack $ unStackageServer udmServer ++ "/upload-doc-map" req2 <- formDataBody (formData docmap) req1 let req3 = req2 { metho...
853
uploadDocMap :: UploadDocMap -> Manager -> IO (Response LByteString) uploadDocMap UploadDocMap {..} man = do docmap <- docsListing udmPlan udmDocDir req1 <- parseUrl $ unpack $ unStackageServer udmServer ++ "/upload-doc-map" req2 <- formDataBody (formData docmap) req1 let req3 = req2 { metho...
853
uploadDocMap UploadDocMap {..} man = do docmap <- docsListing udmPlan udmDocDir req1 <- parseUrl $ unpack $ unStackageServer udmServer ++ "/upload-doc-map" req2 <- formDataBody (formData docmap) req1 let req3 = req2 { method = "PUT" , requestHeaders = [ ("Authoriz...
784
false
true
1
16
267
230
114
116
null
null
lukexi/rumpus
src/Rumpus/Systems/Physics.hs
bsd-3-clause
updateRigidBodyWithBodyType :: MonadIO m => RigidBody -> BodyType -> m () updateRigidBodyWithBodyType rigidBody bodyType = do setRigidBodyKinematic rigidBody (bodyType `elem` [Detector, Animated]) setRigidBodyNoContactResponse rigidBody (bodyType == Detector)
275
updateRigidBodyWithBodyType :: MonadIO m => RigidBody -> BodyType -> m () updateRigidBodyWithBodyType rigidBody bodyType = do setRigidBodyKinematic rigidBody (bodyType `elem` [Detector, Animated]) setRigidBodyNoContactResponse rigidBody (bodyType == Detector)
275
updateRigidBodyWithBodyType rigidBody bodyType = do setRigidBodyKinematic rigidBody (bodyType `elem` [Detector, Animated]) setRigidBodyNoContactResponse rigidBody (bodyType == Detector)
201
false
true
0
11
42
79
38
41
null
null
SantiMunin/harmony
src/LangUtils.hs
gpl-3.0
strName :: StructType -- ^ The struct info -> String -- ^ The name of the struct strName (DefStr (Ident name) _) = name
127
strName :: StructType -- ^ The struct info -> String strName (DefStr (Ident name) _) = name
99
strName (DefStr (Ident name) _) = name
38
true
true
0
11
31
40
19
21
null
null
masatoko/protonic
src/Protonic/Core.hs
bsd-3-clause
withRenderer :: (MonadReader ProtoConfig m, MonadIO m) => (SDL.Renderer -> IO a) -> m a withRenderer act = do mvar <- asks renderer liftIO $ withMVar mvar act
162
withRenderer :: (MonadReader ProtoConfig m, MonadIO m) => (SDL.Renderer -> IO a) -> m a withRenderer act = do mvar <- asks renderer liftIO $ withMVar mvar act
162
withRenderer act = do mvar <- asks renderer liftIO $ withMVar mvar act
74
false
true
0
10
31
77
35
42
null
null
Denommus/stack
src/Stack/Build/ConstructPlan.hs
bsd-3-clause
installPackage :: Bool -- ^ is this being used by a dependency? -> PackageName -> PackageSource -> M (Either ConstructPlanException AddDepRes) installPackage treatAsDep name ps = do ctx <- ask package <- psPackage name ps depsRes <- addPackageDeps treatAsDep package case depsRes of ...
1,499
installPackage :: Bool -- ^ is this being used by a dependency? -> PackageName -> PackageSource -> M (Either ConstructPlanException AddDepRes) installPackage treatAsDep name ps = do ctx <- ask package <- psPackage name ps depsRes <- addPackageDeps treatAsDep package case depsRes of ...
1,499
installPackage treatAsDep name ps = do ctx <- ask package <- psPackage name ps depsRes <- addPackageDeps treatAsDep package case depsRes of Left e -> return $ Left e Right (missing, present, minLoc) -> do return $ Right $ ADRToInstall Task { taskProvides = Pac...
1,341
false
true
0
27
679
310
150
160
null
null
nevrenato/Hets_Fork
Hybrid/Parse_AS.hs
gpl-2.0
hItem''' :: AParser st a -> AParser st ([Annoted a], [AnHybFORM], Range) hItem''' pr = do c <- hKey' (as,cs) <- separatedBy (annoParser pr) anSemiOrComma let ps = catRange $ c : cs return (as,[],ps)
234
hItem''' :: AParser st a -> AParser st ([Annoted a], [AnHybFORM], Range) hItem''' pr = do c <- hKey' (as,cs) <- separatedBy (annoParser pr) anSemiOrComma let ps = catRange $ c : cs return (as,[],ps)
234
hItem''' pr = do c <- hKey' (as,cs) <- separatedBy (annoParser pr) anSemiOrComma let ps = catRange $ c : cs return (as,[],ps)
161
false
true
0
11
70
111
56
55
null
null
lu-fennell/nix-env-rebuild
src/Nix/Test/EnvRebuild.hs
gpl-3.0
ex_someInstalling2 :: [Text] ex_someInstalling2 = [ "installing `rxvt-unicode-9.16-with-perl'" , " installing `subversion-1.7.13'" , "these derivations will be built:" , " /nix/store/4w40vbz4cix0z474shpcnmfxjc7kh69z-texlive-core-2014.drv" , "installing `texlive-full'" ]
284
ex_someInstalling2 :: [Text] ex_someInstalling2 = [ "installing `rxvt-unicode-9.16-with-perl'" , " installing `subversion-1.7.13'" , "these derivations will be built:" , " /nix/store/4w40vbz4cix0z474shpcnmfxjc7kh69z-texlive-core-2014.drv" , "installing `texlive-full'" ]
284
ex_someInstalling2 = [ "installing `rxvt-unicode-9.16-with-perl'" , " installing `subversion-1.7.13'" , "these derivations will be built:" , " /nix/store/4w40vbz4cix0z474shpcnmfxjc7kh69z-texlive-core-2014.drv" , "installing `texlive-full'" ]
255
false
true
0
5
38
29
18
11
null
null
jota191/PLang
src/Parser.hs
gpl-3.0
Cond = (\var _ -> Nonzero var) <$> pTVar <*> pTNeq0
52
pCond = (\var _ -> Nonzero var) <$> pTVar <*> pTNeq0
52
pCond = (\var _ -> Nonzero var) <$> pTVar <*> pTNeq0
52
false
false
1
9
11
30
14
16
null
null
oldmanmike/opensandbox
src/OpenSandbox/Protocol/Types.hs
gpl-3.0
putNetcodeByteString :: B.ByteString -> Put putNetcodeByteString b = do putVarInt . B.length $ b putByteString b
116
putNetcodeByteString :: B.ByteString -> Put putNetcodeByteString b = do putVarInt . B.length $ b putByteString b
116
putNetcodeByteString b = do putVarInt . B.length $ b putByteString b
72
false
true
0
9
19
39
18
21
null
null