GHC.Types.Cpr
Types for the Constructed Product Result lattice.
GHC.Core.Opt.CprAnal and GHC.Core.Opt.WorkWrap.Utils
are its primary customers via idCprSig
.
Documentation
flatConCpr :: ConTag -> Cpr Source #
The abstract domain
Constructors
CprType | |
topCprType :: CprType Source #
botCprType :: CprType Source #
flatConCprType :: ConTag -> CprType Source #
abstractCprTy :: CprType -> CprType Source #
data UnpackConFieldsResult Source #
The result of unpackConFieldsCpr
.
Constructors
AllFieldsSame !Cpr | |
ForeachField ![Cpr] |
unpackConFieldsCpr :: DataCon -> Cpr -> UnpackConFieldsResult Source #
Unpacks a ConCpr
-shaped Cpr
and returns the field Cpr
s wrapped in a
ForeachField
. Otherwise, it returns AllFieldsSame
with the appropriate
Cpr
to assume for each field.
The use of UnpackConFieldsResult
allows O(1) space for the common,
non-ConCpr
case.
The arity of the wrapped CprType
is the arity at which it is safe
to unleash. See Note [Understanding DmdType and DmdSig] in GHC.Types.Demand
isTopCprSig :: CprSig -> Bool Source #
mkCprSigForArity :: Arity -> CprType -> CprSig Source #
Turns a CprType
computed for the particular Arity
into a CprSig
unleashable at that arity. See Note [Understanding DmdType and DmdSig] in
GHC.Types.Demand