From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q0AHLAtK031204 for ; Tue, 10 Jan 2012 18:21:10 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApUBADRyDE9RZ90wkWdsb2JhbABDrFkiAQEBAQkLCwcUAyKBcgEBAQSBCQIBCBgKJDIlAgQBGhOHYQa2f4swYwSIB40Fkjo X-IronPort-AV: E=Sophos;i="4.71,488,1320620400"; d="scan'208";a="138628718" Received: from mtaout02-winn.ispmail.ntl.com ([81.103.221.48]) by mail1-smtp-roc.national.inria.fr with ESMTP; 10 Jan 2012 18:21:05 +0100 Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20120110172102.NAZW7093.mtaout02-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com>; Tue, 10 Jan 2012 17:21:02 +0000 Received: from romulus.metastack.com ([81.102.132.77]) by aamtaout04-winn.ispmail.ntl.com (InterMail vG.3.00.04.00 201-2196-133-20080908) with ESMTP id <20120110172102.VZVO23925.aamtaout04-winn.ispmail.ntl.com@romulus.metastack.com>; Tue, 10 Jan 2012 17:21:02 +0000 Received: from remus.metastack.local ([172.16.0.1]) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id q0AHKwuK017023 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 10 Jan 2012 17:20:58 GMT Received: from Remus.metastack.local ([fe80::547c:3c42:e1da:eda2]) by Remus.metastack.local ([fe80::547c:3c42:e1da:eda2%10]) with mapi id 14.01.0355.002; Tue, 10 Jan 2012 17:20:58 +0000 From: David Allsopp To: Dario Teixeira , O Camlmailinglist Thread-Topic: [Caml-list] References and polymorphism Thread-Index: AQHMz6yn9wZh0bR6JUebRLeHyLP0ypYF01YAgAAExmA= Date: Tue, 10 Jan 2012 17:20:57 +0000 Message-ID: References: <1326209342.96423.YahooMailNeo@web111502.mail.gq1.yahoo.com> <1326214824.62249.YahooMailNeo@web111507.mail.gq1.yahoo.com> In-Reply-To: <1326214824.62249.YahooMailNeo@web111507.mail.gq1.yahoo.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.0.7] Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Organization: MetaStack Solutions Ltd. X-Scanned-By: MIMEDefang 2.65 on 81.102.132.77 X-Cloudmark-Analysis: v=1.1 cv=R50lirqlHffDPPkwUlkuVa99MrvKdVWo//yz83qex8g= c=1 sm=0 a=40hZHaDki8MA:10 a=-4FU040LGoQA:10 a=cTs9vV391PwA:10 a=8nJEP1OIZ-IA:10 a=xqWC_Br6kY4A:10 a=Xpq9yo4QAAAA:8 a=W6XWfByEwiPRNpGZragA:9 a=wPNLvfGTeEIA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id q0AHLAtK031204 Subject: RE: [Caml-list] References and polymorphism 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