HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleghc-9.10.3GHC2021

GHC.Core.Coercion.Axiom

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

  • 11 types
  • 27 values
  • Packageghc-9.10.3
  • Exports38
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceAxiom.hs
datadata CoAxiom (br :: BranchFlag)
#

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

Instances5Eq, Data, NamedThing, Outputable, Uniquable
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
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, Outputable, Binary, Anno, …
  • Eq RoleDefined in ghc-9.10.3 · Language.Haskell.Syntax.Basic
  • Data RoleDefined in ghc-9.10.3 · Language.Haskell.Syntax.Basic
  • Ord RoleDefined in ghc-9.10.3 · Language.Haskell.Syntax.Basic
  • Outputable RoleDefined in ghc-9.10.3 · GHC.Core.Coercion.Axiom · orphan
  • Binary RoleDefined in ghc-9.10.3 · GHC.Core.Coercion.Axiom · orphan
  • type Anno (Maybe Role) = EpAnnCODefined in ghc-9.10.3 · GHC.Hs.Decls · orphan
  • type Anno (Maybe Role) = EpAnnCODefined in ghc-9.10.3 · GHC.Hs.Decls · orphan
datadata CoAxiomRule
#

For now, we work only with nominal equality.

Constructors

Instances5Eq, Data, Ord, Outputable, Uniquable

Orphan instances

2 instances