Arend
Arend copied to clipboard
Reverse coerce
If the expected type of e
is a class and its actual type is the type of the classifying field of the class, then e
can be replaced with the instance of the class which has e
as the classifying expression.
For example, if function f
expects a Ring
, then we can write f Int
in which case Int
will be replaced with the instance IntRing : Ring Int
.