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

Moduleghc-9.10.3GHC2021

GHC.Core.Predicate

  • 3 types
  • 36 values
  • Packageghc-9.10.3
  • Exports39
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourcePredicate.hs
datadata EqRel
#

A choice of equality relation. This is separate from the type Role because Phantom does not define a (non-trivial) equality relation.

Instances3Eq, Ord, Outputable
  • Eq EqRelDefined in ghc-9.10.3 · GHC.Core.Predicate
  • Ord EqRelDefined in ghc-9.10.3 · GHC.Core.Predicate
  • Outputable EqRelDefined in ghc-9.10.3 · GHC.Core.Predicate
valuemkPrimEqPred :: Type -> Type -> Type
#

Creates a primitive nominal type equality predicate. t1 ~# t2 Invariant: the types are not Coercions

valuemkReprPrimEqPred :: Type -> Type -> Type
#

Creates a primitive representational type equality predicate. t1 ~R# t2 Invariant: the types are not Coercions

valuemkNomPrimEqPred :: Kind -> Type -> Type -> Type
#

Creates a primitive nominal type equality predicate with an explicit (but homogeneous) kind: (~#) k k ty1 ty2

valuementionsIP
  1. :: (Type -> Bool)

    predicate on the string

  2. -> (Type -> Bool)

    predicate on the type

  3. -> Class
  4. -> [Type]
  5. -> Bool
#

mentionsIP str_cond ty_cond cls tys returns True if:

  • cls tys is of the form IP str ty, where str_cond str and ty_cond ty are both True,

  • or any superclass of cls tys has this property.

See Note [Local implicit parameters]

valueisIPPred_maybe :: Class -> [Type] -> Maybe (Type, Type)
#

Decomposes a predicate if it is an implicit parameter. Does not look in superclasses. See also [Local implicit parameters].