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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
romanb/amazonka | amazonka-cognito-identity/gen/Network/AWS/CognitoIdentity/DescribeIdentityPool.hs | mpl-2.0 | -- | 'DescribeIdentityPoolResponse' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'diprAllowUnauthenticatedIdentities' @::@ 'Bool'
--
-- * 'diprDeveloperProviderName' @::@ 'Maybe' 'Text'
--
-- * 'diprIdentityPoolId' @::@ 'Text'
--
-- * 'diprIdentityPoolName' @::@ 'Text'
--
-- * 'diprOpenIdConnectProviderARNs' @::@ ['Text']
--
-- * 'diprSupportedLoginProviders' @::@ 'HashMap' 'Text' 'Text'
--
describeIdentityPoolResponse :: Text -- ^ 'diprIdentityPoolId'
-> Text -- ^ 'diprIdentityPoolName'
-> Bool -- ^ 'diprAllowUnauthenticatedIdentities'
-> DescribeIdentityPoolResponse
describeIdentityPoolResponse p1 p2 p3 = DescribeIdentityPoolResponse
{ _diprIdentityPoolId = p1
, _diprIdentityPoolName = p2
, _diprAllowUnauthenticatedIdentities = p3
, _diprSupportedLoginProviders = mempty
, _diprDeveloperProviderName = Nothing
, _diprOpenIdConnectProviderARNs = mempty
} | 1,069 | describeIdentityPoolResponse :: Text -- ^ 'diprIdentityPoolId'
-> Text -- ^ 'diprIdentityPoolName'
-> Bool -- ^ 'diprAllowUnauthenticatedIdentities'
-> DescribeIdentityPoolResponse
describeIdentityPoolResponse p1 p2 p3 = DescribeIdentityPoolResponse
{ _diprIdentityPoolId = p1
, _diprIdentityPoolName = p2
, _diprAllowUnauthenticatedIdentities = p3
, _diprSupportedLoginProviders = mempty
, _diprDeveloperProviderName = Nothing
, _diprOpenIdConnectProviderARNs = mempty
} | 637 | describeIdentityPoolResponse p1 p2 p3 = DescribeIdentityPoolResponse
{ _diprIdentityPoolId = p1
, _diprIdentityPoolName = p2
, _diprAllowUnauthenticatedIdentities = p3
, _diprSupportedLoginProviders = mempty
, _diprDeveloperProviderName = Nothing
, _diprOpenIdConnectProviderARNs = mempty
} | 369 | true | true | 0 | 9 | 267 | 96 | 61 | 35 | null | null |
andre-artus/handbook-of-practical-logic-and-automated-reasoning-haskell | src/ATP/Util/Lib.hs | gpl-3.0 | ime :: (a -> b) -> a -> IO b
time f x = do
start <- Time.getCPUTime
y <- Exn.evaluate $ f x
end <- Time.getCPUTime
let diff :: Double = (fromIntegral (end - start)) / (1E12)
_ <- Printf.printf "Computation time: %0.4f sec\n" diff
return y
| 251 | time :: (a -> b) -> a -> IO b
time f x = do
start <- Time.getCPUTime
y <- Exn.evaluate $ f x
end <- Time.getCPUTime
let diff :: Double = (fromIntegral (end - start)) / (1E12)
_ <- Printf.printf "Computation time: %0.4f sec\n" diff
return y | 251 | time f x = do
start <- Time.getCPUTime
y <- Exn.evaluate $ f x
end <- Time.getCPUTime
let diff :: Double = (fromIntegral (end - start)) / (1E12)
_ <- Printf.printf "Computation time: %0.4f sec\n" diff
return y | 221 | false | true | 0 | 14 | 60 | 126 | 58 | 68 | null | null |
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/RemarketingLists/List.hs | mpl-2.0 | -- | OAuth access token.
rllAccessToken :: Lens' RemarketingListsList (Maybe Text)
rllAccessToken
= lens _rllAccessToken
(\ s a -> s{_rllAccessToken = a}) | 162 | rllAccessToken :: Lens' RemarketingListsList (Maybe Text)
rllAccessToken
= lens _rllAccessToken
(\ s a -> s{_rllAccessToken = a}) | 137 | rllAccessToken
= lens _rllAccessToken
(\ s a -> s{_rllAccessToken = a}) | 79 | true | true | 0 | 8 | 29 | 49 | 25 | 24 | null | null |
keithodulaigh/Hets | CspCASL/CspProver_Consts.hs | gpl-2.0 | cspProver_conditionalAltS :: String
cspProver_conditionalAltS = "(IF _ THEN _ ELSE _)" | 86 | cspProver_conditionalAltS :: String
cspProver_conditionalAltS = "(IF _ THEN _ ELSE _)" | 86 | cspProver_conditionalAltS = "(IF _ THEN _ ELSE _)" | 50 | false | true | 0 | 4 | 10 | 11 | 6 | 5 | null | null |
nevrenato/HetsAlloy | Driver/Options.hs | gpl-2.0 | dfgS = "dfg" | 12 | dfgS = "dfg" | 12 | dfgS = "dfg" | 12 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
jcristovao/altcomposition | Data/AltComposition.hs | bsd-3-clause | -- | Compose a binary function with a unitary function
--
-- /Note/: you should use idiomatic haskell instead
--
-- > (.).(.) :: (c -> d) -> (a -> b -> c) -> (a -> b -> d)
--
-- > (f %.** g) x y = f (g x y)
--
-- > (f .: g) x y = f (g x y)
(%.**) :: (c -> d) -> (a -> b -> c) -> a -> b -> d
(f %.** g) x y = f (g x y) | 317 | (%.**) :: (c -> d) -> (a -> b -> c) -> a -> b -> d
(f %.** g) x y = f (g x y) | 77 | (%.**) :: (c -> d) -> (a -> b -> c) -> a -> b -> d
(f %.** g) x y = f (g x y) | 77 | true | false | 0 | 12 | 91 | 81 | 46 | 35 | null | null |
jotrk/xhb-ewmh | src/Graphics/XHB/Ewmh.hs | bsd-2-clause | setNetWmIconName :: EwmhCtx m => Connection -> WINDOW -> [String] -> m ()
setNetWmIconName c w = setProp c w NET_WM_ICON_NAME UTF8_STRING | 137 | setNetWmIconName :: EwmhCtx m => Connection -> WINDOW -> [String] -> m ()
setNetWmIconName c w = setProp c w NET_WM_ICON_NAME UTF8_STRING | 137 | setNetWmIconName c w = setProp c w NET_WM_ICON_NAME UTF8_STRING | 63 | false | true | 0 | 10 | 21 | 52 | 25 | 27 | null | null |
fehu/h-logic-einstein | src/LogicProblem/Solver/Show.hs | mit | showHypothesis indent (Hypothesis hs) = intercalate "\n" $ map f hs
where f (k, vs) = indent ++ show k ++ " : " ++ show vs | 134 | showHypothesis indent (Hypothesis hs) = intercalate "\n" $ map f hs
where f (k, vs) = indent ++ show k ++ " : " ++ show vs | 134 | showHypothesis indent (Hypothesis hs) = intercalate "\n" $ map f hs
where f (k, vs) = indent ++ show k ++ " : " ++ show vs | 134 | false | false | 0 | 10 | 38 | 63 | 30 | 33 | null | null |
music-suite/music-preludes | examples/mozart.hs | bsd-3-clause | stanza1_bass = asScore $ delay 8 $ octavesDown 1 $ empty
|> ll d d |> ll d d |> ls cs cs |> ll d d
|> ls a a |> s4 d d cs cs |> ls d d |> l4 a_ | 196 | stanza1_bass = asScore $ delay 8 $ octavesDown 1 $ empty
|> ll d d |> ll d d |> ls cs cs |> ll d d
|> ls a a |> s4 d d cs cs |> ls d d |> l4 a_ | 196 | stanza1_bass = asScore $ delay 8 $ octavesDown 1 $ empty
|> ll d d |> ll d d |> ls cs cs |> ll d d
|> ls a a |> s4 d d cs cs |> ls d d |> l4 a_ | 196 | false | false | 0 | 16 | 96 | 98 | 44 | 54 | null | null |
brendanhay/gogol | gogol-iam/gen/Network/Google/IAM/Types/Product.hs | mpl-2.0 | -- | Added permissions.
pdAddedPermissions :: Lens' PermissionDelta [Text]
pdAddedPermissions
= lens _pdAddedPermissions
(\ s a -> s{_pdAddedPermissions = a})
. _Default
. _Coerce | 199 | pdAddedPermissions :: Lens' PermissionDelta [Text]
pdAddedPermissions
= lens _pdAddedPermissions
(\ s a -> s{_pdAddedPermissions = a})
. _Default
. _Coerce | 175 | pdAddedPermissions
= lens _pdAddedPermissions
(\ s a -> s{_pdAddedPermissions = a})
. _Default
. _Coerce | 124 | true | true | 2 | 8 | 43 | 57 | 28 | 29 | null | null |
pseudonom/persistent | persistent-template/Database/Persist/TH/Internal.hs | mit | mkLenses _ ent | entitySum ent = return [] | 42 | mkLenses _ ent | entitySum ent = return [] | 42 | mkLenses _ ent | entitySum ent = return [] | 42 | false | false | 0 | 8 | 8 | 25 | 10 | 15 | null | null |
ilyasergey/GHC-XAppFix | compiler/cmm/PprC.hs | bsd-3-clause | -- ---------------------------------------------------------------------
-- tend to be implemented by foreign calls
pprCallishMachOp_for_C :: CallishMachOp -> SDoc
pprCallishMachOp_for_C mop
= case mop of
MO_F64_Pwr -> ptext (sLit "pow")
MO_F64_Sin -> ptext (sLit "sin")
MO_F64_Cos -> ptext (sLit "cos")
MO_F64_Tan -> ptext (sLit "tan")
MO_F64_Sinh -> ptext (sLit "sinh")
MO_F64_Cosh -> ptext (sLit "cosh")
MO_F64_Tanh -> ptext (sLit "tanh")
MO_F64_Asin -> ptext (sLit "asin")
MO_F64_Acos -> ptext (sLit "acos")
MO_F64_Atan -> ptext (sLit "atan")
MO_F64_Log -> ptext (sLit "log")
MO_F64_Exp -> ptext (sLit "exp")
MO_F64_Sqrt -> ptext (sLit "sqrt")
MO_F32_Pwr -> ptext (sLit "powf")
MO_F32_Sin -> ptext (sLit "sinf")
MO_F32_Cos -> ptext (sLit "cosf")
MO_F32_Tan -> ptext (sLit "tanf")
MO_F32_Sinh -> ptext (sLit "sinhf")
MO_F32_Cosh -> ptext (sLit "coshf")
MO_F32_Tanh -> ptext (sLit "tanhf")
MO_F32_Asin -> ptext (sLit "asinf")
MO_F32_Acos -> ptext (sLit "acosf")
MO_F32_Atan -> ptext (sLit "atanf")
MO_F32_Log -> ptext (sLit "logf")
MO_F32_Exp -> ptext (sLit "expf")
MO_F32_Sqrt -> ptext (sLit "sqrtf")
MO_WriteBarrier -> ptext (sLit "write_barrier")
MO_Memcpy -> ptext (sLit "memcpy")
MO_Memset -> ptext (sLit "memset")
MO_Memmove -> ptext (sLit "memmove")
(MO_PopCnt w) -> ptext (sLit $ popCntLabel w)
MO_Touch -> panic $ "pprCallishMachOp_for_C: MO_Touch not supported!"
-- ---------------------------------------------------------------------
-- Useful #defines
-- | 1,868 | pprCallishMachOp_for_C :: CallishMachOp -> SDoc
pprCallishMachOp_for_C mop
= case mop of
MO_F64_Pwr -> ptext (sLit "pow")
MO_F64_Sin -> ptext (sLit "sin")
MO_F64_Cos -> ptext (sLit "cos")
MO_F64_Tan -> ptext (sLit "tan")
MO_F64_Sinh -> ptext (sLit "sinh")
MO_F64_Cosh -> ptext (sLit "cosh")
MO_F64_Tanh -> ptext (sLit "tanh")
MO_F64_Asin -> ptext (sLit "asin")
MO_F64_Acos -> ptext (sLit "acos")
MO_F64_Atan -> ptext (sLit "atan")
MO_F64_Log -> ptext (sLit "log")
MO_F64_Exp -> ptext (sLit "exp")
MO_F64_Sqrt -> ptext (sLit "sqrt")
MO_F32_Pwr -> ptext (sLit "powf")
MO_F32_Sin -> ptext (sLit "sinf")
MO_F32_Cos -> ptext (sLit "cosf")
MO_F32_Tan -> ptext (sLit "tanf")
MO_F32_Sinh -> ptext (sLit "sinhf")
MO_F32_Cosh -> ptext (sLit "coshf")
MO_F32_Tanh -> ptext (sLit "tanhf")
MO_F32_Asin -> ptext (sLit "asinf")
MO_F32_Acos -> ptext (sLit "acosf")
MO_F32_Atan -> ptext (sLit "atanf")
MO_F32_Log -> ptext (sLit "logf")
MO_F32_Exp -> ptext (sLit "expf")
MO_F32_Sqrt -> ptext (sLit "sqrtf")
MO_WriteBarrier -> ptext (sLit "write_barrier")
MO_Memcpy -> ptext (sLit "memcpy")
MO_Memset -> ptext (sLit "memset")
MO_Memmove -> ptext (sLit "memmove")
(MO_PopCnt w) -> ptext (sLit $ popCntLabel w)
MO_Touch -> panic $ "pprCallishMachOp_for_C: MO_Touch not supported!"
-- ---------------------------------------------------------------------
-- Useful #defines
-- | 1,750 | pprCallishMachOp_for_C mop
= case mop of
MO_F64_Pwr -> ptext (sLit "pow")
MO_F64_Sin -> ptext (sLit "sin")
MO_F64_Cos -> ptext (sLit "cos")
MO_F64_Tan -> ptext (sLit "tan")
MO_F64_Sinh -> ptext (sLit "sinh")
MO_F64_Cosh -> ptext (sLit "cosh")
MO_F64_Tanh -> ptext (sLit "tanh")
MO_F64_Asin -> ptext (sLit "asin")
MO_F64_Acos -> ptext (sLit "acos")
MO_F64_Atan -> ptext (sLit "atan")
MO_F64_Log -> ptext (sLit "log")
MO_F64_Exp -> ptext (sLit "exp")
MO_F64_Sqrt -> ptext (sLit "sqrt")
MO_F32_Pwr -> ptext (sLit "powf")
MO_F32_Sin -> ptext (sLit "sinf")
MO_F32_Cos -> ptext (sLit "cosf")
MO_F32_Tan -> ptext (sLit "tanf")
MO_F32_Sinh -> ptext (sLit "sinhf")
MO_F32_Cosh -> ptext (sLit "coshf")
MO_F32_Tanh -> ptext (sLit "tanhf")
MO_F32_Asin -> ptext (sLit "asinf")
MO_F32_Acos -> ptext (sLit "acosf")
MO_F32_Atan -> ptext (sLit "atanf")
MO_F32_Log -> ptext (sLit "logf")
MO_F32_Exp -> ptext (sLit "expf")
MO_F32_Sqrt -> ptext (sLit "sqrtf")
MO_WriteBarrier -> ptext (sLit "write_barrier")
MO_Memcpy -> ptext (sLit "memcpy")
MO_Memset -> ptext (sLit "memset")
MO_Memmove -> ptext (sLit "memmove")
(MO_PopCnt w) -> ptext (sLit $ popCntLabel w)
MO_Touch -> panic $ "pprCallishMachOp_for_C: MO_Touch not supported!"
-- ---------------------------------------------------------------------
-- Useful #defines
-- | 1,702 | true | true | 0 | 11 | 591 | 512 | 243 | 269 | null | null |
vTurbine/ghc | compiler/main/DriverPipeline.hs | bsd-3-clause | link :: GhcLink -- interactive or batch
-> DynFlags -- dynamic flags
-> Bool -- attempt linking in batch mode?
-> HomePackageTable -- what to link
-> IO SuccessFlag
-- For the moment, in the batch linker, we don't bother to tell doLink
-- which packages to link -- it just tries all that are available.
-- batch_attempt_linking should only be *looked at* in batch mode. It
-- should only be True if the upsweep was successful and someone
-- exports main, i.e., we have good reason to believe that linking
-- will succeed.
link ghcLink dflags
= lookupHook linkHook l dflags ghcLink dflags
where
l LinkInMemory _ _ _
= if cGhcWithInterpreter == "YES"
then -- Not Linking...(demand linker will do the job)
return Succeeded
else panicBadLink LinkInMemory
l NoLink _ _ _
= return Succeeded
l LinkBinary dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt
l LinkStaticLib dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt
l LinkDynLib dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt | 1,215 | link :: GhcLink -- interactive or batch
-> DynFlags -- dynamic flags
-> Bool -- attempt linking in batch mode?
-> HomePackageTable -- what to link
-> IO SuccessFlag
link ghcLink dflags
= lookupHook linkHook l dflags ghcLink dflags
where
l LinkInMemory _ _ _
= if cGhcWithInterpreter == "YES"
then -- Not Linking...(demand linker will do the job)
return Succeeded
else panicBadLink LinkInMemory
l NoLink _ _ _
= return Succeeded
l LinkBinary dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt
l LinkStaticLib dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt
l LinkDynLib dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt | 855 | link ghcLink dflags
= lookupHook linkHook l dflags ghcLink dflags
where
l LinkInMemory _ _ _
= if cGhcWithInterpreter == "YES"
then -- Not Linking...(demand linker will do the job)
return Succeeded
else panicBadLink LinkInMemory
l NoLink _ _ _
= return Succeeded
l LinkBinary dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt
l LinkStaticLib dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt
l LinkDynLib dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt | 613 | true | true | 4 | 9 | 333 | 167 | 88 | 79 | null | null |
vialette/ppattern | src/Data/Algorithm/PPattern/Search/Context.hs | mit | agreeRight :: Color.Color -> Int -> IntMap.IntMap Int -> Bool
agreeRight c y m =
case IntMap.lookup c m of
Nothing -> True
Just y' -> y < y'
-- Update the context.
-- rightDecs is left unmodified. | 219 | agreeRight :: Color.Color -> Int -> IntMap.IntMap Int -> Bool
agreeRight c y m =
case IntMap.lookup c m of
Nothing -> True
Just y' -> y < y'
-- Update the context.
-- rightDecs is left unmodified. | 217 | agreeRight c y m =
case IntMap.lookup c m of
Nothing -> True
Just y' -> y < y'
-- Update the context.
-- rightDecs is left unmodified. | 155 | false | true | 0 | 10 | 60 | 75 | 35 | 40 | null | null |
travitch/foreign-inference | src/Foreign/Inference/Interface.hs | bsd-3-clause | lookupArgumentSummary :: (Show v, IsValue v,
SummarizeModule s, HasDependencies m,
MonadWriter Diagnostics m)
=> s
-> v
-> Int
-> m (Maybe [ParamAnnotation])
lookupArgumentSummary ms val ix = do
ds <- getDependencySummary
case valueContent' val of
FunctionC f ->
case ix < length (functionParameters f) of
False -> return (Just [])
True ->
let annots = summarizeArgument (functionParameters f !! ix) ms
uannots = userParameterAnnotations (manualAnnotations ds) f ix
in return $! Just $ uannots ++ map fst annots
ExternalFunctionC ef -> do
let fname = identifierContent $ externalFunctionName ef
summ = depSummary ds
-- Either this was a vararg or the function was cast to a
-- strange type (with extra parameters) before being called.
extract fsum =
let ps = foreignFunctionParameters fsum
in case ix < length ps of
False -> return (Just [])
True -> return $ Just $ parameterAnnotations (ps !! ix)
maybe (missingDependency ef) extract (M.lookup fname summ)
_ -> notAFunction val
-- | A variant of 'lookupArgumentSummary' where missing summaries can
-- be treated as simply returning no annotations. Many analyses can
-- do this now that the missing summary warning is sunk down to this
-- level. | 1,525 | lookupArgumentSummary :: (Show v, IsValue v,
SummarizeModule s, HasDependencies m,
MonadWriter Diagnostics m)
=> s
-> v
-> Int
-> m (Maybe [ParamAnnotation])
lookupArgumentSummary ms val ix = do
ds <- getDependencySummary
case valueContent' val of
FunctionC f ->
case ix < length (functionParameters f) of
False -> return (Just [])
True ->
let annots = summarizeArgument (functionParameters f !! ix) ms
uannots = userParameterAnnotations (manualAnnotations ds) f ix
in return $! Just $ uannots ++ map fst annots
ExternalFunctionC ef -> do
let fname = identifierContent $ externalFunctionName ef
summ = depSummary ds
-- Either this was a vararg or the function was cast to a
-- strange type (with extra parameters) before being called.
extract fsum =
let ps = foreignFunctionParameters fsum
in case ix < length ps of
False -> return (Just [])
True -> return $ Just $ parameterAnnotations (ps !! ix)
maybe (missingDependency ef) extract (M.lookup fname summ)
_ -> notAFunction val
-- | A variant of 'lookupArgumentSummary' where missing summaries can
-- be treated as simply returning no annotations. Many analyses can
-- do this now that the missing summary warning is sunk down to this
-- level. | 1,525 | lookupArgumentSummary ms val ix = do
ds <- getDependencySummary
case valueContent' val of
FunctionC f ->
case ix < length (functionParameters f) of
False -> return (Just [])
True ->
let annots = summarizeArgument (functionParameters f !! ix) ms
uannots = userParameterAnnotations (manualAnnotations ds) f ix
in return $! Just $ uannots ++ map fst annots
ExternalFunctionC ef -> do
let fname = identifierContent $ externalFunctionName ef
summ = depSummary ds
-- Either this was a vararg or the function was cast to a
-- strange type (with extra parameters) before being called.
extract fsum =
let ps = foreignFunctionParameters fsum
in case ix < length ps of
False -> return (Just [])
True -> return $ Just $ parameterAnnotations (ps !! ix)
maybe (missingDependency ef) extract (M.lookup fname summ)
_ -> notAFunction val
-- | A variant of 'lookupArgumentSummary' where missing summaries can
-- be treated as simply returning no annotations. Many analyses can
-- do this now that the missing summary warning is sunk down to this
-- level. | 1,215 | false | true | 4 | 13 | 523 | 341 | 170 | 171 | null | null |
yannick-cw/haskell_katas | test/Chapter3/ExercisesSpec.hs | bsd-3-clause | letterIndex :: Int -> Char
letterIndex x = undefined | 52 | letterIndex :: Int -> Char
letterIndex x = undefined | 52 | letterIndex x = undefined | 25 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
ony/hledger | hledger/Hledger/Cli/CliOptions.hs | gpl-3.0 | -- XXX should catch only isDoesNotExistError e
getDirectoryContentsSafe :: FilePath -> IO [String]
getDirectoryContentsSafe d =
(filter (not . (`elem` [".",".."])) `fmap` getDirectoryContents d) `C.catch` (\(_::C.IOException) -> return []) | 244 | getDirectoryContentsSafe :: FilePath -> IO [String]
getDirectoryContentsSafe d =
(filter (not . (`elem` [".",".."])) `fmap` getDirectoryContents d) `C.catch` (\(_::C.IOException) -> return []) | 196 | getDirectoryContentsSafe d =
(filter (not . (`elem` [".",".."])) `fmap` getDirectoryContents d) `C.catch` (\(_::C.IOException) -> return []) | 144 | true | true | 0 | 12 | 33 | 89 | 51 | 38 | null | null |
nevrenato/Hets_Fork | Propositional/TestProp2CNF.hs | gpl-2.0 | otherForm = makeNamed "myOtherForm" myOtherForm | 47 | otherForm = makeNamed "myOtherForm" myOtherForm | 47 | otherForm = makeNamed "myOtherForm" myOtherForm | 47 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
cauterize-tools/crucible | lib/Cauterize/Crucible/Tester.hs | bsd-3-clause | runTest :: Handle -- ^ stdin of the process under test
-> Handle -- ^ stdout of the process under test
-> SP.Specification -- ^ specification derived from the schema under test
-> IO (TestResult, D.MetaType, B.ByteString)
runTest ih oh spec = do
-- Generate a type according to the specification, then pack it to binary.
mt <- D.dynamicMetaGen spec
let packed = D.dynamicMetaPack spec mt
-- We keep this here as a sanity check. If this hits, it *IS* an error. We
-- don't want to continue if this happens. Ever.
let packedLen = fromIntegral $ B.length packed
let specMaxLen = C.sizeMax $ SP.specSize spec
when (packedLen > (specMaxLen + fromIntegral hlen))
(error $ "LENGTH OF BS TOO LONG! Expected "
++ show packedLen
++ " to be less than "
++ show specMaxLen ++ ".")
-- Setup a *THREAD* to do write the encoded type to the process-under-test's
-- stdin. This is in a separate thread because it's likely we can deadlock
-- for larger types due to OS buffering rules.
encodeDone <- newEmptyMVar
_ <- flip forkFinally (\_ -> putMVar encodeDone ()) $ do
B.hPut ih packed
hClose ih
putMVar encodeDone ()
-- Begin decoding from the process' stdout.
hdrBytes <- B.hGet oh hlen
let hdr = D.dynamicMetaUnpackHeader spec hdrBytes
result <- case hdr of
-- Unable to unpack the header.
Left err -> return $ TestError (T.pack err)
-- Got a header.
Right (mh, _) -> do
-- Read the payload bytes.
payload <- B.hGet oh (fromIntegral . D.metaLength $ mh)
-- Try to unpack the types from the payload bytes.
case D.dynamicMetaUnpackFromHeader spec mh payload of
Left str -> return TestError { testErrorMessage = str }
Right (mt', rest ) | not (B.null rest) -> return TestError { testErrorMessage =
"Not all bytes were consumed: " `T.append` (T.pack . show . B.unpack) rest }
| otherwise -> if mt == mt'
then return TestPass
else do
putStrLn "## Unexpected type."
putStrLn $ "## Expected: " ++ show mt
putStrLn $ "## Actual: " ++ show mt'
return TestFail
-- Make sure the encoding thread is finished.
_ <- takeMVar encodeDone
-- Dump something on the console to represent the running state.
case result of
TestPass -> putStr "."
_ -> putStrLn "X"
hFlush stdout
return (result, mt, packed)
where
hlen = fromIntegral (SP.specTypeLength spec)
+ (fromIntegral . C.sizeMax . C.tagToSize . SP.specLengthTag) spec
-- Output the result of a build command. | 3,072 | runTest :: Handle -- ^ stdin of the process under test
-> Handle -- ^ stdout of the process under test
-> SP.Specification -- ^ specification derived from the schema under test
-> IO (TestResult, D.MetaType, B.ByteString)
runTest ih oh spec = do
-- Generate a type according to the specification, then pack it to binary.
mt <- D.dynamicMetaGen spec
let packed = D.dynamicMetaPack spec mt
-- We keep this here as a sanity check. If this hits, it *IS* an error. We
-- don't want to continue if this happens. Ever.
let packedLen = fromIntegral $ B.length packed
let specMaxLen = C.sizeMax $ SP.specSize spec
when (packedLen > (specMaxLen + fromIntegral hlen))
(error $ "LENGTH OF BS TOO LONG! Expected "
++ show packedLen
++ " to be less than "
++ show specMaxLen ++ ".")
-- Setup a *THREAD* to do write the encoded type to the process-under-test's
-- stdin. This is in a separate thread because it's likely we can deadlock
-- for larger types due to OS buffering rules.
encodeDone <- newEmptyMVar
_ <- flip forkFinally (\_ -> putMVar encodeDone ()) $ do
B.hPut ih packed
hClose ih
putMVar encodeDone ()
-- Begin decoding from the process' stdout.
hdrBytes <- B.hGet oh hlen
let hdr = D.dynamicMetaUnpackHeader spec hdrBytes
result <- case hdr of
-- Unable to unpack the header.
Left err -> return $ TestError (T.pack err)
-- Got a header.
Right (mh, _) -> do
-- Read the payload bytes.
payload <- B.hGet oh (fromIntegral . D.metaLength $ mh)
-- Try to unpack the types from the payload bytes.
case D.dynamicMetaUnpackFromHeader spec mh payload of
Left str -> return TestError { testErrorMessage = str }
Right (mt', rest ) | not (B.null rest) -> return TestError { testErrorMessage =
"Not all bytes were consumed: " `T.append` (T.pack . show . B.unpack) rest }
| otherwise -> if mt == mt'
then return TestPass
else do
putStrLn "## Unexpected type."
putStrLn $ "## Expected: " ++ show mt
putStrLn $ "## Actual: " ++ show mt'
return TestFail
-- Make sure the encoding thread is finished.
_ <- takeMVar encodeDone
-- Dump something on the console to represent the running state.
case result of
TestPass -> putStr "."
_ -> putStrLn "X"
hFlush stdout
return (result, mt, packed)
where
hlen = fromIntegral (SP.specTypeLength spec)
+ (fromIntegral . C.sizeMax . C.tagToSize . SP.specLengthTag) spec
-- Output the result of a build command. | 3,072 | runTest ih oh spec = do
-- Generate a type according to the specification, then pack it to binary.
mt <- D.dynamicMetaGen spec
let packed = D.dynamicMetaPack spec mt
-- We keep this here as a sanity check. If this hits, it *IS* an error. We
-- don't want to continue if this happens. Ever.
let packedLen = fromIntegral $ B.length packed
let specMaxLen = C.sizeMax $ SP.specSize spec
when (packedLen > (specMaxLen + fromIntegral hlen))
(error $ "LENGTH OF BS TOO LONG! Expected "
++ show packedLen
++ " to be less than "
++ show specMaxLen ++ ".")
-- Setup a *THREAD* to do write the encoded type to the process-under-test's
-- stdin. This is in a separate thread because it's likely we can deadlock
-- for larger types due to OS buffering rules.
encodeDone <- newEmptyMVar
_ <- flip forkFinally (\_ -> putMVar encodeDone ()) $ do
B.hPut ih packed
hClose ih
putMVar encodeDone ()
-- Begin decoding from the process' stdout.
hdrBytes <- B.hGet oh hlen
let hdr = D.dynamicMetaUnpackHeader spec hdrBytes
result <- case hdr of
-- Unable to unpack the header.
Left err -> return $ TestError (T.pack err)
-- Got a header.
Right (mh, _) -> do
-- Read the payload bytes.
payload <- B.hGet oh (fromIntegral . D.metaLength $ mh)
-- Try to unpack the types from the payload bytes.
case D.dynamicMetaUnpackFromHeader spec mh payload of
Left str -> return TestError { testErrorMessage = str }
Right (mt', rest ) | not (B.null rest) -> return TestError { testErrorMessage =
"Not all bytes were consumed: " `T.append` (T.pack . show . B.unpack) rest }
| otherwise -> if mt == mt'
then return TestPass
else do
putStrLn "## Unexpected type."
putStrLn $ "## Expected: " ++ show mt
putStrLn $ "## Actual: " ++ show mt'
return TestFail
-- Make sure the encoding thread is finished.
_ <- takeMVar encodeDone
-- Dump something on the console to represent the running state.
case result of
TestPass -> putStr "."
_ -> putStrLn "X"
hFlush stdout
return (result, mt, packed)
where
hlen = fromIntegral (SP.specTypeLength spec)
+ (fromIntegral . C.sizeMax . C.tagToSize . SP.specLengthTag) spec
-- Output the result of a build command. | 2,826 | false | true | 3 | 25 | 1,148 | 636 | 304 | 332 | null | null |
ducis/haAni | hs/common/Graphics/UI/GLUT/Fonts.hs | gpl-2.0 | strokeHeight :: StrokeFont -- ^ Stroke font to use.
-> IO GLfloat -- ^ Height in units.
strokeHeight f = glutStrokeHeight =<< marhshalStrokeFont f | 159 | strokeHeight :: StrokeFont -- ^ Stroke font to use.
-> IO GLfloat
strokeHeight f = glutStrokeHeight =<< marhshalStrokeFont f | 137 | strokeHeight f = glutStrokeHeight =<< marhshalStrokeFont f | 58 | true | true | 0 | 6 | 36 | 30 | 15 | 15 | null | null |
sheganinans/plugins | src/System/Plugins/Utils.hs | lgpl-2.1 | encode_ch '<' = "zl" | 21 | encode_ch '<' = "zl" | 21 | encode_ch '<' = "zl" | 21 | false | false | 0 | 4 | 4 | 10 | 4 | 6 | null | null |
rimmington/cabal | Cabal/Distribution/Simple/Setup.hs | bsd-3-clause | fromFlagOrDefault :: a -> Flag a -> a
fromFlagOrDefault _ (Flag x) = x | 72 | fromFlagOrDefault :: a -> Flag a -> a
fromFlagOrDefault _ (Flag x) = x | 72 | fromFlagOrDefault _ (Flag x) = x | 34 | false | true | 0 | 7 | 15 | 33 | 16 | 17 | null | null |
andorp/hs-bluesnap | src/Bluesnap/API/Response.hs | gpl-3.0 | elementToXMLSubscription_id :: Xs.Long -> [Content ()]
elementToXMLSubscription_id = schemaTypeToXML "subscription-id" | 118 | elementToXMLSubscription_id :: Xs.Long -> [Content ()]
elementToXMLSubscription_id = schemaTypeToXML "subscription-id" | 118 | elementToXMLSubscription_id = schemaTypeToXML "subscription-id" | 63 | false | true | 0 | 8 | 9 | 28 | 14 | 14 | null | null |
mrmonday/Idris-dev | src/Idris/Core/ProofTerm.hs | bsd-3-clause | updateSolvedPath ns (AppL s p r) = AppL s (updateSolvedPath ns p) (updateSolvedTerm ns r) | 89 | updateSolvedPath ns (AppL s p r) = AppL s (updateSolvedPath ns p) (updateSolvedTerm ns r) | 89 | updateSolvedPath ns (AppL s p r) = AppL s (updateSolvedPath ns p) (updateSolvedTerm ns r) | 89 | false | false | 0 | 7 | 14 | 44 | 21 | 23 | null | null |
smaccm/capDL-tool | CapDL/State.hs | bsd-2-clause | hasTarget :: ObjID -> Cap -> Bool
hasTarget ref cap = if hasObjID cap then objID cap == ref else False | 102 | hasTarget :: ObjID -> Cap -> Bool
hasTarget ref cap = if hasObjID cap then objID cap == ref else False | 102 | hasTarget ref cap = if hasObjID cap then objID cap == ref else False | 68 | false | true | 0 | 8 | 20 | 48 | 22 | 26 | null | null |
cirquit/quizlearner | resources/form/input_forms.hs | mit | getInputR :: Handler Html
getInputR = do
person <- runInputGet $ Person
<$> ireq textField "name"
<*> ireq intField "age"
defaultLayout [whamlet|<p>#{show person}|] | 204 | getInputR :: Handler Html
getInputR = do
person <- runInputGet $ Person
<$> ireq textField "name"
<*> ireq intField "age"
defaultLayout [whamlet|<p>#{show person}|] | 204 | getInputR = do
person <- runInputGet $ Person
<$> ireq textField "name"
<*> ireq intField "age"
defaultLayout [whamlet|<p>#{show person}|] | 178 | false | true | 0 | 10 | 62 | 53 | 26 | 27 | null | null |
jonathanknowles/hs-type-level-prime-product | Data/TypeLevel/PrimeProduct/DenseTest.hs | bsd-3-clause | l1 = undefined :: LCM (N1:::E) E E => x | 53 | l1 = undefined :: LCM (N1:::E) E E => x | 53 | l1 = undefined :: LCM (N1:::E) E E => x | 53 | false | false | 0 | 8 | 23 | 27 | 14 | 13 | null | null |
mlitchard/IX | spike/market.hs | mit | fromPInt :: PInt -> Int
fromPInt (PInt a) = a | 45 | fromPInt :: PInt -> Int
fromPInt (PInt a) = a | 45 | fromPInt (PInt a) = a | 21 | false | true | 0 | 9 | 9 | 30 | 13 | 17 | null | null |
manasij7479/hasnake | main.hs | gpl-3.0 | getAtListIndex [] _ = error "Out of bounds list access" | 55 | getAtListIndex [] _ = error "Out of bounds list access" | 55 | getAtListIndex [] _ = error "Out of bounds list access" | 55 | false | false | 0 | 5 | 9 | 18 | 7 | 11 | null | null |
christiaanb/ghc | compiler/types/TyCon.hs | bsd-3-clause | okParent tc_name (ClassTyCon cls) = tc_name == tyConName (classTyCon cls) | 84 | okParent tc_name (ClassTyCon cls) = tc_name == tyConName (classTyCon cls) | 84 | okParent tc_name (ClassTyCon cls) = tc_name == tyConName (classTyCon cls) | 84 | false | false | 0 | 8 | 20 | 32 | 14 | 18 | null | null |
kadena-io/pact | src-ghc/Pact/ApiReq.hs | bsd-3-clause | addSigToSigData :: SomeKeyPair -> SigData a -> IO (SigData a)
addSigToSigData kp sd = do
sig <- signHash (_sigDataHash sd) kp
let k = PublicKeyHex $ toB16Text $ getPublic kp
return $ sd { _sigDataSigs = addSigToList k sig $ _sigDataSigs sd } | 247 | addSigToSigData :: SomeKeyPair -> SigData a -> IO (SigData a)
addSigToSigData kp sd = do
sig <- signHash (_sigDataHash sd) kp
let k = PublicKeyHex $ toB16Text $ getPublic kp
return $ sd { _sigDataSigs = addSigToList k sig $ _sigDataSigs sd } | 247 | addSigToSigData kp sd = do
sig <- signHash (_sigDataHash sd) kp
let k = PublicKeyHex $ toB16Text $ getPublic kp
return $ sd { _sigDataSigs = addSigToList k sig $ _sigDataSigs sd } | 185 | false | true | 0 | 11 | 48 | 101 | 47 | 54 | null | null |
soumith/fbthrift | thrift/lib/hs/Thrift/Protocol/Compact.hs | apache-2.0 | buildCompactValue (TDouble d) = doubleBE d | 42 | buildCompactValue (TDouble d) = doubleBE d | 42 | buildCompactValue (TDouble d) = doubleBE d | 42 | false | false | 0 | 6 | 5 | 19 | 8 | 11 | null | null |
GaloisInc/halvm-ghc | libraries/base/System/Timeout.hs | bsd-3-clause | timeout :: Int -> IO a -> IO (Maybe a)
timeout n f
| n < 0 = fmap Just f
| n == 0 = return Nothing
#if !defined(mingw32_HOST_OS) && !defined(HaLVM_TARGET_OS)
| rtsSupportsBoundThreads = do
-- In the threaded RTS, we use the Timer Manager to delay the
-- (fairly expensive) 'forkIO' call until the timeout has expired.
--
-- An additional thread is required for the actual delivery of
-- the Timeout exception because killThread (or another throwTo)
-- is the only way to reliably interrupt a throwTo in flight.
pid <- myThreadId
ex <- fmap Timeout newUnique
tm <- getSystemTimerManager
-- 'lock' synchronizes the timeout handler and the main thread:
-- * the main thread can disable the handler by writing to 'lock';
-- * the handler communicates the spawned thread's id through 'lock'.
-- These two cases are mutually exclusive.
lock <- newEmptyMVar
let handleTimeout = do
v <- isEmptyMVar lock
when v $ void $ forkIOWithUnmask $ \unmask -> unmask $ do
v2 <- tryPutMVar lock =<< myThreadId
when v2 $ throwTo pid ex
cleanupTimeout key = uninterruptibleMask_ $ do
v <- tryPutMVar lock undefined
if v then unregisterTimeout tm key
else takeMVar lock >>= killThread
handleJust (\e -> if e == ex then Just () else Nothing)
(\_ -> return Nothing)
(bracket (registerTimeout tm n handleTimeout)
cleanupTimeout
(\_ -> fmap Just f))
#endif
| otherwise = do
pid <- myThreadId
ex <- fmap Timeout newUnique
handleJust (\e -> if e == ex then Just () else Nothing)
(\_ -> return Nothing)
(bracket (forkIOWithUnmask $ \unmask ->
unmask $ threadDelay n >> throwTo pid ex)
(uninterruptibleMask_ . killThread)
(\_ -> fmap Just f))
-- #7719 explains why we need uninterruptibleMask_ above. | 2,216 | timeout :: Int -> IO a -> IO (Maybe a)
timeout n f
| n < 0 = fmap Just f
| n == 0 = return Nothing
#if !defined(mingw32_HOST_OS) && !defined(HaLVM_TARGET_OS)
| rtsSupportsBoundThreads = do
-- In the threaded RTS, we use the Timer Manager to delay the
-- (fairly expensive) 'forkIO' call until the timeout has expired.
--
-- An additional thread is required for the actual delivery of
-- the Timeout exception because killThread (or another throwTo)
-- is the only way to reliably interrupt a throwTo in flight.
pid <- myThreadId
ex <- fmap Timeout newUnique
tm <- getSystemTimerManager
-- 'lock' synchronizes the timeout handler and the main thread:
-- * the main thread can disable the handler by writing to 'lock';
-- * the handler communicates the spawned thread's id through 'lock'.
-- These two cases are mutually exclusive.
lock <- newEmptyMVar
let handleTimeout = do
v <- isEmptyMVar lock
when v $ void $ forkIOWithUnmask $ \unmask -> unmask $ do
v2 <- tryPutMVar lock =<< myThreadId
when v2 $ throwTo pid ex
cleanupTimeout key = uninterruptibleMask_ $ do
v <- tryPutMVar lock undefined
if v then unregisterTimeout tm key
else takeMVar lock >>= killThread
handleJust (\e -> if e == ex then Just () else Nothing)
(\_ -> return Nothing)
(bracket (registerTimeout tm n handleTimeout)
cleanupTimeout
(\_ -> fmap Just f))
#endif
| otherwise = do
pid <- myThreadId
ex <- fmap Timeout newUnique
handleJust (\e -> if e == ex then Just () else Nothing)
(\_ -> return Nothing)
(bracket (forkIOWithUnmask $ \unmask ->
unmask $ threadDelay n >> throwTo pid ex)
(uninterruptibleMask_ . killThread)
(\_ -> fmap Just f))
-- #7719 explains why we need uninterruptibleMask_ above. | 2,216 | timeout n f
| n < 0 = fmap Just f
| n == 0 = return Nothing
#if !defined(mingw32_HOST_OS) && !defined(HaLVM_TARGET_OS)
| rtsSupportsBoundThreads = do
-- In the threaded RTS, we use the Timer Manager to delay the
-- (fairly expensive) 'forkIO' call until the timeout has expired.
--
-- An additional thread is required for the actual delivery of
-- the Timeout exception because killThread (or another throwTo)
-- is the only way to reliably interrupt a throwTo in flight.
pid <- myThreadId
ex <- fmap Timeout newUnique
tm <- getSystemTimerManager
-- 'lock' synchronizes the timeout handler and the main thread:
-- * the main thread can disable the handler by writing to 'lock';
-- * the handler communicates the spawned thread's id through 'lock'.
-- These two cases are mutually exclusive.
lock <- newEmptyMVar
let handleTimeout = do
v <- isEmptyMVar lock
when v $ void $ forkIOWithUnmask $ \unmask -> unmask $ do
v2 <- tryPutMVar lock =<< myThreadId
when v2 $ throwTo pid ex
cleanupTimeout key = uninterruptibleMask_ $ do
v <- tryPutMVar lock undefined
if v then unregisterTimeout tm key
else takeMVar lock >>= killThread
handleJust (\e -> if e == ex then Just () else Nothing)
(\_ -> return Nothing)
(bracket (registerTimeout tm n handleTimeout)
cleanupTimeout
(\_ -> fmap Just f))
#endif
| otherwise = do
pid <- myThreadId
ex <- fmap Timeout newUnique
handleJust (\e -> if e == ex then Just () else Nothing)
(\_ -> return Nothing)
(bracket (forkIOWithUnmask $ \unmask ->
unmask $ threadDelay n >> throwTo pid ex)
(uninterruptibleMask_ . killThread)
(\_ -> fmap Just f))
-- #7719 explains why we need uninterruptibleMask_ above. | 2,177 | false | true | 3 | 20 | 831 | 453 | 223 | 230 | null | null |
christiaanb/Idris-dev | src/Core/CoreParser.hs | bsd-3-clause | parseDef = runParser pDef () "(input)" | 38 | parseDef = runParser pDef () "(input)" | 38 | parseDef = runParser pDef () "(input)" | 38 | false | false | 1 | 6 | 5 | 19 | 7 | 12 | null | null |
rootzlevel/hledger-add | src/DateParser.hs | bsd-3-clause | printDate' (DateOptional opt:ds) day =
printDate' opt day <> printDate' ds day | 80 | printDate' (DateOptional opt:ds) day =
printDate' opt day <> printDate' ds day | 80 | printDate' (DateOptional opt:ds) day =
printDate' opt day <> printDate' ds day | 80 | false | false | 0 | 8 | 13 | 35 | 16 | 19 | null | null |
rahulmutt/ghcvm | compiler/Eta/Main/HscTypes.hs | bsd-3-clause | mkApiErr :: DynFlags -> SDoc -> GhcApiError
mkApiErr dflags msg = GhcApiError (showSDoc dflags msg) | 99 | mkApiErr :: DynFlags -> SDoc -> GhcApiError
mkApiErr dflags msg = GhcApiError (showSDoc dflags msg) | 99 | mkApiErr dflags msg = GhcApiError (showSDoc dflags msg) | 55 | false | true | 0 | 8 | 14 | 40 | 18 | 22 | null | null |
robbertkrebbers/fewdigits | Data/Real/ICReal.hs | bsd-2-clause | intervalExp (Interval (lb, ub)) =
Interval (max 0 (lowerBound sample - err), upperBound sample)
where
sample = exp $ CBase ub
maxSlope = upperBound $ sample
delta = (ub - lb)
err = maxSlope * delta | 209 | intervalExp (Interval (lb, ub)) =
Interval (max 0 (lowerBound sample - err), upperBound sample)
where
sample = exp $ CBase ub
maxSlope = upperBound $ sample
delta = (ub - lb)
err = maxSlope * delta | 209 | intervalExp (Interval (lb, ub)) =
Interval (max 0 (lowerBound sample - err), upperBound sample)
where
sample = exp $ CBase ub
maxSlope = upperBound $ sample
delta = (ub - lb)
err = maxSlope * delta | 209 | false | false | 9 | 9 | 47 | 110 | 48 | 62 | null | null |
Tener/deeplearning-thesis | src/gg-exp9.hs | bsd-3-clause | dbnMatlabOpts = Just (def {dbnSizes = [75], numEpochs = 5, implementation = Matlab}) | 84 | dbnMatlabOpts = Just (def {dbnSizes = [75], numEpochs = 5, implementation = Matlab}) | 84 | dbnMatlabOpts = Just (def {dbnSizes = [75], numEpochs = 5, implementation = Matlab}) | 84 | false | false | 1 | 9 | 12 | 39 | 21 | 18 | null | null |
jrraymond/rolodex | src/Main.hs | gpl-2.0 | main :: IO ()
main = runNoLoggingT . withSqlitePool "rolodex" 100 $ \pool ->
liftIO $ runSqlPool (runMigration migrateTables) pool >>
run 8080 (app pool) | 157 | main :: IO ()
main = runNoLoggingT . withSqlitePool "rolodex" 100 $ \pool ->
liftIO $ runSqlPool (runMigration migrateTables) pool >>
run 8080 (app pool) | 157 | main = runNoLoggingT . withSqlitePool "rolodex" 100 $ \pool ->
liftIO $ runSqlPool (runMigration migrateTables) pool >>
run 8080 (app pool) | 143 | false | true | 0 | 11 | 28 | 64 | 31 | 33 | null | null |
imalsogreg/tetrode-ephys | utils/drawSpline.hs | gpl-3.0 | vectDiff :: Location -> Location -> Location
vectDiff a b = vectSum a (vectScale b (-1)) | 88 | vectDiff :: Location -> Location -> Location
vectDiff a b = vectSum a (vectScale b (-1)) | 88 | vectDiff a b = vectSum a (vectScale b (-1)) | 43 | false | true | 0 | 9 | 15 | 49 | 22 | 27 | null | null |
nadavshemer/buildsome | src/Main.hs | gpl-2.0 | getRequestedTargets printer extraOutputs ts
| "clean" `elem` ts =
E.throwIO $
BadCommandLine (Printer.render printer) "Clean must be requested exclusively"
| otherwise =
return $ RequestedTargets TargetsRequest
{ targetsRequestPaths = requestPaths
, targetsRequestReason = reason
, targetsRequestExtraOutputs = extraOutputs
}
where
(requestPaths, reason) = case ts of
[] -> (["default"], "implicit 'default' target")
_ -> (ts, "explicit request from cmdline") | 517 | getRequestedTargets printer extraOutputs ts
| "clean" `elem` ts =
E.throwIO $
BadCommandLine (Printer.render printer) "Clean must be requested exclusively"
| otherwise =
return $ RequestedTargets TargetsRequest
{ targetsRequestPaths = requestPaths
, targetsRequestReason = reason
, targetsRequestExtraOutputs = extraOutputs
}
where
(requestPaths, reason) = case ts of
[] -> (["default"], "implicit 'default' target")
_ -> (ts, "explicit request from cmdline") | 517 | getRequestedTargets printer extraOutputs ts
| "clean" `elem` ts =
E.throwIO $
BadCommandLine (Printer.render printer) "Clean must be requested exclusively"
| otherwise =
return $ RequestedTargets TargetsRequest
{ targetsRequestPaths = requestPaths
, targetsRequestReason = reason
, targetsRequestExtraOutputs = extraOutputs
}
where
(requestPaths, reason) = case ts of
[] -> (["default"], "implicit 'default' target")
_ -> (ts, "explicit request from cmdline") | 517 | false | false | 1 | 10 | 116 | 126 | 68 | 58 | null | null |
mstksg/hledger | hledger-lib/Hledger/Data/Journal.hs | gpl-3.0 | journalFilePaths :: Journal -> [FilePath]
journalFilePaths = map fst . jfiles | 77 | journalFilePaths :: Journal -> [FilePath]
journalFilePaths = map fst . jfiles | 77 | journalFilePaths = map fst . jfiles | 35 | false | true | 1 | 8 | 10 | 33 | 14 | 19 | null | null |
clarissalittler/pi-calculus | Exp.hs | mit | ppVal (VName n) = text "@" <> text n | 36 | ppVal (VName n) = text "@" <> text n | 36 | ppVal (VName n) = text "@" <> text n | 36 | false | false | 0 | 6 | 8 | 26 | 11 | 15 | null | null |
GaloisInc/saw-script | saw-core/src/Verifier/SAW/SCTypeCheck.hs | bsd-3-clause | typeInferCompleteInCtx ::
TypeInferCtx var tp => [(var, tp)] ->
([(LocalName, Term, Sort)] -> TCM a) -> TCM a
typeInferCompleteInCtx ctx f =
do typed_ctx <- typeInferCompleteCtx ctx
withCtx (map (\(x,tp,_) -> (x,tp)) typed_ctx) (f typed_ctx)
-- Type inference for Term dispatches to type inference on TermF Term, but uses
-- memoization to avoid repeated work | 372 | typeInferCompleteInCtx ::
TypeInferCtx var tp => [(var, tp)] ->
([(LocalName, Term, Sort)] -> TCM a) -> TCM a
typeInferCompleteInCtx ctx f =
do typed_ctx <- typeInferCompleteCtx ctx
withCtx (map (\(x,tp,_) -> (x,tp)) typed_ctx) (f typed_ctx)
-- Type inference for Term dispatches to type inference on TermF Term, but uses
-- memoization to avoid repeated work | 372 | typeInferCompleteInCtx ctx f =
do typed_ctx <- typeInferCompleteCtx ctx
withCtx (map (\(x,tp,_) -> (x,tp)) typed_ctx) (f typed_ctx)
-- Type inference for Term dispatches to type inference on TermF Term, but uses
-- memoization to avoid repeated work | 258 | false | true | 0 | 12 | 67 | 124 | 67 | 57 | null | null |
positiondev/larceny | example/Fn.hs | isc | larcenyServe :: Ctxt -> IO (Maybe Response)
larcenyServe ctxt = do
let render' path' = larcenyRenderWith ctxt mempty ((pathInfo . fst . getRequest $ ctxt) <> path')
mPage <- render' []
case mPage of
Nothing -> render' ["index"]
Just _ -> return mPage | 264 | larcenyServe :: Ctxt -> IO (Maybe Response)
larcenyServe ctxt = do
let render' path' = larcenyRenderWith ctxt mempty ((pathInfo . fst . getRequest $ ctxt) <> path')
mPage <- render' []
case mPage of
Nothing -> render' ["index"]
Just _ -> return mPage | 264 | larcenyServe ctxt = do
let render' path' = larcenyRenderWith ctxt mempty ((pathInfo . fst . getRequest $ ctxt) <> path')
mPage <- render' []
case mPage of
Nothing -> render' ["index"]
Just _ -> return mPage | 220 | false | true | 2 | 16 | 56 | 109 | 52 | 57 | null | null |
TomasBarry/DistroProject | SampleProject/src/Lib.hs | mit | -- global loggin functions
debugLog, warnLog, errorLog :: String -> IO ()
debugLog = doLog debugM | 97 | debugLog, warnLog, errorLog :: String -> IO ()
debugLog = doLog debugM | 70 | debugLog = doLog debugM | 23 | true | true | 0 | 7 | 15 | 28 | 16 | 12 | null | null |
rueshyna/gogol | gogol-identity-toolkit/gen/Network/Google/IdentityToolkit/Types/Product.hs | mpl-2.0 | -- | GCP project number of the requesting delegated app. Currently only
-- intended for Firebase V1 migration.
irpvctrDelegatedProjectNumber :: Lens' IdentitytoolkitRelyingPartyVerifyCustomTokenRequest (Maybe Int64)
irpvctrDelegatedProjectNumber
= lens _irpvctrDelegatedProjectNumber
(\ s a -> s{_irpvctrDelegatedProjectNumber = a})
. mapping _Coerce | 364 | irpvctrDelegatedProjectNumber :: Lens' IdentitytoolkitRelyingPartyVerifyCustomTokenRequest (Maybe Int64)
irpvctrDelegatedProjectNumber
= lens _irpvctrDelegatedProjectNumber
(\ s a -> s{_irpvctrDelegatedProjectNumber = a})
. mapping _Coerce | 253 | irpvctrDelegatedProjectNumber
= lens _irpvctrDelegatedProjectNumber
(\ s a -> s{_irpvctrDelegatedProjectNumber = a})
. mapping _Coerce | 148 | true | true | 1 | 8 | 51 | 59 | 29 | 30 | null | null |
hjwylde/werewolf | src/Game/Werewolf/Player.hs | bsd-3-clause | -- | The traversal of 'villageDrunk' 'Player's.
--
-- @
-- 'villageDrunks' = 'traverse' . 'filtered' ('is' 'villageDrunk')
-- @
villageDrunks :: Traversable t => Traversal' (t Player) Player
villageDrunks = traverse . filtered (is villageDrunk) | 244 | villageDrunks :: Traversable t => Traversal' (t Player) Player
villageDrunks = traverse . filtered (is villageDrunk) | 116 | villageDrunks = traverse . filtered (is villageDrunk) | 53 | true | true | 0 | 8 | 35 | 47 | 25 | 22 | null | null |
trbauer/hrun | HRun.hs | mit | parseArgs ix args (a:as)
| a == "--help" = printUsage >> SE.exitSuccess
| otherwise = return args {argsExecFile = a, argsExecArgs = as} | 141 | parseArgs ix args (a:as)
| a == "--help" = printUsage >> SE.exitSuccess
| otherwise = return args {argsExecFile = a, argsExecArgs = as} | 141 | parseArgs ix args (a:as)
| a == "--help" = printUsage >> SE.exitSuccess
| otherwise = return args {argsExecFile = a, argsExecArgs = as} | 141 | false | false | 0 | 8 | 28 | 68 | 32 | 36 | null | null |
alexander-at-github/eta | compiler/ETA/Specialise/Rules.hs | bsd-3-clause | ruleCheck env (Case e _ _ as) = ruleCheck env e `unionBags`
unionManyBags [ruleCheck env r | (_,_,r) <- as] | 139 | ruleCheck env (Case e _ _ as) = ruleCheck env e `unionBags`
unionManyBags [ruleCheck env r | (_,_,r) <- as] | 139 | ruleCheck env (Case e _ _ as) = ruleCheck env e `unionBags`
unionManyBags [ruleCheck env r | (_,_,r) <- as] | 139 | false | false | 0 | 10 | 51 | 64 | 32 | 32 | null | null |
ghc-android/ghc | compiler/deSugar/Coverage.hs | bsd-3-clause | addTickHsExpr (HsApp e1 e2) = liftM2 HsApp (addTickLHsExprNever e1) (addTickLHsExpr e2) | 92 | addTickHsExpr (HsApp e1 e2) = liftM2 HsApp (addTickLHsExprNever e1) (addTickLHsExpr e2) | 92 | addTickHsExpr (HsApp e1 e2) = liftM2 HsApp (addTickLHsExprNever e1) (addTickLHsExpr e2) | 92 | false | false | 0 | 7 | 15 | 36 | 17 | 19 | null | null |
spechub/Hets | Adl/Sign.hs | gpl-2.0 | sym_kind (Rel _) = RelK | 23 | sym_kind (Rel _) = RelK | 23 | sym_kind (Rel _) = RelK | 23 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
supki/libjenkins | example/discover.hs | bsd-2-clause | pretty :: Discover -> Text
pretty x = Text.unwords $
"Jenkins" : version x : maybe [] (return . between "(" ")") (serverId x) ++ ["at", url x]
where
between l r t = l <> t <> r | 181 | pretty :: Discover -> Text
pretty x = Text.unwords $
"Jenkins" : version x : maybe [] (return . between "(" ")") (serverId x) ++ ["at", url x]
where
between l r t = l <> t <> r | 181 | pretty x = Text.unwords $
"Jenkins" : version x : maybe [] (return . between "(" ")") (serverId x) ++ ["at", url x]
where
between l r t = l <> t <> r | 154 | false | true | 0 | 10 | 43 | 98 | 48 | 50 | null | null |
norm2782/uuagc | src/Parser.hs | bsd-3-clause | pINTMAP = pCostReserved 5 "INTMAP" <?> "INTMAP" | 54 | pINTMAP = pCostReserved 5 "INTMAP" <?> "INTMAP" | 54 | pINTMAP = pCostReserved 5 "INTMAP" <?> "INTMAP" | 54 | false | false | 0 | 6 | 13 | 15 | 7 | 8 | null | null |
deyaaeldeen/GTLC | src/GTLC/TypeChecker.hs | gpl-3.0 | -- | Translates casts to coercions in the lazy up down cast approach.
mkCoerceLUD :: CoerceT
mkCoerceLUD Dyn Dyn = IdC Dyn | 122 | mkCoerceLUD :: CoerceT
mkCoerceLUD Dyn Dyn = IdC Dyn | 52 | mkCoerceLUD Dyn Dyn = IdC Dyn | 29 | true | true | 0 | 5 | 21 | 20 | 10 | 10 | null | null |
jprider63/LMonad | src/LMonad/TCB.hs | mit | raiseClearanceTCB :: (Label l, LMonad m) => l -> LMonadT l m ()
raiseClearanceTCB c = LMonadT $ do
(LState label clearance) <- get
put $ LState label $ lub clearance c
-- Sets the current label to the meet of the old label and the given label. | 252 | raiseClearanceTCB :: (Label l, LMonad m) => l -> LMonadT l m ()
raiseClearanceTCB c = LMonadT $ do
(LState label clearance) <- get
put $ LState label $ lub clearance c
-- Sets the current label to the meet of the old label and the given label. | 252 | raiseClearanceTCB c = LMonadT $ do
(LState label clearance) <- get
put $ LState label $ lub clearance c
-- Sets the current label to the meet of the old label and the given label. | 188 | false | true | 0 | 10 | 56 | 81 | 39 | 42 | null | null |
facebookincubator/duckling | Duckling/Time/KA/Rules.hs | bsd-3-clause | ruleThisTime :: Rule
ruleThisTime = Rule
{ name = "this <time>"
, pattern =
[ regex "ამ|ეს|ახლანდელი|მიმდინარე"
, Predicate isOkWithThisNext
]
, prod = \case
(_:Token Time td:_) -> tt $ predNth 0 False td
_ -> Nothing
} | 251 | ruleThisTime :: Rule
ruleThisTime = Rule
{ name = "this <time>"
, pattern =
[ regex "ამ|ეს|ახლანდელი|მიმდინარე"
, Predicate isOkWithThisNext
]
, prod = \case
(_:Token Time td:_) -> tt $ predNth 0 False td
_ -> Nothing
} | 251 | ruleThisTime = Rule
{ name = "this <time>"
, pattern =
[ regex "ამ|ეს|ახლანდელი|მიმდინარე"
, Predicate isOkWithThisNext
]
, prod = \case
(_:Token Time td:_) -> tt $ predNth 0 False td
_ -> Nothing
} | 230 | false | true | 0 | 14 | 70 | 88 | 46 | 42 | null | null |
rleshchinskiy/vector | Data/Vector/Fusion/Bundle/Monadic.hs | bsd-3-clause | length Bundle{sSize = Exact n} = return n | 42 | length Bundle{sSize = Exact n} = return n | 42 | length Bundle{sSize = Exact n} = return n | 42 | false | false | 0 | 9 | 8 | 24 | 11 | 13 | null | null |
lspitzner/brittany | data/Test79.hs | agpl-3.0 | func _ = x | 10 | func _ = x | 10 | func _ = x | 10 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ghcjs/ghcjs | src/Gen2/Compactor.hs | mit | valsS f (IfStat e s1 s2) = IfStat <$> valsE f e <*> valsS f s1 <*> valsS f s2 | 89 | valsS f (IfStat e s1 s2) = IfStat <$> valsE f e <*> valsS f s1 <*> valsS f s2 | 89 | valsS f (IfStat e s1 s2) = IfStat <$> valsE f e <*> valsS f s1 <*> valsS f s2 | 89 | false | false | 0 | 8 | 31 | 50 | 22 | 28 | null | null |
janschulz/pandoc | src/Text/Pandoc/Parsing.hs | gpl-2.0 | withHorizDisplacement :: Stream s m Char
=> ParserT s st m a -- ^ Parser to apply
-> ParserT s st m (a, Int) -- ^ (result, displacement)
withHorizDisplacement parser = do
pos1 <- getPosition
result <- parser
pos2 <- getPosition
return (result, sourceColumn pos2 - sourceColumn pos1)
-- | Applies a parser and returns the raw string that was parsed,
-- along with the value produced by the parser. | 450 | withHorizDisplacement :: Stream s m Char
=> ParserT s st m a -- ^ Parser to apply
-> ParserT s st m (a, Int)
withHorizDisplacement parser = do
pos1 <- getPosition
result <- parser
pos2 <- getPosition
return (result, sourceColumn pos2 - sourceColumn pos1)
-- | Applies a parser and returns the raw string that was parsed,
-- along with the value produced by the parser. | 422 | withHorizDisplacement parser = do
pos1 <- getPosition
result <- parser
pos2 <- getPosition
return (result, sourceColumn pos2 - sourceColumn pos1)
-- | Applies a parser and returns the raw string that was parsed,
-- along with the value produced by the parser. | 268 | true | true | 0 | 11 | 123 | 105 | 50 | 55 | null | null |
MasseR/xmonadcontrib | XMonad/Layout/Mosaic.hs | bsd-3-clause | makeTree _ [x] = Leaf x | 23 | makeTree _ [x] = Leaf x | 23 | makeTree _ [x] = Leaf x | 23 | false | false | 1 | 5 | 5 | 19 | 8 | 11 | null | null |
mrakgr/futhark | src/Futhark/CodeGen/ImpGen/Kernels/ToOpenCL.hs | bsd-3-clause | callKernel (ImpKernels.GetGroupSize v) =
GetGroupSize v | 57 | callKernel (ImpKernels.GetGroupSize v) =
GetGroupSize v | 57 | callKernel (ImpKernels.GetGroupSize v) =
GetGroupSize v | 57 | false | false | 0 | 7 | 7 | 21 | 9 | 12 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/rangeSize_1.hs | mit | rangeSizeTup0 :: Tup2 Tup0 Tup0 -> MyInt
rangeSizeTup0 (Tup2 vv vw) = rangeSize2 (Tup2 vv vw) | 95 | rangeSizeTup0 :: Tup2 Tup0 Tup0 -> MyInt
rangeSizeTup0 (Tup2 vv vw) = rangeSize2 (Tup2 vv vw) | 95 | rangeSizeTup0 (Tup2 vv vw) = rangeSize2 (Tup2 vv vw) | 52 | false | true | 0 | 7 | 17 | 42 | 20 | 22 | null | null |
peacememories/osc-haskell | src/Sound/OSC/Parser.hs | bsd-2-clause | nest :: AP.Parser ByteString -> AP.Parser a -> AP.Parser a
nest bsp p = bsp >>= parse
where
parse bs = either fail return (parseOnly p bs) | 150 | nest :: AP.Parser ByteString -> AP.Parser a -> AP.Parser a
nest bsp p = bsp >>= parse
where
parse bs = either fail return (parseOnly p bs) | 150 | nest bsp p = bsp >>= parse
where
parse bs = either fail return (parseOnly p bs) | 91 | false | true | 3 | 9 | 38 | 78 | 34 | 44 | null | null |
enolan/Idris-dev | src/Idris/Output.hs | bsd-3-clause | idemodePutSExp :: SExpable a => String -> a -> Idris ()
idemodePutSExp cmd info = do i <- getIState
case idris_outputmode i of
IdeMode n h ->
runIO . hPutStrLn h $
convSExp cmd info n
_ -> return ()
-- TODO: send structured output similar to the metavariable list | 423 | idemodePutSExp :: SExpable a => String -> a -> Idris ()
idemodePutSExp cmd info = do i <- getIState
case idris_outputmode i of
IdeMode n h ->
runIO . hPutStrLn h $
convSExp cmd info n
_ -> return ()
-- TODO: send structured output similar to the metavariable list | 423 | idemodePutSExp cmd info = do i <- getIState
case idris_outputmode i of
IdeMode n h ->
runIO . hPutStrLn h $
convSExp cmd info n
_ -> return ()
-- TODO: send structured output similar to the metavariable list | 367 | false | true | 0 | 12 | 209 | 94 | 43 | 51 | null | null |
green-haskell/ghc | compiler/basicTypes/OccName.hs | bsd-3-clause | -- The : prefix makes sure it classifies as a tycon/datacon
mkClassDataConOcc = mk_simple_deriv dataName "D:" | 111 | mkClassDataConOcc = mk_simple_deriv dataName "D:" | 51 | mkClassDataConOcc = mk_simple_deriv dataName "D:" | 51 | true | false | 0 | 5 | 17 | 12 | 6 | 6 | null | null |
AlexanderPankiv/ghc | utils/ghc-cabal/Main.hs | bsd-3-clause | doCopy :: FilePath -> FilePath
-> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> Bool
-> [String]
-> IO ()
doCopy directory distDir
strip myDestDir myPrefix myLibdir myDocdir withSharedLibs
args
= withCurrentDirectory directory $ do
let copyArgs = ["copy", "--builddir", distDir]
++ (if null myDestDir
then []
else ["--destdir", myDestDir])
++ args
copyHooks = userHooks {
copyHook = noGhcPrimHook
$ modHook False
$ copyHook userHooks
}
defaultMainWithHooksArgs copyHooks copyArgs
where
noGhcPrimHook f pd lbi us flags
= let pd'
| packageName pd == PackageName "ghc-prim" =
case library pd of
Just lib ->
let ghcPrim = fromJust (simpleParse "GHC.Prim")
ems = filter (ghcPrim /=) (exposedModules lib)
lib' = lib { exposedModules = ems }
in pd { library = Just lib' }
Nothing ->
error "Expected a library, but none found"
| otherwise = pd
in f pd' lbi us flags
modHook relocatableBuild f pd lbi us flags
= do let verbosity = normal
idts = updateInstallDirTemplates relocatableBuild
myPrefix myLibdir myDocdir
(installDirTemplates lbi)
progs = withPrograms lbi
stripProgram' = stripProgram {
programFindLocation = \_ _ -> return (Just strip) }
progs' <- configureProgram verbosity stripProgram' progs
let lbi' = lbi {
withPrograms = progs',
installDirTemplates = idts,
configFlags = cfg,
stripLibs = fromFlag (configStripLibs cfg),
withSharedLib = withSharedLibs
}
-- This hack allows to interpret the "strip"
-- command-line argument being set to ':' to signify
-- disabled library stripping
cfg | strip == ":" = (configFlags lbi) { configStripLibs = toFlag False }
| otherwise = configFlags lbi
f pd lbi' us flags | 2,660 | doCopy :: FilePath -> FilePath
-> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> Bool
-> [String]
-> IO ()
doCopy directory distDir
strip myDestDir myPrefix myLibdir myDocdir withSharedLibs
args
= withCurrentDirectory directory $ do
let copyArgs = ["copy", "--builddir", distDir]
++ (if null myDestDir
then []
else ["--destdir", myDestDir])
++ args
copyHooks = userHooks {
copyHook = noGhcPrimHook
$ modHook False
$ copyHook userHooks
}
defaultMainWithHooksArgs copyHooks copyArgs
where
noGhcPrimHook f pd lbi us flags
= let pd'
| packageName pd == PackageName "ghc-prim" =
case library pd of
Just lib ->
let ghcPrim = fromJust (simpleParse "GHC.Prim")
ems = filter (ghcPrim /=) (exposedModules lib)
lib' = lib { exposedModules = ems }
in pd { library = Just lib' }
Nothing ->
error "Expected a library, but none found"
| otherwise = pd
in f pd' lbi us flags
modHook relocatableBuild f pd lbi us flags
= do let verbosity = normal
idts = updateInstallDirTemplates relocatableBuild
myPrefix myLibdir myDocdir
(installDirTemplates lbi)
progs = withPrograms lbi
stripProgram' = stripProgram {
programFindLocation = \_ _ -> return (Just strip) }
progs' <- configureProgram verbosity stripProgram' progs
let lbi' = lbi {
withPrograms = progs',
installDirTemplates = idts,
configFlags = cfg,
stripLibs = fromFlag (configStripLibs cfg),
withSharedLib = withSharedLibs
}
-- This hack allows to interpret the "strip"
-- command-line argument being set to ':' to signify
-- disabled library stripping
cfg | strip == ":" = (configFlags lbi) { configStripLibs = toFlag False }
| otherwise = configFlags lbi
f pd lbi' us flags | 2,660 | doCopy directory distDir
strip myDestDir myPrefix myLibdir myDocdir withSharedLibs
args
= withCurrentDirectory directory $ do
let copyArgs = ["copy", "--builddir", distDir]
++ (if null myDestDir
then []
else ["--destdir", myDestDir])
++ args
copyHooks = userHooks {
copyHook = noGhcPrimHook
$ modHook False
$ copyHook userHooks
}
defaultMainWithHooksArgs copyHooks copyArgs
where
noGhcPrimHook f pd lbi us flags
= let pd'
| packageName pd == PackageName "ghc-prim" =
case library pd of
Just lib ->
let ghcPrim = fromJust (simpleParse "GHC.Prim")
ems = filter (ghcPrim /=) (exposedModules lib)
lib' = lib { exposedModules = ems }
in pd { library = Just lib' }
Nothing ->
error "Expected a library, but none found"
| otherwise = pd
in f pd' lbi us flags
modHook relocatableBuild f pd lbi us flags
= do let verbosity = normal
idts = updateInstallDirTemplates relocatableBuild
myPrefix myLibdir myDocdir
(installDirTemplates lbi)
progs = withPrograms lbi
stripProgram' = stripProgram {
programFindLocation = \_ _ -> return (Just strip) }
progs' <- configureProgram verbosity stripProgram' progs
let lbi' = lbi {
withPrograms = progs',
installDirTemplates = idts,
configFlags = cfg,
stripLibs = fromFlag (configStripLibs cfg),
withSharedLib = withSharedLibs
}
-- This hack allows to interpret the "strip"
-- command-line argument being set to ':' to signify
-- disabled library stripping
cfg | strip == ":" = (configFlags lbi) { configStripLibs = toFlag False }
| otherwise = configFlags lbi
f pd lbi' us flags | 2,519 | false | true | 0 | 19 | 1,290 | 540 | 266 | 274 | null | null |
chadbrewbaker/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkBashisms6 = verify checkBashisms "[ \"$a\" == 42 ]" | 61 | prop_checkBashisms6 = verify checkBashisms "[ \"$a\" == 42 ]" | 61 | prop_checkBashisms6 = verify checkBashisms "[ \"$a\" == 42 ]" | 61 | false | false | 0 | 5 | 8 | 11 | 5 | 6 | null | null |
narrative/stack | src/Stack/Build/Execute.hs | bsd-3-clause | primaryComponentOptions :: LocalPackage -> [String]
primaryComponentOptions lp = concat
[ ["lib:" ++ packageNameString (packageName (lpPackage lp))
-- TODO: get this information from target parsing instead,
-- which will allow users to turn off library building if
-- desired
| packageHasLibrary (lpPackage lp)]
, map (T.unpack . T.append "exe:") $ Set.toList $ exesToBuild lp
] | 414 | primaryComponentOptions :: LocalPackage -> [String]
primaryComponentOptions lp = concat
[ ["lib:" ++ packageNameString (packageName (lpPackage lp))
-- TODO: get this information from target parsing instead,
-- which will allow users to turn off library building if
-- desired
| packageHasLibrary (lpPackage lp)]
, map (T.unpack . T.append "exe:") $ Set.toList $ exesToBuild lp
] | 414 | primaryComponentOptions lp = concat
[ ["lib:" ++ packageNameString (packageName (lpPackage lp))
-- TODO: get this information from target parsing instead,
-- which will allow users to turn off library building if
-- desired
| packageHasLibrary (lpPackage lp)]
, map (T.unpack . T.append "exe:") $ Set.toList $ exesToBuild lp
] | 362 | false | true | 0 | 12 | 89 | 98 | 50 | 48 | null | null |
clockworkdevstudio/Idlewild-Lang | Semantics.hs | bsd-2-clause | expressionIsLabel :: Statement -> Bool
expressionIsLabel (Statement {statementID = STATEMENT_EXPRESSION,statementContents=(expression:_)}) =
expressionIsLabel expression | 171 | expressionIsLabel :: Statement -> Bool
expressionIsLabel (Statement {statementID = STATEMENT_EXPRESSION,statementContents=(expression:_)}) =
expressionIsLabel expression | 171 | expressionIsLabel (Statement {statementID = STATEMENT_EXPRESSION,statementContents=(expression:_)}) =
expressionIsLabel expression | 132 | false | true | 0 | 11 | 14 | 46 | 25 | 21 | null | null |
rueshyna/gogol | gogol-admin-reports/gen/Network/Google/Resource/Reports/Activities/Watch.hs | mpl-2.0 | -- | Return events which occured at or after this time.
awStartTime :: Lens' ActivitiesWatch (Maybe Text)
awStartTime
= lens _awStartTime (\ s a -> s{_awStartTime = a}) | 170 | awStartTime :: Lens' ActivitiesWatch (Maybe Text)
awStartTime
= lens _awStartTime (\ s a -> s{_awStartTime = a}) | 114 | awStartTime
= lens _awStartTime (\ s a -> s{_awStartTime = a}) | 64 | true | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
bartavelle/publicsnippets | performanceparsing/05optimize.hs | bsd-3-clause | parseYMD :: Parser Day
parseYMD = do
!y <- decimal <* char '-'
!m <- decimal <* char '-'
!d <- decimal
return $! YearMonthDay y m d ^. from gregorian | 165 | parseYMD :: Parser Day
parseYMD = do
!y <- decimal <* char '-'
!m <- decimal <* char '-'
!d <- decimal
return $! YearMonthDay y m d ^. from gregorian | 165 | parseYMD = do
!y <- decimal <* char '-'
!m <- decimal <* char '-'
!d <- decimal
return $! YearMonthDay y m d ^. from gregorian | 142 | false | true | 1 | 10 | 46 | 77 | 31 | 46 | null | null |
csabahruska/GFXDemo | GLBackend.hs | bsd-3-clause | compileAttribute' (A_Vec3 v) = GLAttribute AT_Vec3 (attrSize v) <$> uploadVectorArray v | 90 | compileAttribute' (A_Vec3 v) = GLAttribute AT_Vec3 (attrSize v) <$> uploadVectorArray v | 90 | compileAttribute' (A_Vec3 v) = GLAttribute AT_Vec3 (attrSize v) <$> uploadVectorArray v | 90 | false | false | 0 | 8 | 13 | 33 | 15 | 18 | null | null |
mankyKitty/leesp | src/Main.hs | mit | eqv [List arg1, List arg2] = return
$ Bool
$ (length arg1 == length arg2) && and (zipWith (curry eqvPair) arg1 arg2)
where
eqvPair (x1, x2) = case eqv [x1, x2] of
Left err -> False
Right (Bool val) -> val | 274 | eqv [List arg1, List arg2] = return
$ Bool
$ (length arg1 == length arg2) && and (zipWith (curry eqvPair) arg1 arg2)
where
eqvPair (x1, x2) = case eqv [x1, x2] of
Left err -> False
Right (Bool val) -> val | 274 | eqv [List arg1, List arg2] = return
$ Bool
$ (length arg1 == length arg2) && and (zipWith (curry eqvPair) arg1 arg2)
where
eqvPair (x1, x2) = case eqv [x1, x2] of
Left err -> False
Right (Bool val) -> val | 274 | false | false | 4 | 10 | 110 | 124 | 58 | 66 | null | null |
beala/jsondiff | src/Main.hs | apache-2.0 | prettyPrintDiffs (Right ds) = unlines $ fmap prettyPrintDiff ds | 67 | prettyPrintDiffs (Right ds) = unlines $ fmap prettyPrintDiff ds | 67 | prettyPrintDiffs (Right ds) = unlines $ fmap prettyPrintDiff ds | 67 | false | false | 0 | 6 | 12 | 25 | 11 | 14 | null | null |
jgardella/nancy | src/Nancy/Core/Language.hs | mit | mapExpr f (Bang bangExpr bangTrail) =
Bang (f bangExpr) bangTrail | 67 | mapExpr f (Bang bangExpr bangTrail) =
Bang (f bangExpr) bangTrail | 67 | mapExpr f (Bang bangExpr bangTrail) =
Bang (f bangExpr) bangTrail | 67 | false | false | 0 | 7 | 11 | 30 | 14 | 16 | null | null |
vTurbine/ghc | compiler/nativeGen/RegAlloc/Graph/Main.hs | bsd-3-clause | seqNode :: Color.Node VirtualReg RegClass RealReg -> ()
seqNode node
= seqVirtualReg (Color.nodeId node)
`seq` seqRegClass (Color.nodeClass node)
`seq` seqMaybeRealReg (Color.nodeColor node)
`seq` (seqVirtualRegList (nonDetEltsUFM (Color.nodeConflicts node)))
`seq` (seqRealRegList (nonDetEltsUFM (Color.nodeExclusions node)))
`seq` (seqRealRegList (Color.nodePreference node))
`seq` (seqVirtualRegList (nonDetEltsUFM (Color.nodeCoalesce node))) | 520 | seqNode :: Color.Node VirtualReg RegClass RealReg -> ()
seqNode node
= seqVirtualReg (Color.nodeId node)
`seq` seqRegClass (Color.nodeClass node)
`seq` seqMaybeRealReg (Color.nodeColor node)
`seq` (seqVirtualRegList (nonDetEltsUFM (Color.nodeConflicts node)))
`seq` (seqRealRegList (nonDetEltsUFM (Color.nodeExclusions node)))
`seq` (seqRealRegList (Color.nodePreference node))
`seq` (seqVirtualRegList (nonDetEltsUFM (Color.nodeCoalesce node))) | 520 | seqNode node
= seqVirtualReg (Color.nodeId node)
`seq` seqRegClass (Color.nodeClass node)
`seq` seqMaybeRealReg (Color.nodeColor node)
`seq` (seqVirtualRegList (nonDetEltsUFM (Color.nodeConflicts node)))
`seq` (seqRealRegList (nonDetEltsUFM (Color.nodeExclusions node)))
`seq` (seqRealRegList (Color.nodePreference node))
`seq` (seqVirtualRegList (nonDetEltsUFM (Color.nodeCoalesce node))) | 464 | false | true | 0 | 13 | 115 | 196 | 97 | 99 | null | null |
markuspf/Idris-dev | src/Idris/IBC.hs | bsd-3-clause | writePkgIndex :: FilePath -> Idris ()
writePkgIndex f
= do i <- getIState
let imps = map (\ (x, y) -> (True, x)) $ idris_imported i
logIBC 2 $ "Writing package index " ++ show f ++ " including\n" ++
show (map snd imps)
resetNameIdx
let ibcf = initIBC { ibc_imports = imps }
idrisCatch (do runIO $ createDirectoryIfMissing True (dropFileName f)
writeArchive f ibcf
logIBC 2 "Written")
(\c -> do logIBC 2 $ "Failed " ++ pshow i c)
return () | 572 | writePkgIndex :: FilePath -> Idris ()
writePkgIndex f
= do i <- getIState
let imps = map (\ (x, y) -> (True, x)) $ idris_imported i
logIBC 2 $ "Writing package index " ++ show f ++ " including\n" ++
show (map snd imps)
resetNameIdx
let ibcf = initIBC { ibc_imports = imps }
idrisCatch (do runIO $ createDirectoryIfMissing True (dropFileName f)
writeArchive f ibcf
logIBC 2 "Written")
(\c -> do logIBC 2 $ "Failed " ++ pshow i c)
return () | 572 | writePkgIndex f
= do i <- getIState
let imps = map (\ (x, y) -> (True, x)) $ idris_imported i
logIBC 2 $ "Writing package index " ++ show f ++ " including\n" ++
show (map snd imps)
resetNameIdx
let ibcf = initIBC { ibc_imports = imps }
idrisCatch (do runIO $ createDirectoryIfMissing True (dropFileName f)
writeArchive f ibcf
logIBC 2 "Written")
(\c -> do logIBC 2 $ "Failed " ++ pshow i c)
return () | 534 | false | true | 0 | 15 | 215 | 210 | 97 | 113 | null | null |
DaMSL/K3 | src/Language/K3/TypeSystem/Simplification/Common.hs | apache-2.0 | -- |Evaluates a computation which simplifies a value, producing a writer-monadic
-- result.
runConfigSimplifyM :: SimplificationConfig -> SimplifyM a
-> Writer SimplificationResult a
runConfigSimplifyM cfg x =
let (y,w) = runReader (runWriterT x) cfg in tell w >> return y | 294 | runConfigSimplifyM :: SimplificationConfig -> SimplifyM a
-> Writer SimplificationResult a
runConfigSimplifyM cfg x =
let (y,w) = runReader (runWriterT x) cfg in tell w >> return y | 201 | runConfigSimplifyM cfg x =
let (y,w) = runReader (runWriterT x) cfg in tell w >> return y | 91 | true | true | 0 | 11 | 61 | 73 | 35 | 38 | null | null |
urbanslug/ghc | compiler/main/DynFlags.hs | bsd-3-clause | -- Adds a newline
defaultLogActionHPutStrDoc :: DynFlags -> Handle -> SDoc -> PprStyle -> IO ()
defaultLogActionHPutStrDoc dflags h d sty
= Pretty.printDoc_ Pretty.PageMode (pprCols dflags) h doc
where -- Don't add a newline at the end, so that successive
-- calls to this log-action can output all on the same line
doc = runSDoc d (initSDocContext dflags sty) | 381 | defaultLogActionHPutStrDoc :: DynFlags -> Handle -> SDoc -> PprStyle -> IO ()
defaultLogActionHPutStrDoc dflags h d sty
= Pretty.printDoc_ Pretty.PageMode (pprCols dflags) h doc
where -- Don't add a newline at the end, so that successive
-- calls to this log-action can output all on the same line
doc = runSDoc d (initSDocContext dflags sty) | 362 | defaultLogActionHPutStrDoc dflags h d sty
= Pretty.printDoc_ Pretty.PageMode (pprCols dflags) h doc
where -- Don't add a newline at the end, so that successive
-- calls to this log-action can output all on the same line
doc = runSDoc d (initSDocContext dflags sty) | 284 | true | true | 1 | 10 | 79 | 87 | 42 | 45 | null | null |
drets/scheme-haskell-48h | src/Scheme/Eval.hs | bsd-3-clause | stringAppend :: [LispValue] -> ThrowsError LispValue
stringAppend strs
| all (toBool . isString) strs = return $ String (concatStrs strs)
| otherwise = throwError $ Default "should be all strings" | 200 | stringAppend :: [LispValue] -> ThrowsError LispValue
stringAppend strs
| all (toBool . isString) strs = return $ String (concatStrs strs)
| otherwise = throwError $ Default "should be all strings" | 200 | stringAppend strs
| all (toBool . isString) strs = return $ String (concatStrs strs)
| otherwise = throwError $ Default "should be all strings" | 147 | false | true | 1 | 10 | 33 | 69 | 33 | 36 | null | null |
GaloisInc/halvm-ghc | compiler/hsSyn/HsUtils.hs | bsd-3-clause | collect_bind :: Bool -> HsBindLR idL idR -> [idL] -> [idL]
collect_bind _ (PatBind { pat_lhs = p }) acc = collect_lpat p acc | 134 | collect_bind :: Bool -> HsBindLR idL idR -> [idL] -> [idL]
collect_bind _ (PatBind { pat_lhs = p }) acc = collect_lpat p acc | 134 | collect_bind _ (PatBind { pat_lhs = p }) acc = collect_lpat p acc | 75 | false | true | 3 | 13 | 33 | 66 | 31 | 35 | null | null |
wfleming/advent-of-code-2016 | 2016/test/D16Spec.hs | bsd-3-clause | main :: IO ()
main = hspec spec | 31 | main :: IO ()
main = hspec spec | 31 | main = hspec spec | 17 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
paulp/unison | parser-typechecker/src/Unison/Var.hs | mit | freshInBoth :: Var v => Set v -> Set v -> v -> v
freshInBoth vs1 vs2 = freshIn vs1 . freshIn vs2 | 96 | freshInBoth :: Var v => Set v -> Set v -> v -> v
freshInBoth vs1 vs2 = freshIn vs1 . freshIn vs2 | 96 | freshInBoth vs1 vs2 = freshIn vs1 . freshIn vs2 | 47 | false | true | 0 | 8 | 22 | 51 | 23 | 28 | null | null |
keithodulaigh/Hets | OMDoc/Import.hs | gpl-2.0 | readLib :: ImpEnv -- ^ The import environment
-> IRI -- ^ The url of the OMDoc file
-> ResultT IO (ImpEnv, LibName, DGraph)
readLib e u = do
rPut e $ "Downloading " ++ show u ++ " ..."
xmlString <- lift $ readFromURL readXmlFile u
OMDoc n l <- ResultT $ xmlIn xmlString
{- the name of the omdoc is used as the libname, no relationship between the
libname and the filepath! -}
let ln = libNameFromURL n u
rPut e $ "Importing library " ++ show ln
(e', dg) <- foldM (addTLToDGraph ln) (e, emptyDG) l
rPut e $ "... loaded " ++ show u
return (addDGToEnv e' ln dg, ln, dg)
-- | Adds the Theory in the OMCD and the containing lib to the environment | 678 | readLib :: ImpEnv -- ^ The import environment
-> IRI -- ^ The url of the OMDoc file
-> ResultT IO (ImpEnv, LibName, DGraph)
readLib e u = do
rPut e $ "Downloading " ++ show u ++ " ..."
xmlString <- lift $ readFromURL readXmlFile u
OMDoc n l <- ResultT $ xmlIn xmlString
{- the name of the omdoc is used as the libname, no relationship between the
libname and the filepath! -}
let ln = libNameFromURL n u
rPut e $ "Importing library " ++ show ln
(e', dg) <- foldM (addTLToDGraph ln) (e, emptyDG) l
rPut e $ "... loaded " ++ show u
return (addDGToEnv e' ln dg, ln, dg)
-- | Adds the Theory in the OMCD and the containing lib to the environment | 678 | readLib e u = do
rPut e $ "Downloading " ++ show u ++ " ..."
xmlString <- lift $ readFromURL readXmlFile u
OMDoc n l <- ResultT $ xmlIn xmlString
{- the name of the omdoc is used as the libname, no relationship between the
libname and the filepath! -}
let ln = libNameFromURL n u
rPut e $ "Importing library " ++ show ln
(e', dg) <- foldM (addTLToDGraph ln) (e, emptyDG) l
rPut e $ "... loaded " ++ show u
return (addDGToEnv e' ln dg, ln, dg)
-- | Adds the Theory in the OMCD and the containing lib to the environment | 538 | false | true | 0 | 11 | 166 | 205 | 97 | 108 | null | null |
uduki/hsQt | Qtc/ClassTypes/Gui.hs | bsd-2-clause | qCast_QDial :: Object a -> IO (QDial ())
qCast_QDial _qobj
= return (objectCast _qobj) | 88 | qCast_QDial :: Object a -> IO (QDial ())
qCast_QDial _qobj
= return (objectCast _qobj) | 88 | qCast_QDial _qobj
= return (objectCast _qobj) | 47 | false | true | 0 | 10 | 15 | 46 | 20 | 26 | null | null |
acowley/ghc | compiler/utils/Outputable.hs | bsd-3-clause | speakN :: Int -> SDoc
speakN 0 = ptext (sLit "none") | 52 | speakN :: Int -> SDoc
speakN 0 = ptext (sLit "none") | 52 | speakN 0 = ptext (sLit "none") | 30 | false | true | 0 | 7 | 10 | 31 | 14 | 17 | null | null |
ingemaradahl/bilder | src/Compiler/Utils.hs | lgpl-3.0 | -- | Find all referenced variables in an expression.
expVars ∷ Exp → [String]
expVars = foldExp expVar []
where
expVar ∷ [String] → Exp → [String]
expVar p (ECall cid es) = concatMap expVars es ++ cIdentToString cid : p
expVar p (EVar cid) = cIdentToString cid : p
expVar p (ECurryCall cid e _) = expVars e ++ cIdentToString cid : p
expVar p (EIndex cid e) = expVars e ++ cIdentToString cid : p
expVar p (EIndexDouble cid e1 e2) = expVars e1 ++ expVars e2 ++ cIdentToString cid : p
expVar p _ = p | 511 | expVars ∷ Exp → [String]
expVars = foldExp expVar []
where
expVar ∷ [String] → Exp → [String]
expVar p (ECall cid es) = concatMap expVars es ++ cIdentToString cid : p
expVar p (EVar cid) = cIdentToString cid : p
expVar p (ECurryCall cid e _) = expVars e ++ cIdentToString cid : p
expVar p (EIndex cid e) = expVars e ++ cIdentToString cid : p
expVar p (EIndexDouble cid e1 e2) = expVars e1 ++ expVars e2 ++ cIdentToString cid : p
expVar p _ = p | 458 | expVars = foldExp expVar []
where
expVar ∷ [String] → Exp → [String]
expVar p (ECall cid es) = concatMap expVars es ++ cIdentToString cid : p
expVar p (EVar cid) = cIdentToString cid : p
expVar p (ECurryCall cid e _) = expVars e ++ cIdentToString cid : p
expVar p (EIndex cid e) = expVars e ++ cIdentToString cid : p
expVar p (EIndexDouble cid e1 e2) = expVars e1 ++ expVars e2 ++ cIdentToString cid : p
expVar p _ = p | 433 | true | true | 0 | 8 | 113 | 222 | 108 | 114 | null | null |
mettekou/ghc | compiler/basicTypes/Id.hs | bsd-3-clause | -- TyVars count as not dead
{-
************************************************************************
* *
Evidence variables
* *
************************************************************************
-}
isEvVar :: Var -> Bool
isEvVar var = isPredTy (varType var) | 420 | isEvVar :: Var -> Bool
isEvVar var = isPredTy (varType var) | 59 | isEvVar var = isPredTy (varType var) | 36 | true | true | 0 | 7 | 180 | 29 | 15 | 14 | null | null |
ku-fpg/ecc-ldpc | src/Data/Matrix/QuasiCyclic.hs | bsd-3-clause | bitM :: Matrix Bool
bitM = fromLists [[False,True,False,True,True,False],[False,False,True,False,True,True],[True,False,False,True,False,True]] | 143 | bitM :: Matrix Bool
bitM = fromLists [[False,True,False,True,True,False],[False,False,True,False,True,True],[True,False,False,True,False,True]] | 143 | bitM = fromLists [[False,True,False,True,True,False],[False,False,True,False,True,True],[True,False,False,True,False,True]] | 123 | false | true | 0 | 6 | 7 | 85 | 51 | 34 | null | null |
keithodulaigh/Hets | ToHaskell/test/Pair.hascasl.hs | gpl-2.0 | f (a, b) = Pair (a, b) | 22 | f (a, b) = Pair (a, b) | 22 | f (a, b) = Pair (a, b) | 22 | false | false | 0 | 6 | 6 | 25 | 13 | 12 | null | null |
bixuanzju/fcore | lib/newlib/TransEnvironment.hs | bsd-2-clause | multiSubst :: Tele -> Expr -> Expr -> (Tele, Expr)
multiSubst Empty _ e = (Empty, e) | 84 | multiSubst :: Tele -> Expr -> Expr -> (Tele, Expr)
multiSubst Empty _ e = (Empty, e) | 84 | multiSubst Empty _ e = (Empty, e) | 33 | false | true | 0 | 8 | 16 | 42 | 23 | 19 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | ppr_expr (HsSpliceE t s) = pprSplice t s | 46 | ppr_expr (HsSpliceE t s) = pprSplice t s | 46 | ppr_expr (HsSpliceE t s) = pprSplice t s | 46 | false | false | 0 | 6 | 13 | 23 | 10 | 13 | null | null |
amccausl/Swish | Swish/HaskellRDF/RDFGraphTest.hs | lgpl-2.1 | testClass52 = testClass "testClass52" altIsXmlLit ba1 False | 64 | testClass52 = testClass "testClass52" altIsXmlLit ba1 False | 64 | testClass52 = testClass "testClass52" altIsXmlLit ba1 False | 64 | false | false | 0 | 5 | 11 | 15 | 7 | 8 | null | null |
bitemyapp/github | Github/Issues.hs | bsd-3-clause | -- | Details on a specific issue, given the repo owner and name, and the issue
-- number.'
--
-- > issue' (Just ("github-username", "github-password")) "thoughtbot" "paperclip" "462"
issue' :: Maybe GithubAuth -> String -> String -> Int -> IO (Either Error Issue)
issue' auth user reqRepoName reqIssueNumber =
githubGet' auth ["repos", user, reqRepoName, "issues", show reqIssueNumber] | 387 | issue' :: Maybe GithubAuth -> String -> String -> Int -> IO (Either Error Issue)
issue' auth user reqRepoName reqIssueNumber =
githubGet' auth ["repos", user, reqRepoName, "issues", show reqIssueNumber] | 204 | issue' auth user reqRepoName reqIssueNumber =
githubGet' auth ["repos", user, reqRepoName, "issues", show reqIssueNumber] | 123 | true | true | 0 | 11 | 58 | 77 | 41 | 36 | null | null |
guilt/webify | src/TTF.hs | mit | parseHMetric :: Get HMetric
parseHMetric = do
advanceWidth <- getUFWord
lsb <- getFWord
return HMetric{..} | 112 | parseHMetric :: Get HMetric
parseHMetric = do
advanceWidth <- getUFWord
lsb <- getFWord
return HMetric{..} | 112 | parseHMetric = do
advanceWidth <- getUFWord
lsb <- getFWord
return HMetric{..} | 84 | false | true | 0 | 8 | 20 | 39 | 18 | 21 | null | null |
rimmington/cabal | Cabal/Distribution/Simple/Setup.hs | bsd-3-clause | defaultTestFlags :: TestFlags
defaultTestFlags = TestFlags {
testDistPref = NoFlag,
testVerbosity = Flag normal,
testHumanLog = toFlag $ toPathTemplate $ "$pkgid-$test-suite.log",
testMachineLog = toFlag $ toPathTemplate $ "$pkgid.log",
testShowDetails = toFlag Failures,
testKeepTix = toFlag False,
testOptions = []
} | 366 | defaultTestFlags :: TestFlags
defaultTestFlags = TestFlags {
testDistPref = NoFlag,
testVerbosity = Flag normal,
testHumanLog = toFlag $ toPathTemplate $ "$pkgid-$test-suite.log",
testMachineLog = toFlag $ toPathTemplate $ "$pkgid.log",
testShowDetails = toFlag Failures,
testKeepTix = toFlag False,
testOptions = []
} | 366 | defaultTestFlags = TestFlags {
testDistPref = NoFlag,
testVerbosity = Flag normal,
testHumanLog = toFlag $ toPathTemplate $ "$pkgid-$test-suite.log",
testMachineLog = toFlag $ toPathTemplate $ "$pkgid.log",
testShowDetails = toFlag Failures,
testKeepTix = toFlag False,
testOptions = []
} | 336 | false | true | 0 | 8 | 87 | 82 | 47 | 35 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/simplCore/SimplMonad.hs | bsd-3-clause | returnSmpl :: a -> SimplM a
returnSmpl e = SM (\_st_env us sc -> return (e, us, sc)) | 84 | returnSmpl :: a -> SimplM a
returnSmpl e = SM (\_st_env us sc -> return (e, us, sc)) | 84 | returnSmpl e = SM (\_st_env us sc -> return (e, us, sc)) | 56 | false | true | 0 | 9 | 17 | 48 | 25 | 23 | null | null |
bacchanalia/KitchenSink | KitchenSink/Qualified.hs | gpl-3.0 | -- |'VU.enumFromTo'
vu_enumFromTo = VU.enumFromTo | 49 | vu_enumFromTo = VU.enumFromTo | 29 | vu_enumFromTo = VU.enumFromTo | 29 | true | false | 0 | 5 | 4 | 9 | 5 | 4 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.