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
- transitivity
- compatibility
- extensionality
eqp x y ≡ True ⇒ f x == f y ≡ Truefor polymorphic
f :: forall x. f x -> aand
Eq a.
Note: P stands for phantom.
Instances13EqP, …
EqP StableNameDefined in some-1.0.6 · Data.EqPEqP SCharDefined in some-1.0.6 · Data.EqPEqP SSymbolDefined in some-1.0.6 · Data.EqPEqP SNatDefined in some-1.0.6 · Data.EqPEqP ProxyDefined in some-1.0.6 · Data.EqPEqP TypeRepDefined in some-1.0.6 · Data.EqPEq a => EqP (Const a)Defined in some-1.0.6 · Data.EqPEqP ((:~:) a)Defined in some-1.0.6 · Data.EqPEqP ((:~~:) 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