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

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Moduleghc-lib-parser-9.14.1.20251220GHC2021

GHC.Core.Coercion.Axiom

Module for coercion axioms, used to represent type family instances and newtypes

  • 13 types
  • 31 values
datadata CoAxiom (br :: BranchFlag)
#

A CoAxiom is a "coercion constructor", i.e. a named equality axiom.

Instances5Eq, Data, Uniquable, Outputable, NamedThing
  • Eq (CoAxiom br)Defined in ghc-lib-parser-9.14.1.20251220 · GHC.Core.Coercion.Axiom
  • Typeable br => Data (CoAxiom br)Defined in ghc-lib-parser-9.14.1.20251220 · GHC.Core.Coercion.Axiom
  • Uniquable (CoAxiom br)Defined in ghc-lib-parser-9.14.1.20251220 · GHC.Core.Coercion.Axiom
  • Outputable (CoAxiom br)Defined in ghc-lib-parser-9.14.1.20251220 · GHC.Core.Coercion.Axiom
  • NamedThing (CoAxiom br)Defined in ghc-lib-parser-9.14.1.20251220 · GHC.Core.Coercion.Axiom
datadata CoAxBranch
#

A branch of a coercion axiom, which provides the evidence for unwrapping a newtype or a type-family reduction step using a single equation.

Constructors

  • CoAxBranch
    • cab_loc :: SrcSpan

      Location of the defining equation See Note [CoAxiom locations]

    • cab_tvs :: [TyVar]

      Bound type variables; not necessarily fresh See Note [CoAxBranch type variables]

    • cab_eta_tvs :: [TyVar]

      Eta-reduced tyvars cab_tvs and cab_lhs may be eta-reduced; see Note [Eta reduction for data families]

    • cab_cvs :: [CoVar]

      Bound coercion variables Always empty, for now. See Note [Constraints in patterns] in GHC.Tc.TyCl

    • cab_roles :: [Role]

      See Note [CoAxBranch roles]

    • cab_lhs :: [Type]

      Type patterns to match against

    • cab_rhs :: Type

      Right-hand side of the equality See Note [CoAxioms are homogeneous]

    • cab_incomps :: [CoAxBranch]

      The previous incompatible branches See Note [Storing compatibility]

Instances2Data, Outputable
  • Data CoAxBranchDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Core.Coercion.Axiom
  • Outputable CoAxBranchDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Core.Coercion.Axiom
datadata Role
#

See Note [Roles] in GHC.Core.Coercion

Order of constructors matters: the Ord instance coincides with the *super*typing relation on roles.

Instances7Eq, Data, Ord, NFData, Outputable, Binary, …
  • Eq RoleDefined in ghc-lib-parser-9.14.1.20251220 · Language.Haskell.Syntax.Basic
  • Data RoleDefined in ghc-lib-parser-9.14.1.20251220 · Language.Haskell.Syntax.Basic
  • Ord RoleDefined in ghc-lib-parser-9.14.1.20251220 · Language.Haskell.Syntax.Basic
  • NFData RoleDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Core.Coercion.Axiom · orphan
  • Outputable RoleDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Core.Coercion.Axiom · orphan
  • Binary RoleDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Core.Coercion.Axiom · orphan
  • type Anno (Maybe Role) = EpAnnCODefined in ghc-lib-parser-9.14.1.20251220 · GHC.Hs.Decls · orphan
datadata CoAxiomRule
#

CoAxiomRule describes a built-in axiom, one that we assume to be true See Note [CoAxiomRule]

Instances3Eq, Data, Outputable
  • Eq CoAxiomRuleDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Core.Coercion.Axiom
  • Data CoAxiomRuleDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Core.Coercion.Axiom
  • Outputable CoAxiomRuleDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Core.Coercion.Axiom

Orphan instances

3 instances