Copyright | (c) L. S. Leary 2025 |
---|---|
Safe Haskell | None |
Language | GHC2021 |
Data.Hetero.Eq
Contents
Description
Heterogeneous equality with evidence capture.
HetEq
class HetEq (f :: k -> Type) where Source #
Heterogeneous equality with evidence capture of type equivalence.
Associated Types
type Strength (f :: k -> Type) :: RoleKind Source #
Does not correspond precisely to the role signature of f
according to GHC, but rather a lower bound on the Strength
of the evidence gleaned from a positive equality test.
Methods
heq :: forall (a :: k) (b :: k). f a -> f b -> Maybe (AtLeast (Strength f) a b) Source #
Compare an f a
and an f b
for equality, opportunistically capturing the strongest type-equivalence evidence we can given the arguments.
Instances
Newtypes for DerivingVia
newtype TestCo (f :: k -> Type) (a :: k) Source #
Derives a HetEq
instance from TestCoercion
.
Constructors
TestCo (f a) |