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 q0BDFMMn008595 for ; Wed, 11 Jan 2012 14:15:23 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AswBAMSKDU+LEwExe2dsb2JhbABDrQkBARYmBSCBcgEBAQQnCwENAQE3AQ8FBg4KLlcGJKxrhCEBjh8HjB2VEJI9 X-IronPort-AV: E=Sophos;i="4.71,493,1320620400"; d="scan'208";a="126422988" Received: from infao0809.mpi-sb.mpg.de (HELO hera.mpi-sb.mpg.de) ([139.19.1.49]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 11 Jan 2012 14:15:17 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mpi-sb.mpg.de; s=mail200803; h=Message-ID:In-Reply-To: References:Date:Subject:From:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=htx2EJnlfQqgMF/2D9HG431uMRvTC1vMiN FLCT3ASZA=; b=ZU6L0QtWtpVFjTCmPTV2p0IRePNuH+U9z04he9dge4ChYNxXuR 1JcPlr0kfI2KpiOrfU2z229fq12mNUeDlNgerun9+DvrGn2EUqZTuzWIoCzIL7Eo Y6KsvR+u0325rwfXQtLiQ3kgNLwVHRxjmhA4erNaLz0TKiGYlzCSjW4Pc= Received: from srv-00-125.mpi-klsb.mpg.de ([139.19.1.28]:53752 helo=newmaniac.mpi-klsb.mpg.de) by hera.mpi-sb.mpg.de (envelope-from ) with esmtp (Exim 4.69) id 1Rky1K-0000wH-Mm; Wed, 11 Jan 2012 14:15:16 +0100 Received: from local by newmaniac.mpi-klsb.mpg.de (envelope-from ) with local (Exim 4.72) id 1Rky1K-0001lL-7f; Wed, 11 Jan 2012 14:15:14 +0100 Received: from 74.125.57.233 (SquirrelMail authenticated user rossberg) by mail.mpi-sws.org with HTTP; Wed, 11 Jan 2012 14:15:14 +0100 Message-ID: <13b032314ec2f8f50916bcfa6eb7f72b.squirrel@mail.mpi-sws.org> In-Reply-To: <4F0D87E8.90602@wp.pl> References: <1326209342.96423.YahooMailNeo@web111502.mail.gq1.yahoo.com> <1326214824.62249.YahooMailNeo@web111507.mail.gq1.yahoo.com> <4F0D6913.4090207@wp.pl> <4F0D87E8.90602@wp.pl> Date: Wed, 11 Jan 2012 14:15:14 +0100 From: rossberg@mpi-sws.org To: "Dawid Toton" Cc: "caml-list" User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [Caml-list] Re: References and polymorphism Dawid Toton wrote: > let f3 : forall ˆ€'a . unit -> 'a list ref = > fun (type 'aa) -> > let r = ref ([] : 'aa list) in > fun () -> > r > > (* f3: Fine, but it would require some work at compile time or smart > transformations to keep types erased at run-time. Also, keeping the > first actual argument (staying for 'aa) implicit would need extra rules > to resolve ambiguities (decide when this argument is applied). *) No, this would be unsound, because "fun (type t) -> ..." does not the suspend computation -- there'd be only one ref. It's not System F. /Andreas