HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleconstraints-0.14.2Haskell2010

Data.Constraint.Deferrable

The idea for this trick comes from Dimitrios Vytiniotis.

  • 3 types
  • 1 class
  • 2 values
  • Packageconstraints-0.14.2
  • Exports6
  • LanguageHaskell2010
  • LicenceBSD-2-Clause
  • SourceDeferrable.hs
classclass Deferrable (p :: Constraint) where
#

Allow an attempt at resolution of a constraint at a later time

Methods

Instances5Deferrable
  • Deferrable ()Defined in constraints-0.14.2 · Data.Constraint.Deferrable
  • (Deferrable a, Deferrable b) => Deferrable (a, b)Defined in constraints-0.14.2 · Data.Constraint.Deferrable
  • (Deferrable a, Deferrable b, Deferrable c) => Deferrable (a, b, c)Defined in constraints-0.14.2 · Data.Constraint.Deferrable
  • (Typeable k, Typeable a, Typeable b) => Deferrable (a ~ b)Defined in constraints-0.14.2 · Data.Constraint.Deferrable

    Deferrable homogeneous equality constraints.

    Note that due to a GHC bug (https:/ghc.haskell.orgtracghcticket/10343), using this instance on GHC 7.10 will only work with *-kinded types.

  • (Typeable i, Typeable j, Typeable a, Typeable b) => Deferrable (a ~~ b)Defined in constraints-0.14.2 · Data.Constraint.Deferrable

    Deferrable heterogenous equality constraints.

    Only available on GHC 8.0 or later.

datadata (:~~:) (a :: k1) (b :: k2) where
#

Kind heterogeneous propositional equality. Like :~:, a :~~: b is inhabited by a terminating value if and only if a is the same type as b.

Constructors

Instances15Category, TestCoercion, TestEquality, NFData2, NFData1, Bounded, …
  • Category (:~~:)Defined in ghc-internal-9.1003.0 · GHC.Internal.Control.Category
  • TestCoercion ((:~~:) a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Coercion
  • TestEquality ((:~~:) a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • NFData2 (:~~:)Defined in deepseq-1.5.0.0 · Control.DeepSeq
  • NFData1 ((:~~:) a)Defined in deepseq-1.5.0.0 · Control.DeepSeq
  • a ~~ b => Bounded (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • a ~~ b => Enum (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • Eq (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • (Typeable i, Typeable j, Typeable a, Typeable b, a ~~ b) => Data (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Ord (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • a ~~ b => Read (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • Show (a :~~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • NFData (a :~~: b)Defined in deepseq-1.5.0.0 · Control.DeepSeq
  • a ~ b => Boring (a :~~: b)Defined in boring-0.2.2 · Data.Boring

    Heterogeneous type equality is Boring too.

  • HasDict (a ~~ b) (a :~~: b)Defined in constraints-0.14.2 · Data.Constraint
datadata (:~:) (a :: k) (b :: k) where
#

Propositional equality. If a :~: b is inhabited by some terminating value, then the type a is the same as the type b. To use this equality in practice, pattern-match on the a :~: b to get out the Refl constructor; in the body of the pattern-match, the compiler knows that a ~ b.

Constructors

Instances15Category, TestCoercion, TestEquality, NFData2, NFData1, Bounded, …
  • Category (:~:)Defined in ghc-internal-9.1003.0 · GHC.Internal.Control.Category
  • TestCoercion ((:~:) a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Coercion
  • TestEquality ((:~:) a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • NFData2 (:~:)Defined in deepseq-1.5.0.0 · Control.DeepSeq
  • NFData1 ((:~:) a)Defined in deepseq-1.5.0.0 · Control.DeepSeq
  • a ~ b => Bounded (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • a ~ b => Enum (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • Eq (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • (a ~ b, Data a) => Data (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Ord (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • a ~ b => Read (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • Show (a :~: b)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Type.Equality
  • NFData (a :~: b)Defined in deepseq-1.5.0.0 · Control.DeepSeq
  • a ~ b => Boring (a :~: b)Defined in boring-0.2.2 · Data.Boring

    Homogeneous type equality is Boring too.

  • HasDict (a ~ b) (a :~: b)Defined in constraints-0.14.2 · Data.Constraint