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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ganeti-github-testing/ganeti-test-1
|
src/Ganeti/Constants.hs
|
bsd-2-clause
|
-- | Default value of the Gluster volume setting
glusterVolumeDefault :: String
glusterVolumeDefault = "gv0"
| 108
|
glusterVolumeDefault :: String
glusterVolumeDefault = "gv0"
| 59
|
glusterVolumeDefault = "gv0"
| 28
| true
| true
| 0
| 4
| 14
| 12
| 7
| 5
| null | null |
mrkkrp/stack
|
src/Stack/PrettyPrint.hs
|
bsd-3-clause
|
displayErrorPkgId :: PackageIdentifier -> AnsiDoc
displayErrorPkgId = errorRed . display
| 88
|
displayErrorPkgId :: PackageIdentifier -> AnsiDoc
displayErrorPkgId = errorRed . display
| 88
|
displayErrorPkgId = errorRed . display
| 38
| false
| true
| 0
| 5
| 9
| 19
| 10
| 9
| null | null |
bjornbm/astro-orbit
|
Astro/Orbit/Anomaly.hs
|
bsd-3-clause
|
-- | Compute mean anomaly from true anomaly.
ta2ma :: RealFloat a => Eccentricity a -> Anomaly True a -> Anomaly Mean a
ta2ma ecc = ea2ma ecc . ta2ea ecc
| 153
|
ta2ma :: RealFloat a => Eccentricity a -> Anomaly True a -> Anomaly Mean a
ta2ma ecc = ea2ma ecc . ta2ea ecc
| 108
|
ta2ma ecc = ea2ma ecc . ta2ea ecc
| 33
| true
| true
| 0
| 8
| 30
| 53
| 24
| 29
| null | null |
dbp/positionsites
|
src/Helpers/Misc.hs
|
bsd-3-clause
|
passLog :: [Text] -> AppHandler ()
passLog ts = do
liftIO $ putStrLn $ T.unpack $ T.concat ("passing: ":ts)
pass
| 116
|
passLog :: [Text] -> AppHandler ()
passLog ts = do
liftIO $ putStrLn $ T.unpack $ T.concat ("passing: ":ts)
pass
| 116
|
passLog ts = do
liftIO $ putStrLn $ T.unpack $ T.concat ("passing: ":ts)
pass
| 81
| false
| true
| 0
| 10
| 23
| 58
| 28
| 30
| null | null |
binesiyu/ifl
|
examples/ch12/Barcode.hs
|
mit
|
{-- /snippet AltParity --}
{-- snippet compareWithoutParity --}
on :: (a -> a -> b) -> (c -> a) -> c -> c -> b
on f g x y = g x `f` g y
| 136
|
on :: (a -> a -> b) -> (c -> a) -> c -> c -> b
on f g x y = g x `f` g y
| 71
|
on f g x y = g x `f` g y
| 24
| true
| true
| 0
| 8
| 36
| 68
| 36
| 32
| null | null |
CindyLinz/Haskell.js
|
trans/src/Desugar/Tuple.hs
|
mit
|
deTupleRPatOp (RPStarG l) = RPStarG (id l)
| 42
|
deTupleRPatOp (RPStarG l) = RPStarG (id l)
| 42
|
deTupleRPatOp (RPStarG l) = RPStarG (id l)
| 42
| false
| false
| 0
| 7
| 6
| 25
| 11
| 14
| null | null |
robx/puzzle-draw
|
src/Parse/PuzzleTypes.hs
|
mit
|
dualloop :: ParsePuzzle (Grid C (Clue Int), Grid N (Clue Int)) (Loop N, Loop C)
dualloop =
(,)
( \v ->
(,)
<$> parseFrom ["edges"] parseClueGrid v
<*> parseFrom ["dual"] parseClueGrid v
)
( \v ->
(,) <$> parseFrom ["edges"] parseEdges v <*> parseFrom ["dual"] parseEdges v
)
| 328
|
dualloop :: ParsePuzzle (Grid C (Clue Int), Grid N (Clue Int)) (Loop N, Loop C)
dualloop =
(,)
( \v ->
(,)
<$> parseFrom ["edges"] parseClueGrid v
<*> parseFrom ["dual"] parseClueGrid v
)
( \v ->
(,) <$> parseFrom ["edges"] parseEdges v <*> parseFrom ["dual"] parseEdges v
)
| 328
|
dualloop =
(,)
( \v ->
(,)
<$> parseFrom ["edges"] parseClueGrid v
<*> parseFrom ["dual"] parseClueGrid v
)
( \v ->
(,) <$> parseFrom ["edges"] parseEdges v <*> parseFrom ["dual"] parseEdges v
)
| 248
| false
| true
| 1
| 11
| 101
| 147
| 74
| 73
| null | null |
DM2014/homework2-hs
|
src/Parser.hs
|
mit
|
parseSection :: Parser Product
parseSection = do
productID <- parseProduct
replicateM_ 2 dropLine
userID <- parseUser
replicateM_ 6 dropLine
choice [dropLine, endOfInput]
return (Product userID productID)
-- | Transaction
| 246
|
parseSection :: Parser Product
parseSection = do
productID <- parseProduct
replicateM_ 2 dropLine
userID <- parseUser
replicateM_ 6 dropLine
choice [dropLine, endOfInput]
return (Product userID productID)
-- | Transaction
| 246
|
parseSection = do
productID <- parseProduct
replicateM_ 2 dropLine
userID <- parseUser
replicateM_ 6 dropLine
choice [dropLine, endOfInput]
return (Product userID productID)
-- | Transaction
| 215
| false
| true
| 0
| 9
| 53
| 71
| 32
| 39
| null | null |
23Skidoo/snap
|
test/suite/Snap/Snaplet/Auth/Handlers/Tests.hs
|
bsd-3-clause
|
testCheckPasswordAndLoginKO :: Test
testCheckPasswordAndLoginKO = testCase "checkPasswordAndLogin KO" assertion
where
assertion :: Assertion
assertion = do
res <- evalHandler Nothing (ST.get "" Map.empty) hdl appInit
either (assertFailure . show) (assertBool failMsg . isLeft) res
hdl :: Handler App App (Either AuthFailure AuthUser)
hdl = with auth $ do
let pwd = ClearText "wrongpass"
res <- A.loginByUsername "foo" pwd False
either (return . Left) (`A.checkPasswordAndLogin` pwd) res
failMsg = "checkPasswordAndLogin: I expected to succeed " ++
"but I didn't."
------------------------------------------------------------------------------
| 722
|
testCheckPasswordAndLoginKO :: Test
testCheckPasswordAndLoginKO = testCase "checkPasswordAndLogin KO" assertion
where
assertion :: Assertion
assertion = do
res <- evalHandler Nothing (ST.get "" Map.empty) hdl appInit
either (assertFailure . show) (assertBool failMsg . isLeft) res
hdl :: Handler App App (Either AuthFailure AuthUser)
hdl = with auth $ do
let pwd = ClearText "wrongpass"
res <- A.loginByUsername "foo" pwd False
either (return . Left) (`A.checkPasswordAndLogin` pwd) res
failMsg = "checkPasswordAndLogin: I expected to succeed " ++
"but I didn't."
------------------------------------------------------------------------------
| 722
|
testCheckPasswordAndLoginKO = testCase "checkPasswordAndLogin KO" assertion
where
assertion :: Assertion
assertion = do
res <- evalHandler Nothing (ST.get "" Map.empty) hdl appInit
either (assertFailure . show) (assertBool failMsg . isLeft) res
hdl :: Handler App App (Either AuthFailure AuthUser)
hdl = with auth $ do
let pwd = ClearText "wrongpass"
res <- A.loginByUsername "foo" pwd False
either (return . Left) (`A.checkPasswordAndLogin` pwd) res
failMsg = "checkPasswordAndLogin: I expected to succeed " ++
"but I didn't."
------------------------------------------------------------------------------
| 686
| false
| true
| 0
| 11
| 158
| 179
| 89
| 90
| null | null |
tpsinnem/Idris-dev
|
src/Idris/ErrReverse.hs
|
bsd-3-clause
|
-- | For display purposes, apply any 'error reversal' transformations
-- so that errors will be more readable
errReverse :: IState -> Term -> Term
errReverse ist t = rewrite 5 t -- (elideLambdas t)
where
rewrite 0 t = t
rewrite n t = let t' = foldl applyRule t (reverse (idris_errRev ist)) in
if t == t' then t
else rewrite (n - 1) t'
applyRule :: Term -> (Term, Term) -> Term
applyRule t (l, r) = applyNames [] t l r
-- Assume pattern bindings match in l and r (if they don't just treat
-- the rule as invalid and return t)
applyNames ns t (Bind n (PVar ty) scl) (Bind n' (PVar ty') scr)
| n == n' = applyNames (n : ns) t (instantiate (P Ref n ty) scl)
(instantiate (P Ref n' ty') scr)
| otherwise = t
applyNames ns t l r = matchTerm ns l r t
matchTerm ns l r t
| Just nmap <- match ns l t = substNames nmap r
matchTerm ns l r (App s f a) = let f' = matchTerm ns l r f
a' = matchTerm ns l r a in
App s f' a'
matchTerm ns l r (Bind n b sc) = let b' = fmap (matchTerm ns l r) b
sc' = matchTerm ns l r sc in
Bind n b' sc'
matchTerm ns l r t = t
match ns l t = do ms <- match' ns l t
combine (nub ms)
-- If any duplicate mappings, it's a failure
combine [] = Just []
combine ((x, t) : xs)
| Just _ <- lookup x xs = Nothing
| otherwise = do xs' <- combine xs
Just ((x, t) : xs')
match' ns (P Ref n _) t | n `elem` ns = Just [(n, t)]
match' ns (App _ f a) (App _ f' a') = do fs <- match' ns f f'
as <- match' ns a a'
Just (fs ++ as)
-- no matching Binds, for now...
match' ns x y = if x == y then Just [] else Nothing
-- if the term under a lambda is huge, there's no much point in showing
-- it as it won't be very enlightening.
elideLambdas (App s f a) = App s (elideLambdas f) (elideLambdas a)
elideLambdas (Bind n (Lam t) sc)
| size sc > 200 = P Ref (sUN "...") Erased
elideLambdas (Bind n b sc)
= Bind n (fmap elideLambdas b) (elideLambdas sc)
elideLambdas t = t
| 2,419
|
errReverse :: IState -> Term -> Term
errReverse ist t = rewrite 5 t -- (elideLambdas t)
where
rewrite 0 t = t
rewrite n t = let t' = foldl applyRule t (reverse (idris_errRev ist)) in
if t == t' then t
else rewrite (n - 1) t'
applyRule :: Term -> (Term, Term) -> Term
applyRule t (l, r) = applyNames [] t l r
-- Assume pattern bindings match in l and r (if they don't just treat
-- the rule as invalid and return t)
applyNames ns t (Bind n (PVar ty) scl) (Bind n' (PVar ty') scr)
| n == n' = applyNames (n : ns) t (instantiate (P Ref n ty) scl)
(instantiate (P Ref n' ty') scr)
| otherwise = t
applyNames ns t l r = matchTerm ns l r t
matchTerm ns l r t
| Just nmap <- match ns l t = substNames nmap r
matchTerm ns l r (App s f a) = let f' = matchTerm ns l r f
a' = matchTerm ns l r a in
App s f' a'
matchTerm ns l r (Bind n b sc) = let b' = fmap (matchTerm ns l r) b
sc' = matchTerm ns l r sc in
Bind n b' sc'
matchTerm ns l r t = t
match ns l t = do ms <- match' ns l t
combine (nub ms)
-- If any duplicate mappings, it's a failure
combine [] = Just []
combine ((x, t) : xs)
| Just _ <- lookup x xs = Nothing
| otherwise = do xs' <- combine xs
Just ((x, t) : xs')
match' ns (P Ref n _) t | n `elem` ns = Just [(n, t)]
match' ns (App _ f a) (App _ f' a') = do fs <- match' ns f f'
as <- match' ns a a'
Just (fs ++ as)
-- no matching Binds, for now...
match' ns x y = if x == y then Just [] else Nothing
-- if the term under a lambda is huge, there's no much point in showing
-- it as it won't be very enlightening.
elideLambdas (App s f a) = App s (elideLambdas f) (elideLambdas a)
elideLambdas (Bind n (Lam t) sc)
| size sc > 200 = P Ref (sUN "...") Erased
elideLambdas (Bind n b sc)
= Bind n (fmap elideLambdas b) (elideLambdas sc)
elideLambdas t = t
| 2,309
|
errReverse ist t = rewrite 5 t -- (elideLambdas t)
where
rewrite 0 t = t
rewrite n t = let t' = foldl applyRule t (reverse (idris_errRev ist)) in
if t == t' then t
else rewrite (n - 1) t'
applyRule :: Term -> (Term, Term) -> Term
applyRule t (l, r) = applyNames [] t l r
-- Assume pattern bindings match in l and r (if they don't just treat
-- the rule as invalid and return t)
applyNames ns t (Bind n (PVar ty) scl) (Bind n' (PVar ty') scr)
| n == n' = applyNames (n : ns) t (instantiate (P Ref n ty) scl)
(instantiate (P Ref n' ty') scr)
| otherwise = t
applyNames ns t l r = matchTerm ns l r t
matchTerm ns l r t
| Just nmap <- match ns l t = substNames nmap r
matchTerm ns l r (App s f a) = let f' = matchTerm ns l r f
a' = matchTerm ns l r a in
App s f' a'
matchTerm ns l r (Bind n b sc) = let b' = fmap (matchTerm ns l r) b
sc' = matchTerm ns l r sc in
Bind n b' sc'
matchTerm ns l r t = t
match ns l t = do ms <- match' ns l t
combine (nub ms)
-- If any duplicate mappings, it's a failure
combine [] = Just []
combine ((x, t) : xs)
| Just _ <- lookup x xs = Nothing
| otherwise = do xs' <- combine xs
Just ((x, t) : xs')
match' ns (P Ref n _) t | n `elem` ns = Just [(n, t)]
match' ns (App _ f a) (App _ f' a') = do fs <- match' ns f f'
as <- match' ns a a'
Just (fs ++ as)
-- no matching Binds, for now...
match' ns x y = if x == y then Just [] else Nothing
-- if the term under a lambda is huge, there's no much point in showing
-- it as it won't be very enlightening.
elideLambdas (App s f a) = App s (elideLambdas f) (elideLambdas a)
elideLambdas (Bind n (Lam t) sc)
| size sc > 200 = P Ref (sUN "...") Erased
elideLambdas (Bind n b sc)
= Bind n (fmap elideLambdas b) (elideLambdas sc)
elideLambdas t = t
| 2,272
| true
| true
| 0
| 13
| 983
| 902
| 441
| 461
| null | null |
pgj/bead
|
test/Test/Property/EntityGen.hs
|
bsd-3-clause
|
commentTypes = elements [CT_Student, CT_GroupAdmin, CT_CourseAdmin, CT_Admin]
| 77
|
commentTypes = elements [CT_Student, CT_GroupAdmin, CT_CourseAdmin, CT_Admin]
| 77
|
commentTypes = elements [CT_Student, CT_GroupAdmin, CT_CourseAdmin, CT_Admin]
| 77
| false
| false
| 0
| 6
| 6
| 21
| 12
| 9
| null | null |
csrhodes/pandoc
|
src/Text/Pandoc/Writers/HTML.hs
|
gpl-2.0
|
blockToHtml opts (DefinitionList lst) = do
contents <- mapM (\(term, defs) ->
do term' <- if null term
then return mempty
else liftM H.dt $ inlineListToHtml opts term
defs' <- mapM ((liftM (\x -> H.dd $ (x >> nl opts))) .
blockListToHtml opts) defs
return $ mconcat $ nl opts : term' : nl opts :
intersperse (nl opts) defs') lst
return $ defList opts contents
| 565
|
blockToHtml opts (DefinitionList lst) = do
contents <- mapM (\(term, defs) ->
do term' <- if null term
then return mempty
else liftM H.dt $ inlineListToHtml opts term
defs' <- mapM ((liftM (\x -> H.dd $ (x >> nl opts))) .
blockListToHtml opts) defs
return $ mconcat $ nl opts : term' : nl opts :
intersperse (nl opts) defs') lst
return $ defList opts contents
| 565
|
blockToHtml opts (DefinitionList lst) = do
contents <- mapM (\(term, defs) ->
do term' <- if null term
then return mempty
else liftM H.dt $ inlineListToHtml opts term
defs' <- mapM ((liftM (\x -> H.dd $ (x >> nl opts))) .
blockListToHtml opts) defs
return $ mconcat $ nl opts : term' : nl opts :
intersperse (nl opts) defs') lst
return $ defList opts contents
| 565
| false
| false
| 0
| 24
| 271
| 182
| 87
| 95
| null | null |
martindobias/christmass-koma
|
src/Cz/MartinDobias/ChristmasKoma/PadCracker.hs
|
bsd-3-clause
|
decodeOrHide ((_, []) : m) = '_' : decodeOrHide m
| 49
|
decodeOrHide ((_, []) : m) = '_' : decodeOrHide m
| 49
|
decodeOrHide ((_, []) : m) = '_' : decodeOrHide m
| 49
| false
| false
| 0
| 9
| 9
| 31
| 16
| 15
| null | null |
chrisdone/ghc-server
|
src/GHC/Server/Info.hs
|
bsd-3-clause
|
getSrcSpan' _ = Nothing
| 23
|
getSrcSpan' _ = Nothing
| 23
|
getSrcSpan' _ = Nothing
| 23
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
robdockins/canonical-lf
|
Main.hs
|
bsd-3-clause
|
add :: M (LF E TERM)
add = inEmptyCtx $
lam nat (arrow nat nat) "x" $ \x ->
lam nat nat "y" $ \y ->
nat_elim nat (var x) (lam nat nat "n" $ \n -> suc (var n)) (var y)
| 175
|
add :: M (LF E TERM)
add = inEmptyCtx $
lam nat (arrow nat nat) "x" $ \x ->
lam nat nat "y" $ \y ->
nat_elim nat (var x) (lam nat nat "n" $ \n -> suc (var n)) (var y)
| 175
|
add = inEmptyCtx $
lam nat (arrow nat nat) "x" $ \x ->
lam nat nat "y" $ \y ->
nat_elim nat (var x) (lam nat nat "n" $ \n -> suc (var n)) (var y)
| 154
| false
| true
| 6
| 11
| 50
| 129
| 57
| 72
| null | null |
23Skidoo/heist
|
src/Heist/Common.hs
|
bsd-3-clause
|
------------------------------------------------------------------------------
-- | Reads an XML template from disk.
getXMLDoc :: String -> IO (Either String DocumentFile)
getXMLDoc = getDocWith X.parseXML
| 205
|
getXMLDoc :: String -> IO (Either String DocumentFile)
getXMLDoc = getDocWith X.parseXML
| 88
|
getXMLDoc = getDocWith X.parseXML
| 33
| true
| true
| 0
| 9
| 20
| 39
| 18
| 21
| null | null |
nushio3/ghc
|
compiler/stranal/WwLib.hs
|
bsd-3-clause
|
nop_fn :: CoreExpr -> CoreExpr
nop_fn body = body
| 49
|
nop_fn :: CoreExpr -> CoreExpr
nop_fn body = body
| 49
|
nop_fn body = body
| 18
| false
| true
| 0
| 5
| 8
| 18
| 9
| 9
| null | null |
dpiponi/Bine
|
src/OSFILE.hs
|
bsd-3-clause
|
osfile :: (MonadState State6502 m, Emu6502 m) => m ()
osfile = do
a <- getA
x <- getX
y <- getY
tracelog $ printf "OSFILE A=%02x X=%02x Y=%02x" a x y
let blockAddr = make16 x y
stringAddr <- word16At blockAddr
rawFilename <- stringAt stringAddr
hostName <- hostFileName rawFilename
-- Note that the 'end' field points to the last byte,
-- not the first byte after the end.
case a of
0x00 -> saveBlock blockAddr hostName
0xff -> loadFile blockAddr hostName
_ -> error $ "Unknown OSFILE call " ++ show a ++ "," ++ show x ++ "," ++ show y
| 611
|
osfile :: (MonadState State6502 m, Emu6502 m) => m ()
osfile = do
a <- getA
x <- getX
y <- getY
tracelog $ printf "OSFILE A=%02x X=%02x Y=%02x" a x y
let blockAddr = make16 x y
stringAddr <- word16At blockAddr
rawFilename <- stringAt stringAddr
hostName <- hostFileName rawFilename
-- Note that the 'end' field points to the last byte,
-- not the first byte after the end.
case a of
0x00 -> saveBlock blockAddr hostName
0xff -> loadFile blockAddr hostName
_ -> error $ "Unknown OSFILE call " ++ show a ++ "," ++ show x ++ "," ++ show y
| 611
|
osfile = do
a <- getA
x <- getX
y <- getY
tracelog $ printf "OSFILE A=%02x X=%02x Y=%02x" a x y
let blockAddr = make16 x y
stringAddr <- word16At blockAddr
rawFilename <- stringAt stringAddr
hostName <- hostFileName rawFilename
-- Note that the 'end' field points to the last byte,
-- not the first byte after the end.
case a of
0x00 -> saveBlock blockAddr hostName
0xff -> loadFile blockAddr hostName
_ -> error $ "Unknown OSFILE call " ++ show a ++ "," ++ show x ++ "," ++ show y
| 557
| false
| true
| 0
| 15
| 178
| 184
| 84
| 100
| null | null |
pasberth/binal1
|
Language/Binal/Generator/Simple.hs
|
mit
|
generateMatching (ObjectTy _ m) jast
| HashMap.null m = jast
| otherwise = do
let matchers = map (\(key,val) -> (generateMatching val (MemberJSAST jast key))) (HashMap.toList m)
foldr1 (BinaryJSAST "&&") matchers
| 224
|
generateMatching (ObjectTy _ m) jast
| HashMap.null m = jast
| otherwise = do
let matchers = map (\(key,val) -> (generateMatching val (MemberJSAST jast key))) (HashMap.toList m)
foldr1 (BinaryJSAST "&&") matchers
| 224
|
generateMatching (ObjectTy _ m) jast
| HashMap.null m = jast
| otherwise = do
let matchers = map (\(key,val) -> (generateMatching val (MemberJSAST jast key))) (HashMap.toList m)
foldr1 (BinaryJSAST "&&") matchers
| 224
| false
| false
| 1
| 17
| 42
| 104
| 50
| 54
| null | null |
gebner/hledger-diff
|
Main.hs
|
gpl-3.0
|
matchingPostings :: AccountName -> Journal -> [PostingWithPath]
matchingPostings acct j = filter ((== acct) . paccount . ppposting) $ allPostingsWithPath j
| 155
|
matchingPostings :: AccountName -> Journal -> [PostingWithPath]
matchingPostings acct j = filter ((== acct) . paccount . ppposting) $ allPostingsWithPath j
| 155
|
matchingPostings acct j = filter ((== acct) . paccount . ppposting) $ allPostingsWithPath j
| 91
| false
| true
| 0
| 10
| 20
| 52
| 27
| 25
| null | null |
brendanhay/gogol
|
gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Drafts/Get.hs
|
mpl-2.0
|
-- | OAuth access token.
udgAccessToken :: Lens' UsersDraftsGet (Maybe Text)
udgAccessToken
= lens _udgAccessToken
(\ s a -> s{_udgAccessToken = a})
| 156
|
udgAccessToken :: Lens' UsersDraftsGet (Maybe Text)
udgAccessToken
= lens _udgAccessToken
(\ s a -> s{_udgAccessToken = a})
| 131
|
udgAccessToken
= lens _udgAccessToken
(\ s a -> s{_udgAccessToken = a})
| 79
| true
| true
| 0
| 9
| 29
| 48
| 25
| 23
| null | null |
sdiehl/ghc
|
compiler/typecheck/Constraint.hs
|
bsd-3-clause
|
insolublesOnly :: WantedConstraints -> WantedConstraints
-- Keep only the definitely-insoluble constraints
insolublesOnly (WC { wc_simple = simples, wc_impl = implics })
= WC { wc_simple = filterBag insolubleCt simples
, wc_impl = mapBag implic_insols_only implics }
where
implic_insols_only implic
= implic { ic_wanted = insolublesOnly (ic_wanted implic) }
| 380
|
insolublesOnly :: WantedConstraints -> WantedConstraints
insolublesOnly (WC { wc_simple = simples, wc_impl = implics })
= WC { wc_simple = filterBag insolubleCt simples
, wc_impl = mapBag implic_insols_only implics }
where
implic_insols_only implic
= implic { ic_wanted = insolublesOnly (ic_wanted implic) }
| 330
|
insolublesOnly (WC { wc_simple = simples, wc_impl = implics })
= WC { wc_simple = filterBag insolubleCt simples
, wc_impl = mapBag implic_insols_only implics }
where
implic_insols_only implic
= implic { ic_wanted = insolublesOnly (ic_wanted implic) }
| 273
| true
| true
| 1
| 10
| 70
| 103
| 51
| 52
| null | null |
mathstuf/xmonad-contrib
|
XMonad/Actions/Search.hs
|
bsd-3-clause
|
wiktionary = searchEngine "wikt" "http://en.wiktionary.org/wiki/Special:Search?go=Go&search="
| 105
|
wiktionary = searchEngine "wikt" "http://en.wiktionary.org/wiki/Special:Search?go=Go&search="
| 105
|
wiktionary = searchEngine "wikt" "http://en.wiktionary.org/wiki/Special:Search?go=Go&search="
| 105
| false
| false
| 1
| 5
| 16
| 14
| 5
| 9
| null | null |
SKA-ScienceDataProcessor/RC
|
MS5/dna/flow/Flow/Domain.hs
|
apache-2.0
|
regionBins _ = error "regionBins: Not a bin domain!"
| 52
|
regionBins _ = error "regionBins: Not a bin domain!"
| 52
|
regionBins _ = error "regionBins: Not a bin domain!"
| 52
| false
| false
| 0
| 5
| 8
| 12
| 5
| 7
| null | null |
brendanhay/gogol
|
gogol-compute/gen/Network/Google/Resource/Compute/TargetTCPProxies/Get.hs
|
mpl-2.0
|
-- | Name of the TargetTcpProxy resource to return.
ttpgTargetTCPProxy :: Lens' TargetTCPProxiesGet Text
ttpgTargetTCPProxy
= lens _ttpgTargetTCPProxy
(\ s a -> s{_ttpgTargetTCPProxy = a})
| 196
|
ttpgTargetTCPProxy :: Lens' TargetTCPProxiesGet Text
ttpgTargetTCPProxy
= lens _ttpgTargetTCPProxy
(\ s a -> s{_ttpgTargetTCPProxy = a})
| 144
|
ttpgTargetTCPProxy
= lens _ttpgTargetTCPProxy
(\ s a -> s{_ttpgTargetTCPProxy = a})
| 91
| true
| true
| 0
| 9
| 32
| 42
| 22
| 20
| null | null |
ExNexu/Idris-dev
|
src/Idris/AbsSyntaxTree.hs
|
bsd-3-clause
|
annotationColour ist _ = Nothing
| 32
|
annotationColour ist _ = Nothing
| 32
|
annotationColour ist _ = Nothing
| 32
| false
| false
| 0
| 4
| 4
| 13
| 5
| 8
| null | null |
sjoerdvisscher/fmlist
|
Data/FMList.hs
|
bsd-3-clause
|
(><) :: FMList a -> FMList a -> FMList a
FM l >< FM r = FM (l `mappend` r)
| 82
|
(><) :: FMList a -> FMList a -> FMList a
FM l >< FM r = FM (l `mappend` r)
| 82
|
FM l >< FM r = FM (l `mappend` r)
| 33
| false
| true
| 0
| 7
| 27
| 54
| 26
| 28
| null | null |
forste/haReFork
|
tools/property/syntax/PropSyntaxStruct.hs
|
bsd-3-clause
|
maybeProp = prop (const Nothing)
| 32
|
maybeProp = prop (const Nothing)
| 32
|
maybeProp = prop (const Nothing)
| 32
| false
| false
| 0
| 7
| 4
| 15
| 7
| 8
| null | null |
pparkkin/eta
|
compiler/ETA/Utils/Maybes.hs
|
bsd-3-clause
|
isSuccess (Failed {}) = False
| 32
|
isSuccess (Failed {}) = False
| 32
|
isSuccess (Failed {}) = False
| 32
| false
| false
| 0
| 6
| 7
| 17
| 8
| 9
| null | null |
Erdwolf/autotool-bonn
|
src/Syntax/Transformer.hs
|
gpl-2.0
|
chomsky :: Grammar -> Grammar
--chomsky (Grammar s0 Nothing []) = Grammar s0 (Just False) []
--chomsky (Grammar s0 eps []) = Grammar s0 eps []
chomsky g =
binarize $
terminalsAsLeafs $
eliminateChainRules $
eliminateCycles $
eliminateEmptyRules $
g
| 296
|
chomsky :: Grammar -> Grammar
chomsky g =
binarize $
terminalsAsLeafs $
eliminateChainRules $
eliminateCycles $
eliminateEmptyRules $
g
| 183
|
chomsky g =
binarize $
terminalsAsLeafs $
eliminateChainRules $
eliminateCycles $
eliminateEmptyRules $
g
| 153
| true
| true
| 6
| 7
| 87
| 48
| 22
| 26
| null | null |
brendanhay/gogol
|
gogol-serviceconsumermanagement/gen/Network/Google/ServiceConsumerManagement/Types/Product.hs
|
mpl-2.0
|
-- | The number of seconds to wait for the completion of a long running
-- operation. The default is no deadline.
brOperationDeadline :: Lens' BackendRule (Maybe Double)
brOperationDeadline
= lens _brOperationDeadline
(\ s a -> s{_brOperationDeadline = a})
. mapping _Coerce
| 288
|
brOperationDeadline :: Lens' BackendRule (Maybe Double)
brOperationDeadline
= lens _brOperationDeadline
(\ s a -> s{_brOperationDeadline = a})
. mapping _Coerce
| 174
|
brOperationDeadline
= lens _brOperationDeadline
(\ s a -> s{_brOperationDeadline = a})
. mapping _Coerce
| 118
| true
| true
| 0
| 10
| 55
| 56
| 29
| 27
| null | null |
DavidAlphaFox/ghc
|
libraries/bytestring/Data/ByteString/Internal.hs
|
bsd-3-clause
|
-- ^ still needed
compareBytes :: ByteString -> ByteString -> Ordering
compareBytes (PS _ _ 0) (PS _ _ 0) = EQ
| 127
|
compareBytes :: ByteString -> ByteString -> Ordering
compareBytes (PS _ _ 0) (PS _ _ 0) = EQ
| 108
|
compareBytes (PS _ _ 0) (PS _ _ 0) = EQ
| 55
| true
| true
| 0
| 7
| 38
| 45
| 23
| 22
| null | null |
Mathnerd314/lamdu
|
bottlelib/Graphics/UI/Bottle/Widgets/FlyNav.hs
|
gpl-3.0
|
highlightColor :: Draw.Color
highlightColor = Draw.Color 0.4 0.4 1 0.4
| 70
|
highlightColor :: Draw.Color
highlightColor = Draw.Color 0.4 0.4 1 0.4
| 70
|
highlightColor = Draw.Color 0.4 0.4 1 0.4
| 41
| false
| true
| 0
| 7
| 9
| 32
| 13
| 19
| null | null |
d0kt0r0/estuary
|
client/src/Estuary/Help/Morelia.hs
|
gpl-3.0
|
exampleText "VI" = "\"VI VI\" ~"
| 33
|
exampleText "VI" = "\"VI VI\" ~"
| 33
|
exampleText "VI" = "\"VI VI\" ~"
| 33
| false
| false
| 0
| 5
| 6
| 9
| 4
| 5
| null | null |
mzini/qlogic
|
Qlogic/NatSat.hs
|
gpl-3.0
|
bits :: Size -> Int
bits (Bits n) = n
| 38
|
bits :: Size -> Int
bits (Bits n) = n
| 38
|
bits (Bits n) = n
| 18
| false
| true
| 0
| 9
| 10
| 30
| 13
| 17
| null | null |
christiaanb/ghc
|
compiler/main/HscTypes.hs
|
bsd-3-clause
|
showModMsg :: DynFlags -> HscTarget -> Bool -> ModSummary -> String
showModMsg dflags target recomp mod_summary
= showSDoc dflags $
hsep [text (mod_str ++ replicate (max 0 (16 - length mod_str)) ' '),
char '(', text (normalise $ msHsFilePath mod_summary) <> comma,
case target of
HscInterpreted | recomp
-> text "interpreted"
HscNothing -> text "nothing"
_ | HsigFile == ms_hsc_src mod_summary -> text "nothing"
| otherwise -> text (normalise $ msObjFilePath mod_summary),
char ')']
where
mod = moduleName (ms_mod mod_summary)
mod_str = showPpr dflags mod
++ hscSourceString' dflags mod (ms_hsc_src mod_summary)
-- | Variant of hscSourceString which prints more information for signatures.
-- This can't live in DriverPhases because this would cause a module loop.
| 949
|
showModMsg :: DynFlags -> HscTarget -> Bool -> ModSummary -> String
showModMsg dflags target recomp mod_summary
= showSDoc dflags $
hsep [text (mod_str ++ replicate (max 0 (16 - length mod_str)) ' '),
char '(', text (normalise $ msHsFilePath mod_summary) <> comma,
case target of
HscInterpreted | recomp
-> text "interpreted"
HscNothing -> text "nothing"
_ | HsigFile == ms_hsc_src mod_summary -> text "nothing"
| otherwise -> text (normalise $ msObjFilePath mod_summary),
char ')']
where
mod = moduleName (ms_mod mod_summary)
mod_str = showPpr dflags mod
++ hscSourceString' dflags mod (ms_hsc_src mod_summary)
-- | Variant of hscSourceString which prints more information for signatures.
-- This can't live in DriverPhases because this would cause a module loop.
| 949
|
showModMsg dflags target recomp mod_summary
= showSDoc dflags $
hsep [text (mod_str ++ replicate (max 0 (16 - length mod_str)) ' '),
char '(', text (normalise $ msHsFilePath mod_summary) <> comma,
case target of
HscInterpreted | recomp
-> text "interpreted"
HscNothing -> text "nothing"
_ | HsigFile == ms_hsc_src mod_summary -> text "nothing"
| otherwise -> text (normalise $ msObjFilePath mod_summary),
char ')']
where
mod = moduleName (ms_mod mod_summary)
mod_str = showPpr dflags mod
++ hscSourceString' dflags mod (ms_hsc_src mod_summary)
-- | Variant of hscSourceString which prints more information for signatures.
-- This can't live in DriverPhases because this would cause a module loop.
| 881
| false
| true
| 6
| 14
| 299
| 252
| 113
| 139
| null | null |
mariefarrell/Hets
|
Comorphisms/Prop2QBF.hs
|
gpl-2.0
|
-- | Helper for map sentence and map theory
trForm :: PBasic.FORMULA -> Result QBasic.FORMULA
trForm = return . trForm_
| 119
|
trForm :: PBasic.FORMULA -> Result QBasic.FORMULA
trForm = return . trForm_
| 75
|
trForm = return . trForm_
| 25
| true
| true
| 0
| 8
| 19
| 33
| 15
| 18
| null | null |
nushio3/ghc
|
compiler/deSugar/DsBinds.hs
|
bsd-3-clause
|
{-**********************************************************************
* *
Desugaring a MonoBinds
* *
**********************************************************************-}
-- | Desugar top level binds, strict binds are treated like normal
-- binds since there is no good time to force before first usage.
dsTopLHsBinds :: LHsBinds Id -> DsM (OrdList (Id,CoreExpr))
dsTopLHsBinds binds = fmap (toOL . snd) (ds_lhs_binds binds)
| 580
|
dsTopLHsBinds :: LHsBinds Id -> DsM (OrdList (Id,CoreExpr))
dsTopLHsBinds binds = fmap (toOL . snd) (ds_lhs_binds binds)
| 120
|
dsTopLHsBinds binds = fmap (toOL . snd) (ds_lhs_binds binds)
| 60
| true
| true
| 0
| 10
| 200
| 61
| 31
| 30
| null | null |
dylanmc/cryptol
|
src/Cryptol/ModuleSystem/Env.hs
|
bsd-3-clause
|
focusModule :: ModName -> ModuleEnv -> Maybe ModuleEnv
focusModule n me = do
guard (isLoaded n (meLoadedModules me))
return me { meFocusedModule = Just n }
-- | Get a list of all the loaded modules. Each module in the
-- resulting list depends only on other modules that precede it.
| 287
|
focusModule :: ModName -> ModuleEnv -> Maybe ModuleEnv
focusModule n me = do
guard (isLoaded n (meLoadedModules me))
return me { meFocusedModule = Just n }
-- | Get a list of all the loaded modules. Each module in the
-- resulting list depends only on other modules that precede it.
| 287
|
focusModule n me = do
guard (isLoaded n (meLoadedModules me))
return me { meFocusedModule = Just n }
-- | Get a list of all the loaded modules. Each module in the
-- resulting list depends only on other modules that precede it.
| 232
| false
| true
| 0
| 11
| 55
| 66
| 32
| 34
| null | null |
TomMD/ghc
|
compiler/typecheck/TcRnTypes.hs
|
bsd-3-clause
|
pprCtO :: CtOrigin -> SDoc -- Ones that are short one-liners
pprCtO (OccurrenceOf name) = hsep [ptext (sLit "a use of"), quotes (ppr name)]
| 142
|
pprCtO :: CtOrigin -> SDoc
pprCtO (OccurrenceOf name) = hsep [ptext (sLit "a use of"), quotes (ppr name)]
| 107
|
pprCtO (OccurrenceOf name) = hsep [ptext (sLit "a use of"), quotes (ppr name)]
| 80
| true
| true
| 0
| 9
| 26
| 57
| 27
| 30
| null | null |
roberth/uu-helium
|
lib/List.hs
|
gpl-3.0
|
zip5 :: [a] -> [b] -> [c] -> [d] -> [e] -> [(a,b,c,d,e)]
zip5 = zipWith5 (\a b c d e -> (a, b, c, d, e))
| 127
|
zip5 :: [a] -> [b] -> [c] -> [d] -> [e] -> [(a,b,c,d,e)]
zip5 = zipWith5 (\a b c d e -> (a, b, c, d, e))
| 127
|
zip5 = zipWith5 (\a b c d e -> (a, b, c, d, e))
| 59
| false
| true
| 0
| 13
| 49
| 105
| 59
| 46
| null | null |
phadej/typify-parser
|
hs/src/Language/Typify.hs
|
mit
|
closingBracket :: Parser ()
closingBracket = const () <$> lexeme (char ']') <?> "closing bracket"
| 97
|
closingBracket :: Parser ()
closingBracket = const () <$> lexeme (char ']') <?> "closing bracket"
| 97
|
closingBracket = const () <$> lexeme (char ']') <?> "closing bracket"
| 69
| false
| true
| 0
| 9
| 14
| 38
| 18
| 20
| null | null |
ssaavedra/liquidhaskell
|
src/Language/Haskell/Liquid/Desugar710/DsArrows.hs
|
bsd-3-clause
|
dsRecCmd
:: DsCmdEnv -- arrow combinators
-> IdSet -- set of local vars available to this statement
-> [CmdLStmt Id] -- list of statements inside the RecCmd
-> [Id] -- list of vars defined here and used later
-> [HsExpr Id] -- expressions corresponding to later_ids
-> [Id] -- list of vars fed back through the loop
-> [HsExpr Id] -- expressions corresponding to rec_ids
-> DsM (CoreExpr, -- desugared statement
IdSet, -- subset of local vars that occur free
[Id]) -- same local vars as a list
dsRecCmd ids local_vars stmts later_ids later_rets rec_ids rec_rets = do
let
later_id_set = mkVarSet later_ids
rec_id_set = mkVarSet rec_ids
local_vars' = rec_id_set `unionVarSet` later_id_set `unionVarSet` local_vars
-- mk_pair_fn = \ (out_ids) -> ((later_rets),(rec_rets))
core_later_rets <- mapM dsExpr later_rets
core_rec_rets <- mapM dsExpr rec_rets
let
-- possibly polymorphic version of vars of later_ids and rec_ids
out_ids = varSetElems (unionVarSets (map exprFreeIds (core_later_rets ++ core_rec_rets)))
out_ty = mkBigCoreVarTupTy out_ids
later_tuple = mkBigCoreTup core_later_rets
later_ty = mkBigCoreVarTupTy later_ids
rec_tuple = mkBigCoreTup core_rec_rets
rec_ty = mkBigCoreVarTupTy rec_ids
out_pair = mkCorePairExpr later_tuple rec_tuple
out_pair_ty = mkCorePairTy later_ty rec_ty
mk_pair_fn <- matchEnv out_ids out_pair
-- ss
(core_stmts, fv_stmts, env_ids) <- dsfixCmdStmts ids local_vars' out_ids stmts
-- squash_pair_fn = \ ((env1_ids), ~(rec_ids)) -> (env_ids)
rec_id <- newSysLocalDs rec_ty
let
env1_id_set = fv_stmts `minusVarSet` rec_id_set
env1_ids = varSetElems env1_id_set
env1_ty = mkBigCoreVarTupTy env1_ids
in_pair_ty = mkCorePairTy env1_ty rec_ty
core_body = mkBigCoreTup (map selectVar env_ids)
where
selectVar v
| v `elemVarSet` rec_id_set
= mkTupleSelector rec_ids v rec_id (Var rec_id)
| otherwise = Var v
squash_pair_fn <- matchEnvStack env1_ids rec_id core_body
-- loop (premap squash_pair_fn (ss >>> arr mk_pair_fn))
let
env_ty = mkBigCoreVarTupTy env_ids
core_loop = do_loop ids env1_ty later_ty rec_ty
(do_premap ids in_pair_ty env_ty out_pair_ty
squash_pair_fn
(do_compose ids env_ty out_ty out_pair_ty
core_stmts
(do_arr ids out_ty out_pair_ty mk_pair_fn)))
return (core_loop, env1_id_set, env1_ids)
{-
A sequence of statements (as in a rec) is desugared to an arrow between
two environments (no stack)
-}
| 2,973
|
dsRecCmd
:: DsCmdEnv -- arrow combinators
-> IdSet -- set of local vars available to this statement
-> [CmdLStmt Id] -- list of statements inside the RecCmd
-> [Id] -- list of vars defined here and used later
-> [HsExpr Id] -- expressions corresponding to later_ids
-> [Id] -- list of vars fed back through the loop
-> [HsExpr Id] -- expressions corresponding to rec_ids
-> DsM (CoreExpr, -- desugared statement
IdSet, -- subset of local vars that occur free
[Id])
dsRecCmd ids local_vars stmts later_ids later_rets rec_ids rec_rets = do
let
later_id_set = mkVarSet later_ids
rec_id_set = mkVarSet rec_ids
local_vars' = rec_id_set `unionVarSet` later_id_set `unionVarSet` local_vars
-- mk_pair_fn = \ (out_ids) -> ((later_rets),(rec_rets))
core_later_rets <- mapM dsExpr later_rets
core_rec_rets <- mapM dsExpr rec_rets
let
-- possibly polymorphic version of vars of later_ids and rec_ids
out_ids = varSetElems (unionVarSets (map exprFreeIds (core_later_rets ++ core_rec_rets)))
out_ty = mkBigCoreVarTupTy out_ids
later_tuple = mkBigCoreTup core_later_rets
later_ty = mkBigCoreVarTupTy later_ids
rec_tuple = mkBigCoreTup core_rec_rets
rec_ty = mkBigCoreVarTupTy rec_ids
out_pair = mkCorePairExpr later_tuple rec_tuple
out_pair_ty = mkCorePairTy later_ty rec_ty
mk_pair_fn <- matchEnv out_ids out_pair
-- ss
(core_stmts, fv_stmts, env_ids) <- dsfixCmdStmts ids local_vars' out_ids stmts
-- squash_pair_fn = \ ((env1_ids), ~(rec_ids)) -> (env_ids)
rec_id <- newSysLocalDs rec_ty
let
env1_id_set = fv_stmts `minusVarSet` rec_id_set
env1_ids = varSetElems env1_id_set
env1_ty = mkBigCoreVarTupTy env1_ids
in_pair_ty = mkCorePairTy env1_ty rec_ty
core_body = mkBigCoreTup (map selectVar env_ids)
where
selectVar v
| v `elemVarSet` rec_id_set
= mkTupleSelector rec_ids v rec_id (Var rec_id)
| otherwise = Var v
squash_pair_fn <- matchEnvStack env1_ids rec_id core_body
-- loop (premap squash_pair_fn (ss >>> arr mk_pair_fn))
let
env_ty = mkBigCoreVarTupTy env_ids
core_loop = do_loop ids env1_ty later_ty rec_ty
(do_premap ids in_pair_ty env_ty out_pair_ty
squash_pair_fn
(do_compose ids env_ty out_ty out_pair_ty
core_stmts
(do_arr ids out_ty out_pair_ty mk_pair_fn)))
return (core_loop, env1_id_set, env1_ids)
{-
A sequence of statements (as in a rec) is desugared to an arrow between
two environments (no stack)
-}
| 2,933
|
dsRecCmd ids local_vars stmts later_ids later_rets rec_ids rec_rets = do
let
later_id_set = mkVarSet later_ids
rec_id_set = mkVarSet rec_ids
local_vars' = rec_id_set `unionVarSet` later_id_set `unionVarSet` local_vars
-- mk_pair_fn = \ (out_ids) -> ((later_rets),(rec_rets))
core_later_rets <- mapM dsExpr later_rets
core_rec_rets <- mapM dsExpr rec_rets
let
-- possibly polymorphic version of vars of later_ids and rec_ids
out_ids = varSetElems (unionVarSets (map exprFreeIds (core_later_rets ++ core_rec_rets)))
out_ty = mkBigCoreVarTupTy out_ids
later_tuple = mkBigCoreTup core_later_rets
later_ty = mkBigCoreVarTupTy later_ids
rec_tuple = mkBigCoreTup core_rec_rets
rec_ty = mkBigCoreVarTupTy rec_ids
out_pair = mkCorePairExpr later_tuple rec_tuple
out_pair_ty = mkCorePairTy later_ty rec_ty
mk_pair_fn <- matchEnv out_ids out_pair
-- ss
(core_stmts, fv_stmts, env_ids) <- dsfixCmdStmts ids local_vars' out_ids stmts
-- squash_pair_fn = \ ((env1_ids), ~(rec_ids)) -> (env_ids)
rec_id <- newSysLocalDs rec_ty
let
env1_id_set = fv_stmts `minusVarSet` rec_id_set
env1_ids = varSetElems env1_id_set
env1_ty = mkBigCoreVarTupTy env1_ids
in_pair_ty = mkCorePairTy env1_ty rec_ty
core_body = mkBigCoreTup (map selectVar env_ids)
where
selectVar v
| v `elemVarSet` rec_id_set
= mkTupleSelector rec_ids v rec_id (Var rec_id)
| otherwise = Var v
squash_pair_fn <- matchEnvStack env1_ids rec_id core_body
-- loop (premap squash_pair_fn (ss >>> arr mk_pair_fn))
let
env_ty = mkBigCoreVarTupTy env_ids
core_loop = do_loop ids env1_ty later_ty rec_ty
(do_premap ids in_pair_ty env_ty out_pair_ty
squash_pair_fn
(do_compose ids env_ty out_ty out_pair_ty
core_stmts
(do_arr ids out_ty out_pair_ty mk_pair_fn)))
return (core_loop, env1_id_set, env1_ids)
{-
A sequence of statements (as in a rec) is desugared to an arrow between
two environments (no stack)
-}
| 2,273
| true
| true
| 0
| 16
| 952
| 517
| 264
| 253
| null | null |
sseefried/shady-graphics
|
src/Shady/Lighting.hs
|
agpl-3.0
|
-- | Or the N.H model:
specularNH :: FloatE -> Lighter Color
specularNH = specularG (lift surfN <.> eyeLight)
| 109
|
specularNH :: FloatE -> Lighter Color
specularNH = specularG (lift surfN <.> eyeLight)
| 86
|
specularNH = specularG (lift surfN <.> eyeLight)
| 48
| true
| true
| 0
| 8
| 18
| 32
| 16
| 16
| null | null |
tolysz/vector-algorithms
|
src/Data/Vector/Algorithms/Search.hs
|
bsd-3-clause
|
-- | Given a vector sorted with respect to a given comparison function in indices
-- in [l,u), finds an index in [l,u] at which the given element could be inserted
-- while preserving sortedness.
binarySearchByBounds :: (PrimMonad m, MVector v e)
=> Comparison e -> v (PrimState m) e -> e -> Int -> Int -> m Int
binarySearchByBounds cmp vec e = loop
where
loop !l !u
| u <= l = return l
| otherwise = do e' <- unsafeRead vec k
case cmp e' e of
LT -> loop (k+1) u
EQ -> return k
GT -> loop l k
where k = (u + l) `shiftR` 1
| 646
|
binarySearchByBounds :: (PrimMonad m, MVector v e)
=> Comparison e -> v (PrimState m) e -> e -> Int -> Int -> m Int
binarySearchByBounds cmp vec e = loop
where
loop !l !u
| u <= l = return l
| otherwise = do e' <- unsafeRead vec k
case cmp e' e of
LT -> loop (k+1) u
EQ -> return k
GT -> loop l k
where k = (u + l) `shiftR` 1
| 450
|
binarySearchByBounds cmp vec e = loop
where
loop !l !u
| u <= l = return l
| otherwise = do e' <- unsafeRead vec k
case cmp e' e of
LT -> loop (k+1) u
EQ -> return k
GT -> loop l k
where k = (u + l) `shiftR` 1
| 313
| true
| true
| 1
| 13
| 236
| 210
| 97
| 113
| null | null |
badp/ganeti
|
src/Ganeti/Constants.hs
|
gpl-2.0
|
valueNone :: String
valueNone = "none"
| 38
|
valueNone :: String
valueNone = "none"
| 38
|
valueNone = "none"
| 18
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
rasata/iyql
|
src/main/haskell/Yql/Data/PPrint.hs
|
gpl-3.0
|
style s (Space n d) = Space n (style s d)
| 46
|
style s (Space n d) = Space n (style s d)
| 46
|
style s (Space n d) = Space n (style s d)
| 46
| false
| false
| 0
| 7
| 15
| 32
| 15
| 17
| null | null |
Feeniks/wreq
|
tests/UnitTests.hs
|
bsd-3-clause
|
httpbinTestsWith verb site = commonTestsWith verb site <> [
]
| 63
|
httpbinTestsWith verb site = commonTestsWith verb site <> [
]
| 63
|
httpbinTestsWith verb site = commonTestsWith verb site <> [
]
| 63
| false
| false
| 0
| 6
| 11
| 22
| 10
| 12
| null | null |
davmre/matrizer
|
src/Matrizer/Derivatives.hs
|
gpl-2.0
|
depthHeuristic (IdentityLeaf _) = []
| 36
|
depthHeuristic (IdentityLeaf _) = []
| 36
|
depthHeuristic (IdentityLeaf _) = []
| 36
| false
| false
| 0
| 7
| 4
| 17
| 8
| 9
| null | null |
sgillespie/ghc
|
compiler/basicTypes/BasicTypes.hs
|
bsd-3-clause
|
defaultInlinePragma, alwaysInlinePragma, neverInlinePragma, dfunInlinePragma
:: InlinePragma
defaultInlinePragma = InlinePragma { inl_src = "{-# INLINE"
, inl_act = AlwaysActive
, inl_rule = FunLike
, inl_inline = EmptyInlineSpec
, inl_sat = Nothing }
| 393
|
defaultInlinePragma, alwaysInlinePragma, neverInlinePragma, dfunInlinePragma
:: InlinePragma
defaultInlinePragma = InlinePragma { inl_src = "{-# INLINE"
, inl_act = AlwaysActive
, inl_rule = FunLike
, inl_inline = EmptyInlineSpec
, inl_sat = Nothing }
| 393
|
defaultInlinePragma = InlinePragma { inl_src = "{-# INLINE"
, inl_act = AlwaysActive
, inl_rule = FunLike
, inl_inline = EmptyInlineSpec
, inl_sat = Nothing }
| 298
| false
| true
| 3
| 7
| 172
| 60
| 34
| 26
| null | null |
timthelion/fenfire
|
Fenfire/Main.hs
|
gpl-2.0
|
updatePropMenu propmenu actionGroup stateRef updateCanvas = do
state <- readIORef stateRef
Just addProp <- actionGroupGetAction actionGroup "addprop"
menu <- menuNew
forM (Set.toAscList $ fsProperties state) $ \prop -> do
item <- let ?graph = fsGraph state
in menuItemNewWithLabel $ getTextOrIRI prop
onActivateLeaf item $ do
modifyIORef stateRef $ \state' -> state' {fsProperty=prop}
updateCanvas False
menuShellAppend menu item
widgetShow item
sep <- separatorMenuItemNew
menuShellAppend menu sep
widgetShow sep
item <- actionCreateMenuItem addProp
menuShellAppend menu $ castToMenuItem item
menuItemSetSubmenu propmenu menu
| 762
|
updatePropMenu propmenu actionGroup stateRef updateCanvas = do
state <- readIORef stateRef
Just addProp <- actionGroupGetAction actionGroup "addprop"
menu <- menuNew
forM (Set.toAscList $ fsProperties state) $ \prop -> do
item <- let ?graph = fsGraph state
in menuItemNewWithLabel $ getTextOrIRI prop
onActivateLeaf item $ do
modifyIORef stateRef $ \state' -> state' {fsProperty=prop}
updateCanvas False
menuShellAppend menu item
widgetShow item
sep <- separatorMenuItemNew
menuShellAppend menu sep
widgetShow sep
item <- actionCreateMenuItem addProp
menuShellAppend menu $ castToMenuItem item
menuItemSetSubmenu propmenu menu
| 762
|
updatePropMenu propmenu actionGroup stateRef updateCanvas = do
state <- readIORef stateRef
Just addProp <- actionGroupGetAction actionGroup "addprop"
menu <- menuNew
forM (Set.toAscList $ fsProperties state) $ \prop -> do
item <- let ?graph = fsGraph state
in menuItemNewWithLabel $ getTextOrIRI prop
onActivateLeaf item $ do
modifyIORef stateRef $ \state' -> state' {fsProperty=prop}
updateCanvas False
menuShellAppend menu item
widgetShow item
sep <- separatorMenuItemNew
menuShellAppend menu sep
widgetShow sep
item <- actionCreateMenuItem addProp
menuShellAppend menu $ castToMenuItem item
menuItemSetSubmenu propmenu menu
| 762
| false
| false
| 0
| 17
| 214
| 207
| 88
| 119
| null | null |
MP2E/XMonadContrib
|
XMonad/Actions/DynamicWorkspaceGroups.hs
|
bsd-3-clause
|
withWSG :: (M.Map WSGroupId WSGroup -> M.Map WSGroupId WSGroup) -> WSGroupStorage -> WSGroupStorage
withWSG f = WSG . f . unWSG
| 127
|
withWSG :: (M.Map WSGroupId WSGroup -> M.Map WSGroupId WSGroup) -> WSGroupStorage -> WSGroupStorage
withWSG f = WSG . f . unWSG
| 127
|
withWSG f = WSG . f . unWSG
| 27
| false
| true
| 2
| 10
| 20
| 59
| 26
| 33
| null | null |
phaazon/OpenGLRaw
|
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
|
bsd-3-clause
|
gl_SHADOW_AMBIENT_SGIX :: GLenum
gl_SHADOW_AMBIENT_SGIX = 0x80BF
| 64
|
gl_SHADOW_AMBIENT_SGIX :: GLenum
gl_SHADOW_AMBIENT_SGIX = 0x80BF
| 64
|
gl_SHADOW_AMBIENT_SGIX = 0x80BF
| 31
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
zaxtax/hakaru
|
haskell/Language/Hakaru/CodeGen/Flatten.hs
|
bsd-3-clause
|
flattenWithName
:: ABT Term abt
=> abt '[] a
-> CodeGen CExpr
flattenWithName abt = flattenWithName' abt ""
| 113
|
flattenWithName
:: ABT Term abt
=> abt '[] a
-> CodeGen CExpr
flattenWithName abt = flattenWithName' abt ""
| 113
|
flattenWithName abt = flattenWithName' abt ""
| 45
| false
| true
| 0
| 10
| 23
| 48
| 21
| 27
| null | null |
Teaspot-Studio/bmstu-radio-problem-haste
|
Radio/Application.hs
|
bsd-3-clause
|
showResultsWidget :: Input -> PlotState -> Output -> Widget ()
showResultsWidget input plotState output = do
(dwidth, dheight) <- liftIO $ getDocumentSize
let (xsize, ysize) = inputFieldSize input
cellSize = fromIntegral dwidth * 0.45 / fromIntegral xsize
div ! atr "class" "row" <<< do
div ! atr "class" "col-md-6" <<< fieldShow input output cellSize
div ! atr "class" "col-md-6" <<< do
plotWidget plotState "Поколение" "Фитнес" (fromIntegral dwidth / 2, fromIntegral dheight / 2)
wraw $ div ! atr "class" "row-fluid" $ mconcat [
div ! atr "class" "col-md-6" $ inputInfo
, div ! atr "class" "col-md-6" $ optionsInfo
, div ! atr "class" "col-md-6" $ outputInfo
, div ! atr "class" "col-md-6" $ otherInfo
]
noWidget
where
opts = inputGeneticOptions input
showTower t = "x: " ++ show (towerX t) ++ " y: " ++ show (towerY t) ++ " r: " ++ show (towerRadius t)
showTower' t = "x: " ++ show (towerX t) ++ " y: " ++ show (towerY t)
inputInfo = panel "Входные данные" $ mconcat [
labelRow 4 "Размер поля:" $ show $ inputFieldSize input
, labelRow 4 "Возможные башни:" $ show $ showTower <$> inputTowers input
]
optionsInfo = panel "Настройки эволюции" $ mconcat [
labelRow 4 "Шанс мутации: " $ show $ mutationChance opts
, labelRow 4 "Часть элиты: " $ show $ elitePart opts
, labelRow 4 "Максимальное число поколений: " $ show $ maxGeneration opts
, labelRow 4 "Кол-во популяций: " $ show $ popCount opts
, labelRow 4 "Кол-во индивидов в популяции: " $ show $ indCount opts
]
outputInfo = panel "Результаты эволюции" $ mconcat [
labelRow 4 "Лучший фитнес: " $ show $ outputFitness output
, labelRow 4 "Лучшее решение: " $ show $ showTower' <$> outputTowers output
]
otherInfo = panel "Другая информация" $ mconcat [
labelRow 4 "Башен использовано: " $ show $ length $ outputTowers output
, labelRow 4 "Башен всего: " $ show $ length $ inputTowers input
, labelRow 4"Лучшее покрытие: " $ show $ calcCoverage' input $ outputTowers output
]
| 2,146
|
showResultsWidget :: Input -> PlotState -> Output -> Widget ()
showResultsWidget input plotState output = do
(dwidth, dheight) <- liftIO $ getDocumentSize
let (xsize, ysize) = inputFieldSize input
cellSize = fromIntegral dwidth * 0.45 / fromIntegral xsize
div ! atr "class" "row" <<< do
div ! atr "class" "col-md-6" <<< fieldShow input output cellSize
div ! atr "class" "col-md-6" <<< do
plotWidget plotState "Поколение" "Фитнес" (fromIntegral dwidth / 2, fromIntegral dheight / 2)
wraw $ div ! atr "class" "row-fluid" $ mconcat [
div ! atr "class" "col-md-6" $ inputInfo
, div ! atr "class" "col-md-6" $ optionsInfo
, div ! atr "class" "col-md-6" $ outputInfo
, div ! atr "class" "col-md-6" $ otherInfo
]
noWidget
where
opts = inputGeneticOptions input
showTower t = "x: " ++ show (towerX t) ++ " y: " ++ show (towerY t) ++ " r: " ++ show (towerRadius t)
showTower' t = "x: " ++ show (towerX t) ++ " y: " ++ show (towerY t)
inputInfo = panel "Входные данные" $ mconcat [
labelRow 4 "Размер поля:" $ show $ inputFieldSize input
, labelRow 4 "Возможные башни:" $ show $ showTower <$> inputTowers input
]
optionsInfo = panel "Настройки эволюции" $ mconcat [
labelRow 4 "Шанс мутации: " $ show $ mutationChance opts
, labelRow 4 "Часть элиты: " $ show $ elitePart opts
, labelRow 4 "Максимальное число поколений: " $ show $ maxGeneration opts
, labelRow 4 "Кол-во популяций: " $ show $ popCount opts
, labelRow 4 "Кол-во индивидов в популяции: " $ show $ indCount opts
]
outputInfo = panel "Результаты эволюции" $ mconcat [
labelRow 4 "Лучший фитнес: " $ show $ outputFitness output
, labelRow 4 "Лучшее решение: " $ show $ showTower' <$> outputTowers output
]
otherInfo = panel "Другая информация" $ mconcat [
labelRow 4 "Башен использовано: " $ show $ length $ outputTowers output
, labelRow 4 "Башен всего: " $ show $ length $ inputTowers input
, labelRow 4"Лучшее покрытие: " $ show $ calcCoverage' input $ outputTowers output
]
| 2,146
|
showResultsWidget input plotState output = do
(dwidth, dheight) <- liftIO $ getDocumentSize
let (xsize, ysize) = inputFieldSize input
cellSize = fromIntegral dwidth * 0.45 / fromIntegral xsize
div ! atr "class" "row" <<< do
div ! atr "class" "col-md-6" <<< fieldShow input output cellSize
div ! atr "class" "col-md-6" <<< do
plotWidget plotState "Поколение" "Фитнес" (fromIntegral dwidth / 2, fromIntegral dheight / 2)
wraw $ div ! atr "class" "row-fluid" $ mconcat [
div ! atr "class" "col-md-6" $ inputInfo
, div ! atr "class" "col-md-6" $ optionsInfo
, div ! atr "class" "col-md-6" $ outputInfo
, div ! atr "class" "col-md-6" $ otherInfo
]
noWidget
where
opts = inputGeneticOptions input
showTower t = "x: " ++ show (towerX t) ++ " y: " ++ show (towerY t) ++ " r: " ++ show (towerRadius t)
showTower' t = "x: " ++ show (towerX t) ++ " y: " ++ show (towerY t)
inputInfo = panel "Входные данные" $ mconcat [
labelRow 4 "Размер поля:" $ show $ inputFieldSize input
, labelRow 4 "Возможные башни:" $ show $ showTower <$> inputTowers input
]
optionsInfo = panel "Настройки эволюции" $ mconcat [
labelRow 4 "Шанс мутации: " $ show $ mutationChance opts
, labelRow 4 "Часть элиты: " $ show $ elitePart opts
, labelRow 4 "Максимальное число поколений: " $ show $ maxGeneration opts
, labelRow 4 "Кол-во популяций: " $ show $ popCount opts
, labelRow 4 "Кол-во индивидов в популяции: " $ show $ indCount opts
]
outputInfo = panel "Результаты эволюции" $ mconcat [
labelRow 4 "Лучший фитнес: " $ show $ outputFitness output
, labelRow 4 "Лучшее решение: " $ show $ showTower' <$> outputTowers output
]
otherInfo = panel "Другая информация" $ mconcat [
labelRow 4 "Башен использовано: " $ show $ length $ outputTowers output
, labelRow 4 "Башен всего: " $ show $ length $ inputTowers input
, labelRow 4"Лучшее покрытие: " $ show $ calcCoverage' input $ outputTowers output
]
| 2,083
| false
| true
| 6
| 19
| 554
| 682
| 322
| 360
| null | null |
urv/fixhs
|
src/Data/FIX/Spec/FIX41.hs
|
lgpl-2.1
|
mOrderCancelReject :: FIXMessageSpec
mOrderCancelReject = FMSpec
{ msName = "OrderCancelReject"
, msType = C.pack "9"
, msHeader = headerFIX41
, msBody = mOrderCancelRejectBody
, msTrailer = trailerFIX41 }
where
mOrderCancelRejectBody =
LT.insert (tnum tOrderID) tOrderID $
LT.insert (tnum tSecondaryOrderID) tSecondaryOrderID $
LT.insert (tnum tClOrdID) tClOrdID $
LT.insert (tnum tOrigClOrdID) tOrigClOrdID $
LT.insert (tnum tOrdStatus) tOrdStatus $
LT.insert (tnum tClientID) tClientID $
LT.insert (tnum tExecBroker) tExecBroker $
LT.insert (tnum tListID) tListID $
LT.insert (tnum tCxlRejReason) tCxlRejReason $
LT.insert (tnum tText) tText LT.new
| 739
|
mOrderCancelReject :: FIXMessageSpec
mOrderCancelReject = FMSpec
{ msName = "OrderCancelReject"
, msType = C.pack "9"
, msHeader = headerFIX41
, msBody = mOrderCancelRejectBody
, msTrailer = trailerFIX41 }
where
mOrderCancelRejectBody =
LT.insert (tnum tOrderID) tOrderID $
LT.insert (tnum tSecondaryOrderID) tSecondaryOrderID $
LT.insert (tnum tClOrdID) tClOrdID $
LT.insert (tnum tOrigClOrdID) tOrigClOrdID $
LT.insert (tnum tOrdStatus) tOrdStatus $
LT.insert (tnum tClientID) tClientID $
LT.insert (tnum tExecBroker) tExecBroker $
LT.insert (tnum tListID) tListID $
LT.insert (tnum tCxlRejReason) tCxlRejReason $
LT.insert (tnum tText) tText LT.new
| 739
|
mOrderCancelReject = FMSpec
{ msName = "OrderCancelReject"
, msType = C.pack "9"
, msHeader = headerFIX41
, msBody = mOrderCancelRejectBody
, msTrailer = trailerFIX41 }
where
mOrderCancelRejectBody =
LT.insert (tnum tOrderID) tOrderID $
LT.insert (tnum tSecondaryOrderID) tSecondaryOrderID $
LT.insert (tnum tClOrdID) tClOrdID $
LT.insert (tnum tOrigClOrdID) tOrigClOrdID $
LT.insert (tnum tOrdStatus) tOrdStatus $
LT.insert (tnum tClientID) tClientID $
LT.insert (tnum tExecBroker) tExecBroker $
LT.insert (tnum tListID) tListID $
LT.insert (tnum tCxlRejReason) tCxlRejReason $
LT.insert (tnum tText) tText LT.new
| 702
| false
| true
| 0
| 16
| 168
| 229
| 114
| 115
| null | null |
smaccm/capDL-tool
|
CapDL/State.hs
|
bsd-2-clause
|
koType (PT {}) = PT_T
| 21
|
koType (PT {}) = PT_T
| 21
|
koType (PT {}) = PT_T
| 21
| false
| false
| 0
| 7
| 4
| 16
| 8
| 8
| null | null |
brendanhay/gogol
|
gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types/Product.hs
|
mpl-2.0
|
-- | The email address of the user when the subscription was purchased. Only
-- present for purchases made with \'Subscribe with Google\'.
spEmailAddress :: Lens' SubscriptionPurchase (Maybe Text)
spEmailAddress
= lens _spEmailAddress
(\ s a -> s{_spEmailAddress = a})
| 276
|
spEmailAddress :: Lens' SubscriptionPurchase (Maybe Text)
spEmailAddress
= lens _spEmailAddress
(\ s a -> s{_spEmailAddress = a})
| 137
|
spEmailAddress
= lens _spEmailAddress
(\ s a -> s{_spEmailAddress = a})
| 79
| true
| true
| 0
| 9
| 47
| 49
| 26
| 23
| null | null |
seereason/cabal
|
Cabal/Distribution/PackageDescription/Parse.hs
|
bsd-3-clause
|
deprecField _ = cabalBug "'deprecField' called on a non-field"
| 62
|
deprecField _ = cabalBug "'deprecField' called on a non-field"
| 62
|
deprecField _ = cabalBug "'deprecField' called on a non-field"
| 62
| false
| false
| 0
| 5
| 8
| 12
| 5
| 7
| null | null |
brendanhay/gogol
|
gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs
|
mpl-2.0
|
-- | Analytics data request query parameters.
gdQuery :: Lens' GaData (Maybe GaDataQuery)
gdQuery = lens _gdQuery (\ s a -> s{_gdQuery = a})
| 140
|
gdQuery :: Lens' GaData (Maybe GaDataQuery)
gdQuery = lens _gdQuery (\ s a -> s{_gdQuery = a})
| 94
|
gdQuery = lens _gdQuery (\ s a -> s{_gdQuery = a})
| 50
| true
| true
| 0
| 9
| 23
| 46
| 25
| 21
| null | null |
pxqr/intset
|
tests/Main.hs
|
bsd-3-clause
|
prop_minIsTheLess :: IntSet -> Bool
prop_minIsTheLess s
| S.null s = True
| otherwise = all (findMin s <=) (toList s)
| 122
|
prop_minIsTheLess :: IntSet -> Bool
prop_minIsTheLess s
| S.null s = True
| otherwise = all (findMin s <=) (toList s)
| 122
|
prop_minIsTheLess s
| S.null s = True
| otherwise = all (findMin s <=) (toList s)
| 86
| false
| true
| 0
| 9
| 25
| 58
| 27
| 31
| null | null |
ganeti/ganeti
|
test/hs/Test/Ganeti/HTools/Graph.hs
|
bsd-2-clause
|
case_emptyVertColorMapNull :: Assertion
case_emptyVertColorMapNull = assertBool "" $ IntMap.null emptyVertColorMap
| 114
|
case_emptyVertColorMapNull :: Assertion
case_emptyVertColorMapNull = assertBool "" $ IntMap.null emptyVertColorMap
| 114
|
case_emptyVertColorMapNull = assertBool "" $ IntMap.null emptyVertColorMap
| 74
| false
| true
| 0
| 7
| 9
| 23
| 11
| 12
| null | null |
M42/mikrokosmos
|
source/Interpreter.hs
|
gpl-3.0
|
-- | Execute a block of code in a given environment
executeWithEnv :: Environment -> String -> (String, Environment)
executeWithEnv initEnv block = do
let parsing = map (parse actionParser "" . preformat) . filter (/="") . lines $ block
let actions = mapMaybe (\x -> case x of
Left _ -> Nothing
Right a -> Just a) parsing
case runState (multipleAct actions) initEnv of
(outputs, env) -> (unlines outputs, env)
-- | Default environment plus standard libraries
| 528
|
executeWithEnv :: Environment -> String -> (String, Environment)
executeWithEnv initEnv block = do
let parsing = map (parse actionParser "" . preformat) . filter (/="") . lines $ block
let actions = mapMaybe (\x -> case x of
Left _ -> Nothing
Right a -> Just a) parsing
case runState (multipleAct actions) initEnv of
(outputs, env) -> (unlines outputs, env)
-- | Default environment plus standard libraries
| 476
|
executeWithEnv initEnv block = do
let parsing = map (parse actionParser "" . preformat) . filter (/="") . lines $ block
let actions = mapMaybe (\x -> case x of
Left _ -> Nothing
Right a -> Just a) parsing
case runState (multipleAct actions) initEnv of
(outputs, env) -> (unlines outputs, env)
-- | Default environment plus standard libraries
| 411
| true
| true
| 0
| 17
| 147
| 167
| 82
| 85
| null | null |
kearnh/HToyRayTracer
|
src/KDTree.hs
|
bsd-3-clause
|
(</>) :: (a -> Integer) -> (a -> Integer) -> a -> Double
(</>) = let x // y = fromIntegral x / fromIntegral y
in liftOp (//)
| 133
|
(</>) :: (a -> Integer) -> (a -> Integer) -> a -> Double
(</>) = let x // y = fromIntegral x / fromIntegral y
in liftOp (//)
| 133
|
(</>) = let x // y = fromIntegral x / fromIntegral y
in liftOp (//)
| 76
| false
| true
| 0
| 10
| 36
| 73
| 38
| 35
| null | null |
VictorDenisov/keystone
|
src/Keystone/Web/Auth.hs
|
gpl-2.0
|
guardAdminToken :: Verifier -> Verifier
guardAdminToken v r MT.AdminToken = True
| 80
|
guardAdminToken :: Verifier -> Verifier
guardAdminToken v r MT.AdminToken = True
| 80
|
guardAdminToken v r MT.AdminToken = True
| 40
| false
| true
| 0
| 6
| 10
| 24
| 12
| 12
| null | null |
sdiehl/ghc
|
compiler/deSugar/DsArrows.hs
|
bsd-3-clause
|
-- D; xs |-a c : () --> t
-- --------------------------
-- D; xs |-a do { c } : t
--
-- ---> premap (\ (xs) -> ((xs), ())) c
dsCmdDo ids local_vars res_ty [L loc (LastStmt _ body _ _)] env_ids = do
putSrcSpanDs loc $ dsNoLevPoly res_ty
(text "In the command:" <+> ppr body)
(core_body, env_ids') <- dsLCmd ids local_vars unitTy res_ty body env_ids
let env_ty = mkBigCoreVarTupTy env_ids
env_var <- newSysLocalDs env_ty
let core_map = Lam env_var (mkCorePairExpr (Var env_var) mkCoreUnitExpr)
return (do_premap ids
env_ty
(mkCorePairTy env_ty unitTy)
res_ty
core_map
core_body,
env_ids')
| 777
|
dsCmdDo ids local_vars res_ty [L loc (LastStmt _ body _ _)] env_ids = do
putSrcSpanDs loc $ dsNoLevPoly res_ty
(text "In the command:" <+> ppr body)
(core_body, env_ids') <- dsLCmd ids local_vars unitTy res_ty body env_ids
let env_ty = mkBigCoreVarTupTy env_ids
env_var <- newSysLocalDs env_ty
let core_map = Lam env_var (mkCorePairExpr (Var env_var) mkCoreUnitExpr)
return (do_premap ids
env_ty
(mkCorePairTy env_ty unitTy)
res_ty
core_map
core_body,
env_ids')
| 638
|
dsCmdDo ids local_vars res_ty [L loc (LastStmt _ body _ _)] env_ids = do
putSrcSpanDs loc $ dsNoLevPoly res_ty
(text "In the command:" <+> ppr body)
(core_body, env_ids') <- dsLCmd ids local_vars unitTy res_ty body env_ids
let env_ty = mkBigCoreVarTupTy env_ids
env_var <- newSysLocalDs env_ty
let core_map = Lam env_var (mkCorePairExpr (Var env_var) mkCoreUnitExpr)
return (do_premap ids
env_ty
(mkCorePairTy env_ty unitTy)
res_ty
core_map
core_body,
env_ids')
| 638
| true
| false
| 0
| 14
| 286
| 182
| 86
| 96
| null | null |
mcschroeder/ghc
|
compiler/prelude/TysWiredIn.hs
|
bsd-3-clause
|
promotedGTDataCon = promoteDataCon gtDataCon
| 48
|
promotedGTDataCon = promoteDataCon gtDataCon
| 48
|
promotedGTDataCon = promoteDataCon gtDataCon
| 48
| false
| false
| 0
| 5
| 7
| 9
| 4
| 5
| null | null |
krisajenkins/BellRinger
|
src/HTML.hs
|
epl-1.0
|
simpleTableBodyRow :: TableDef a -> a -> HTML
simpleTableBodyRow tableDef x =
tr (map cell tableDef)
where cell (_,f) = td [span (f x)]
| 139
|
simpleTableBodyRow :: TableDef a -> a -> HTML
simpleTableBodyRow tableDef x =
tr (map cell tableDef)
where cell (_,f) = td [span (f x)]
| 139
|
simpleTableBodyRow tableDef x =
tr (map cell tableDef)
where cell (_,f) = td [span (f x)]
| 93
| false
| true
| 0
| 9
| 27
| 75
| 35
| 40
| null | null |
adarqui/99problems-hs
|
Experimentation/P03.hs
|
gpl-3.0
|
test_elementAt_nat = TestCase $ do
assertEqual "for (test_elementAt_nat 9 [1..10])" (Just 10) (elementAt_nat 9 [1..10])
assertEqual "for (test_elementAt_nat 9 [0..10])" (Just 9) (elementAt_nat 9 [0..10])
| 205
|
test_elementAt_nat = TestCase $ do
assertEqual "for (test_elementAt_nat 9 [1..10])" (Just 10) (elementAt_nat 9 [1..10])
assertEqual "for (test_elementAt_nat 9 [0..10])" (Just 9) (elementAt_nat 9 [0..10])
| 205
|
test_elementAt_nat = TestCase $ do
assertEqual "for (test_elementAt_nat 9 [1..10])" (Just 10) (elementAt_nat 9 [1..10])
assertEqual "for (test_elementAt_nat 9 [0..10])" (Just 9) (elementAt_nat 9 [0..10])
| 205
| false
| false
| 0
| 11
| 26
| 68
| 33
| 35
| null | null |
GaloisInc/halvm-ghc
|
compiler/main/DynFlags.hs
|
bsd-3-clause
|
checkTemplateHaskellOk _turn_on
= getCurLoc >>= \l -> upd (\d -> d { thOnLoc = l })
| 85
|
checkTemplateHaskellOk _turn_on
= getCurLoc >>= \l -> upd (\d -> d { thOnLoc = l })
| 85
|
checkTemplateHaskellOk _turn_on
= getCurLoc >>= \l -> upd (\d -> d { thOnLoc = l })
| 85
| false
| false
| 3
| 10
| 17
| 42
| 21
| 21
| null | null |
mrjones/workouts
|
src/Workouts.hs
|
mit
|
dataTableHtml :: User -> User -> [(Run, RunMeta)] -> NominalDiffTime -> String -> Bool -> H.Html
dataTableHtml loggedInUser displayUser rs t currentSort currentReverse =
H.html $ do
headHtml "Run data"
H.body $ do
headerBarHtml loggedInUser displayUser
H.table ! A.class_ "datatable" $ do
dataTableHeader currentSort currentReverse
mapM_ dataTableRow (reverse rs)
H.div ! A.id "chart_div" $ ""
H.div ! A.id "debug" $ H.toHtml $ ("Server time: " ++ (show t))
| 507
|
dataTableHtml :: User -> User -> [(Run, RunMeta)] -> NominalDiffTime -> String -> Bool -> H.Html
dataTableHtml loggedInUser displayUser rs t currentSort currentReverse =
H.html $ do
headHtml "Run data"
H.body $ do
headerBarHtml loggedInUser displayUser
H.table ! A.class_ "datatable" $ do
dataTableHeader currentSort currentReverse
mapM_ dataTableRow (reverse rs)
H.div ! A.id "chart_div" $ ""
H.div ! A.id "debug" $ H.toHtml $ ("Server time: " ++ (show t))
| 507
|
dataTableHtml loggedInUser displayUser rs t currentSort currentReverse =
H.html $ do
headHtml "Run data"
H.body $ do
headerBarHtml loggedInUser displayUser
H.table ! A.class_ "datatable" $ do
dataTableHeader currentSort currentReverse
mapM_ dataTableRow (reverse rs)
H.div ! A.id "chart_div" $ ""
H.div ! A.id "debug" $ H.toHtml $ ("Server time: " ++ (show t))
| 410
| false
| true
| 0
| 16
| 117
| 183
| 86
| 97
| null | null |
rueshyna/gogol
|
gogol-games/gen/Network/Google/Games/Types/Product.hs
|
mpl-2.0
|
-- | The author of the application.
aAuthor :: Lens' Application (Maybe Text)
aAuthor = lens _aAuthor (\ s a -> s{_aAuthor = a})
| 128
|
aAuthor :: Lens' Application (Maybe Text)
aAuthor = lens _aAuthor (\ s a -> s{_aAuthor = a})
| 92
|
aAuthor = lens _aAuthor (\ s a -> s{_aAuthor = a})
| 50
| true
| true
| 0
| 9
| 23
| 46
| 25
| 21
| null | null |
phischu/fragnix
|
tests/packages/scotty/Control.Concurrent.Lifted.hs
|
bsd-3-clause
|
-- | Generalized version of 'C.forkOn'.
--
-- Note that, while the forked computation @m ()@ has access to the captured
-- state, all its side-effects in @m@ are discarded. It is run only for its
-- side-effects in 'IO'.
forkOn :: MonadBaseControl IO m => Int -> m () -> m ThreadId
forkOn = liftBaseDiscard . C.forkOn
| 317
|
forkOn :: MonadBaseControl IO m => Int -> m () -> m ThreadId
forkOn = liftBaseDiscard . C.forkOn
| 96
|
forkOn = liftBaseDiscard . C.forkOn
| 35
| true
| true
| 0
| 10
| 57
| 53
| 26
| 27
| null | null |
paul-rouse/persistent
|
persistent/Database/Persist/Types/Base.hs
|
mit
|
entityKeyFields :: EntityDef -> NonEmpty FieldDef
entityKeyFields =
entitiesPrimary
| 87
|
entityKeyFields :: EntityDef -> NonEmpty FieldDef
entityKeyFields =
entitiesPrimary
| 87
|
entityKeyFields =
entitiesPrimary
| 37
| false
| true
| 0
| 6
| 12
| 18
| 9
| 9
| null | null |
joelwilliamson/jcc
|
Parser/Language.hs
|
gpl-3.0
|
shiftOps = makeOp "<<" LShift <|> makeOp ">>" RShift
| 52
|
shiftOps = makeOp "<<" LShift <|> makeOp ">>" RShift
| 52
|
shiftOps = makeOp "<<" LShift <|> makeOp ">>" RShift
| 52
| false
| false
| 0
| 6
| 8
| 20
| 9
| 11
| null | null |
brendanhay/gogol
|
gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types/Product.hs
|
mpl-2.0
|
-- | Creates a value of 'Setting' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'setEtag'
--
-- * 'setKind'
--
-- * 'setValue'
--
-- * 'setId'
setting
:: Setting
setting =
Setting'
{ _setEtag = Nothing
, _setKind = "calendar#setting"
, _setValue = Nothing
, _setId = Nothing
}
| 389
|
setting
:: Setting
setting =
Setting'
{ _setEtag = Nothing
, _setKind = "calendar#setting"
, _setValue = Nothing
, _setId = Nothing
}
| 159
|
setting =
Setting'
{ _setEtag = Nothing
, _setKind = "calendar#setting"
, _setValue = Nothing
, _setId = Nothing
}
| 136
| true
| true
| 0
| 7
| 94
| 58
| 36
| 22
| null | null |
lukexi/ghc-7.8-arm64
|
compiler/main/DynFlags.hs
|
bsd-3-clause
|
-- | These @-d\<blah\>@ flags can all be reversed with @-dno-\<blah\>@
dFlags :: [FlagSpec GeneralFlag]
dFlags = [
( "suppress-coercions", Opt_SuppressCoercions, nop),
( "suppress-var-kinds", Opt_SuppressVarKinds, nop),
( "suppress-module-prefixes", Opt_SuppressModulePrefixes, nop),
( "suppress-type-applications", Opt_SuppressTypeApplications, nop),
( "suppress-idinfo", Opt_SuppressIdInfo, nop),
( "suppress-type-signatures", Opt_SuppressTypeSignatures, nop),
( "suppress-uniques", Opt_SuppressUniques, nop),
( "ppr-case-as-let", Opt_PprCaseAsLet, nop)]
| 738
|
dFlags :: [FlagSpec GeneralFlag]
dFlags = [
( "suppress-coercions", Opt_SuppressCoercions, nop),
( "suppress-var-kinds", Opt_SuppressVarKinds, nop),
( "suppress-module-prefixes", Opt_SuppressModulePrefixes, nop),
( "suppress-type-applications", Opt_SuppressTypeApplications, nop),
( "suppress-idinfo", Opt_SuppressIdInfo, nop),
( "suppress-type-signatures", Opt_SuppressTypeSignatures, nop),
( "suppress-uniques", Opt_SuppressUniques, nop),
( "ppr-case-as-let", Opt_PprCaseAsLet, nop)]
| 667
|
dFlags = [
( "suppress-coercions", Opt_SuppressCoercions, nop),
( "suppress-var-kinds", Opt_SuppressVarKinds, nop),
( "suppress-module-prefixes", Opt_SuppressModulePrefixes, nop),
( "suppress-type-applications", Opt_SuppressTypeApplications, nop),
( "suppress-idinfo", Opt_SuppressIdInfo, nop),
( "suppress-type-signatures", Opt_SuppressTypeSignatures, nop),
( "suppress-uniques", Opt_SuppressUniques, nop),
( "ppr-case-as-let", Opt_PprCaseAsLet, nop)]
| 634
| true
| true
| 0
| 8
| 231
| 121
| 75
| 46
| null | null |
BartAdv/Idris-dev
|
src/Idris/Core/Elaborate.hs
|
bsd-3-clause
|
processTactic' :: Tactic -> Elab' aux ()
processTactic' t = do ES (p, a) logs prev <- get
(p', log) <- lift $ processTactic t p
put (ES (p', a) (logs ++ log) prev)
return $! ()
| 242
|
processTactic' :: Tactic -> Elab' aux ()
processTactic' t = do ES (p, a) logs prev <- get
(p', log) <- lift $ processTactic t p
put (ES (p', a) (logs ++ log) prev)
return $! ()
| 242
|
processTactic' t = do ES (p, a) logs prev <- get
(p', log) <- lift $ processTactic t p
put (ES (p', a) (logs ++ log) prev)
return $! ()
| 201
| false
| true
| 0
| 11
| 102
| 110
| 53
| 57
| null | null |
ganeti-github-testing/ganeti-test-1
|
src/Ganeti/OpCodes.hs
|
bsd-2-clause
|
opSummaryVal OpInstanceConsole { opInstanceName = s } = Just s
| 62
|
opSummaryVal OpInstanceConsole { opInstanceName = s } = Just s
| 62
|
opSummaryVal OpInstanceConsole { opInstanceName = s } = Just s
| 62
| false
| false
| 0
| 8
| 9
| 21
| 10
| 11
| null | null |
gbaz/haskell-platform
|
hptool/src/Config.hs
|
bsd-3-clause
|
-- | Provide the Platform release information
-- The release information will be tracked as a dependency
askBuildConfig :: Action BuildConfig
askBuildConfig = readOracle "BuildConfig" (BuildConfigQ ())
| 202
|
askBuildConfig :: Action BuildConfig
askBuildConfig = readOracle "BuildConfig" (BuildConfigQ ())
| 96
|
askBuildConfig = readOracle "BuildConfig" (BuildConfigQ ())
| 59
| true
| true
| 0
| 8
| 27
| 29
| 15
| 14
| null | null |
daleooo/barrelfish
|
tools/flounder/THCStubsBackend.hs
|
mit
|
end_send_fn_name = "thc_end_send"
| 33
|
end_send_fn_name = "thc_end_send"
| 33
|
end_send_fn_name = "thc_end_send"
| 33
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
JerryLeiDing/haskell-house-chores
|
Haskell-House-Chores.hs
|
gpl-3.0
|
parse ["-help"] = help >> exit
| 30
|
parse ["-help"] = help >> exit
| 30
|
parse ["-help"] = help >> exit
| 30
| false
| false
| 0
| 6
| 5
| 16
| 8
| 8
| null | null |
ku-fpg/kansas-amber
|
System/Hardware/Haskino/Protocol.hs
|
bsd-3-clause
|
packageExpr (CompW32 e) = packageSubExpr (exprCmdVal EXPR_WORD32 EXPR_COMP) e
| 77
|
packageExpr (CompW32 e) = packageSubExpr (exprCmdVal EXPR_WORD32 EXPR_COMP) e
| 77
|
packageExpr (CompW32 e) = packageSubExpr (exprCmdVal EXPR_WORD32 EXPR_COMP) e
| 77
| false
| false
| 0
| 7
| 8
| 28
| 13
| 15
| null | null |
luisgepeto/HaskellLearning
|
08 Own Types/03_type_paramters.hs
|
mit
|
demo6 = Vector 3 9 7 `vectMult` 10
| 34
|
demo6 = Vector 3 9 7 `vectMult` 10
| 34
|
demo6 = Vector 3 9 7 `vectMult` 10
| 34
| false
| false
| 0
| 6
| 7
| 19
| 10
| 9
| null | null |
relrod/chordpro
|
test/test.hs
|
bsd-2-clause
|
tests :: TestTree
tests = testGroup "Tests" [unitTests]
| 55
|
tests :: TestTree
tests = testGroup "Tests" [unitTests]
| 55
|
tests = testGroup "Tests" [unitTests]
| 37
| false
| true
| 0
| 6
| 7
| 19
| 10
| 9
| null | null |
myShoggoth/shakespeare
|
Text/Hamlet.hs
|
mit
|
varName :: Scope -> String -> Exp
varName _ "" = error "Illegal empty varName"
| 78
|
varName :: Scope -> String -> Exp
varName _ "" = error "Illegal empty varName"
| 78
|
varName _ "" = error "Illegal empty varName"
| 44
| false
| true
| 0
| 8
| 14
| 32
| 14
| 18
| null | null |
geophf/1HaskellADay
|
exercises/HAD/Data/Qubit.hs
|
mit
|
pauliX, pauliY, pauliZ :: PauliOperator
pauliX = POp (fromLists [[0,1],[1,0]])
| 78
|
pauliX, pauliY, pauliZ :: PauliOperator
pauliX = POp (fromLists [[0,1],[1,0]])
| 78
|
pauliX = POp (fromLists [[0,1],[1,0]])
| 38
| false
| true
| 0
| 9
| 9
| 42
| 26
| 16
| null | null |
kawu/crf-chain2-tiers
|
src/Data/CRF/Chain2/Tiers/Feature.hs
|
bsd-2-clause
|
----------------------------------------------------
-- Feature extraction
----------------------------------------------------
-- | Features present in the dataset element together with corresponding
-- occurence probabilities.
presentFeats :: Xs -> Ys -> [(Feat, L.LogFloat)]
presentFeats xs ys = concat
[ obFs i ++ trFs i
| i <- [0 .. V.length xs - 1] ]
where
obFs i =
[ (ft, pr)
| o <- unX (xs V.! i)
, (u, pr) <- unY (ys V.! i)
, ft <- obFeats o u ]
trFs 0 =
[ (ft, pr)
| (u, pr) <- unY (ys V.! 0)
, ft <- trFeats1 u ]
trFs 1 =
[ (ft, pr1 * pr2)
| (u, pr1) <- unY (ys V.! 1)
, (v, pr2) <- unY (ys V.! 0)
, ft <- trFeats2 u v ]
trFs i =
[ (ft, pr1 * pr2 * pr3)
| (u, pr1) <- unY (ys V.! i)
, (v, pr2) <- unY (ys V.! (i-1))
, (w, pr3) <- unY (ys V.! (i-2))
, ft <- trFeats3 u v w ]
-- | Features hidden in the dataset element.
| 987
|
presentFeats :: Xs -> Ys -> [(Feat, L.LogFloat)]
presentFeats xs ys = concat
[ obFs i ++ trFs i
| i <- [0 .. V.length xs - 1] ]
where
obFs i =
[ (ft, pr)
| o <- unX (xs V.! i)
, (u, pr) <- unY (ys V.! i)
, ft <- obFeats o u ]
trFs 0 =
[ (ft, pr)
| (u, pr) <- unY (ys V.! 0)
, ft <- trFeats1 u ]
trFs 1 =
[ (ft, pr1 * pr2)
| (u, pr1) <- unY (ys V.! 1)
, (v, pr2) <- unY (ys V.! 0)
, ft <- trFeats2 u v ]
trFs i =
[ (ft, pr1 * pr2 * pr3)
| (u, pr1) <- unY (ys V.! i)
, (v, pr2) <- unY (ys V.! (i-1))
, (w, pr3) <- unY (ys V.! (i-2))
, ft <- trFeats3 u v w ]
-- | Features hidden in the dataset element.
| 756
|
presentFeats xs ys = concat
[ obFs i ++ trFs i
| i <- [0 .. V.length xs - 1] ]
where
obFs i =
[ (ft, pr)
| o <- unX (xs V.! i)
, (u, pr) <- unY (ys V.! i)
, ft <- obFeats o u ]
trFs 0 =
[ (ft, pr)
| (u, pr) <- unY (ys V.! 0)
, ft <- trFeats1 u ]
trFs 1 =
[ (ft, pr1 * pr2)
| (u, pr1) <- unY (ys V.! 1)
, (v, pr2) <- unY (ys V.! 0)
, ft <- trFeats2 u v ]
trFs i =
[ (ft, pr1 * pr2 * pr3)
| (u, pr1) <- unY (ys V.! i)
, (v, pr2) <- unY (ys V.! (i-1))
, (w, pr3) <- unY (ys V.! (i-2))
, ft <- trFeats3 u v w ]
-- | Features hidden in the dataset element.
| 707
| true
| true
| 0
| 12
| 335
| 431
| 231
| 200
| null | null |
rasheedja/HaskellFromFirstPrinciples
|
Chapter5/typeKwonDo.hs
|
mit
|
xform :: (X, Y) -> (Z, Z)
xform xAndY = (xz (fst xAndY), yz (snd xAndY))
| 72
|
xform :: (X, Y) -> (Z, Z)
xform xAndY = (xz (fst xAndY), yz (snd xAndY))
| 72
|
xform xAndY = (xz (fst xAndY), yz (snd xAndY))
| 46
| false
| true
| 0
| 8
| 15
| 54
| 29
| 25
| null | null |
mightymoose/liquidhaskell
|
tests/pos/RBTree-col-height.hs
|
bsd-3-clause
|
bal x l r = Node B x l r
| 52
|
rbal x l r = Node B x l r
| 52
|
rbal x l r = Node B x l r
| 52
| false
| false
| 0
| 5
| 37
| 22
| 10
| 12
| null | null |
HJvT/hdirect
|
src/Parser.hs
|
bsd-3-clause
|
happyReduction_122 _ = notHappyAtAll
| 37
|
happyReduction_122 _ = notHappyAtAll
| 37
|
happyReduction_122 _ = notHappyAtAll
| 37
| false
| false
| 0
| 5
| 4
| 9
| 4
| 5
| null | null |
robinp/haskell-indexer
|
haskell-indexer-pipeline-ghckythe-wrapper/src/Language/Haskell/Indexer/Args.hs
|
apache-2.0
|
ndex :: [String] -> Flags -> IO ()
index args fs = do
lock <- newMVar ()
withErrorHandler $ indexX (ghcToKythe lock) args fs
where
withErrorHandler :: IO a -> IO a
withErrorHandler = defaultErrorHandler defaultFatalMessager defaultFlushOut
| 258
|
index :: [String] -> Flags -> IO ()
index args fs = do
lock <- newMVar ()
withErrorHandler $ indexX (ghcToKythe lock) args fs
where
withErrorHandler :: IO a -> IO a
withErrorHandler = defaultErrorHandler defaultFatalMessager defaultFlushOut
| 258
|
index args fs = do
lock <- newMVar ()
withErrorHandler $ indexX (ghcToKythe lock) args fs
where
withErrorHandler :: IO a -> IO a
withErrorHandler = defaultErrorHandler defaultFatalMessager defaultFlushOut
| 222
| false
| true
| 0
| 10
| 55
| 92
| 43
| 49
| null | null |
gilith/hol
|
src/HOL/Type.hs
|
mit
|
isInd :: Type -> Bool
isInd = isNullaryOp TypeOp.ind
| 52
|
isInd :: Type -> Bool
isInd = isNullaryOp TypeOp.ind
| 52
|
isInd = isNullaryOp TypeOp.ind
| 30
| false
| true
| 0
| 7
| 8
| 26
| 11
| 15
| null | null |
markflorisson/hpack
|
testrepo/bytestring-0.10.4.1/Data/ByteString/Builder/Prim/Internal.hs
|
bsd-3-clause
|
eitherB :: BoundedPrim a -> BoundedPrim b -> BoundedPrim (Either a b)
eitherB (BP b1 io1) (BP b2 io2) =
BP (max b1 b2)
(\x op -> case x of Left x1 -> io1 x1 op; Right x2 -> io2 x2 op)
| 195
|
eitherB :: BoundedPrim a -> BoundedPrim b -> BoundedPrim (Either a b)
eitherB (BP b1 io1) (BP b2 io2) =
BP (max b1 b2)
(\x op -> case x of Left x1 -> io1 x1 op; Right x2 -> io2 x2 op)
| 195
|
eitherB (BP b1 io1) (BP b2 io2) =
BP (max b1 b2)
(\x op -> case x of Left x1 -> io1 x1 op; Right x2 -> io2 x2 op)
| 125
| false
| true
| 0
| 11
| 53
| 119
| 55
| 64
| null | null |
trskop/hs-not-found
|
not-found/test/TestCase/Data/Functor/FlipT.hs
|
bsd-3-clause
|
restrict :: Either Int Int -> Either Int Int
restrict = id
| 58
|
restrict :: Either Int Int -> Either Int Int
restrict = id
| 58
|
restrict = id
| 13
| false
| true
| 0
| 6
| 11
| 25
| 12
| 13
| null | null |
obgs/utils
|
src/Obgs/Utils/HashMap.hs
|
mit
|
unionWithMonoid' :: (Eq k, Hashable k, Monoid m, Monoid m')
=> (m -> m' -> a)
-> HM.HashMap k m
-> HM.HashMap k m'
-> HM.HashMap k a
unionWithMonoid' f = unionWith' $ \x y -> f (F.fold x) (F.fold y)
| 262
|
unionWithMonoid' :: (Eq k, Hashable k, Monoid m, Monoid m')
=> (m -> m' -> a)
-> HM.HashMap k m
-> HM.HashMap k m'
-> HM.HashMap k a
unionWithMonoid' f = unionWith' $ \x y -> f (F.fold x) (F.fold y)
| 262
|
unionWithMonoid' f = unionWith' $ \x y -> f (F.fold x) (F.fold y)
| 65
| false
| true
| 0
| 11
| 104
| 121
| 59
| 62
| null | null |
utsav2601/cmpe295A
|
tools/flounder/GHBackend.hs
|
mit
|
------------------------------------------------------------------------
-- Language mapping: Create the generic header file for the interface
------------------------------------------------------------------------
compile :: String -> String -> Interface -> String
compile infile outfile interface =
unlines $ C.pp_unit $ intf_header_file infile interface
| 363
|
compile :: String -> String -> Interface -> String
compile infile outfile interface =
unlines $ C.pp_unit $ intf_header_file infile interface
| 146
|
compile infile outfile interface =
unlines $ C.pp_unit $ intf_header_file infile interface
| 95
| true
| true
| 0
| 7
| 39
| 48
| 25
| 23
| null | null |
KHs000/haskellToys
|
src/scripts/H-99.hs
|
mit
|
equ' a b = a == b
| 18
|
equ' a b = a == b
| 18
|
equ' a b = a == b
| 18
| false
| false
| 2
| 5
| 7
| 23
| 8
| 15
| null | null |
DougBurke/swish
|
tests/GraphTest.hs
|
lgpl-2.1
|
l12 = LF "l10-xml-fr"
| 21
|
l12 = LF "l10-xml-fr"
| 21
|
l12 = LF "l10-xml-fr"
| 21
| false
| false
| 1
| 5
| 3
| 12
| 4
| 8
| null | null |
kishoredbn/barrelfish
|
tools/sockeye/v1/SockeyeParser.hs
|
mit
|
importPath = many (identLetter <|> char '/') <* whiteSpace
| 62
|
importPath = many (identLetter <|> char '/') <* whiteSpace
| 62
|
importPath = many (identLetter <|> char '/') <* whiteSpace
| 62
| false
| false
| 0
| 9
| 12
| 23
| 11
| 12
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.