From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 960F5BB9C for ; Wed, 14 Sep 2005 02:02:43 +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 j8E02huU009583 for ; Wed, 14 Sep 2005 02:02:43 +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 CAA24806 for ; Wed, 14 Sep 2005 02:02:42 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j8E02ehn009580 for ; Wed, 14 Sep 2005 02:02:41 +0200 Received: from localhost (suiren [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.13.1/8.13.1) with ESMTP id j8E02abb009302; Wed, 14 Sep 2005 09:02:36 +0900 (JST) Date: Wed, 14 Sep 2005 09:03:27 +0900 (JST) Message-Id: <20050914.090327.07636554.garrigue@math.nagoya-u.ac.jp> To: lukstafi@gmail.com Cc: caml-list@inria.fr Subject: Re: [Caml-list] Records misbehaviour From: Jacques Garrigue In-Reply-To: <4a708d205091316156a6e5108@mail.gmail.com> References: <4a708d205091316156a6e5108@mail.gmail.com> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 432768A3.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 432768A0.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 lukasz:01 bug:01 omitted:01 omitted:01 int:01 int:01 jacques:01 jacques:01 garrigue:03 garrigue:03 let:03 indeed:05 fst:06 fst:06 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 From: Lukasz Stafiniak > #type t1 = {fst:int;snd:int};; > #let p1 = {fst=1; snd=2};; > #type t2 = {snd:int};; > #{p1 with snd=4};; > - : t2 = {snd = 4};; Indeed, this is rather counter-intuitive. So a bug report would be welcome :-) Note however that there is no unsoundness here: the definition of "with" happens to be "create a record with the provided fields, extracting omitted ones from p1". If none are omitted, which is the case here as t2 has only one field, then p1 is currently ignored. Jacques Garrigue