Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Types for the Constructed Product Result lattice. GHC.Core.Opt.CprAnal and GHC.Core.Opt.WorkWrap.Utils
are its primary customers via idCprInfo
.
Synopsis
- data CprResult
- topCpr :: CprResult
- botCpr :: CprResult
- conCpr :: ConTag -> CprResult
- asConCpr :: CprResult -> Maybe ConTag
- data CprType = CprType {}
- topCprType :: CprType
- botCprType :: CprType
- conCprType :: ConTag -> CprType
- lubCprType :: CprType -> CprType -> CprType
- applyCprTy :: CprType -> Arity -> CprType
- abstractCprTy :: CprType -> CprType
- ensureCprTyArity :: Arity -> CprType -> CprType
- trimCprTy :: CprType -> CprType
- newtype CprSig = CprSig {}
- topCprSig :: CprSig
- mkCprSigForArity :: Arity -> CprType -> CprSig
- mkCprSig :: Arity -> CprResult -> CprSig
- seqCprSig :: CprSig -> ()
Documentation
The constructed product result lattice.
NoCPR | ConCPR ConTag | BotCPR
The abstract domain \(A_t\) from the original 'CPR for Haskell' paper.
topCprType :: CprType Source #
botCprType :: CprType Source #
conCprType :: ConTag -> CprType Source #
abstractCprTy :: CprType -> CprType Source #
The arity of the wrapped CprType
is the arity at which it is safe
to unleash. See Note [Understanding DmdType and StrictSig] in GHC.Types.Demand
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 StrictSig] in
GHC.Types.Demand