From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by c5ff346549e7 (Postfix) with ESMTPS id 362605D4 for ; Thu, 6 Sep 2018 14:18:29 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,338,1531778400"; d="scan'208";a="345266787" Received: from sympa.inria.fr ([193.51.193.213]) by mail2-relais-roc.national.inria.fr with ESMTP; 06 Sep 2018 16:18:26 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id AF8A2824DA; Thu, 6 Sep 2018 16:18:26 +0200 (CEST) Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id E2967824B5 for ; Thu, 6 Sep 2018 16:18:16 +0200 (CEST) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=enrico.tassi@inria.fr; spf=None smtp.mailfrom=gares@fettunta.org; spf=None smtp.helo=postmaster@fettunta.org IronPort-PHdr: =?us-ascii?q?9a23=3ACGn0KhO7kGznPQiv+KYl6mtUPXoX/o7sNwtQ0KIM?= =?us-ascii?q?zox0Lfz6rarrMEGX3/hxlliBBdydt6obzbKO+4nbGkU4qa6bt34DdJEeHzQksu?= =?us-ascii?q?4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1?= =?us-ascii?q?Ov71GonPhMiryuy+4ZLebxlKiTanfb9+MAi9oBnMuMURnYZsMLs6xAHTontPde?= =?us-ascii?q?RWxGdoKkyWkh3h+Mq+/4Nt/jpJtf45+MFOTav1f6IjTbxFFzsmKHw65NfqtRbY?= =?us-ascii?q?UwSC4GYXX3gMnRpJBwjF6wz6Xov0vyDnuOdxxDWWMMvrRr0yRD+s7bpkSAXwhS?= =?us-ascii?q?kJNzA37nzZhM9+jK1UvB2uuh5wzIDPbYGJKPZzZL/Rcc8ASGZfWMtaSixPApm7?= =?us-ascii?q?b4sKF+cPMuBYr5P8p1QSqhu1GBeiC/n0yj9Th3/9wKo33PonEQHc3QwvA9UOvG?= =?us-ascii?q?7IrNrvL6cSSuG1wbLJzTXFdfNW2C3y5JLGchA7uPyBW697f8nJyUQ3Ew7IgU+c?= =?us-ascii?q?pZLrMj+P1+kAt3KX4/d+We+tk2Irtg98rzu1ysooi4TFnI0Yx1Te+Slnz4s4JN?= =?us-ascii?q?u1Q1Nhb9G+CptfrSSaOpN2Qsw8R2Fovz43yrMYtp6nYCgK1ZInxwLFZPCddIiI?= =?us-ascii?q?+B3jWP6QITd+mn1lZKqyihK9/ES61OHxWNO43VdOoyZfj9XAqHIA2wTW6sedS/?= =?us-ascii?q?t9+kmh2SyI1wDW8uxELlo7lbDFJJ462bMwmIQcsVjfHi/rnkX2kLWZel8j+uiy?= =?us-ascii?q?5OTreq/mqYOEN49olgH+NbwjldClDuQ9NggCRmyb+eWn1L3/5kD5W7VLjvgukq?= =?us-ascii?q?bDqpzaJMIbprS4AwBPyIoj5Qy/XH+a14ETlHwDaVZEYw6vjo7zOliILuqrI+24?= =?us-ascii?q?hgGBli1qzPeOArT6GZSFenXFirbqevBh4lVHySIyy8pe7tRaEOdSc7rIRkbtuY?= =?us-ascii?q?mAXVcCOAuuzrO/UYQv5sYlQWuKR5ShHubXuF6M6PgoJrDQNoEYpCrgLeQsofn0?= =?us-ascii?q?gi1hwANPTeySxZISLUuAMLF+OUzAOSjthM0AGCEEpFhmFbG4uBi5STdWIk2Kce?= =?us-ascii?q?c86zU8Ud70A4rfWp2rnLXH2z20TMVb?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CWAQA5NpFbl39FF15bGwEBAQEDAQEBC?= =?us-ascii?q?QEBAYUyFYx2i0GCDY0qizUBiB0ZBgY0FAECAQECAQEBAQETAQEBAQEIFgZYgjU?= =?us-ascii?q?igmEBAQQBOk8LGAklDy0bgzqBeggEpACKA4pegVg/g3YuhUuFCwKNPY40BwJ/g?= =?us-ascii?q?QQEjW0iCY5elVSBdjMaJ0yCbZBUgWIEAYxtAQE?= X-IPAS-Result: =?us-ascii?q?A0CWAQA5NpFbl39FF15bGwEBAQEDAQEBCQEBAYUyFYx2i0G?= =?us-ascii?q?CDY0qizUBiB0ZBgY0FAECAQECAQEBAQETAQEBAQEIFgZYgjUigmEBAQQBOk8LG?= =?us-ascii?q?AklDy0bgzqBeggEpACKA4pegVg/g3YuhUuFCwKNPY40BwJ/gQQEjW0iCY5elVS?= =?us-ascii?q?BdjMaJ0yCbZBUgWIEAYxtAQE?= X-IronPort-AV: E=Sophos;i="5.53,338,1531778400"; d="scan'208";a="278002670" Received: from fettunta.org ([94.23.69.127]) by mail3-smtp-sop.national.inria.fr with ESMTP; 06 Sep 2018 16:18:11 +0200 Received: from gargamel.invalid (eduroam-246c.sophia.inria.fr [138.96.49.246]) by fettunta.org (Postfix) with ESMTPSA id 1D5E4D7FA for ; Thu, 6 Sep 2018 16:18:10 +0200 (CEST) Received: from gares by gargamel.invalid with local (Exim 4.89) (envelope-from ) id 1fxv6n-0004B9-OK for caml-list@inria.fr; Thu, 06 Sep 2018 16:18:09 +0200 Date: Thu, 6 Sep 2018 16:18:09 +0200 From: Enrico Tassi To: caml-list@inria.fr Message-ID: <20180906141809.6m4vcwnsqqqbsack@gargamel> References: <20180906113622.lcuamhs6g6juv2r5@gargamel> <20180906130314.ymqnpcxbrz5d7tj4@gargamel> <5972F2FD-82AA-4C68-BE0A-D913A2D08658@math.nagoya-u.ac.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5972F2FD-82AA-4C68-BE0A-D913A2D08658@math.nagoya-u.ac.jp> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [Caml-list] How to rename a record field Reply-To: Enrico Tassi X-Loop: caml-list@inria.fr X-Sequence: 17054 Errors-to: caml-list-owner@inria.fr Precedence: list Precedence: bulk Sender: caml-list-request@inria.fr X-no-archive: yes List-Id: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, Sep 06, 2018 at 10:17:25PM +0900, Jacques Garrigue wrote: > Records being the dual of variants, all the arguments apply. > Namely, if the name is allowed to change, field access can no longer > be seen as the intuitive projection (by name rather than position, since > only name information is available in the source code). > Field name disambiguation works in the same way too. Thanks. I see why in the general case this makes the source code ambiguous. > > type old = { bad : int; stuff : bool } > > type t = old = { good : int; stuff : bool } But in a case as simple as this one where names are either different or occur in the same position I believe there is no ambiguity. "stuff" would always resolve to position 2 while both "good" and "bad" to position 1. I'm not knowledgeable enough to follow your reasoning about GADTs. Maybe the approach I propose is really unsound, even if I fail to get it. Still I believe the use case (renaming + deprecating a record field) is relevant. Any other approach (especially not requiring to patch OCaml) would make me happy. Best, -- Enrico Tassi -- Caml-list mailing list. Subscription management and archives: https://sympa.inria.fr/sympa/arc/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs