From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 57077BBAF for ; Wed, 21 Jan 2009 21:17:48 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAJbhdknVujhf/2dsb2JhbADNcIVz X-IronPort-AV: E=Sophos;i="4.37,302,1231110000"; d="scan'208";a="21840709" Received: from witko.kerneis.info ([213.186.56.95]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 21 Jan 2009 21:17:48 +0100 Received: from alf94-4-82-224-79-17.fbx.proxad.net ([82.224.79.17] helo=localhost) by witko.kerneis.info with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1LPjWA-0004pr-Tt; Wed, 21 Jan 2009 21:17:42 +0100 Received: from gabriel by localhost with local (Exim 4.69) (envelope-from ) id 1LPjW6-0001sz-CA; Wed, 21 Jan 2009 21:17:38 +0100 Date: Wed, 21 Jan 2009 21:17:38 +0100 From: Gabriel Kerneis To: Dario Teixeira Cc: Jacques Garrigue , caml-list@yquem.inria.fr Subject: Re: [Caml-list] Private types in 3.11, again Message-ID: <20090121201738.GA7134@kerneis.info> Mail-Followup-To: Dario Teixeira , Jacques Garrigue , caml-list@yquem.inria.fr References: <20090121.222217.31602828.garrigue@math.nagoya-u.ac.jp> <361979.82701.qm@web111514.mail.gq1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <361979.82701.qm@web111514.mail.gq1.yahoo.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-SA-Exim-Connect-IP: 82.224.79.17 X-SA-Exim-Mail-From: gabriel@kerneis.info X-SA-Exim-Scanned: No (on witko.kerneis.info); SAEximRunCond expanded to false X-Spam: no; 0.00; variants:01 params:01 2009:98 wrote:01 pps:01 caml-list:01 jussieu:01 emulate:01 types:05 types:05 anyway:05 implement:06 thread:06 wed:06 phantom:07 Hi, On Wed, Jan 21, 2009 at 11:11:14AM -0800, Dario Teixeira wrote: > So my question is whether it > is at all possible to emulate GADTs using only PV + phantom types, or if on the > contrary one needs to use the object system in these cases, as exemplified by > solution c). In other words, is solution a) futile, or did you use the object > system in solution c) simply because you were also using regular variants? I didn't followed the thread closely, but did you have a look at Ocsigen's way to implement params_type? http://ocsigen.org/trac/browser/server/ocsigen.ml?rev=183 (from line 146) I don't know what it's worth, but anyway it uses only PV (and Obj.magic). Regards, -- Gabriel Kerneis