ghc-lib-0.20210228: The GHC API, decoupled from GHC versions
Safe HaskellNone
LanguageHaskell2010

GHC.Core.Opt.WorkWrap.Utils

Synopsis

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 #

mkWorkerArgs :: DynFlags -> [Var] -> Type -> ([Var], [Var]) 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?])

Constructors

DataConPatContext 

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 #