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 59FAEBCAB for ; Wed, 11 May 2005 18:33:34 +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 j4BGXXIS004517 for ; Wed, 11 May 2005 18:33:34 +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 SAA00178 for ; Wed, 11 May 2005 18:33:33 +0200 (MET DST) Received: from hedwig1.umh.ac.be (hedwig2.umh.ac.be [193.190.193.73]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j4BGXXJp004511 for ; Wed, 11 May 2005 18:33:33 +0200 Received: from poincare (Debian-exim@poincare.swapping.umh.ac.be [10.102.100.67]) by hedwig1.umh.ac.be (8.13.1/8.13.1) with ESMTP id j4BGXwTp1200268; Wed, 11 May 2005 18:33:59 +0200 Received: from localhost ([127.0.0.1] ident=trch) by poincare with esmtp (Exim 4.50) id 1DVu99-0004kK-TM; Wed, 11 May 2005 18:33:19 +0200 Date: Wed, 11 May 2005 18:33:19 +0200 (CEST) Message-Id: <20050511.183319.06547596.debian00@tiscali.be> To: Markus MOTTL Cc: "O'Caml Mailing List" Subject: Re: [Caml-list] Renaming structures during inclusions? From: Christophe TROESTLER In-Reply-To: References: Organization: Universite de Mons-Hainaut (http://math.umh.ac.be/an/) X-Spook: Adriatic Arnett Project Monarch NATO brigand IRA Elvis LABLINK fraud SP4 X-Blessing: Om Ah Hum Vajra Guru Pema Siddhi Hum X-Operating-System: GNU/Linux (http://www.linux.org/) X-Mailer-URL: http://www.mew.org/ X-Mailer: Mew version 4.2 on Emacs 21.4 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.1 (www dot roaringpenguin dot com slash mimedefang) X-Miltered: at nez-perce with ID 428233DD.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 428233DD.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 christophe:01 troestler:01 markus:01 mottl:01 markus:01 mottl:01 compiler:01 syntax:01 struct:01 struct:01 2005,:98 wrote:01 imho:01 structures:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.5 required=5.0 tests=FROM_ENDS_IN_NUMS autolearn=disabled version=3.0.2 X-Spam-Level: On Wed, 11 May 2005, Markus Mottl wrote: > > The above is not possible, because the names for type t in M1 and M2, > and the module names for module Std clash. Wouldn't it be better to have a compiler switch (say "-w T/t", off by default) to overide that behavior (new definitions override old ones as with [open])? Of course that makes it impossible to write M1 signature without aliasing [t] and [Std] but IMHO that's fine. This way, no new syntax needs to be introduced (and one is not forced to alias modules one does not care about -- e.g. utilities). module M = struct include M1 type m1_t = M1.t module M1Std = M1.Std include M2 type m2_t = M2.t module M2Std = M2.Std module Std = struct include M1.Std include M2.Std end end My 2¢, ChriS