ComputingComputer ScienceFormal MethodsProgramming LanguagesSyntaxAnnotationData TypesFunctional ProgrammingType CheckingType SystemsPolymorphic Type SystemsPolymorphic TypesPolymorphism StudiesType ClassesType ConstructorsType InferenceType PolymorphismType Theory
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.
24
Principal type-schemes for functional programs
Robin Milner · 1982 · 1.1K citations
Polymorphic type inference and containment
John C. Mitchell · Information and Computation · 1988 · 198 citations
Simple imperative polymorphism
Andrew K. Wright · LISP and Symbolic Computation · 1995 · 197 citations
Unification under a mixed prefix
Dale Miller · Journal of Symbolic Computation · 1992 · 165 citations
Language Studies, Computer Science, Computational Linguistics +2