From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q0AJ06TX001128 for ; Tue, 10 Jan 2012 20:00:06 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtICACaKDE9KfVIukGdsb2JhbABDnCiQKggiAQEBAQkJDQcUBCGBcgEBAQQSAiwBGxIMAwwGBQsNDSEiAREBBQEKEgYBEhIIAQeHYJoJCotqgm+EUj+IcQIFC4NyiBYElQyOAz2Dew X-IronPort-AV: E=Sophos;i="4.71,488,1320620400"; d="scan'208";a="126308874" Received: from mail-ww0-f46.google.com ([74.125.82.46]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 10 Jan 2012 20:00:00 +0100 Received: by wgbdq12 with SMTP id dq12so2969543wgb.3 for ; Tue, 10 Jan 2012 11:00:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=2iznLBuxylVATJ6ctX2fcWqgGdCqgOKWdA7Ub35ZNY0=; b=X5u2hT5aWnoygna9B31GlCudTMn17PzKM0KYkT1y6MjhuQUgv8rYtQK94OAPzI6a6E cncieAsYMKadRyJtoyH3mVnXMDEkublqk8+6I+LvFzftqPLFsfWuJttS/gQY/UaixCRp up97PeoCJTkcigIz5Vpf7n5h0XY3cVEDP+U9s= Received: by 10.180.93.168 with SMTP id cv8mr5514247wib.2.1326222000261; Tue, 10 Jan 2012 11:00:00 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.198.147 with HTTP; Tue, 10 Jan 2012 10:59:37 -0800 (PST) In-Reply-To: References: <1326209342.96423.YahooMailNeo@web111502.mail.gq1.yahoo.com> <1326214824.62249.YahooMailNeo@web111507.mail.gq1.yahoo.com> From: Gabriel Scherer Date: Tue, 10 Jan 2012 19:59:37 +0100 Message-ID: To: Dario Teixeira , caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id q0AJ06TX001128 Subject: Re: [Caml-list] References and polymorphism 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 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 >