From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA23562; Wed, 21 Mar 2001 14:26:29 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA23829 for ; Wed, 21 Mar 2001 14:26:28 +0100 (MET) Received: from mrwall.kal.com (mrwall.kal.com [194.193.14.236]) by concorde.inria.fr (8.11.1/8.10.0) with SMTP id f2LDQRL10773; Wed, 21 Mar 2001 14:26:27 +0100 (MET) Received: from mrwall.kal.com [194.193.14.236] (HELO localhost) by mrwall.kal.com (AltaVista Mail V2.0J/2.0J BL25J listener) id 0000_0045_3ab8_ac78_e836; Wed, 21 Mar 2001 13:28:24 +0000 Subject: RE: [Caml-list] Caml 3.01 : pb with include MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Wed, 21 Mar 2001 13:25:25 -0000 content-class: urn:content-classes:message X-MimeOLE: Produced By Microsoft Exchange V6.0.4417.0 Message-ID: Thread-Topic: [Caml-list] Caml 3.01 : pb with include Thread-Index: AcCrqmlpgYPb9SWMR4KdcwtdVurP2gGXdUvw From: "Dave Berry" To: "Xavier Leroy" , "Andreas Rossberg" Cc: , "Christophe Raffalli" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I can add a little background to Xavier's remark about SML'97. One of the main changes in SML'97 from SML'90 was the removal of the "stamp-based" notion of structure sharing (where two structures were shared only if they were exactly the same structure). In an early draft this change went so far as to remove the structure sharing syntax entirely. =20 After some discussion, the syntax was retained, and interpreted purely as a shorthand for sharing all the (flexible) types in the structures. This was partly for backwards compatibility, which is why the SML'97 standard didn't add a "where structure" form analogous to "where type". (SML/NJ allows this as an extension to the language, and I think other implementations may have picked this up). I find the structure sharing syntax genuinely useful. As an example, if you have a module containing all the (recursive) datatypes of an abstract syntax, and you use this file in many other modules, it's useful to specify that the types are shared using a single line instead of having to add a sharing constraint for each type. The risk of keeping the syntax is that people might interpret it in a way that is subtly different from what is intended -- witness the confusion in this case. But I think the gain outweighs the cost, provided that the intended definition is clearly explained. Dave. -----Original Message----- From: Xavier Leroy [mailto:Xavier.Leroy@inria.fr] Sent: Tuesday, March 13, 2001 10:32 To: Andreas Rossberg Cc: caml-list@inria.fr; Christophe Raffalli Subject: Re: [Caml-list] Caml 3.01 : pb with include I agree with you that the most natural interpretation of the "with module" constraint is to stand for a bunch of "with type" constraints on the type components of the modules. With this interpretation, the current behavior is a bug. SML'97 also interprets sharing constraints between structures as the implied sharing constraints between the type components of these modules. ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr