Monomorphic type Created 2026-10-31 Updated 2026-11-05
A data type without universally quantified type variables. During Hindley-Milner type inference, every use of a lambda-bound parameter shares one type, even if that type initially contains unknowns to be unified. In contrast, suitable let-bound definitions may admit let polymorphism.
Polymorphic type 2026-10-31
A type scheme describing a family of instances through type variables. In Hindley-Milner type inference, a principal type describes the most general valid instance pattern; concrete types arise by consistently substituting for the quantified variables. Reusing one variable constrains the corresponding positions to the same type, whereas distinct variables can vary independently.
Robin Milner 2026-11-05
Robin Milner presented a polymorphic type discipline and its inference algorithm in 1978. Algorithm W derives types from program structure while using unification to satisfy type constraints; suitable let-bound expressions receive reusable type schemes. This work is a foundation of Hindley-Milner type inference.[ref]
For example, an identity function has type . Generalizing a let-bound identity permits separate uses at integer and Boolean types, whereas one lambda-bound parameter has one shared type within its scope. The discipline therefore gives precise rules for reuse rather than treating every occurrence as independently polymorphic. Its type-soundness claim concerns specified runtime type errors, not every possible program failure.