For a description of how the value restriction is relaxed in the OCaml type system, see the article "Relaxing the value restriction", by Jacques Garrigue, 2004 http://caml.inria.fr/about/papers.en.html
On Tue, Jan 10, 2012 at 6:20 PM, David Allsopp <[email protected]> wrote: > Dario Teixeira wrote: >> Thank you, Romain and Arnaud. With that "list ref" example in mind, it >> does make sense for the compiler to play it safe and declare foobar2 to >> be non-polymorphic. Moreover, this is one of those issues where I I >> suspect that compiler elfs must have pondered already how easy/feasible >> it would be to extend the compiler to detect sound instances (such as >> foobar2) that could be accepted... > > They certainly did: http://mlton.org/ValueRestriction has links to the > various papers on the subject (the present scheme was not the first solution > for SML, as it notes). > > > David > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
