caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Dave Berry" <Dave@kal.com>
To: "Xavier Leroy" <Xavier.Leroy@inria.fr>,
	"Andreas Rossberg" <rossberg@ps.uni-sb.de>
Cc: <caml-list@inria.fr>,
	"Christophe Raffalli" <Christophe.Raffalli@univ-savoie.fr>
Subject: RE: [Caml-list] Caml 3.01 : pb with include
Date: Wed, 21 Mar 2001 13:25:25 -0000	[thread overview]
Message-ID: <DD7356599083414BA450E3DCC4119B8B040EB8@NT.kal.com> (raw)

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.  

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


             reply	other threads:[~2001-03-21 13:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-21 13:25 Dave Berry [this message]
2001-03-21 16:15 ` Judicael Courant
  -- strict thread matches above, loose matches on Subject: below --
2001-03-23 12:02 Dave Berry
2001-03-27  9:19 ` Judicael Courant
2001-03-11  5:04 [Caml-list] Camlp4 3.01 released Daniel de Rauglaudre
2001-03-12 11:52 ` [Caml-list] Caml 3.01 : pb with include Christophe Raffalli
2001-03-12 17:13   ` Andreas Rossberg
2001-03-13 10:32     ` Xavier Leroy
2001-03-13 11:18       ` Andreas Rossberg
2001-03-13 11:23       ` Christophe Raffalli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DD7356599083414BA450E3DCC4119B8B040EB8@NT.kal.com \
    --to=dave@kal.com \
    --cc=Christophe.Raffalli@univ-savoie.fr \
    --cc=Xavier.Leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=rossberg@ps.uni-sb.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).