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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
riwsky/wiwinwlh | src/writer.hs | mit | example :: MyWriter
example = do
tell [1..5]
tell [5..10]
return "foo" | 77 | example :: MyWriter
example = do
tell [1..5]
tell [5..10]
return "foo" | 77 | example = do
tell [1..5]
tell [5..10]
return "foo" | 57 | false | true | 0 | 8 | 18 | 39 | 18 | 21 | null | null |
alexander-at-github/eta | compiler/ETA/Interactive/ByteCodeItbls.hs | bsd-3-clause | mkITbls dflags (tc:tcs) = do itbls <- mkITbl dflags tc
itbls2 <- mkITbls dflags tcs
return (itbls `plusNameEnv` itbls2) | 178 | mkITbls dflags (tc:tcs) = do itbls <- mkITbl dflags tc
itbls2 <- mkITbls dflags tcs
return (itbls `plusNameEnv` itbls2) | 178 | mkITbls dflags (tc:tcs) = do itbls <- mkITbl dflags tc
itbls2 <- mkITbls dflags tcs
return (itbls `plusNameEnv` itbls2) | 178 | false | false | 0 | 9 | 77 | 57 | 27 | 30 | null | null |
Yuras/hfd | src/IMsg.hs | bsd-3-clause | akeAMF :: Monad m => Iteratee ByteString m (AMF, Int)
takeAMF = do
parent <- endianRead4 e_
(name, nl) <- takeStr
vtype <- endianRead2 e_
flags <- endianRead4 e_
(value, vl) <- takeAMFValue vtype
return (AMF parent (bs2s name) flags value, 4 + nl + 2 + 4 + vl)
-- | Read AMF value
| 294 | takeAMF :: Monad m => Iteratee ByteString m (AMF, Int)
takeAMF = do
parent <- endianRead4 e_
(name, nl) <- takeStr
vtype <- endianRead2 e_
flags <- endianRead4 e_
(value, vl) <- takeAMFValue vtype
return (AMF parent (bs2s name) flags value, 4 + nl + 2 + 4 + vl)
-- | Read AMF value | 294 | takeAMF = do
parent <- endianRead4 e_
(name, nl) <- takeStr
vtype <- endianRead2 e_
flags <- endianRead4 e_
(value, vl) <- takeAMFValue vtype
return (AMF parent (bs2s name) flags value, 4 + nl + 2 + 4 + vl)
-- | Read AMF value | 239 | false | true | 0 | 12 | 68 | 134 | 65 | 69 | null | null |
nevrenato/HetsAlloy | CASL/OMDocImport.hs | gpl-2.0 | omdocToType _ ome = error $ "omdocToType: Non-supported element: " ++ show ome | 78 | omdocToType _ ome = error $ "omdocToType: Non-supported element: " ++ show ome | 78 | omdocToType _ ome = error $ "omdocToType: Non-supported element: " ++ show ome | 78 | false | false | 1 | 6 | 12 | 22 | 10 | 12 | null | null |
svalaskevicius/hob | test/Hob/Ui/EditorSpec.hs | gpl-3.0 | launchNewFileAndSetModified :: IO Context
launchNewFileAndSetModified = do
ctx <- loadDefaultContext
_ <- launchEditorTab ctx $ Just "/xxx/testName.hs"
buffer <- textViewGetBuffer . fromJust =<< getActiveEditor ctx
textBufferSetModified buffer True
return ctx | 279 | launchNewFileAndSetModified :: IO Context
launchNewFileAndSetModified = do
ctx <- loadDefaultContext
_ <- launchEditorTab ctx $ Just "/xxx/testName.hs"
buffer <- textViewGetBuffer . fromJust =<< getActiveEditor ctx
textBufferSetModified buffer True
return ctx | 279 | launchNewFileAndSetModified = do
ctx <- loadDefaultContext
_ <- launchEditorTab ctx $ Just "/xxx/testName.hs"
buffer <- textViewGetBuffer . fromJust =<< getActiveEditor ctx
textBufferSetModified buffer True
return ctx | 237 | false | true | 0 | 10 | 49 | 76 | 31 | 45 | null | null |
ahmadsalim/p3-tool | p3-tool/TVL/Parser.hs | gpl-3.0 | pPresence :: Parser st Presence
pPresence = option PNone ((reserved "opt" *> return POptional) <|> (reserved "shared" *> return PShared)) | 137 | pPresence :: Parser st Presence
pPresence = option PNone ((reserved "opt" *> return POptional) <|> (reserved "shared" *> return PShared)) | 137 | pPresence = option PNone ((reserved "opt" *> return POptional) <|> (reserved "shared" *> return PShared)) | 105 | false | true | 1 | 10 | 19 | 57 | 26 | 31 | null | null |
pjones/themoviedb | example/Main.hs | mit | main :: IO ()
main = do
args <- getArgs
lang <- lookupEnv "TMDB_LANG"
let key = maybe T.empty T.pack (listToMaybe args)
settings = Settings key (toText <$> lang)
result <- runTheMovieDB settings $
case args of
[_, "search", query] -> searchAndListMovies (T.pack query)
[_, "fetch", mid] -... | 1,683 | main :: IO ()
main = do
args <- getArgs
lang <- lookupEnv "TMDB_LANG"
let key = maybe T.empty T.pack (listToMaybe args)
settings = Settings key (toText <$> lang)
result <- runTheMovieDB settings $
case args of
[_, "search", query] -> searchAndListMovies (T.pack query)
[_, "fetch", mid] -... | 1,683 | main = do
args <- getArgs
lang <- lookupEnv "TMDB_LANG"
let key = maybe T.empty T.pack (listToMaybe args)
settings = Settings key (toText <$> lang)
result <- runTheMovieDB settings $
case args of
[_, "search", query] -> searchAndListMovies (T.pack query)
[_, "fetch", mid] -> itemID fetch... | 1,669 | false | true | 0 | 18 | 541 | 441 | 220 | 221 | null | null |
ezyang/ghc | compiler/typecheck/TcGenGenerics.hs | bsd-3-clause | x_Pat :: LPat GhcPs
x_Pat = nlVarPat x_RDR | 42 | x_Pat :: LPat GhcPs
x_Pat = nlVarPat x_RDR | 42 | x_Pat = nlVarPat x_RDR | 22 | false | true | 0 | 5 | 7 | 17 | 8 | 9 | null | null |
tamarin-prover/tamarin-prover | lib/term/src/Term/LTerm.hs | gpl-3.0 | sortSuffix LSortPub = "pub" | 29 | sortSuffix LSortPub = "pub" | 29 | sortSuffix LSortPub = "pub" | 29 | false | false | 0 | 5 | 5 | 9 | 4 | 5 | null | null |
karamellpelle/grid | source/Game/Values/Plain.hs | gpl-3.0 | valueFadeRoomTicks :: Float
valueFadeRoomTicks =
1.0 | 57 | valueFadeRoomTicks :: Float
valueFadeRoomTicks =
1.0 | 57 | valueFadeRoomTicks =
1.0 | 29 | false | true | 0 | 4 | 10 | 11 | 6 | 5 | null | null |
urbanslug/ghc | compiler/coreSyn/PprCore.hs | bsd-3-clause | ppr_expr add_par (Lit lit) = pprLiteral add_par lit | 55 | ppr_expr add_par (Lit lit) = pprLiteral add_par lit | 55 | ppr_expr add_par (Lit lit) = pprLiteral add_par lit | 55 | false | false | 0 | 6 | 11 | 24 | 10 | 14 | null | null |
CommBank/codetroll | src/Codetroll/Main.hs | apache-2.0 | grep_ (p : ps) files = do
raw <- errExit False $ run "grep" $ [ "--color=always", "-nr", T.append (L.foldl (\acc el -> T.concat [ acc, "\\|", el ]) (T.append "'" p) ps) "'" ] ++ (toTextIgnore <$> files)
grepStatus <- lastExitCode
_ <- if grepStatus /= 1 && grepStatus /= 0 then errorExit [st|Gre... | 645 | grep_ (p : ps) files = do
raw <- errExit False $ run "grep" $ [ "--color=always", "-nr", T.append (L.foldl (\acc el -> T.concat [ acc, "\\|", el ]) (T.append "'" p) ps) "'" ] ++ (toTextIgnore <$> files)
grepStatus <- lastExitCode
_ <- if grepStatus /= 1 && grepStatus /= 0 then errorExit [st|Gre... | 645 | grep_ (p : ps) files = do
raw <- errExit False $ run "grep" $ [ "--color=always", "-nr", T.append (L.foldl (\acc el -> T.concat [ acc, "\\|", el ]) (T.append "'" p) ps) "'" ] ++ (toTextIgnore <$> files)
grepStatus <- lastExitCode
_ <- if grepStatus /= 1 && grepStatus /= 0 then errorExit [st|Gre... | 645 | false | false | 1 | 17 | 154 | 254 | 128 | 126 | null | null |
gcampax/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | returnM_RDR = nameRdrName returnMName | 49 | returnM_RDR = nameRdrName returnMName | 49 | returnM_RDR = nameRdrName returnMName | 49 | false | false | 0 | 5 | 15 | 9 | 4 | 5 | null | null |
venkat24/codeworld | codeworld-base/src/Internal/Picture.hs | apache-2.0 | -- A picture made by drawing these pictures, ordered from top to bottom.
pictures :: HasCallStack => [Picture] -> Picture
pictures = CWPic . CW.pictures . map toCWPic | 166 | pictures :: HasCallStack => [Picture] -> Picture
pictures = CWPic . CW.pictures . map toCWPic | 93 | pictures = CWPic . CW.pictures . map toCWPic | 44 | true | true | 0 | 7 | 27 | 37 | 19 | 18 | null | null |
batterseapower/chsc | Core/Syntax.hs | bsd-3-clause | pPrintPrecLam :: Pretty a => PrettyLevel -> Rational -> [Var] -> a -> Doc
pPrintPrecLam level prec xs e = prettyParen (prec > noPrec) $ text "\\" <> hsep [pPrintPrec level appPrec y | y <- xs] <+> text "->" <+> pPrintPrec level noPrec e | 236 | pPrintPrecLam :: Pretty a => PrettyLevel -> Rational -> [Var] -> a -> Doc
pPrintPrecLam level prec xs e = prettyParen (prec > noPrec) $ text "\\" <> hsep [pPrintPrec level appPrec y | y <- xs] <+> text "->" <+> pPrintPrec level noPrec e | 236 | pPrintPrecLam level prec xs e = prettyParen (prec > noPrec) $ text "\\" <> hsep [pPrintPrec level appPrec y | y <- xs] <+> text "->" <+> pPrintPrec level noPrec e | 162 | false | true | 0 | 11 | 44 | 106 | 51 | 55 | null | null |
sheyll/isobmff-builder | src/Data/ByteString/IsoBaseFileFormat/Boxes/HintMediaHeader.hs | bsd-3-clause | hintMediaHeader :: HintMediaHeader -> Box (FullBox HintMediaHeader 0)
hintMediaHeader = fullBox 0 | 97 | hintMediaHeader :: HintMediaHeader -> Box (FullBox HintMediaHeader 0)
hintMediaHeader = fullBox 0 | 97 | hintMediaHeader = fullBox 0 | 27 | false | true | 0 | 8 | 11 | 29 | 14 | 15 | null | null |
siddhanathan/yi | yi-mode-haskell/src/Yi/Syntax/Haskell.hs | gpl-2.0 | -- | Parse an unary operator with and without using please
pOP :: [Token] -> Parser TT (Exp TT) -> Parser TT (Exp TT)
pOP op r = Bin <$> pAtom op <*> r | 151 | pOP :: [Token] -> Parser TT (Exp TT) -> Parser TT (Exp TT)
pOP op r = Bin <$> pAtom op <*> r | 92 | pOP op r = Bin <$> pAtom op <*> r | 33 | true | true | 0 | 9 | 33 | 66 | 31 | 35 | null | null |
keithodulaigh/Hets | OWL2/XMLConversion.hs | gpl-2.0 | set1Map :: (String, String) -> Element
set1Map (s, iri) = setPref s $ mwIRI $ setFull $ splitIRI $ mkQName iri | 110 | set1Map :: (String, String) -> Element
set1Map (s, iri) = setPref s $ mwIRI $ setFull $ splitIRI $ mkQName iri | 110 | set1Map (s, iri) = setPref s $ mwIRI $ setFull $ splitIRI $ mkQName iri | 71 | false | true | 0 | 9 | 20 | 52 | 27 | 25 | null | null |
verement/etamoo | src/MOO/Task.hs | bsd-3-clause | -- | Verify that the given object is a wizard, raising 'E_PERM' if not.
checkWizard' :: ObjId -> MOO ()
checkWizard' perm = do
wizard <- isWizard perm
unless wizard $ raise E_PERM
-- | Verify that the current task permissions have wizard privileges, raising
-- 'E_PERM' if not. | 282 | checkWizard' :: ObjId -> MOO ()
checkWizard' perm = do
wizard <- isWizard perm
unless wizard $ raise E_PERM
-- | Verify that the current task permissions have wizard privileges, raising
-- 'E_PERM' if not. | 210 | checkWizard' perm = do
wizard <- isWizard perm
unless wizard $ raise E_PERM
-- | Verify that the current task permissions have wizard privileges, raising
-- 'E_PERM' if not. | 178 | true | true | 0 | 8 | 53 | 49 | 23 | 26 | null | null |
JohnLato/iteratee | src/Data/Iteratee/Base.hs | bsd-3-clause | -- | Create an iteratee from a pure continuation
icontP :: Monad m => (Stream s -> (ContReturn s m a)) -> Iteratee s m a
icontP k = Iteratee $ \_ onCont _ -> onCont (return . k) | 177 | icontP :: Monad m => (Stream s -> (ContReturn s m a)) -> Iteratee s m a
icontP k = Iteratee $ \_ onCont _ -> onCont (return . k) | 128 | icontP k = Iteratee $ \_ onCont _ -> onCont (return . k) | 56 | true | true | 0 | 10 | 38 | 76 | 38 | 38 | null | null |
sopvop/cabal | cabal-install/Distribution/Client/ProjectConfig/Legacy.hs | bsd-3-clause | convertLegacyProjectConfig :: LegacyProjectConfig -> ProjectConfig
convertLegacyProjectConfig
LegacyProjectConfig {
legacyPackages,
legacyPackagesOptional,
legacyPackagesRepo,
legacyPackagesNamed,
legacySharedConfig = LegacySharedConfig globalFlags configShFlags
... | 1,873 | convertLegacyProjectConfig :: LegacyProjectConfig -> ProjectConfig
convertLegacyProjectConfig
LegacyProjectConfig {
legacyPackages,
legacyPackagesOptional,
legacyPackagesRepo,
legacyPackagesNamed,
legacySharedConfig = LegacySharedConfig globalFlags configShFlags
... | 1,873 | convertLegacyProjectConfig
LegacyProjectConfig {
legacyPackages,
legacyPackagesOptional,
legacyPackagesRepo,
legacyPackagesNamed,
legacySharedConfig = LegacySharedConfig globalFlags configShFlags
configExFlags installSharedFlags,
legacyLocalConfig =... | 1,806 | false | true | 0 | 8 | 556 | 198 | 110 | 88 | null | null |
nevrenato/Hets_Fork | PGIP/Server.hs | gpl-2.0 | mkHtmlPage :: FilePath -> [Element] -> IO Response
mkHtmlPage path = return . mkOkResponse . mkHtmlString path | 110 | mkHtmlPage :: FilePath -> [Element] -> IO Response
mkHtmlPage path = return . mkOkResponse . mkHtmlString path | 110 | mkHtmlPage path = return . mkOkResponse . mkHtmlString path | 59 | false | true | 0 | 8 | 16 | 43 | 20 | 23 | null | null |
pgavin/tfp | Types/Data/Num/Ops.hs | bsd-3-clause | isOddT :: x -> IsOdd x
isOddT _ = undefined | 43 | isOddT :: x -> IsOdd x
isOddT _ = undefined | 43 | isOddT _ = undefined | 20 | false | true | 0 | 6 | 9 | 21 | 10 | 11 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT17.hs | gpl-3.0 | (<=) :: Nat -> Nat -> Bool
Z <= _ = True | 44 | (<=) :: Nat -> Nat -> Bool
Z <= _ = True | 44 | Z <= _ = True | 17 | false | true | 0 | 9 | 15 | 32 | 15 | 17 | null | null |
rubik/stack-hpc-coveralls | app/Main.hs | isc | defaultOr :: Arguments -> Option -> IO String -> IO String
defaultOr args opt action = maybe action return $ args `getArg` opt | 126 | defaultOr :: Arguments -> Option -> IO String -> IO String
defaultOr args opt action = maybe action return $ args `getArg` opt | 126 | defaultOr args opt action = maybe action return $ args `getArg` opt | 67 | false | true | 0 | 8 | 22 | 51 | 25 | 26 | null | null |
np/lens | src/Control/Lens/IndexedTraversal.hs | bsd-3-clause | -- | Generalizes 'Data.Traversable.mapAccumR' to an arbitrary 'IndexedTraversal' with access to the index.
--
-- 'imapAccumROf' accumulates state from right to left.
--
-- @'Control.Lens.Traversal.mapAccumROf' l ≡ 'imapAccumROf' l '.' 'const'@
--
-- @
-- 'imapAccumROf' :: 'Control.Lens.IndexedLens.IndexedLens' i s t a ... | 700 | imapAccumROf :: (Indexed i a (Lazy.State s b) -> s -> Lazy.State s t) -> (i -> s -> a -> (s, b)) -> s -> s -> (s, t)
imapAccumROf l f s0 a = swap (Lazy.runState (withIndex l (\i c -> Lazy.state (\s -> swap (f i s c))) a) s0) | 224 | imapAccumROf l f s0 a = swap (Lazy.runState (withIndex l (\i c -> Lazy.state (\s -> swap (f i s c))) a) s0) | 107 | true | true | 0 | 17 | 143 | 173 | 92 | 81 | null | null |
gergoerdi/brainfuck | language-registermachine/src/Language/Loop/CompileToBrainfuck.hs | bsd-3-clause | at k x = goto k ++ x ++ goto (-k) | 33 | at k x = goto k ++ x ++ goto (-k) | 33 | at k x = goto k ++ x ++ goto (-k) | 33 | false | false | 0 | 8 | 10 | 30 | 14 | 16 | null | null |
bacchanalia/KitchenSink | KitchenSink/Qualified.hs | gpl-3.0 | -- |'VU.scanr''
vu_scanr' = VU.scanr' | 37 | vu_scanr' = VU.scanr' | 21 | vu_scanr' = VU.scanr' | 21 | true | false | 0 | 5 | 4 | 9 | 5 | 4 | null | null |
juretta/course | src/L02/List.hs | bsd-3-clause | maximum (h :| t) = if h > maximum t then h else maximum t | 57 | maximum (h :| t) = if h > maximum t then h else maximum t | 57 | maximum (h :| t) = if h > maximum t then h else maximum t | 57 | false | false | 0 | 7 | 14 | 34 | 17 | 17 | null | null |
ml9951/ghc | compiler/main/DynFlags.hs | bsd-3-clause | trustPackage p = exposePackage p >> -- both trust and distrust also expose a package
upd (\s -> s{ packageFlags = TrustPackage p : packageFlags s }) | 150 | trustPackage p = exposePackage p >> -- both trust and distrust also expose a package
upd (\s -> s{ packageFlags = TrustPackage p : packageFlags s }) | 150 | trustPackage p = exposePackage p >> -- both trust and distrust also expose a package
upd (\s -> s{ packageFlags = TrustPackage p : packageFlags s }) | 150 | false | false | 1 | 11 | 28 | 50 | 23 | 27 | null | null |
rfranek/duckling | Duckling/Time/IT/Rules.hs | bsd-3-clause | ruleYearLatent2 :: Rule
ruleYearLatent2 = Rule
{ name = "year (latent)"
, pattern =
[ Predicate $ isIntegerBetween 2101 10000
]
, prod = \tokens -> case tokens of
(token:_) -> do
v <- getIntValue token
tt . mkLatent $ year v
_ -> Nothing
} | 283 | ruleYearLatent2 :: Rule
ruleYearLatent2 = Rule
{ name = "year (latent)"
, pattern =
[ Predicate $ isIntegerBetween 2101 10000
]
, prod = \tokens -> case tokens of
(token:_) -> do
v <- getIntValue token
tt . mkLatent $ year v
_ -> Nothing
} | 283 | ruleYearLatent2 = Rule
{ name = "year (latent)"
, pattern =
[ Predicate $ isIntegerBetween 2101 10000
]
, prod = \tokens -> case tokens of
(token:_) -> do
v <- getIntValue token
tt . mkLatent $ year v
_ -> Nothing
} | 259 | false | true | 0 | 15 | 89 | 105 | 52 | 53 | null | null |
eckyputrady/haskell-scotty-realworld-example-app | src/Feature/Comment/PG.hs | mit | findComments :: PG r m => Maybe UserId -> Slug -> Maybe CommentId -> m [Comment]
findComments mayUserId slug mayCommentId =
withConn $ \conn -> query conn qry arg
where
qry = [sql|
with profiles as (
select
id, name, bio, image, exists(select 1 from followings where use... | 1,103 | findComments :: PG r m => Maybe UserId -> Slug -> Maybe CommentId -> m [Comment]
findComments mayUserId slug mayCommentId =
withConn $ \conn -> query conn qry arg
where
qry = [sql|
with profiles as (
select
id, name, bio, image, exists(select 1 from followings where use... | 1,103 | findComments mayUserId slug mayCommentId =
withConn $ \conn -> query conn qry arg
where
qry = [sql|
with profiles as (
select
id, name, bio, image, exists(select 1 from followings where user_id = id and followed_by = ?) as following
from
us... | 1,022 | false | true | 0 | 10 | 427 | 93 | 49 | 44 | null | null |
silkapp/xmlhtml-xpath | src/Xml/XPath/Evaluator.hs | bsd-3-clause | axisName DescendantOrSelf = arr NodeValue . deep id | 51 | axisName DescendantOrSelf = arr NodeValue . deep id | 51 | axisName DescendantOrSelf = arr NodeValue . deep id | 51 | false | false | 0 | 6 | 7 | 20 | 8 | 12 | null | null |
vigoos/Farrago-OS | aura-master/aura-master/src/Aura/Install.hs | gpl-2.0 | depsToInstall :: Repository -> [Buildable] -> Aura [Package]
depsToInstall repo = mapM packageBuildable >=> resolveDeps repo | 124 | depsToInstall :: Repository -> [Buildable] -> Aura [Package]
depsToInstall repo = mapM packageBuildable >=> resolveDeps repo | 124 | depsToInstall repo = mapM packageBuildable >=> resolveDeps repo | 63 | false | true | 0 | 9 | 15 | 45 | 21 | 24 | null | null |
mooreniemi/pfpl | src/Static/Checker.hs | mit | check :: TypeEnv -> EExp -> Either String EType
check typeEnv expression = case expression of
-- 4.1a
EId stringId -> case Map.lookup stringId typeEnv of
Just typeValue -> Right typeValue
Nothing -> Left [i|No match in Type Environment found for: #{stringId}|]
-- 4.1b
EStr _ -> Right TStr
-- 4.1c
EN... | 1,526 | check :: TypeEnv -> EExp -> Either String EType
check typeEnv expression = case expression of
-- 4.1a
EId stringId -> case Map.lookup stringId typeEnv of
Just typeValue -> Right typeValue
Nothing -> Left [i|No match in Type Environment found for: #{stringId}|]
-- 4.1b
EStr _ -> Right TStr
-- 4.1c
EN... | 1,526 | check typeEnv expression = case expression of
-- 4.1a
EId stringId -> case Map.lookup stringId typeEnv of
Just typeValue -> Right typeValue
Nothing -> Left [i|No match in Type Environment found for: #{stringId}|]
-- 4.1b
EStr _ -> Right TStr
-- 4.1c
ENum _ -> Right TNum
-- 4.1d
EAdd expr1 expr2 ... | 1,478 | false | true | 0 | 16 | 465 | 443 | 208 | 235 | null | null |
typelead/epm | epm/Distribution/Client/Utils.hs | bsd-3-clause | determineNumJobs' :: Flag (Maybe Int) -> Int
determineNumJobs' numJobsFlag =
case numJobsFlag of
NoFlag -> 1
Flag Nothing -> 1
Flag (Just n) -> n
-- | Given a relative path, make it absolute relative to the current
-- directory. Absolute paths are returned unmodified. | 291 | determineNumJobs' :: Flag (Maybe Int) -> Int
determineNumJobs' numJobsFlag =
case numJobsFlag of
NoFlag -> 1
Flag Nothing -> 1
Flag (Just n) -> n
-- | Given a relative path, make it absolute relative to the current
-- directory. Absolute paths are returned unmodified. | 291 | determineNumJobs' numJobsFlag =
case numJobsFlag of
NoFlag -> 1
Flag Nothing -> 1
Flag (Just n) -> n
-- | Given a relative path, make it absolute relative to the current
-- directory. Absolute paths are returned unmodified. | 246 | false | true | 0 | 10 | 67 | 63 | 31 | 32 | null | null |
conal/hermit | src/HERMIT/Core.hs | bsd-2-clause | -- | Find all free variables in a recursive definition, which excludes the bound variable.
freeVarsDef :: CoreDef -> VarSet
freeVarsDef (Def v e) = delVarSet (freeVarsExpr e) v `unionVarSet` freeVarsVar v | 204 | freeVarsDef :: CoreDef -> VarSet
freeVarsDef (Def v e) = delVarSet (freeVarsExpr e) v `unionVarSet` freeVarsVar v | 113 | freeVarsDef (Def v e) = delVarSet (freeVarsExpr e) v `unionVarSet` freeVarsVar v | 80 | true | true | 0 | 9 | 31 | 52 | 25 | 27 | null | null |
cchalmers/geometry | src/Geometry/ThreeD/Transform.hs | bsd-3-clause | q2e :: RealFloat n => Quaternion n -> Euler n
q2e (Quaternion qw (V3 qx qy qz)) = Euler y p r
where
t0 = 2*(qw*qy + qz*qx)
t1 = 1 - 2*(qx*qx + qy*qy)
t2 = 2*(qw*qx - qz*qy)
t3 = 2*(qw*qz + qx*qy)
t4 = 1 - 2*(qz*qz + qx*qx)
-- account for floating point errors
t2' | t2 > 1 = ... | 440 | q2e :: RealFloat n => Quaternion n -> Euler n
q2e (Quaternion qw (V3 qx qy qz)) = Euler y p r
where
t0 = 2*(qw*qy + qz*qx)
t1 = 1 - 2*(qx*qx + qy*qy)
t2 = 2*(qw*qx - qz*qy)
t3 = 2*(qw*qz + qx*qy)
t4 = 1 - 2*(qz*qz + qx*qx)
-- account for floating point errors
t2' | t2 > 1 = ... | 440 | q2e (Quaternion qw (V3 qx qy qz)) = Euler y p r
where
t0 = 2*(qw*qy + qz*qx)
t1 = 1 - 2*(qx*qx + qy*qy)
t2 = 2*(qw*qx - qz*qy)
t3 = 2*(qw*qz + qx*qy)
t4 = 1 - 2*(qz*qz + qx*qx)
-- account for floating point errors
t2' | t2 > 1 = 1
| t2 < -1 = -1
| otherwis... | 394 | false | true | 11 | 12 | 170 | 305 | 137 | 168 | null | null |
fmapfmapfmap/amazonka | amazonka-route53/gen/Network/AWS/Route53/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'HostedZone' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'hzConfig'
--
-- * 'hzResourceRecordSetCount'
--
-- * 'hzId'
--
-- * 'hzName'
--
-- * 'hzCallerReference'
hostedZone
:: Text -- ^ 'hzId'
-> Te... | 611 | hostedZone
:: Text -- ^ 'hzId'
-> Text -- ^ 'hzName'
-> Text -- ^ 'hzCallerReference'
-> HostedZone
hostedZone pId_ pName_ pCallerReference_ =
HostedZone'
{ _hzConfig = Nothing
, _hzResourceRecordSetCount = Nothing
, _hzId = pId_
, _hzName = pName_
, _hzCallerReference = pCallerR... | 335 | hostedZone pId_ pName_ pCallerReference_ =
HostedZone'
{ _hzConfig = Nothing
, _hzResourceRecordSetCount = Nothing
, _hzId = pId_
, _hzName = pName_
, _hzCallerReference = pCallerReference_
} | 219 | true | true | 0 | 7 | 138 | 78 | 52 | 26 | null | null |
oshyshko/adventofcode | src/Y21/D14.hs | bsd-3-clause | -- NNCB
--
-- CH -> B
-- HH -> N
--
polyAndRules :: Parser (Poly, [Replacement])
polyAndRules =
(,) <$> poly <* eol <* eol
<*> rule `endBy` eol
where
poly = many1 letter
rule = (\a b -> Replacement (Pair a b))
<$> letter <*> letter
<* string " -> "
<*> letter | 305 | polyAndRules :: Parser (Poly, [Replacement])
polyAndRules =
(,) <$> poly <* eol <* eol
<*> rule `endBy` eol
where
poly = many1 letter
rule = (\a b -> Replacement (Pair a b))
<$> letter <*> letter
<* string " -> "
<*> letter | 269 | polyAndRules =
(,) <$> poly <* eol <* eol
<*> rule `endBy` eol
where
poly = many1 letter
rule = (\a b -> Replacement (Pair a b))
<$> letter <*> letter
<* string " -> "
<*> letter | 224 | true | true | 0 | 13 | 100 | 109 | 60 | 49 | null | null |
phaazon/vector | Data/Vector/Mutable.hs | bsd-3-clause | clone = G.clone | 15 | clone = G.clone | 15 | clone = G.clone | 15 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
kadena-io/pact | src/Pact/Native/Capabilities.hs | bsd-3-clause | installCapability :: NativeDef
installCapability =
defNative "install-capability" installCapability'
(funType tTyString
[("capability",TyFun $ funType' tTyBool [])
])
[LitExample "(install-capability (PAY \"alice\" \"bob\" 10.0))"]
"Specifies, and provisions install of, a _managed_ CAPABILITY, defined i... | 2,129 | installCapability :: NativeDef
installCapability =
defNative "install-capability" installCapability'
(funType tTyString
[("capability",TyFun $ funType' tTyBool [])
])
[LitExample "(install-capability (PAY \"alice\" \"bob\" 10.0))"]
"Specifies, and provisions install of, a _managed_ CAPABILITY, defined i... | 2,129 | installCapability =
defNative "install-capability" installCapability'
(funType tTyString
[("capability",TyFun $ funType' tTyBool [])
])
[LitExample "(install-capability (PAY \"alice\" \"bob\" 10.0))"]
"Specifies, and provisions install of, a _managed_ CAPABILITY, defined in a 'defcap' \
\in which a '@... | 2,098 | false | true | 1 | 13 | 409 | 182 | 85 | 97 | null | null |
SimSaladin/ggtd | src/GGTD/CLI/Render.hs | bsd-3-clause | -- | Like @renderThingyLine@, but for a flat rendering.
renderThingyLineFlat
:: UTCTime
-> Maybe String -- ^ Some extra stuff to be shown in brackets
-> Node
-> Thingy
-> P.Doc
renderThingyLineFlat now mextra node Thingy{..} =
let color = if Map.member Wait _flags then P.green else id
in ren... | 592 | renderThingyLineFlat
:: UTCTime
-> Maybe String -- ^ Some extra stuff to be shown in brackets
-> Node
-> Thingy
-> P.Doc
renderThingyLineFlat now mextra node Thingy{..} =
let color = if Map.member Wait _flags then P.green else id
in renderNode node
P.<+> color (renderContent _content... | 536 | renderThingyLineFlat now mextra node Thingy{..} =
let color = if Map.member Wait _flags then P.green else id
in renderNode node
P.<+> color (renderContent _content)
P.<+> (maybe P.empty (P.yellow . P.brackets . P.dullyellow . P.text) mextra)
P.<+> (if Map.null _flags then P.empty else P.... | 395 | true | true | 0 | 16 | 143 | 193 | 97 | 96 | null | null |
rbonifacio/funsat | tests/Properties.hs | bsd-3-clause | prop_noneIsFalseUnderA (m :: IAssignment) =
not $ anyA (\i -> if i /= 0 then L i `isFalseUnder` m else False) m | 115 | prop_noneIsFalseUnderA (m :: IAssignment) =
not $ anyA (\i -> if i /= 0 then L i `isFalseUnder` m else False) m | 115 | prop_noneIsFalseUnderA (m :: IAssignment) =
not $ anyA (\i -> if i /= 0 then L i `isFalseUnder` m else False) m | 115 | false | false | 0 | 11 | 25 | 54 | 29 | 25 | null | null |
brendanhay/gogol | gogol-tagmanager/gen/Network/Google/TagManager/Types/Product.hs | mpl-2.0 | -- | A visibility trigger maximum percent visibility. Only valid for AMP
-- Visibility trigger. \'mutable
-- tagmanager.accounts.containers.workspaces.triggers.create \'mutable
-- tagmanager.accounts.containers.workspaces.triggers.update
triVisiblePercentageMax :: Lens' Trigger (Maybe Parameter)
triVisiblePercentageMax... | 403 | triVisiblePercentageMax :: Lens' Trigger (Maybe Parameter)
triVisiblePercentageMax
= lens _triVisiblePercentageMax
(\ s a -> s{_triVisiblePercentageMax = a}) | 165 | triVisiblePercentageMax
= lens _triVisiblePercentageMax
(\ s a -> s{_triVisiblePercentageMax = a}) | 106 | true | true | 0 | 8 | 45 | 52 | 28 | 24 | null | null |
adamwalker/haskell_cudd | Cudd/Imperative.hs | bsd-3-clause | readPeakNodeCount :: DDManager s u -> ST s Integer
readPeakNodeCount (DDManager m) = liftM fromIntegral $ unsafeIOToST $ c_cuddReadPeakNodeCount m | 146 | readPeakNodeCount :: DDManager s u -> ST s Integer
readPeakNodeCount (DDManager m) = liftM fromIntegral $ unsafeIOToST $ c_cuddReadPeakNodeCount m | 146 | readPeakNodeCount (DDManager m) = liftM fromIntegral $ unsafeIOToST $ c_cuddReadPeakNodeCount m | 95 | false | true | 0 | 7 | 19 | 48 | 22 | 26 | null | null |
Bodigrim/arithmoi | Math/NumberTheory/Utils/FromIntegral.hs | mit | integerToNatural :: Integer -> Natural
integerToNatural = fromIntegral' | 71 | integerToNatural :: Integer -> Natural
integerToNatural = fromIntegral' | 71 | integerToNatural = fromIntegral' | 32 | false | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
uuhan/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reflectErasure :: RErasure -> Raw
reflectErasure RErased = Var (tacN "Erased") | 81 | reflectErasure :: RErasure -> Raw
reflectErasure RErased = Var (tacN "Erased") | 81 | reflectErasure RErased = Var (tacN "Erased") | 47 | false | true | 0 | 7 | 13 | 27 | 13 | 14 | null | null |
benkolera/haskell-ldap-classy | LDAP/Classy/Decode.hs | mit | requireNel _ _ (x:xs) = pure (x :| xs) | 38 | requireNel _ _ (x:xs) = pure (x :| xs) | 38 | requireNel _ _ (x:xs) = pure (x :| xs) | 38 | false | false | 0 | 7 | 8 | 30 | 15 | 15 | null | null |
haskell/haddock | haddock-api/src/Haddock/GhcUtils.hs | bsd-2-clause | -- | The parents of a subordinate in a declaration
parents :: Name -> HsDecl GhcRn -> [Name]
parents n (TyClD _ d) = [ p | (c, p) <- parentMap d, c == n ] | 154 | parents :: Name -> HsDecl GhcRn -> [Name]
parents n (TyClD _ d) = [ p | (c, p) <- parentMap d, c == n ] | 103 | parents n (TyClD _ d) = [ p | (c, p) <- parentMap d, c == n ] | 61 | true | true | 0 | 8 | 35 | 67 | 35 | 32 | null | null |
wavewave/lhc-analysis-collection | lib/HEP/Physics/Analysis/ATLAS/Exotic/Leptoquark.hs | gpl-3.0 | findMT :: EvJJEv -> Double
findMT EvJJEv {..} =
let (_,e1) = evjj_e1
(metphi,metpt) = (phiptmet . met) evjj_rev
ptmet = (metpt*cos metphi, metpt*sin metphi)
pte = (pt e1 * cos (phi e1), pt e1 * sin (phi e1))
in mt pte ptmet | 251 | findMT :: EvJJEv -> Double
findMT EvJJEv {..} =
let (_,e1) = evjj_e1
(metphi,metpt) = (phiptmet . met) evjj_rev
ptmet = (metpt*cos metphi, metpt*sin metphi)
pte = (pt e1 * cos (phi e1), pt e1 * sin (phi e1))
in mt pte ptmet | 250 | findMT EvJJEv {..} =
let (_,e1) = evjj_e1
(metphi,metpt) = (phiptmet . met) evjj_rev
ptmet = (metpt*cos metphi, metpt*sin metphi)
pte = (pt e1 * cos (phi e1), pt e1 * sin (phi e1))
in mt pte ptmet | 223 | false | true | 6 | 9 | 70 | 133 | 70 | 63 | null | null |
brendanhay/gogol | gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs | mpl-2.0 | -- | Adjustment for total tax of the line item.
oliaTaxAdjustment :: Lens' OrderLineItemAdjustment (Maybe Price)
oliaTaxAdjustment
= lens _oliaTaxAdjustment
(\ s a -> s{_oliaTaxAdjustment = a}) | 201 | oliaTaxAdjustment :: Lens' OrderLineItemAdjustment (Maybe Price)
oliaTaxAdjustment
= lens _oliaTaxAdjustment
(\ s a -> s{_oliaTaxAdjustment = a}) | 153 | oliaTaxAdjustment
= lens _oliaTaxAdjustment
(\ s a -> s{_oliaTaxAdjustment = a}) | 88 | true | true | 0 | 9 | 34 | 48 | 25 | 23 | null | null |
gilith/hol | src/HOL/TermData.hs | mit | destApp _ = Nothing | 19 | destApp _ = Nothing | 19 | destApp _ = Nothing | 19 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
ivanmoore/seedy | lib/Pelias.hs | gpl-3.0 | reduceString :: (String -> Token) -> String -> [Token] -> Token
reduceString tokenType initialAcc subsequentTokens = tokenType (foldl accumulateString initialAcc subsequentTokens) | 179 | reduceString :: (String -> Token) -> String -> [Token] -> Token
reduceString tokenType initialAcc subsequentTokens = tokenType (foldl accumulateString initialAcc subsequentTokens) | 179 | reduceString tokenType initialAcc subsequentTokens = tokenType (foldl accumulateString initialAcc subsequentTokens) | 115 | false | true | 0 | 8 | 20 | 58 | 28 | 30 | null | null |
GaloisInc/delicious | Network/Delicious/RSS.hs | bsd-3-clause | getUserInboxBookmarks :: String -> String -> DM [Post]
getUserInboxBookmarks u key = performCall "getUserInboxBookmarks" eff_url
where
eff_url = inbox_url ++ u ++ "?private="++key | 182 | getUserInboxBookmarks :: String -> String -> DM [Post]
getUserInboxBookmarks u key = performCall "getUserInboxBookmarks" eff_url
where
eff_url = inbox_url ++ u ++ "?private="++key | 182 | getUserInboxBookmarks u key = performCall "getUserInboxBookmarks" eff_url
where
eff_url = inbox_url ++ u ++ "?private="++key | 127 | false | true | 0 | 8 | 25 | 55 | 27 | 28 | null | null |
janrain/snap-server | test/suite/Data/Concurrent/HashMap/Tests.hs | bsd-3-clause | bogoHash x = H.hashBS x | 23 | bogoHash x = H.hashBS x | 23 | bogoHash x = H.hashBS x | 23 | false | false | 0 | 6 | 4 | 14 | 6 | 8 | null | null |
osa1/Idris-dev | src/Idris/Core/ProofState.hs | bsd-3-clause | updateNotunified ns nu = up nu where
up [] = []
up ((n, t) : nus) = let t' = updateSolvedTerm ns t in
((n, t') : up nus) | 150 | updateNotunified ns nu = up nu where
up [] = []
up ((n, t) : nus) = let t' = updateSolvedTerm ns t in
((n, t') : up nus) | 150 | updateNotunified ns nu = up nu where
up [] = []
up ((n, t) : nus) = let t' = updateSolvedTerm ns t in
((n, t') : up nus) | 150 | false | false | 1 | 10 | 58 | 85 | 41 | 44 | null | null |
travitch/foreign-inference | src/Foreign/Inference/Analysis/ErrorHandling/Features.hs | bsd-3-clause | calleeNotError :: Bool -> Map Value Feature -> Instruction -> Map Value Feature
calleeNotError isComplex m i
| Just cv <- directCallTarget i
, isComplex = M.alter (update (calledInPossibleErrorContext %~ (+1))) cv m
| Just cv <- directCallTarget i
, not isComplex = M.alter (update (calledInNonErrorContext %~ (+... | 347 | calleeNotError :: Bool -> Map Value Feature -> Instruction -> Map Value Feature
calleeNotError isComplex m i
| Just cv <- directCallTarget i
, isComplex = M.alter (update (calledInPossibleErrorContext %~ (+1))) cv m
| Just cv <- directCallTarget i
, not isComplex = M.alter (update (calledInNonErrorContext %~ (+... | 347 | calleeNotError isComplex m i
| Just cv <- directCallTarget i
, isComplex = M.alter (update (calledInPossibleErrorContext %~ (+1))) cv m
| Just cv <- directCallTarget i
, not isComplex = M.alter (update (calledInNonErrorContext %~ (+1))) cv m
| otherwise = m | 267 | false | true | 1 | 11 | 63 | 148 | 71 | 77 | null | null |
jfischoff/opengl-eval | src/OpenGL/Evaluator/HaskellOpenGLFunctionsTH.hs | bsd-3-clause | f_to_h :: GLFunction -> [Dec]
f_to_h f@(GLFunction f_name return_value params) = result where
result = [make_error name] ++ (f_to_c f)
name = fn_to_sn f_name | 168 | f_to_h :: GLFunction -> [Dec]
f_to_h f@(GLFunction f_name return_value params) = result where
result = [make_error name] ++ (f_to_c f)
name = fn_to_sn f_name | 168 | f_to_h f@(GLFunction f_name return_value params) = result where
result = [make_error name] ++ (f_to_c f)
name = fn_to_sn f_name | 138 | false | true | 0 | 8 | 34 | 64 | 34 | 30 | null | null |
garykl/Horg | Colors.hs | bsd-3-clause | hexDigits :: Int -> Char
hexDigits = (!!) "0123456789abcdef" | 60 | hexDigits :: Int -> Char
hexDigits = (!!) "0123456789abcdef" | 60 | hexDigits = (!!) "0123456789abcdef" | 35 | false | true | 0 | 5 | 8 | 20 | 11 | 9 | null | null |
yaxu/tidalbot | runpattern.hs | gpl-3.0 | unescapeEntities (x:xs) = x : unescapeEntities xs | 49 | unescapeEntities (x:xs) = x : unescapeEntities xs | 49 | unescapeEntities (x:xs) = x : unescapeEntities xs | 49 | false | false | 0 | 7 | 6 | 23 | 11 | 12 | null | null |
mightymoose/liquidhaskell | benchmarks/bytestring-0.9.2.1/Data/ByteString/Lazy.hs | bsd-3-clause | -- ---------------------------------------------------------------------
-- Unfolds and replicates
-- | @'iterate' f x@ returns an infinite ByteString of repeated applications
-- of @f@ to @x@:
--
-- > iterate f x == [x, f x, f (f x), ...]
--
{-@ iterate :: (Word8 -> Word8) -> Word8 -> ByteString @-}
{-@ Strict Data.B... | 466 | iterate :: (Word8 -> Word8) -> Word8 -> ByteString
iterate f = unfoldr (\x -> case f x of x' -> x' `seq` Just (x', x')) | 119 | iterate f = unfoldr (\x -> case f x of x' -> x' `seq` Just (x', x')) | 68 | true | true | 0 | 13 | 79 | 77 | 45 | 32 | null | null |
capital-match/hdo | src/Network/DO/Droplets/Commands.hs | mit | getAction :: Id -> Id -> DropletCommands (Result (ActionResult DropletActionType))
getAction did actId = GetAction did actId P.id | 129 | getAction :: Id -> Id -> DropletCommands (Result (ActionResult DropletActionType))
getAction did actId = GetAction did actId P.id | 129 | getAction did actId = GetAction did actId P.id | 46 | false | true | 0 | 12 | 17 | 52 | 24 | 28 | null | null |
danr/hipspec | examples/old-examples/quickspec/ProductiveUseOfFailure.hs | gpl-3.0 | _ && _ = False | 14 | _ && _ = False | 14 | _ && _ = False | 14 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
hemio-ev/hamsql | src/Database/HamSql/Internal/Load.hs | gpl-3.0 | catchErrors :: ToJSON a => FilePath -> a -> IO a
catchErrors filePath x = do
y <- try (forceToJson x)
return $
case y of
Left (YamsqlException exc) ->
err $ "In file '" <> tshow filePath <> "': " <> exc
Right _ -> x | 243 | catchErrors :: ToJSON a => FilePath -> a -> IO a
catchErrors filePath x = do
y <- try (forceToJson x)
return $
case y of
Left (YamsqlException exc) ->
err $ "In file '" <> tshow filePath <> "': " <> exc
Right _ -> x | 243 | catchErrors filePath x = do
y <- try (forceToJson x)
return $
case y of
Left (YamsqlException exc) ->
err $ "In file '" <> tshow filePath <> "': " <> exc
Right _ -> x | 194 | false | true | 0 | 15 | 74 | 110 | 49 | 61 | null | null |
savannidgerinel/mead | src/LuminescentDreams/AuthDB.hs | bsd-3-clause | listUsers :: AuthDBM [Username]
listUsers = do
AuthDB_{..} <- ask >>= \(AuthDB _ dbref) -> tryIO $ readIORef dbref
return $ M.keys usermap | 142 | listUsers :: AuthDBM [Username]
listUsers = do
AuthDB_{..} <- ask >>= \(AuthDB _ dbref) -> tryIO $ readIORef dbref
return $ M.keys usermap | 142 | listUsers = do
AuthDB_{..} <- ask >>= \(AuthDB _ dbref) -> tryIO $ readIORef dbref
return $ M.keys usermap | 110 | false | true | 0 | 12 | 26 | 72 | 33 | 39 | null | null |
xu-hao/QueryArrow | QueryArrow-db-filesystem/src/QueryArrow/FileSystem/Commands.hs | bsd-3-clause | fsfindFilesBySize :: Integer -> FSProgram [File]
fsfindFilesBySize n = liftF (FindFilesBySize n id) | 100 | fsfindFilesBySize :: Integer -> FSProgram [File]
fsfindFilesBySize n = liftF (FindFilesBySize n id) | 99 | fsfindFilesBySize n = liftF (FindFilesBySize n id) | 50 | false | true | 0 | 7 | 13 | 35 | 17 | 18 | null | null |
nikita-volkov/stm-containers | library/StmContainers/Map.hs | mit | focus :: (Eq key, Hashable key) => B.Focus value STM result -> key -> Map key value -> STM result
focus valueFocus key (Map hamt) =
A.focus rowFocus (\(Product2 key _) -> key) key hamt
where
rowFocus =
B.mappingInput (\value -> Product2 key value) (\(Product2 _ value) -> value) valueFocus
-- |
-- Look up... | 330 | focus :: (Eq key, Hashable key) => B.Focus value STM result -> key -> Map key value -> STM result
focus valueFocus key (Map hamt) =
A.focus rowFocus (\(Product2 key _) -> key) key hamt
where
rowFocus =
B.mappingInput (\value -> Product2 key value) (\(Product2 _ value) -> value) valueFocus
-- |
-- Look up... | 330 | focus valueFocus key (Map hamt) =
A.focus rowFocus (\(Product2 key _) -> key) key hamt
where
rowFocus =
B.mappingInput (\value -> Product2 key value) (\(Product2 _ value) -> value) valueFocus
-- |
-- Look up an item.
| 232 | false | true | 0 | 9 | 72 | 143 | 73 | 70 | null | null |
ncaq/haskell-import-graph | lib/System/ImportGraph/ModuleCluster.hs | mit | ifaceClusterName :: ModIface -> TL.Text
ifaceClusterName iface = "cluster_" <> ifaceName iface | 94 | ifaceClusterName :: ModIface -> TL.Text
ifaceClusterName iface = "cluster_" <> ifaceName iface | 94 | ifaceClusterName iface = "cluster_" <> ifaceName iface | 54 | false | true | 0 | 6 | 11 | 27 | 13 | 14 | null | null |
mrshannon/trees | src/Input/Mouse.hs | gpl-2.0 | -- Default Tracking configuration.
defaultMouseTracking :: Mouse
defaultMouseTracking = Tracking
{ buttons = defaultButtons
, wheelTicks = 0
, downPosition = Position 0 0
, upPosition = Position 0 0
, position = Position 0 0
, deltaPosition = DeltaPosition 0 0
} | 313 | defaultMouseTracking :: Mouse
defaultMouseTracking = Tracking
{ buttons = defaultButtons
, wheelTicks = 0
, downPosition = Position 0 0
, upPosition = Position 0 0
, position = Position 0 0
, deltaPosition = DeltaPosition 0 0
} | 278 | defaultMouseTracking = Tracking
{ buttons = defaultButtons
, wheelTicks = 0
, downPosition = Position 0 0
, upPosition = Position 0 0
, position = Position 0 0
, deltaPosition = DeltaPosition 0 0
} | 248 | true | true | 0 | 8 | 93 | 74 | 41 | 33 | null | null |
m-lopez/jack | src/CodeGen/LLVM/Graph.hs | mit | startBlock :: CfgGen L.Name
startBlock = do
n <- genBlockName
let b = BlockState n []
modify $ \s -> s { working = b : working s }
return n
-- | Retrieve the name of the current working block. | 201 | startBlock :: CfgGen L.Name
startBlock = do
n <- genBlockName
let b = BlockState n []
modify $ \s -> s { working = b : working s }
return n
-- | Retrieve the name of the current working block. | 201 | startBlock = do
n <- genBlockName
let b = BlockState n []
modify $ \s -> s { working = b : working s }
return n
-- | Retrieve the name of the current working block. | 173 | false | true | 0 | 13 | 49 | 79 | 36 | 43 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/LT_1.hs | mit | esEsOrdering EQ LT = MyFalse | 28 | esEsOrdering EQ LT = MyFalse | 28 | esEsOrdering EQ LT = MyFalse | 28 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
eightyeight/atom-msp430 | Language/Atom/MSP430/Watchdog.hs | mit | -- Divide the timer input by 2^9.
wdtSourceDiv6 = 0x0003 :: Word16 | 69 | wdtSourceDiv6 = 0x0003 :: Word16 | 35 | wdtSourceDiv6 = 0x0003 :: Word16 | 35 | true | false | 0 | 4 | 14 | 10 | 6 | 4 | null | null |
sgf-dma/sgf-xmonad-modules | src/Sgf/XMonad/Restartable.hs | bsd-3-clause | stopP' :: RestartClass a => a -> X a
stopP' = killP <=< refreshPid | 79 | stopP' :: RestartClass a => a -> X a
stopP' = killP <=< refreshPid | 79 | stopP' = killP <=< refreshPid | 42 | false | true | 0 | 7 | 26 | 29 | 14 | 15 | null | null |
rueshyna/gogol | gogol-drive/gen/Network/Google/Drive/Types/Product.hs | mpl-2.0 | -- | The time of this change (RFC 3339 date-time).
chaTime :: Lens' Change (Maybe UTCTime)
chaTime
= lens _chaTime (\ s a -> s{_chaTime = a}) .
mapping _DateTime | 169 | chaTime :: Lens' Change (Maybe UTCTime)
chaTime
= lens _chaTime (\ s a -> s{_chaTime = a}) .
mapping _DateTime | 118 | chaTime
= lens _chaTime (\ s a -> s{_chaTime = a}) .
mapping _DateTime | 78 | true | true | 0 | 10 | 37 | 55 | 28 | 27 | null | null |
szatkus/haste-compiler | libraries/haste-lib/src/Haste/DOM.hs | bsd-3-clause | -- | Map an IO computation over the list of elements matching a query selector.
mapQS :: (IsElem e, MonadIO m)
=> e
-> QuerySelector
-> (Elem -> m a)
-> m [a]
mapQS el = J.mapQS el . toJSStr | 214 | mapQS :: (IsElem e, MonadIO m)
=> e
-> QuerySelector
-> (Elem -> m a)
-> m [a]
mapQS el = J.mapQS el . toJSStr | 134 | mapQS el = J.mapQS el . toJSStr | 31 | true | true | 0 | 11 | 63 | 67 | 34 | 33 | null | null |
rueshyna/gogol | gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs | mpl-2.0 | -- | Internal ID for the web property to which this view (profile) belongs.
rdpfiInternalWebPropertyId :: Lens' RealtimeDataProFileInfo (Maybe Text)
rdpfiInternalWebPropertyId
= lens _rdpfiInternalWebPropertyId
(\ s a -> s{_rdpfiInternalWebPropertyId = a}) | 264 | rdpfiInternalWebPropertyId :: Lens' RealtimeDataProFileInfo (Maybe Text)
rdpfiInternalWebPropertyId
= lens _rdpfiInternalWebPropertyId
(\ s a -> s{_rdpfiInternalWebPropertyId = a}) | 188 | rdpfiInternalWebPropertyId
= lens _rdpfiInternalWebPropertyId
(\ s a -> s{_rdpfiInternalWebPropertyId = a}) | 115 | true | true | 0 | 9 | 38 | 48 | 25 | 23 | null | null |
AlexanderPankiv/ghc | compiler/prelude/THNames.hs | bsd-3-clause | fieldExpTyConKey = mkPreludeTyConUnique 216 | 50 | fieldExpTyConKey = mkPreludeTyConUnique 216 | 50 | fieldExpTyConKey = mkPreludeTyConUnique 216 | 50 | false | false | 1 | 5 | 10 | 12 | 4 | 8 | null | null |
nickbart1980/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | verbatimEnv' :: IncludeParser
verbatimEnv' = fmap snd <$>
withRaw $ try $ do
string "\\begin"
name <- braced'
guard $ name `elem` ["verbatim", "Verbatim", "lstlisting",
"minted", "alltt"]
manyTill anyChar (try $ string $ "\\end{" ++... | 333 | verbatimEnv' :: IncludeParser
verbatimEnv' = fmap snd <$>
withRaw $ try $ do
string "\\begin"
name <- braced'
guard $ name `elem` ["verbatim", "Verbatim", "lstlisting",
"minted", "alltt"]
manyTill anyChar (try $ string $ "\\end{" ++... | 333 | verbatimEnv' = fmap snd <$>
withRaw $ try $ do
string "\\begin"
name <- braced'
guard $ name `elem` ["verbatim", "Verbatim", "lstlisting",
"minted", "alltt"]
manyTill anyChar (try $ string $ "\\end{" ++ name ++ "}") | 303 | false | true | 0 | 13 | 125 | 94 | 48 | 46 | null | null |
startling/beetle | test-parser.hs | mit | dictionaries :: Spec
dictionaries = describe "dictionary" $ do
let ?parser = dictionary
it "parses empty dictionaries" $ do
"{}" `parsesTo` []
it "parses singleton dictionaries" $ do
"{a => b}" `parsesTo` [("a", Symbol "b")]
it "parses two-item dictionaries" $ do
"{a => b, c => d}" `parsesTo`
... | 373 | dictionaries :: Spec
dictionaries = describe "dictionary" $ do
let ?parser = dictionary
it "parses empty dictionaries" $ do
"{}" `parsesTo` []
it "parses singleton dictionaries" $ do
"{a => b}" `parsesTo` [("a", Symbol "b")]
it "parses two-item dictionaries" $ do
"{a => b, c => d}" `parsesTo`
... | 373 | dictionaries = describe "dictionary" $ do
let ?parser = dictionary
it "parses empty dictionaries" $ do
"{}" `parsesTo` []
it "parses singleton dictionaries" $ do
"{a => b}" `parsesTo` [("a", Symbol "b")]
it "parses two-item dictionaries" $ do
"{a => b, c => d}" `parsesTo`
[ ("a", Symbol "b")
... | 352 | false | true | 0 | 15 | 94 | 129 | 63 | 66 | null | null |
Ornedan/dom3statusbot | Protocol.hs | bsd-3-clause | -- | Skip a byte if it's value is in the given list, otherwise error.
skipOneOf :: [Word8] -> Get ()
skipOneOf bs = do
byte <- getWord8
when (not $ byte `elem` bs) $
fail $ printf "skipOneOf: got %d, expected one of %s" byte (show bs)
-- | Write to handle and flush. | 275 | skipOneOf :: [Word8] -> Get ()
skipOneOf bs = do
byte <- getWord8
when (not $ byte `elem` bs) $
fail $ printf "skipOneOf: got %d, expected one of %s" byte (show bs)
-- | Write to handle and flush. | 205 | skipOneOf bs = do
byte <- getWord8
when (not $ byte `elem` bs) $
fail $ printf "skipOneOf: got %d, expected one of %s" byte (show bs)
-- | Write to handle and flush. | 174 | true | true | 0 | 12 | 63 | 75 | 38 | 37 | null | null |
trskop/pkg-version | src/Data/PkgVersion/Internal/RpmVerCmp.hs | bsd-3-clause | -- | @'notTilde' = 'not' '.' 'isTilde'@
notTilde :: Char -> Bool
notTilde = not . isTilde | 89 | notTilde :: Char -> Bool
notTilde = not . isTilde | 49 | notTilde = not . isTilde | 24 | true | true | 1 | 7 | 16 | 28 | 12 | 16 | null | null |
kdungs/coursework-functional-programming | 00/file.hs | mit | addTen :: Int -> Int
addTen x = addFive $ addFive x | 51 | addTen :: Int -> Int
addTen x = addFive $ addFive x | 51 | addTen x = addFive $ addFive x | 30 | false | true | 0 | 6 | 11 | 25 | 12 | 13 | null | null |
bitemyapp/ghc | libraries/base/GHC/Conc/Sync.hs | bsd-3-clause | real_handler :: SomeException -> IO ()
real_handler se
| Just BlockedIndefinitelyOnMVar <- fromException se = return ()
| Just BlockedIndefinitelyOnSTM <- fromException se = return ()
| Just ThreadKilled <- fromException se = return ()
| Just StackOverflow <- fromException se = ... | 414 | real_handler :: SomeException -> IO ()
real_handler se
| Just BlockedIndefinitelyOnMVar <- fromException se = return ()
| Just BlockedIndefinitelyOnSTM <- fromException se = return ()
| Just ThreadKilled <- fromException se = return ()
| Just StackOverflow <- fromException se = ... | 414 | real_handler se
| Just BlockedIndefinitelyOnMVar <- fromException se = return ()
| Just BlockedIndefinitelyOnSTM <- fromException se = return ()
| Just ThreadKilled <- fromException se = return ()
| Just StackOverflow <- fromException se = reportStackOverflow
| otherwise ... | 375 | false | true | 1 | 9 | 134 | 127 | 55 | 72 | null | null |
taktoa/HsCalculator | src/Parse.hs | gpl-3.0 | desugar PLE [a, b] = ELE a b | 34 | desugar PLE [a, b] = ELE a b | 34 | desugar PLE [a, b] = ELE a b | 34 | false | false | 0 | 6 | 13 | 22 | 11 | 11 | null | null |
tolysz/dsp | DSP/Filter/FIR/PolyInterp.hs | gpl-2.0 | optimal_4p2o16x :: (Ord a, Fractional a) => a -> a
optimal_4p2o16x x | 0 <= x && x < 1 = polyeval [ -0.41849525763976203, 1.36361593203840510,
-0.24506117865474364 ] x
| 1 <= x && x < 2 = polyeval [ 1.90873339502208310, -1.44144384373471430,
... | 482 | optimal_4p2o16x :: (Ord a, Fractional a) => a -> a
optimal_4p2o16x x | 0 <= x && x < 1 = polyeval [ -0.41849525763976203, 1.36361593203840510,
-0.24506117865474364 ] x
| 1 <= x && x < 2 = polyeval [ 1.90873339502208310, -1.44144384373471430,
... | 482 | optimal_4p2o16x x | 0 <= x && x < 1 = polyeval [ -0.41849525763976203, 1.36361593203840510,
-0.24506117865474364 ] x
| 1 <= x && x < 2 = polyeval [ 1.90873339502208310, -1.44144384373471430,
0.2450600236... | 431 | false | true | 0 | 10 | 223 | 136 | 68 | 68 | null | null |
ameingast/slisp | src/SLISP/Data.hs | bsd-3-clause | toLispBool :: Bool -> Expression
toLispBool True = Fixnum 1 | 59 | toLispBool :: Bool -> Expression
toLispBool True = Fixnum 1 | 59 | toLispBool True = Fixnum 1 | 26 | false | true | 0 | 5 | 9 | 21 | 10 | 11 | null | null |
MichaelXavier/Bucketeer | Bucketeer/Testing/WebServer.hs | bsd-2-clause | runSpecs :: Connection
-> IO ()
runSpecs conn = do bmRef <- newIORef =<< newBM
app <- scottyApp $ bucketeerServer $ BucketeerWeb conn bmRef ns
runTests app undefined $ specs conn bmRef | 236 | runSpecs :: Connection
-> IO ()
runSpecs conn = do bmRef <- newIORef =<< newBM
app <- scottyApp $ bucketeerServer $ BucketeerWeb conn bmRef ns
runTests app undefined $ specs conn bmRef | 236 | runSpecs conn = do bmRef <- newIORef =<< newBM
app <- scottyApp $ bucketeerServer $ BucketeerWeb conn bmRef ns
runTests app undefined $ specs conn bmRef | 192 | false | true | 0 | 9 | 83 | 73 | 33 | 40 | null | null |
shlevy/ghc | compiler/hsSyn/HsUtils.hs | bsd-3-clause | mkHsLams :: [TyVar] -> [EvVar] -> LHsExpr GhcTc -> LHsExpr GhcTc
mkHsLams tyvars dicts expr = mkLHsWrap (mkWpTyLams tyvars
<.> mkWpLams dicts) expr | 186 | mkHsLams :: [TyVar] -> [EvVar] -> LHsExpr GhcTc -> LHsExpr GhcTc
mkHsLams tyvars dicts expr = mkLHsWrap (mkWpTyLams tyvars
<.> mkWpLams dicts) expr | 186 | mkHsLams tyvars dicts expr = mkLHsWrap (mkWpTyLams tyvars
<.> mkWpLams dicts) expr | 121 | false | true | 0 | 8 | 61 | 60 | 29 | 31 | null | null |
DigitalBrains1/clash-lt24 | LT24/UARTInterface.hs | bsd-2-clause | passCommand' PCIdle cbuf dbuf gpioOB cmd d True ready
= (PCWaitAccept, cmd , d , gpioOB, True ) | 111 | passCommand' PCIdle cbuf dbuf gpioOB cmd d True ready
= (PCWaitAccept, cmd , d , gpioOB, True ) | 111 | passCommand' PCIdle cbuf dbuf gpioOB cmd d True ready
= (PCWaitAccept, cmd , d , gpioOB, True ) | 111 | false | false | 0 | 5 | 33 | 40 | 21 | 19 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/inRange_3.hs | mit | fsEsOrdering :: Ordering -> Ordering -> MyBool
fsEsOrdering x y = not (esEsOrdering x y) | 92 | fsEsOrdering :: Ordering -> Ordering -> MyBool
fsEsOrdering x y = not (esEsOrdering x y) | 92 | fsEsOrdering x y = not (esEsOrdering x y) | 41 | false | true | 0 | 7 | 18 | 35 | 17 | 18 | null | null |
573/leksah | src/IDE/Workspaces.hs | gpl-2.0 | makePackage :: PackageAction
makePackage = do
p <- ask
liftIDE $ do
getLog >>= liftIO . bringPaneToFront
showDefaultLogLaunch'
prefs' <- readIDE prefs
mbWs <- readIDE workspace
let settings = (defaultMakeSettings prefs'){msBackgroundBuild = False}
case mbWs of
Nothing -> sysMessag... | 955 | makePackage :: PackageAction
makePackage = do
p <- ask
liftIDE $ do
getLog >>= liftIO . bringPaneToFront
showDefaultLogLaunch'
prefs' <- readIDE prefs
mbWs <- readIDE workspace
let settings = (defaultMakeSettings prefs'){msBackgroundBuild = False}
case mbWs of
Nothing -> sysMessag... | 955 | makePackage = do
p <- ask
liftIDE $ do
getLog >>= liftIO . bringPaneToFront
showDefaultLogLaunch'
prefs' <- readIDE prefs
mbWs <- readIDE workspace
let settings = (defaultMakeSettings prefs'){msBackgroundBuild = False}
case mbWs of
Nothing -> sysMessage Normal (__ "No workspace for... | 925 | false | true | 0 | 22 | 346 | 251 | 119 | 132 | null | null |
yuto-matsum/googlecodejam2016-hs | src/q1b/B.hs | bsd-3-clause | words' :: String -> (String,String)
words' s = (left,right) where
left = takeWhile (/=' ') s
right = (tail . dropWhile (/=' ')) s | 133 | words' :: String -> (String,String)
words' s = (left,right) where
left = takeWhile (/=' ') s
right = (tail . dropWhile (/=' ')) s | 133 | words' s = (left,right) where
left = takeWhile (/=' ') s
right = (tail . dropWhile (/=' ')) s | 97 | false | true | 0 | 11 | 27 | 68 | 38 | 30 | null | null |
juliagoda/givenfind | src/GivenFind/Geography.hs | bsd-3-clause | -- words with characteristic suffixes for longitudes and latitudes are added to list
getTitudes :: Maybe [String] -> Maybe [String]
getTitudes (Just (x:xs)) = case help latiLonList x of
True -> case (isDigit . head) x of
... | 522 | getTitudes :: Maybe [String] -> Maybe [String]
getTitudes (Just (x:xs)) = case help latiLonList x of
True -> case (isDigit . head) x of
True -> liftM (x :) (getTitudes $ Just xs)
... | 437 | getTitudes (Just (x:xs)) = case help latiLonList x of
True -> case (isDigit . head) x of
True -> liftM (x :) (getTitudes $ Just xs)
_ -> getTitudes $ Just xs
... | 390 | true | true | 0 | 14 | 264 | 124 | 62 | 62 | null | null |
alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/DataTransferProtos/Status.hs | mit | toMaybe'Enum 2 = Prelude'.Just ERROR_CHECKSUM | 45 | toMaybe'Enum 2 = Prelude'.Just ERROR_CHECKSUM | 45 | toMaybe'Enum 2 = Prelude'.Just ERROR_CHECKSUM | 45 | false | false | 0 | 6 | 4 | 14 | 6 | 8 | null | null |
enolan/Idris-dev | src/Idris/Parser/Helpers.hs | bsd-3-clause | -- | Greater-than or equal to indent property
gteProp :: IndentProperty
gteProp = IndentProperty (>=) "should be greater than or equal context indentation" | 155 | gteProp :: IndentProperty
gteProp = IndentProperty (>=) "should be greater than or equal context indentation" | 109 | gteProp = IndentProperty (>=) "should be greater than or equal context indentation" | 83 | true | true | 0 | 6 | 22 | 25 | 12 | 13 | null | null |
ksaveljev/hake-2 | src/QCommon/QFiles/BSP/DHeaderT.hs | bsd-3-clause | newDHeaderT :: BL.ByteString -> DHeaderT
newDHeaderT = runGet getDHeaderT
where getDHeaderT :: Get DHeaderT
getDHeaderT = DHeaderT <$> getInt
<*> getInt
<*> getLumps
getLumps :: Get (V.Vector LumpT)
getLumps = V.replicateM Constant... | 420 | newDHeaderT :: BL.ByteString -> DHeaderT
newDHeaderT = runGet getDHeaderT
where getDHeaderT :: Get DHeaderT
getDHeaderT = DHeaderT <$> getInt
<*> getInt
<*> getLumps
getLumps :: Get (V.Vector LumpT)
getLumps = V.replicateM Constant... | 420 | newDHeaderT = runGet getDHeaderT
where getDHeaderT :: Get DHeaderT
getDHeaderT = DHeaderT <$> getInt
<*> getInt
<*> getLumps
getLumps :: Get (V.Vector LumpT)
getLumps = V.replicateM Constants.headerLumps getLumpT
getLumpT ... | 379 | false | true | 12 | 7 | 149 | 102 | 51 | 51 | null | null |
albertov/hs-mapnik | bindings/src/Mapnik/Bindings/Datasource.hs | bsd-3-clause | withQuery :: Query -> (Ptr QueryPtr -> IO a) -> IO a
withQuery query f =
with _queryBox $ \pBox ->
with _queryUnBufferedBox $ \uBox ->
withAttributes _queryVariables $ \attrs ->
let alloc = C.withPtr_ $ \p -> [C.block|void {
auto q = new query( *$(bbox *pBox)
, std::tuple<double,... | 1,175 | withQuery :: Query -> (Ptr QueryPtr -> IO a) -> IO a
withQuery query f =
with _queryBox $ \pBox ->
with _queryUnBufferedBox $ \uBox ->
withAttributes _queryVariables $ \attrs ->
let alloc = C.withPtr_ $ \p -> [C.block|void {
auto q = new query( *$(bbox *pBox)
, std::tuple<double,... | 1,175 | withQuery query f =
with _queryBox $ \pBox ->
with _queryUnBufferedBox $ \uBox ->
withAttributes _queryVariables $ \attrs ->
let alloc = C.withPtr_ $ \p -> [C.block|void {
auto q = new query( *$(bbox *pBox)
, std::tuple<double,double>( $(double resx)
... | 1,122 | false | true | 6 | 17 | 415 | 224 | 120 | 104 | null | null |
holzensp/ghc | compiler/cmm/PprC.hs | bsd-3-clause | isFixedPtrReg (CmmGlobal r) = isFixedPtrGlobalReg r | 51 | isFixedPtrReg (CmmGlobal r) = isFixedPtrGlobalReg r | 51 | isFixedPtrReg (CmmGlobal r) = isFixedPtrGlobalReg r | 51 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
chrisbanks/cpiwb | runKai.hs | gpl-3.0 | -- G(¬([0.5]Inhib(in):{a-in@2e5} |> oscB(3)))
-- nested gtee: Whenever we introduce Inhib it kills the osc.?
ginhibG = Nec (0,infty) (Neg (Gtee pIn (oscB 3))) | 158 | ginhibG = Nec (0,infty) (Neg (Gtee pIn (oscB 3))) | 49 | ginhibG = Nec (0,infty) (Neg (Gtee pIn (oscB 3))) | 49 | true | false | 1 | 11 | 23 | 42 | 21 | 21 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.