eq-0.1.0: Leibnizian equality

Portabilityrank2 types, type operators, type families (optional)
Stabilityprovisional
MaintainerEdward Kmett <ekmett@gmail.com>

Data.Eq.Type

Description

Leibnizian equality. Injectivity in the presence of type families is provided by a generalization of a trick by Oleg Kiselyv posted here:

http://www.haskell.org/pipermail/haskell-cafe/2010-May/077177.html

Documentation

data a := b Source

Constructors

Refl 

Fields

subst :: forall c. c a -> c b
 

Instances

refl :: a := aSource

trans :: (a := b) -> (b := c) -> a := cSource

symm :: (a := b) -> b := aSource

coerce :: (a := b) -> a -> bSource

lift :: (a := b) -> f a := f bSource

lift2 :: (a := b) -> f a c := f b cSource

lift2' :: (a := b) -> (c := d) -> f a c := f b dSource

lift3 :: (a := b) -> f a c d := f b c dSource

lift3' :: (a := b) -> (c := d) -> (e := f) -> g a c e := g b d fSource

lower :: (f a := f b) -> a := bSource

lower2 :: (f a c := f b c) -> a := bSource

lower3 :: (f a c d := f b c d) -> a := bSource