Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- mkWwBodies :: DynFlags -> FamInstEnvs -> VarSet -> Id -> [Demand] -> Cpr -> UniqSM (Maybe WwResult)
- mkWWstr :: DynFlags -> FamInstEnvs -> Bool -> [Var] -> UniqSM (Bool, [Var], CoreExpr -> CoreExpr, CoreExpr -> CoreExpr)
- mkWorkerArgs :: DynFlags -> [Var] -> Type -> ([Var], [Var])
- data DataConPatContext = DataConPatContext {}
- data UnboxingDecision s
- = StopUnboxing
- | Unbox !DataConPatContext [s]
- splitArgType_maybe :: FamInstEnvs -> Type -> Maybe DataConPatContext
- wantToUnbox :: FamInstEnvs -> Bool -> Type -> Demand -> UnboxingDecision Demand
- findTypeShape :: FamInstEnvs -> Type -> TypeShape
- isWorkerSmallEnough :: DynFlags -> Int -> [Var] -> Bool
Documentation
mkWwBodies :: DynFlags -> FamInstEnvs -> VarSet -> Id -> [Demand] -> Cpr -> UniqSM (Maybe WwResult) Source #
mkWWstr :: DynFlags -> FamInstEnvs -> Bool -> [Var] -> UniqSM (Bool, [Var], CoreExpr -> CoreExpr, CoreExpr -> CoreExpr) Source #
data DataConPatContext Source #
The information needed to build a pattern for a DataCon to be unboxed.
The pattern can be generated from dcpc_dc
and dcpc_tc_args
via
dataConRepInstPat
. The coercion dcpc_co
is for newtype
wrappers.
If we get DataConPatContext dc tys co
for some type ty
and dataConRepInstPat ... dc tys = (exs, flds)
, then
dc
exs flds :: T tys@co :: T tys ~ ty
data UnboxingDecision s Source #
Describes the outer shape of an argument to be unboxed or left as-is
Depending on how s
is instantiated (e.g., Demand
).
StopUnboxing | We ran out of strictness info. Leave untouched. |
Unbox !DataConPatContext [s] | The argument is used strictly or the returned product was constructed, so
unbox it.
The |
splitArgType_maybe :: FamInstEnvs -> Type -> Maybe DataConPatContext Source #
If splitArgType_maybe ty = Just (dc, tys, co)
then dc @tys @_ex_tys (_args::_arg_tys) :: tc tys
and co :: ty ~ tc tys
where underscore prefixes are holes, e.g. yet unspecified.
See Note [Which types are unboxed?].
wantToUnbox :: FamInstEnvs -> Bool -> Type -> Demand -> UnboxingDecision Demand Source #
findTypeShape :: FamInstEnvs -> Type -> TypeShape Source #