HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Modulebase-compat-0.15.0Haskell2010

Data.Type.Coercion.Compat

Synopsis
valuerepr :: a :~: b -> Coercion a b

Convert propositional (nominal) equality to representational equality

datadata Coercion (a :: k) (b :: k) where

Representational equality. If Coercion a b is inhabited by some terminating value, then the type a has the same underlying representation as the type b.

To use this equality in practice, pattern-match on the Coercion a b to get out the Coercible a b instance, and then use coerce to apply it.

Constructors

Instances9Category, TestCoercion, Bounded, Enum, Eq, Data, …
  • Category CoercionDefined in ghc-internal-10.0.0 · GHC.Internal.Control.Category
  • TestCoercion (Coercion a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.Coercion
  • Coercible a b => Bounded (Coercion a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.Coercion
  • Coercible a b => Enum (Coercion a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.Coercion
  • Eq (Coercion a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.Coercion
  • (Coercible a b, Data a, Data b) => Data (Coercion a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Data
  • Ord (Coercion a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.Coercion
  • Coercible a b => Read (Coercion a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.Coercion
  • Show (Coercion a b)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Type.Coercion
classclass TestCoercion (f :: k -> Type) where

This class contains types where you can learn the equality of two types from information contained in terms. Typically, only singleton types should inhabit this class.

Methods

Instances6TestCoercion