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
beni55/libmpd-haskell
tests/UtilSpec.hs
mit
main :: IO () main = hspec spec
31
main :: IO () main = hspec spec
31
main = hspec spec
17
false
true
0
6
7
19
9
10
null
null
paolino/book-a-visit
common/World.hs
bsd-3-clause
involved (EGiver u) (ETaker s) = case s ^. acceptance of Just a -> a ^. accepter == u Nothing -> case s ^. feedback of Nothing -> True _ -> False
170
involved (EGiver u) (ETaker s) = case s ^. acceptance of Just a -> a ^. accepter == u Nothing -> case s ^. feedback of Nothing -> True _ -> False
170
involved (EGiver u) (ETaker s) = case s ^. acceptance of Just a -> a ^. accepter == u Nothing -> case s ^. feedback of Nothing -> True _ -> False
170
false
false
0
10
56
74
36
38
null
null
LukaHorvat/WebHaskell
app/Main.hs
bsd-3-clause
rev :<|> col = jquery (Proxy :: Proxy ReverseAPI)
49
rev :<|> col = jquery (Proxy :: Proxy ReverseAPI)
49
rev :<|> col = jquery (Proxy :: Proxy ReverseAPI)
49
false
false
0
7
8
23
11
12
null
null
WSCU/JSEuterpea
Euterpea Examples/SimpleEuterpea.hs
gpl-3.0
MinorS b = makeScale MajorS bs2 b
34
bMinorS b = makeScale MajorS bs2 b
34
bMinorS b = makeScale MajorS bs2 b
34
false
false
0
5
7
17
7
10
null
null
prikhi/hkredmine
src/Web/HTTP/Redmine.hs
gpl-3.0
-- Time Entries -- | Retrieve a list of all Time Entry Activities. getActivities :: Redmine [Activity] getActivities = do (Activities as) <- getEndPoint GetActivites [] return as -- | Retrieve a 'Activity' given a 'activityName'
276
getActivities :: Redmine [Activity] getActivities = do (Activities as) <- getEndPoint GetActivites [] return as -- | Retrieve a 'Activity' given a 'activityName'
209
getActivities = do (Activities as) <- getEndPoint GetActivites [] return as -- | Retrieve a 'Activity' given a 'activityName'
173
true
true
1
10
83
50
23
27
null
null
sgillespie/ghc
utils/mkUserGuidePart/Main.hs
bsd-3-clause
inlineCode :: String -> ReST inlineCode s = "``" ++ s ++ "``"
61
inlineCode :: String -> ReST inlineCode s = "``" ++ s ++ "``"
61
inlineCode s = "``" ++ s ++ "``"
32
false
true
0
6
12
26
13
13
null
null
UoYCS-plasma/LazySmallCheck2012
suite/performance/Benchmarks/RedBlack.hs
bsd-3-clause
balance B a x (T R b y (T R c z d)) = T R (T B a x b) y (T B c z d)
67
balance B a x (T R b y (T R c z d)) = T R (T B a x b) y (T B c z d)
67
balance B a x (T R b y (T R c z d)) = T R (T B a x b) y (T B c z d)
67
false
false
0
9
26
72
35
37
null
null
jb55/cassava
Data/Csv/Conversion.hs
bsd-3-clause
-- | Alias for 'namedField'. (.=) :: ToField a => B.ByteString -> a -> (B.ByteString, B.ByteString) (.=) = namedField
117
(.=) :: ToField a => B.ByteString -> a -> (B.ByteString, B.ByteString) (.=) = namedField
88
(.=) = namedField
17
true
true
0
9
18
43
25
18
null
null
koengit/induction-examples
Escape.hs
mit
isSpecial Q = True
20
isSpecial Q = True
20
isSpecial Q = True
20
false
false
0
5
5
9
4
5
null
null
kolmodin/cabal
Cabal/Distribution/Simple/Setup.hs
bsd-3-clause
emptyInstallFlags :: InstallFlags emptyInstallFlags = mempty
60
emptyInstallFlags :: InstallFlags emptyInstallFlags = mempty
60
emptyInstallFlags = mempty
26
false
true
0
4
5
11
6
5
null
null
ekmett/models
src/Model/Internal/Util.hs
bsd-2-clause
fetchAndIntArray :: PrimMonad m => MutableByteArray (PrimState m) -> Int -> Int -> m Int fetchAndIntArray (MutableByteArray m) (I# i) (I# j) = primitive $ \s -> case fetchAndIntArray# m i j s of (# s', k #) -> (# s', I# k #)
227
fetchAndIntArray :: PrimMonad m => MutableByteArray (PrimState m) -> Int -> Int -> m Int fetchAndIntArray (MutableByteArray m) (I# i) (I# j) = primitive $ \s -> case fetchAndIntArray# m i j s of (# s', k #) -> (# s', I# k #)
227
fetchAndIntArray (MutableByteArray m) (I# i) (I# j) = primitive $ \s -> case fetchAndIntArray# m i j s of (# s', k #) -> (# s', I# k #)
137
false
true
1
9
46
108
53
55
null
null
jwiegley/ghc-release
utils/haddock/src/Haddock/Doc.hs
gpl-3.0
docCodeBlock d = d
18
docCodeBlock d = d
18
docCodeBlock d = d
18
false
false
0
5
3
9
4
5
null
null
antonaut/the-robot-language
lexparse.hs
mit
s1 = "TURN 3.14"
16
s1 = "TURN 3.14"
16
s1 = "TURN 3.14"
16
false
false
1
5
3
10
3
7
null
null
Numberartificial/workflow
snipets/.stack-work/intero/intero30430oOV.hs
mit
putNtimes :: Integer -> String -> IO () putNtimes n str = if n <= 1 then putStrLn str else do putStrLn str putNtimes (n-1) str -- Read two lines, then write a message.
200
putNtimes :: Integer -> String -> IO () putNtimes n str = if n <= 1 then putStrLn str else do putStrLn str putNtimes (n-1) str -- Read two lines, then write a message.
200
putNtimes n str = if n <= 1 then putStrLn str else do putStrLn str putNtimes (n-1) str -- Read two lines, then write a message.
160
false
true
0
10
66
66
32
34
null
null
barrucadu/spec
examples/Stack.hs
mit
popCAS :: MonadConc m => CASStack m a -> m (Maybe a) popCAS (CASStack r) = modifyCRefCAS r (drop 1 &&& listToMaybe)
115
popCAS :: MonadConc m => CASStack m a -> m (Maybe a) popCAS (CASStack r) = modifyCRefCAS r (drop 1 &&& listToMaybe)
115
popCAS (CASStack r) = modifyCRefCAS r (drop 1 &&& listToMaybe)
62
false
true
0
9
21
60
28
32
null
null
garetxe/cabal
Cabal/Distribution/Simple/Setup.hs
bsd-3-clause
readPackageDbList :: String -> [Maybe PackageDB] readPackageDbList "clear" = [Nothing]
87
readPackageDbList :: String -> [Maybe PackageDB] readPackageDbList "clear" = [Nothing]
87
readPackageDbList "clear" = [Nothing]
38
false
true
0
7
10
27
14
13
null
null
xabbu42/balance-game
balance_game.hs
bsd-3-clause
case_depth_perfect_12 = 3 @=? depth_perfect (start_position 12)
63
case_depth_perfect_12 = 3 @=? depth_perfect (start_position 12)
63
case_depth_perfect_12 = 3 @=? depth_perfect (start_position 12)
63
false
false
3
7
6
26
11
15
null
null
cirquit/hjc
src/TimeMonad.hs
mit
getTimeInMs :: Monad m => StateT TimeState m Double getTimeInMs = view ms <$> get
81
getTimeInMs :: Monad m => StateT TimeState m Double getTimeInMs = view ms <$> get
81
getTimeInMs = view ms <$> get
29
false
true
0
6
14
32
15
17
null
null
DigitalBrains1/clash-lt24
UnitTest/LT24/Framebuffer/BouncyCommon.hs
bsd-2-clause
{- - Draw a ball in the 64x48 framebuffer with a top-left corner at (rx, ry). The - LT24 controller is told that it should draw this 64x48 framebuffer at - coordinates (wx, wy) (again top-left corner). - - Finally, request the framebuffer component (LT24.Framebuffer or - LT24.FramebufferRMW) to transfer the 64x48...
1,111
drawBall s (wx, wy, rx, ry, accepted, period, buttonF) = (s', (lt24AD, fbAddr, fbDIn, fbWrEn, doUpdate, needAccess)) where i = DbI { dbWx = wx , dbWy = wy , dbRx = rx , dbRy = ry , dbAccepted = accepted , dbPeriod = period ...
614
drawBall s (wx, wy, rx, ry, accepted, period, buttonF) = (s', (lt24AD, fbAddr, fbDIn, fbWrEn, doUpdate, needAccess)) where i = DbI { dbWx = wx , dbWy = wy , dbRx = rx , dbRy = ry , dbAccepted = accepted , dbPeriod = period ...
614
true
false
0
8
363
174
103
71
null
null
AlexanderPankiv/ghc
compiler/cmm/PprC.hs
bsd-3-clause
pprExpr1 e@(CmmReg _reg) = pprExpr e
37
pprExpr1 e@(CmmReg _reg) = pprExpr e
37
pprExpr1 e@(CmmReg _reg) = pprExpr e
37
false
false
1
7
6
26
10
16
null
null
random-j-farmer/hs-little-helper
Application.hs
mit
-- | main function for use by yesod devel develMain :: IO () develMain = develMainHelper getApplicationDev
106
develMain :: IO () develMain = develMainHelper getApplicationDev
64
develMain = develMainHelper getApplicationDev
45
true
true
0
6
16
20
10
10
null
null
eijian/raytracer
src/Antialias.hs
bsd-3-clause
avg' :: [Rgb] -> Rgb avg' [] = (0, 0, 0)
40
avg' :: [Rgb] -> Rgb avg' [] = (0, 0, 0)
40
avg' [] = (0, 0, 0)
19
false
true
0
6
10
32
18
14
null
null
sampou-org/pfad
Code/Code24.hs
bsd-3-clause
toFrac = foldr (\ b f -> (b+f)/2) (1/2)
39
toFrac = foldr (\ b f -> (b+f)/2) (1/2)
39
toFrac = foldr (\ b f -> (b+f)/2) (1/2)
39
false
false
0
10
8
39
21
18
null
null
noteed/openerpfront
script.hs
bsd-3-clause
ost_ :: URI -> URIAuth -> [Header] -> LC.ByteString -> IO (Response U.ByteString) post_ uri auth headers content = do eresp <- simpleHTTP (request uri auth headers (C.concat . LC.toChunks $ content)) resp <- handleE (fail . show) eresp return resp
260
post_ :: URI -> URIAuth -> [Header] -> LC.ByteString -> IO (Response U.ByteString) post_ uri auth headers content = do eresp <- simpleHTTP (request uri auth headers (C.concat . LC.toChunks $ content)) resp <- handleE (fail . show) eresp return resp
260
post_ uri auth headers content = do eresp <- simpleHTTP (request uri auth headers (C.concat . LC.toChunks $ content)) resp <- handleE (fail . show) eresp return resp
177
false
true
0
14
53
114
55
59
null
null
crogers1/manager
xenmgr/XenMgr/Testing.hs
gpl-2.0
testingDequeueScript :: TestingContext -> IO String testingDequeueScript c = readChan (chan c)
94
testingDequeueScript :: TestingContext -> IO String testingDequeueScript c = readChan (chan c)
94
testingDequeueScript c = readChan (chan c)
42
false
true
0
7
11
30
14
16
null
null
beni55/egison
hs-src/Language/Egison.hs
mit
coreLibraries :: [String] coreLibraries = [ "lib/core/base.egi" , "lib/core/collection.egi" , "lib/core/order.egi" , "lib/core/number.egi" , "lib/core/io.egi" , "lib/core/random.egi" , "lib/core/array.egi" , "lib/core/string.egi" ]
249
coreLibraries :: [String] coreLibraries = [ "lib/core/base.egi" , "lib/core/collection.egi" , "lib/core/order.egi" , "lib/core/number.egi" , "lib/core/io.egi" , "lib/core/random.egi" , "lib/core/array.egi" , "lib/core/string.egi" ]
249
coreLibraries = [ "lib/core/base.egi" , "lib/core/collection.egi" , "lib/core/order.egi" , "lib/core/number.egi" , "lib/core/io.egi" , "lib/core/random.egi" , "lib/core/array.egi" , "lib/core/string.egi" ]
223
false
true
0
5
39
38
24
14
null
null
philopon/apiary
tests/Application.hs
mit
multiPartTest :: TestTree multiPartTest = testGroup "multipart request body" [ testCase "multipart test" $ assertSRequest 200 Nothing "lbs file" multiPartTestApp =<< dalvikRequest , testCase "multipart test" $ assertSRequest 200 Nothing "disk file" multiPartTestApp' =<< dalvikRequest ]
298
multiPartTest :: TestTree multiPartTest = testGroup "multipart request body" [ testCase "multipart test" $ assertSRequest 200 Nothing "lbs file" multiPartTestApp =<< dalvikRequest , testCase "multipart test" $ assertSRequest 200 Nothing "disk file" multiPartTestApp' =<< dalvikRequest ]
298
multiPartTest = testGroup "multipart request body" [ testCase "multipart test" $ assertSRequest 200 Nothing "lbs file" multiPartTestApp =<< dalvikRequest , testCase "multipart test" $ assertSRequest 200 Nothing "disk file" multiPartTestApp' =<< dalvikRequest ]
272
false
true
0
9
47
70
31
39
null
null
elieux/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
pprMatchInCtxt :: (OutputableBndr idL, OutputableBndr idR, Outputable body) => HsMatchContext idL -> Match idR body -> SDoc pprMatchInCtxt ctxt match = hang (ptext (sLit "In") <+> pprMatchContext ctxt <> colon) 4 (pprMatch ctxt match)
279
pprMatchInCtxt :: (OutputableBndr idL, OutputableBndr idR, Outputable body) => HsMatchContext idL -> Match idR body -> SDoc pprMatchInCtxt ctxt match = hang (ptext (sLit "In") <+> pprMatchContext ctxt <> colon) 4 (pprMatch ctxt match)
279
pprMatchInCtxt ctxt match = hang (ptext (sLit "In") <+> pprMatchContext ctxt <> colon) 4 (pprMatch ctxt match)
140
false
true
0
11
78
99
45
54
null
null
kadena-io/pact
src/Crypto/Hash/Blake2Native.hs
bsd-3-clause
-- | All together now, 32bit! 'blake2s outlen key inB' hashes inB, with -- optional key (empty means no key), to length outlen. blake2s :: Int -> ByteString -> ByteString -> Either String ByteString blake2s outlen key inB = blake2s_init (fromIntegral outlen) key <&> (blake2s_final . blake2s_update inB)
307
blake2s :: Int -> ByteString -> ByteString -> Either String ByteString blake2s outlen key inB = blake2s_init (fromIntegral outlen) key <&> (blake2s_final . blake2s_update inB)
179
blake2s outlen key inB = blake2s_init (fromIntegral outlen) key <&> (blake2s_final . blake2s_update inB)
108
true
true
0
8
51
62
31
31
null
null
phischu/fragnix
tests/packages/scotty/Network.Wai.Handler.Warp.HTTP2.Receiver.hs
bsd-3-clause
checkPriority :: Priority -> StreamId -> IO () checkPriority p me | dep == me = E.throwIO $ StreamError ProtocolError me | otherwise = return () where dep = streamDependency p
185
checkPriority :: Priority -> StreamId -> IO () checkPriority p me | dep == me = E.throwIO $ StreamError ProtocolError me | otherwise = return () where dep = streamDependency p
185
checkPriority p me | dep == me = E.throwIO $ StreamError ProtocolError me | otherwise = return () where dep = streamDependency p
138
false
true
2
8
40
76
34
42
null
null
christiaanb/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
ppr_expr (HsStatic e) = hsep [ptext (sLit "static"), pprParendExpr e]
71
ppr_expr (HsStatic e) = hsep [ptext (sLit "static"), pprParendExpr e]
71
ppr_expr (HsStatic e) = hsep [ptext (sLit "static"), pprParendExpr e]
71
false
false
0
8
11
37
17
20
null
null
ony/Yampa-core
tests/AFRPTestsWFG.hs
bsd-3-clause
wfg_t1r = [1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 3.0, 4.0, 4.0, 4.0, 0.0, 0.0, 0.0, 0.0]
109
wfg_t1r = [1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 3.0, 4.0, 4.0, 4.0, 0.0, 0.0, 0.0, 0.0]
109
wfg_t1r = [1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 3.0, 4.0, 4.0, 4.0, 0.0, 0.0, 0.0, 0.0]
109
false
false
0
5
36
54
35
19
null
null
akiochiai/haxr-wai
Network/XmlRpc/Wai.hs
bsd-3-clause
waiXmlRpcServer :: [(String, XR.XmlRpcMethod)] -> W.Application waiXmlRpcServer ms = app where app :: W.Request -> C.ResourceT IO W.Response app req = (W.requestBody req) $$ (handlerSink ms)
210
waiXmlRpcServer :: [(String, XR.XmlRpcMethod)] -> W.Application waiXmlRpcServer ms = app where app :: W.Request -> C.ResourceT IO W.Response app req = (W.requestBody req) $$ (handlerSink ms)
210
waiXmlRpcServer ms = app where app :: W.Request -> C.ResourceT IO W.Response app req = (W.requestBody req) $$ (handlerSink ms)
146
false
true
2
8
45
79
41
38
null
null
rueshyna/gogol
gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/Messages/List.hs
mpl-2.0
-- | OAuth access token. pljmlAccessToken :: Lens' ProjectsLocationsJobsMessagesList (Maybe Text) pljmlAccessToken = lens _pljmlAccessToken (\ s a -> s{_pljmlAccessToken = a})
183
pljmlAccessToken :: Lens' ProjectsLocationsJobsMessagesList (Maybe Text) pljmlAccessToken = lens _pljmlAccessToken (\ s a -> s{_pljmlAccessToken = a})
158
pljmlAccessToken = lens _pljmlAccessToken (\ s a -> s{_pljmlAccessToken = a})
85
true
true
0
9
29
48
25
23
null
null
alphalambda/codeworld
codeworld-base/src/Extras/Colors.hs
apache-2.0
byName("darkred") = colorNamed'("#8b0000")
42
byName("darkred") = colorNamed'("#8b0000")
42
byName("darkred") = colorNamed'("#8b0000")
42
false
false
0
6
2
18
9
9
null
null
HS-Carbon/hs-carbon-aggregator
src/library/Carbon/Aggregator/Rules.hs
apache-2.0
ruleAggregationFrequency :: Rule -> AggregationFrequency ruleAggregationFrequency (Rule _ _ _ freq) = freq
106
ruleAggregationFrequency :: Rule -> AggregationFrequency ruleAggregationFrequency (Rule _ _ _ freq) = freq
106
ruleAggregationFrequency (Rule _ _ _ freq) = freq
49
false
true
0
7
12
30
15
15
null
null
charukiewicz/charukiewicz
site.hs
apache-2.0
removeIndexHtml :: Item String -> Compiler (Item String) removeIndexHtml item = return $ fmap (withUrls removeIndexStr) item where removeIndexStr :: String -> String removeIndexStr url = case splitFileName url of (dir, "index.html") | isLocal dir -> dir _ -> url...
394
removeIndexHtml :: Item String -> Compiler (Item String) removeIndexHtml item = return $ fmap (withUrls removeIndexStr) item where removeIndexStr :: String -> String removeIndexStr url = case splitFileName url of (dir, "index.html") | isLocal dir -> dir _ -> url...
394
removeIndexHtml item = return $ fmap (withUrls removeIndexStr) item where removeIndexStr :: String -> String removeIndexStr url = case splitFileName url of (dir, "index.html") | isLocal dir -> dir _ -> url isLocal :: [Char] -> Bool isLocal uri = not (isI...
337
false
true
5
11
117
129
63
66
null
null
abooij/sudbury
Graphics/Sudbury/Socket.hs
mit
findServerSocket :: IO FilePath findServerSocket = do socketName <- getEnv "WAYLAND_DISPLAY" findServerSocketWithName socketName -- | As per the C implementation: XDG_RUNTIME_DIR is obligatory, but WAYLAND_DISPLAY is optional
230
findServerSocket :: IO FilePath findServerSocket = do socketName <- getEnv "WAYLAND_DISPLAY" findServerSocketWithName socketName -- | As per the C implementation: XDG_RUNTIME_DIR is obligatory, but WAYLAND_DISPLAY is optional
230
findServerSocket = do socketName <- getEnv "WAYLAND_DISPLAY" findServerSocketWithName socketName -- | As per the C implementation: XDG_RUNTIME_DIR is obligatory, but WAYLAND_DISPLAY is optional
198
false
true
0
8
31
31
14
17
null
null
thalerjonathan/phd
public/ArtIterating/code/haskell/PureAgentsConc/src/SpacialGameMsg/SGModelMsg.hs
gpl-3.0
randomThresh :: StdGen -> Double -> (Bool, StdGen) randomThresh g p = (flag, g') where (thresh, g') = randomR(0.0, 1.0) g flag = thresh <= p
160
randomThresh :: StdGen -> Double -> (Bool, StdGen) randomThresh g p = (flag, g') where (thresh, g') = randomR(0.0, 1.0) g flag = thresh <= p
160
randomThresh g p = (flag, g') where (thresh, g') = randomR(0.0, 1.0) g flag = thresh <= p
109
false
true
3
9
45
82
41
41
null
null
jcberentsen/causality
tests/CausalModelTests.hs
bsd-3-clause
sprinklers_proposition = "sprinklers"
37
sprinklers_proposition = "sprinklers"
37
sprinklers_proposition = "sprinklers"
37
false
false
0
4
2
6
3
3
null
null
mightymoose/liquidhaskell
src/Language/Haskell/Liquid/Desugar/HscMain.hs
bsd-3-clause
ioMsgMaybe :: IO (Messages, Maybe a) -> Hsc a ioMsgMaybe ioA = do ((warns,errs), mb_r) <- liftIO ioA logWarnings warns case mb_r of Nothing -> throwErrors errs Just r -> return r
207
ioMsgMaybe :: IO (Messages, Maybe a) -> Hsc a ioMsgMaybe ioA = do ((warns,errs), mb_r) <- liftIO ioA logWarnings warns case mb_r of Nothing -> throwErrors errs Just r -> return r
207
ioMsgMaybe ioA = do ((warns,errs), mb_r) <- liftIO ioA logWarnings warns case mb_r of Nothing -> throwErrors errs Just r -> return r
161
false
true
0
10
60
89
42
47
null
null
fboyer/adventofcode-haskell
src/Day2/IWasToldThereWouldBeNoMath.hs
bsd-3-clause
parseInput :: String -> [Dim] parseInput = M.mapMaybe (toDim . parseLine) . lines
81
parseInput :: String -> [Dim] parseInput = M.mapMaybe (toDim . parseLine) . lines
81
parseInput = M.mapMaybe (toDim . parseLine) . lines
51
false
true
0
8
12
41
19
22
null
null
stevezhee/shootout
src/Typed.hs
bsd-3-clause
proc :: Agg a => String -> (a -> IO' ()) -> (a -> IO' ()) proc s f = \a0 -> IO' $ \w0 -> ((), (func s $ \(a, w) -> snd (unIO' (f a) w)) (a0, w0))
145
proc :: Agg a => String -> (a -> IO' ()) -> (a -> IO' ()) proc s f = \a0 -> IO' $ \w0 -> ((), (func s $ \(a, w) -> snd (unIO' (f a) w)) (a0, w0))
145
proc s f = \a0 -> IO' $ \w0 -> ((), (func s $ \(a, w) -> snd (unIO' (f a) w)) (a0, w0))
87
false
true
0
17
39
124
65
59
null
null
ppenzin/taxes
src/Prompts.hs
bsd-3-clause
{- Prompt user for W-2 form input -} promptW2 :: IO FormW2 promptW2 = putStrLn "Enter total wages (W-2 field 1)" >> (readLn :: IO Int) >>= \inc -> putStrLn "Enter federal income tax" >> (readLn :: IO Int) >>= \fedTax -> putStrLn "Enter state income tax" >> (readLn :: IO Int)...
374
promptW2 :: IO FormW2 promptW2 = putStrLn "Enter total wages (W-2 field 1)" >> (readLn :: IO Int) >>= \inc -> putStrLn "Enter federal income tax" >> (readLn :: IO Int) >>= \fedTax -> putStrLn "Enter state income tax" >> (readLn :: IO Int) >>= \stTax -> return (Wage ...
337
promptW2 = putStrLn "Enter total wages (W-2 field 1)" >> (readLn :: IO Int) >>= \inc -> putStrLn "Enter federal income tax" >> (readLn :: IO Int) >>= \fedTax -> putStrLn "Enter state income tax" >> (readLn :: IO Int) >>= \stTax -> return (Wage inc fedTax stTax)
315
true
true
6
8
113
114
54
60
null
null
urbanslug/ghc
compiler/main/HscTypes.hs
bsd-3-clause
emptyIfaceWarnCache :: Name -> Maybe WarningTxt emptyIfaceWarnCache _ = Nothing
79
emptyIfaceWarnCache :: Name -> Maybe WarningTxt emptyIfaceWarnCache _ = Nothing
79
emptyIfaceWarnCache _ = Nothing
31
false
true
0
7
9
26
11
15
null
null
tuturto/space-privateers
GameDefinition/Content/TileKind.hs
bsd-3-clause
floorBrownLit = floorRedLit { tname = "rotting mahogany deck" , tfreq = [("trailLit", 10)] , tcolor = BrMagenta , tcolor2 = Magenta }
152
floorBrownLit = floorRedLit { tname = "rotting mahogany deck" , tfreq = [("trailLit", 10)] , tcolor = BrMagenta , tcolor2 = Magenta }
152
floorBrownLit = floorRedLit { tname = "rotting mahogany deck" , tfreq = [("trailLit", 10)] , tcolor = BrMagenta , tcolor2 = Magenta }
152
false
false
0
9
41
45
27
18
null
null
noraesae/euler
src/Problem54.hs
bsd-3-clause
straight :: Combination straight cards = let (x:xs) = numbers cards in if isStraight x xs then Just (last cards) else Nothing where isStraight _ [] = True isStraight cur (x:xs) = (cur+1 == x || cur+9 == x) && isStraight x xs
272
straight :: Combination straight cards = let (x:xs) = numbers cards in if isStraight x xs then Just (last cards) else Nothing where isStraight _ [] = True isStraight cur (x:xs) = (cur+1 == x || cur+9 == x) && isStraight x xs
272
straight cards = let (x:xs) = numbers cards in if isStraight x xs then Just (last cards) else Nothing where isStraight _ [] = True isStraight cur (x:xs) = (cur+1 == x || cur+9 == x) && isStraight x xs
248
false
true
0
11
90
122
60
62
null
null
brendanhay/gogol
gogol-securitycenter/gen/Network/Google/Resource/SecurityCenter/Organizations/Assets/RunDiscovery.hs
mpl-2.0
-- | Required. Name of the organization to run asset discovery for. Its -- format is \"organizations\/[organization_id]\". oardParent :: Lens' OrganizationsAssetsRunDiscovery Text oardParent = lens _oardParent (\ s a -> s{_oardParent = a})
241
oardParent :: Lens' OrganizationsAssetsRunDiscovery Text oardParent = lens _oardParent (\ s a -> s{_oardParent = a})
118
oardParent = lens _oardParent (\ s a -> s{_oardParent = a})
61
true
true
0
9
34
43
23
20
null
null
continuouspi/cpiwb
CPi/Signals.hs
gpl-3.0
tSigP = ((0,8), [(1,3),(4,7)]) :: Signal
40
tSigP = ((0,8), [(1,3),(4,7)]) :: Signal
40
tSigP = ((0,8), [(1,3),(4,7)]) :: Signal
40
false
false
0
7
5
39
25
14
null
null
dylanmc/cryptol
src/Cryptol/ModuleSystem/Monad.hs
bsd-3-clause
importedModule :: ImportSource -> P.ModName importedModule is = case is of FromModule n -> n FromImport li -> P.iModule (P.thing li)
137
importedModule :: ImportSource -> P.ModName importedModule is = case is of FromModule n -> n FromImport li -> P.iModule (P.thing li)
137
importedModule is = case is of FromModule n -> n FromImport li -> P.iModule (P.thing li)
93
false
true
0
11
25
55
26
29
null
null
snoyberg/ghc
compiler/basicTypes/DataCon.hs
bsd-3-clause
{- ************************************************************************ * * Building an algebraic data type * * ****************************************************...
1,093
buildAlgTyCon :: Name -> [TyVar] -- ^ Kind variables and type variables -> [Role] -> Maybe CType -> ThetaType -- ^ Stupid theta -> AlgTyConRhs -> Bool -- ^ True <=> was declared in GADT syntax ...
631
buildAlgTyCon tc_name ktvs roles cType stupid_theta rhs gadt_syn parent = mkAlgTyCon tc_name binders liftedTypeKind roles cType stupid_theta rhs parent gadt_syn where binders = mkTyConBindersPreferAnon ktvs liftedTypeKind
258
true
true
0
14
444
112
55
57
null
null
uuhan/Idris-dev
src/Idris/Docstrings.hs
bsd-3-clause
-- TODO renderBlock pp HRule = text "----------------------"
60
renderBlock pp HRule = text "----------------------"
52
renderBlock pp HRule = text "----------------------"
52
true
false
0
5
7
16
7
9
null
null
punitrathore/haskell-first-principles
src/Chap12.hs
bsd-3-clause
mkPerson' (Left badName) (Left badAge) = Left (badName ++ badAge)
65
mkPerson' (Left badName) (Left badAge) = Left (badName ++ badAge)
65
mkPerson' (Left badName) (Left badAge) = Left (badName ++ badAge)
65
false
false
1
7
9
35
16
19
null
null
DanielWaterworth/Idris-dev
src/Idris/Core/CaseTree.hs
bsd-3-clause
isConPat (PCon _ _ _ : ps, _) = True
36
isConPat (PCon _ _ _ : ps, _) = True
36
isConPat (PCon _ _ _ : ps, _) = True
36
false
false
0
7
9
27
13
14
null
null
CloudI/CloudI
src/api/haskell/external/bytestring-0.10.10.0/Data/ByteString/Lazy.hs
mit
mapAccumR :: (acc -> Word8 -> (acc, Word8)) -> acc -> ByteString -> (acc, ByteString) mapAccumR f s0 = go s0 where go s Empty = (s, Empty) go s (Chunk c cs) = (s'', Chunk c' cs') where (s'', c') = S.mapAccumR f s' c (s', cs') = go s cs -- -----------------------------------------...
634
mapAccumR :: (acc -> Word8 -> (acc, Word8)) -> acc -> ByteString -> (acc, ByteString) mapAccumR f s0 = go s0 where go s Empty = (s, Empty) go s (Chunk c cs) = (s'', Chunk c' cs') where (s'', c') = S.mapAccumR f s' c (s', cs') = go s cs -- -----------------------------------------...
634
mapAccumR f s0 = go s0 where go s Empty = (s, Empty) go s (Chunk c cs) = (s'', Chunk c' cs') where (s'', c') = S.mapAccumR f s' c (s', cs') = go s cs -- --------------------------------------------------------------------- -- Building ByteStrings -- | 'scanl' is similar to 'fold...
548
false
true
1
9
157
152
85
67
null
null
sdiehl/ghc
compiler/nativeGen/SPARC/CodeGen.hs
bsd-3-clause
genCCall target dest_regs args = do -- work out the arguments, and assign them to integer regs argcode_and_vregs <- mapM arg_to_int_vregs args let (argcodes, vregss) = unzip argcode_and_vregs let vregs = concat vregss let n_argRegs = length allArgRegs ...
2,834
genCCall target dest_regs args = do -- work out the arguments, and assign them to integer regs argcode_and_vregs <- mapM arg_to_int_vregs args let (argcodes, vregss) = unzip argcode_and_vregs let vregs = concat vregss let n_argRegs = length allArgRegs ...
2,834
genCCall target dest_regs args = do -- work out the arguments, and assign them to integer regs argcode_and_vregs <- mapM arg_to_int_vregs args let (argcodes, vregss) = unzip argcode_and_vregs let vregs = concat vregss let n_argRegs = length allArgRegs ...
2,834
false
false
23
25
1,349
622
310
312
null
null
onponomarev/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
daemons :: FrozenSet String daemons = ConstantUtils.mkSet $ map Runtime.daemonName [minBound .. maxBound]
109
daemons :: FrozenSet String daemons = ConstantUtils.mkSet $ map Runtime.daemonName [minBound .. maxBound]
109
daemons = ConstantUtils.mkSet $ map Runtime.daemonName [minBound .. maxBound]
81
false
true
2
6
16
41
18
23
null
null
dysinger/consul-haskell
src/Network/Consul.hs
bsd-3-clause
withSession :: forall a m. (MonadIO m,MonadBaseControl IO m) => ConsulClient -> Session -> (Session -> m a) -> m a -> m a withSession client session action lostAction = do var <- liftIO $ newEmptyTMVarIO tidVar <- liftIO $ newEmptyTMVarIO stid <- fork $ runThread var tidVar tid <- fork $ action session >>= \ x ...
1,194
withSession :: forall a m. (MonadIO m,MonadBaseControl IO m) => ConsulClient -> Session -> (Session -> m a) -> m a -> m a withSession client session action lostAction = do var <- liftIO $ newEmptyTMVarIO tidVar <- liftIO $ newEmptyTMVarIO stid <- fork $ runThread var tidVar tid <- fork $ action session >>= \ x ...
1,194
withSession client session action lostAction = do var <- liftIO $ newEmptyTMVarIO tidVar <- liftIO $ newEmptyTMVarIO stid <- fork $ runThread var tidVar tid <- fork $ action session >>= \ x -> liftIO $ atomically $ putTMVar var x liftIO $ atomically $ putTMVar tidVar tid ret <- liftIO $ atomically $ takeTMV...
1,072
false
true
0
12
317
454
204
250
null
null
green-haskell/ghc
compiler/cmm/CmmExpr.hs
bsd-3-clause
isArgReg :: GlobalReg -> Bool isArgReg (VanillaReg {}) = True
61
isArgReg :: GlobalReg -> Bool isArgReg (VanillaReg {}) = True
61
isArgReg (VanillaReg {}) = True
31
false
true
0
7
9
25
13
12
null
null
jtdaugherty/vty
src/Graphics/Vty/Attributes.hs
bsd-3-clause
defaultStyleMask :: Style defaultStyleMask = 0x00
49
defaultStyleMask :: Style defaultStyleMask = 0x00
49
defaultStyleMask = 0x00
23
false
true
0
6
5
18
7
11
null
null
neobrain/aeson
Data/Aeson/Types/Instances.hs
bsd-3-clause
parseRealFloat _ Null = pure (0/0)
47
parseRealFloat _ Null = pure (0/0)
47
parseRealFloat _ Null = pure (0/0)
47
false
false
1
7
18
22
10
12
null
null
li-zhirui/EoplLangs
src/MutablePairs/Parser.hs
bsd-3-clause
-- expressionPair ::= (Expression, Expression) expressionPair :: Parser (Expression, Expression) expressionPair = parens $ do expr1 <- expression comma expr2 <- expression return (expr1, expr2) -- | ConstExpr ::= Number
228
expressionPair :: Parser (Expression, Expression) expressionPair = parens $ do expr1 <- expression comma expr2 <- expression return (expr1, expr2) -- | ConstExpr ::= Number
181
expressionPair = parens $ do expr1 <- expression comma expr2 <- expression return (expr1, expr2) -- | ConstExpr ::= Number
131
true
true
1
10
38
59
28
31
null
null
k16shikano/wikipepub
QNDA/Counter.hs
mit
SubSectionHeader t = txt "" s
30
genSubSectionHeader t = txt ""
30
genSubSectionHeader t = txt ""
30
false
false
1
5
6
19
6
13
null
null
vikraman/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
-- Takes a list of things and prints them with the given pretty-printing -- function, separated by commas followed by space. commaSepWith :: (a -> Doc) -> [a] -> Doc commaSepWith pprFun = sep . punctuate comma . map pprFun
222
commaSepWith :: (a -> Doc) -> [a] -> Doc commaSepWith pprFun = sep . punctuate comma . map pprFun
97
commaSepWith pprFun = sep . punctuate comma . map pprFun
56
true
true
0
7
39
48
25
23
null
null
balangs/eTeak
src/Gen.hs
bsd-3-clause
drTree :: DRBin -> String -> [GateConn] -> [GateConn] -> [GateConn] -> [GateConn] -> [GateElem] drTree moduleFunc prefix outf outt inpf inpt = binModuleTree moduleFunc' prefix [outf,outt] [inpf,inpt] where moduleFunc' p [outf,outt] [lf,lt] [hf,ht] = moduleFunc p outf outt lf lt hf ht ...
536
drTree :: DRBin -> String -> [GateConn] -> [GateConn] -> [GateConn] -> [GateConn] -> [GateElem] drTree moduleFunc prefix outf outt inpf inpt = binModuleTree moduleFunc' prefix [outf,outt] [inpf,inpt] where moduleFunc' p [outf,outt] [lf,lt] [hf,ht] = moduleFunc p outf outt lf lt hf ht mod...
532
drTree moduleFunc prefix outf outt inpf inpt = binModuleTree moduleFunc' prefix [outf,outt] [inpf,inpt] where moduleFunc' p [outf,outt] [lf,lt] [hf,ht] = moduleFunc p outf outt lf lt hf ht moduleFunc' _ _ _ _ = error "moduleFunc': bad args" -- binModuleTree : make a tree pair combin...
436
false
true
2
13
124
160
83
77
null
null
pbl64k/MD5.hs
MD5.hs
bsd-2-clause
md5 :: String -> String md5 = hexify . unword' . md5' where hexify = foldr showHex "" showHex = (++) . (printf "%02x") unword' = foldr unword []
168
md5 :: String -> String md5 = hexify . unword' . md5' where hexify = foldr showHex "" showHex = (++) . (printf "%02x") unword' = foldr unword []
168
md5 = hexify . unword' . md5' where hexify = foldr showHex "" showHex = (++) . (printf "%02x") unword' = foldr unword []
144
false
true
3
7
52
77
35
42
null
null
ChaosCabbage/my-haskell-flailing
src/CPU/Instructions.hs
bsd-3-clause
ld_reg_pointer :: Register8 -> CPUPointer s -> Instruction s ld_reg_pointer to from = Ary0 $ do ld_x_pointer to from return 8
133
ld_reg_pointer :: Register8 -> CPUPointer s -> Instruction s ld_reg_pointer to from = Ary0 $ do ld_x_pointer to from return 8
133
ld_reg_pointer to from = Ary0 $ do ld_x_pointer to from return 8
72
false
true
0
8
28
48
21
27
null
null
acowley/ghc
ghc/Main.hs
bsd-3-clause
unknownFlagsErr :: [String] -> a unknownFlagsErr fs = throwGhcException $ UsageError $ concatMap oneError fs where oneError f = "unrecognised flag: " ++ f ++ "\n" ++ (case fuzzyMatch f (nub allFlags) of [] -> "" suggs -> "did you mean one of:\n" ++ unlines (map (" " ++) su...
1,263
unknownFlagsErr :: [String] -> a unknownFlagsErr fs = throwGhcException $ UsageError $ concatMap oneError fs where oneError f = "unrecognised flag: " ++ f ++ "\n" ++ (case fuzzyMatch f (nub allFlags) of [] -> "" suggs -> "did you mean one of:\n" ++ unlines (map (" " ++) su...
1,263
unknownFlagsErr fs = throwGhcException $ UsageError $ concatMap oneError fs where oneError f = "unrecognised flag: " ++ f ++ "\n" ++ (case fuzzyMatch f (nub allFlags) of [] -> "" suggs -> "did you mean one of:\n" ++ unlines (map (" " ++) suggs)) {- Note [-Bsymbolic and ho...
1,230
false
true
0
14
253
109
55
54
null
null
kasou-sk/glitch
app/Main.hs
bsd-3-clause
main :: IO () main = C.interact $ C.lines >>> linesAsVertices >>> splitToSegments >>> fmap ( asInnerItems >>> either devNull ( dropGlitches >>> --map toTuple >>> --map (\(t,d,a,s) -> (t,d,a,s,d*(1+a)*(1+a)/sqrt(s))) ...
571
main :: IO () main = C.interact $ C.lines >>> linesAsVertices >>> splitToSegments >>> fmap ( asInnerItems >>> either devNull ( dropGlitches >>> --map toTuple >>> --map (\(t,d,a,s) -> (t,d,a,s,d*(1+a)*(1+a)/sqrt(s))) ...
571
main = C.interact $ C.lines >>> linesAsVertices >>> splitToSegments >>> fmap ( asInnerItems >>> either devNull ( dropGlitches >>> --map toTuple >>> --map (\(t,d,a,s) -> (t,d,a,s,d*(1+a)*(1+a)/sqrt(s))) >>> ...
557
false
true
14
10
250
123
60
63
null
null
banacorn/Graphentheoretische-Paralleler-Algorithmus
src/Graph/DenseList.hs
mit
bronKerbosch2 :: Graph -> Vertices -> Vertices -> Vertices -> [Vertices] bronKerbosch2 g r p x | null p && null x = [r] -- found a clique | null p = [] -- backtracks | otherwise = vs >>= next where pivot = pickPivot (p `union` x) vs = toVertex...
527
bronKerbosch2 :: Graph -> Vertices -> Vertices -> Vertices -> [Vertices] bronKerbosch2 g r p x | null p && null x = [r] -- found a clique | null p = [] -- backtracks | otherwise = vs >>= next where pivot = pickPivot (p `union` x) vs = toVertex...
527
bronKerbosch2 g r p x | null p && null x = [r] -- found a clique | null p = [] -- backtracks | otherwise = vs >>= next where pivot = pickPivot (p `union` x) vs = toVertex (p \\ neighbor g pivot) next v = bronKerbosch2 g ...
454
false
true
5
11
235
205
97
108
null
null
dzhus/dsmc-tools
src/Runner.hs
bsd-3-clause
ws :: ByteString ws = B.singleton ' '
37
ws :: ByteString ws = B.singleton ' '
37
ws = B.singleton ' '
20
false
true
0
6
7
22
9
13
null
null
BeautifulDestinations/fb
gen/src/Facebook/Gen/CodeGenStr.hs
bsd-3-clause
typesToJsonInstances :: (Text, Text, Text) -> Text typesToJsonInstances (nt, "Int", "Text") = let create = "pure $ " <> nt <> " num" in "instance A.FromJSON " <> nt <> " where\n\ \ parseJSON (Number x) =\n\ \ case toBoundedInteger x of\n\ \ Just num -> " <> create <> "\n" <> ...
606
typesToJsonInstances :: (Text, Text, Text) -> Text typesToJsonInstances (nt, "Int", "Text") = let create = "pure $ " <> nt <> " num" in "instance A.FromJSON " <> nt <> " where\n\ \ parseJSON (Number x) =\n\ \ case toBoundedInteger x of\n\ \ Just num -> " <> create <> "\n" <> ...
606
typesToJsonInstances (nt, "Int", "Text") = let create = "pure $ " <> nt <> " num" in "instance A.FromJSON " <> nt <> " where\n\ \ parseJSON (Number x) =\n\ \ case toBoundedInteger x of\n\ \ Just num -> " <> create <> "\n" <> " Nothing -> error \"parseJSON toBoundedInte...
555
false
true
0
16
196
96
51
45
null
null
kawu/factorized-tag-parser
src/NLP/Partage/Format/Brackets.hs
bsd-2-clause
parseTree :: T.Text -> Either String Tree parseTree = Atto.parseOnly (treeP <* Atto.endOfInput)
95
parseTree :: T.Text -> Either String Tree parseTree = Atto.parseOnly (treeP <* Atto.endOfInput)
95
parseTree = Atto.parseOnly (treeP <* Atto.endOfInput)
53
false
true
0
8
12
36
18
18
null
null
sopvop/cabal
Cabal/Distribution/Simple/GHC/IPIConvert.hs
bsd-3-clause
convertLicense PublicDomain = Current.PublicDomain
50
convertLicense PublicDomain = Current.PublicDomain
50
convertLicense PublicDomain = Current.PublicDomain
50
false
false
1
6
3
15
5
10
null
null
kata-seeds/haskell-htf-seed
test/Kata_test.hs
mit
test_greet = assertEqual "Hello!" (greet person) where person = Person "Hello!"
83
test_greet = assertEqual "Hello!" (greet person) where person = Person "Hello!"
83
test_greet = assertEqual "Hello!" (greet person) where person = Person "Hello!"
83
false
false
0
7
14
27
13
14
null
null
alexbaluta/courseography
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/Xtract/Lex.hs
gpl-3.0
gatherName :: (String->String) -> String -> Posn -> Posn -> String -> (Posn->String->[Token]) -> [Token] gatherName f acc pos p (s:ss) k | isAlphaNum s || s `elem` "-_:" = gatherName f (s:acc) pos (addcol 1 p) ss k
230
gatherName :: (String->String) -> String -> Posn -> Posn -> String -> (Posn->String->[Token]) -> [Token] gatherName f acc pos p (s:ss) k | isAlphaNum s || s `elem` "-_:" = gatherName f (s:acc) pos (addcol 1 p) ss k
230
gatherName f acc pos p (s:ss) k | isAlphaNum s || s `elem` "-_:" = gatherName f (s:acc) pos (addcol 1 p) ss k
111
false
true
0
15
54
131
66
65
null
null
johnyhlee/media-tracker
src/Main.hs
gpl-2.0
getTitleFromMovie :: MovieInfo -> String getTitleFromMovie movie = ppContent $ head movie
89
getTitleFromMovie :: MovieInfo -> String getTitleFromMovie movie = ppContent $ head movie
89
getTitleFromMovie movie = ppContent $ head movie
48
false
true
0
6
11
25
12
13
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/book/2007-Programming_in_Haskell-1st_Edition-Graham_Hutton/ch_12_9.hs
unlicense
-- unbalanced versions repeatT :: a -> Tree a repeatT x = Node Leaf x (repeatT x)
82
repeatT :: a -> Tree a repeatT x = Node Leaf x (repeatT x)
58
repeatT x = Node Leaf x (repeatT x)
35
true
true
0
7
17
35
17
18
null
null
Noeda/rwpas
src/RWPAS/Control/ControlMonad.hs
mit
emitMessage :: (MonadState s m, HasWorld s) => Text -> m () emitMessage txt = world %= insertMessage txt
116
emitMessage :: (MonadState s m, HasWorld s) => Text -> m () emitMessage txt = world %= insertMessage txt
116
emitMessage txt = world %= insertMessage txt
44
false
true
0
8
30
47
23
24
null
null
jtobin/lazy-langevin
Examples/code/Gaussian1D_MALA.hs
bsd-3-clause
gTarget :: [Double] -> [Double] gTarget = grad target
53
gTarget :: [Double] -> [Double] gTarget = grad target
53
gTarget = grad target
21
false
true
0
6
8
24
13
11
null
null
AlexeyRaga/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpHasSideEffects AtomicWriteByteArrayOp_Int = True
54
primOpHasSideEffects AtomicWriteByteArrayOp_Int = True
54
primOpHasSideEffects AtomicWriteByteArrayOp_Int = True
54
false
false
0
4
3
10
4
6
null
null
armoredsoftware/protocol
tpm/mainline/protoMonad/Keys.hs
bsd-3-clause
exportCAPub :: String -> PublicKey -> IO () exportCAPub fileName pubKey = do handle <- openFile fileName WriteMode hPutStrLn handle $ show pubKey hClose handle --One-time use func to export pubEK
202
exportCAPub :: String -> PublicKey -> IO () exportCAPub fileName pubKey = do handle <- openFile fileName WriteMode hPutStrLn handle $ show pubKey hClose handle --One-time use func to export pubEK
202
exportCAPub fileName pubKey = do handle <- openFile fileName WriteMode hPutStrLn handle $ show pubKey hClose handle --One-time use func to export pubEK
158
false
true
0
8
37
61
27
34
null
null
roberth/uu-helium
test/testinstallation/Simple.hs
gpl-3.0
lowerStrands::StickerSystem -> [Strand] lowerStrands = thd3
59
lowerStrands::StickerSystem -> [Strand] lowerStrands = thd3
59
lowerStrands = thd3
19
false
true
0
8
5
26
11
15
null
null
themoritz/cabal
Cabal/Distribution/Simple/Setup.hs
bsd-3-clause
configureCCompiler :: Verbosity -> ProgramDb -> IO (FilePath, [String]) configureCCompiler verbosity progdb = configureProg verbosity progdb gccProgram
173
configureCCompiler :: Verbosity -> ProgramDb -> IO (FilePath, [String]) configureCCompiler verbosity progdb = configureProg verbosity progdb gccProgram
173
configureCCompiler verbosity progdb = configureProg verbosity progdb gccProgram
79
false
true
0
9
38
43
22
21
null
null
asvyazin/kafka-conduit
MetadataTool/Main.hs
bsd-3-clause
testClientId :: ByteString testClientId = "testClient"
54
testClientId :: ByteString testClientId = "testClient"
54
testClientId = "testClient"
27
false
true
0
4
5
11
6
5
null
null
klarh/temper
src/Text/Temper.hs
mit
tagStart::Parser Element tagStart = do tname <- many1 . noneOf $ [' ', '.', '#', '\r', '\n'] mods <- many tagModifier return (Prelude.foldr (.) id mods $ emptyTag {tagName=T.pack tname})
192
tagStart::Parser Element tagStart = do tname <- many1 . noneOf $ [' ', '.', '#', '\r', '\n'] mods <- many tagModifier return (Prelude.foldr (.) id mods $ emptyTag {tagName=T.pack tname})
192
tagStart = do tname <- many1 . noneOf $ [' ', '.', '#', '\r', '\n'] mods <- many tagModifier return (Prelude.foldr (.) id mods $ emptyTag {tagName=T.pack tname})
167
false
true
0
13
35
91
47
44
null
null
zjhmale/HMF
src/FCP/Infer.hs
bsd-3-clause
newBoundVar :: Infer (Id, T) newBoundVar = do next <- nextId return (next, TVar $ createState $ Bound next)
115
newBoundVar :: Infer (Id, T) newBoundVar = do next <- nextId return (next, TVar $ createState $ Bound next)
115
newBoundVar = do next <- nextId return (next, TVar $ createState $ Bound next)
86
false
true
1
11
26
54
25
29
null
null
tjakway/ghcjvm
compiler/basicTypes/Id.hs
bsd-3-clause
isStateHackType :: Type -> Bool isStateHackType ty | opt_NoStateHack = False | otherwise = case tyConAppTyCon_maybe ty of Just tycon -> tycon == statePrimTyCon _ -> False -- This is a gross hack. It claims that -- every function over realWorldStatePrimTy is a one-shot ...
1,307
isStateHackType :: Type -> Bool isStateHackType ty | opt_NoStateHack = False | otherwise = case tyConAppTyCon_maybe ty of Just tycon -> tycon == statePrimTyCon _ -> False -- This is a gross hack. It claims that -- every function over realWorldStatePrimTy is a one-shot ...
1,307
isStateHackType ty | opt_NoStateHack = False | otherwise = case tyConAppTyCon_maybe ty of Just tycon -> tycon == statePrimTyCon _ -> False -- This is a gross hack. It claims that -- every function over realWorldStatePrimTy is a one-shot -- function. This is pre...
1,275
false
true
0
9
408
86
48
38
null
null
jwiegley/hnix
tests/PrettyParseTests.hs
bsd-3-clause
genBinding :: Gen (Binding NExpr) genBinding = Gen.choice [ NamedVar <$> genAttrPath <*> genExpr <*> genSourcePos , Inherit <$> Gen.maybe genExpr <*> Gen.list (Range.linear 0 5) genKeyName <*> genSourcePos ]
219
genBinding :: Gen (Binding NExpr) genBinding = Gen.choice [ NamedVar <$> genAttrPath <*> genExpr <*> genSourcePos , Inherit <$> Gen.maybe genExpr <*> Gen.list (Range.linear 0 5) genKeyName <*> genSourcePos ]
219
genBinding = Gen.choice [ NamedVar <$> genAttrPath <*> genExpr <*> genSourcePos , Inherit <$> Gen.maybe genExpr <*> Gen.list (Range.linear 0 5) genKeyName <*> genSourcePos ]
185
false
true
0
11
41
77
38
39
null
null
green-haskell/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
sTyConKey = mkPreludeTyConUnique 148
36
sTyConKey = mkPreludeTyConUnique 148
36
sTyConKey = mkPreludeTyConUnique 148
36
false
false
0
5
3
9
4
5
null
null
d0kt0r0/Tidal
src/Sound/Tidal/ParseBP.hs
gpl-3.0
intOrFloat :: MyParser Double intOrFloat = do s <- sign num <- naturalOrFloat return (case num of Right x -> applySign s x Left x -> fromIntegral $ applySign s x )
281
intOrFloat :: MyParser Double intOrFloat = do s <- sign num <- naturalOrFloat return (case num of Right x -> applySign s x Left x -> fromIntegral $ applySign s x )
281
intOrFloat = do s <- sign num <- naturalOrFloat return (case num of Right x -> applySign s x Left x -> fromIntegral $ applySign s x )
251
false
true
1
14
149
77
33
44
null
null
dancor/melang
src/Lang/De/Noun.hs
mit
inflNEn :: Number -> NEn -> Str inflNEn Sing (NEnS w) = w
61
inflNEn :: Number -> NEn -> Str inflNEn Sing (NEnS w) = w
61
inflNEn Sing (NEnS w) = w
29
false
true
0
7
16
30
15
15
null
null
mightymoose/liquidhaskell
benchmarks/bytestring-0.9.2.1/Data/ByteString/Char8.hs
bsd-3-clause
-- | /O(n)/ The 'elemIndices' function extends 'elemIndex', by returning -- the indices of all elements equal to the query element, in ascending order. elemIndices :: Char -> ByteString -> [Int] elemIndices = B.elemIndices . c2w
228
elemIndices :: Char -> ByteString -> [Int] elemIndices = B.elemIndices . c2w
76
elemIndices = B.elemIndices . c2w
33
true
true
0
7
35
30
17
13
null
null
facebookincubator/duckling
Duckling/AmountOfMoney/RO/Rules.hs
bsd-3-clause
ruleAed :: Rule ruleAed = Rule { name = "AED" , pattern = [ regex "dirhami?" ] , prod = \_ -> Just . Token AmountOfMoney $ currencyOnly AED }
157
ruleAed :: Rule ruleAed = Rule { name = "AED" , pattern = [ regex "dirhami?" ] , prod = \_ -> Just . Token AmountOfMoney $ currencyOnly AED }
157
ruleAed = Rule { name = "AED" , pattern = [ regex "dirhami?" ] , prod = \_ -> Just . Token AmountOfMoney $ currencyOnly AED }
141
false
true
0
11
45
66
33
33
null
null
lookunder/RedmineHs
testsuite/testGet.hs
mit
test4 = TestCase $ assertEqual "Test de parsing d'un Day" "\"1999-01-12\"" (encode $ fromGregorian 1999 01 12)
110
test4 = TestCase $ assertEqual "Test de parsing d'un Day" "\"1999-01-12\"" (encode $ fromGregorian 1999 01 12)
110
test4 = TestCase $ assertEqual "Test de parsing d'un Day" "\"1999-01-12\"" (encode $ fromGregorian 1999 01 12)
110
false
false
1
9
16
34
15
19
null
null
antalsz/hs-to-coq
examples/graph/graph/Data/Graph/Inductive/Query/MaxFlow2.hs
mit
ekSimple :: Network -> Node -> Node -> (Network, Double) ekSimple = ekWith ekSimpleStep
87
ekSimple :: Network -> Node -> Node -> (Network, Double) ekSimple = ekWith ekSimpleStep
87
ekSimple = ekWith ekSimpleStep
30
false
true
0
8
13
32
17
15
null
null
unisonweb/platform
parser-typechecker/tests/Unison/Test/Util/Pretty.hs
mit
randomDelta :: Test Pretty.Delta randomDelta = Pretty.delta <$> randomPretty where randomPretty :: Test (Pretty.Pretty String) randomPretty = fromString <$> randomString randomString :: Test String randomString = replicateM 3 (pick ['x', 'y', 'z', '\n'])
288
randomDelta :: Test Pretty.Delta randomDelta = Pretty.delta <$> randomPretty where randomPretty :: Test (Pretty.Pretty String) randomPretty = fromString <$> randomString randomString :: Test String randomString = replicateM 3 (pick ['x', 'y', 'z', '\n'])
288
randomDelta = Pretty.delta <$> randomPretty where randomPretty :: Test (Pretty.Pretty String) randomPretty = fromString <$> randomString randomString :: Test String randomString = replicateM 3 (pick ['x', 'y', 'z', '\n'])
255
false
true
3
8
66
90
45
45
null
null
fmap/https-everywhere-rules
src/Data/HTTPSEverywhere/Rules/Internal/Raw.hs
mit
getRules :: IO [FilePath] getRules = getDataFileName [] >>= filter isXML <$$> getAbsoluteDirectoryContents where isXML = (== ".xml") . takeExtension
150
getRules :: IO [FilePath] getRules = getDataFileName [] >>= filter isXML <$$> getAbsoluteDirectoryContents where isXML = (== ".xml") . takeExtension
150
getRules = getDataFileName [] >>= filter isXML <$$> getAbsoluteDirectoryContents where isXML = (== ".xml") . takeExtension
124
false
true
1
8
21
53
25
28
null
null
isomorphism/labelled-hexdump-parser
Util.hs
bsd-3-clause
showPrintableChar " " = ' '
28
showPrintableChar " " = ' '
28
showPrintableChar " " = ' '
28
false
false
0
5
6
9
4
5
null
null
muspellsson/hiccup
TclLib/ListCmds.hs
lgpl-2.1
cmdLappend args = case args of (n:news) -> do let vn = T.asVarName n items <- varGetNS vn >>= T.asSeq varSetNS vn $ T.fromSeq (items >< (S.fromList news)) _ -> vArgErr "lappend varName ?value value ...?"
268
cmdLappend args = case args of (n:news) -> do let vn = T.asVarName n items <- varGetNS vn >>= T.asSeq varSetNS vn $ T.fromSeq (items >< (S.fromList news)) _ -> vArgErr "lappend varName ?value value ...?"
268
cmdLappend args = case args of (n:news) -> do let vn = T.asVarName n items <- varGetNS vn >>= T.asSeq varSetNS vn $ T.fromSeq (items >< (S.fromList news)) _ -> vArgErr "lappend varName ?value value ...?"
268
false
false
0
16
100
95
44
51
null
null