HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Moduleghc-lib-parser-9.14.1.20251220GHC2021

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.

  • 4 types
  • 18 values
datadata Cpr
#
Instances3Eq, Outputable, Binary
  • Eq CprDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.Cpr
  • Outputable CprDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.Cpr

    BNF:

    cpr ::= ''                               -- TopCpr
         |  n                                -- FlatConCpr n
         |  n '(' cpr1 ',' cpr2 ',' ... ')'  -- ConCpr n [cpr1,cpr2,...]
         |  'b'                              -- BotCpr

    Examples: * `f x = f x` has result CPR b * `1(1,)` is a valid (nested) Cpr denotation for `(I# 42#, f 42)`.

  • Binary CprDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.Cpr
datadata CprType
#

The abstract domain A_t from the original 'CPR for Haskell' paper.

Constructors

Instances3Eq, Outputable, Binary
  • Eq CprTypeDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.Cpr
  • Outputable CprTypeDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.Cpr

    BNF:

    cpr_ty ::= cpr               -- short form if arty == 0
            |  '\' arty '.' cpr  -- if arty > 0

    Examples: * `f x y z = f x y z` has denotation `3.b` * `g !x = (x+1, x+2)` has denotation `1.1(1,1)`.

  • Binary CprTypeDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.Cpr
newtypenewtype CprSig
#

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

Constructors

Instances3Eq, Outputable, Binary
  • Eq CprSigDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.Cpr
  • Outputable CprSigDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.Cpr

    Only print the CPR result

  • Binary CprSigDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Types.Cpr