Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- mkWwBodies :: DynFlags -> FamInstEnvs -> VarSet -> Id -> [Demand] -> CprResult -> UniqSM (Maybe WwResult)
- mkWWstr :: DynFlags -> FamInstEnvs -> Bool -> [Var] -> UniqSM (Bool, [Var], CoreExpr -> CoreExpr, CoreExpr -> CoreExpr)
- mkWorkerArgs :: DynFlags -> [Var] -> Type -> ([Var], [Var])
- data DataConPatContext = DataConPatContext {}
- splitArgType_maybe :: FamInstEnvs -> Type -> Maybe DataConPatContext
- wantToUnbox :: FamInstEnvs -> Bool -> Type -> Demand -> Maybe ([Demand], DataConPatContext)
- findTypeShape :: FamInstEnvs -> Type -> TypeShape
- isWorkerSmallEnough :: DynFlags -> Int -> [Var] -> Bool
Documentation
mkWwBodies :: DynFlags -> FamInstEnvs -> VarSet -> Id -> [Demand] -> CprResult -> UniqSM (Maybe WwResult) Source #
mkWWstr :: DynFlags -> FamInstEnvs -> Bool -> [Var] -> UniqSM (Bool, [Var], CoreExpr -> CoreExpr, CoreExpr -> CoreExpr) Source #
data DataConPatContext Source #
The result of splitArgType_maybe
and splitResultType_maybe
.
Both splits
* Take a type ty
* Succeed with (DataConPatContext dc tys co)
iff co :: T tys ~ ty
and dc
is the appropriate DataCon of T
and T
is suitable for the kind of split
(differs for strictness and CPR, see Note [Which types are unboxed?])
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 -> Maybe ([Demand], DataConPatContext) Source #
findTypeShape :: FamInstEnvs -> Type -> TypeShape Source #