ghc-9.2.0.20210331: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Core.Opt.WorkWrap.Utils

Synopsis

Documentation

mkWwBodies :: DynFlags -> FamInstEnvs -> VarSet -> Id -> [Demand] -> Cpr -> UniqSM (Maybe WwResult) Source #

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

Constructors

DataConPatContext 

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).

Constructors

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 DataConPatContext carries the bits necessary for instantiation with dataConRepInstPat. The [s] carries the bits of information with which we can continue unboxing, e.g. s will be Demand.

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?].