From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA13209 for caml-red; Fri, 15 Dec 2000 13:58:02 +0100 (MET) 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 LAA05197 for ; Fri, 15 Dec 2000 11:02:16 +0100 (MET) Received: from localhost.localdomain (ppp127.dyn142.pacific.net.au [210.23.142.127]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id eBFA2CX17231 for ; Fri, 15 Dec 2000 11:02:13 +0100 (MET) Received: from ozemail.com.au (IDENT:root@localhost [127.0.0.1]) by localhost.localdomain (8.9.3/8.8.7) with ESMTP id VAA02314; Fri, 15 Dec 2000 21:01:00 +1100 Message-ID: <3A39EBDC.662801DF@ozemail.com.au> Date: Fri, 15 Dec 2000 21:01:00 +1100 From: John Max Skaller X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: Mattias Waldau CC: Dave Berry , Chris Hecker , Mattias Waldau , Caml-List Subject: Re: Same label in different types, how do people solve this? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: weis@pauillac.inria.fr Mattias Waldau wrote: > > My problems isn't the restriction as such. If I know about the restriction, > I can code around it. > > The problem is that this particular restriction is very unusual, and > therefor I need to be informed about this. Now it is in the faq, but why not > put it into the error message "two fields in different types in the same > file/module cannot have the same name." It's not clear: open A (* contains field x *) open B (* contains field x *) expr.x (* B.x *) expr.A.x (* A.x *) expr.B.x (* B.x *) Possibly, it is the _usage_ 'expr.x' which should be flagged as erroneous, which would suggest: open List open Array .. map f [] map f [| |] both applications ought to be in error (rather than just map f []). This would break a LOT of code I'd imagine, even if it is 'better principled' than the current scheme, which might lead to confusing messages. -- John (Max) Skaller, mailto:skaller@maxtal.com.au 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net