Value restriction

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".


This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.