HindleyMilnerTypensystem
The Hindley–Milner type system, often abbreviated HM, is a classical type system for the simply typed lambda calculus extended with let-bindings that supports automatic type inference and parametric polymorphism. It was developed independently by J. Roger Hindley (1969) and Robin Milner (1978), and it became the formal foundation for type systems in ML-family languages such as Standard ML and OCaml. HM explains how programs can be assigned most general types without requiring explicit type annotations.
Core ideas of the Hindley–Milner system include the notion of principal types, where every typable expression
HM supports parametric polymorphism but generally does not include subtyping or higher-rank polymorphism by default. Extensions