Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Represents equality between two types 'a
, 'b
. The constraint means that, if you have an instance of Eq
, 'a
and 'b
are the same type
val coerce : ('a, 'b) t -> 'a -> 'b
coerce eq a
applies equality proof eq
on a value of type 'a
to coerce it to 'b
commute eq
uses the commutative property of equality to produce a proof of equality from 'b
to 'a
from a proof from 'a
to 'b
transit eq_a eq_b
uses the transitive property of equality to produce a proof of equality from 'a
to 'c
from proofs from 'a
to 'b
and 'b
to 'c
val val_equal : ?equal:('a -> 'a -> bool) -> ('a, 'b) t -> 'a -> 'b -> bool
val_equal ?equal eq a b
returns equal a b
after casting a
to 'b
.
?equal
is ( = )
by default