From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id BE032BCAE for ; Fri, 15 Jul 2005 03:41:34 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j6F1fYeP032706 for ; Fri, 15 Jul 2005 03:41:34 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id DAA09697 for ; Fri, 15 Jul 2005 03:41:34 +0200 (MET DST) Received: from postfix4-2.free.fr (postfix4-2.free.fr [213.228.0.176]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j6F1fXu0032703 for ; Fri, 15 Jul 2005 03:41:33 +0200 Received: from [192.168.0.4] (roncq-1-82-225-126-56.fbx.proxad.net [82.225.126.56]) by postfix4-2.free.fr (Postfix) with ESMTP id 8C28432152A for ; Fri, 15 Jul 2005 03:41:33 +0200 (CEST) Message-ID: <42D71430.5030601@free.fr> Date: Fri, 15 Jul 2005 03:41:04 +0200 From: Marc Lasson User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: fr, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] OO syntax extension References: <20050709.125925.122025999.garrigue@math.nagoya-u.ac.jp> In-Reply-To: <20050709.125925.122025999.garrigue@math.nagoya-u.ac.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 42D7144E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 42D7144D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 syntax:01 syntax:01 syntaxes:01 val:01 mutable:01 expr:01 accessor:01 expr:01 mutable:01 accessor:01 ocamlc:01 -pp:01 cmo:01 mlast:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: Jacques Garrigue wrote: >OO syntax extension > Some camlp4 syntax extensions to write more compact code using > objects. The new syntaxes are > * val [mutable] x = expr with (reader|writer|accessor) > generates code for an x and a set_x method, like in ruby. > * obj#x <- expr > generates a call to the set_x method. > * {| [mutable] f1 = expr1; ...; [mutable] fn = exprn |} > generates an immediate object with the above fields and the > corresponding accessor methods. You may also include inherit > declarations. > I am very interested in your OO syntax extension but i did not succeed to compile it. I get the following error: marc@georgie:~$ ocamlc -I +camlp4 -c -pp 'camlp4o pa_extend.cmo q_MLast.cmo' pa_oo.ml File "pa_oo.ml", line 12, characters -249--249: Unbound value loc The error's position looks very weird. Since i can't speak camlp4, i'm unable to fix it. Is it serious doctor ? -- Marc Lasson. marc@georgie:~$ ocamlc -v && camlp4o -v The Objective Caml compiler, version 3.08.2 Standard library directory: /usr/lib/ocaml/3.08 Camlp4 version 3.08.2