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=2.9 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL 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 D1A52BBAF for ; Wed, 25 Mar 2009 21:25:51 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArwBADcwyknRVdmrimdsb2JhbACNE4gsPwEBAQoJDAcPBawXB4EAj1ABAwEDg3IGhSk X-IronPort-AV: E=Sophos;i="4.38,421,1233529200"; d="scan'208";a="24980791" Received: from mail-gx0-f171.google.com ([209.85.217.171]) by mail3-smtp-sop.national.inria.fr with ESMTP; 25 Mar 2009 21:25:51 +0100 Received: by gxk19 with SMTP id 19so514646gxk.3 for ; Wed, 25 Mar 2009 13:25:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:reply-to:to:subject:date :user-agent:cc:references:in-reply-to:content-type :content-transfer-encoding:content-disposition:message-id; bh=tvmXQgl+WBPmw+gCXD3oK3THBaodT82GiqDARJM+gUo=; b=XOApjxL2X4KvcltdqJhl08mZh5Ydos6jgBeUBRb4RVd6yWsfO00mMTxyumoAlLpOZo ZQ9dpFCdEQ7rA4A0lFqCYRV9pJNS2DmWUXygrIAewATgDh0RR+yjnHwNXduUzYE+i3N4 LUyavp4WBXmCHbFFDeN8PXz3O4+dP58ClmwkU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:reply-to:to:subject:date:user-agent:cc:references:in-reply-to :content-type:content-transfer-encoding:content-disposition :message-id; b=H656nrgoXRmRARZQxROheiDtPPBZbm56BzV1LZDliY+rPHPCIMyfyanmsRKgXFqHoI I1MIP7yNVCtfrbxFzrf8zgkav5hzLjNY1ULOxyrlMU4goe0h8xCRW5RXtfJpqqyYAZle aI2D4lU+Lp7vE7jdx4GpxeTRSBY9A5yc5QdlI= Received: by 10.90.71.15 with SMTP id t15mr5765796aga.61.1238012749807; Wed, 25 Mar 2009 13:25:49 -0700 (PDT) Received: from ?192.168.0.102? (c-98-219-43-7.hsd1.ga.comcast.net [98.219.43.7]) by mx.google.com with ESMTPS id 29sm12731719agd.17.2009.03.25.13.25.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Mar 2009 13:25:48 -0700 (PDT) From: Peng Zang Reply-To: peng.zang@gmail.com To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] can anyone replicate this camlp4 problem? Date: Wed, 25 Mar 2009 16:25:39 -0400 User-Agent: KMail/1.9.9 Cc: Andres Varon References: <200903251555.59456.peng.zang@gmail.com> <963A7662-942E-4E70-B068-EEF3239F58E7@gmail.com> <200903251615.40838.peng.zang@gmail.com> In-Reply-To: <200903251615.40838.peng.zang@gmail.com> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903251625.42218.peng.zang@gmail.com> X-Spam: no; 0.00; camlp:01 hash:01 val:01 val:01 printf:01 hash:01 camlp:01 bug:01 topfind:01 findlib:01 syntax:01 syntax:01 topfind:01 lib:01 ocaml:01 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I only know of the brute force update which is less than desirable: class test (x : int) = object val a = x; val b = x; method add (d:int) = let copy = {<>} in let arr : int array = Obj.magic copy in arr.(2) <- arr.(2) + d; arr.(3) <- arr.(3) + d; copy method print = Format.printf "%d %d" a b end But my brain is fried and I can't think of a nicer way.. Peng On Wednesday 25 March 2009 04:15:38 pm Peng Zang wrote: > Thanks, do you know of a good work around? > > Peng > > On Wednesday 25 March 2009 04:01:24 pm Andres Varon wrote: > > On Mar 25, 2009, at 3:55 PM, Peng Zang wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > > Hash: SHA1 > > > > > > Hi, camlp4 seems to break parsing of object duplication on 3.11. > > > Can anyone > > > replicate this problem? Is this an known issue? A quick google > > > search did > > > not reveal anything.. > > > > Yeah. I reported the bug here: > > > > http://caml.inria.fr/mantis/view.php?id=4673 > > > > Andres > > > > > Peng > > > > > > > > > Objective Caml version 3.11.0 > > > > > > # #use "topfind";; > > > Findlib has been successfully loaded. Additional directives: > > > #require "package";; to load a package > > > #list;; to list the available packages > > > #camlp4o;; to load camlp4 (standard syntax) > > > #camlp4r;; to load camlp4 (revised syntax) > > > #predicates "p,q,...";; to set these predicates > > > Topfind.reset();; to force that packages will be reloaded > > > #thread;; to enable threads > > > > > > # #camlp4o;; > > > /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/dynlink.cma: loaded > > > /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/camlp4: added to > > > search path > > > /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/camlp4/camlp4o.cma: > > > loaded > > > Camlp4 Parsing version 3.11.0 > > > > > > # class functional_point x y = object > > > val x = x > > > val y = y > > > method get_x = x > > > method get_y = y > > > method move dx dy = {< x = x + dx; y = y + dy >} > > > end;; > > > Characters 138-144: > > > method move dx dy = {< x = x + dx; y = y + dy >} > > > ^^^^^^ > > > Warning S: this expression should have type unit. > > > Characters 146-156: > > > method move dx dy = {< x = x + dx; y = y + dy >} > > > ^^^^^^^^^^ > > > Error: This expression has type bool but is here used with type int > > > # > > > -----BEGIN PGP SIGNATURE----- > > > Version: GnuPG v2.0.7 (GNU/Linux) > > > > > > iD8DBQFJyoxPfIRcEFL/JewRAg8TAKCjoxTmDmfLxVHa7sXq0tGlt2rKDgCgp/C2 > > > nc4vnKWkTvKXeR4Q0z4XB94= > > > =IwA+ > > > -----END PGP SIGNATURE----- > > > > > > _______________________________________________ > > > Caml-list mailing list. Subscription management: > > > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > > > Archives: http://caml.inria.fr > > > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > > > Bug reports: http://caml.inria.fr/bin/caml-bugs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) iD8DBQFJypNGfIRcEFL/JewRAtIOAJ9xEOuh4XNivJkjKZZ1uTYmONGzZQCfQAZH 4UBdyDEFCYNJ6wH4ZG8zpzU= =twIi -----END PGP SIGNATURE-----