copilot-core-3.3: An intermediate representation for Copilot.
Safe HaskellSafe
LanguageHaskell2010

Copilot.Core.Type.Equality

Description

Propositional equality and type equality.

Synopsis

Documentation

data Equal :: * -> * -> * where Source #

Propositional equality.

Constructors

Refl :: Equal a a 

class EqualType t where Source #

Type equality. If the value of x =~= y is Just Refl, then the two types x and y are equal.

Methods

(=~=) :: t a -> t b -> Maybe (Equal a b) Source #

Instances

Instances details
EqualType Type Source # 
Instance details

Defined in Copilot.Core.Type

Methods

(=~=) :: Type a -> Type b -> Maybe (Equal a b) Source #

coerce :: Equal a b -> a -> b Source #

Safe coercion, which requires proof of equality.

refl :: Equal a a Source #

Proof of propositional equality.

trans :: Equal a b -> Equal b c -> Equal a c Source #

Transitivity.

symm :: Equal a b -> Equal b a Source #

Symmetry.

cong :: Equal a b -> Equal (f a) (f b) Source #

Congruence.