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

Modulesome-1.0.6Haskell2010

Data.EqP

  • 1 class
  • Packagesome-1.0.6
  • Exports1
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceEqP.hs
classclass (forall (a :: k). Eq (f a)) => EqP (f :: k -> Type) where
#

Heterogenous lifted equality.

This class is stronger version of Eq1 from base

class (forall a. Eq a => Eq (f a)) => Eq1 f where
    liftEq :: (a -> b -> Bool) -> f a -> f b -> Bool

as we don't require a a -> b -> Bool function.

Morally Eq1 should be a superclass of EqP, but it cannot be, as GHC wouldn't allow EqP to be polykinded. https://gitlab.haskell.org/ghc/ghc/-/issues/22682

Laws

reflexivity

eqp x x ≡ True

symmetry

eqp x y ≡ eqp y x

transitivity

eqp x y ≡ eqp y z ≡ True ⇒ eqp x z ≡ True

compatibility

eqp x y ≡ x == y

extensionality

eqp x y ≡ True ⇒ f x == f y ≡ True

for polymorphic

f :: forall x. f x -> a

and

Eq a

.

Note: P stands for phantom.

Methods

Instances13EqP, …
  • EqP StableNameDefined in some-1.0.6 · Data.EqP
  • EqP SCharDefined in some-1.0.6 · Data.EqP
  • EqP SSymbolDefined in some-1.0.6 · Data.EqP
  • EqP SNatDefined in some-1.0.6 · Data.EqP
  • EqP ProxyDefined in some-1.0.6 · Data.EqP
  • EqP TypeRepDefined in some-1.0.6 · Data.EqP
  • Eq a => EqP (Const a)Defined in some-1.0.6 · Data.EqP
  • EqP ((:~:) a)Defined in some-1.0.6 · Data.EqP
  • EqP ((:~~:) a)Defined in some-1.0.6 · Data.EqP
  • (EqP a, EqP b) => EqP (Product a b)Defined in some-1.0.6 · Data.EqP
  • (EqP a, EqP b) => EqP (Sum a b)Defined in some-1.0.6 · Data.EqP
  • (EqP a, EqP b) => EqP (a :*: b)Defined in some-1.0.6 · Data.EqP
  • (EqP f, EqP g) => EqP (f :+: g)Defined in some-1.0.6 · Data.EqP