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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aedanlombardo/HaskellPS | DSP-PBE/src/Types/Filter.hs | bsd-3-clause | zipSubForest f [] _ = error "Structural mismatch" | 49 | zipSubForest f [] _ = error "Structural mismatch" | 49 | zipSubForest f [] _ = error "Structural mismatch" | 49 | false | false | 0 | 6 | 7 | 18 | 8 | 10 | null | null |
ocharles/Francium | material/CSS.hs | bsd-3-clause | textTransform :: Behavior t TextTransform -> CSS t ()
textTransform v = "text-transform" -: fmap coerce v | 105 | textTransform :: Behavior t TextTransform -> CSS t ()
textTransform v = "text-transform" -: fmap coerce v | 105 | textTransform v = "text-transform" -: fmap coerce v | 51 | false | true | 0 | 7 | 16 | 39 | 18 | 21 | null | null |
dolio/vector | Data/Vector.hs | bsd-3-clause | init = G.init | 13 | init = G.init | 13 | init = G.init | 13 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
dylex/range-set | src/Data/RangeSet/Map.hs | mit | -- | /O(log n)/. Find largest element smaller than the given one.
lookupLT :: (Ord a, Enum a) => a -> RSet a -> Maybe a
lookupLT x (RSet xm) = min (pred x) . snd <$> Map.lookupLT x xm | 183 | lookupLT :: (Ord a, Enum a) => a -> RSet a -> Maybe a
lookupLT x (RSet xm) = min (pred x) . snd <$> Map.lookupLT x xm | 117 | lookupLT x (RSet xm) = min (pred x) . snd <$> Map.lookupLT x xm | 63 | true | true | 0 | 9 | 39 | 76 | 37 | 39 | null | null |
rueshyna/gogol | gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/List.hs | mpl-2.0 | -- | Creates a value of 'VideosList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vlChart'
--
-- * 'vlPart'
--
-- * 'vlRegionCode'
--
-- * 'vlLocale'
--
-- * 'vlMyRating'
--
-- * 'vlMaxHeight'
--
-- * 'vlHl'
--
-- * 'vlOnBehalfOfContentOwner'
--
-- * 'vlVideoCategoryId'
--
-- * 'vlMaxWidth'
--
-- * 'vlId'
--
-- * 'vlPageToken'
--
-- * 'vlMaxResults'
videosList
:: Text -- ^ 'vlPart'
-> VideosList
videosList pVlPart_ =
VideosList'
{ _vlChart = Nothing
, _vlPart = pVlPart_
, _vlRegionCode = Nothing
, _vlLocale = Nothing
, _vlMyRating = Nothing
, _vlMaxHeight = Nothing
, _vlHl = Nothing
, _vlOnBehalfOfContentOwner = Nothing
, _vlVideoCategoryId = "0"
, _vlMaxWidth = Nothing
, _vlId = Nothing
, _vlPageToken = Nothing
, _vlMaxResults = 5
} | 900 | videosList
:: Text -- ^ 'vlPart'
-> VideosList
videosList pVlPart_ =
VideosList'
{ _vlChart = Nothing
, _vlPart = pVlPart_
, _vlRegionCode = Nothing
, _vlLocale = Nothing
, _vlMyRating = Nothing
, _vlMaxHeight = Nothing
, _vlHl = Nothing
, _vlOnBehalfOfContentOwner = Nothing
, _vlVideoCategoryId = "0"
, _vlMaxWidth = Nothing
, _vlId = Nothing
, _vlPageToken = Nothing
, _vlMaxResults = 5
} | 459 | videosList pVlPart_ =
VideosList'
{ _vlChart = Nothing
, _vlPart = pVlPart_
, _vlRegionCode = Nothing
, _vlLocale = Nothing
, _vlMyRating = Nothing
, _vlMaxHeight = Nothing
, _vlHl = Nothing
, _vlOnBehalfOfContentOwner = Nothing
, _vlVideoCategoryId = "0"
, _vlMaxWidth = Nothing
, _vlId = Nothing
, _vlPageToken = Nothing
, _vlMaxResults = 5
} | 404 | true | true | 0 | 7 | 214 | 137 | 94 | 43 | null | null |
smurphy8/shakespeare-dynamic | shakespeare-dynamic-opheilia/src/Shakespeare/Dynamic/Opheilia/Parser.hs | mit | nestToDoc set (Nest (LineMaybe d i) inside:rest) = do
inside' <- nestToDoc set inside
(nothing, rest') <-
case rest of
Nest LineNothing ninside:x -> do
ninside' <- nestToDoc set ninside
return (Just ninside', x)
_ -> return (Nothing, rest)
rest'' <- nestToDoc set rest'
Ok $ DocMaybe d i inside' nothing : rest'' | 392 | nestToDoc set (Nest (LineMaybe d i) inside:rest) = do
inside' <- nestToDoc set inside
(nothing, rest') <-
case rest of
Nest LineNothing ninside:x -> do
ninside' <- nestToDoc set ninside
return (Just ninside', x)
_ -> return (Nothing, rest)
rest'' <- nestToDoc set rest'
Ok $ DocMaybe d i inside' nothing : rest'' | 392 | nestToDoc set (Nest (LineMaybe d i) inside:rest) = do
inside' <- nestToDoc set inside
(nothing, rest') <-
case rest of
Nest LineNothing ninside:x -> do
ninside' <- nestToDoc set ninside
return (Just ninside', x)
_ -> return (Nothing, rest)
rest'' <- nestToDoc set rest'
Ok $ DocMaybe d i inside' nothing : rest'' | 392 | false | false | 0 | 15 | 132 | 149 | 70 | 79 | null | null |
manyoo/skywalker | src/Skywalker/RestServer.hs | bsd-3-clause | restOr :: Text -> Application -> Application -> Application
restOr endPoint restApp backupApp req send_response = do
let p = safeHead $ pathInfo req
if p == Just endPoint
then restApp req send_response
else backupApp req send_response | 258 | restOr :: Text -> Application -> Application -> Application
restOr endPoint restApp backupApp req send_response = do
let p = safeHead $ pathInfo req
if p == Just endPoint
then restApp req send_response
else backupApp req send_response | 258 | restOr endPoint restApp backupApp req send_response = do
let p = safeHead $ pathInfo req
if p == Just endPoint
then restApp req send_response
else backupApp req send_response | 198 | false | true | 0 | 12 | 60 | 83 | 38 | 45 | null | null |
hazel-el/hazel | Hazel/Parser/OWL/BCP47.hs | gpl-3.0 | extension :: Parser Text
extension = cons <$> singleton <*> extensions
where extensions = T.concat <$> many1 (liftM pack ((:) <$> char '-'
<*> countFromTo 2 8 alphanum)) | 228 | extension :: Parser Text
extension = cons <$> singleton <*> extensions
where extensions = T.concat <$> many1 (liftM pack ((:) <$> char '-'
<*> countFromTo 2 8 alphanum)) | 228 | extension = cons <$> singleton <*> extensions
where extensions = T.concat <$> many1 (liftM pack ((:) <$> char '-'
<*> countFromTo 2 8 alphanum)) | 203 | false | true | 0 | 12 | 86 | 70 | 35 | 35 | null | null |
brendanhay/gogol | gogol-monitoring/gen/Network/Google/Resource/Monitoring/Projects/Groups/List.hs | mpl-2.0 | -- | A group name. The format is:
-- projects\/[PROJECT_ID_OR_NUMBER]\/groups\/[GROUP_ID] Returns the
-- descendants of the specified group. This is a superset of the results
-- returned by the children_of_group filter, and includes
-- children-of-children, and so forth.
pglDescendantsOfGroup :: Lens' ProjectsGroupsList (Maybe Text)
pglDescendantsOfGroup
= lens _pglDescendantsOfGroup
(\ s a -> s{_pglDescendantsOfGroup = a}) | 435 | pglDescendantsOfGroup :: Lens' ProjectsGroupsList (Maybe Text)
pglDescendantsOfGroup
= lens _pglDescendantsOfGroup
(\ s a -> s{_pglDescendantsOfGroup = a}) | 163 | pglDescendantsOfGroup
= lens _pglDescendantsOfGroup
(\ s a -> s{_pglDescendantsOfGroup = a}) | 100 | true | true | 0 | 8 | 62 | 53 | 29 | 24 | null | null |
acamino/state-codes | src/Data/StateCodes/ISO31662US.hs | mit | fromMName "Texas" = Just TX | 58 | fromMName "Texas" = Just TX | 58 | fromMName "Texas" = Just TX | 58 | false | false | 0 | 5 | 35 | 12 | 5 | 7 | null | null |
nevrenato/HyLoRes_Source | src/HyLoRes/FrontEnd/CommandLine.hs | gpl-2.0 | options :: [OptDescr CLPModifier]
options =
[Option ['h','?']
["help"]
(NoArg $ \c -> return c{showHelp = True})
"display this help and exit",
Option ['f']
["input-file"]
(ReqArg ((not . null) ?-> \s c -> return c{filename = Just s}) "FILE")
"obtain input formulas from FILE instead of STDIN",
Option ['q']
["quiet", "silent"]
(NoArg $ \c -> return c{quietMode = True})
"suppress all normal output",
Option ['t']
["timeout"]
(ReqArg setTimeout "T")
"run for at most T seconds",
Option ['n']
["worker-count"]
(ReqArg setWorkerCount "N")
(unlines["set SMP mode to on, running N workers (experimental)",
"default is " ++
maybe "off" show (workerCount defaultParams)]),
Option ['m']
["save-model"]
(ReqArg ((not . null) ?-> \s c -> return c{genModel = Just s}) "FILE")
(unlines [
"if the formulas are satisfiable, output a model",
"to FILE"]),
Option ['s']
["log-state"]
(NoArg $ \c -> return c{mustLogState = True})
"log the internal state (clauses, inUse and new)",
Option ['r']
["log-rules"]
(NoArg $ \c -> return c{mustLogRules = True})
"log rule applications",
Option []
["log-comm"]
(NoArg $ \c -> return c{mustLogComm = True})
"log communication between execution units",
Option ['S']
["statistics"]
(ReqArg setStats "PAT")
(unlines [
"PAT configures the collecting of statistics.",
"A valid PAT is of the form:",
"",
" METRICS:INTERVAL:METRICS",
"",
"The `:INTERVAL:METRICS` argument is optional",
"and declares metrics that will be printed at",
"regular intervals (e.g. `:100:r' shows the",
"number of rules applied so far, every 100",
"iterations of the given clause algorithm).",
"",
"METRICS is made of one or more of the following",
"values:",
" g = raw number of clauses generated",
" G = number of clauses that made it to the",
" Clauses queue (ie, not forward subsumed)",
" c = number of premises subsumed by their",
" consequents",
" r = number of rules applied",
" a = average number of formulas in the given",
" clause",
" l = late subsumed clauses",
"",
"The default is `" ++ statsStr defaultParams ++ "'",
""]),
Option ['o']
["select-given"]
(ReqArg setSelectGiven "PAT")
(unlines [
"PAT configures the criteria for the given clause",
"selection. A valid PAT is a combination of any",
"of the following values (priority in PAT goes",
"from left to right):",
" s = size of the clause",
" v = number of literals occurring",
" in the clause",
" V = number of literals in",
" the distinguished formula",
" d = maximum modal depth of",
" formulas in the clause",
" D = maximum modal depht of the",
" distinguished formula",
" l = minimum prefix level of",
" formulas in the clause ",
" L = minimum prefix level of",
" the distinguished formula",
" M = 1 if the distinguished formula",
" is an @diamond, and 0 otherwise",
" B = 1 if the distinguished formula",
" is an @-box, and 0 otherwise",
"",
"The default is `" ++ complexityStr defaultParams ++ "'",
""]),
Option []
["no-backwards-subsumption"]
(NoArg $ \c -> return c{useBWSubs = False})
"turn off backwards subsumption check",
Option ['D']
["dispatch-alg"]
(ReqArg setDispatchAlg "ALG")
(unlines [
"ALG configures the dispatch algorithm used to distribute nominals to workers.",
"The valid ALG are:",
" HASH = uses a simple hash function",
" RROBIN = uses a round-robin assigment",
" LOAD = assigns to the loader with less clauses processed",
""]),
Option ['F']
["select-func"]
(ReqArg setSelFunc "PAT")
(unlines [
"PAT configures the selection function to use.",
"A valid PAT is a combination of any of the",
"following values:",
" n = pick a negative literal",
" a = pick a conjunction",
" o = pick a disjunction",
" d = pick a diamond (but not a relation)",
" b = pick a box",
"",
"The selection function will pick a formula that",
"matches any of the above criterias, but in the",
"order they occur in PAT; the leftmost is the",
"one preferred. If there were more than one",
"candidates in the clause, the minimum candidate",
"will be preferred. If PAT starts with an `L',",
"then among all the candidates, the selection",
"function will prefer the minimum among those",
"whose prefix' level is minimum",
"",
"The default is `" ++ selFuncStr defaultParams ++ "'"])] | 5,514 | options :: [OptDescr CLPModifier]
options =
[Option ['h','?']
["help"]
(NoArg $ \c -> return c{showHelp = True})
"display this help and exit",
Option ['f']
["input-file"]
(ReqArg ((not . null) ?-> \s c -> return c{filename = Just s}) "FILE")
"obtain input formulas from FILE instead of STDIN",
Option ['q']
["quiet", "silent"]
(NoArg $ \c -> return c{quietMode = True})
"suppress all normal output",
Option ['t']
["timeout"]
(ReqArg setTimeout "T")
"run for at most T seconds",
Option ['n']
["worker-count"]
(ReqArg setWorkerCount "N")
(unlines["set SMP mode to on, running N workers (experimental)",
"default is " ++
maybe "off" show (workerCount defaultParams)]),
Option ['m']
["save-model"]
(ReqArg ((not . null) ?-> \s c -> return c{genModel = Just s}) "FILE")
(unlines [
"if the formulas are satisfiable, output a model",
"to FILE"]),
Option ['s']
["log-state"]
(NoArg $ \c -> return c{mustLogState = True})
"log the internal state (clauses, inUse and new)",
Option ['r']
["log-rules"]
(NoArg $ \c -> return c{mustLogRules = True})
"log rule applications",
Option []
["log-comm"]
(NoArg $ \c -> return c{mustLogComm = True})
"log communication between execution units",
Option ['S']
["statistics"]
(ReqArg setStats "PAT")
(unlines [
"PAT configures the collecting of statistics.",
"A valid PAT is of the form:",
"",
" METRICS:INTERVAL:METRICS",
"",
"The `:INTERVAL:METRICS` argument is optional",
"and declares metrics that will be printed at",
"regular intervals (e.g. `:100:r' shows the",
"number of rules applied so far, every 100",
"iterations of the given clause algorithm).",
"",
"METRICS is made of one or more of the following",
"values:",
" g = raw number of clauses generated",
" G = number of clauses that made it to the",
" Clauses queue (ie, not forward subsumed)",
" c = number of premises subsumed by their",
" consequents",
" r = number of rules applied",
" a = average number of formulas in the given",
" clause",
" l = late subsumed clauses",
"",
"The default is `" ++ statsStr defaultParams ++ "'",
""]),
Option ['o']
["select-given"]
(ReqArg setSelectGiven "PAT")
(unlines [
"PAT configures the criteria for the given clause",
"selection. A valid PAT is a combination of any",
"of the following values (priority in PAT goes",
"from left to right):",
" s = size of the clause",
" v = number of literals occurring",
" in the clause",
" V = number of literals in",
" the distinguished formula",
" d = maximum modal depth of",
" formulas in the clause",
" D = maximum modal depht of the",
" distinguished formula",
" l = minimum prefix level of",
" formulas in the clause ",
" L = minimum prefix level of",
" the distinguished formula",
" M = 1 if the distinguished formula",
" is an @diamond, and 0 otherwise",
" B = 1 if the distinguished formula",
" is an @-box, and 0 otherwise",
"",
"The default is `" ++ complexityStr defaultParams ++ "'",
""]),
Option []
["no-backwards-subsumption"]
(NoArg $ \c -> return c{useBWSubs = False})
"turn off backwards subsumption check",
Option ['D']
["dispatch-alg"]
(ReqArg setDispatchAlg "ALG")
(unlines [
"ALG configures the dispatch algorithm used to distribute nominals to workers.",
"The valid ALG are:",
" HASH = uses a simple hash function",
" RROBIN = uses a round-robin assigment",
" LOAD = assigns to the loader with less clauses processed",
""]),
Option ['F']
["select-func"]
(ReqArg setSelFunc "PAT")
(unlines [
"PAT configures the selection function to use.",
"A valid PAT is a combination of any of the",
"following values:",
" n = pick a negative literal",
" a = pick a conjunction",
" o = pick a disjunction",
" d = pick a diamond (but not a relation)",
" b = pick a box",
"",
"The selection function will pick a formula that",
"matches any of the above criterias, but in the",
"order they occur in PAT; the leftmost is the",
"one preferred. If there were more than one",
"candidates in the clause, the minimum candidate",
"will be preferred. If PAT starts with an `L',",
"then among all the candidates, the selection",
"function will prefer the minimum among those",
"whose prefix' level is minimum",
"",
"The default is `" ++ selFuncStr defaultParams ++ "'"])] | 5,514 | options =
[Option ['h','?']
["help"]
(NoArg $ \c -> return c{showHelp = True})
"display this help and exit",
Option ['f']
["input-file"]
(ReqArg ((not . null) ?-> \s c -> return c{filename = Just s}) "FILE")
"obtain input formulas from FILE instead of STDIN",
Option ['q']
["quiet", "silent"]
(NoArg $ \c -> return c{quietMode = True})
"suppress all normal output",
Option ['t']
["timeout"]
(ReqArg setTimeout "T")
"run for at most T seconds",
Option ['n']
["worker-count"]
(ReqArg setWorkerCount "N")
(unlines["set SMP mode to on, running N workers (experimental)",
"default is " ++
maybe "off" show (workerCount defaultParams)]),
Option ['m']
["save-model"]
(ReqArg ((not . null) ?-> \s c -> return c{genModel = Just s}) "FILE")
(unlines [
"if the formulas are satisfiable, output a model",
"to FILE"]),
Option ['s']
["log-state"]
(NoArg $ \c -> return c{mustLogState = True})
"log the internal state (clauses, inUse and new)",
Option ['r']
["log-rules"]
(NoArg $ \c -> return c{mustLogRules = True})
"log rule applications",
Option []
["log-comm"]
(NoArg $ \c -> return c{mustLogComm = True})
"log communication between execution units",
Option ['S']
["statistics"]
(ReqArg setStats "PAT")
(unlines [
"PAT configures the collecting of statistics.",
"A valid PAT is of the form:",
"",
" METRICS:INTERVAL:METRICS",
"",
"The `:INTERVAL:METRICS` argument is optional",
"and declares metrics that will be printed at",
"regular intervals (e.g. `:100:r' shows the",
"number of rules applied so far, every 100",
"iterations of the given clause algorithm).",
"",
"METRICS is made of one or more of the following",
"values:",
" g = raw number of clauses generated",
" G = number of clauses that made it to the",
" Clauses queue (ie, not forward subsumed)",
" c = number of premises subsumed by their",
" consequents",
" r = number of rules applied",
" a = average number of formulas in the given",
" clause",
" l = late subsumed clauses",
"",
"The default is `" ++ statsStr defaultParams ++ "'",
""]),
Option ['o']
["select-given"]
(ReqArg setSelectGiven "PAT")
(unlines [
"PAT configures the criteria for the given clause",
"selection. A valid PAT is a combination of any",
"of the following values (priority in PAT goes",
"from left to right):",
" s = size of the clause",
" v = number of literals occurring",
" in the clause",
" V = number of literals in",
" the distinguished formula",
" d = maximum modal depth of",
" formulas in the clause",
" D = maximum modal depht of the",
" distinguished formula",
" l = minimum prefix level of",
" formulas in the clause ",
" L = minimum prefix level of",
" the distinguished formula",
" M = 1 if the distinguished formula",
" is an @diamond, and 0 otherwise",
" B = 1 if the distinguished formula",
" is an @-box, and 0 otherwise",
"",
"The default is `" ++ complexityStr defaultParams ++ "'",
""]),
Option []
["no-backwards-subsumption"]
(NoArg $ \c -> return c{useBWSubs = False})
"turn off backwards subsumption check",
Option ['D']
["dispatch-alg"]
(ReqArg setDispatchAlg "ALG")
(unlines [
"ALG configures the dispatch algorithm used to distribute nominals to workers.",
"The valid ALG are:",
" HASH = uses a simple hash function",
" RROBIN = uses a round-robin assigment",
" LOAD = assigns to the loader with less clauses processed",
""]),
Option ['F']
["select-func"]
(ReqArg setSelFunc "PAT")
(unlines [
"PAT configures the selection function to use.",
"A valid PAT is a combination of any of the",
"following values:",
" n = pick a negative literal",
" a = pick a conjunction",
" o = pick a disjunction",
" d = pick a diamond (but not a relation)",
" b = pick a box",
"",
"The selection function will pick a formula that",
"matches any of the above criterias, but in the",
"order they occur in PAT; the leftmost is the",
"one preferred. If there were more than one",
"candidates in the clause, the minimum candidate",
"will be preferred. If PAT starts with an `L',",
"then among all the candidates, the selection",
"function will prefer the minimum among those",
"whose prefix' level is minimum",
"",
"The default is `" ++ selFuncStr defaultParams ++ "'"])] | 5,480 | false | true | 0 | 16 | 2,057 | 875 | 499 | 376 | null | null |
lih/Epsilon | src/Model.hs | bsd-3-clause | -- |Drag the selected node up
dragUp = dragBy selectUp | 54 | dragUp = dragBy selectUp | 24 | dragUp = dragBy selectUp | 24 | true | false | 1 | 5 | 9 | 14 | 5 | 9 | null | null |
oulgen/CudaPy | py2cuda/src/AST/Operations.hs | mit | isAssociative Shr = False | 25 | isAssociative Shr = False | 25 | isAssociative Shr = False | 25 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
kmerz/noodle | src/main.hs | bsd-2-clause | voteNameMap acc vote =
case M.lookup vName acc of
Just ids -> M.insert vName (vOptId:ids) acc
Nothing -> M.insert vName [vOptId] acc
where vName = voterName vote
vOptId = unSqlBackendKey $ unOptionKey $ voterOptId vote | 238 | voteNameMap acc vote =
case M.lookup vName acc of
Just ids -> M.insert vName (vOptId:ids) acc
Nothing -> M.insert vName [vOptId] acc
where vName = voterName vote
vOptId = unSqlBackendKey $ unOptionKey $ voterOptId vote | 238 | voteNameMap acc vote =
case M.lookup vName acc of
Just ids -> M.insert vName (vOptId:ids) acc
Nothing -> M.insert vName [vOptId] acc
where vName = voterName vote
vOptId = unSqlBackendKey $ unOptionKey $ voterOptId vote | 238 | false | false | 3 | 7 | 54 | 84 | 42 | 42 | null | null |
hmemcpy/milewski-ctfp-pdf | src/content/1.2/code/haskell/snippet07.hs | gpl-3.0 | f44 :: () -> Integer
f44 () = 44 | 32 | f44 :: () -> Integer
f44 () = 44 | 32 | f44 () = 44 | 11 | false | true | 0 | 8 | 8 | 28 | 12 | 16 | null | null |
gridaphobe/ghc | compiler/nativeGen/SPARC/Ppr.hs | bsd-3-clause | pprInstr (SLL reg1 ri reg2) = pprRegRIReg (sLit "sll") False reg1 ri reg2 | 76 | pprInstr (SLL reg1 ri reg2) = pprRegRIReg (sLit "sll") False reg1 ri reg2 | 76 | pprInstr (SLL reg1 ri reg2) = pprRegRIReg (sLit "sll") False reg1 ri reg2 | 76 | false | false | 0 | 7 | 15 | 36 | 17 | 19 | null | null |
oden-lang/oden | test/Oden/Type/PolymorphicSpec.hs | mit | named :: String -> Type -> Type
named = TNamed missing . nameInUniverse | 71 | named :: String -> Type -> Type
named = TNamed missing . nameInUniverse | 71 | named = TNamed missing . nameInUniverse | 39 | false | true | 0 | 8 | 12 | 33 | 14 | 19 | null | null |
trskop/cabal | cabal-install/Distribution/Client/Setup.hs | bsd-3-clause | defaultSandboxLocation :: FilePath
defaultSandboxLocation = ".cabal-sandbox" | 76 | defaultSandboxLocation :: FilePath
defaultSandboxLocation = ".cabal-sandbox" | 76 | defaultSandboxLocation = ".cabal-sandbox" | 41 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
nbrunt/JSHOP | src/CodeCompressor.hs | mit | genFormalParamList [id] = do
id' <- emitID id
emit id' | 62 | genFormalParamList [id] = do
id' <- emitID id
emit id' | 62 | genFormalParamList [id] = do
id' <- emitID id
emit id' | 62 | false | false | 0 | 8 | 17 | 28 | 12 | 16 | null | null |
bwmcadams/lambdaconf-2015 | speakers/goldfirere/src/Language/Glambda/Exp.hs | artistic-2.0 | eqExp (Cond e1a e1b e1c) (Cond e2a e2b e2c)
= e1a `eqExp` e2a && e1b `eqExp` e2b && e1c `eqExp` e2c | 101 | eqExp (Cond e1a e1b e1c) (Cond e2a e2b e2c)
= e1a `eqExp` e2a && e1b `eqExp` e2b && e1c `eqExp` e2c | 101 | eqExp (Cond e1a e1b e1c) (Cond e2a e2b e2c)
= e1a `eqExp` e2a && e1b `eqExp` e2b && e1c `eqExp` e2c | 101 | false | false | 0 | 9 | 22 | 57 | 31 | 26 | null | null |
tectronics/rockdodger | helpers/make_colourfile.hs | gpl-2.0 | chunkSparkleNDOT = Cons (chunkIdFromString "NDOT") $ Chunk $ B.concat $ BL.toChunks $ runPut f
where f = do putWord16be 0x1003 | 129 | chunkSparkleNDOT = Cons (chunkIdFromString "NDOT") $ Chunk $ B.concat $ BL.toChunks $ runPut f
where f = do putWord16be 0x1003 | 129 | chunkSparkleNDOT = Cons (chunkIdFromString "NDOT") $ Chunk $ B.concat $ BL.toChunks $ runPut f
where f = do putWord16be 0x1003 | 129 | false | false | 0 | 11 | 22 | 52 | 24 | 28 | null | null |
d-day/relation | include/pointfree-style/pointfree-1.0.4.3/Plugin/Pl/Common.hs | bsd-3-clause | sizeExpr (Let ds e) = 1 + sum (map sizeDecl ds) + sizeExpr e where
sizeDecl (Define _ e') = 1 + sizeExpr e' | 109 | sizeExpr (Let ds e) = 1 + sum (map sizeDecl ds) + sizeExpr e where
sizeDecl (Define _ e') = 1 + sizeExpr e' | 109 | sizeExpr (Let ds e) = 1 + sum (map sizeDecl ds) + sizeExpr e where
sizeDecl (Define _ e') = 1 + sizeExpr e' | 109 | false | false | 0 | 9 | 25 | 65 | 30 | 35 | null | null |
jamshidh/antlrToH | src/ParserCreator.hs | bsd-3-clause | createOrParser (Or [tl]) = createTermListParser tl | 50 | createOrParser (Or [tl]) = createTermListParser tl | 50 | createOrParser (Or [tl]) = createTermListParser tl | 50 | false | false | 0 | 7 | 5 | 22 | 10 | 12 | null | null |
emwap/syntactic | tests/NanoFeldsparTests.hs | bsd-3-clause | forEach = flip map | 18 | forEach = flip map | 18 | forEach = flip map | 18 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
jstolarek/ghc | compiler/main/DynFlags.hs | bsd-3-clause | ifGeneratingDynamicToo :: MonadIO m => DynFlags -> m a -> m a -> m a
ifGeneratingDynamicToo dflags f g = generateDynamicTooConditional dflags f g g | 147 | ifGeneratingDynamicToo :: MonadIO m => DynFlags -> m a -> m a -> m a
ifGeneratingDynamicToo dflags f g = generateDynamicTooConditional dflags f g g | 147 | ifGeneratingDynamicToo dflags f g = generateDynamicTooConditional dflags f g g | 78 | false | true | 0 | 9 | 24 | 55 | 25 | 30 | null | null |
diku-kmc/repg | test/Tests/OneApproximation.hs | mit | testCombinator :: [(String, RProgAct)] -> [ApproxMetric] -> [Int] -> [TS.Test]
testCombinator ps ms ks = concat $ map (\p -> concat ( map
(\m -> map (\k -> qtest p m k) ks) ms)) ps
where
qtest p m k = simpleTest (desc p m k) $ quickTest rpp $
prop_approx_match (snd p) (testSST (snd p) m k Matching) m k
desc p m k = "ApproxQC: " ++ (fst p) ++ " " ++ (show m) ++ " " ++ show k
rpp = 20 -- ^ Number of quickcheck runs pr program | 478 | testCombinator :: [(String, RProgAct)] -> [ApproxMetric] -> [Int] -> [TS.Test]
testCombinator ps ms ks = concat $ map (\p -> concat ( map
(\m -> map (\k -> qtest p m k) ks) ms)) ps
where
qtest p m k = simpleTest (desc p m k) $ quickTest rpp $
prop_approx_match (snd p) (testSST (snd p) m k Matching) m k
desc p m k = "ApproxQC: " ++ (fst p) ++ " " ++ (show m) ++ " " ++ show k
rpp = 20 -- ^ Number of quickcheck runs pr program | 478 | testCombinator ps ms ks = concat $ map (\p -> concat ( map
(\m -> map (\k -> qtest p m k) ks) ms)) ps
where
qtest p m k = simpleTest (desc p m k) $ quickTest rpp $
prop_approx_match (snd p) (testSST (snd p) m k Matching) m k
desc p m k = "ApproxQC: " ++ (fst p) ++ " " ++ (show m) ++ " " ++ show k
rpp = 20 -- ^ Number of quickcheck runs pr program | 399 | false | true | 1 | 17 | 144 | 235 | 118 | 117 | null | null |
sdiehl/ghc | compiler/GHC/Cmm/Utils.hs | bsd-3-clause | foldlGraphBlocks :: (a -> CmmBlock -> a) -> a -> CmmGraph -> a
foldlGraphBlocks k z g = mapFoldl k z $ toBlockMap g | 115 | foldlGraphBlocks :: (a -> CmmBlock -> a) -> a -> CmmGraph -> a
foldlGraphBlocks k z g = mapFoldl k z $ toBlockMap g | 115 | foldlGraphBlocks k z g = mapFoldl k z $ toBlockMap g | 52 | false | true | 0 | 8 | 23 | 53 | 26 | 27 | null | null |
elliottt/rogue | src/Rogue/Level.hs | bsd-3-clause | nodeMeasure :: Node -> Double
nodeMeasure Node { .. } = nodePathWeight + nodeHeuristic | 86 | nodeMeasure :: Node -> Double
nodeMeasure Node { .. } = nodePathWeight + nodeHeuristic | 86 | nodeMeasure Node { .. } = nodePathWeight + nodeHeuristic | 56 | false | true | 0 | 7 | 13 | 28 | 14 | 14 | null | null |
ihc/futhark | src/Language/Futhark/Core.hs | isc | nameToString :: Name -> String
nameToString (Name t) = T.unpack t | 65 | nameToString :: Name -> String
nameToString (Name t) = T.unpack t | 65 | nameToString (Name t) = T.unpack t | 34 | false | true | 0 | 7 | 10 | 29 | 14 | 15 | null | null |
siddhanathan/ghc | compiler/main/DriverPipeline.hs | bsd-3-clause | runPhase (RealPhase cc_phase) input_fn dflags
| any (cc_phase `eqPhase`) [Cc, Ccxx, HCc, Cobjc, Cobjcxx]
= do
let platform = targetPlatform dflags
hcc = cc_phase `eqPhase` HCc
let cmdline_include_paths = includePaths dflags
-- HC files have the dependent packages stamped into them
pkgs <- if hcc then liftIO $ getHCFilePackages input_fn else return []
-- add package include paths even if we're just compiling .c
-- files; this is the Value Add(TM) that using ghc instead of
-- gcc gives you :)
pkg_include_dirs <- liftIO $ getPackageIncludePath dflags pkgs
let include_paths = foldr (\ x xs -> ("-I" ++ x) : xs) []
(cmdline_include_paths ++ pkg_include_dirs)
let gcc_extra_viac_flags = extraGccViaCFlags dflags
let pic_c_flags = picCCOpts dflags
let verbFlags = getVerbFlags dflags
-- cc-options are not passed when compiling .hc files. Our
-- hc code doesn't not #include any header files anyway, so these
-- options aren't necessary.
pkg_extra_cc_opts <- liftIO $
if cc_phase `eqPhase` HCc
then return []
else getPackageExtraCcOpts dflags pkgs
framework_paths <-
if platformUsesFrameworks platform
then do pkgFrameworkPaths <- liftIO $ getPackageFrameworkPath dflags pkgs
let cmdlineFrameworkPaths = frameworkPaths dflags
return $ map ("-F"++)
(cmdlineFrameworkPaths ++ pkgFrameworkPaths)
else return []
let split_objs = gopt Opt_SplitObjs dflags
split_opt | hcc && split_objs = [ "-DUSE_SPLIT_MARKERS" ]
| otherwise = [ ]
let cc_opt | optLevel dflags >= 2 = [ "-O2" ]
| optLevel dflags >= 1 = [ "-O" ]
| otherwise = []
-- Decide next phase
let next_phase = As False
output_fn <- phaseOutputFilename next_phase
let
more_hcc_opts =
-- on x86 the floating point regs have greater precision
-- than a double, which leads to unpredictable results.
-- By default, we turn this off with -ffloat-store unless
-- the user specified -fexcess-precision.
(if platformArch platform == ArchX86 &&
not (gopt Opt_ExcessPrecision dflags)
then [ "-ffloat-store" ]
else []) ++
-- gcc's -fstrict-aliasing allows two accesses to memory
-- to be considered non-aliasing if they have different types.
-- This interacts badly with the C code we generate, which is
-- very weakly typed, being derived from C--.
["-fno-strict-aliasing"]
ghcVersionH <- liftIO $ getGhcVersionPathName dflags
let gcc_lang_opt | cc_phase `eqPhase` Ccxx = "c++"
| cc_phase `eqPhase` Cobjc = "objective-c"
| cc_phase `eqPhase` Cobjcxx = "objective-c++"
| otherwise = "c"
liftIO $ SysTools.runCc dflags (
-- force the C compiler to interpret this file as C when
-- compiling .hc files, by adding the -x c option.
-- Also useful for plain .c files, just in case GHC saw a
-- -x c option.
[ SysTools.Option "-x", SysTools.Option gcc_lang_opt
, SysTools.FileOption "" input_fn
, SysTools.Option "-o"
, SysTools.FileOption "" output_fn
]
++ map SysTools.Option (
pic_c_flags
-- Stub files generated for foreign exports references the runIO_closure
-- and runNonIO_closure symbols, which are defined in the base package.
-- These symbols are imported into the stub.c file via RtsAPI.h, and the
-- way we do the import depends on whether we're currently compiling
-- the base package or not.
++ (if platformOS platform == OSMinGW32 &&
thisPackage dflags == baseUnitId
then [ "-DCOMPILING_BASE_PACKAGE" ]
else [])
-- We only support SparcV9 and better because V8 lacks an atomic CAS
-- instruction. Note that the user can still override this
-- (e.g., -mcpu=ultrasparc) as GCC picks the "best" -mcpu flag
-- regardless of the ordering.
--
-- This is a temporary hack. See #2872, commit
-- 5bd3072ac30216a505151601884ac88bf404c9f2
++ (if platformArch platform == ArchSPARC
then ["-mcpu=v9"]
else [])
-- GCC 4.6+ doesn't like -Wimplicit when compiling C++.
++ (if (cc_phase /= Ccxx && cc_phase /= Cobjcxx)
then ["-Wimplicit"]
else [])
++ (if hcc
then gcc_extra_viac_flags ++ more_hcc_opts
else [])
++ verbFlags
++ [ "-S" ]
++ cc_opt
++ [ "-D__GLASGOW_HASKELL__="++cProjectVersionInt
, "-include", ghcVersionH
]
++ framework_paths
++ split_opt
++ include_paths
++ pkg_extra_cc_opts
))
return (RealPhase next_phase, output_fn)
-----------------------------------------------------------------------------
-- Splitting phase | 6,031 | runPhase (RealPhase cc_phase) input_fn dflags
| any (cc_phase `eqPhase`) [Cc, Ccxx, HCc, Cobjc, Cobjcxx]
= do
let platform = targetPlatform dflags
hcc = cc_phase `eqPhase` HCc
let cmdline_include_paths = includePaths dflags
-- HC files have the dependent packages stamped into them
pkgs <- if hcc then liftIO $ getHCFilePackages input_fn else return []
-- add package include paths even if we're just compiling .c
-- files; this is the Value Add(TM) that using ghc instead of
-- gcc gives you :)
pkg_include_dirs <- liftIO $ getPackageIncludePath dflags pkgs
let include_paths = foldr (\ x xs -> ("-I" ++ x) : xs) []
(cmdline_include_paths ++ pkg_include_dirs)
let gcc_extra_viac_flags = extraGccViaCFlags dflags
let pic_c_flags = picCCOpts dflags
let verbFlags = getVerbFlags dflags
-- cc-options are not passed when compiling .hc files. Our
-- hc code doesn't not #include any header files anyway, so these
-- options aren't necessary.
pkg_extra_cc_opts <- liftIO $
if cc_phase `eqPhase` HCc
then return []
else getPackageExtraCcOpts dflags pkgs
framework_paths <-
if platformUsesFrameworks platform
then do pkgFrameworkPaths <- liftIO $ getPackageFrameworkPath dflags pkgs
let cmdlineFrameworkPaths = frameworkPaths dflags
return $ map ("-F"++)
(cmdlineFrameworkPaths ++ pkgFrameworkPaths)
else return []
let split_objs = gopt Opt_SplitObjs dflags
split_opt | hcc && split_objs = [ "-DUSE_SPLIT_MARKERS" ]
| otherwise = [ ]
let cc_opt | optLevel dflags >= 2 = [ "-O2" ]
| optLevel dflags >= 1 = [ "-O" ]
| otherwise = []
-- Decide next phase
let next_phase = As False
output_fn <- phaseOutputFilename next_phase
let
more_hcc_opts =
-- on x86 the floating point regs have greater precision
-- than a double, which leads to unpredictable results.
-- By default, we turn this off with -ffloat-store unless
-- the user specified -fexcess-precision.
(if platformArch platform == ArchX86 &&
not (gopt Opt_ExcessPrecision dflags)
then [ "-ffloat-store" ]
else []) ++
-- gcc's -fstrict-aliasing allows two accesses to memory
-- to be considered non-aliasing if they have different types.
-- This interacts badly with the C code we generate, which is
-- very weakly typed, being derived from C--.
["-fno-strict-aliasing"]
ghcVersionH <- liftIO $ getGhcVersionPathName dflags
let gcc_lang_opt | cc_phase `eqPhase` Ccxx = "c++"
| cc_phase `eqPhase` Cobjc = "objective-c"
| cc_phase `eqPhase` Cobjcxx = "objective-c++"
| otherwise = "c"
liftIO $ SysTools.runCc dflags (
-- force the C compiler to interpret this file as C when
-- compiling .hc files, by adding the -x c option.
-- Also useful for plain .c files, just in case GHC saw a
-- -x c option.
[ SysTools.Option "-x", SysTools.Option gcc_lang_opt
, SysTools.FileOption "" input_fn
, SysTools.Option "-o"
, SysTools.FileOption "" output_fn
]
++ map SysTools.Option (
pic_c_flags
-- Stub files generated for foreign exports references the runIO_closure
-- and runNonIO_closure symbols, which are defined in the base package.
-- These symbols are imported into the stub.c file via RtsAPI.h, and the
-- way we do the import depends on whether we're currently compiling
-- the base package or not.
++ (if platformOS platform == OSMinGW32 &&
thisPackage dflags == baseUnitId
then [ "-DCOMPILING_BASE_PACKAGE" ]
else [])
-- We only support SparcV9 and better because V8 lacks an atomic CAS
-- instruction. Note that the user can still override this
-- (e.g., -mcpu=ultrasparc) as GCC picks the "best" -mcpu flag
-- regardless of the ordering.
--
-- This is a temporary hack. See #2872, commit
-- 5bd3072ac30216a505151601884ac88bf404c9f2
++ (if platformArch platform == ArchSPARC
then ["-mcpu=v9"]
else [])
-- GCC 4.6+ doesn't like -Wimplicit when compiling C++.
++ (if (cc_phase /= Ccxx && cc_phase /= Cobjcxx)
then ["-Wimplicit"]
else [])
++ (if hcc
then gcc_extra_viac_flags ++ more_hcc_opts
else [])
++ verbFlags
++ [ "-S" ]
++ cc_opt
++ [ "-D__GLASGOW_HASKELL__="++cProjectVersionInt
, "-include", ghcVersionH
]
++ framework_paths
++ split_opt
++ include_paths
++ pkg_extra_cc_opts
))
return (RealPhase next_phase, output_fn)
-----------------------------------------------------------------------------
-- Splitting phase | 6,031 | runPhase (RealPhase cc_phase) input_fn dflags
| any (cc_phase `eqPhase`) [Cc, Ccxx, HCc, Cobjc, Cobjcxx]
= do
let platform = targetPlatform dflags
hcc = cc_phase `eqPhase` HCc
let cmdline_include_paths = includePaths dflags
-- HC files have the dependent packages stamped into them
pkgs <- if hcc then liftIO $ getHCFilePackages input_fn else return []
-- add package include paths even if we're just compiling .c
-- files; this is the Value Add(TM) that using ghc instead of
-- gcc gives you :)
pkg_include_dirs <- liftIO $ getPackageIncludePath dflags pkgs
let include_paths = foldr (\ x xs -> ("-I" ++ x) : xs) []
(cmdline_include_paths ++ pkg_include_dirs)
let gcc_extra_viac_flags = extraGccViaCFlags dflags
let pic_c_flags = picCCOpts dflags
let verbFlags = getVerbFlags dflags
-- cc-options are not passed when compiling .hc files. Our
-- hc code doesn't not #include any header files anyway, so these
-- options aren't necessary.
pkg_extra_cc_opts <- liftIO $
if cc_phase `eqPhase` HCc
then return []
else getPackageExtraCcOpts dflags pkgs
framework_paths <-
if platformUsesFrameworks platform
then do pkgFrameworkPaths <- liftIO $ getPackageFrameworkPath dflags pkgs
let cmdlineFrameworkPaths = frameworkPaths dflags
return $ map ("-F"++)
(cmdlineFrameworkPaths ++ pkgFrameworkPaths)
else return []
let split_objs = gopt Opt_SplitObjs dflags
split_opt | hcc && split_objs = [ "-DUSE_SPLIT_MARKERS" ]
| otherwise = [ ]
let cc_opt | optLevel dflags >= 2 = [ "-O2" ]
| optLevel dflags >= 1 = [ "-O" ]
| otherwise = []
-- Decide next phase
let next_phase = As False
output_fn <- phaseOutputFilename next_phase
let
more_hcc_opts =
-- on x86 the floating point regs have greater precision
-- than a double, which leads to unpredictable results.
-- By default, we turn this off with -ffloat-store unless
-- the user specified -fexcess-precision.
(if platformArch platform == ArchX86 &&
not (gopt Opt_ExcessPrecision dflags)
then [ "-ffloat-store" ]
else []) ++
-- gcc's -fstrict-aliasing allows two accesses to memory
-- to be considered non-aliasing if they have different types.
-- This interacts badly with the C code we generate, which is
-- very weakly typed, being derived from C--.
["-fno-strict-aliasing"]
ghcVersionH <- liftIO $ getGhcVersionPathName dflags
let gcc_lang_opt | cc_phase `eqPhase` Ccxx = "c++"
| cc_phase `eqPhase` Cobjc = "objective-c"
| cc_phase `eqPhase` Cobjcxx = "objective-c++"
| otherwise = "c"
liftIO $ SysTools.runCc dflags (
-- force the C compiler to interpret this file as C when
-- compiling .hc files, by adding the -x c option.
-- Also useful for plain .c files, just in case GHC saw a
-- -x c option.
[ SysTools.Option "-x", SysTools.Option gcc_lang_opt
, SysTools.FileOption "" input_fn
, SysTools.Option "-o"
, SysTools.FileOption "" output_fn
]
++ map SysTools.Option (
pic_c_flags
-- Stub files generated for foreign exports references the runIO_closure
-- and runNonIO_closure symbols, which are defined in the base package.
-- These symbols are imported into the stub.c file via RtsAPI.h, and the
-- way we do the import depends on whether we're currently compiling
-- the base package or not.
++ (if platformOS platform == OSMinGW32 &&
thisPackage dflags == baseUnitId
then [ "-DCOMPILING_BASE_PACKAGE" ]
else [])
-- We only support SparcV9 and better because V8 lacks an atomic CAS
-- instruction. Note that the user can still override this
-- (e.g., -mcpu=ultrasparc) as GCC picks the "best" -mcpu flag
-- regardless of the ordering.
--
-- This is a temporary hack. See #2872, commit
-- 5bd3072ac30216a505151601884ac88bf404c9f2
++ (if platformArch platform == ArchSPARC
then ["-mcpu=v9"]
else [])
-- GCC 4.6+ doesn't like -Wimplicit when compiling C++.
++ (if (cc_phase /= Ccxx && cc_phase /= Cobjcxx)
then ["-Wimplicit"]
else [])
++ (if hcc
then gcc_extra_viac_flags ++ more_hcc_opts
else [])
++ verbFlags
++ [ "-S" ]
++ cc_opt
++ [ "-D__GLASGOW_HASKELL__="++cProjectVersionInt
, "-include", ghcVersionH
]
++ framework_paths
++ split_opt
++ include_paths
++ pkg_extra_cc_opts
))
return (RealPhase next_phase, output_fn)
-----------------------------------------------------------------------------
-- Splitting phase | 6,031 | false | false | 0 | 31 | 2,490 | 862 | 447 | 415 | null | null |
epaulson10/HaskellDES | DES.hs | gpl-3.0 | s7 =
[4 , 11, 2 , 14, 15, 0 , 8 , 13, 3 , 12, 9 , 7 , 5 , 10, 6 , 1,
13, 0 , 11, 7 , 4 , 9 , 1 , 10, 14, 3 , 5 , 12, 2 , 15, 8 , 6,
1 , 4 , 11, 13, 12, 3 , 7 , 14, 10, 15, 6 , 8 , 0 , 5 , 9 , 2,
6 , 11, 13, 8 , 1 , 4 , 10, 7 , 9 , 5 , 0 , 15, 14, 2 , 3 , 12] | 275 | s7 =
[4 , 11, 2 , 14, 15, 0 , 8 , 13, 3 , 12, 9 , 7 , 5 , 10, 6 , 1,
13, 0 , 11, 7 , 4 , 9 , 1 , 10, 14, 3 , 5 , 12, 2 , 15, 8 , 6,
1 , 4 , 11, 13, 12, 3 , 7 , 14, 10, 15, 6 , 8 , 0 , 5 , 9 , 2,
6 , 11, 13, 8 , 1 , 4 , 10, 7 , 9 , 5 , 0 , 15, 14, 2 , 3 , 12] | 275 | s7 =
[4 , 11, 2 , 14, 15, 0 , 8 , 13, 3 , 12, 9 , 7 , 5 , 10, 6 , 1,
13, 0 , 11, 7 , 4 , 9 , 1 , 10, 14, 3 , 5 , 12, 2 , 15, 8 , 6,
1 , 4 , 11, 13, 12, 3 , 7 , 14, 10, 15, 6 , 8 , 0 , 5 , 9 , 2,
6 , 11, 13, 8 , 1 , 4 , 10, 7 , 9 , 5 , 0 , 15, 14, 2 , 3 , 12] | 275 | false | false | 0 | 5 | 119 | 198 | 131 | 67 | null | null |
orchid-hybrid/bee | BeeParserParsec.hs | gpl-3.0 | parseBlock = brackets (do
identifier <- maybeP (do
identifier <- parseIdentifier
char ':'
return identifier) succeed
statements <- many1 parseStatement
return (Block identifier statements)) | 225 | parseBlock = brackets (do
identifier <- maybeP (do
identifier <- parseIdentifier
char ':'
return identifier) succeed
statements <- many1 parseStatement
return (Block identifier statements)) | 225 | parseBlock = brackets (do
identifier <- maybeP (do
identifier <- parseIdentifier
char ':'
return identifier) succeed
statements <- many1 parseStatement
return (Block identifier statements)) | 225 | false | false | 1 | 14 | 59 | 74 | 30 | 44 | null | null |
jthornber/language-c-ejt | src/Language/C/Analysis/TypeCheck.hs | bsd-3-clause | compositeType (ArrayType t1 s1 q1 a1) (ArrayType t2 s2 q2 a2) =
do t <- compositeType t1 t2
s <- compositeSize s1 s2
let quals = mergeTypeQuals q1 q2
attrs = mergeAttrs a1 a2
return (ArrayType t s quals attrs) | 235 | compositeType (ArrayType t1 s1 q1 a1) (ArrayType t2 s2 q2 a2) =
do t <- compositeType t1 t2
s <- compositeSize s1 s2
let quals = mergeTypeQuals q1 q2
attrs = mergeAttrs a1 a2
return (ArrayType t s quals attrs) | 235 | compositeType (ArrayType t1 s1 q1 a1) (ArrayType t2 s2 q2 a2) =
do t <- compositeType t1 t2
s <- compositeSize s1 s2
let quals = mergeTypeQuals q1 q2
attrs = mergeAttrs a1 a2
return (ArrayType t s quals attrs) | 235 | false | false | 0 | 10 | 65 | 101 | 46 | 55 | null | null |
keera-studios/hsQt | Qtc/Gui/QGraphicsPixmapItem.hs | bsd-2-clause | setTransformationMode :: QGraphicsPixmapItem a -> ((TransformationMode)) -> IO ()
setTransformationMode x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QGraphicsPixmapItem_setTransformationMode cobj_x0 (toCLong $ qEnum_toInt x1) | 231 | setTransformationMode :: QGraphicsPixmapItem a -> ((TransformationMode)) -> IO ()
setTransformationMode x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QGraphicsPixmapItem_setTransformationMode cobj_x0 (toCLong $ qEnum_toInt x1) | 231 | setTransformationMode x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QGraphicsPixmapItem_setTransformationMode cobj_x0 (toCLong $ qEnum_toInt x1) | 149 | false | true | 0 | 10 | 29 | 68 | 34 | 34 | null | null |
leshchevds/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | ssUidPool :: String
ssUidPool = "uid_pool" | 42 | ssUidPool :: String
ssUidPool = "uid_pool" | 42 | ssUidPool = "uid_pool" | 22 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
kim/amazonka | amazonka-elastictranscoder/gen/Network/AWS/ElasticTranscoder/Types.hs | mpl-2.0 | -- | The maximum height of the output video in pixels. If you specify 'auto',
-- Elastic Transcoder uses 1080 (Full HD) as the default value. If you specify a
-- numeric value, enter an even integer between 96 and 3072.
vpMaxHeight :: Lens' VideoParameters (Maybe Text)
vpMaxHeight = lens _vpMaxHeight (\s a -> s { _vpMaxHeight = a }) | 334 | vpMaxHeight :: Lens' VideoParameters (Maybe Text)
vpMaxHeight = lens _vpMaxHeight (\s a -> s { _vpMaxHeight = a }) | 114 | vpMaxHeight = lens _vpMaxHeight (\s a -> s { _vpMaxHeight = a }) | 64 | true | true | 0 | 9 | 59 | 48 | 27 | 21 | null | null |
anttisalonen/starrover2 | src/AObject.hs | mit | hasSomeOwner :: AObject -> Bool
hasSomeOwner = isJust . colonyOwner | 67 | hasSomeOwner :: AObject -> Bool
hasSomeOwner = isJust . colonyOwner | 67 | hasSomeOwner = isJust . colonyOwner | 35 | false | true | 0 | 7 | 9 | 26 | 11 | 15 | null | null |
luebbers/reconos | tools/fsmLanguage/kurm/assembler/Ast.hs | gpl-3.0 | label n = Label n | 22 | label n = Label n | 22 | label n = Label n | 22 | false | false | 0 | 5 | 9 | 12 | 5 | 7 | null | null |
eryx67/haskell-libtorrent | src/Network/Libtorrent/PeerInfo.hs | bsd-3-clause | setPendingDiskBytes :: MonadIO m => PeerInfo -> CInt -> m ()
setPendingDiskBytes ho val =
liftIO . withPtr ho $ \hoPtr ->
[CU.exp| void { $(peer_info * hoPtr)->pending_disk_bytes = $(int val)} |] | 199 | setPendingDiskBytes :: MonadIO m => PeerInfo -> CInt -> m ()
setPendingDiskBytes ho val =
liftIO . withPtr ho $ \hoPtr ->
[CU.exp| void { $(peer_info * hoPtr)->pending_disk_bytes = $(int val)} |] | 199 | setPendingDiskBytes ho val =
liftIO . withPtr ho $ \hoPtr ->
[CU.exp| void { $(peer_info * hoPtr)->pending_disk_bytes = $(int val)} |] | 138 | false | true | 3 | 10 | 35 | 65 | 31 | 34 | null | null |
cstrahan/nikki | src/Utils.hs | lgpl-3.0 | convertErrorT :: Functor m => (a -> b) -> ErrorT a m o -> ErrorT b m o
convertErrorT f (ErrorT action) = ErrorT $
(either (Left . f) Right <$> action) | 154 | convertErrorT :: Functor m => (a -> b) -> ErrorT a m o -> ErrorT b m o
convertErrorT f (ErrorT action) = ErrorT $
(either (Left . f) Right <$> action) | 154 | convertErrorT f (ErrorT action) = ErrorT $
(either (Left . f) Right <$> action) | 83 | false | true | 2 | 11 | 35 | 87 | 41 | 46 | null | null |
mlite/hLLVM | src/Llvm/Asm/Parser/Module.hs | bsd-3-clause | pToplevelDeclare :: P Toplevel
pToplevelDeclare = liftM ToplevelDeclare
(reserved "declare" >> liftM TlDeclare pFunctionPrototype) | 168 | pToplevelDeclare :: P Toplevel
pToplevelDeclare = liftM ToplevelDeclare
(reserved "declare" >> liftM TlDeclare pFunctionPrototype) | 150 | pToplevelDeclare = liftM ToplevelDeclare
(reserved "declare" >> liftM TlDeclare pFunctionPrototype) | 119 | false | true | 0 | 8 | 51 | 41 | 17 | 24 | null | null |
perryleo/sicp | ch1/sicpc1e40.hs | mit | -- Define a cubic polynomial function
cubic :: Num a => a -> a -> a -> a -> a
cubic a b c =
\x -> x * x * x + a * x * x + b * x + c | 133 | cubic :: Num a => a -> a -> a -> a -> a
cubic a b c =
\x -> x * x * x + a * x * x + b * x + c | 95 | cubic a b c =
\x -> x * x * x + a * x * x + b * x + c | 55 | true | true | 0 | 13 | 45 | 79 | 40 | 39 | null | null |
psandahl/big-engine | src/BigE/Texture.hs | mit | delete :: MonadIO m => Texture -> m ()
delete = deleteTexture | 61 | delete :: MonadIO m => Texture -> m ()
delete = deleteTexture | 61 | delete = deleteTexture | 22 | false | true | 0 | 8 | 11 | 27 | 13 | 14 | null | null |
Feeniks/valkyrie | src/Valkyrie/Math.hs | bsd-3-clause | dot2 :: Vector2 -> Vector2 -> NReal
dot2 (V2 x1 y1) (V2 x2 y2) = (x1 * x2) + (y1 * y2) | 86 | dot2 :: Vector2 -> Vector2 -> NReal
dot2 (V2 x1 y1) (V2 x2 y2) = (x1 * x2) + (y1 * y2) | 86 | dot2 (V2 x1 y1) (V2 x2 y2) = (x1 * x2) + (y1 * y2) | 50 | false | true | 0 | 7 | 21 | 58 | 30 | 28 | null | null |
gridaphobe/ghc | compiler/main/DynFlags.hs | bsd-3-clause | -- | Define a new flag invisible to CLI completion.
flagHiddenSpec :: String -> flag -> FlagSpec flag
flagHiddenSpec name flag = flagHiddenSpec' name flag nop | 158 | flagHiddenSpec :: String -> flag -> FlagSpec flag
flagHiddenSpec name flag = flagHiddenSpec' name flag nop | 106 | flagHiddenSpec name flag = flagHiddenSpec' name flag nop | 56 | true | true | 0 | 7 | 25 | 35 | 17 | 18 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 1266 = 1265 | 11 | 1266 = 1265 | 11 | 1266 = 1265 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
haskell/ghc-builder | client/ClientMonad.hs | bsd-3-clause | setHandle :: HandleOrSsl -> ClientMonad ()
setHandle h = do st <- ClientMonad get
ClientMonad $ put $ st { cs_handleOrSsl = h } | 144 | setHandle :: HandleOrSsl -> ClientMonad ()
setHandle h = do st <- ClientMonad get
ClientMonad $ put $ st { cs_handleOrSsl = h } | 144 | setHandle h = do st <- ClientMonad get
ClientMonad $ put $ st { cs_handleOrSsl = h } | 101 | false | true | 0 | 10 | 40 | 57 | 26 | 31 | null | null |
bitemyapp/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | boxedMarshalableTyCon :: TyCon -> Bool
boxedMarshalableTyCon tc
| getUnique tc `elem` [ intTyConKey, int8TyConKey, int16TyConKey
, int32TyConKey, int64TyConKey
, wordTyConKey, word8TyConKey, word16TyConKey
, word32TyConKey, word64TyConKey
, floatTyConKey, doubleTyConKey
, ptrTyConKey, funPtrTyConKey
, charTyConKey
, stablePtrTyConKey
, boolTyConKey
]
= True
| otherwise = False | 612 | boxedMarshalableTyCon :: TyCon -> Bool
boxedMarshalableTyCon tc
| getUnique tc `elem` [ intTyConKey, int8TyConKey, int16TyConKey
, int32TyConKey, int64TyConKey
, wordTyConKey, word8TyConKey, word16TyConKey
, word32TyConKey, word64TyConKey
, floatTyConKey, doubleTyConKey
, ptrTyConKey, funPtrTyConKey
, charTyConKey
, stablePtrTyConKey
, boolTyConKey
]
= True
| otherwise = False | 612 | boxedMarshalableTyCon tc
| getUnique tc `elem` [ intTyConKey, int8TyConKey, int16TyConKey
, int32TyConKey, int64TyConKey
, wordTyConKey, word8TyConKey, word16TyConKey
, word32TyConKey, word64TyConKey
, floatTyConKey, doubleTyConKey
, ptrTyConKey, funPtrTyConKey
, charTyConKey
, stablePtrTyConKey
, boolTyConKey
]
= True
| otherwise = False | 573 | false | true | 0 | 9 | 276 | 96 | 55 | 41 | null | null |
mettekou/ghc | compiler/prelude/THNames.hs | bsd-3-clause | -- data Guard = ...
normalGEName, patGEName :: Name
normalGEName = libFun (fsLit "normalGE") normalGEIdKey | 106 | normalGEName, patGEName :: Name
normalGEName = libFun (fsLit "normalGE") normalGEIdKey | 86 | normalGEName = libFun (fsLit "normalGE") normalGEIdKey | 54 | true | true | 0 | 7 | 14 | 25 | 14 | 11 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 13794 = 5285 | 32 | getValueFromProduct 13794 = 5285 | 32 | getValueFromProduct 13794 = 5285 | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
projectorhq/haskell-liquid | test/Text/Liquid/RendererTests.hs | bsd-3-clause | case_bothSidesEqual6 = let l = QuoteString "b"
r = Variable $ ObjectIndex "a" :| []
j = object ["a" .= ("b" :: Text)]
exp = AccSuccess True
res = bothSidesEqual j l r
in res @?= exp | 318 | case_bothSidesEqual6 = let l = QuoteString "b"
r = Variable $ ObjectIndex "a" :| []
j = object ["a" .= ("b" :: Text)]
exp = AccSuccess True
res = bothSidesEqual j l r
in res @?= exp | 318 | case_bothSidesEqual6 = let l = QuoteString "b"
r = Variable $ ObjectIndex "a" :| []
j = object ["a" .= ("b" :: Text)]
exp = AccSuccess True
res = bothSidesEqual j l r
in res @?= exp | 318 | false | false | 0 | 12 | 173 | 83 | 42 | 41 | null | null |
ninedotnine/bugfree-computing-machine | src/Hsax.hs | gpl-3.0 | addPublic :: [String] -> Writer ([Integer], [String], [String]) ()
addPublic = mapM_ (\str -> tell ([], [], [str])) | 115 | addPublic :: [String] -> Writer ([Integer], [String], [String]) ()
addPublic = mapM_ (\str -> tell ([], [], [str])) | 115 | addPublic = mapM_ (\str -> tell ([], [], [str])) | 48 | false | true | 0 | 10 | 17 | 73 | 42 | 31 | null | null |
cbrghostrider/Hacking | HackerRank/Contests/ProjectEuler/017_numberToWords.hs | mit | toWord 40 = "Forty" | 19 | toWord 40 = "Forty" | 19 | toWord 40 = "Forty" | 19 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
Shimuuar/statistics | tests/Tests/Distribution.hs | bsd-2-clause | quantileIsInvCDF :: (Param d, ContDistr d) => T d -> d -> Double01 -> Property
quantileIsInvCDF _ d (Double01 p) =
and [ p > m_tiny
, p < 1
, x > m_tiny
, dens > 0
] ==>
( counterexample (printf "Quantile = %g" x )
$ counterexample (printf "Probability = %g" p )
$ counterexample (printf "Probability' = %g" p')
$ counterexample (printf "Rel. error = %g" (relativeError p p'))
$ counterexample (printf "Abs. error = %e" (abs $ p - p'))
$ counterexample (printf "Expected err. = %g" err)
$ counterexample (printf "Distance = %i" (ulpDistance p p'))
$ counterexample (printf "Err/est = %g" (fromIntegral (ulpDistance p p') / err))
$ ulpDistance p p' <= round err
)
where
-- Algorithm for error estimation is taken from here
--
-- http://sepulcarium.org/posts/2012-07-19-rounding_effect_on_inverse.html
dens = density d x
err = eps + eps' * abs (x / p) * dens
--
x = quantile d p
p' = cumulative d x
(eps,eps') = prec_quantile_CDF d
-- Test that quantile fails if p<0 or p>1 | 1,112 | quantileIsInvCDF :: (Param d, ContDistr d) => T d -> d -> Double01 -> Property
quantileIsInvCDF _ d (Double01 p) =
and [ p > m_tiny
, p < 1
, x > m_tiny
, dens > 0
] ==>
( counterexample (printf "Quantile = %g" x )
$ counterexample (printf "Probability = %g" p )
$ counterexample (printf "Probability' = %g" p')
$ counterexample (printf "Rel. error = %g" (relativeError p p'))
$ counterexample (printf "Abs. error = %e" (abs $ p - p'))
$ counterexample (printf "Expected err. = %g" err)
$ counterexample (printf "Distance = %i" (ulpDistance p p'))
$ counterexample (printf "Err/est = %g" (fromIntegral (ulpDistance p p') / err))
$ ulpDistance p p' <= round err
)
where
-- Algorithm for error estimation is taken from here
--
-- http://sepulcarium.org/posts/2012-07-19-rounding_effect_on_inverse.html
dens = density d x
err = eps + eps' * abs (x / p) * dens
--
x = quantile d p
p' = cumulative d x
(eps,eps') = prec_quantile_CDF d
-- Test that quantile fails if p<0 or p>1 | 1,112 | quantileIsInvCDF _ d (Double01 p) =
and [ p > m_tiny
, p < 1
, x > m_tiny
, dens > 0
] ==>
( counterexample (printf "Quantile = %g" x )
$ counterexample (printf "Probability = %g" p )
$ counterexample (printf "Probability' = %g" p')
$ counterexample (printf "Rel. error = %g" (relativeError p p'))
$ counterexample (printf "Abs. error = %e" (abs $ p - p'))
$ counterexample (printf "Expected err. = %g" err)
$ counterexample (printf "Distance = %i" (ulpDistance p p'))
$ counterexample (printf "Err/est = %g" (fromIntegral (ulpDistance p p') / err))
$ ulpDistance p p' <= round err
)
where
-- Algorithm for error estimation is taken from here
--
-- http://sepulcarium.org/posts/2012-07-19-rounding_effect_on_inverse.html
dens = density d x
err = eps + eps' * abs (x / p) * dens
--
x = quantile d p
p' = cumulative d x
(eps,eps') = prec_quantile_CDF d
-- Test that quantile fails if p<0 or p>1 | 1,033 | false | true | 4 | 18 | 316 | 350 | 175 | 175 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | humiliatedly = id | 17 | humiliatedly = id | 17 | humiliatedly = id | 17 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
alonho/bottle | examples/Editor/Config.hs | gpl-3.0 | -- pasteKeys = [ctrl 'v']
-- cutKeys = [ctrl 'x']
-- actionKeys = [simple E.KeyEnter]
quitKeys = [ctrl 'q'] | 143 | quitKeys = [ctrl 'q'] | 30 | quitKeys = [ctrl 'q'] | 30 | true | false | 0 | 6 | 54 | 15 | 9 | 6 | null | null |
tanakh/hsmsgpack | src/Data/MessagePack.hs | bsd-3-clause | -- | Pack Haskell data to MessagePack string.
packb :: OBJECT a => a -> IO ByteString
packb dat = do
sb <- newSimpleBuffer
pc <- newPacker sb
pack pc dat
simpleBufferData sb
-- | Unpack MessagePack string to Haskell data. | 230 | packb :: OBJECT a => a -> IO ByteString
packb dat = do
sb <- newSimpleBuffer
pc <- newPacker sb
pack pc dat
simpleBufferData sb
-- | Unpack MessagePack string to Haskell data. | 184 | packb dat = do
sb <- newSimpleBuffer
pc <- newPacker sb
pack pc dat
simpleBufferData sb
-- | Unpack MessagePack string to Haskell data. | 144 | true | true | 0 | 8 | 49 | 61 | 27 | 34 | null | null |
maximilianhuber/innovation | lib/Game/Innovation/Rules/Helper.hs | bsd-3-clause | getInfluenceOf :: UserId -> MoveType Int
getInfluenceOf = liftToGet influenceOf | 79 | getInfluenceOf :: UserId -> MoveType Int
getInfluenceOf = liftToGet influenceOf | 79 | getInfluenceOf = liftToGet influenceOf | 38 | false | true | 0 | 6 | 9 | 21 | 10 | 11 | null | null |
mightymoose/liquidhaskell | tests/neg/sumk.hs | bsd-3-clause | bot = choose 0 | 14 | bot = choose 0 | 14 | bot = choose 0 | 14 | false | false | 1 | 5 | 3 | 12 | 4 | 8 | null | null |
keithodulaigh/Hets | Static/testApplyDiff.hs | gpl-2.0 | ain :: IO ()
main = do
args <- getArgs
case args of
("-p" : p1 : ps) -> printDiff p1 ps
(p1 : ps) -> testDiff p1 ps
_ -> putStrLn "missing arguments: xml-file location and diff/xupdate files"
| 208 | main :: IO ()
main = do
args <- getArgs
case args of
("-p" : p1 : ps) -> printDiff p1 ps
(p1 : ps) -> testDiff p1 ps
_ -> putStrLn "missing arguments: xml-file location and diff/xupdate files" | 208 | main = do
args <- getArgs
case args of
("-p" : p1 : ps) -> printDiff p1 ps
(p1 : ps) -> testDiff p1 ps
_ -> putStrLn "missing arguments: xml-file location and diff/xupdate files" | 194 | false | true | 0 | 12 | 55 | 79 | 38 | 41 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/readOct_1.hs | mit | esEsOrdering GT EQ = MyFalse | 28 | esEsOrdering GT EQ = MyFalse | 28 | esEsOrdering GT EQ = MyFalse | 28 | false | false | 1 | 5 | 4 | 16 | 5 | 11 | null | null |
lukexi/ghc-7.8-arm64 | compiler/main/HscMain.hs | bsd-3-clause | hscInteractive hsc_env cgguts mod_summary = do
let dflags = hsc_dflags hsc_env
let CgGuts{ -- This is the last use of the ModGuts in a compilation.
-- From now on, we just use the bits we need.
cg_module = this_mod,
cg_binds = core_binds,
cg_tycons = tycons,
cg_foreign = foreign_stubs,
cg_modBreaks = mod_breaks } = cgguts
location = ms_location mod_summary
data_tycons = filter isDataTyCon tycons
-- cg_tycons includes newtypes, for the benefit of External Core,
-- but we don't generate any code for newtypes
-------------------
-- PREPARE FOR CODE GENERATION
-- Do saturation and convert to A-normal form
prepd_binds <- {-# SCC "CorePrep" #-}
corePrepPgm dflags hsc_env core_binds data_tycons
----------------- Generate byte code ------------------
comp_bc <- byteCodeGen dflags this_mod prepd_binds data_tycons mod_breaks
------------------ Create f-x-dynamic C-side stuff ---
(_istub_h_exists, istub_c_exists)
<- outputForeignStubs dflags this_mod location foreign_stubs
return (istub_c_exists, comp_bc, mod_breaks)
#else
hscInteractive _ _ = panic "GHC not compiled with interpreter"
#endif
------------------------------ | 1,334 | hscInteractive hsc_env cgguts mod_summary = do
let dflags = hsc_dflags hsc_env
let CgGuts{ -- This is the last use of the ModGuts in a compilation.
-- From now on, we just use the bits we need.
cg_module = this_mod,
cg_binds = core_binds,
cg_tycons = tycons,
cg_foreign = foreign_stubs,
cg_modBreaks = mod_breaks } = cgguts
location = ms_location mod_summary
data_tycons = filter isDataTyCon tycons
-- cg_tycons includes newtypes, for the benefit of External Core,
-- but we don't generate any code for newtypes
-------------------
-- PREPARE FOR CODE GENERATION
-- Do saturation and convert to A-normal form
prepd_binds <- {-# SCC "CorePrep" #-}
corePrepPgm dflags hsc_env core_binds data_tycons
----------------- Generate byte code ------------------
comp_bc <- byteCodeGen dflags this_mod prepd_binds data_tycons mod_breaks
------------------ Create f-x-dynamic C-side stuff ---
(_istub_h_exists, istub_c_exists)
<- outputForeignStubs dflags this_mod location foreign_stubs
return (istub_c_exists, comp_bc, mod_breaks)
#else
hscInteractive _ _ = panic "GHC not compiled with interpreter"
#endif
------------------------------ | 1,334 | hscInteractive hsc_env cgguts mod_summary = do
let dflags = hsc_dflags hsc_env
let CgGuts{ -- This is the last use of the ModGuts in a compilation.
-- From now on, we just use the bits we need.
cg_module = this_mod,
cg_binds = core_binds,
cg_tycons = tycons,
cg_foreign = foreign_stubs,
cg_modBreaks = mod_breaks } = cgguts
location = ms_location mod_summary
data_tycons = filter isDataTyCon tycons
-- cg_tycons includes newtypes, for the benefit of External Core,
-- but we don't generate any code for newtypes
-------------------
-- PREPARE FOR CODE GENERATION
-- Do saturation and convert to A-normal form
prepd_binds <- {-# SCC "CorePrep" #-}
corePrepPgm dflags hsc_env core_binds data_tycons
----------------- Generate byte code ------------------
comp_bc <- byteCodeGen dflags this_mod prepd_binds data_tycons mod_breaks
------------------ Create f-x-dynamic C-side stuff ---
(_istub_h_exists, istub_c_exists)
<- outputForeignStubs dflags this_mod location foreign_stubs
return (istub_c_exists, comp_bc, mod_breaks)
#else
hscInteractive _ _ = panic "GHC not compiled with interpreter"
#endif
------------------------------ | 1,334 | false | false | 0 | 12 | 356 | 170 | 92 | 78 | null | null |
mcschroeder/ghc | compiler/typecheck/TcBinds.hs | bsd-3-clause | tcMonoBinds _ sig_fn no_gen binds
= do { tc_binds <- mapM (wrapLocM (tcLhs sig_fn no_gen)) binds
-- Bring the monomorphic Ids, into scope for the RHSs
; let mono_infos = getMonoBindInfo tc_binds
rhs_id_env = [(name, mono_id) | MBI { mbi_poly_name = name
, mbi_sig = mb_sig
, mbi_mono_id = mono_id }
<- mono_infos
, case mb_sig of
Just sig -> isPartialSig sig
Nothing -> True ]
-- A monomorphic binding for each term variable that lacks
-- a type sig. (Ones with a sig are already in scope.)
; traceTc "tcMonoBinds" $ vcat [ ppr n <+> ppr id <+> ppr (idType id)
| (n,id) <- rhs_id_env]
; binds' <- tcExtendLetEnvIds NotTopLevel rhs_id_env $
mapM (wrapLocM tcRhs) tc_binds
; return (listToBag binds', mono_infos) } | 1,172 | tcMonoBinds _ sig_fn no_gen binds
= do { tc_binds <- mapM (wrapLocM (tcLhs sig_fn no_gen)) binds
-- Bring the monomorphic Ids, into scope for the RHSs
; let mono_infos = getMonoBindInfo tc_binds
rhs_id_env = [(name, mono_id) | MBI { mbi_poly_name = name
, mbi_sig = mb_sig
, mbi_mono_id = mono_id }
<- mono_infos
, case mb_sig of
Just sig -> isPartialSig sig
Nothing -> True ]
-- A monomorphic binding for each term variable that lacks
-- a type sig. (Ones with a sig are already in scope.)
; traceTc "tcMonoBinds" $ vcat [ ppr n <+> ppr id <+> ppr (idType id)
| (n,id) <- rhs_id_env]
; binds' <- tcExtendLetEnvIds NotTopLevel rhs_id_env $
mapM (wrapLocM tcRhs) tc_binds
; return (listToBag binds', mono_infos) } | 1,172 | tcMonoBinds _ sig_fn no_gen binds
= do { tc_binds <- mapM (wrapLocM (tcLhs sig_fn no_gen)) binds
-- Bring the monomorphic Ids, into scope for the RHSs
; let mono_infos = getMonoBindInfo tc_binds
rhs_id_env = [(name, mono_id) | MBI { mbi_poly_name = name
, mbi_sig = mb_sig
, mbi_mono_id = mono_id }
<- mono_infos
, case mb_sig of
Just sig -> isPartialSig sig
Nothing -> True ]
-- A monomorphic binding for each term variable that lacks
-- a type sig. (Ones with a sig are already in scope.)
; traceTc "tcMonoBinds" $ vcat [ ppr n <+> ppr id <+> ppr (idType id)
| (n,id) <- rhs_id_env]
; binds' <- tcExtendLetEnvIds NotTopLevel rhs_id_env $
mapM (wrapLocM tcRhs) tc_binds
; return (listToBag binds', mono_infos) } | 1,172 | false | false | 0 | 15 | 583 | 226 | 115 | 111 | null | null |
dancor/melang | src/Wikt/ProcDefs.hs | mit | derefVerb :: Dict -> SpPart -> Str -> Str
derefVerb dict spPart =
doDeref dict spPart "(apocopic form of: " .
doDeref dict spPart "(feminine of: " .
doDeref dict spPart "(feminine plural of: " .
doDeref dict spPart "(form of: " .
doDeref dict spPart "(masculine plural of: " .
doDeref dict spPart "(obsolete spelling of: " .
doDeref dict spPart "(plural of: " .
doDeref dict spPart "(verb form of: " | 471 | derefVerb :: Dict -> SpPart -> Str -> Str
derefVerb dict spPart =
doDeref dict spPart "(apocopic form of: " .
doDeref dict spPart "(feminine of: " .
doDeref dict spPart "(feminine plural of: " .
doDeref dict spPart "(form of: " .
doDeref dict spPart "(masculine plural of: " .
doDeref dict spPart "(obsolete spelling of: " .
doDeref dict spPart "(plural of: " .
doDeref dict spPart "(verb form of: " | 471 | derefVerb dict spPart =
doDeref dict spPart "(apocopic form of: " .
doDeref dict spPart "(feminine of: " .
doDeref dict spPart "(feminine plural of: " .
doDeref dict spPart "(form of: " .
doDeref dict spPart "(masculine plural of: " .
doDeref dict spPart "(obsolete spelling of: " .
doDeref dict spPart "(plural of: " .
doDeref dict spPart "(verb form of: " | 429 | false | true | 0 | 12 | 144 | 112 | 52 | 60 | null | null |
mdsteele/fallback | src/Fallback/State/Item.hs | gpl-3.0 | weaponValue Shortsword = CanSell 60 | 35 | weaponValue Shortsword = CanSell 60 | 35 | weaponValue Shortsword = CanSell 60 | 35 | false | false | 1 | 5 | 4 | 16 | 5 | 11 | null | null |
TomMD/ghc | libraries/base/GHC/Exception.hs | bsd-3-clause | ratioZeroDenomException = toException RatioZeroDenominator | 58 | ratioZeroDenomException = toException RatioZeroDenominator | 58 | ratioZeroDenomException = toException RatioZeroDenominator | 58 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
facebookincubator/duckling | Duckling/Duration/ZH/Rules.hs | bsd-3-clause | ruleDurationDotNumeralMinutes :: Rule
ruleDurationDotNumeralMinutes = Rule
{ name = "number.number minutes"
, pattern =
[ regex "(\\d+)\\.(\\d+)"
, Predicate $ isGrain TG.Minute
]
, prod = \case
(Token RegexMatch (GroupMatch (m:s:_)):_) -> do
mm <- parseInteger m
ss <- parseInteger s
let sden = 10 ^ Text.length s
Just $ Token Duration $ secondsFromHourMixedFraction mm ss sden
_ -> Nothing
} | 457 | ruleDurationDotNumeralMinutes :: Rule
ruleDurationDotNumeralMinutes = Rule
{ name = "number.number minutes"
, pattern =
[ regex "(\\d+)\\.(\\d+)"
, Predicate $ isGrain TG.Minute
]
, prod = \case
(Token RegexMatch (GroupMatch (m:s:_)):_) -> do
mm <- parseInteger m
ss <- parseInteger s
let sden = 10 ^ Text.length s
Just $ Token Duration $ secondsFromHourMixedFraction mm ss sden
_ -> Nothing
} | 457 | ruleDurationDotNumeralMinutes = Rule
{ name = "number.number minutes"
, pattern =
[ regex "(\\d+)\\.(\\d+)"
, Predicate $ isGrain TG.Minute
]
, prod = \case
(Token RegexMatch (GroupMatch (m:s:_)):_) -> do
mm <- parseInteger m
ss <- parseInteger s
let sden = 10 ^ Text.length s
Just $ Token Duration $ secondsFromHourMixedFraction mm ss sden
_ -> Nothing
} | 419 | false | true | 0 | 18 | 124 | 155 | 76 | 79 | null | null |
erikd/yesod | yesod-core/Yesod/Core/Json.hs | mit | -- | jsonEncodingOrRedirect simplifies the scenario where a POST handler sends a different
-- response based on Accept headers:
--
-- 1. 200 with JSON data if the client prefers
-- @application\/json@ (e.g. AJAX, see 'acceptsJSON').
--
-- 2. 3xx otherwise, following the PRG pattern.
-- @since 1.4.21
jsonEncodingOrRedirect :: (MonadHandler m, J.ToJSON a)
=> Route (HandlerSite m) -- ^ Redirect target
-> a -- ^ Data to send via JSON
-> m J.Encoding
jsonEncodingOrRedirect = jsonOrRedirect' J.toEncoding | 562 | jsonEncodingOrRedirect :: (MonadHandler m, J.ToJSON a)
=> Route (HandlerSite m) -- ^ Redirect target
-> a -- ^ Data to send via JSON
-> m J.Encoding
jsonEncodingOrRedirect = jsonOrRedirect' J.toEncoding | 249 | jsonEncodingOrRedirect = jsonOrRedirect' J.toEncoding | 53 | true | true | 0 | 9 | 136 | 65 | 37 | 28 | null | null |
technogeeky/d-A | include/containers-0.5.0.0/Data/Map/Base.hs | gpl-3.0 | -- | /O(n*log n)/. Build a map from a list of key\/value pairs with a combining function. See also 'fromAscListWithKey'.
--
-- > let f k a1 a2 = (show k) ++ a1 ++ a2
-- > fromListWithKey f [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"a")] == fromList [(3, "3ab"), (5, "5a5ba")]
-- > fromListWithKey f [] == empty
fromListWithKey :: Ord k => (k -> a -> a -> a) -> [(k,a)] -> Map k a
fromListWithKey f xs
= foldlStrict ins empty xs
where
ins t (k,x) = insertWithKey f k x t
#if __GLASGOW_HASKELL__ >= 700
| 508 | fromListWithKey :: Ord k => (k -> a -> a -> a) -> [(k,a)] -> Map k a
fromListWithKey f xs
= foldlStrict ins empty xs
where
ins t (k,x) = insertWithKey f k x t
#if __GLASGOW_HASKELL__ >= 700
| 198 | fromListWithKey f xs
= foldlStrict ins empty xs
where
ins t (k,x) = insertWithKey f k x t
#if __GLASGOW_HASKELL__ >= 700
| 129 | true | true | 0 | 11 | 106 | 112 | 55 | 57 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/HTMLAllCollection.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLAllCollection.namedItem Mozilla HTMLAllCollection.namedItem documentation>
namedItemUnchecked ::
(MonadDOM m, ToJSString name) =>
HTMLAllCollection -> name -> m HTMLCollectionOrElement
namedItemUnchecked self name
= liftDOM ((self ! name) >>= fromJSValUnchecked) | 364 | namedItemUnchecked ::
(MonadDOM m, ToJSString name) =>
HTMLAllCollection -> name -> m HTMLCollectionOrElement
namedItemUnchecked self name
= liftDOM ((self ! name) >>= fromJSValUnchecked) | 229 | namedItemUnchecked self name
= liftDOM ((self ! name) >>= fromJSValUnchecked) | 79 | true | true | 0 | 9 | 71 | 60 | 31 | 29 | null | null |
patperry/hs-linear-algebra | lib/Numeric/LinearAlgebra/Vector/STBase.hs | bsd-3-clause | withDrop :: (RVector v, Storable e)
=> Int
-> v e
-> (forall v'. RVector v' => v' e -> ST s a)
-> ST s a
withDrop i v f = do
mv <- unsafeThaw v
withDropM i mv f
-- | Perform an action with a view gotten from taking the given
-- number of elements from the start of the vector. | 321 | withDrop :: (RVector v, Storable e)
=> Int
-> v e
-> (forall v'. RVector v' => v' e -> ST s a)
-> ST s a
withDrop i v f = do
mv <- unsafeThaw v
withDropM i mv f
-- | Perform an action with a view gotten from taking the given
-- number of elements from the start of the vector. | 321 | withDrop i v f = do
mv <- unsafeThaw v
withDropM i mv f
-- | Perform an action with a view gotten from taking the given
-- number of elements from the start of the vector. | 180 | false | true | 0 | 13 | 108 | 102 | 49 | 53 | null | null |
39aldo39/klfc | src/Xkb/Parse.hs | gpl-3.0 | comma ∷ Parser m ⇒ m ()
comma = char ',' *> ws | 46 | comma ∷ Parser m ⇒ m ()
comma = char ',' *> ws | 46 | comma = char ',' *> ws | 22 | false | true | 0 | 7 | 12 | 30 | 14 | 16 | null | null |
the-real-blackh/hexpat | Text/XML/Expat/Internal/NodeClass.hs | bsd-3-clause | fromElement_ _ _ = error "fromElement requires an Element" | 58 | fromElement_ _ _ = error "fromElement requires an Element" | 58 | fromElement_ _ _ = error "fromElement requires an Element" | 58 | false | false | 0 | 5 | 8 | 14 | 6 | 8 | null | null |
nek0/haskelloids | src/InGame.hs | gpl-3.0 | drawShip :: Context -> Ship -> Affection ()
drawShip ctx Ship{..} =
liftIO $ do
when (sThrust) $ do
let pos@(V2 px py) = fmap CFloat sPos - V2 0 10 `rotVec` cRot
V2 x1 y1 = pos - (V2 10 0 `rotVec` cRot)
V2 x2 y2 = pos + (V2 10 0 `rotVec` cRot)
V2 x3 y3 = pos - (V2 0 25 `rotVec` cRot)
cRot = CFloat sRot
save ctx
grad <- linearGradient ctx px py x3 y3 (rgba 255 128 0 255) (rgba 0 0 0 0)
fillPaint ctx grad
beginPath ctx
moveTo ctx x1 y1
lineTo ctx x2 y2
lineTo ctx x3 y3
closePath ctx
fill ctx
restore ctx
drawImage ctx sImg (sPos - fmap (/2) dim) dim sRot 1
where
dim = V2 40 40 | 702 | drawShip :: Context -> Ship -> Affection ()
drawShip ctx Ship{..} =
liftIO $ do
when (sThrust) $ do
let pos@(V2 px py) = fmap CFloat sPos - V2 0 10 `rotVec` cRot
V2 x1 y1 = pos - (V2 10 0 `rotVec` cRot)
V2 x2 y2 = pos + (V2 10 0 `rotVec` cRot)
V2 x3 y3 = pos - (V2 0 25 `rotVec` cRot)
cRot = CFloat sRot
save ctx
grad <- linearGradient ctx px py x3 y3 (rgba 255 128 0 255) (rgba 0 0 0 0)
fillPaint ctx grad
beginPath ctx
moveTo ctx x1 y1
lineTo ctx x2 y2
lineTo ctx x3 y3
closePath ctx
fill ctx
restore ctx
drawImage ctx sImg (sPos - fmap (/2) dim) dim sRot 1
where
dim = V2 40 40 | 702 | drawShip ctx Ship{..} =
liftIO $ do
when (sThrust) $ do
let pos@(V2 px py) = fmap CFloat sPos - V2 0 10 `rotVec` cRot
V2 x1 y1 = pos - (V2 10 0 `rotVec` cRot)
V2 x2 y2 = pos + (V2 10 0 `rotVec` cRot)
V2 x3 y3 = pos - (V2 0 25 `rotVec` cRot)
cRot = CFloat sRot
save ctx
grad <- linearGradient ctx px py x3 y3 (rgba 255 128 0 255) (rgba 0 0 0 0)
fillPaint ctx grad
beginPath ctx
moveTo ctx x1 y1
lineTo ctx x2 y2
lineTo ctx x3 y3
closePath ctx
fill ctx
restore ctx
drawImage ctx sImg (sPos - fmap (/2) dim) dim sRot 1
where
dim = V2 40 40 | 658 | false | true | 0 | 17 | 251 | 347 | 163 | 184 | null | null |
CristhianMotoche/scion | lib/Scion/Types.hs | bsd-3-clause | verbose :: Verbosity
verbose = Verbose | 38 | verbose :: Verbosity
verbose = Verbose | 38 | verbose = Verbose | 17 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
frenetic-lang/nettle-openflow | src/Nettle/OpenFlow/MessagesBinary.hs | bsd-3-clause | putH :: Integral a => M.TransactionID -> MessageTypeCode -> a -> Put
putH xid tcode len = putHeader (OFPHeader ofpVersion tcode (fromIntegral len) xid) | 151 | putH :: Integral a => M.TransactionID -> MessageTypeCode -> a -> Put
putH xid tcode len = putHeader (OFPHeader ofpVersion tcode (fromIntegral len) xid) | 151 | putH xid tcode len = putHeader (OFPHeader ofpVersion tcode (fromIntegral len) xid) | 82 | false | true | 0 | 9 | 23 | 60 | 29 | 31 | null | null |
anchor/ceilometer-common | lib/Ceilometer/Types/Base.hs | bsd-3-clause | prSimple :: Iso' Word64 PRSimple
prSimple = iso PRSimple _prSimpleVal | 69 | prSimple :: Iso' Word64 PRSimple
prSimple = iso PRSimple _prSimpleVal | 69 | prSimple = iso PRSimple _prSimpleVal | 36 | false | true | 0 | 5 | 9 | 21 | 10 | 11 | null | null |
GaloisInc/halvm-ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | ppr_expr (HsUnboundVar uv)= pprPrefixOcc (unboundVarOcc uv) | 59 | ppr_expr (HsUnboundVar uv)= pprPrefixOcc (unboundVarOcc uv) | 59 | ppr_expr (HsUnboundVar uv)= pprPrefixOcc (unboundVarOcc uv) | 59 | false | false | 0 | 7 | 5 | 24 | 11 | 13 | null | null |
chrisdotcode/hackage-server | MirrorClient.hs | bsd-3-clause | isHackageURI :: URI -> Bool
isHackageURI uri
| Just auth <- uriAuthority uri = uriRegName auth == "hackage.haskell.org"
| otherwise = False | 163 | isHackageURI :: URI -> Bool
isHackageURI uri
| Just auth <- uriAuthority uri = uriRegName auth == "hackage.haskell.org"
| otherwise = False | 163 | isHackageURI uri
| Just auth <- uriAuthority uri = uriRegName auth == "hackage.haskell.org"
| otherwise = False | 135 | false | true | 1 | 9 | 45 | 49 | 22 | 27 | null | null |
pauloborba/plc | src/FuncoesDeAltaOrdemFilterFold.hs | cc0-1.0 | foldrr op i (e : l) = op e (foldrr op i l) | 42 | foldrr op i (e : l) = op e (foldrr op i l) | 42 | foldrr op i (e : l) = op e (foldrr op i l) | 42 | false | false | 0 | 7 | 12 | 35 | 17 | 18 | null | null |
ian-ross/c2hs-macos-test | c2hs-0.26.1/src/Main.hs | mit | computeOutputName :: FilePath -> CST s ()
computeOutputName bndFileNoSuffix =
setSwitch $ \sb@SwitchBoard{ outputSB = output } ->
sb { outputSB = if null output then bndFileNoSuffix else output } | 201 | computeOutputName :: FilePath -> CST s ()
computeOutputName bndFileNoSuffix =
setSwitch $ \sb@SwitchBoard{ outputSB = output } ->
sb { outputSB = if null output then bndFileNoSuffix else output } | 201 | computeOutputName bndFileNoSuffix =
setSwitch $ \sb@SwitchBoard{ outputSB = output } ->
sb { outputSB = if null output then bndFileNoSuffix else output } | 159 | false | true | 0 | 10 | 35 | 65 | 35 | 30 | null | null |
stappit/okasaki-pfds | src/Chap03/Exercise09.hs | gpl-3.0 | fromOrdList :: Ord a => [a] -> RedBlackTree a
fromOrdList xs =
let go :: Int -> [a] -> (RedBlackTree a, Int, [a])
go 0 xs' = (E, -1, xs')
go 1 (x:xs') = (T B E x E, 0, xs')
go len xs' =
let mid = len `div` 2
(p, q) = (mid, len - mid - 1)
(l, bdl, (x:xs'')) = go p xs'
(r, bdr, xs''') = go q xs''
in (T B (if bdl == bdr then l else paint R l) x r, bdr + 1, xs''')
(t, _, _) = go (length xs) xs
in t | 497 | fromOrdList :: Ord a => [a] -> RedBlackTree a
fromOrdList xs =
let go :: Int -> [a] -> (RedBlackTree a, Int, [a])
go 0 xs' = (E, -1, xs')
go 1 (x:xs') = (T B E x E, 0, xs')
go len xs' =
let mid = len `div` 2
(p, q) = (mid, len - mid - 1)
(l, bdl, (x:xs'')) = go p xs'
(r, bdr, xs''') = go q xs''
in (T B (if bdl == bdr then l else paint R l) x r, bdr + 1, xs''')
(t, _, _) = go (length xs) xs
in t | 497 | fromOrdList xs =
let go :: Int -> [a] -> (RedBlackTree a, Int, [a])
go 0 xs' = (E, -1, xs')
go 1 (x:xs') = (T B E x E, 0, xs')
go len xs' =
let mid = len `div` 2
(p, q) = (mid, len - mid - 1)
(l, bdl, (x:xs'')) = go p xs'
(r, bdr, xs''') = go q xs''
in (T B (if bdl == bdr then l else paint R l) x r, bdr + 1, xs''')
(t, _, _) = go (length xs) xs
in t | 451 | false | true | 0 | 15 | 202 | 297 | 159 | 138 | null | null |
cauterize-tools/cauterize | src/Cauterize/Dynamic/Pack.hs | bsd-3-clause | dynamicPackVector :: TyMap -> C.Identifier -> [CautDetails] -> Put
dynamicPackVector m n elems =
let (S.Type { S.typeDesc = t }) = checkedTypeLookup m n isVector "vector"
el = length elems
vl = S.vectorLength t
etype = S.vectorRef t
vt = S.vectorTag t
in if fromIntegral el > vl
then throw $ IncorrectVectorLength (fromIntegral vl) (fromIntegral el)
else do dynamicPackTag vt (fromIntegral el)
mapM_ (dynamicPackDetails m etype) elems | 491 | dynamicPackVector :: TyMap -> C.Identifier -> [CautDetails] -> Put
dynamicPackVector m n elems =
let (S.Type { S.typeDesc = t }) = checkedTypeLookup m n isVector "vector"
el = length elems
vl = S.vectorLength t
etype = S.vectorRef t
vt = S.vectorTag t
in if fromIntegral el > vl
then throw $ IncorrectVectorLength (fromIntegral vl) (fromIntegral el)
else do dynamicPackTag vt (fromIntegral el)
mapM_ (dynamicPackDetails m etype) elems | 491 | dynamicPackVector m n elems =
let (S.Type { S.typeDesc = t }) = checkedTypeLookup m n isVector "vector"
el = length elems
vl = S.vectorLength t
etype = S.vectorRef t
vt = S.vectorTag t
in if fromIntegral el > vl
then throw $ IncorrectVectorLength (fromIntegral vl) (fromIntegral el)
else do dynamicPackTag vt (fromIntegral el)
mapM_ (dynamicPackDetails m etype) elems | 424 | false | true | 0 | 13 | 124 | 182 | 87 | 95 | null | null |
dikmax/haskell-blog | src/Database.hs | bsd-2-clause | getPostById :: HasHdbc m c s
=> ByteString -- ^ Post id
-> m Post -- ^ Result
getPostById pId = do
rows <- query "SELECT * FROM posts WHERE id = ?" [toSql pId]
return $ rowToPost $ head rows -- TODO check for empty result
-- Save post to database | 282 | getPostById :: HasHdbc m c s
=> ByteString -- ^ Post id
-> m Post
getPostById pId = do
rows <- query "SELECT * FROM posts WHERE id = ?" [toSql pId]
return $ rowToPost $ head rows -- TODO check for empty result
-- Save post to database | 265 | getPostById pId = do
rows <- query "SELECT * FROM posts WHERE id = ?" [toSql pId]
return $ rowToPost $ head rows -- TODO check for empty result
-- Save post to database | 174 | true | true | 0 | 10 | 87 | 68 | 33 | 35 | null | null |
erochest/york-scripts | src/Opts.hs | apache-2.0 | opts' :: Parser Options
opts' =
subparser
( command "bill-id" (info (helper <*> billIdParser)
( fullDesc
<> progDesc "This operates on STDIN/STDOUT."
<> header "york-scripts bill-id -- generate full bill id"))
<> command "roll-call" (info (helper <*> rollCallParser)
( fullDesc
<> progDesc "Process the roll call data."
<> header "york-scripts roll-calls"))
<> command "call-data" (info (helper <*> callDataParser)
( fullDesc
<> progDesc "Summarize a single field from the roll call data."
<> header "york-scripts call-data"))
) | 898 | opts' :: Parser Options
opts' =
subparser
( command "bill-id" (info (helper <*> billIdParser)
( fullDesc
<> progDesc "This operates on STDIN/STDOUT."
<> header "york-scripts bill-id -- generate full bill id"))
<> command "roll-call" (info (helper <*> rollCallParser)
( fullDesc
<> progDesc "Process the roll call data."
<> header "york-scripts roll-calls"))
<> command "call-data" (info (helper <*> callDataParser)
( fullDesc
<> progDesc "Summarize a single field from the roll call data."
<> header "york-scripts call-data"))
) | 898 | opts' =
subparser
( command "bill-id" (info (helper <*> billIdParser)
( fullDesc
<> progDesc "This operates on STDIN/STDOUT."
<> header "york-scripts bill-id -- generate full bill id"))
<> command "roll-call" (info (helper <*> rollCallParser)
( fullDesc
<> progDesc "Process the roll call data."
<> header "york-scripts roll-calls"))
<> command "call-data" (info (helper <*> callDataParser)
( fullDesc
<> progDesc "Summarize a single field from the roll call data."
<> header "york-scripts call-data"))
) | 874 | false | true | 0 | 15 | 445 | 145 | 69 | 76 | null | null |
5outh/Bang | src/Bang/Music/Class.hs | mit | mapDuration f (Rest dur ) = Rest (f dur) | 41 | mapDuration f (Rest dur ) = Rest (f dur) | 41 | mapDuration f (Rest dur ) = Rest (f dur) | 41 | false | false | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
drhodes/jade2hdl | rawr/src/Rawr/Note.hs | bsd-3-clause | isCallEdge (CallEdge _ _) = True | 32 | isCallEdge (CallEdge _ _) = True | 32 | isCallEdge (CallEdge _ _) = True | 32 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
ulricha/algebra-dag | src/Database/Algebra/Rewrite/PatternConstruction.hs | bsd-3-clause | emit :: Q Stmt -> Code ()
emit s = tell [s] | 43 | emit :: Q Stmt -> Code ()
emit s = tell [s] | 43 | emit s = tell [s] | 17 | false | true | 0 | 8 | 11 | 36 | 16 | 20 | null | null |
brendanhay/gogol | gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Locations/Buckets/Patch.hs | mpl-2.0 | -- | JSONP
olbpCallback :: Lens' OrganizationsLocationsBucketsPatch (Maybe Text)
olbpCallback
= lens _olbpCallback (\ s a -> s{_olbpCallback = a}) | 148 | olbpCallback :: Lens' OrganizationsLocationsBucketsPatch (Maybe Text)
olbpCallback
= lens _olbpCallback (\ s a -> s{_olbpCallback = a}) | 137 | olbpCallback
= lens _olbpCallback (\ s a -> s{_olbpCallback = a}) | 67 | true | true | 0 | 9 | 21 | 48 | 25 | 23 | null | null |
rueshyna/gogol | gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs | mpl-2.0 | -- | Custom label 3 for custom grouping of items in a Shopping campaign.
ppCustomLabel3 :: Lens' Product (Maybe Text)
ppCustomLabel3
= lens _ppCustomLabel3
(\ s a -> s{_ppCustomLabel3 = a}) | 197 | ppCustomLabel3 :: Lens' Product (Maybe Text)
ppCustomLabel3
= lens _ppCustomLabel3
(\ s a -> s{_ppCustomLabel3 = a}) | 124 | ppCustomLabel3
= lens _ppCustomLabel3
(\ s a -> s{_ppCustomLabel3 = a}) | 79 | true | true | 0 | 8 | 38 | 49 | 25 | 24 | null | null |
termite2/tsl | Frontend/StatementValidate.hs | bsd-3-clause | findInstPath _ s@(SAssume _ _ _) = Just [Left s] | 56 | findInstPath _ s@(SAssume _ _ _) = Just [Left s] | 56 | findInstPath _ s@(SAssume _ _ _) = Just [Left s] | 56 | false | false | 0 | 8 | 17 | 33 | 16 | 17 | null | null |
brendanhay/gogol | gogol-androidmanagement/gen/Network/Google/AndroidManagement/Types/Product.hs | mpl-2.0 | -- | Minimum number of non-letter characters (numerical digits or symbols)
-- required in the password. Only enforced when password_quality is
-- COMPLEX.
prPasswordMinimumNonLetter :: Lens' PasswordRequirements (Maybe Int32)
prPasswordMinimumNonLetter
= lens _prPasswordMinimumNonLetter
(\ s a -> s{_prPasswordMinimumNonLetter = a})
. mapping _Coerce | 365 | prPasswordMinimumNonLetter :: Lens' PasswordRequirements (Maybe Int32)
prPasswordMinimumNonLetter
= lens _prPasswordMinimumNonLetter
(\ s a -> s{_prPasswordMinimumNonLetter = a})
. mapping _Coerce | 210 | prPasswordMinimumNonLetter
= lens _prPasswordMinimumNonLetter
(\ s a -> s{_prPasswordMinimumNonLetter = a})
. mapping _Coerce | 139 | true | true | 1 | 8 | 56 | 60 | 30 | 30 | null | null |
dmbarbour/Sirea | src/Sirea/BDeep.hs | bsd-3-clause | binlrl = binl <<< binrl | 23 | binlrl = binl <<< binrl | 23 | binlrl = binl <<< binrl | 23 | false | false | 0 | 5 | 4 | 10 | 5 | 5 | null | null |
literate-unitb/literate-unitb | src/Document/Refinement.hs | mit | getMachineId :: RuleParserParameter -> MachineId
getMachineId = view pMachineId . getMachine | 92 | getMachineId :: RuleParserParameter -> MachineId
getMachineId = view pMachineId . getMachine | 92 | getMachineId = view pMachineId . getMachine | 43 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
gbaz/cabal | cabal-install/Distribution/Client/Dependency/Modular/Dependency.hs | bsd-3-clause | goalReasonToVars :: GoalReason qpn -> ConflictSet qpn
goalReasonToVars UserGoal = CS.empty | 106 | goalReasonToVars :: GoalReason qpn -> ConflictSet qpn
goalReasonToVars UserGoal = CS.empty | 106 | goalReasonToVars UserGoal = CS.empty | 52 | false | true | 0 | 6 | 26 | 26 | 12 | 14 | null | null |
tdietert/nanocoin | src/Nanocoin/Network/P2P.hs | apache-2.0 | waitP2PController :: Node.NodeProcessM () -> Node.NodeProcessM ()
waitP2PController proc = do
mPid <- whereis (show PeerDiscovery)
case mPid of
Nothing -> do
logWarning "Could not connect to PeerDiscovery process. Retrying..."
liftBase $ threadDelay 1000000
waitP2PController proc
Just pid -> do
logInfo $ "Found PeerDiscovery process. " <> (show pid :: Text)
proc
--------------------------------------------------------------------------------
-- P2P Messages & Handlers
-------------------------------------------------------------------------------- | 596 | waitP2PController :: Node.NodeProcessM () -> Node.NodeProcessM ()
waitP2PController proc = do
mPid <- whereis (show PeerDiscovery)
case mPid of
Nothing -> do
logWarning "Could not connect to PeerDiscovery process. Retrying..."
liftBase $ threadDelay 1000000
waitP2PController proc
Just pid -> do
logInfo $ "Found PeerDiscovery process. " <> (show pid :: Text)
proc
--------------------------------------------------------------------------------
-- P2P Messages & Handlers
-------------------------------------------------------------------------------- | 596 | waitP2PController proc = do
mPid <- whereis (show PeerDiscovery)
case mPid of
Nothing -> do
logWarning "Could not connect to PeerDiscovery process. Retrying..."
liftBase $ threadDelay 1000000
waitP2PController proc
Just pid -> do
logInfo $ "Found PeerDiscovery process. " <> (show pid :: Text)
proc
--------------------------------------------------------------------------------
-- P2P Messages & Handlers
-------------------------------------------------------------------------------- | 530 | false | true | 0 | 14 | 101 | 118 | 54 | 64 | null | null |
johnbelamaric/themis | vendor/github.com/apache/thrift/lib/hs/src/Thrift/Transport/Header.hs | apache-2.0 | wi32 :: Word32 -> Int32
wi32 = fromIntegral | 43 | wi32 :: Word32 -> Int32
wi32 = fromIntegral | 43 | wi32 = fromIntegral | 19 | false | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
grandpascorpion/canon | Math/NumberTheory/Canon/Internals.hs | gpl-3.0 | crDivisors :: CR_ -> [CR_]
crDivisors c = foldr1 cartProd $ map pwrDivList c
where cartProd xs ys = [x ++ y | y <- ys, x <- xs]
pwrDivList (n,e) = [if y == 0 then cr1 else [(n,y)] | y <- [0..(fromInteger e)]]
-- | Like the crDivisors function, except that it returns pairs of the CR_ and resp. numeric value, instead of just the CR_. | 372 | crDivisors :: CR_ -> [CR_]
crDivisors c = foldr1 cartProd $ map pwrDivList c
where cartProd xs ys = [x ++ y | y <- ys, x <- xs]
pwrDivList (n,e) = [if y == 0 then cr1 else [(n,y)] | y <- [0..(fromInteger e)]]
-- | Like the crDivisors function, except that it returns pairs of the CR_ and resp. numeric value, instead of just the CR_. | 372 | crDivisors c = foldr1 cartProd $ map pwrDivList c
where cartProd xs ys = [x ++ y | y <- ys, x <- xs]
pwrDivList (n,e) = [if y == 0 then cr1 else [(n,y)] | y <- [0..(fromInteger e)]]
-- | Like the crDivisors function, except that it returns pairs of the CR_ and resp. numeric value, instead of just the CR_. | 345 | false | true | 1 | 11 | 106 | 132 | 69 | 63 | null | null |
mjhopkins/StopPayingForFreeMonads | ALaCarteDSL.hs | mit | tell :: (Tell :<: f) => String -> Free f ()
tell = undefined | 60 | tell :: (Tell :<: f) => String -> Free f ()
tell = undefined | 60 | tell = undefined | 16 | false | true | 0 | 8 | 13 | 33 | 17 | 16 | null | null |
VictorCMiraldo/mmm | MMM/Core/Probability.hs | mit | mapD :: (a -> b) -> Dist a -> Dist b
mapD = fmap | 48 | mapD :: (a -> b) -> Dist a -> Dist b
mapD = fmap | 48 | mapD = fmap | 11 | false | true | 0 | 8 | 13 | 38 | 17 | 21 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.