From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 84B26BB91 for ; Sat, 22 Jan 2005 18:55:42 +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 j0MHtgmh006439 for ; Sat, 22 Jan 2005 18:55:42 +0100 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 SAA27469 for ; Sat, 22 Jan 2005 18:55:41 +0100 (MET) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.204]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j0MHtelP005214 for ; Sat, 22 Jan 2005 18:55:41 +0100 Received: by rproxy.gmail.com with SMTP id i8so143032rne for ; Sat, 22 Jan 2005 09:55:40 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=sA6JfbpCe0A7bRauSE83OB2qlBownz0JOgp/DH8GqkIwOX5wmQRS7dfM7RdC4Oanc0vv1eLTU4E1zX1o8ClI7/fXQJ7ohnor8ajNQIpI8lh+3zPmTHeZCzuglVBPYhz/F2QlNWbF+tTuEocUlXbG1nlq0Nn3Ib7/NIdjwDP/2wI= Received: by 10.38.89.16 with SMTP id m16mr85790rnb; Sat, 22 Jan 2005 09:55:40 -0800 (PST) Received: by 10.38.82.65 with HTTP; Sat, 22 Jan 2005 09:55:40 -0800 (PST) Message-ID: Date: Sat, 22 Jan 2005 18:55:40 +0100 From: Michal Moskal Reply-To: Michal Moskal To: Chris King Subject: Re: [Caml-list] Shallow copy of a record Cc: caml-list@inria.fr In-Reply-To: <875c7e070501220855a997f7e@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <875c7e0705012120277c090ec8@mail.gmail.com> <20050122.154909.132744958.garrigue@math.nagoya-u.ac.jp> <875c7e070501220855a997f7e@mail.gmail.com> X-Miltered: at concorde with ID 41F2939E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41F2939C.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; michal:01 moskal:01 michal:01 moskal:01 caml-list:01 wrote:01 wrote:01 foo:01 foo:01 malekith:01 define:01 gcs:01 jacques:01 labels:02 garrigue:03 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.0 X-Spam-Level: On Sat, 22 Jan 2005 11:55:19 -0500, Chris King wrote: > On Sat, 22 Jan 2005 15:49:09 +0900 (JST), Jacques Garrigue > wrote: > > > This does not exist, and with good reason: there is no way in the type > > system to define a function which works on all records, but only > > records. So to do the copy you need to know at least one of the labels > > of the record, which in turn gives you its type. > > Isn't it the foo in {foo with a=b} that determines the type, though? No, consider: let copy foo = {foo with a = b} and now, if there were no assign: let copy foo = {foo} what should be the type of copy? -- : Michal Moskal :: http://nemerle.org/~malekith/ :: GCS !tv h e>+++ b++ : No, I will *not* fix your computer............ :: UL++++$ C++ E--- a?