Closed ivenmarquardt closed 6 years ago
Since I restrict polytypes to multi-constructor ADTs (sum type), there is currently no need to extend the type system with an additional subsumption rule. As soon as the type validator works stable and I've gained more experiences with HM, I probably retry to implement rank-n types. Then a subsumption rule becomes crucial again.
The following application should be well-typed,
because
k
is independently and thus more polymorphic thanf
expects for its function argument. A subsumption rule must also consider co-/contra-variance: