From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 29B64BB9C for ; Wed, 21 Dec 2005 06:22:43 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jBL5MgXV004507 for ; Wed, 21 Dec 2005 06:22:42 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id GAA04345 for ; Wed, 21 Dec 2005 06:22:42 +0100 (MET) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jBL5MeCu004502 for ; Wed, 21 Dec 2005 06:22:41 +0100 Received: from rosella (ppp33-4.lns1.syd2.internode.on.net [59.167.33.4] (may be forged)) by smtp3.adl2.internode.on.net (8.12.9/8.12.6) with ESMTP id jBL5MYjY020874 for ; Wed, 21 Dec 2005 15:52:35 +1030 (CST) (envelope-from skaller@users.sourceforge.net) Subject: syntax bug: copying records From: skaller To: caml-list@inria.fr Content-Type: text/plain Date: Wed, 21 Dec 2005 16:22:34 +1100 Message-Id: <1135142554.18811.16.camel@rosella> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 43A8E6A2.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 43A8E6A0.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; syntax:01 bug:01 lexing:01 sourceforge:01 workaround:01 imperative:01 programming:03 ugly:03 standard:07 john:08 stuff:08 felix:08 felix:08 i'm:08 doesn't:12 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 If x is a record then { x } should be a copy of it. But this doesn't work, I am using this ugly workaround instead: { x with dummy_field = x.dummy_field } Surely there is a better way? Oo.copy doesn't work either. Yes, yes, imperative programming sucks but I'm using the standard Lexing stuff. -- John Skaller Felix, successor to C++: http://felix.sf.net