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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pparkkin/eta | compiler/ETA/Prelude/PrelNames.hs | bsd-3-clause | k1TyConKey = mkPreludeTyConUnique 139 | 40 | k1TyConKey = mkPreludeTyConUnique 139 | 40 | k1TyConKey = mkPreludeTyConUnique 139 | 40 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
flowbox-public/accelerate-cuda | Data/Array/Accelerate/CUDA/Foreign/Export.hs | bsd-3-clause | genCompileFun :: Name -> String -> Type -> Q [Dec]
genCompileFun fname ename (AppT (AppT ArrowT (AppT _ _)) (AppT _ _))
= sequence [sig, dec, expt]
where
initName = mkName ename
body = [| \hndl -> buildExported hndl $(varE fname) |]
dec = FunD initName . (:[]) <$> cls
cls = Clause [] <$> (NormalB... | 507 | genCompileFun :: Name -> String -> Type -> Q [Dec]
genCompileFun fname ename (AppT (AppT ArrowT (AppT _ _)) (AppT _ _))
= sequence [sig, dec, expt]
where
initName = mkName ename
body = [| \hndl -> buildExported hndl $(varE fname) |]
dec = FunD initName . (:[]) <$> cls
cls = Clause [] <$> (NormalB... | 507 | genCompileFun fname ename (AppT (AppT ArrowT (AppT _ _)) (AppT _ _))
= sequence [sig, dec, expt]
where
initName = mkName ename
body = [| \hndl -> buildExported hndl $(varE fname) |]
dec = FunD initName . (:[]) <$> cls
cls = Clause [] <$> (NormalB <$> body) <*> return []
sig = SigD initName <... | 456 | false | true | 6 | 12 | 125 | 207 | 107 | 100 | null | null |
s9gf4ult/jfprrd | src/JFP/Cmd.hs | bsd-3-clause | cutPrefixes :: (Eq a) => [[a]] -> [[a]]
cutPrefixes ls = map (drop $ length prefix) ls
where
prefix = case ls of
(a:b:as) -> foldl' commonPrefix a (b:as)
(_:[]) -> []
[] -> [] | 207 | cutPrefixes :: (Eq a) => [[a]] -> [[a]]
cutPrefixes ls = map (drop $ length prefix) ls
where
prefix = case ls of
(a:b:as) -> foldl' commonPrefix a (b:as)
(_:[]) -> []
[] -> [] | 207 | cutPrefixes ls = map (drop $ length prefix) ls
where
prefix = case ls of
(a:b:as) -> foldl' commonPrefix a (b:as)
(_:[]) -> []
[] -> [] | 167 | false | true | 0 | 10 | 66 | 124 | 65 | 59 | null | null |
mookerji/libsbp | haskell/src/SwiftNav/SBP/Observation.hs | lgpl-3.0 | msgEphemeris :: Word16
msgEphemeris = 0x0047 | 44 | msgEphemeris :: Word16
msgEphemeris = 0x0047 | 44 | msgEphemeris = 0x0047 | 21 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
DiegoNolan/Asciify | Asciify.hs | mit | aSToA (Blank, Dark, Light, Dark) = 'J' | 40 | aSToA (Blank, Dark, Light, Dark) = 'J' | 40 | aSToA (Blank, Dark, Light, Dark) = 'J' | 40 | false | false | 0 | 5 | 8 | 22 | 12 | 10 | null | null |
tumarkin/vandelay | src/Vandelay/App/Cmd/Make.hs | bsd-3-clause | doTableCommand (Template t) = tellLn =<< doSubstitution <$> (lift . safeReadFile $ t) <*> askSubstitutions | 106 | doTableCommand (Template t) = tellLn =<< doSubstitution <$> (lift . safeReadFile $ t) <*> askSubstitutions | 106 | doTableCommand (Template t) = tellLn =<< doSubstitution <$> (lift . safeReadFile $ t) <*> askSubstitutions | 106 | false | false | 0 | 9 | 14 | 39 | 19 | 20 | null | null |
jwiegley/ghc-release | libraries/base/GHC/IO/Handle.hs | gpl-3.0 | hDuplicateTo h1@(DuplexHandle path r1 w1) h2@(DuplexHandle _ r2 w2) = do
withHandle__' "hDuplicateTo" h2 w2 $ \w2_ -> do
_ <- hClose_help w2_
withHandle_' "hDuplicateTo" h1 w1 $ \w1_ -> do
dupHandleTo path h1 Nothing w2_ w1_ (Just handleFinalizer)
withHandle__' "hDuplicateTo" h2 r2 $ \r2_ -> do
_ <- ... | 436 | hDuplicateTo h1@(DuplexHandle path r1 w1) h2@(DuplexHandle _ r2 w2) = do
withHandle__' "hDuplicateTo" h2 w2 $ \w2_ -> do
_ <- hClose_help w2_
withHandle_' "hDuplicateTo" h1 w1 $ \w1_ -> do
dupHandleTo path h1 Nothing w2_ w1_ (Just handleFinalizer)
withHandle__' "hDuplicateTo" h2 r2 $ \r2_ -> do
_ <- ... | 436 | hDuplicateTo h1@(DuplexHandle path r1 w1) h2@(DuplexHandle _ r2 w2) = do
withHandle__' "hDuplicateTo" h2 w2 $ \w2_ -> do
_ <- hClose_help w2_
withHandle_' "hDuplicateTo" h1 w1 $ \w1_ -> do
dupHandleTo path h1 Nothing w2_ w1_ (Just handleFinalizer)
withHandle__' "hDuplicateTo" h2 r2 $ \r2_ -> do
_ <- ... | 436 | false | false | 0 | 17 | 93 | 177 | 83 | 94 | null | null |
roelvandijk/ftdi | System/FTDI/Internal.hs | bsd-3-clause | setLatencyTimer ∷ InterfaceHandle → Word8 → IO ()
setLatencyTimer ifHnd latency = control ifHnd reqSetLatencyTimer
$ fromIntegral latency | 177 | setLatencyTimer ∷ InterfaceHandle → Word8 → IO ()
setLatencyTimer ifHnd latency = control ifHnd reqSetLatencyTimer
$ fromIntegral latency | 177 | setLatencyTimer ifHnd latency = control ifHnd reqSetLatencyTimer
$ fromIntegral latency | 127 | false | true | 0 | 9 | 57 | 45 | 20 | 25 | null | null |
f-me/snap-core | src/Snap/Types/Headers.hs | bsd-3-clause | fromList :: [(CI ByteString, ByteString)] -> Headers
fromList = foldl' f empty
where
f m (k,v) = insert k v m | 115 | fromList :: [(CI ByteString, ByteString)] -> Headers
fromList = foldl' f empty
where
f m (k,v) = insert k v m | 115 | fromList = foldl' f empty
where
f m (k,v) = insert k v m | 62 | false | true | 0 | 8 | 26 | 57 | 30 | 27 | null | null |
sashabu/libcspm | src/CSPM/Evaluator/PatBind.hs | bsd-3-clause | fieldsConsumed (An _ _ (PDoublePattern p1 p2)) = fieldsConsumed p1 `max` fieldsConsumed p2 | 90 | fieldsConsumed (An _ _ (PDoublePattern p1 p2)) = fieldsConsumed p1 `max` fieldsConsumed p2 | 90 | fieldsConsumed (An _ _ (PDoublePattern p1 p2)) = fieldsConsumed p1 `max` fieldsConsumed p2 | 90 | false | false | 0 | 9 | 12 | 39 | 19 | 20 | null | null |
wouwouwou/2017_module_8 | src/haskell/PP-project-2017/Checker.hs | apache-2.0 | -- Closes a scope
closeScope :: CheckType -> CheckType
closeScope self@(_,_,[],_) = error $ "No scopes left to close, in Checker.closeScope, with: " ++ (show self) | 166 | closeScope :: CheckType -> CheckType
closeScope self@(_,_,[],_) = error $ "No scopes left to close, in Checker.closeScope, with: " ++ (show self) | 148 | closeScope self@(_,_,[],_) = error $ "No scopes left to close, in Checker.closeScope, with: " ++ (show self) | 111 | true | true | 1 | 10 | 28 | 59 | 29 | 30 | null | null |
jtdaugherty/rules | src/Data/Validation/Rules.hs | bsd-3-clause | apply n (Compose r2 r1) = do
v <- apply n r1
apply v r2 | 59 | apply n (Compose r2 r1) = do
v <- apply n r1
apply v r2 | 59 | apply n (Compose r2 r1) = do
v <- apply n r1
apply v r2 | 59 | false | false | 0 | 8 | 18 | 41 | 17 | 24 | null | null |
ku-fpg/kansas-amber | tests/TransTests/TransRecurLetTestE.hs | bsd-3-clause | recurProgE :: Arduino (Expr ())
recurProgE = do
setPinModeE led OUTPUT
setPinModeE button1 INPUT
setPinModeE button2 INPUT
wait
blink 2
wait
blink 3
return LitUnit
where
wait :: Arduino (Expr ())
wait = iterateE LitUnit (\x -> do
b <- digitalReadE button1
... | 1,098 | recurProgE :: Arduino (Expr ())
recurProgE = do
setPinModeE led OUTPUT
setPinModeE button1 INPUT
setPinModeE button2 INPUT
wait
blink 2
wait
blink 3
return LitUnit
where
wait :: Arduino (Expr ())
wait = iterateE LitUnit (\x -> do
b <- digitalReadE button1
... | 1,098 | recurProgE = do
setPinModeE led OUTPUT
setPinModeE button1 INPUT
setPinModeE button2 INPUT
wait
blink 2
wait
blink 3
return LitUnit
where
wait :: Arduino (Expr ())
wait = iterateE LitUnit (\x -> do
b <- digitalReadE button1
ifThenElseEither b (re... | 1,066 | false | true | 5 | 14 | 609 | 263 | 124 | 139 | null | null |
patrikja/progolymp | open/towers/Main.hs | bsd-3-clause | {-
-- This helper function is in Data.List now but was not in the version used by Kattis (ghc-7.6.3)
sortOn :: Ord b => (a->b) -> [a] -> [a]
sortOn f = sortBy (compare `on` f)
-}
showPT :: PowerTower -> String
showPT = concat . intersperse "^" . map show | 255 | showPT :: PowerTower -> String
showPT = concat . intersperse "^" . map show | 75 | showPT = concat . intersperse "^" . map show | 44 | true | true | 0 | 7 | 51 | 30 | 15 | 15 | null | null |
phunehehe/hpack | test/Hpack/ConfigSpec.hs | mit | library :: Library
library = Library [] [] | 42 | library :: Library
library = Library [] [] | 42 | library = Library [] [] | 23 | false | true | 0 | 6 | 7 | 20 | 10 | 10 | null | null |
scslab/iterIO | Data/IterIO/Iter.hs | bsd-3-clause | reRunIter r = Iter $ runIterR r | 39 | reRunIter r = Iter $ runIterR r | 39 | reRunIter r = Iter $ runIterR r | 39 | false | false | 0 | 6 | 14 | 16 | 7 | 9 | null | null |
Fermat/FCR | src/Fcr/Syntax.hs | gpl-3.0 | freeVar (PApp f1 f2) = (freeVar f1) `S.union` (freeVar f2) | 58 | freeVar (PApp f1 f2) = (freeVar f1) `S.union` (freeVar f2) | 58 | freeVar (PApp f1 f2) = (freeVar f1) `S.union` (freeVar f2) | 58 | false | false | 0 | 7 | 9 | 37 | 19 | 18 | null | null |
vincenthz/cryptonite | tests/KAT_KMAC.hs | bsd-3-clause | macIncrementalTests :: [TestTree]
macIncrementalTests =
[ testIncrProperties "SHAKE128_256" (SHAKE128 :: SHAKE128 256)
, testIncrProperties "SHAKE256_512" (SHAKE256 :: SHAKE256 512)
]
where
testIncrProperties :: KMAC.HashSHAKE a => TestName -> a -> TestTree
testIncrProperties name a = test... | 915 | macIncrementalTests :: [TestTree]
macIncrementalTests =
[ testIncrProperties "SHAKE128_256" (SHAKE128 :: SHAKE128 256)
, testIncrProperties "SHAKE256_512" (SHAKE256 :: SHAKE256 512)
]
where
testIncrProperties :: KMAC.HashSHAKE a => TestName -> a -> TestTree
testIncrProperties name a = test... | 915 | macIncrementalTests =
[ testIncrProperties "SHAKE128_256" (SHAKE128 :: SHAKE128 256)
, testIncrProperties "SHAKE256_512" (SHAKE256 :: SHAKE256 512)
]
where
testIncrProperties :: KMAC.HashSHAKE a => TestName -> a -> TestTree
testIncrProperties name a = testGroup name
[ testPrope... | 881 | false | true | 14 | 14 | 226 | 275 | 138 | 137 | null | null |
tr00per/roguelike0 | src/Roguelike/Dungeon.hs | bsd-2-clause | south coords = coords { getY = getY coords + 1 } | 48 | south coords = coords { getY = getY coords + 1 } | 48 | south coords = coords { getY = getY coords + 1 } | 48 | false | false | 0 | 8 | 11 | 24 | 12 | 12 | null | null |
brendanhay/gogol | gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/Folders/Move.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
fmUploadType :: Lens' FoldersMove (Maybe Text)
fmUploadType
= lens _fmUploadType (\ s a -> s{_fmUploadType = a}) | 185 | fmUploadType :: Lens' FoldersMove (Maybe Text)
fmUploadType
= lens _fmUploadType (\ s a -> s{_fmUploadType = a}) | 114 | fmUploadType
= lens _fmUploadType (\ s a -> s{_fmUploadType = a}) | 67 | true | true | 0 | 9 | 28 | 48 | 25 | 23 | null | null |
tippenein/shifts | src/Shifts/Server.hs | mit | runServer :: Port -> IO ()
runServer port = run port app | 56 | runServer :: Port -> IO ()
runServer port = run port app | 56 | runServer port = run port app | 29 | false | true | 0 | 8 | 11 | 33 | 14 | 19 | null | null |
matonix/pfds | src/PFDS/Sec9/Ex12.hs | bsd-3-clause | fixup (Threes i : Four : ds) = Threes i : Two : simpleInc ds | 60 | fixup (Threes i : Four : ds) = Threes i : Two : simpleInc ds | 60 | fixup (Threes i : Four : ds) = Threes i : Two : simpleInc ds | 60 | false | false | 0 | 8 | 14 | 37 | 17 | 20 | null | null |
sinelaw/lamdu | Lamdu/Sugar/Convert/Infer.hs | gpl-3.0 | exprIRef ::
Lens.Traversal'
(Expr.Expression def (Payload i (Maybe (Stored m)) a))
(ExprIRef.ExpressionIM m)
exprIRef = exprStored . Lens._Just . Property.pVal | 165 | exprIRef ::
Lens.Traversal'
(Expr.Expression def (Payload i (Maybe (Stored m)) a))
(ExprIRef.ExpressionIM m)
exprIRef = exprStored . Lens._Just . Property.pVal | 165 | exprIRef = exprStored . Lens._Just . Property.pVal | 50 | false | true | 0 | 12 | 25 | 71 | 35 | 36 | null | null |
jbracker/supermonad-plugin | examples/monad/hmtc/supermonad/Type.hs | bsd-3-clause | rcdType _ = False | 24 | rcdType _ = False | 24 | rcdType _ = False | 24 | false | false | 0 | 4 | 10 | 10 | 4 | 6 | null | null |
chadbrewbaker/shellcheck | ShellCheck/Parser.hs | gpl-3.0 | prop_readIoNumberRedirect2 = isOk readIoNumberRedirect "2> lol" | 63 | prop_readIoNumberRedirect2 = isOk readIoNumberRedirect "2> lol" | 63 | prop_readIoNumberRedirect2 = isOk readIoNumberRedirect "2> lol" | 63 | false | false | 0 | 5 | 5 | 11 | 5 | 6 | null | null |
zeekay/lambdabot | Plugin/Pl/Common.hs | mit | getExpr (TLE e) = (e, TLE) | 31 | getExpr (TLE e) = (e, TLE) | 31 | getExpr (TLE e) = (e, TLE) | 31 | false | false | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
iblumenfeld/cryptol | src/Cryptol/REPL/Command.hs | bsd-3-clause | -- Utilities -------------------------------------------------------------------
isNamePrefix :: String -> P.QName -> Bool
isNamePrefix pfx n = case n of
P.QName _ (P.Name _) -> pfx `isPrefixOf` pretty n
_ -> False
{-
printWarning :: (Range,Warning) -> IO ()
printWarning = print . ppWarning
pr... | 435 | isNamePrefix :: String -> P.QName -> Bool
isNamePrefix pfx n = case n of
P.QName _ (P.Name _) -> pfx `isPrefixOf` pretty n
_ -> False
{-
printWarning :: (Range,Warning) -> IO ()
printWarning = print . ppWarning
printError :: (Range,Error) -> IO ()
printError = print . ppError
-}
-- | Lift a pa... | 353 | isNamePrefix pfx n = case n of
P.QName _ (P.Name _) -> pfx `isPrefixOf` pretty n
_ -> False
{-
printWarning :: (Range,Warning) -> IO ()
printWarning = print . ppWarning
printError :: (Range,Error) -> IO ()
printError = print . ppError
-}
-- | Lift a parsing action into the REPL monad. | 311 | true | true | 0 | 11 | 89 | 69 | 36 | 33 | null | null |
Fuuzetsu/yi-emacs-colours | src/Yi/Style/EmacsColours.hs | gpl-2.0 | -- | Names: @["grey36"]@
--
-- R92 G92 B92, 0x5c5c5c
grey36 :: Color
grey36 = RGB 92 92 92 | 90 | grey36 :: Color
grey36 = RGB 92 92 92 | 37 | grey36 = RGB 92 92 92 | 21 | true | true | 0 | 6 | 18 | 27 | 13 | 14 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/cabal-install/Distribution/Client/Setup.hs | bsd-3-clause | globalCommand :: [Command action] -> CommandUI GlobalFlags
globalCommand commands = CommandUI {
commandName = "",
commandSynopsis =
"Command line interface to the Haskell Cabal infrastructure.",
commandUsage = \pname ->
"See http://www.haskell.org/cabal/ for more informa... | 6,252 | globalCommand :: [Command action] -> CommandUI GlobalFlags
globalCommand commands = CommandUI {
commandName = "",
commandSynopsis =
"Command line interface to the Haskell Cabal infrastructure.",
commandUsage = \pname ->
"See http://www.haskell.org/cabal/ for more informa... | 6,252 | globalCommand commands = CommandUI {
commandName = "",
commandSynopsis =
"Command line interface to the Haskell Cabal infrastructure.",
commandUsage = \pname ->
"See http://www.haskell.org/cabal/ for more information.\n"
++ "\n"
++ "Usage: " ++ pname ++ " [GL... | 6,193 | false | true | 0 | 38 | 2,297 | 1,329 | 724 | 605 | null | null |
donnie4w/tim | protocols/gen-hs/Tim_Types.hs | apache-2.0 | encode_TimTime :: (T.Protocol p, T.Transport t) => p t -> TimTime -> LBS.ByteString
encode_TimTime oprot record = T.serializeVal oprot $ from_TimTime record | 156 | encode_TimTime :: (T.Protocol p, T.Transport t) => p t -> TimTime -> LBS.ByteString
encode_TimTime oprot record = T.serializeVal oprot $ from_TimTime record | 156 | encode_TimTime oprot record = T.serializeVal oprot $ from_TimTime record | 72 | false | true | 0 | 8 | 21 | 60 | 29 | 31 | null | null |
eightyeight/atom-msp430 | Language/Atom/MSP430/Watchdog.hs | mit | -- Stop the watchdog timer.
wdtNMIFalling = 0x0040 :: Word16 | 63 | wdtNMIFalling = 0x0040 :: Word16 | 35 | wdtNMIFalling = 0x0040 :: Word16 | 35 | true | false | 0 | 4 | 12 | 10 | 6 | 4 | null | null |
noughtmare/yi | yi-keymap-vim/src/Yi/Keymap/Vim/Digraph.hs | gpl-2.0 | -- LATIN SMALL LETTER P WITH ACUTE
switch 'P' '.' = '\x1E56' | 60 | switch 'P' '.' = '\x1E56' | 25 | switch 'P' '.' = '\x1E56' | 25 | true | false | 0 | 5 | 11 | 12 | 6 | 6 | null | null |
rahulmutt/ghcvm | libraries/base/Data/Semigroup.hs | bsd-3-clause | option :: b -> (a -> b) -> Option a -> b
option n j (Option m) = maybe n j m | 76 | option :: b -> (a -> b) -> Option a -> b
option n j (Option m) = maybe n j m | 76 | option n j (Option m) = maybe n j m | 35 | false | true | 0 | 8 | 21 | 53 | 26 | 27 | null | null |
Athas/banko | barc/Barc/Parser.hs | bsd-2-clause | andP :: Parser Exp
andP = do
symbol "and"
And <$> expP <*> expP | 67 | andP :: Parser Exp
andP = do
symbol "and"
And <$> expP <*> expP | 67 | andP = do
symbol "and"
And <$> expP <*> expP | 48 | false | true | 0 | 8 | 17 | 31 | 14 | 17 | null | null |
ocean0yohsuke/deepcontrol | DeepControl/Monad/Trans/Except.hs | bsd-3-clause | ---------------------------------------------------------------
-- Level-2
throwError2 :: (MonadError e m2, Applicative m1) => e -> m1 (m2 a)
throwError2 = (.*) |$> throwError | 176 | throwError2 :: (MonadError e m2, Applicative m1) => e -> m1 (m2 a)
throwError2 = (.*) |$> throwError | 100 | throwError2 = (.*) |$> throwError | 33 | true | true | 0 | 9 | 21 | 49 | 27 | 22 | null | null |
barrucadu/nagi | lib/Imageboard/Moderation.hs | mit | renameBoard :: BoardName -> LoginId -> BoardId -> SqlPersistT IO (Either SomeException ())
renameBoard boardname loginid boardid = try $ do
boardmay <- get boardid
case boardmay of
Just board ->
staffAction loginid (capBoardAdministration boardid)
("renamed board /" <> boardName board <>... | 503 | renameBoard :: BoardName -> LoginId -> BoardId -> SqlPersistT IO (Either SomeException ())
renameBoard boardname loginid boardid = try $ do
boardmay <- get boardid
case boardmay of
Just board ->
staffAction loginid (capBoardAdministration boardid)
("renamed board /" <> boardName board <>... | 503 | renameBoard boardname loginid boardid = try $ do
boardmay <- get boardid
case boardmay of
Just board ->
staffAction loginid (capBoardAdministration boardid)
("renamed board /" <> boardName board <> "/ to /" <> boardname <> "/")
(update boardid [BoardName =. boardname])
... | 412 | false | true | 0 | 18 | 122 | 144 | 68 | 76 | null | null |
kumasento/accelerate | Data/Array/Accelerate/Analysis/Match.hs | bsd-3-clause | -- Match reified type dictionaries
--
matchScalarType :: ScalarType s -> ScalarType t -> Maybe (s :=: t)
matchScalarType (NumScalarType s) (NumScalarType t) = matchNumType s t | 181 | matchScalarType :: ScalarType s -> ScalarType t -> Maybe (s :=: t)
matchScalarType (NumScalarType s) (NumScalarType t) = matchNumType s t | 143 | matchScalarType (NumScalarType s) (NumScalarType t) = matchNumType s t | 76 | true | true | 0 | 9 | 32 | 59 | 29 | 30 | null | null |
CindyLinz/Haskell.js | trans/src/Desugar/PatBind.hs | mit | dePatBindExp (RightArrApp l exp1 exp2) = RightArrApp (id l) (dePatBindExp exp1) (dePatBindExp exp2) | 99 | dePatBindExp (RightArrApp l exp1 exp2) = RightArrApp (id l) (dePatBindExp exp1) (dePatBindExp exp2) | 99 | dePatBindExp (RightArrApp l exp1 exp2) = RightArrApp (id l) (dePatBindExp exp1) (dePatBindExp exp2) | 99 | false | false | 0 | 7 | 12 | 44 | 21 | 23 | null | null |
tomwadeson/adventofcode | 01.hs | mit | fromString :: String -> Maybe [Bracket]
fromString = traverse fromChar | 70 | fromString :: String -> Maybe [Bracket]
fromString = traverse fromChar | 70 | fromString = traverse fromChar | 30 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
kazu-yamamoto/http2 | bench-priority/Main.hs | bsd-3-clause | enqdeqAIO :: [(Key,Weight)] -> IO ()
enqdeqAIO xs = do
q <- AIO.new
_ <- createAIO xs q
loop q numOfTrials
where
loop _ 0 = return ()
loop q !n = do
Just ent <- AIO.dequeue q
_ <- AIO.enqueue ent q
loop q (n - 1) | 259 | enqdeqAIO :: [(Key,Weight)] -> IO ()
enqdeqAIO xs = do
q <- AIO.new
_ <- createAIO xs q
loop q numOfTrials
where
loop _ 0 = return ()
loop q !n = do
Just ent <- AIO.dequeue q
_ <- AIO.enqueue ent q
loop q (n - 1) | 259 | enqdeqAIO xs = do
q <- AIO.new
_ <- createAIO xs q
loop q numOfTrials
where
loop _ 0 = return ()
loop q !n = do
Just ent <- AIO.dequeue q
_ <- AIO.enqueue ent q
loop q (n - 1) | 222 | false | true | 1 | 10 | 94 | 141 | 62 | 79 | null | null |
bgamari/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | acute 'S' = "Ś" | 15 | acute 'S' = "Ś" | 15 | acute 'S' = "Ś" | 15 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
grandpascorpion/canon | Math/NumberTheory/Canon.hs | gpl-3.0 | addH, multH, expH, addH', multH', expH' :: Canon -> Canon -> Canon
(addH, multH, expH) = (prep addH', prep multH', prep expH') | 126 | addH, multH, expH, addH', multH', expH' :: Canon -> Canon -> Canon
(addH, multH, expH) = (prep addH', prep multH', prep expH') | 126 | (addH, multH, expH) = (prep addH', prep multH', prep expH') | 59 | false | true | 6 | 7 | 21 | 70 | 35 | 35 | null | null |
wxwxwwxxx/ghc | libraries/base/tests/IO/encoding005.hs | bsd-3-clause | -- Tests for single-byte encodings that map directly to Unicode
-- (module GHC.IO.Encoding.Latin1)
eitherToMaybe :: Either a b -> Maybe b
eitherToMaybe (Left _) = Nothing | 171 | eitherToMaybe :: Either a b -> Maybe b
eitherToMaybe (Left _) = Nothing | 71 | eitherToMaybe (Left _) = Nothing | 32 | true | true | 0 | 7 | 26 | 34 | 17 | 17 | null | null |
noteed/intake | Intake/Core.hs | bsd-3-clause | status' :: WorkflowState -> WStatus
status' s = case s of
SSingle _ _ Completed -> WCompleted
SSingle l _ Started -> WStarted [l]
SSequence a b -> case (status' a, status' b) of
(WCompleted, WCompleted) -> WCompleted
(WInstanciated, WInstanciated) -> WInstanciated
(WStarted as, WStarted bs) -> WStarte... | 942 | status' :: WorkflowState -> WStatus
status' s = case s of
SSingle _ _ Completed -> WCompleted
SSingle l _ Started -> WStarted [l]
SSequence a b -> case (status' a, status' b) of
(WCompleted, WCompleted) -> WCompleted
(WInstanciated, WInstanciated) -> WInstanciated
(WStarted as, WStarted bs) -> WStarte... | 942 | status' s = case s of
SSingle _ _ Completed -> WCompleted
SSingle l _ Started -> WStarted [l]
SSequence a b -> case (status' a, status' b) of
(WCompleted, WCompleted) -> WCompleted
(WInstanciated, WInstanciated) -> WInstanciated
(WStarted as, WStarted bs) -> WStarted $ as ++ bs -- I guess this can't h... | 906 | false | true | 7 | 9 | 207 | 367 | 189 | 178 | null | null |
davidzhulijun/TAM | RegisterMachine/Models/CMA13.hs | bsd-3-clause | mach :: RM1 (Lang Int) ListMem (CMAState Int SingleLoc ListMem (Address Int))
mach = RM prog initedCMA (compile trans) | 118 | mach :: RM1 (Lang Int) ListMem (CMAState Int SingleLoc ListMem (Address Int))
mach = RM prog initedCMA (compile trans) | 118 | mach = RM prog initedCMA (compile trans) | 40 | false | true | 1 | 9 | 18 | 63 | 27 | 36 | null | null |
stmfunk/laughing-dangerzone | exercise-1-1.hs | gpl-2.0 | c = putStrLn "C!" | 17 | c = putStrLn "C!" | 17 | c = putStrLn "C!" | 17 | false | false | 1 | 5 | 3 | 12 | 4 | 8 | null | null |
BartAdv/clientsession | src/Web/ClientSession.hs | bsd-2-clause | aesRef :: I.IORef AESState
aesRef = unsafePerformIO $ aesSeed >>= I.newIORef | 76 | aesRef :: I.IORef AESState
aesRef = unsafePerformIO $ aesSeed >>= I.newIORef | 76 | aesRef = unsafePerformIO $ aesSeed >>= I.newIORef | 49 | false | true | 0 | 7 | 10 | 32 | 14 | 18 | null | null |
barrucadu/nagi | lib/Imageboard/Moderation.hs | mit | lockThread False = setThreadField capLockThread ("unlocked "<>) ThreadLocked False | 82 | lockThread False = setThreadField capLockThread ("unlocked "<>) ThreadLocked False | 82 | lockThread False = setThreadField capLockThread ("unlocked "<>) ThreadLocked False | 82 | false | false | 1 | 6 | 8 | 26 | 11 | 15 | null | null |
DanielG/cabal-helper | lib/Distribution/Helper.hs | apache-2.0 | buildPlatform :: String
buildPlatform = display Distribution.System.buildPlatform | 81 | buildPlatform :: String
buildPlatform = display Distribution.System.buildPlatform | 81 | buildPlatform = display Distribution.System.buildPlatform | 57 | false | true | 0 | 6 | 6 | 17 | 9 | 8 | null | null |
brendanhay/gogol | gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs | mpl-2.0 | -- | Download details for a file stored in Google Cloud Storage.
uCloudStorageDownloadDetails :: Lens' UnSampledReport (Maybe UnSampledReportCloudStorageDownloadDetails)
uCloudStorageDownloadDetails
= lens _uCloudStorageDownloadDetails
(\ s a -> s{_uCloudStorageDownloadDetails = a}) | 291 | uCloudStorageDownloadDetails :: Lens' UnSampledReport (Maybe UnSampledReportCloudStorageDownloadDetails)
uCloudStorageDownloadDetails
= lens _uCloudStorageDownloadDetails
(\ s a -> s{_uCloudStorageDownloadDetails = a}) | 226 | uCloudStorageDownloadDetails
= lens _uCloudStorageDownloadDetails
(\ s a -> s{_uCloudStorageDownloadDetails = a}) | 121 | true | true | 0 | 9 | 36 | 48 | 25 | 23 | null | null |
agomezl/tstp2agda | src/TSTP/Base.hs | mit | eadRole _ = Unknown
| 39 | readRole _ = Unknown | 39 | readRole _ = Unknown | 39 | false | false | 0 | 5 | 23 | 9 | 4 | 5 | null | null |
grpc/grpc-haskell | tests/interop_client/main.hs | apache-2.0 | runTest PingPong = runPingPongTest | 34 | runTest PingPong = runPingPongTest | 34 | runTest PingPong = runPingPongTest | 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
tjakway/ghcjvm | compiler/prelude/THNames.hs | bsd-3-clause | floatPrimLIdKey = mkPreludeMiscIdUnique 225 | 45 | floatPrimLIdKey = mkPreludeMiscIdUnique 225 | 45 | floatPrimLIdKey = mkPreludeMiscIdUnique 225 | 45 | false | false | 0 | 5 | 5 | 9 | 4 | 5 | null | null |
Lythimus/lptv | sites/all/modules/jgm-pandoc-8be6cc2/src/Text/Pandoc/Readers/RST.hs | gpl-2.0 | note :: GenParser Char ParserState Inline
note = try $ do
ref <- noteMarker
char '_'
state <- getState
let notes = stateNotes state
case lookup ref notes of
Nothing -> fail "note not found"
Just raw -> do
-- We temporarily empty the note list while parsing the note,
-- so that we don't ... | 960 | note :: GenParser Char ParserState Inline
note = try $ do
ref <- noteMarker
char '_'
state <- getState
let notes = stateNotes state
case lookup ref notes of
Nothing -> fail "note not found"
Just raw -> do
-- We temporarily empty the note list while parsing the note,
-- so that we don't ... | 960 | note = try $ do
ref <- noteMarker
char '_'
state <- getState
let notes = stateNotes state
case lookup ref notes of
Nothing -> fail "note not found"
Just raw -> do
-- We temporarily empty the note list while parsing the note,
-- so that we don't get infinite loops with notes inside notes... | 918 | false | true | 0 | 20 | 311 | 205 | 104 | 101 | null | null |
tdammers/templar | src/Web/Sprinkles/Sessions.hs | bsd-3-clause | loadSession :: SessionStore -> ByteString -> IO (Maybe SessionHandle)
loadSession ss ssid = do
exists <- ssDoesSessionExist ss ssid
if exists
then
return . Just $ makeSessionHandle ss ssid
else
return Nothing | 256 | loadSession :: SessionStore -> ByteString -> IO (Maybe SessionHandle)
loadSession ss ssid = do
exists <- ssDoesSessionExist ss ssid
if exists
then
return . Just $ makeSessionHandle ss ssid
else
return Nothing | 256 | loadSession ss ssid = do
exists <- ssDoesSessionExist ss ssid
if exists
then
return . Just $ makeSessionHandle ss ssid
else
return Nothing | 186 | false | true | 0 | 9 | 79 | 72 | 34 | 38 | null | null |
romanb/amazonka | amazonka-swf/gen/Network/AWS/SWF/Types.hs | mpl-2.0 | -- | 'SignalExternalWorkflowExecutionInitiatedEventAttributes' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'seweieaControl' @::@ 'Maybe' 'Text'
--
-- * 'seweieaDecisionTaskCompletedEventId' @::@ 'Integer'
--
-- * 'seweieaInput' @::@ 'Maybe' 'Text'
--
-- * 'seweieaRunId' @::@ 'Mayb... | 1,247 | signalExternalWorkflowExecutionInitiatedEventAttributes :: Text -- ^ 'seweieaWorkflowId'
-> Text -- ^ 'seweieaSignalName'
-> Integer -- ^ 'seweieaDecisionTaskCompletedEventId'
... | 834 | signalExternalWorkflowExecutionInitiatedEventAttributes p1 p2 p3 = SignalExternalWorkflowExecutionInitiatedEventAttributes
{ _seweieaWorkflowId = p1
, _seweieaSignalName = p2
, _seweieaDecisionTaskCompletedEventId = p3
, _seweieaRunId = Nothing
... | 431 | true | true | 0 | 7 | 400 | 91 | 60 | 31 | null | null |
owestphal/label-generator | src/gui/GUI.hs | bsd-3-clause | createAccessNumberPdf :: GUI -> IO ()
createAccessNumberPdf gui = do
yearValue <- spinButtonGetValueAsInt $ sbYear $ subGUI gui
firstValue <- spinButtonGetValueAsInt $ sbFirst $ subGUI gui
lastValue <- spinButtonGetValueAsInt $ sbLast $ subGUI gui
number <- spinButtonGetValueAsInt $ sbNumberOfLabels $ subGUI g... | 761 | createAccessNumberPdf :: GUI -> IO ()
createAccessNumberPdf gui = do
yearValue <- spinButtonGetValueAsInt $ sbYear $ subGUI gui
firstValue <- spinButtonGetValueAsInt $ sbFirst $ subGUI gui
lastValue <- spinButtonGetValueAsInt $ sbLast $ subGUI gui
number <- spinButtonGetValueAsInt $ sbNumberOfLabels $ subGUI g... | 761 | createAccessNumberPdf gui = do
yearValue <- spinButtonGetValueAsInt $ sbYear $ subGUI gui
firstValue <- spinButtonGetValueAsInt $ sbFirst $ subGUI gui
lastValue <- spinButtonGetValueAsInt $ sbLast $ subGUI gui
number <- spinButtonGetValueAsInt $ sbNumberOfLabels $ subGUI gui
zerosValue <- toggleButtonGetActi... | 723 | false | true | 0 | 12 | 112 | 224 | 104 | 120 | null | null |
woufrous/hoton | src/Hoton/Scenes/Forward1D.hs | mit | containerBox1D b1 b2 = Box Box1D $ ContainerBox1D b1 b2 | 55 | containerBox1D b1 b2 = Box Box1D $ ContainerBox1D b1 b2 | 55 | containerBox1D b1 b2 = Box Box1D $ ContainerBox1D b1 b2 | 55 | false | false | 1 | 6 | 9 | 27 | 10 | 17 | null | null |
jaalonso/I1M-Cod-Temas | src/Tema_9.hs | gpl-2.0 | -- (valorEA x) es el valor de la expresión aritmética x. Por ejemplo,
-- valorEA (Suma (Suma (Num 2) (Num 3)) (Num 4)) == 9
valorEA :: Expr -> Int
valorEA (Num n) = n | 174 | valorEA :: Expr -> Int
valorEA (Num n) = n | 45 | valorEA (Num n) = n | 22 | true | true | 0 | 9 | 42 | 32 | 15 | 17 | null | null |
pbiggar/rash | src/Rash/Util.hs | bsd-3-clause | b2rv :: Bool -> RetVal
b2rv b = if b then vsuccess else (vfail (-1)) | 68 | b2rv :: Bool -> RetVal
b2rv b = if b then vsuccess else (vfail (-1)) | 68 | b2rv b = if b then vsuccess else (vfail (-1)) | 45 | false | true | 0 | 9 | 14 | 37 | 20 | 17 | null | null |
kosmikus/cabal | cabal-install/Main.hs | bsd-3-clause | win32SelfUpgradeAction :: Win32SelfUpgradeFlags -> [String] -> GlobalFlags
-> IO ()
win32SelfUpgradeAction selfUpgradeFlags (pid:path:_extraArgs) _globalFlags = do
let verbosity = fromFlag (win32SelfUpgradeVerbosity selfUpgradeFlags)
Win32SelfUpgrade.deleteOldExeFile verbosity (read pid) p... | 323 | win32SelfUpgradeAction :: Win32SelfUpgradeFlags -> [String] -> GlobalFlags
-> IO ()
win32SelfUpgradeAction selfUpgradeFlags (pid:path:_extraArgs) _globalFlags = do
let verbosity = fromFlag (win32SelfUpgradeVerbosity selfUpgradeFlags)
Win32SelfUpgrade.deleteOldExeFile verbosity (read pid) p... | 323 | win32SelfUpgradeAction selfUpgradeFlags (pid:path:_extraArgs) _globalFlags = do
let verbosity = fromFlag (win32SelfUpgradeVerbosity selfUpgradeFlags)
Win32SelfUpgrade.deleteOldExeFile verbosity (read pid) path | 213 | false | true | 0 | 12 | 56 | 85 | 41 | 44 | null | null |
capitanbatata/apath-slfp | competent/gadts/src/GenericTraversalsWithoutPoly.hs | gpl-3.0 | tick _ _ p = p | 14 | tick _ _ p = p | 14 | tick _ _ p = p | 14 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
nandotorterolo/Tactics | src/Main.hs | bsd-3-clause | isFinished :: GameState -> Bool
isFinished (GameState _ 60 _ _ _) = True | 72 | isFinished :: GameState -> Bool
isFinished (GameState _ 60 _ _ _) = True | 72 | isFinished (GameState _ 60 _ _ _) = True | 40 | false | true | 0 | 7 | 13 | 32 | 16 | 16 | null | null |
TomMD/ghc | libraries/template-haskell/Language/Haskell/TH/Syntax.hs | bsd-3-clause | tupleTypeName 0 = mk_tup_name 0 TcClsName | 41 | tupleTypeName 0 = mk_tup_name 0 TcClsName | 41 | tupleTypeName 0 = mk_tup_name 0 TcClsName | 41 | false | false | 1 | 5 | 5 | 17 | 6 | 11 | null | null |
EXio4/zyw-pl | src/Parser.hs | mit | word :: ByteString -> Parser ByteString
word x = junk *> string x <* junk | 73 | word :: ByteString -> Parser ByteString
word x = junk *> string x <* junk | 73 | word x = junk *> string x <* junk | 33 | false | true | 0 | 7 | 14 | 32 | 15 | 17 | null | null |
blanu/Dust-tools | Dust/Services/File/File.hs | gpl-2.0 | writeFileData :: FileHeader -> FileData -> IO()
writeFileData (FileHeader path _) (FileData contents) = do
let name = sanitize path
B.appendFile ("incoming/"++name) contents | 181 | writeFileData :: FileHeader -> FileData -> IO()
writeFileData (FileHeader path _) (FileData contents) = do
let name = sanitize path
B.appendFile ("incoming/"++name) contents | 181 | writeFileData (FileHeader path _) (FileData contents) = do
let name = sanitize path
B.appendFile ("incoming/"++name) contents | 133 | false | true | 0 | 11 | 30 | 77 | 35 | 42 | null | null |
deadfoxygrandpa/Elm | compiler/Generate/JavaScript/Ports.hs | bsd-3-clause | check :: Expression () -> JSType -> Expression () -> Expression ()
check x jsType continue =
CondExpr () (jsFold OpLOr checks x) continue throw
where
jsFold op checks value = foldl1 (InfixExpr () op) (map ($value) checks)
throw = obj "_E.raise" <| InfixExpr () OpAdd msg x
msg = string ("invalid input,... | 688 | check :: Expression () -> JSType -> Expression () -> Expression ()
check x jsType continue =
CondExpr () (jsFold OpLOr checks x) continue throw
where
jsFold op checks value = foldl1 (InfixExpr () op) (map ($value) checks)
throw = obj "_E.raise" <| InfixExpr () OpAdd msg x
msg = string ("invalid input,... | 688 | check x jsType continue =
CondExpr () (jsFold OpLOr checks x) continue throw
where
jsFold op checks value = foldl1 (InfixExpr () op) (map ($value) checks)
throw = obj "_E.raise" <| InfixExpr () OpAdd msg x
msg = string ("invalid input, expecting " ++ show jsType ++ " but got ")
checks = case jsTyp... | 621 | false | true | 5 | 13 | 197 | 272 | 122 | 150 | null | null |
michalkonecny/aern2 | aern2-mp/src/AERN2/MP/Precision.hs | bsd-3-clause | convertP :: (ConvertibleWithPrecision t1 t2) => Precision -> t1 -> t2
convertP p a =
case safeConvertP p a of
Right v -> v
Left err -> error (show err) | 161 | convertP :: (ConvertibleWithPrecision t1 t2) => Precision -> t1 -> t2
convertP p a =
case safeConvertP p a of
Right v -> v
Left err -> error (show err) | 161 | convertP p a =
case safeConvertP p a of
Right v -> v
Left err -> error (show err) | 91 | false | true | 4 | 9 | 39 | 71 | 34 | 37 | null | null |
willprice/camle-compiler | src/Language/Camle/Parser.hs | mit | writeBoolean = parens booleanExpression >>= return . WriteBoolean | 65 | writeBoolean = parens booleanExpression >>= return . WriteBoolean | 65 | writeBoolean = parens booleanExpression >>= return . WriteBoolean | 65 | false | false | 1 | 6 | 7 | 21 | 8 | 13 | null | null |
taktoa/ThermoCalc | src/System.hs | gpl-3.0 | thinLengthRoot :: System -> Length Double
thinLengthRoot a = lrest - (lt * bestRoot' optHI brckt accD)
where
brckt = (lrest/(_2*lt), lrest/lt)
k = getWavenumber (getInput a)
dr = getDiamRatio a
(lc, lt, lrest) = (getConeLength a, getTotalLength a, getRestLength a)
tempH l... | 452 | thinLengthRoot :: System -> Length Double
thinLengthRoot a = lrest - (lt * bestRoot' optHI brckt accD)
where
brckt = (lrest/(_2*lt), lrest/lt)
k = getWavenumber (getInput a)
dr = getDiamRatio a
(lc, lt, lrest) = (getConeLength a, getTotalLength a, getRestLength a)
tempH l... | 452 | thinLengthRoot a = lrest - (lt * bestRoot' optHI brckt accD)
where
brckt = (lrest/(_2*lt), lrest/lt)
k = getWavenumber (getInput a)
dr = getDiamRatio a
(lc, lt, lrest) = (getConeLength a, getTotalLength a, getRestLength a)
tempH lb = _1 / tan (k*(lrest - (lb*lt)))
... | 410 | false | true | 0 | 14 | 131 | 225 | 117 | 108 | null | null |
rueshyna/gogol | gogol-civicinfo/gen/Network/Google/CivicInfo/Types/Product.hs | mpl-2.0 | paPostalCodeNumberExtension :: Lens' PostalAddress (Maybe Text)
paPostalCodeNumberExtension
= lens _paPostalCodeNumberExtension
(\ s a -> s{_paPostalCodeNumberExtension = a}) | 182 | paPostalCodeNumberExtension :: Lens' PostalAddress (Maybe Text)
paPostalCodeNumberExtension
= lens _paPostalCodeNumberExtension
(\ s a -> s{_paPostalCodeNumberExtension = a}) | 182 | paPostalCodeNumberExtension
= lens _paPostalCodeNumberExtension
(\ s a -> s{_paPostalCodeNumberExtension = a}) | 118 | false | true | 0 | 8 | 24 | 48 | 24 | 24 | null | null |
OS2World/DEV-UTIL-HUGS | libraries/Graphics/Rendering/OpenGL/GL/Colors.hs | bsd-3-clause | ambient :: Light -> StateVar (Color4 GLfloat)
ambient = makeLightVar glGetLightfvc glLightfvc Ambient' | 102 | ambient :: Light -> StateVar (Color4 GLfloat)
ambient = makeLightVar glGetLightfvc glLightfvc Ambient' | 102 | ambient = makeLightVar glGetLightfvc glLightfvc Ambient' | 56 | false | true | 0 | 8 | 12 | 31 | 15 | 16 | null | null |
dysinger/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/CreateLayer.hs | mpl-2.0 | -- | The layer type. A stack cannot have more than one built-in layer of the same
-- type. It can have any number of custom layers.
clType :: Lens' CreateLayer LayerType
clType = lens _clType (\s a -> s { _clType = a }) | 219 | clType :: Lens' CreateLayer LayerType
clType = lens _clType (\s a -> s { _clType = a }) | 87 | clType = lens _clType (\s a -> s { _clType = a }) | 49 | true | true | 0 | 9 | 44 | 41 | 23 | 18 | null | null |
michaelt/lens-simple | examples/Pong.hs | bsd-3-clause | speedIncrease = 1.2 | 21 | speedIncrease = 1.2 | 21 | speedIncrease = 1.2 | 21 | false | false | 0 | 4 | 4 | 6 | 3 | 3 | null | null |
nicball/orlin-lang | src/Orlin/Frontend/Ast.hs | mit | renameVariable :: String -> String -> Expr -> Expr
renameVariable from to = iter 0
where iter _ (Int n) = Int n
iter level (Var n t lvl) =
if lvl == level && n == from
then (Var to t lvl)
else (Var n t lvl)
iter _ Unit = Unit
iter level (Fn params body) =
... | 583 | renameVariable :: String -> String -> Expr -> Expr
renameVariable from to = iter 0
where iter _ (Int n) = Int n
iter level (Var n t lvl) =
if lvl == level && n == from
then (Var to t lvl)
else (Var n t lvl)
iter _ Unit = Unit
iter level (Fn params body) =
... | 583 | renameVariable from to = iter 0
where iter _ (Int n) = Int n
iter level (Var n t lvl) =
if lvl == level && n == from
then (Var to t lvl)
else (Var n t lvl)
iter _ Unit = Unit
iter level (Fn params body) =
Fn params (map (iter (level + 1)) body)
... | 532 | false | true | 2 | 10 | 206 | 297 | 140 | 157 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/Cabal/Distribution/Simple/GHC.hs | bsd-3-clause | hcPkgInfo :: ProgramConfiguration -> HcPkg.HcPkgInfo
hcPkgInfo conf = HcPkg.HcPkgInfo { HcPkg.hcPkgProgram = ghcPkgProg
, HcPkg.noPkgDbStack = v < [6,9]
, HcPkg.noVerboseFlag = v < [6,11]
, HcPkg.flagPackageConf =... | 585 | hcPkgInfo :: ProgramConfiguration -> HcPkg.HcPkgInfo
hcPkgInfo conf = HcPkg.HcPkgInfo { HcPkg.hcPkgProgram = ghcPkgProg
, HcPkg.noPkgDbStack = v < [6,9]
, HcPkg.noVerboseFlag = v < [6,11]
, HcPkg.flagPackageConf =... | 585 | hcPkgInfo conf = HcPkg.HcPkgInfo { HcPkg.hcPkgProgram = ghcPkgProg
, HcPkg.noPkgDbStack = v < [6,9]
, HcPkg.noVerboseFlag = v < [6,11]
, HcPkg.flagPackageConf = v < [7,5]
, HcPkg.u... | 532 | false | true | 2 | 8 | 261 | 137 | 77 | 60 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs | mit | decomposeChar '\x1F77' = "\x03B9\x0301" | 39 | decomposeChar '\x1F77' = "\x03B9\x0301" | 39 | decomposeChar '\x1F77' = "\x03B9\x0301" | 39 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
davideGiovannini/scheme-repl | src/Evaluation/Primitives.hs | bsd-3-clause | boolBinop :: (LispVal -> ThrowsError a) -> (a -> a -> Bool) -> LispFunction
boolBinop unpacker op (x:y:args) = do
list <- (sequence $ fmap unpacker (x:y:args))
return $ Bool (func list)
where func (x1:y1:xs) = if x1 `op` y1 == True then func (y1:xs)
else False
func _ = True | 312 | boolBinop :: (LispVal -> ThrowsError a) -> (a -> a -> Bool) -> LispFunction
boolBinop unpacker op (x:y:args) = do
list <- (sequence $ fmap unpacker (x:y:args))
return $ Bool (func list)
where func (x1:y1:xs) = if x1 `op` y1 == True then func (y1:xs)
else False
func _ = True | 312 | boolBinop unpacker op (x:y:args) = do
list <- (sequence $ fmap unpacker (x:y:args))
return $ Bool (func list)
where func (x1:y1:xs) = if x1 `op` y1 == True then func (y1:xs)
else False
func _ = True | 236 | false | true | 0 | 13 | 88 | 170 | 84 | 86 | null | null |
pheaver/BitVector | Data/BitVector/BitVector1.hs | bsd-3-clause | dropL i (Bits bs)
= Bits $ case internal_endianness of
LittleEndian -> take (Prelude.length bs - i) bs
BigEndian -> drop i bs | 154 | dropL i (Bits bs)
= Bits $ case internal_endianness of
LittleEndian -> take (Prelude.length bs - i) bs
BigEndian -> drop i bs | 154 | dropL i (Bits bs)
= Bits $ case internal_endianness of
LittleEndian -> take (Prelude.length bs - i) bs
BigEndian -> drop i bs | 154 | false | false | 2 | 12 | 51 | 62 | 28 | 34 | null | null |
bennofs/hdevtools | src/Main.hs | mit | doType :: FilePath -> Maybe FilePath -> FilePath -> HDevTools -> IO ()
doType startDir cabal = doFileCommand startDir cabal "type" $
\real args -> CmdType real (file args) (line args, col args) | 197 | doType :: FilePath -> Maybe FilePath -> FilePath -> HDevTools -> IO ()
doType startDir cabal = doFileCommand startDir cabal "type" $
\real args -> CmdType real (file args) (line args, col args) | 197 | doType startDir cabal = doFileCommand startDir cabal "type" $
\real args -> CmdType real (file args) (line args, col args) | 126 | false | true | 0 | 10 | 36 | 83 | 40 | 43 | null | null |
nlim/portfolio-quote | src/HtmlParsing.hs | mit | lookupMultipleData :: String -> ([String] -> Maybe a) -> IO (Maybe a)
lookupMultipleData s f = do
css <- allData s
return $ f css | 139 | lookupMultipleData :: String -> ([String] -> Maybe a) -> IO (Maybe a)
lookupMultipleData s f = do
css <- allData s
return $ f css | 137 | lookupMultipleData s f = do
css <- allData s
return $ f css | 67 | false | true | 0 | 9 | 34 | 66 | 31 | 35 | null | null |
kazuya030/haskell-test | old/tarai.hs | mit | tarai :: Int -> Int -> Int -> Int
tarai x y z = if x <= y then y
else
tarai (tarai (x-1) y z)
(tarai (y-1) z x)
(tarai (z-1) x y) | 197 | tarai :: Int -> Int -> Int -> Int
tarai x y z = if x <= y then y
else
tarai (tarai (x-1) y z)
(tarai (y-1) z x)
(tarai (z-1) x y) | 197 | tarai x y z = if x <= y then y
else
tarai (tarai (x-1) y z)
(tarai (y-1) z x)
(tarai (z-1) x y) | 163 | false | true | 0 | 10 | 101 | 100 | 52 | 48 | null | null |
OpenXT/idl | rpcgen/Backend/Haskell.hs | gpl-2.0 | normaliseFunctionName :: String -> String
normaliseFunctionName = decapitalise . camelise . replace "." "_" . replace "-" "_" | 125 | normaliseFunctionName :: String -> String
normaliseFunctionName = decapitalise . camelise . replace "." "_" . replace "-" "_" | 125 | normaliseFunctionName = decapitalise . camelise . replace "." "_" . replace "-" "_" | 83 | false | true | 0 | 7 | 17 | 37 | 18 | 19 | null | null |
ghcjs/ghcjs | src/Compiler/Info.hs | mit | -- | Just the GHCJS version
getCompilerVersion :: String
getCompilerVersion = Version.showVersion Paths_ghcjs.version | 117 | getCompilerVersion :: String
getCompilerVersion = Version.showVersion Paths_ghcjs.version | 89 | getCompilerVersion = Version.showVersion Paths_ghcjs.version | 60 | true | true | 0 | 6 | 12 | 19 | 10 | 9 | null | null |
oldmanmike/ghc | compiler/simplCore/SimplEnv.hs | bsd-3-clause | simplBinders :: SimplEnv -> [InBndr] -> SimplM (SimplEnv, [OutBndr])
simplBinders env bndrs = mapAccumLM simplBinder env bndrs | 128 | simplBinders :: SimplEnv -> [InBndr] -> SimplM (SimplEnv, [OutBndr])
simplBinders env bndrs = mapAccumLM simplBinder env bndrs | 128 | simplBinders env bndrs = mapAccumLM simplBinder env bndrs | 59 | false | true | 0 | 10 | 18 | 50 | 25 | 25 | null | null |
abakst/liquidhaskell | src/Language/Haskell/Liquid/Types/PredType.hs | bsd-3-clause | meetListWithPSubs πs ss r1 r2 = foldl' (meetListWithPSub ss r1) r2 πs | 72 | meetListWithPSubs πs ss r1 r2 = foldl' (meetListWithPSub ss r1) r2 πs | 72 | meetListWithPSubs πs ss r1 r2 = foldl' (meetListWithPSub ss r1) r2 πs | 72 | false | false | 0 | 7 | 14 | 30 | 14 | 16 | null | null |
joozek78/stack | src/Stack/Solver.hs | bsd-3-clause | cabalSolver :: (MonadIO m, MonadLogger m, MonadMask m, MonadBaseControl IO m, MonadReader env m, HasConfig env)
=> [Path Abs Dir] -- ^ cabal files
-> Map PackageName Version -- ^ constraints
-> [String] -- ^ additional arguments
-> m (Version, Map PackageName (Version, Ma... | 2,594 | cabalSolver :: (MonadIO m, MonadLogger m, MonadMask m, MonadBaseControl IO m, MonadReader env m, HasConfig env)
=> [Path Abs Dir] -- ^ cabal files
-> Map PackageName Version -- ^ constraints
-> [String] -- ^ additional arguments
-> m (Version, Map PackageName (Version, Ma... | 2,594 | cabalSolver cabalfps constraints cabalArgs = withSystemTempDirectory "cabal-solver" $ \dir -> do
configLines <- getCabalConfig dir constraints
let configFile = dir FP.</> "cabal.config"
liftIO $ S.writeFile configFile $ encodeUtf8 $ T.unlines configLines
menv <- getMinimalEnvOverride
ghcVersion <- ... | 2,256 | false | true | 0 | 23 | 822 | 650 | 319 | 331 | null | null |
DavidAlphaFox/ghc | compiler/coreSyn/TrieMap.hs | bsd-3-clause | mapR :: (a -> b) -> RoleMap a -> RoleMap b
mapR f = RM . mapTM f . unRM | 71 | mapR :: (a -> b) -> RoleMap a -> RoleMap b
mapR f = RM . mapTM f . unRM | 71 | mapR f = RM . mapTM f . unRM | 28 | false | true | 2 | 8 | 19 | 53 | 23 | 30 | null | null |
ethercrow/yi | yi-core/src/Yi/Editor.hs | gpl-2.0 | withEveryBuffer :: MonadEditor m => BufferM a -> m [a]
withEveryBuffer action =
withEditor (gets bufferStack) >>= mapM (`withGivenBuffer` action) . NE.toList | 161 | withEveryBuffer :: MonadEditor m => BufferM a -> m [a]
withEveryBuffer action =
withEditor (gets bufferStack) >>= mapM (`withGivenBuffer` action) . NE.toList | 161 | withEveryBuffer action =
withEditor (gets bufferStack) >>= mapM (`withGivenBuffer` action) . NE.toList | 106 | false | true | 0 | 9 | 25 | 62 | 31 | 31 | null | null |
ksaveljev/hake-2 | src/Game/Monsters/MBoss32.hs | bsd-3-clause | makronSight :: EntInteract
makronSight =
GenericEntInteract "makron_sight" $ \selfRef _ -> do
modifyRef selfRef (\v -> v & eMonsterInfo.miCurrentMove .~ Just makronMoveSight)
return True | 196 | makronSight :: EntInteract
makronSight =
GenericEntInteract "makron_sight" $ \selfRef _ -> do
modifyRef selfRef (\v -> v & eMonsterInfo.miCurrentMove .~ Just makronMoveSight)
return True | 196 | makronSight =
GenericEntInteract "makron_sight" $ \selfRef _ -> do
modifyRef selfRef (\v -> v & eMonsterInfo.miCurrentMove .~ Just makronMoveSight)
return True | 169 | false | true | 0 | 14 | 33 | 60 | 29 | 31 | null | null |
ekarayel/HTF | tests/Tutorial.hs | lgpl-2.1 | test_nonEmpty = do assertEqual [1] (myReverse [1])
assertEqual [3,2,1] (myReverse [1,2,3]) | 109 | test_nonEmpty = do assertEqual [1] (myReverse [1])
assertEqual [3,2,1] (myReverse [1,2,3]) | 109 | test_nonEmpty = do assertEqual [1] (myReverse [1])
assertEqual [3,2,1] (myReverse [1,2,3]) | 109 | false | false | 0 | 10 | 29 | 58 | 31 | 27 | null | null |
mkscrg/chinese-poker | dealer/main.hs | bsd-2-clause | initGame :: IO [Player]
initGame = do
nes <- pairs <$> getArgs
mapM (uncurry initPlayer) nes
where
pairs (n:e:as) = (n, e) : pairs as
pairs _ = [] | 160 | initGame :: IO [Player]
initGame = do
nes <- pairs <$> getArgs
mapM (uncurry initPlayer) nes
where
pairs (n:e:as) = (n, e) : pairs as
pairs _ = [] | 160 | initGame = do
nes <- pairs <$> getArgs
mapM (uncurry initPlayer) nes
where
pairs (n:e:as) = (n, e) : pairs as
pairs _ = [] | 136 | false | true | 1 | 9 | 42 | 86 | 43 | 43 | null | null |
TOSPIO/yi | src/library/Yi/TextCompletion.hs | gpl-2.0 | words' :: T.Text -> [T.Text]
words' = filter (isJust . charClass . T.head) . T.groupBy ((==) `on` charClass) | 108 | words' :: T.Text -> [T.Text]
words' = filter (isJust . charClass . T.head) . T.groupBy ((==) `on` charClass) | 108 | words' = filter (isJust . charClass . T.head) . T.groupBy ((==) `on` charClass) | 79 | false | true | 0 | 9 | 17 | 58 | 32 | 26 | null | null |
hanshoglund/modulo | src/Language/Modulo/Parse.hs | gpl-3.0 | lstr = stringLiteral lexer | 28 | lstr = stringLiteral lexer | 28 | lstr = stringLiteral lexer | 28 | false | false | 0 | 5 | 5 | 9 | 4 | 5 | null | null |
snoyberg/ghc | compiler/hsSyn/HsUtils.hs | bsd-3-clause | collectHsBindListBinders :: [LHsBindLR idL idR] -> [idL]
-- Same as collectHsBindsBinders, but works over a list of bindings
collectHsBindListBinders = foldr (collect_bind False . unLoc) [] | 189 | collectHsBindListBinders :: [LHsBindLR idL idR] -> [idL]
collectHsBindListBinders = foldr (collect_bind False . unLoc) [] | 121 | collectHsBindListBinders = foldr (collect_bind False . unLoc) [] | 64 | true | true | 0 | 8 | 25 | 50 | 24 | 26 | null | null |
cmahon/interactive-brokers | executable/Requests-Service.hs | bsd-3-clause | untilDone :: Model () SomeEvent SomeEvent
untilDone = asPipe go
where
go = await >>= checkDone
checkDone e
| Just Done <- fromEvent e = return ()
| otherwise = yield e >> go
-- -----------------------------------------------------------------------------
-- Event handlers | 287 | untilDone :: Model () SomeEvent SomeEvent
untilDone = asPipe go
where
go = await >>= checkDone
checkDone e
| Just Done <- fromEvent e = return ()
| otherwise = yield e >> go
-- -----------------------------------------------------------------------------
-- Event handlers | 287 | untilDone = asPipe go
where
go = await >>= checkDone
checkDone e
| Just Done <- fromEvent e = return ()
| otherwise = yield e >> go
-- -----------------------------------------------------------------------------
-- Event handlers | 245 | false | true | 6 | 9 | 53 | 99 | 41 | 58 | null | null |
Airtnp/Freshman_Simple_Haskell_Lib | Intro/TAPL/oop.hs | mit | -- r = (newIORef (1 :: Int), ())
newCounter :: CounterRep -> Counter
newCounter = \r' -> let r = r'
get :: Unit -> IO Int
get = \_ -> (fst r) >>= readIORef
inc :: Unit -> IO ()
inc = \_ -> (fst r) >>= flip modifyIORef (+1)
... | 470 | newCounter :: CounterRep -> Counter
newCounter = \r' -> let r = r'
get :: Unit -> IO Int
get = \_ -> (fst r) >>= readIORef
inc :: Unit -> IO ()
inc = \_ -> (fst r) >>= flip modifyIORef (+1)
set :: Int... | 436 | newCounter = \r' -> let r = r'
get :: Unit -> IO Int
get = \_ -> (fst r) >>= readIORef
inc :: Unit -> IO ()
inc = \_ -> (fst r) >>= flip modifyIORef (+1)
set :: Int -> IO ()
se... | 400 | true | true | 0 | 13 | 235 | 158 | 85 | 73 | null | null |
jeremyjh/distributed-process-lifted | test/Control/Distributed/Process/Lifted/Tests.hs | bsd-3-clause | testMonitorNode :: TestTransport -> Assertion
testMonitorNode TestTransport{..} = do
[node1, node2] <- replicateM 2 $ newLocalNode testTransport initRemoteTable
done <- newEmptyMVar
closeLocalNode node1
runProcess node2 $ do
ref <- monitorNode (localNodeId node1)
NodeMonitorNotification ref' nid DiedD... | 446 | testMonitorNode :: TestTransport -> Assertion
testMonitorNode TestTransport{..} = do
[node1, node2] <- replicateM 2 $ newLocalNode testTransport initRemoteTable
done <- newEmptyMVar
closeLocalNode node1
runProcess node2 $ do
ref <- monitorNode (localNodeId node1)
NodeMonitorNotification ref' nid DiedD... | 446 | testMonitorNode TestTransport{..} = do
[node1, node2] <- replicateM 2 $ newLocalNode testTransport initRemoteTable
done <- newEmptyMVar
closeLocalNode node1
runProcess node2 $ do
ref <- monitorNode (localNodeId node1)
NodeMonitorNotification ref' nid DiedDisconnect <- expect
True <- return $ ref =... | 400 | false | true | 0 | 15 | 85 | 153 | 67 | 86 | null | null |
reckbo/ppl | pipeline-lib/Node/T1w.hs | bsd-3-clause | rules = rule (buildNode :: T1w -> Maybe (Action [Double])) | 58 | rules = rule (buildNode :: T1w -> Maybe (Action [Double])) | 58 | rules = rule (buildNode :: T1w -> Maybe (Action [Double])) | 58 | false | false | 0 | 11 | 9 | 31 | 16 | 15 | null | null |
wuxb45/eval | Eval/Storage.hs | bsd-3-clause | pipeAll :: Handle -> Handle -> IO ()
pipeAll from to = do
bs <- BS.hGet from lim
BS.hPut to bs
unless (BS.null bs) $ pipeAll from to
where
lim = 0x100000
-- }}}
-- keyOP {{{ | 186 | pipeAll :: Handle -> Handle -> IO ()
pipeAll from to = do
bs <- BS.hGet from lim
BS.hPut to bs
unless (BS.null bs) $ pipeAll from to
where
lim = 0x100000
-- }}}
-- keyOP {{{ | 186 | pipeAll from to = do
bs <- BS.hGet from lim
BS.hPut to bs
unless (BS.null bs) $ pipeAll from to
where
lim = 0x100000
-- }}}
-- keyOP {{{ | 149 | false | true | 0 | 11 | 49 | 86 | 40 | 46 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.