Arend icon indicating copy to clipboard operation
Arend copied to clipboard

Reverse coerce

Open valis opened this issue 5 years ago • 0 comments

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.

valis avatar Feb 21 '20 21:02 valis