Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 1.12 KB

Hindley-Milner-Mutable-Rowpolymorphism.md

File metadata and controls

12 lines (8 loc) · 1.12 KB

Hindley Milner Mutable inference with row polymorphism

This is an implementation of type inference for safe, polymorphic and extensible records. This code is based on the implementation here. Essentially this implementation is the same as HMMutable with row polymorphism added. You can see the extension by examining the additional union case fields in the expr type that describe all the different operations that can be applied: RecordSelect, RecordExtend, RecordRestrict and RecordEmpty. And again in ty: TRecord , TRowEmpty and TRowExtend byt looking at the usages of these types you can see which parts of the algorithm change.

Code

All code is in a self contained project: HMMutable-RowPolymorphism

References

Extension of ML Type System with a Sorted Equational Theory on Types, Didier Rémy Extensible records with scoped labels, Daan Leijen