From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 28225BCAB for ; Thu, 12 May 2005 22:02:20 +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 j4CK2J4a019216 for ; Thu, 12 May 2005 22:02:19 +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 WAA15121 for ; Thu, 12 May 2005 22:02:19 +0200 (MET DST) Received: from swordfish.cs.caltech.edu (swordfish.cs.caltech.edu [131.215.44.124]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j4CK2IJQ019211 for ; Thu, 12 May 2005 22:02:18 +0200 Received: from [192.168.1.100] (charter-242-004.caltech.edu [131.215.242.4]) by swordfish.cs.caltech.edu (Postfix) with ESMTP id 6B78ADF277 for ; Thu, 12 May 2005 13:02:17 -0700 (PDT) Message-ID: <4283B638.2030403@cs.caltech.edu> Date: Thu, 12 May 2005 13:02:00 -0700 From: Aleksey Nogin Organization: California Institute of Technology, Computer Science Department User-Agent: Mozilla Thunderbird 1.0.2-1.3.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Caml List Subject: Re: [Caml-list] Renaming structures during inclusions? References: In-Reply-To: X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 4283B64B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4283B64A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 markus:01 mottl:01 struct:01 struct:01 afaict:01 wrote:01 imho:01 structures:01 modules:01 modules:01 caltech:02 caltech:02 renaming:02 renaming:02 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On 11.05.2005 08:44, Markus Mottl wrote: > The only solution that seems to make sense and does not impose > excessive work on the user is, IMHO, to provide for a facility to > rename types and modules, e.g. maybe something like: > > ---------------------------------------------- > module M = struct > include M1 > with type t as m1_t > with module Std as M1Std > > include M2 > with type t as m2_t > with module Std as M2Std > > module Std = struct > include M1Std > include M2Std > end > end > ---------------------------------------------- I would like to second this request. Currently, including several modules that share some structure is impossible and requires giving separate names for all the shared fields, with can be very painful. The "with" renaming seems simple enough and AFAICT would not break anything. -- Aleksey Nogin Home Page: http://nogin.org/ E-Mail: nogin@cs.caltech.edu (office), aleksey@nogin.org (personal) Office: Moore 04, tel: (626) 395-2200