Jump to content

Value restriction

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Dgpop (talk | contribs) at 17:23, 4 July 2018 (top: better template). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In functional programming, in particular the ML programming language family, the value restriction means that declarations are only polymorphically generalized if they are syntactic values (also called non-expansive). The value restriction prevents reference cells from holding values of different types and preserves type safety.

See also

References

  • Mads Tofte (1988). Operational Semantics and Polymorphic Type Inference. PhD thesis.
  • M. Tofte (1990). "Type inference for polymorphic references".
  • O'Toole (1990). "Type Abstraction Rules for Reference: A Comparison of Four Which Have Achieved Notoriety".
  • Xavier Leroy & Pierre Weis (1991). "Polymorphic type inference and assignment". POPL '91.
  • A. K. Wright (1992). "Typing references by effect inference".
  • My Hoang, John C. Mitchell and Ramesh Viswanathan (1993). "Standard ML-NJ weak polymorphism and imperative constructs".
  • Andrew Wright (1995). "Simple imperative polymorphism". In LISP and Symbolic Computation, p. 343–356.
  • Jacques Garrigue (2004). "Relaxing the Value Restriction".