ghc-lib-0.20201101: 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 DataConAppContext Source #

Context for a DataCon application with a hole for every field, including surrounding coercions. The result of deepSplitProductType_maybe and deepSplitCprType_maybe.

Example:

DataConAppContext Just [Int] [(Lazy, Int)] (co :: Maybe Int ~ First Int)

represents

Just @Int (_1 :: Int) |> co :: First Int

where _1 is a hole for the first argument. The number of arguments is determined by the length of arg_tys.

wantToUnbox :: FamInstEnvs -> Bool -> Type -> Demand -> Maybe ([Demand], DataConAppContext) Source #