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
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxDF_TIFF :: Int wxDF_TIFF = 6
34
wxDF_TIFF :: Int wxDF_TIFF = 6
34
wxDF_TIFF = 6
17
false
true
0
6
9
18
7
11
null
null
acarno/slicer
valgrind/auxprogs/DotToScc.hs
gpl-2.0
- ==========================================================-- -- utSetElementOf :: (Ord a) => a -> Set a -> Bool utSetElementOf x (MkSet []) = False
157
utSetElementOf :: (Ord a) => a -> Set a -> Bool utSetElementOf x (MkSet []) = False
89
utSetElementOf x (MkSet []) = False
41
true
true
1
8
27
106
83
23
null
null
AubreyEAnderson/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
prop_checkTimeParameters3 = verifyNot checkTimeParameters "time -p foo"
71
prop_checkTimeParameters3 = verifyNot checkTimeParameters "time -p foo"
71
prop_checkTimeParameters3 = verifyNot checkTimeParameters "time -p foo"
71
false
false
0
5
6
11
5
6
null
null
judah/ghc-xcode
Main.hs
bsd-3-clause
errType :: Severity -> String errType SevError = "error"
56
errType :: Severity -> String errType SevError = "error"
56
errType SevError = "error"
26
false
true
0
5
8
18
9
9
null
null
rohitjha/DiMPL
src/Modular.hs
bsd-2-clause
{-| The 'modMult' function performs multiplication using modular arithmetic. prop> modMult a b m = (a * b) mod m prop> (a * b) mod m = ((a mod m) * (b mod m)) mod m For example: >>> modMult 117 14 11 10 >>> modMult 114787 23934 3874 2974 -} modMult :: Integral a => a -> a ->...
359
modMult :: Integral a => a -> a -> a -> a modMult a b m = (a * b) `mod` m
73
modMult a b m = (a * b) `mod` m
31
true
true
0
8
117
51
27
24
null
null
nushio3/ghc
compiler/types/Type.hs
bsd-3-clause
-- Note that the TyConApp could be an -- under-saturated type synonym. GHC allows that; e.g. -- type Foo k = k a -> k a -- type Id x = x -- foo :: Foo Id -> Foo Id -- -- Here Id is partially applied in the type sig for Foo, -- but once the type syn...
425
mkAppTys :: Type -> [Type] -> Type mkAppTys ty1 [] = ty1
73
mkAppTys ty1 [] = ty1
38
true
true
0
9
165
43
24
19
null
null
plow-technologies/live-vdom
src/LiveVDom/Render.hs
mit
renderDom :: VMount -> LiveVDom -> IO () renderDom vMount !ld = do !vns <- mkVNode ld !new <- case vns of (x:[]) -> return x _ -> fail "Having more than one node as the parent is illegal" !pa <- diff vMount new _ <- patch vMount pa putStrLn "Rendered" return () -- | create an empty...
387
renderDom :: VMount -> LiveVDom -> IO () renderDom vMount !ld = do !vns <- mkVNode ld !new <- case vns of (x:[]) -> return x _ -> fail "Having more than one node as the parent is illegal" !pa <- diff vMount new _ <- patch vMount pa putStrLn "Rendered" return () -- | create an empty...
387
renderDom vMount !ld = do !vns <- mkVNode ld !new <- case vns of (x:[]) -> return x _ -> fail "Having more than one node as the parent is illegal" !pa <- diff vMount new _ <- patch vMount pa putStrLn "Rendered" return () -- | create an empty div to run dom inside of and add it to t...
346
false
true
0
14
111
127
55
72
null
null
Hara-Laboratory/subleq-mips
TestFix2.hs
gpl-3.0
prop_Addrh :: SubleqUWord -> SubleqUWord -> SubleqUWord -> Bool prop_Addrh rd rt rs = [rs'] == [rs] && rt' == (rs Bit..&. 0x2) `shift` (-1) && rd' == rs `shift` (-2) where d = fromIntegral rd t = fromIntegral rt s = fromIntegral rs [rd', rt', rs'] = map fromIntegral $ executeSubroutine "addr...
358
prop_Addrh :: SubleqUWord -> SubleqUWord -> SubleqUWord -> Bool prop_Addrh rd rt rs = [rs'] == [rs] && rt' == (rs Bit..&. 0x2) `shift` (-1) && rd' == rs `shift` (-2) where d = fromIntegral rd t = fromIntegral rt s = fromIntegral rs [rd', rt', rs'] = map fromIntegral $ executeSubroutine "addr...
358
prop_Addrh rd rt rs = [rs'] == [rs] && rt' == (rs Bit..&. 0x2) `shift` (-1) && rd' == rs `shift` (-2) where d = fromIntegral rd t = fromIntegral rt s = fromIntegral rs [rd', rt', rs'] = map fromIntegral $ executeSubroutine "addrhTest" $ map fromIntegral [rd, rt, rs]
294
false
true
3
12
86
156
84
72
null
null
andir/ganeti
src/Ganeti/OpCodes.hs
bsd-2-clause
opSummaryVal OpInstanceRecreateDisks { opInstanceName = s } = Just s
68
opSummaryVal OpInstanceRecreateDisks { opInstanceName = s } = Just s
68
opSummaryVal OpInstanceRecreateDisks { opInstanceName = s } = Just s
68
false
false
0
8
9
21
10
11
null
null
sgraf812/feed-gipeda
tests/Unit/CommitQueue.hs
bsd-3-clause
pipes, conduit, servant :: Repo pipes = Repo.unsafeFromString "https://github.com/Gabriel439/Haskell-Pipes-Library"
115
pipes, conduit, servant :: Repo pipes = Repo.unsafeFromString "https://github.com/Gabriel439/Haskell-Pipes-Library"
115
pipes = Repo.unsafeFromString "https://github.com/Gabriel439/Haskell-Pipes-Library"
83
false
true
4
6
8
31
12
19
null
null
aquatir/remember_java_api
code-sample-haskell/hello_world/func_magic/monads.hs
mit
guardFails = guard (1 > 2) >> return "cool" :: [String]
55
guardFails = guard (1 > 2) >> return "cool" :: [String]
55
guardFails = guard (1 > 2) >> return "cool" :: [String]
55
false
false
2
7
10
33
15
18
null
null
RossMeikleham/GPC
src/GPC/Parser.hs
bsd-2-clause
args :: Parser [(Type SrcPos, Ident SrcPos)] args = commaSep arg where arg :: Parser (Type SrcPos, Ident SrcPos) arg = do aType <- parseType aName <- parseIdent return (aType, aName) -- | Parse a block of statements encased in braces
280
args :: Parser [(Type SrcPos, Ident SrcPos)] args = commaSep arg where arg :: Parser (Type SrcPos, Ident SrcPos) arg = do aType <- parseType aName <- parseIdent return (aType, aName) -- | Parse a block of statements encased in braces
279
args = commaSep arg where arg :: Parser (Type SrcPos, Ident SrcPos) arg = do aType <- parseType aName <- parseIdent return (aType, aName) -- | Parse a block of statements encased in braces
234
false
true
1
8
87
87
43
44
null
null
ml9951/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
noPostTcExpr :: PostTcExpr noPostTcExpr = HsLit (HsString "" (fsLit "noPostTcExpr"))
84
noPostTcExpr :: PostTcExpr noPostTcExpr = HsLit (HsString "" (fsLit "noPostTcExpr"))
84
noPostTcExpr = HsLit (HsString "" (fsLit "noPostTcExpr"))
57
false
true
0
9
9
28
14
14
null
null
parvmor/codeworld
codeworld-server/src/DataUtil.hs
apache-2.0
resolveDeployId :: BuildMode -> DeployId -> IO ProgramId resolveDeployId mode deployId = ProgramId . T.decodeUtf8 <$> B.readFile f where f = deployRootDir mode </> deployLink deployId
185
resolveDeployId :: BuildMode -> DeployId -> IO ProgramId resolveDeployId mode deployId = ProgramId . T.decodeUtf8 <$> B.readFile f where f = deployRootDir mode </> deployLink deployId
185
resolveDeployId mode deployId = ProgramId . T.decodeUtf8 <$> B.readFile f where f = deployRootDir mode </> deployLink deployId
128
false
true
0
7
27
60
28
32
null
null
nevrenato/Hets_Fork
Propositional/Prop2CASLHelpers.hs
gpl-2.0
trMor :: Map.Map Id.Id Id.Id -> Map.Map (Id.Id, CSign.PredType) Id.Id trMor mp = let pt = CSign.PredType{CSign.predArgs = []} in Map.foldWithKey (\ k a -> Map.insert (k, pt) a ) Map.empty mp
264
trMor :: Map.Map Id.Id Id.Id -> Map.Map (Id.Id, CSign.PredType) Id.Id trMor mp = let pt = CSign.PredType{CSign.predArgs = []} in Map.foldWithKey (\ k a -> Map.insert (k, pt) a ) Map.empty mp
264
trMor mp = let pt = CSign.PredType{CSign.predArgs = []} in Map.foldWithKey (\ k a -> Map.insert (k, pt) a ) Map.empty mp
194
false
true
0
11
105
114
56
58
null
null
nevrenato/Hets_Fork
Framework/WriteLogicUtils.hs
gpl-2.0
mkImpl :: String -> String -> String -> String mkImpl f lid imp = f ++ " " ++ lid ++ " = " ++ imp
99
mkImpl :: String -> String -> String -> String mkImpl f lid imp = f ++ " " ++ lid ++ " = " ++ imp
99
mkImpl f lid imp = f ++ " " ++ lid ++ " = " ++ imp
52
false
true
2
7
27
48
23
25
null
null
ocean0yohsuke/Simply-Typed-Lambda
src/Lambda/Parser.hs
bsd-3-clause
delimiter :: Parser Char delimiter = oneOf " \t\n"
50
delimiter :: Parser Char delimiter = oneOf " \t\n"
50
delimiter = oneOf " \t\n"
25
false
true
1
5
8
20
8
12
null
null
geophf/1HaskellADay
exercises/HAD/Control/Boolean.hs
mit
-- tt: t t = t, t f = f, f t = t, f f = t (-|) :: Bool -> Bool -> Bool a -| b = impl a b
89
(-|) :: Bool -> Bool -> Bool a -| b = impl a b
46
a -| b = impl a b
17
true
true
0
9
32
39
18
21
null
null
nickbart1980/pandoc
man/make-pandoc-man-pages.hs
gpl-2.0
removeLinks :: Inline -> [Inline] removeLinks (Link l _) = l
60
removeLinks :: Inline -> [Inline] removeLinks (Link l _) = l
60
removeLinks (Link l _) = l
26
false
true
0
7
10
29
15
14
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Addresses/Insert.hs
mpl-2.0
-- | Multipart request metadata. aiPayload :: Lens' AddressesInsert Address aiPayload = lens _aiPayload (\ s a -> s{_aiPayload = a})
134
aiPayload :: Lens' AddressesInsert Address aiPayload = lens _aiPayload (\ s a -> s{_aiPayload = a})
101
aiPayload = lens _aiPayload (\ s a -> s{_aiPayload = a})
58
true
true
1
9
22
46
22
24
null
null
nevrenato/Hets_Fork
Static/ToXml.hs
gpl-2.0
consStatus :: ConsStatus -> [Element] consStatus cs = case getConsOfStatus cs of None -> [] cStat -> [unode "ConsStatus" $ show cStat]
138
consStatus :: ConsStatus -> [Element] consStatus cs = case getConsOfStatus cs of None -> [] cStat -> [unode "ConsStatus" $ show cStat]
138
consStatus cs = case getConsOfStatus cs of None -> [] cStat -> [unode "ConsStatus" $ show cStat]
100
false
true
0
10
25
55
27
28
null
null
garetxe/cabal
Cabal/tests/PackageTests/PackageTester.hs
bsd-3-clause
run :: Maybe FilePath -> String -> [String] -> TestM Result run mb_cwd path args = do verbosity <- getVerbosity (_, test) <- ask r <- liftIO $ rawRun verbosity mb_cwd path (testEnvironment test) args record r requireSuccess r
245
run :: Maybe FilePath -> String -> [String] -> TestM Result run mb_cwd path args = do verbosity <- getVerbosity (_, test) <- ask r <- liftIO $ rawRun verbosity mb_cwd path (testEnvironment test) args record r requireSuccess r
245
run mb_cwd path args = do verbosity <- getVerbosity (_, test) <- ask r <- liftIO $ rawRun verbosity mb_cwd path (testEnvironment test) args record r requireSuccess r
185
false
true
0
12
58
104
47
57
null
null
Oblosys/webviews
src/exec/WebForms/Main.hs
mit
medSkip = vSkip 30
18
medSkip = vSkip 30
18
medSkip = vSkip 30
18
false
false
1
5
3
12
4
8
null
null
kawamuray/ganeti
src/Ganeti/HTools/Program/Hcheck.hs
gpl-2.0
keysData ClusterLvl = map fst clusterData
42
keysData ClusterLvl = map fst clusterData
42
keysData ClusterLvl = map fst clusterData
42
false
false
0
5
6
14
6
8
null
null
nhibberd/dashboardh
src/Dashboardh.hs
bsd-3-clause
dash :: ScottyM () dash = do get "/" $ do file "src/web/index.html" -- High level get "/status/" $ do jobs <- liftIO $ getJenkins getJobs returnResult jobs -- Views get "/status/view/:name" $ do view <- param "name" jobs <- liftIO . getJenkins ...
1,033
dash :: ScottyM () dash = do get "/" $ do file "src/web/index.html" -- High level get "/status/" $ do jobs <- liftIO $ getJenkins getJobs returnResult jobs -- Views get "/status/view/:name" $ do view <- param "name" jobs <- liftIO . getJenkins ...
1,033
dash = do get "/" $ do file "src/web/index.html" -- High level get "/status/" $ do jobs <- liftIO $ getJenkins getJobs returnResult jobs -- Views get "/status/view/:name" $ do view <- param "name" jobs <- liftIO . getJenkins $ getViewJobs view ...
1,014
false
true
0
14
358
319
140
179
null
null
vasily-kartashov/playground
euler/problem-068.hs
apache-2.0
halve as = let l = length as `div` 2 in (take l as, drop l as)
62
halve as = let l = length as `div` 2 in (take l as, drop l as)
62
halve as = let l = length as `div` 2 in (take l as, drop l as)
62
false
false
0
10
16
45
22
23
null
null
andorp/bead
src/Bead/View/Translation/Base.hs
bsd-3-clause
t :: Int -> a -> Translation a t = curry T
42
t :: Int -> a -> Translation a t = curry T
42
t = curry T
11
false
true
0
8
11
30
13
17
null
null
hbrouwer/pdrt-sandbox
src/Data/DRS/Translate.hs
apache-2.0
drsToFOL :: DRS -> F.FOLForm --drsToFOL d = drsToMFOL d worldVar drsToFOL d = drsToMFOL d' worldVar where d' = drsAlphaConvert d (zip ors nrs) ors = drsVariables d `intersect` [DRSRef worldVar] nrs = newDRSRefs ors (drsVariables d `union` [DRSRef worldVar]) -----------------------------------------...
645
drsToFOL :: DRS -> F.FOLForm drsToFOL d = drsToMFOL d' worldVar where d' = drsAlphaConvert d (zip ors nrs) ors = drsVariables d `intersect` [DRSRef worldVar] nrs = newDRSRefs ors (drsVariables d `union` [DRSRef worldVar]) --------------------------------------------------------------------------- -...
609
drsToFOL d = drsToMFOL d' worldVar where d' = drsAlphaConvert d (zip ors nrs) ors = drsVariables d `intersect` [DRSRef worldVar] nrs = newDRSRefs ors (drsVariables d `union` [DRSRef worldVar]) --------------------------------------------------------------------------- -- * Private -----------------...
580
true
true
2
10
80
103
56
47
null
null
nushio3/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
absIntegerIdKey = mkPreludeMiscIdUnique 72
56
absIntegerIdKey = mkPreludeMiscIdUnique 72
56
absIntegerIdKey = mkPreludeMiscIdUnique 72
56
false
false
0
5
17
9
4
5
null
null
jbracker/supermonad-plugin
examples/monad/hmtc/original/PPTAMCode.hs
bsd-3-clause
ppOA oc args = spcs cwLbl . leftJust cwOpCode oc . leftJust cwArgs args
71
ppOA oc args = spcs cwLbl . leftJust cwOpCode oc . leftJust cwArgs args
71
ppOA oc args = spcs cwLbl . leftJust cwOpCode oc . leftJust cwArgs args
71
false
false
0
7
13
32
14
18
null
null
kmcallister/hdis86
Hdis86/IO.hs
bsd-3-clause
run :: UD -> IO a -> IO [a] run = runImpl id
44
run :: UD -> IO a -> IO [a] run = runImpl id
44
run = runImpl id
16
false
true
0
9
12
37
16
21
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/CARET_1.hs
mit
primMinusNatS :: Nat -> Nat -> Nat; primMinusNatS (Succ x) (Succ y) = primMinusNatS x y
91
primMinusNatS :: Nat -> Nat -> Nat primMinusNatS (Succ x) (Succ y) = primMinusNatS x y
90
primMinusNatS (Succ x) (Succ y) = primMinusNatS x y
51
false
true
0
7
19
42
21
21
null
null
bibaijin/cis194
src/Spring13/Week10/AParser.hs
bsd-3-clause
{- For example: *Parser> runParser (satisfy isUpper) "ABC" Just ('A',"BC") *Parser> runParser (satisfy isUpper) "abc" Nothing *Parser> runParser (char 'x') "xyz" Just ('x',"yz") -} -- For convenience, we've also provided a parser for positive -- integers. posInt :: Parser Integer posInt = Parser f where f xs ...
580
posInt :: Parser Integer posInt = Parser f where f xs | null ns = Nothing | otherwise = Just (read ns, rest) where (ns, rest) = span isDigit xs ------------------------------------------------------------ -- Your code goes below here -----------------------------------------------------------...
321
posInt = Parser f where f xs | null ns = Nothing | otherwise = Just (read ns, rest) where (ns, rest) = span isDigit xs ------------------------------------------------------------ -- Your code goes below here ------------------------------------------------------------
296
true
true
0
8
103
83
42
41
null
null
alexeyzab/cards-with-comrades
backend/src/Helpers/Fixtures.hs
gpl-3.0
makeDeckCards :: [Key Card] -> Key Deck -> DB [Entity DeckCard] makeDeckCards xs d = traverse (makeDeckCard d) xs
113
makeDeckCards :: [Key Card] -> Key Deck -> DB [Entity DeckCard] makeDeckCards xs d = traverse (makeDeckCard d) xs
113
makeDeckCards xs d = traverse (makeDeckCard d) xs
49
false
true
0
9
18
53
25
28
null
null
bravit/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
addAlist :: [(Name, a)] -> Ctxt a -> Ctxt a addAlist [] ctxt = ctxt
67
addAlist :: [(Name, a)] -> Ctxt a -> Ctxt a addAlist [] ctxt = ctxt
67
addAlist [] ctxt = ctxt
23
false
true
0
7
14
46
22
24
null
null
freevoid/rwh-exercises
ch04/asciitranspose.hs
mit
asciiTranspose :: [String] -> [String] asciiTranspose css | null css = [] | any null css = [] | otherwise = (map head css):(asciiTranspose (map tail css))
166
asciiTranspose :: [String] -> [String] asciiTranspose css | null css = [] | any null css = [] | otherwise = (map head css):(asciiTranspose (map tail css))
166
asciiTranspose css | null css = [] | any null css = [] | otherwise = (map head css):(asciiTranspose (map tail css))
127
false
true
2
10
38
83
41
42
null
null
MarcosPividori/GSoC-Communicating-with-mobile-devices
push-notify/Network/PushNotify/Gcm/Send.hs
mit
-- | 'sendGCM' sends the message to a GCM Server. sendGCM :: Manager -> GCMHttpConfig -> GCMmessage -> IO GCMresult sendGCM manager cnfg msg = runResourceT $ do req' <- liftIO $ parseUrl $ unpack cPOST_URL let value = toJSON msg valueBS = encode value req = req' { method = "POS...
733
sendGCM :: Manager -> GCMHttpConfig -> GCMmessage -> IO GCMresult sendGCM manager cnfg msg = runResourceT $ do req' <- liftIO $ parseUrl $ unpack cPOST_URL let value = toJSON msg valueBS = encode value req = req' { method = "POST" , requestBody = RequestBodyLBS va...
683
sendGCM manager cnfg msg = runResourceT $ do req' <- liftIO $ parseUrl $ unpack cPOST_URL let value = toJSON msg valueBS = encode value req = req' { method = "POST" , requestBody = RequestBodyLBS valueBS , requestHeaders = [ ...
617
true
true
0
19
259
165
85
80
null
null
jdeisenberg/rwh_commentary
chapter03_files/prerequisites.hs
mit
pAuto181B = All [Single auto102, Single auto181a]
49
pAuto181B = All [Single auto102, Single auto181a]
49
pAuto181B = All [Single auto102, Single auto181a]
49
false
false
1
6
6
24
10
14
null
null
xyzzyz/fastirc
Network/FastIRC/Session.hs
bsd-3-clause
runBot :: Params -> Config -> Bot () -> IO () runBot params cfg = fmap fst . flip runReaderT params . flip runStateT cfg . flip runContT return
151
runBot :: Params -> Config -> Bot () -> IO () runBot params cfg = fmap fst . flip runReaderT params . flip runStateT cfg . flip runContT return
151
runBot params cfg = fmap fst . flip runReaderT params . flip runStateT cfg . flip runContT return
105
false
true
1
9
36
76
32
44
null
null
brendanhay/gogol
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Predict.hs
mpl-2.0
-- | Required. The resource name of a model or a version. Authorization: -- requires the \`predict\` permission on the specified resource. ppName :: Lens' ProjectsPredict Text ppName = lens _ppName (\ s a -> s{_ppName = a})
223
ppName :: Lens' ProjectsPredict Text ppName = lens _ppName (\ s a -> s{_ppName = a})
84
ppName = lens _ppName (\ s a -> s{_ppName = a})
47
true
true
0
9
37
41
23
18
null
null
abailly/hevents
test/Hevents/Eff/Demo.hs
mit
storeEvent :: Either ErCounter ECounter -> EventSourced Counter Int storeEvent = either (throwExc . fromModelError) (either (throwExc . fromDBError) (const $ counter <$> getState) <=< store) where fromModelError e = err400 { errBody = BS.toLazyByteString $ BS.stringUtf8 $ "Invalid command " ++ sh...
430
storeEvent :: Either ErCounter ECounter -> EventSourced Counter Int storeEvent = either (throwExc . fromModelError) (either (throwExc . fromDBError) (const $ counter <$> getState) <=< store) where fromModelError e = err400 { errBody = BS.toLazyByteString $ BS.stringUtf8 $ "Invalid command " ++ sh...
430
storeEvent = either (throwExc . fromModelError) (either (throwExc . fromDBError) (const $ counter <$> getState) <=< store) where fromModelError e = err400 { errBody = BS.toLazyByteString $ BS.stringUtf8 $ "Invalid command " ++ show e } fromDBError e = err500 { errBody = BS.toLazyByteString $ BS.stringU...
349
false
true
0
10
92
141
71
70
null
null
ryanoneill/yorgey-haskell
Week03/Golf.hs
mit
skips :: [a] -> [[a]] skips = map skipper . init . tails . zip [1..]
68
skips :: [a] -> [[a]] skips = map skipper . init . tails . zip [1..]
68
skips = map skipper . init . tails . zip [1..]
46
false
true
0
8
15
45
24
21
null
null
impega/chip8
src/VirtualMachine.hs
unlicense
opCodeSem (Op8XY0 vx vy) = setRgst vx =<< getRgst vy
52
opCodeSem (Op8XY0 vx vy) = setRgst vx =<< getRgst vy
52
opCodeSem (Op8XY0 vx vy) = setRgst vx =<< getRgst vy
52
false
false
0
6
9
28
12
16
null
null
getyourguide/fbthrift
thrift/lib/hs/Thrift/Protocol/SimpleJSON.hs
apache-2.0
buildJSONMap :: [(ThriftVal, ThriftVal)] -> Builder buildJSONMap = mconcat . intersperse "," . map buildKV where buildKV (key@(TString _), val) = buildJSONValue key <> ":" <> buildJSONValue val buildKV (key, val) = "\"" <> buildJSONValue key <> "\":" <> buildJSONValue val
294
buildJSONMap :: [(ThriftVal, ThriftVal)] -> Builder buildJSONMap = mconcat . intersperse "," . map buildKV where buildKV (key@(TString _), val) = buildJSONValue key <> ":" <> buildJSONValue val buildKV (key, val) = "\"" <> buildJSONValue key <> "\":" <> buildJSONValue val
294
buildJSONMap = mconcat . intersperse "," . map buildKV where buildKV (key@(TString _), val) = buildJSONValue key <> ":" <> buildJSONValue val buildKV (key, val) = "\"" <> buildJSONValue key <> "\":" <> buildJSONValue val
242
false
true
5
8
62
121
57
64
null
null
NemoNessuno/SuperAwesomePictureChatOfDoom
KVStore.hs
gpl-2.0
main = withSocketsDo $ do port <- maybe defaultPort read <$> listToMaybe <$> getArgs socket <- listenOn (PortNumber (fromIntegral port)) storeVar <- atomically $ newTVar (Map.empty :: Map Text Text) control <- newChan forkIO $ dispatcher control [] storeVar forever $ do ...
439
main = withSocketsDo $ do port <- maybe defaultPort read <$> listToMaybe <$> getArgs socket <- listenOn (PortNumber (fromIntegral port)) storeVar <- atomically $ newTVar (Map.empty :: Map Text Text) control <- newChan forkIO $ dispatcher control [] storeVar forever $ do ...
439
main = withSocketsDo $ do port <- maybe defaultPort read <$> listToMaybe <$> getArgs socket <- listenOn (PortNumber (fromIntegral port)) storeVar <- atomically $ newTVar (Map.empty :: Map Text Text) control <- newChan forkIO $ dispatcher control [] storeVar forever $ do ...
439
false
false
1
14
122
153
67
86
null
null
neerajrao/scalable-bloom-filter-haskell
src/MutableBloomFilter.hs
mit
elem' :: MutableBloom s a -> [Word32] -> ST s Bool elem' filt indicesToCheck = liftM and (mapM (readArray (mutBitArray filt)) indicesToCheck)
141
elem' :: MutableBloom s a -> [Word32] -> ST s Bool elem' filt indicesToCheck = liftM and (mapM (readArray (mutBitArray filt)) indicesToCheck)
141
elem' filt indicesToCheck = liftM and (mapM (readArray (mutBitArray filt)) indicesToCheck)
90
false
true
0
11
21
62
30
32
null
null
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/ElasticLoadBalancingV2ListenerRuleRedirectConfig.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-redirectconfig.html#cfn-elasticloadbalancingv2-listenerrule-redirectconfig-port elbvlrrcPort :: Lens' ElasticLoadBalancingV2ListenerRuleRedirectConfig (Maybe (Val Text)) elbvlrrcPort = lens _elasticLoad...
435
elbvlrrcPort :: Lens' ElasticLoadBalancingV2ListenerRuleRedirectConfig (Maybe (Val Text)) elbvlrrcPort = lens _elasticLoadBalancingV2ListenerRuleRedirectConfigPort (\s a -> s { _elasticLoadBalancingV2ListenerRuleRedirectConfigPort = a })
237
elbvlrrcPort = lens _elasticLoadBalancingV2ListenerRuleRedirectConfigPort (\s a -> s { _elasticLoadBalancingV2ListenerRuleRedirectConfigPort = a })
147
true
true
0
9
22
52
28
24
null
null
tomahawkins/trs
Examples/FIFO.hs
bsd-3-clause
-- ??? mkFIFO :: Width -> Depth -> System FIFO mkFIFO w d = do -- ??? return $ FIFO w
90
mkFIFO :: Width -> Depth -> System FIFO mkFIFO w d = do -- ??? return $ FIFO w
82
mkFIFO w d = do -- ??? return $ FIFO w
42
true
true
0
8
25
39
19
20
null
null
dreamcodez/bonedewd
src/BoneDewd/RxPacket.hs
bsd-3-clause
parseApp 0x5D raw = runGet getter (strict2lazy raw) where getter = do skip 5 n <- getFixedStringNul 30 -- char name skip 2 f <- getWord32be skip 4 c <- getWord32be skip 16 s <- getWord32be ...
427
parseApp 0x5D raw = runGet getter (strict2lazy raw) where getter = do skip 5 n <- getFixedStringNul 30 -- char name skip 2 f <- getWord32be skip 4 c <- getWord32be skip 16 s <- getWord32be ...
427
parseApp 0x5D raw = runGet getter (strict2lazy raw) where getter = do skip 5 n <- getFixedStringNul 30 -- char name skip 2 f <- getWord32be skip 4 c <- getWord32be skip 16 s <- getWord32be ...
427
false
false
0
12
198
117
51
66
null
null
gridaphobe/ghc
compiler/deSugar/Coverage.hs
bsd-3-clause
addTickArithSeqInfo (FromThenTo e1 e2 e3) = liftM3 FromThenTo (addTickLHsExpr e1) (addTickLHsExpr e2) (addTickLHsExpr e3)
177
addTickArithSeqInfo (FromThenTo e1 e2 e3) = liftM3 FromThenTo (addTickLHsExpr e1) (addTickLHsExpr e2) (addTickLHsExpr e3)
177
addTickArithSeqInfo (FromThenTo e1 e2 e3) = liftM3 FromThenTo (addTickLHsExpr e1) (addTickLHsExpr e2) (addTickLHsExpr e3)
177
false
false
0
7
69
46
22
24
null
null
heyduck/pfds
src/Pfds/Ch02/Ex.hs
gpl-3.0
insert2 x (Node left a right) | x < a = liftM (\t -> Node t a right) (insert2 x left) | x > a = liftM (\t -> Node left a t) (insert2 x right) | otherwise = fail "insert2: already exists"
201
insert2 x (Node left a right) | x < a = liftM (\t -> Node t a right) (insert2 x left) | x > a = liftM (\t -> Node left a t) (insert2 x right) | otherwise = fail "insert2: already exists"
201
insert2 x (Node left a right) | x < a = liftM (\t -> Node t a right) (insert2 x left) | x > a = liftM (\t -> Node left a t) (insert2 x right) | otherwise = fail "insert2: already exists"
201
false
false
2
9
57
110
53
57
null
null
nadavshemer/buildsome
src/Main.hs
gpl-2.0
traverseRequested :: Applicative f => (TargetsRequest -> f TargetsRequest) -> Requested -> f Requested traverseRequested _ RequestedClean = pure RequestedClean
161
traverseRequested :: Applicative f => (TargetsRequest -> f TargetsRequest) -> Requested -> f Requested traverseRequested _ RequestedClean = pure RequestedClean
161
traverseRequested _ RequestedClean = pure RequestedClean
56
false
true
0
9
21
47
22
25
null
null
atupal/oj
hackerrank/practices/function_programming/recursion/string_compression.hs
mit
compress (x:ss) pre cnt ans | x/=pre = compress ss x 1 (if cnt==1 then (pre:ans) else (reverse . show $ cnt) ++ (pre:ans)) | otherwise = compress ss pre (cnt+1) ans
168
compress (x:ss) pre cnt ans | x/=pre = compress ss x 1 (if cnt==1 then (pre:ans) else (reverse . show $ cnt) ++ (pre:ans)) | otherwise = compress ss pre (cnt+1) ans
168
compress (x:ss) pre cnt ans | x/=pre = compress ss x 1 (if cnt==1 then (pre:ans) else (reverse . show $ cnt) ++ (pre:ans)) | otherwise = compress ss pre (cnt+1) ans
168
false
false
1
12
35
108
56
52
null
null
keera-studios/hsQt
extra-pkgs/Glome/Qt/Glome/Vec.hs
bsd-2-clause
fabs :: Flt -> Flt fabs !a = if a < 0 then (-a) else a
56
fabs :: Flt -> Flt fabs !a = if a < 0 then (-a) else a
56
fabs !a = if a < 0 then (-a) else a
37
false
true
0
7
17
40
20
20
null
null
dterei/Scraps
haskell/lenses/Types.hs
bsd-3-clause
lview :: Lens s t a b -> s -> a lview l s = getConst $ l Const s
64
lview :: Lens s t a b -> s -> a lview l s = getConst $ l Const s
64
lview l s = getConst $ l Const s
32
false
true
0
8
19
47
21
26
null
null
urbanslug/ghc
utils/testremove/checkremove.hs
bsd-3-clause
simulateClean t (CleanRec fp) = at t fp markSubtreeDeleted
59
simulateClean t (CleanRec fp) = at t fp markSubtreeDeleted
59
simulateClean t (CleanRec fp) = at t fp markSubtreeDeleted
59
false
false
0
6
9
28
11
17
null
null
tel/saltine
bench/SignBench.hs
mit
signEnv :: IO Keypair signEnv = newKeypair
42
signEnv :: IO Keypair signEnv = newKeypair
42
signEnv = newKeypair
20
false
true
0
5
6
14
7
7
null
null
masaedw/PuddingX
src/Pudding/Parse.hs
bsd-3-clause
-- | string paresr -- -- >>> parseOnly pString . pack $ show "" -- Right "" -- >>> parseOnly pString . pack $ show "abc" -- Right "abc" -- >>> parseOnly pString . pack $ show "'" -- Right "'" -- >>> parseOnly pString "\"\\\"\\\\\\0\\a\\b\\f\\n\\r\\t\"" -- Right "\"\\\NUL\a\b\f\n\r\t" pString :: Parser ByteString pStrin...
384
pString :: Parser ByteString pString = char '"' *> (pack <$> many' (pEscape <|> pChar)) <* char '"'
99
pString = char '"' *> (pack <$> many' (pEscape <|> pChar)) <* char '"'
70
true
true
0
11
66
55
32
23
null
null
rueshyna/gogol
gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs
mpl-2.0
-- | A list of comment threads that match the request criteria. ctlrItems :: Lens' CommentThreadListResponse [CommentThread] ctlrItems = lens _ctlrItems (\ s a -> s{_ctlrItems = a}) . _Default . _Coerce
216
ctlrItems :: Lens' CommentThreadListResponse [CommentThread] ctlrItems = lens _ctlrItems (\ s a -> s{_ctlrItems = a}) . _Default . _Coerce
152
ctlrItems = lens _ctlrItems (\ s a -> s{_ctlrItems = a}) . _Default . _Coerce
91
true
true
0
11
45
53
28
25
null
null
jberryman/proxy-kindness
Data/Proxy/Kindness.hs
bsd-3-clause
unappliedOf :: (Unapplied (Proxy tab) t)=> tab -> Proxy t unappliedOf = unapplied . proxyOf
91
unappliedOf :: (Unapplied (Proxy tab) t)=> tab -> Proxy t unappliedOf = unapplied . proxyOf
91
unappliedOf = unapplied . proxyOf
33
false
true
0
8
14
39
20
19
null
null
erantapaa/haskell-platform
hptool/src/Templates.hs
bsd-3-clause
releaseContext :: Action (MuContext Action) releaseContext = askHpRelease >>= return . expandRelease
100
releaseContext :: Action (MuContext Action) releaseContext = askHpRelease >>= return . expandRelease
100
releaseContext = askHpRelease >>= return . expandRelease
56
false
true
0
7
11
28
14
14
null
null
NCrashed/sinister
src/client/Graphics/Texture/Atlas.hs
mit
renderAtlasTexture :: Vec2 Int -> [(SomeTexture, SubtexPlace)] -> AtlasShape -> IO (Texture2D RGBAFormat) renderAtlasTexture (esx:.esy:.()) texs shape@(shx:.shy:.()) = cacheTexture atlasSize $ blitTextures atlasSize $ second (getPlaceRegion shape) <$> texs where atlasSize = (esx*shx):.(esy*shy):.() -- | If tex...
456
renderAtlasTexture :: Vec2 Int -> [(SomeTexture, SubtexPlace)] -> AtlasShape -> IO (Texture2D RGBAFormat) renderAtlasTexture (esx:.esy:.()) texs shape@(shx:.shy:.()) = cacheTexture atlasSize $ blitTextures atlasSize $ second (getPlaceRegion shape) <$> texs where atlasSize = (esx*shx):.(esy*shy):.() -- | If tex...
456
renderAtlasTexture (esx:.esy:.()) texs shape@(shx:.shy:.()) = cacheTexture atlasSize $ blitTextures atlasSize $ second (getPlaceRegion shape) <$> texs where atlasSize = (esx*shx):.(esy*shy):.() -- | If texture is located in the atlas then returns texture region. -- Resulting vector consists of origin coord...
350
false
true
0
10
68
141
73
68
null
null
massysett/dapi
dapi.hs
bsd-3-clause
millenniumList :: BaseOne -> T.Day -> [T.Day] millenniumList = baseTenRange 3
77
millenniumList :: BaseOne -> T.Day -> [T.Day] millenniumList = baseTenRange 3
77
millenniumList = baseTenRange 3
31
false
true
0
10
10
35
16
19
null
null
emwap/feldspar-compiler-shim
src/Feldspar/Compiler/FromImperative.hs
bsd-3-clause
translateTypeRep :: MonadC m => TypeRep a -> m C.Type translateTypeRep trep = compileType $ FromCore.compileType defaultOptions $ untypeType trep (defaultSize trep)
208
translateTypeRep :: MonadC m => TypeRep a -> m C.Type translateTypeRep trep = compileType $ FromCore.compileType defaultOptions $ untypeType trep (defaultSize trep)
208
translateTypeRep trep = compileType $ FromCore.compileType defaultOptions $ untypeType trep (defaultSize trep)
154
false
true
4
9
65
63
27
36
null
null
hvr/jhc
regress/tests/1_typecheck/2_pass/ghc/tc089.hs
mit
fac_rec fac0 n a = (absIf (absAnd (s_3_0 n) one) (s_2_0 a) (fac0 (absAnd (s_3_2 n) one) (absAnd (s_3_1 n) (s_2_1 a))))
145
fac_rec fac0 n a = (absIf (absAnd (s_3_0 n) one) (s_2_0 a) (fac0 (absAnd (s_3_2 n) one) (absAnd (s_3_1 n) (s_2_1 a))))
145
fac_rec fac0 n a = (absIf (absAnd (s_3_0 n) one) (s_2_0 a) (fac0 (absAnd (s_3_2 n) one) (absAnd (s_3_1 n) (s_2_1 a))))
145
false
false
0
12
48
85
42
43
null
null
VictorDenisov/jdi
src/Language/Java/Jdi/Impl.hs
gpl-2.0
-- | Determines if the target VM supports popping frames of a threads stack. canPopFrames :: MonadIO m => VirtualMachine m Bool canPopFrames = J.canPopFrames `liftM` getCapabilities
181
canPopFrames :: MonadIO m => VirtualMachine m Bool canPopFrames = J.canPopFrames `liftM` getCapabilities
104
canPopFrames = J.canPopFrames `liftM` getCapabilities
53
true
true
0
7
26
38
18
20
null
null
KommuSoft/dep-software
Dep.Printing.Schematics.hs
gpl-3.0
stackTranspose ([]:xs) = stackTranspose xs
42
stackTranspose ([]:xs) = stackTranspose xs
42
stackTranspose ([]:xs) = stackTranspose xs
42
false
false
0
8
4
21
10
11
null
null
olorin/amazonka
amazonka-iam/gen/Network/AWS/IAM/ListAttachedRolePolicies.hs
mpl-2.0
-- | A flag that indicates whether there are more items to return. If your -- results were truncated, you can make a subsequent pagination request -- using the 'Marker' request parameter to retrieve more items. Note that -- IAM might return fewer than the 'MaxItems' number of results even when -- there are more results...
598
larprsIsTruncated :: Lens' ListAttachedRolePoliciesResponse (Maybe Bool) larprsIsTruncated = lens _larprsIsTruncated (\ s a -> s{_larprsIsTruncated = a})
153
larprsIsTruncated = lens _larprsIsTruncated (\ s a -> s{_larprsIsTruncated = a})
80
true
true
1
9
93
58
31
27
null
null
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Client/UI/HandleHumanM.hs
bsd-3-clause
addLeader :: Monad m => (ActorId -> m ()) -> CmdLeaderNeed m addLeader cmdCli = CmdLeader $ \leader -> cmdCli leader >> return (Left Nothing)
143
addLeader :: Monad m => (ActorId -> m ()) -> CmdLeaderNeed m addLeader cmdCli = CmdLeader $ \leader -> cmdCli leader >> return (Left Nothing)
143
addLeader cmdCli = CmdLeader $ \leader -> cmdCli leader >> return (Left Nothing)
82
false
true
2
11
26
70
32
38
null
null
Cahu/krpc-hs
src/KRPCHS/SpaceCenter.hs
gpl-3.0
getPartsReactionWheelsStream :: KRPCHS.SpaceCenter.Parts -> RPCContext (KRPCStream ([KRPCHS.SpaceCenter.ReactionWheel])) getPartsReactionWheelsStream thisArg = requestStream $ getPartsReactionWheelsStreamReq thisArg
215
getPartsReactionWheelsStream :: KRPCHS.SpaceCenter.Parts -> RPCContext (KRPCStream ([KRPCHS.SpaceCenter.ReactionWheel])) getPartsReactionWheelsStream thisArg = requestStream $ getPartsReactionWheelsStreamReq thisArg
215
getPartsReactionWheelsStream thisArg = requestStream $ getPartsReactionWheelsStreamReq thisArg
94
false
true
0
11
13
49
25
24
null
null
kajigor/uKanren_transformations
app/console/ConsPDApp.hs
bsd-3-clause
runMaxlen = do runConsPD (-1) "maxlen" maxLen
49
runMaxlen = do runConsPD (-1) "maxlen" maxLen
49
runMaxlen = do runConsPD (-1) "maxlen" maxLen
49
false
false
1
10
10
25
10
15
null
null
Gleuton/curso-haskell
sort.hs
gpl-3.0
get_smaller :: [Int] -> Int get_smaller [x] = x
47
get_smaller :: [Int] -> Int get_smaller [x] = x
47
get_smaller [x] = x
19
false
true
0
6
8
28
14
14
null
null
Ertruby/PPFinalProject
src/Checker.hs
gpl-2.0
makeTupleTaskH (ASTNode Args kids:ts) tuple = makeTupleTaskH ts (makeTupleTaskH kids tuple)
91
makeTupleTaskH (ASTNode Args kids:ts) tuple = makeTupleTaskH ts (makeTupleTaskH kids tuple)
91
makeTupleTaskH (ASTNode Args kids:ts) tuple = makeTupleTaskH ts (makeTupleTaskH kids tuple)
91
false
false
0
8
10
36
17
19
null
null
beni55/markdown
Text/Markdown/Inline.hs
bsd-3-clause
(<>) :: Monoid m => m -> m -> m (<>) = mappend
46
(<>) :: Monoid m => m -> m -> m (<>) = mappend
46
(<>) = mappend
14
false
true
0
7
12
30
17
13
null
null
zenhack/haskell-capnp
examples/lib/Examples/Serialization/HighLevel/Read.hs
mit
main :: IO () main = do value <- getParsed @AddressBook defaultLimit print value
88
main :: IO () main = do value <- getParsed @AddressBook defaultLimit print value
88
main = do value <- getParsed @AddressBook defaultLimit print value
74
false
true
0
9
21
36
16
20
null
null
GaloisInc/galua
galua-dbg/src/Galua/Debugger/View.hs
mit
exportFunctionValue :: Chunks -> Int -> FunctionValue -> [ JS.Pair ] exportFunctionValue funs pc fun = case funValueName fun of CFID CFunName { cfunName } -> exportCObjInfo cfunName LuaFID fid -> let vn = Map.lookup fid (allFunNames funs) in [ "type" .= str "Lua" , "name" .= (renderVi...
466
exportFunctionValue :: Chunks -> Int -> FunctionValue -> [ JS.Pair ] exportFunctionValue funs pc fun = case funValueName fun of CFID CFunName { cfunName } -> exportCObjInfo cfunName LuaFID fid -> let vn = Map.lookup fid (allFunNames funs) in [ "type" .= str "Lua" , "name" .= (renderVi...
466
exportFunctionValue funs pc fun = case funValueName fun of CFID CFunName { cfunName } -> exportCObjInfo cfunName LuaFID fid -> let vn = Map.lookup fid (allFunNames funs) in [ "type" .= str "Lua" , "name" .= (renderVisName <$> vn) , "file" .= join (funVisFile <$> vn) , "pc"...
397
false
true
2
10
138
159
82
77
null
null
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Healthcare/Types/Product.hs
mpl-2.0
-- | The BigQuery output destination. The Cloud Healthcare Service Agent -- requires two IAM roles on the BigQuery location: -- \`roles\/bigquery.dataEditor\` and \`roles\/bigquery.jobUser\`. The -- output is one BigQuery table per resource type. Unlike when setting -- \`BigQueryDestination\` for \`StreamConfig\`, \`Ex...
584
errBigQueryDestination :: Lens' ExportResourcesRequest (Maybe GoogleCloudHealthcareV1FhirBigQueryDestination) errBigQueryDestination = lens _errBigQueryDestination (\ s a -> s{_errBigQueryDestination = a})
213
errBigQueryDestination = lens _errBigQueryDestination (\ s a -> s{_errBigQueryDestination = a})
103
true
true
1
9
72
57
30
27
null
null
robdockins/edison
edison-core/src/Data/Edison/Coll/StandardSet.hs
mit
minElem = DS.findMin
31
minElem = DS.findMin
31
minElem = DS.findMin
31
false
false
0
5
13
8
4
4
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/ExtensionPredicates.hs
bsd-3-clause
-- | Is the <https://www.opengl.org/registry/specs/NV/draw_texture.txt NV_draw_texture> extension supported? -- Note that in the presence of multiple contexts with different capabilities, -- this might be wrong. Use 'glGetNVDrawTexture' in those cases instead. gl_NV_draw_texture :: Bool gl_NV_draw_texture = member "GL_...
347
gl_NV_draw_texture :: Bool gl_NV_draw_texture = member "GL_NV_draw_texture" extensions
86
gl_NV_draw_texture = member "GL_NV_draw_texture" extensions
59
true
true
0
5
38
19
11
8
null
null
dmbarbour/Sirea
src/Sirea/Internal/B0Impl.hs
bsd-3-clause
forceDelayB0 :: (Monad m) => B0 m x x forceDelayB0 = tshiftB0 (lc_map toGoal) where toGoal lc = lc { lc_dtCurr = (lc_dtGoal lc) } -- | keepAliveB will keep the first element alive so long as other -- parts of the signal are alive. (used by unsafeOnUpdateBLN)
263
forceDelayB0 :: (Monad m) => B0 m x x forceDelayB0 = tshiftB0 (lc_map toGoal) where toGoal lc = lc { lc_dtCurr = (lc_dtGoal lc) } -- | keepAliveB will keep the first element alive so long as other -- parts of the signal are alive. (used by unsafeOnUpdateBLN)
263
forceDelayB0 = tshiftB0 (lc_map toGoal) where toGoal lc = lc { lc_dtCurr = (lc_dtGoal lc) } -- | keepAliveB will keep the first element alive so long as other -- parts of the signal are alive. (used by unsafeOnUpdateBLN)
225
false
true
0
8
52
62
33
29
null
null
xenog/haskoin
src/Network/Haskoin/Script/Evaluator.hs
unlicense
maxScriptSize :: Int maxScriptSize = 10000
42
maxScriptSize :: Int maxScriptSize = 10000
42
maxScriptSize = 10000
21
false
true
0
6
5
18
7
11
null
null
facebookincubator/duckling
Duckling/Time/BG/Rules.hs
bsd-3-clause
ruleSeason :: Rule ruleSeason = Rule { name = "last|this|next <season>" , pattern = [ regex "(това|тази|(по\\-)?(по\\-)?((настоящ|следващ|друг|последн|минал|предн)(ото|ата))) seasons?" ] , prod = \case (Token RegexMatch (GroupMatch (match:_)):_) -> do n <- case Text.toLower match of ...
1,780
ruleSeason :: Rule ruleSeason = Rule { name = "last|this|next <season>" , pattern = [ regex "(това|тази|(по\\-)?(по\\-)?((настоящ|следващ|друг|последн|минал|предн)(ото|ата))) seasons?" ] , prod = \case (Token RegexMatch (GroupMatch (match:_)):_) -> do n <- case Text.toLower match of ...
1,780
ruleSeason = Rule { name = "last|this|next <season>" , pattern = [ regex "(това|тази|(по\\-)?(по\\-)?((настоящ|следващ|друг|последн|минал|предн)(ото|ата))) seasons?" ] , prod = \case (Token RegexMatch (GroupMatch (match:_)):_) -> do n <- case Text.toLower match of "това" -> Ju...
1,761
false
true
0
19
752
512
249
263
null
null
jstolarek/slicer
lib/Language/Slicer/Parser.hs
gpl-3.0
snd_ :: Parser Exp snd_ = do e <- keyword strSnd >> exp return (Snd e)
76
snd_ :: Parser Exp snd_ = do e <- keyword strSnd >> exp return (Snd e)
76
snd_ = do e <- keyword strSnd >> exp return (Snd e)
57
false
true
0
10
21
46
19
27
null
null
input-output-hk/pos-haskell-prototype
binary/src/Pos/Binary/Class/Core.hs
mit
genericDecode :: (Generic a, GSerialiseDecode (G.Rep a)) => D.Decoder s a genericDecode = G.to <$> gdecode
106
genericDecode :: (Generic a, GSerialiseDecode (G.Rep a)) => D.Decoder s a genericDecode = G.to <$> gdecode
106
genericDecode = G.to <$> gdecode
32
false
true
0
9
15
47
24
23
null
null
yiannist/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
fdBlktap2 :: String fdBlktap2 = Types.fileDriverToRaw FileBlktap2
65
fdBlktap2 :: String fdBlktap2 = Types.fileDriverToRaw FileBlktap2
65
fdBlktap2 = Types.fileDriverToRaw FileBlktap2
45
false
true
0
6
6
16
8
8
null
null
sdiehl/ghc
compiler/llvmGen/LlvmCodeGen/Base.hs
bsd-3-clause
-- | Gets metadata node for given unique getUniqMeta :: Unique -> LlvmM (Maybe MetaId) getUniqMeta s = getEnv (flip lookupUFM s . envUniqMeta)
142
getUniqMeta :: Unique -> LlvmM (Maybe MetaId) getUniqMeta s = getEnv (flip lookupUFM s . envUniqMeta)
101
getUniqMeta s = getEnv (flip lookupUFM s . envUniqMeta)
55
true
true
0
9
23
47
22
25
null
null
sukwon0709/z3-haskell
examples/Example/Monad/Tuple.hs
bsd-3-clause
script :: Z3 String script = do -- newtype Tup = Tup { arg1 :: Int, arg2 :: Int } intSort <- mkIntSort tupSym <- mkStringSymbol "Tup" arg1Sym <- mkStringSymbol "arg1" arg2Sym <- mkStringSymbol "arg2" (tupSort, _constr, [_proj1, proj2]) <- mkTupleSort tupSym [(arg1Sym, intSort), (arg2Sym, intSort)] ...
647
script :: Z3 String script = do -- newtype Tup = Tup { arg1 :: Int, arg2 :: Int } intSort <- mkIntSort tupSym <- mkStringSymbol "Tup" arg1Sym <- mkStringSymbol "arg1" arg2Sym <- mkStringSymbol "arg2" (tupSort, _constr, [_proj1, proj2]) <- mkTupleSort tupSym [(arg1Sym, intSort), (arg2Sym, intSort)] ...
647
script = do -- newtype Tup = Tup { arg1 :: Int, arg2 :: Int } intSort <- mkIntSort tupSym <- mkStringSymbol "Tup" arg1Sym <- mkStringSymbol "arg1" arg2Sym <- mkStringSymbol "arg2" (tupSort, _constr, [_proj1, proj2]) <- mkTupleSort tupSym [(arg1Sym, intSort), (arg2Sym, intSort)] -- t :: Tup tSym <...
627
false
true
0
10
154
201
99
102
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Desugar710/Coverage.hs
bsd-3-clause
addTickLHsBind :: LHsBind Id -> TM (LHsBind Id) addTickLHsBind (L pos bind@(AbsBinds { abs_binds = binds, abs_exports = abs_exports })) = do withEnv add_exports $ do withEnv add_inlines $ do binds' <- addTickLHsBinds binds return $ L pos $ bind { abs_binds = binds' } wh...
1,137
addTickLHsBind :: LHsBind Id -> TM (LHsBind Id) addTickLHsBind (L pos bind@(AbsBinds { abs_binds = binds, abs_exports = abs_exports })) = do withEnv add_exports $ do withEnv add_inlines $ do binds' <- addTickLHsBinds binds return $ L pos $ bind { abs_binds = binds' } wh...
1,137
addTickLHsBind (L pos bind@(AbsBinds { abs_binds = binds, abs_exports = abs_exports })) = do withEnv add_exports $ do withEnv add_inlines $ do binds' <- addTickLHsBinds binds return $ L pos $ bind { abs_binds = binds' } where -- in AbsBinds, the Id on each binding is...
1,089
false
true
1
16
377
261
136
125
null
null
bixuanzju/fcore
lib/Examples.hs
bsd-2-clause
false = Lit (S.Bool False)
33
false = Lit (S.Bool False)
33
false = Lit (S.Bool False)
33
false
false
0
8
11
17
8
9
null
null
olorin/amazonka
amazonka-iam/test/Test/AWS/Gen/IAM.hs
mpl-2.0
testListSAMLProviders :: ListSAMLProviders -> TestTree testListSAMLProviders = req "ListSAMLProviders" "fixture/ListSAMLProviders.yaml"
143
testListSAMLProviders :: ListSAMLProviders -> TestTree testListSAMLProviders = req "ListSAMLProviders" "fixture/ListSAMLProviders.yaml"
143
testListSAMLProviders = req "ListSAMLProviders" "fixture/ListSAMLProviders.yaml"
88
false
true
0
5
17
21
10
11
null
null
elben/typing-haskell-in-haskell
StaticPrelude.hs
bsd-3-clause
floatDigitsMfun = "floatDigits" :>: (Forall [Star] ([isIn1 cRealFloat (TGen 0)] :=> (TGen 0 `fn` tInt)))
156
floatDigitsMfun = "floatDigits" :>: (Forall [Star] ([isIn1 cRealFloat (TGen 0)] :=> (TGen 0 `fn` tInt)))
156
floatDigitsMfun = "floatDigits" :>: (Forall [Star] ([isIn1 cRealFloat (TGen 0)] :=> (TGen 0 `fn` tInt)))
156
false
false
1
14
66
58
29
29
null
null
mreider/kinda-might-work
src/Profile.hs
mit
loggingOut :: (MonadIO io) => DB -> Session -> io () loggingOut db = transaction db . delete . LinkKey
122
loggingOut :: (MonadIO io) => DB -> Session -> io () loggingOut db = transaction db . delete . LinkKey
122
loggingOut db = transaction db . delete . LinkKey
52
false
true
0
9
39
47
23
24
null
null
well-typed/generics-sop
sop-core/src/Data/SOP/NS.hs
bsd-3-clause
-- | Specialization of 'hcoerce'. -- -- @since 0.3.1.0 -- coerce_SOP :: forall f g xss yss . AllZip2 (LiftedCoercible f g) xss yss => SOP f xss -> SOP g yss coerce_SOP = unsafeCoerce
196
coerce_SOP :: forall f g xss yss . AllZip2 (LiftedCoercible f g) xss yss => SOP f xss -> SOP g yss coerce_SOP = unsafeCoerce
138
coerce_SOP = unsafeCoerce
27
true
true
0
10
48
62
32
30
null
null
spechub/Hets
Common/XUpdate.hs
gpl-2.0
isRemoveQN :: QName -> Bool isRemoveQN = hasLocalQN removeS
59
isRemoveQN :: QName -> Bool isRemoveQN = hasLocalQN removeS
59
isRemoveQN = hasLocalQN removeS
31
false
true
0
7
8
24
10
14
null
null
jfischoff/hs-mitsuba
tests/Tests/Mitsuba/Types.hs
bsd-3-clause
case_envmap_toXML = actualEnvmap `assertElement` [xmlQQ| <emitter type="envmap"> <string name="filename" value="filepath" /> <float name="scale" value="1.0" /> <transform name="toWorld" /> <float name="gamma" value="2.0" /> <boolean name="cache" value="true" /> <float name="sa...
368
case_envmap_toXML = actualEnvmap `assertElement` [xmlQQ| <emitter type="envmap"> <string name="filename" value="filepath" /> <float name="scale" value="1.0" /> <transform name="toWorld" /> <float name="gamma" value="2.0" /> <boolean name="cache" value="true" /> <float name="sa...
368
case_envmap_toXML = actualEnvmap `assertElement` [xmlQQ| <emitter type="envmap"> <string name="filename" value="filepath" /> <float name="scale" value="1.0" /> <transform name="toWorld" /> <float name="gamma" value="2.0" /> <boolean name="cache" value="true" /> <float name="sa...
368
false
false
1
5
80
19
11
8
null
null
adarqui/DevUtils-Parser
src/System/DevUtils/Parser/Lang/Haskell/String.hs
gpl-3.0
comma = P.comma lexer
21
comma = P.comma lexer
21
comma = P.comma lexer
21
false
false
1
6
3
14
5
9
null
null
agocorona/transient
src/Transient/Internals.hs
mit
modifyData :: (MonadState EventF m, Typeable a) => (Maybe a -> Maybe a) -> m () modifyData f = modify $ \st -> st { mfData = M.alter alterf t (mfData st) } where typeResp :: (Maybe a -> b) -> a typeResp = undefined t = typeOf (typeResp f) alterf mx = unsafeCoerce $ f x' w...
924
modifyData :: (MonadState EventF m, Typeable a) => (Maybe a -> Maybe a) -> m () modifyData f = modify $ \st -> st { mfData = M.alter alterf t (mfData st) } where typeResp :: (Maybe a -> b) -> a typeResp = undefined t = typeOf (typeResp f) alterf mx = unsafeCoerce $ f x' w...
924
modifyData f = modify $ \st -> st { mfData = M.alter alterf t (mfData st) } where typeResp :: (Maybe a -> b) -> a typeResp = undefined t = typeOf (typeResp f) alterf mx = unsafeCoerce $ f x' where x' = case mx of Just x -> Just $ unsafeCoerce x ...
844
false
true
5
10
286
201
94
107
null
null
TransformingMusicology/tabcode-haskell
src/TabCode/Serialiser/MEIXML/Elements.hs
gpl-3.0
_ <$:> Nothing = []
19
_ <$:> Nothing = []
19
_ <$:> Nothing = []
19
false
false
0
5
4
14
6
8
null
null
vikraman/ghc
compiler/basicTypes/RdrName.hs
bsd-3-clause
transformGREs :: (GlobalRdrElt -> GlobalRdrElt) -> [OccName] -> GlobalRdrEnv -> GlobalRdrEnv -- ^ Apply a transformation function to the GREs for these OccNames transformGREs trans_gre occs rdr_env = foldr trans rdr_env occs where trans occ env = case lookupOccEnv env occ of ...
411
transformGREs :: (GlobalRdrElt -> GlobalRdrElt) -> [OccName] -> GlobalRdrEnv -> GlobalRdrEnv transformGREs trans_gre occs rdr_env = foldr trans rdr_env occs where trans occ env = case lookupOccEnv env occ of Just gres -> extendOccEnv env occ (map trans_gre gres) ...
343
transformGREs trans_gre occs rdr_env = foldr trans rdr_env occs where trans occ env = case lookupOccEnv env occ of Just gres -> extendOccEnv env occ (map trans_gre gres) Nothing -> env
222
true
true
1
10
119
112
50
62
null
null
GaloisInc/halvm-ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
showParen_RDR = varQual_RDR gHC_SHOW (fsLit "showParen")
66
showParen_RDR = varQual_RDR gHC_SHOW (fsLit "showParen")
66
showParen_RDR = varQual_RDR gHC_SHOW (fsLit "showParen")
66
false
false
1
7
15
20
8
12
null
null