MLF
Didier Le Botlan, Didier Rémy · ACM SIGPLAN Notices · 2014
We propose a type system MLF that generalizes ML with first-class polymorphism as in System F. Expressions may contain secondorder type annotations. Every typable expression admits a principal type, which however depends on type annotations. Principal types capture all other types that can be obtained by implicit type instantiation and they can be inferred. All expressions of ML are welltyped without any annotations. All expressions of System F can be mechanically encoded into MLF by dropping all type abstractions and type applications, and injecting types of lambda-abstractions into MLF types. Moreover, only parameters of lambda-abstractions that are used polymorphically need to remain annotated.
Cited by 71 works. doi:10.1145/2641638.2641653
Authors
References
- Principal type-schemes for functional programs
- Theoretical Aspects of Computer Software
- Simple imperative polymorphism
- Polymorphic type inference and containment
- Partial polymorphic type inference and higher-order unification
- Unification under a mixed prefix
- Partial polymorphic type inference is undecidable
- Putting type annotations to work
- Local type inference
- Polymorphic type inference and abstract data types