Module

Type.Equality

Package
type-equality
Repository
purescript/purescript-type-equality

#TypeEquals Source

class TypeEquals :: forall k. k -> k -> Constraintclass (Coercible a b) <= TypeEquals a b | a -> b, b -> a where

This type class asserts that types a and b are equal.

The functional dependencies and the single instance below will force the two type arguments to unify when either one is known.

Note: any instance will necessarily overlap with refl below, so instances of this class should not be defined in libraries.

Members

  • proof :: forall p. p a -> p b

Instances

#to Source

to :: forall a b. TypeEquals a b => a -> b

#from Source

from :: forall a b. TypeEquals a b => b -> a
Modules
Type.Equality