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,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id DAB89BC6B for ; Tue, 21 Aug 2007 15:47:38 +0200 (CEST) Received: from mx1.polytechnique.org (mx1.polytechnique.org [129.104.30.34]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l7LDlcen007464 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 21 Aug 2007 15:47:38 +0200 Received: from localhost (is005115.intra.cea.fr [132.166.135.75]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTP id 77CD533170 for ; Tue, 21 Aug 2007 15:47:37 +0200 (CEST) Date: Tue, 21 Aug 2007 15:47:36 +0200 From: Virgile Prevosto To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] "opening" record types Message-ID: <20070821154736.4b005278@localhost> In-Reply-To: <67ECB685-E69A-43CA-867D-30B879DB0510@research.att.com> References: <67ECB685-E69A-43CA-867D-30B879DB0510@research.att.com> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.11; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-AV-Checked: ClamAV using ClamSMTP at djali.polytechnique.org (Tue Aug 21 15:47:37 2007 +0200 (CEST)) X-Org-Mail: virgile.prevosto.1996@polytechnique.org X-Miltered: at discorde with ID 46CAECFA.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; yitzhak:01 mandelbaum:01 yitzhak:01 andrieu:01 camlp:01 camlp:01 oandrieu:01 ocaml:01 foo:01 tutto:98 oggi:98 volta:98 compile:01 caml-list:01 nerim:01 Hello, Le mar 21 ao=C3=BB 2007 09:18:02 CEST, Yitzhak Mandelbaum a =C3=A9crit : > Is there any way around this? That is, is there any way to use the =20 > field names of a record defined in another module without opening > the whole module or copying the whole definition of the record. Olivier Andrieu has written a camlp4 extension (which won't compile with camlp4 3.10, I'm afraid) that does more or less this: http://oandrieu.nerim.net/ocaml/index.html#pa_records It should allow you to write (not tested) let x =3D Foo.{a=3D3; b=3D4} --=20 E tutto per oggi, a la prossima volta. Virgile