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
JPMoresmau/leksah
src/IDE/Utils/ServerConnection.hs
gpl-2.0
doServerCommand' :: ServerCommand -> (ServerAnswer -> IDEM ()) -> IDEAction doServerCommand' command cont = do server' <- readIDE server case server' of Just handle -> do isOpen <- liftIO $ hIsOpen handle if isOpen then void (doCommand handle) else...
1,864
doServerCommand' :: ServerCommand -> (ServerAnswer -> IDEM ()) -> IDEAction doServerCommand' command cont = do server' <- readIDE server case server' of Just handle -> do isOpen <- liftIO $ hIsOpen handle if isOpen then void (doCommand handle) else...
1,864
doServerCommand' command cont = do server' <- readIDE server case server' of Just handle -> do isOpen <- liftIO $ hIsOpen handle if isOpen then void (doCommand handle) else do modifyIDE_ (\ ide -> ide{server = Nothing}) ...
1,788
false
true
0
28
742
505
234
271
null
null
nomeata/ghc
compiler/codeGen/CgUtils.hs
bsd-3-clause
baseRegOffset (FloatReg 4) = oFFSET_StgRegTable_rF4
58
baseRegOffset (FloatReg 4) = oFFSET_StgRegTable_rF4
58
baseRegOffset (FloatReg 4) = oFFSET_StgRegTable_rF4
58
false
false
0
6
11
16
7
9
null
null
roman-smrz/rawe
src/FRP/Rawe/Prelude.hs
bsd-3-clause
-- take n, applied to a list xs, returns the prefix of xs of length n, -- or xs itself if n > length xs. drop n xs returns the suffix of xs -- after the first n elements, or [] if n > length xs. splitAt n xs -- is equivalent to (take n xs, drop n xs). take :: Bhv Int -> Bhv [a] -> Bhv [a] take = bfix $ \tk n xs -> i...
377
take :: Bhv Int -> Bhv [a] -> Bhv [a] take = bfix $ \tk n xs -> ite (n <= 0) nil $ list nil (\x xs -> x ~: tk (n-1) xs) xs
122
take = bfix $ \tk n xs -> ite (n <= 0) nil $ list nil (\x xs -> x ~: tk (n-1) xs) xs
84
true
true
2
12
96
107
54
53
null
null
input-output-hk/cardano-sl
explorer/src/Pos/Explorer/TestUtil.hs
apache-2.0
---------------------------------------------------------------- -- Function mocks ---------------------------------------------------------------- -- | More predictable generation that doesn't violate the invariants. generateValidExplorerMockableMode :: BlockNumber -> SlotsPerEpoch -> IO ExplorerMockableM...
3,739
generateValidExplorerMockableMode :: BlockNumber -> SlotsPerEpoch -> IO ExplorerMockableMode generateValidExplorerMockableMode blocksNumber slotsPerEpoch = do slotStart <- liftIO $ generate $ arbitrary slotLeaders <- produceSlotLeaders blocksNumber secretKeys <- produceSecretKeys bloc...
3,520
generateValidExplorerMockableMode blocksNumber slotsPerEpoch = do slotStart <- liftIO $ generate $ arbitrary slotLeaders <- produceSlotLeaders blocksNumber secretKeys <- produceSecretKeys blocksNumber blocks <- withDefConfigurations $ \_ _ _ -> produceBlocksByBlockNumberAndSlots bloc...
3,415
true
true
0
14
953
808
429
379
null
null
nevrenato/Hets_Fork
CSL/quickchecks.hs
gpl-2.0
finsetC :: (Ord a) => Gen a -> Gen (SetOrInterval a) finsetC g = fmap (Set . Set.fromList) $ listOf1 g
102
finsetC :: (Ord a) => Gen a -> Gen (SetOrInterval a) finsetC g = fmap (Set . Set.fromList) $ listOf1 g
102
finsetC g = fmap (Set . Set.fromList) $ listOf1 g
49
false
true
0
10
20
62
29
33
null
null
ronwalf/ridemap
src/ridemap.hs
bsd-3-clause
gCirc :: Double gCirc = 20037508.34*2
37
gCirc :: Double gCirc = 20037508.34*2
37
gCirc = 20037508.34*2
21
false
true
0
5
5
15
8
7
null
null
shlevy/ghc
compiler/basicTypes/RdrName.hs
bsd-3-clause
extendLocalRdrEnv :: LocalRdrEnv -> Name -> LocalRdrEnv -- The Name should be a non-top-level thing extendLocalRdrEnv lre@(LRE { lre_env = env, lre_in_scope = ns }) name = WARN( isExternalName name, ppr name ) lre { lre_env = extendOccEnv env (nameOccName name) name , lre_in_scope = extendNameSet ns ...
326
extendLocalRdrEnv :: LocalRdrEnv -> Name -> LocalRdrEnv extendLocalRdrEnv lre@(LRE { lre_env = env, lre_in_scope = ns }) name = WARN( isExternalName name, ppr name ) lre { lre_env = extendOccEnv env (nameOccName name) name , lre_in_scope = extendNameSet ns name }
282
extendLocalRdrEnv lre@(LRE { lre_env = env, lre_in_scope = ns }) name = WARN( isExternalName name, ppr name ) lre { lre_env = extendOccEnv env (nameOccName name) name , lre_in_scope = extendNameSet ns name }
226
true
true
1
10
67
103
53
50
null
null
Spawek/HCPParse
src/Data/Either/Unwrap.hs
mit
whenLeft _ _ = return ()
31
whenLeft _ _ = return ()
31
whenLeft _ _ = return ()
31
false
false
0
6
12
16
7
9
null
null
diku-dk/futhark
src/Language/Futhark/Prop.hs
isc
decImports ValDec {} = []
25
decImports ValDec {} = []
25
decImports ValDec {} = []
25
false
false
0
6
4
15
7
8
null
null
mightymoose/liquidhaskell
benchmarks/llrbtree-0.1.1/Data/Set/LLRBTree.hs
bsd-3-clause
---------------------------------------------------------------- turnR :: RBTree a -> RBTree a turnR Leaf = error "turnR"
134
turnR :: RBTree a -> RBTree a turnR Leaf = error "turnR"
68
turnR Leaf = error "turnR"
38
true
true
0
6
25
28
13
15
null
null
uwap/Idris-dev
src/Idris/Delaborate.hs
bsd-3-clause
pprintErr' i (LoadingFailed fn e) = text "Loading" <+> text fn <+> text "failed:" <+> pprintErr' i e
101
pprintErr' i (LoadingFailed fn e) = text "Loading" <+> text fn <+> text "failed:" <+> pprintErr' i e
101
pprintErr' i (LoadingFailed fn e) = text "Loading" <+> text fn <+> text "failed:" <+> pprintErr' i e
101
false
false
0
8
18
47
20
27
null
null
tonymorris/language-javascript
src/Language/JavaScript/Parser/AST.hs
bsd-3-clause
ss (NT node _ _) = showStrippedNode node
40
ss (NT node _ _) = showStrippedNode node
40
ss (NT node _ _) = showStrippedNode node
40
false
false
0
6
7
23
10
13
null
null
spockwangs/scheme.in.haskell
list7.hs
unlicense
-- | Implementing 'cdr'. -- Rules: -- (cdr (a b c)) = (b c) -- (cdr (a b)) = (b) -- (cdr (a)) = NIL -- (cdr (a b . c)) = (b . c) -- (cdr (a . b)) = b -- (cdr a) = error (not list) -- (cdr a b) = error (too many args) cdr :: [LispVal] -> ThrowsError LispVal cdr [List (x : xs)] = return $ List xs
309
cdr :: [LispVal] -> ThrowsError LispVal cdr [List (x : xs)] = return $ List xs
78
cdr [List (x : xs)] = return $ List xs
38
true
true
0
11
87
57
32
25
null
null
lovasko/swim
src/Command/Export/Perform.hs
bsd-2-clause
optionTimestamp :: Parser Bool -- ^ parser optionTimestamp = switch $ short 't' <> long "timestamp" <> help "Display time values as timestamps"
158
optionTimestamp :: Parser Bool optionTimestamp = switch $ short 't' <> long "timestamp" <> help "Display time values as timestamps"
146
optionTimestamp = switch $ short 't' <> long "timestamp" <> help "Display time values as timestamps"
115
true
true
6
5
37
39
17
22
null
null
dmjio/stripe
stripe-core/src/Web/Stripe/Charge.hs
mit
------------------------------------------------------------------------------ -- | Retrieve all `Charge`s getCharges :: StripeRequest GetCharges getCharges = request where request = mkStripeRequest GET url params url = "charges" params = []
268
getCharges :: StripeRequest GetCharges getCharges = request where request = mkStripeRequest GET url params url = "charges" params = []
161
getCharges = request where request = mkStripeRequest GET url params url = "charges" params = []
118
true
true
2
6
52
45
23
22
null
null
ygale/yesod
yesod-core/Yesod/Core/Handler.hs
mit
-- | Returns a function that runs 'HandlerT' actions inside @IO@. -- -- Sometimes you want to run an inner 'HandlerT' action outside -- the control flow of an HTTP request (on the outer 'HandlerT' -- action). For example, you may want to spawn a new thread: -- -- @ -- getFooR :: Handler RepHtml -- getFooR = do -- ru...
3,194
handlerToIO :: (MonadIO m1, MonadIO m2) => HandlerT site m1 (HandlerT site IO a -> m2 a) handlerToIO = HandlerT $ \oldHandlerData -> do -- Take just the bits we need from oldHandlerData. let newReq = oldReq { reqWaiRequest = newWaiReq } where oldReq = handlerRequest oldHandlerData ...
1,866
handlerToIO = HandlerT $ \oldHandlerData -> do -- Take just the bits we need from oldHandlerData. let newReq = oldReq { reqWaiRequest = newWaiReq } where oldReq = handlerRequest oldHandlerData oldWaiReq = reqWaiRequest oldReq newWaiReq = oldWaiReq { W.requestBo...
1,777
true
true
2
21
918
399
231
168
null
null
hinneburg/TopicExplorer
creator-server/common/src/TopicExplorer/Configuration/Date.hs
agpl-3.0
format :: Date -> String format d = printf "%04d-%02d-%02d %02d:%02d" (year d) (month d) (day d) (hour d) (minute d)
125
format :: Date -> String format d = printf "%04d-%02d-%02d %02d:%02d" (year d) (month d) (day d) (hour d) (minute d)
125
format d = printf "%04d-%02d-%02d %02d:%02d" (year d) (month d) (day d) (hour d) (minute d)
100
false
true
0
7
29
61
30
31
null
null
wavewave/lhc-analysis-collection
analysis/2013-08-05-XQLD-prospino_2sq.hs
gpl-3.0
snd3 (_,a,_) = a
16
snd3 (_,a,_) = a
16
snd3 (_,a,_) = a
16
false
false
0
5
3
19
10
9
null
null
mstksg/hledger
hledger-lib/Hledger/Read/CsvReader.hs
gpl-3.0
addDirective :: (DirectiveName, String) -> CsvRules -> CsvRules addDirective d r = r{rdirectives=d:rdirectives r}
113
addDirective :: (DirectiveName, String) -> CsvRules -> CsvRules addDirective d r = r{rdirectives=d:rdirectives r}
113
addDirective d r = r{rdirectives=d:rdirectives r}
49
false
true
0
9
13
55
26
29
null
null
ununsept/lambdaHTTP
Engine.hs
mit
loger :: Config -> SockAddr -> String -> IO () loger conf addr request = do time <- getClockTime case fileLog conf of Just file -> appendFile file $ (show addr) ++ " = " ++ (show time) ++ "\n" ++ request Nothing -> putStrLn $ (show addr) ++ " = " ++ (show time) ++ "\n" ++...
328
loger :: Config -> SockAddr -> String -> IO () loger conf addr request = do time <- getClockTime case fileLog conf of Just file -> appendFile file $ (show addr) ++ " = " ++ (show time) ++ "\n" ++ request Nothing -> putStrLn $ (show addr) ++ " = " ++ (show time) ++ "\n" ++...
328
loger conf addr request = do time <- getClockTime case fileLog conf of Just file -> appendFile file $ (show addr) ++ " = " ++ (show time) ++ "\n" ++ request Nothing -> putStrLn $ (show addr) ++ " = " ++ (show time) ++ "\n" ++ request
281
false
true
0
16
106
134
64
70
null
null
eugenkiss/mastermind
haskell/Strategies/Entropy.hs
bsd-3-clause
extractGuess' :: StrategyState -> Code extractGuess' = guess
60
extractGuess' :: StrategyState -> Code extractGuess' = guess
60
extractGuess' = guess
21
false
true
0
5
7
15
8
7
null
null
ku-fpg/kansas-amber
System/Hardware/Haskino/Compiler.hs
bsd-3-clause
compileExpr (ModI16 e1 e2) = compileTwoSubExpr "mod16" e1 e2
60
compileExpr (ModI16 e1 e2) = compileTwoSubExpr "mod16" e1 e2
60
compileExpr (ModI16 e1 e2) = compileTwoSubExpr "mod16" e1 e2
60
false
false
0
7
8
24
11
13
null
null
joelburget/haste-compiler
Tests/Read.hs
bsd-3-clause
strList = "[32,7,6,49,0,9,9]"
29
strList = "[32,7,6,49,0,9,9]"
29
strList = "[32,7,6,49,0,9,9]"
29
false
false
1
5
2
10
3
7
null
null
urbanslug/ghc
libraries/base/Data/Data.hs
bsd-3-clause
-- | Gets the fixity of a constructor constrFixity :: Constr -> Fixity constrFixity = confixity
95
constrFixity :: Constr -> Fixity constrFixity = confixity
57
constrFixity = confixity
24
true
true
0
7
15
23
10
13
null
null
kylc/torrent
src/BitTorrent/Bencode.hs
bsd-3-clause
bInt :: Parser Bencode bInt = BInt <$> (char 'i' *> signed decimal <* char 'e')
79
bInt :: Parser Bencode bInt = BInt <$> (char 'i' *> signed decimal <* char 'e')
79
bInt = BInt <$> (char 'i' *> signed decimal <* char 'e')
56
false
true
0
9
15
38
18
20
null
null
beni55/hspec-snap
src/Test/Hspec/Snap.hs
bsd-3-clause
setResult :: Result -> SnapHspecM b () setResult r = do (SnapHspecState r' s a i sess bef aft) <- S.get case r' of Success -> S.put (SnapHspecState r s a i sess bef aft) _ -> return () -- | Asserts that a given stateful action will produce a specific different res...
356
setResult :: Result -> SnapHspecM b () setResult r = do (SnapHspecState r' s a i sess bef aft) <- S.get case r' of Success -> S.put (SnapHspecState r s a i sess bef aft) _ -> return () -- | Asserts that a given stateful action will produce a specific different res...
356
setResult r = do (SnapHspecState r' s a i sess bef aft) <- S.get case r' of Success -> S.put (SnapHspecState r s a i sess bef aft) _ -> return () -- | Asserts that a given stateful action will produce a specific different result after -- an action has been run.
317
false
true
0
13
115
106
50
56
null
null
mfpi/hnars
src/FingerTree.hs
mit
(><) :: (Measured v a) => FingerTree v a -> FingerTree v a -> FingerTree v a xs >< ys = app3 xs [] ys
101
(><) :: (Measured v a) => FingerTree v a -> FingerTree v a -> FingerTree v a xs >< ys = app3 xs [] ys
101
xs >< ys = app3 xs [] ys
24
false
true
0
10
24
62
30
32
null
null
fpco/esqueleto
src/Database/Esqueleto/Internal/Sql.hs
bsd-3-clause
-- | Create a fresh 'Ident'. If possible, use the given -- 'DBName'. newIdentFor :: DBName -> SqlQuery Ident newIdentFor = Q . lift . try . unDBName where try orig = do s <- S.get let go (t:ts) | t `HS.member` inUse s = go ts | otherwise = use t go [] = error...
673
newIdentFor :: DBName -> SqlQuery Ident newIdentFor = Q . lift . try . unDBName where try orig = do s <- S.get let go (t:ts) | t `HS.member` inUse s = go ts | otherwise = use t go [] = error "Esqueleto/Sql/newIdentFor: never here" go (possibilities orig)...
603
newIdentFor = Q . lift . try . unDBName where try orig = do s <- S.get let go (t:ts) | t `HS.member` inUse s = go ts | otherwise = use t go [] = error "Esqueleto/Sql/newIdentFor: never here" go (possibilities orig) possibilities t = t : map addNum [...
563
true
true
0
14
224
239
116
123
null
null
nevrenato/Hets_Fork
CASL/ToDoc.hs
gpl-2.0
mkJunctDoc :: FormExtension f => Bool -> FORMULA f -> Doc -> Doc mkJunctDoc b f = if isJunct f || b && isQuant f then parens else id
132
mkJunctDoc :: FormExtension f => Bool -> FORMULA f -> Doc -> Doc mkJunctDoc b f = if isJunct f || b && isQuant f then parens else id
132
mkJunctDoc b f = if isJunct f || b && isQuant f then parens else id
67
false
true
0
8
28
60
29
31
null
null
AndrewRademacher/hasql-postgres
library/Hasql/Postgres/ErrorCode.hs
mit
-- | Code \"2201F\". invalid_argument_for_power_function :: ErrorCode = "2201F"
96
invalid_argument_for_power_function :: ErrorCode = "2201F"
75
invalid_argument_for_power_function :: ErrorCode = "2201F"
75
true
false
0
5
25
12
6
6
null
null
vincenthz/hs-crypto-random
Crypto/Random/Entropy.hs
bsd-3-clause
createTestEntropyPool :: ByteString -> EntropyPool createTestEntropyPool bs | B.null bs = error "cannot create entropy pool from an empty bytestring" | otherwise = unsafePerformIO $ createEntropyPoolWith defaultPoolSize [EntropyBackend $ TestEntropySource bs]
267
createTestEntropyPool :: ByteString -> EntropyPool createTestEntropyPool bs | B.null bs = error "cannot create entropy pool from an empty bytestring" | otherwise = unsafePerformIO $ createEntropyPoolWith defaultPoolSize [EntropyBackend $ TestEntropySource bs]
267
createTestEntropyPool bs | B.null bs = error "cannot create entropy pool from an empty bytestring" | otherwise = unsafePerformIO $ createEntropyPoolWith defaultPoolSize [EntropyBackend $ TestEntropySource bs]
216
false
true
1
9
38
58
27
31
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'VG.init' vg_init = VG.init
31
vg_init = VG.init
17
vg_init = VG.init
17
true
false
0
5
4
9
5
4
null
null
davidspies/regret-solver
game/src/Data/Dist.hs
gpl-3.0
withProbability :: Dist a -> Dist (Probability, a) withProbability (Bottom d) = Bottom (1, d)
93
withProbability :: Dist a -> Dist (Probability, a) withProbability (Bottom d) = Bottom (1, d)
93
withProbability (Bottom d) = Bottom (1, d)
42
false
true
0
9
14
49
24
25
null
null
utky/lycopene
src/Lycopene/Print.hs
apache-2.0
(<&>) :: Printer a -> Printer a -> Printer a (<&>) = pappend
60
(<&>) :: Printer a -> Printer a -> Printer a (<&>) = pappend
60
(<&>) = pappend
15
false
true
0
8
12
38
18
20
null
null
ezyang/ghc
compiler/prelude/THNames.hs
bsd-3-clause
staticEIdKey = mkPreludeMiscIdUnique 298
45
staticEIdKey = mkPreludeMiscIdUnique 298
45
staticEIdKey = mkPreludeMiscIdUnique 298
45
false
false
0
5
8
9
4
5
null
null
garetxe/cabal
cabal-install/tests/UnitTests/Distribution/Client/Dependency/Modular/Solver.hs
bsd-3-clause
-- | cabal must set enable-lib to false in order to avoid the unavailable -- dependency. Flags are true by default. The flag choice causes "pkg" to -- depend on "false-dep". testBuildable :: String -> ExampleDependency -> TestTree testBuildable testName unavailableDep = runTest $ mkTestExtLangPC (Just []) (Just [])...
934
testBuildable :: String -> ExampleDependency -> TestTree testBuildable testName unavailableDep = runTest $ mkTestExtLangPC (Just []) (Just []) [] db testName ["pkg"] expected where expected = Just [("false-dep", 1), ("pkg", 1)] db = [ Right $ exAv "pkg" 1 [ unavailableDep ...
760
testBuildable testName unavailableDep = runTest $ mkTestExtLangPC (Just []) (Just []) [] db testName ["pkg"] expected where expected = Just [("false-dep", 1), ("pkg", 1)] db = [ Right $ exAv "pkg" 1 [ unavailableDep , ExFlag "enable-lib" (Buildable []) NotBuilda...
703
true
true
3
14
305
208
107
101
null
null
FranklinChen/stable-maps
System/Mem/StableName/Map.hs
bsd-3-clause
null :: Map f -> Bool null (Map m) = IntMap.null m
50
null :: Map f -> Bool null (Map m) = IntMap.null m
50
null (Map m) = IntMap.null m
28
false
true
0
7
11
32
15
17
null
null
adinapoli/Shelly.hs
test/src/Help.hs
bsd-3-clause
within_dir :: FilePath -> Sh a -> Sh a within_dir d action = with_dir d $ chdir d action
90
within_dir :: FilePath -> Sh a -> Sh a within_dir d action = with_dir d $ chdir d action
90
within_dir d action = with_dir d $ chdir d action
51
false
true
0
7
20
42
19
23
null
null
Noeda/dfterm3
src/Dfterm3/CP437ToUnicode.hs
isc
cp437ToUnicode 10 = '\x25d9'
28
cp437ToUnicode 10 = '\x25d9'
28
cp437ToUnicode 10 = '\x25d9'
28
false
false
0
5
3
9
4
5
null
null
parsonsmatt/lambda
src/Lambda/Core.hs
bsd-3-clause
(~>) :: String -> Lambda -> Lambda v ~> x = Wrap (Abs (Variable v) x)
69
(~>) :: String -> Lambda -> Lambda v ~> x = Wrap (Abs (Variable v) x)
69
v ~> x = Wrap (Abs (Variable v) x)
34
false
true
0
9
15
45
22
23
null
null
tabemann/amphibian
src_old/Network/IRC/Client/Amphibian/Commands.hs
bsd-3-clause
rpl_NONE :: MessageCommand rpl_NONE = "300"
43
rpl_NONE :: MessageCommand rpl_NONE = "300"
43
rpl_NONE = "300"
16
false
true
0
4
5
11
6
5
null
null
liamoc/composition-tree
Data/Compositions/Internal.hs
bsd-3-clause
-- | Convert a compositions list into a list of elements. The other direction -- is provided in the 'Data.Foldable.Foldable' instance. This will perform O(n log n) element compositions. -- -- __Isomorphism to lists__: -- -- prop> \(Compositions x) -> fromList (toList x) == x -- prop> \(x :: [Element]) -> toList (from...
570
fromList :: Monoid a => [a] -> Compositions a fromList = mconcat . map singleton
80
fromList = mconcat . map singleton
34
true
true
0
7
103
47
29
18
null
null
juodaspaulius/clafer-old-customBNFC
src/Language/Clafer/Intermediate/Analysis.hs
mit
runListT_ :: Monad m => ListT m a -> m () runListT_ l = runListT l >> return ()
79
runListT_ :: Monad m => ListT m a -> m () runListT_ l = runListT l >> return ()
79
runListT_ l = runListT l >> return ()
37
false
true
0
8
18
47
21
26
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/enumFromThenTo_1.hs
mit
primCmpInt (Neg x) (Neg y) = primCmpNat y x
43
primCmpInt (Neg x) (Neg y) = primCmpNat y x
43
primCmpInt (Neg x) (Neg y) = primCmpNat y x
43
false
false
0
7
8
28
13
15
null
null
beni55/cryptol
src/Cryptol/TypeCheck/Solver/Numeric/SimplifyExpr.hs
bsd-3-clause
crySimpExprStep :: Expr -> Maybe Expr crySimpExprStep e = case crySimpExprStep1 e of Just e1 -> Just e1 Nothing -> do let e1 = normSum e guard (e /= e1) return e1 -- | Make a simplification step, assuming the expression is well-formed.
282
crySimpExprStep :: Expr -> Maybe Expr crySimpExprStep e = case crySimpExprStep1 e of Just e1 -> Just e1 Nothing -> do let e1 = normSum e guard (e /= e1) return e1 -- | Make a simplification step, assuming the expression is well-formed.
282
crySimpExprStep e = case crySimpExprStep1 e of Just e1 -> Just e1 Nothing -> do let e1 = normSum e guard (e /= e1) return e1 -- | Make a simplification step, assuming the expression is well-formed.
244
false
true
0
13
89
78
35
43
null
null
kovach/web
res2/Unification.hs
gpl-2.0
freshTerm (Variable var) e@(Env{..}) = let f = Ref (R freshName) in (f, e{freshName = freshName + 1, context = M.insert var f context})
139
freshTerm (Variable var) e@(Env{..}) = let f = Ref (R freshName) in (f, e{freshName = freshName + 1, context = M.insert var f context})
139
freshTerm (Variable var) e@(Env{..}) = let f = Ref (R freshName) in (f, e{freshName = freshName + 1, context = M.insert var f context})
139
false
false
0
11
27
82
43
39
null
null
krakrjak/ImplicitCAD
Graphics/Implicit/ExtOpenScad/Eval/Expr.hs
agpl-3.0
patMatch Wild _ = Just []
25
patMatch Wild _ = Just []
25
patMatch Wild _ = Just []
25
false
false
0
6
5
16
7
9
null
null
chrisdotcode/hackage-server
Distribution/Server/Framework/BackupRestore.hs
bsd-3-clause
fromEntry :: Tar.Entry -> Import () fromEntry entry = case Tar.entryContent entry of Tar.NormalFile bytes _ -> fromFile (Tar.entryPath entry) bytes Tar.Directory {} -> return () -- ignore directory entries Tar.SymbolicLink target -> fromLink (Tar.entryPath entry) (Tar.fromLinkTarget target...
407
fromEntry :: Tar.Entry -> Import () fromEntry entry = case Tar.entryContent entry of Tar.NormalFile bytes _ -> fromFile (Tar.entryPath entry) bytes Tar.Directory {} -> return () -- ignore directory entries Tar.SymbolicLink target -> fromLink (Tar.entryPath entry) (Tar.fromLinkTarget target...
407
fromEntry entry = case Tar.entryContent entry of Tar.NormalFile bytes _ -> fromFile (Tar.entryPath entry) bytes Tar.Directory {} -> return () -- ignore directory entries Tar.SymbolicLink target -> fromLink (Tar.entryPath entry) (Tar.fromLinkTarget target) _ -> throwError $ "Unexpecte...
371
false
true
0
11
86
129
61
68
null
null
thomasjm/ot.hs
test/Control/OperationalTransformation/Text0/Specs.hs
mit
apply :: T.Text -> Text0Operation -> T.Text apply input op = case C.apply op input of Left err -> error err Right x -> x
124
apply :: T.Text -> Text0Operation -> T.Text apply input op = case C.apply op input of Left err -> error err Right x -> x
124
apply input op = case C.apply op input of Left err -> error err Right x -> x
80
false
true
0
8
28
60
28
32
null
null
lorcanmcdonald/mars
src/Mars/Command/Ls.hs
bsd-3-clause
ansiColor Red = ansiWrap "31"
29
ansiColor Red = ansiWrap "31"
29
ansiColor Red = ansiWrap "31"
29
false
false
0
5
4
12
5
7
null
null
JacquesCarette/literate-scientific-software
code/drasil-example/Drasil/SSP/DataDefs.hs
bsd-2-clause
--Notes --FIXME: fill empty lists in lengthBQD :: QDefinition lengthBQD = mkQuantDef baseWthX lengthBEqn
105
lengthBQD :: QDefinition lengthBQD = mkQuantDef baseWthX lengthBEqn
67
lengthBQD = mkQuantDef baseWthX lengthBEqn
42
true
true
0
6
14
26
11
15
null
null
NerdGGuy/wai-middleware-session-stateless
src/Network/Wai/Middleware/Session/Stateless.hs
mit
clearSession :: [ByteString] -> (Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived) -> Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived clearSession x app req = foldr (\x' a -> setNullCookie x' a) app x req
307
clearSession :: [ByteString] -> (Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived) -> Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived clearSession x app req = foldr (\x' a -> setNullCookie x' a) app x req
307
clearSession x app req = foldr (\x' a -> setNullCookie x' a) app x req
70
false
true
0
12
101
98
49
49
null
null
denibertovic/haskell
kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs
bsd-3-clause
-- | 'v1ComponentStatusKind' Lens v1ComponentStatusKindL :: Lens_' V1ComponentStatus (Maybe Text) v1ComponentStatusKindL f V1ComponentStatus{..} = (\v1ComponentStatusKind -> V1ComponentStatus { v1ComponentStatusKind, ..} ) <$> f v1ComponentStatusKind
250
v1ComponentStatusKindL :: Lens_' V1ComponentStatus (Maybe Text) v1ComponentStatusKindL f V1ComponentStatus{..} = (\v1ComponentStatusKind -> V1ComponentStatus { v1ComponentStatusKind, ..} ) <$> f v1ComponentStatusKind
216
v1ComponentStatusKindL f V1ComponentStatus{..} = (\v1ComponentStatusKind -> V1ComponentStatus { v1ComponentStatusKind, ..} ) <$> f v1ComponentStatusKind
152
true
true
1
8
23
62
30
32
null
null
AlbinTheander/oden
test/Oden/Compiler/InstantiateSpec.hs
mit
recordPoly :: Core.Expr Poly.Type recordPoly = Core.RecordInitializer missing (Poly.TRecord missing (Poly.RExtension missing (Identifier "foo") tvarA (Poly.REmpty missing))) [Core.FieldInitializer missing (Identifier "foo") (Core.Symbol missing (Identifier "x") tvarA)]
283
recordPoly :: Core.Expr Poly.Type recordPoly = Core.RecordInitializer missing (Poly.TRecord missing (Poly.RExtension missing (Identifier "foo") tvarA (Poly.REmpty missing))) [Core.FieldInitializer missing (Identifier "foo") (Core.Symbol missing (Identifier "x") tvarA)]
283
recordPoly = Core.RecordInitializer missing (Poly.TRecord missing (Poly.RExtension missing (Identifier "foo") tvarA (Poly.REmpty missing))) [Core.FieldInitializer missing (Identifier "foo") (Core.Symbol missing (Identifier "x") tvarA)]
249
false
true
0
11
39
108
51
57
null
null
lukexi/cabal
Cabal/Distribution/PackageDescription/Configuration.hs
bsd-3-clause
libFillInDefaults :: Library -> Library libFillInDefaults lib@(Library { libBuildInfo = bi }) = lib { libBuildInfo = biFillInDefaults bi }
142
libFillInDefaults :: Library -> Library libFillInDefaults lib@(Library { libBuildInfo = bi }) = lib { libBuildInfo = biFillInDefaults bi }
142
libFillInDefaults lib@(Library { libBuildInfo = bi }) = lib { libBuildInfo = biFillInDefaults bi }
102
false
true
0
10
23
44
24
20
null
null
edom/ptt
src/Haskell/Interpret/Expression.hs
apache-2.0
substitute :: String -> Expr -> Expr -> Expr substitute name rep = go where go (Var n) | name == n = rep go (App a b) = App (go a) (go b) go (Lam n body) | name /= n = Lam n (go body) go x = x
228
substitute :: String -> Expr -> Expr -> Expr substitute name rep = go where go (Var n) | name == n = rep go (App a b) = App (go a) (go b) go (Lam n body) | name /= n = Lam n (go body) go x = x
228
substitute name rep = go where go (Var n) | name == n = rep go (App a b) = App (go a) (go b) go (Lam n body) | name /= n = Lam n (go body) go x = x
183
false
true
2
8
86
131
63
68
null
null
drmaruyama/Paraiso
Language/Paraiso/OM/Builder/Boolean.hs
bsd-3-clause
-- | Less than lt :: CompareOp lt = mkOp2B A.LT
47
lt :: CompareOp lt = mkOp2B A.LT
32
lt = mkOp2B A.LT
16
true
true
0
6
10
23
10
13
null
null
NICTA/validation
test/hunit_tests.hs
bsd-3-clause
main :: IO () main = do c <- runTestTT tests when (errors c > 0 || failures c > 0) exitFailure
98
main :: IO () main = do c <- runTestTT tests when (errors c > 0 || failures c > 0) exitFailure
98
main = do c <- runTestTT tests when (errors c > 0 || failures c > 0) exitFailure
84
false
true
0
13
25
61
26
35
null
null
bergmark/purescript
psc-make/Main.hs
mit
mkdirp :: FilePath -> IO () mkdirp = createDirectoryIfMissing True . takeDirectory
82
mkdirp :: FilePath -> IO () mkdirp = createDirectoryIfMissing True . takeDirectory
82
mkdirp = createDirectoryIfMissing True . takeDirectory
54
false
true
0
7
11
27
13
14
null
null
kmate/HaRe
old/testing/addCon/B1AST.hs
bsd-3-clause
addedC4 = error "added C4 Float to Data1"
41
addedC4 = error "added C4 Float to Data1"
41
addedC4 = error "added C4 Float to Data1"
41
false
false
0
5
7
9
4
5
null
null
keera-studios/hsQt
Qtc/Gui/QStyleOptionViewItem.hs
bsd-2-clause
setDecorationAlignment :: QStyleOptionViewItem a -> ((Alignment)) -> IO () setDecorationAlignment x0 (x1) = withObjectPtr x0 $ \cobj_x0 -> qtc_QStyleOptionViewItem_setDecorationAlignment cobj_x0 (toCLong $ qFlags_toInt x1)
228
setDecorationAlignment :: QStyleOptionViewItem a -> ((Alignment)) -> IO () setDecorationAlignment x0 (x1) = withObjectPtr x0 $ \cobj_x0 -> qtc_QStyleOptionViewItem_setDecorationAlignment cobj_x0 (toCLong $ qFlags_toInt x1)
228
setDecorationAlignment x0 (x1) = withObjectPtr x0 $ \cobj_x0 -> qtc_QStyleOptionViewItem_setDecorationAlignment cobj_x0 (toCLong $ qFlags_toInt x1)
153
false
true
2
9
29
74
35
39
null
null
luzhuomi/cpp-obs
Language/C/Obfuscate/SSA.hs
apache-2.0
{- The SSA Language ___ _ _ (Prog) p::= t x (t x) { d b } (Decl) d::= t x _ (Block) b::= l:{s} | l:{i,s} (Stmts) s::= x = e; s | goto l; | return e; | e; s | if e { s } else { s } _ (Phi) i::= x = phi(g) _ (Exp) e::= v | e(e) ...
13,211
buildSSA :: CFG -> [Ident] -> SSA buildSSA cfg fargs = case buildDTree cfg of { Nothing -> error "failed to build dominance frontier table" ; Just (dtree, pcm, sdom) -> let dft = buildDF' (dtree, pcm, sdom, cfg) allVarsUsed = allVars cfg -- all vars used in this function, local declared, form...
12,264
buildSSA cfg fargs = case buildDTree cfg of { Nothing -> error "failed to build dominance frontier table" ; Just (dtree, pcm, sdom) -> let dft = buildDF' (dtree, pcm, sdom, cfg) allVarsUsed = allVars cfg -- all vars used in this function, local declared, formal args and global allL...
12,230
true
true
0
50
6,698
2,079
1,129
950
null
null
mightymoose/liquidhaskell
benchmarks/containers-0.5.0.0/Data/IntSet/Base.hs
bsd-3-clause
-- | /O(n)/. Convert the set to a descending list of elements. Subject to list -- fusion. toDescList :: IntSet -> [Int] toDescList = foldl (flip (:)) []
152
toDescList :: IntSet -> [Int] toDescList = foldl (flip (:)) []
62
toDescList = foldl (flip (:)) []
32
true
true
0
8
27
43
21
22
null
null
GaloisInc/halvm-ghc
compiler/utils/Outputable.hs
bsd-3-clause
neverQualify = QueryQualify neverQualifyNames neverQualifyModules neverQualifyPackages
145
neverQualify = QueryQualify neverQualifyNames neverQualifyModules neverQualifyPackages
145
neverQualify = QueryQualify neverQualifyNames neverQualifyModules neverQualifyPackages
145
false
false
0
5
64
13
6
7
null
null
nevrenato/Hets_Fork
Temporal/NuSmv.hs
gpl-2.0
modul :: Parser Module modul = do keyword "MODULE" name <- reserved keywords identifier << ws params <- option [] (between (token "(") (token ")") parameters) elements <- many element return (Module name params elements) where parameters = sepBy1 (reserved keyword...
351
modul :: Parser Module modul = do keyword "MODULE" name <- reserved keywords identifier << ws params <- option [] (between (token "(") (token ")") parameters) elements <- many element return (Module name params elements) where parameters = sepBy1 (reserved keyword...
351
modul = do keyword "MODULE" name <- reserved keywords identifier << ws params <- option [] (between (token "(") (token ")") parameters) elements <- many element return (Module name params elements) where parameters = sepBy1 (reserved keywords identifier << ws) (to...
328
false
true
1
12
101
137
60
77
null
null
iu-parfunc/containers
Data/Map/Base.hs
bsd-3-clause
-- According to benchmarks, this special case increases -- performance up to 30%. It does not help in difference or intersection. hedgeUnion blo bhi (Bin _ kx x l r) t2 = link kx x (hedgeUnion blo bmi l (trim blo bmi t2)) ...
430
hedgeUnion blo bhi (Bin _ kx x l r) t2 = link kx x (hedgeUnion blo bmi l (trim blo bmi t2)) (hedgeUnion bmi bhi r (trim bmi bhi t2)) where bmi = JustS kx #if __GLASGOW_HASKELL__ >= 700
238
hedgeUnion blo bhi (Bin _ kx x l r) t2 = link kx x (hedgeUnion blo bmi l (trim blo bmi t2)) (hedgeUnion bmi bhi r (trim bmi bhi t2)) where bmi = JustS kx #if __GLASGOW_HASKELL__ >= 700
238
true
false
2
9
175
101
48
53
null
null
pauldoo/scratch
NBody/Main.hs
isc
reshape s@(Size w h) = do viewport $= (Position 0 0, s)
59
reshape s@(Size w h) = do viewport $= (Position 0 0, s)
59
reshape s@(Size w h) = do viewport $= (Position 0 0, s)
59
false
false
0
9
15
38
19
19
null
null
ocharles/hackage-server
Distribution/Server/Packages/Types.hs
bsd-3-clause
pkgLatestCabalFileText :: PkgInfo -> CabalFileText pkgLatestCabalFileText = fst . pkgLatestRevision
99
pkgLatestCabalFileText :: PkgInfo -> CabalFileText pkgLatestCabalFileText = fst . pkgLatestRevision
99
pkgLatestCabalFileText = fst . pkgLatestRevision
48
false
true
0
5
9
19
10
9
null
null
romac/mental
src/Mental/Infer.hs
bsd-3-clause
declToEnv (TyDecl name ty) = Map.singleton name (generalize mempty ty)
72
declToEnv (TyDecl name ty) = Map.singleton name (generalize mempty ty)
72
declToEnv (TyDecl name ty) = Map.singleton name (generalize mempty ty)
72
false
false
0
7
11
32
15
17
null
null
andorp/grin
grin/src/Grin/Grin.hs
bsd-3-clause
_VarNode _ rest = pure rest
27
_VarNode _ rest = pure rest
27
_VarNode _ rest = pure rest
27
false
false
0
5
5
14
6
8
null
null
ulikoehler/ProjectEuler
Euler28.hs
apache-2.0
main = do let diameter = 1001 -- First circle: 1 difference between diagonal numbers, second: 3, ... let differenceList = takeWhile(< diameter) [2,4..] -- Always 4 numbers per circle let allDifferences = concatMap (replicate 4) differenceList print $ sum $ scanl (+) 1 allDifferences
307
main = do let diameter = 1001 -- First circle: 1 difference between diagonal numbers, second: 3, ... let differenceList = takeWhile(< diameter) [2,4..] -- Always 4 numbers per circle let allDifferences = concatMap (replicate 4) differenceList print $ sum $ scanl (+) 1 allDifferences
307
main = do let diameter = 1001 -- First circle: 1 difference between diagonal numbers, second: 3, ... let differenceList = takeWhile(< diameter) [2,4..] -- Always 4 numbers per circle let allDifferences = concatMap (replicate 4) differenceList print $ sum $ scanl (+) 1 allDifferences
307
false
false
0
12
68
81
41
40
null
null
AlexanderPankiv/ghc
compiler/prelude/THNames.hs
bsd-3-clause
-- data Exp = ... varEIdKey, conEIdKey, litEIdKey, appEIdKey, infixEIdKey, infixAppIdKey, sectionLIdKey, sectionRIdKey, lamEIdKey, lamCaseEIdKey, tupEIdKey, unboxedTupEIdKey, condEIdKey, multiIfEIdKey, letEIdKey, caseEIdKey, doEIdKey, compEIdKey, fromEIdKey, fromThenEIdKey, fromToEIdKey, fromThenToEIdKe...
468
varEIdKey, conEIdKey, litEIdKey, appEIdKey, infixEIdKey, infixAppIdKey, sectionLIdKey, sectionRIdKey, lamEIdKey, lamCaseEIdKey, tupEIdKey, unboxedTupEIdKey, condEIdKey, multiIfEIdKey, letEIdKey, caseEIdKey, doEIdKey, compEIdKey, fromEIdKey, fromThenEIdKey, fromToEIdKey, fromThenToEIdKey, listEIdKey,...
450
varEIdKey = mkPreludeMiscIdUnique 270
45
true
true
5
5
70
80
62
18
null
null
BartMassey/anrand
anrand.hs
mit
testHelp :: IO () testHelp = do printf "Available Tests:\n" mapM_ (\t -> printf " %s\n" t) testSet exitSuccess
117
testHelp :: IO () testHelp = do printf "Available Tests:\n" mapM_ (\t -> printf " %s\n" t) testSet exitSuccess
117
testHelp = do printf "Available Tests:\n" mapM_ (\t -> printf " %s\n" t) testSet exitSuccess
99
false
true
0
10
25
46
21
25
null
null
kawu/partage
src/NLP/Partage/AStar/Chart.hs
bsd-2-clause
hasPassiveTrav :: (Ord t, Ord n) => Passive n t -> S.Set (Trav n t) -> Auto n t -> Chart n t -> Bool hasPassiveTrav p travSet auto chart = case passiveTrav p auto chart of Just ExtWeight{..} -> travSet `S.isSubsetOf` prioTrav Nothing -> False --------------------------------- -- Extraction of Pr...
428
hasPassiveTrav :: (Ord t, Ord n) => Passive n t -> S.Set (Trav n t) -> Auto n t -> Chart n t -> Bool hasPassiveTrav p travSet auto chart = case passiveTrav p auto chart of Just ExtWeight{..} -> travSet `S.isSubsetOf` prioTrav Nothing -> False --------------------------------- -- Extraction of Pr...
428
hasPassiveTrav p travSet auto chart = case passiveTrav p auto chart of Just ExtWeight{..} -> travSet `S.isSubsetOf` prioTrav Nothing -> False --------------------------------- -- Extraction of Processed Items --------------------------------- -- | Check whether the given passive item is final or not.
315
false
true
0
11
90
129
63
66
null
null
pharpend/comarkdown
tests/CompilerSpec.hs
gpl-3.0
spec :: Spec spec = parallel $ do describe "AST->Pandoc compiler" $ do describe "Outputting plain-text" $ do specify "given many Ignore blks, behave like text all in 1 ignore blk" $ property $ \(xs :: [String]) -> do result1 <- runDocument (mapM_ ignore xs) result2 ...
1,820
spec :: Spec spec = parallel $ do describe "AST->Pandoc compiler" $ do describe "Outputting plain-text" $ do specify "given many Ignore blks, behave like text all in 1 ignore blk" $ property $ \(xs :: [String]) -> do result1 <- runDocument (mapM_ ignore xs) result2 ...
1,820
spec = parallel $ do describe "AST->Pandoc compiler" $ do describe "Outputting plain-text" $ do specify "given many Ignore blks, behave like text all in 1 ignore blk" $ property $ \(xs :: [String]) -> do result1 <- runDocument (mapM_ ignore xs) result2 <- runDocumen...
1,807
false
true
0
26
678
481
224
257
null
null
ooz/Hafer
src/Hafer/Data/GenericGraph.hs
mit
vertices :: Graph v e -> [Vertex v] vertices g = case g of MathGraph vs es -> vs ElemSetGraph elems -> foldr (++) [] $ map (\e -> case e of GVertex v -> [v] _ -> []) elems
299
vertices :: Graph v e -> [Vertex v] vertices g = case g of MathGraph vs es -> vs ElemSetGraph elems -> foldr (++) [] $ map (\e -> case e of GVertex v -> [v] _ -> []) elems
299
vertices g = case g of MathGraph vs es -> vs ElemSetGraph elems -> foldr (++) [] $ map (\e -> case e of GVertex v -> [v] _ -> []) elems
263
false
true
0
15
167
108
52
56
null
null
hiteshjasani/nano-hmac
test/hmd5_qc.hs
bsd-3-clause
toString :: [Word8] -> String toString = unpack . pack
54
toString :: [Word8] -> String toString = unpack . pack
54
toString = unpack . pack
24
false
true
1
7
9
30
13
17
null
null
snoyberg/ghc
compiler/basicTypes/OccName.hs
bsd-3-clause
plusOccEnv (A x) (A y) = A $ plusUFM x y
42
plusOccEnv (A x) (A y) = A $ plusUFM x y
42
plusOccEnv (A x) (A y) = A $ plusUFM x y
42
false
false
0
7
12
32
15
17
null
null
cl04/advent2016
src/Day7.hs
bsd-3-clause
regularStr :: Monad m => ParsecT String u m (String, String) regularStr = str >>= \s -> return $! (s, mempty)
110
regularStr :: Monad m => ParsecT String u m (String, String) regularStr = str >>= \s -> return $! (s, mempty)
110
regularStr = str >>= \s -> return $! (s, mempty)
48
false
true
0
8
21
52
28
24
null
null
xmonad/xmonad-contrib
XMonad/Prompt/Directory.hs
bsd-3-clause
notboring _ = True
18
notboring _ = True
18
notboring _ = True
18
false
false
0
5
3
9
4
5
null
null
seckcoder/lang-learn
haskell/lambda-calculus/src/Main.hs
unlicense
eval3 :: Exp -> Eval3 Value eval3 (Lit i) = return (IntVal i)
61
eval3 :: Exp -> Eval3 Value eval3 (Lit i) = return (IntVal i)
61
eval3 (Lit i) = return (IntVal i)
33
false
true
0
9
12
40
18
22
null
null
mightybyte/reflex-dom-stubs
src/GHCJS/DOM/Node.hs
bsd-3-clause
nodeGetParentNode = undefined
29
nodeGetParentNode = undefined
29
nodeGetParentNode = undefined
29
false
false
0
4
2
6
3
3
null
null
acowley/language-c
src/Language/C/Analysis/TypeUtils.hs
bsd-3-clause
-- | Constructor for a simple floating-point type. floating :: FloatType -> Type floating ty = DirectType (TyFloating ty) noTypeQuals noAttributes
146
floating :: FloatType -> Type floating ty = DirectType (TyFloating ty) noTypeQuals noAttributes
95
floating ty = DirectType (TyFloating ty) noTypeQuals noAttributes
65
true
true
0
7
20
35
17
18
null
null
brendanhay/gogol
gogol-logging/gen/Network/Google/Resource/Logging/Projects/Locations/Buckets/Views/Patch.hs
mpl-2.0
-- | JSONP plbvpCallback :: Lens' ProjectsLocationsBucketsViewsPatch (Maybe Text) plbvpCallback = lens _plbvpCallback (\ s a -> s{_plbvpCallback = a})
158
plbvpCallback :: Lens' ProjectsLocationsBucketsViewsPatch (Maybe Text) plbvpCallback = lens _plbvpCallback (\ s a -> s{_plbvpCallback = a})
147
plbvpCallback = lens _plbvpCallback (\ s a -> s{_plbvpCallback = a})
76
true
true
0
8
27
49
25
24
null
null
narrative/stack
src/Stack/Init.hs
bsd-3-clause
getWorkingResolverPlan :: ( MonadBaseControl IO m, MonadIO m, MonadLogger m, MonadMask m , MonadReader env m, HasConfig env , HasGHCVariant env , HasHttpManager env , HasLogLevel env , HasReExec env , HasTerminal env) => Path Abs File -- ^ stack.yaml -> InitOpts -> Map PackageName...
2,343
getWorkingResolverPlan :: ( MonadBaseControl IO m, MonadIO m, MonadLogger m, MonadMask m , MonadReader env m, HasConfig env , HasGHCVariant env , HasHttpManager env , HasLogLevel env , HasReExec env , HasTerminal env) => Path Abs File -- ^ stack.yaml -> InitOpts -> Map PackageName...
2,187
getWorkingResolverPlan stackYaml initOpts bundle resolver = do $logInfo $ "Selected resolver: " <> resolverName resolver go bundle where go info = do eres <- checkBundleResolver stackYaml initOpts info resolver -- if some packages failed try again using the rest c...
1,563
true
true
1
20
952
519
251
268
null
null
dimitri-xyz/public-bitcoin-type
Test/Test.hs
lgpl-2.1
showBitcoinTest :: Test showBitcoinTest = TestCase $ do assertEqual "0 looks like zero" "0.00000000" (show (0 :: Bitcoin)) assertEqual "Showing an integer" "7.00000000" (show (7 :: Bitcoin)) assertEqual "Showing a fraction" "0.50000000" (show (0.5 :: Bitcoin)) ...
571
showBitcoinTest :: Test showBitcoinTest = TestCase $ do assertEqual "0 looks like zero" "0.00000000" (show (0 :: Bitcoin)) assertEqual "Showing an integer" "7.00000000" (show (7 :: Bitcoin)) assertEqual "Showing a fraction" "0.50000000" (show (0.5 :: Bitcoin)) ...
571
showBitcoinTest = TestCase $ do assertEqual "0 looks like zero" "0.00000000" (show (0 :: Bitcoin)) assertEqual "Showing an integer" "7.00000000" (show (7 :: Bitcoin)) assertEqual "Showing a fraction" "0.50000000" (show (0.5 :: Bitcoin)) assertEqual "Showing...
547
false
true
0
14
128
143
71
72
null
null
urbanslug/ghc
compiler/hsSyn/HsDecls.hs
bsd-3-clause
docDeclDoc :: DocDecl -> HsDocString docDeclDoc (DocCommentNext d) = d
70
docDeclDoc :: DocDecl -> HsDocString docDeclDoc (DocCommentNext d) = d
70
docDeclDoc (DocCommentNext d) = d
33
false
true
0
7
9
24
12
12
null
null
YuichiroSato/GameOfSymbolGrounding
src/Data/Cell.hs
bsd-3-clause
randomCell :: (RandomGen g) => Int -> Int -> g -> (Cell, g) randomCell x0 y0 gen = (Cell ext int, newGen) where int = randomInternal t r2 r3 ext@(External t _ _) = randomExternal r1 (x0, y0) r4 ((r1, r2, r3, r4), newGen) = runState rand4 gen
255
randomCell :: (RandomGen g) => Int -> Int -> g -> (Cell, g) randomCell x0 y0 gen = (Cell ext int, newGen) where int = randomInternal t r2 r3 ext@(External t _ _) = randomExternal r1 (x0, y0) r4 ((r1, r2, r3, r4), newGen) = runState rand4 gen
255
randomCell x0 y0 gen = (Cell ext int, newGen) where int = randomInternal t r2 r3 ext@(External t _ _) = randomExternal r1 (x0, y0) r4 ((r1, r2, r3, r4), newGen) = runState rand4 gen
195
false
true
0
9
61
132
71
61
null
null
tibbe/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
translateOp dflags WordEqOp = Just (mo_wordEq dflags)
59
translateOp dflags WordEqOp = Just (mo_wordEq dflags)
59
translateOp dflags WordEqOp = Just (mo_wordEq dflags)
59
false
false
0
7
12
20
9
11
null
null
jvilar/hrows
lib/GUI/BuildMonad.hs
gpl-2.0
runBuild :: Builder -> GUIControl -> BuildMonad t -> IO t runBuild builder control action = runReaderT action (builder, control)
128
runBuild :: Builder -> GUIControl -> BuildMonad t -> IO t runBuild builder control action = runReaderT action (builder, control)
128
runBuild builder control action = runReaderT action (builder, control)
70
false
true
0
9
19
51
24
27
null
null
ryzhyk/cocoon
cocoon/SMT/SMTLib2.hs
apache-2.0
smtppExpr mf (EBinOp Neq e1 e2) = smtppExpr mf $ EUnOp Not $ EBinOp Eq e1 e2
76
smtppExpr mf (EBinOp Neq e1 e2) = smtppExpr mf $ EUnOp Not $ EBinOp Eq e1 e2
76
smtppExpr mf (EBinOp Neq e1 e2) = smtppExpr mf $ EUnOp Not $ EBinOp Eq e1 e2
76
false
false
0
7
16
42
19
23
null
null
ikirill/ComputationalMathematics
Cube/CubeGL.hs
gpl-3.0
whenM :: Monad m => m Bool -> m () -> m () whenM pred work = do x <- pred; unless x work
88
whenM :: Monad m => m Bool -> m () -> m () whenM pred work = do x <- pred; unless x work
88
whenM pred work = do x <- pred; unless x work
45
false
true
0
10
23
65
28
37
null
null
kmels/hledger
hledger/Hledger/Cli/Balance.hs
gpl-3.0
formatField :: ReportOpts -> Maybe AccountName -> Int -> Amount -> Bool -> Maybe Int -> Maybe Int -> HledgerFormatField -> String formatField opts accountName depth total ljust min max field = case field of AccountField -> formatValue ljust min max $ maybe "" (maybeAccountNameDrop opts) accountName ...
747
formatField :: ReportOpts -> Maybe AccountName -> Int -> Amount -> Bool -> Maybe Int -> Maybe Int -> HledgerFormatField -> String formatField opts accountName depth total ljust min max field = case field of AccountField -> formatValue ljust min max $ maybe "" (maybeAccountNameDrop opts) accountName ...
747
formatField opts accountName depth total ljust min max field = case field of AccountField -> formatValue ljust min max $ maybe "" (maybeAccountNameDrop opts) accountName DepthSpacerField -> case min of Just m -> formatValue ljust Nothing max $ replicate (depth * m) ' ...
617
false
true
0
14
225
201
94
107
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/utils/Pretty.hs
bsd-3-clause
-- Worth a try! mkNest k p = nest_ k p
54
mkNest k p = nest_ k p
38
mkNest k p = nest_ k p
38
true
false
0
5
26
17
8
9
null
null
abramhindle/haskell-sand-game
Sand5.hs
lgpl-3.0
cursorLogic c@(Cursor { center = Eater, above = DustGenerator }) = eatAboveSendMessage c
88
cursorLogic c@(Cursor { center = Eater, above = DustGenerator }) = eatAboveSendMessage c
88
cursorLogic c@(Cursor { center = Eater, above = DustGenerator }) = eatAboveSendMessage c
88
false
false
0
10
12
33
18
15
null
null
NICTA/coordinate
src/Data/Geodetic/EllipsoidReaderT.hs
bsd-3-clause
wgs84'' :: EllipsoidReaderT f a -> f a wgs84'' r = (_Unwrapped # r) wgs84
79
wgs84'' :: EllipsoidReaderT f a -> f a wgs84'' r = (_Unwrapped # r) wgs84
79
wgs84'' r = (_Unwrapped # r) wgs84
36
false
true
0
7
20
37
17
20
null
null
rubik/stack
src/Stack/Setup/Installed.hs
bsd-3-clause
listInstalled :: (MonadIO m, MonadReader env m, HasConfig env, MonadThrow m) => Path Abs Dir -> m [Tool] listInstalled programsPath = do createTree programsPath (_, files) <- listDirectory programsPath return $ mapMaybe toTool files where toTool fp = do x <- T.strip...
399
listInstalled :: (MonadIO m, MonadReader env m, HasConfig env, MonadThrow m) => Path Abs Dir -> m [Tool] listInstalled programsPath = do createTree programsPath (_, files) <- listDirectory programsPath return $ mapMaybe toTool files where toTool fp = do x <- T.strip...
399
listInstalled programsPath = do createTree programsPath (_, files) <- listDirectory programsPath return $ mapMaybe toTool files where toTool fp = do x <- T.stripSuffix ".installed" $ T.pack $ toFilePath $ filename fp parseToolText x
266
false
true
1
13
113
146
65
81
null
null
bitemyapp/blpapi-hs
src/Finance/Blpapi/PrettyPrint.hs
mit
(<>) :: Builder -> Builder -> Builder (<>) = mappend
52
(<>) :: Builder -> Builder -> Builder (<>) = mappend
52
(<>) = mappend
14
false
true
0
6
9
23
14
9
null
null
stevely/hspirv
src/SpirV/Builder/Raw.hs
bsd-3-clause
typeVoid :: Builder Id typeVoid = addTypeDeclaration RepVoid OpTypeVoid
71
typeVoid :: Builder Id typeVoid = addTypeDeclaration RepVoid OpTypeVoid
71
typeVoid = addTypeDeclaration RepVoid OpTypeVoid
48
false
true
0
5
8
19
9
10
null
null
limaner2002/EPC-tools
USACScripts/src/Scripts/FCCForm471Types.hs
bsd-3-clause
checkLineItemCost :: LineItemCost -> Bool checkLineItemCost lineItem = checkCosts (lineItem ^. lineMonthly) (lineItem ^. lineOneTime)
133
checkLineItemCost :: LineItemCost -> Bool checkLineItemCost lineItem = checkCosts (lineItem ^. lineMonthly) (lineItem ^. lineOneTime)
133
checkLineItemCost lineItem = checkCosts (lineItem ^. lineMonthly) (lineItem ^. lineOneTime)
91
false
true
0
7
14
40
20
20
null
null