English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Camlp4 3.01 released
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-03-13 (10:36)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: [Caml-list] Caml 3.01 : pb with include
> Like in the case of Group_morphism above, SG1 and SG2 contain an inv
> member in this signature. I think this semantics of module constraints
> is not right - it should not extend subsignatures, only propagate type
> identities. This not exactly is a bug, but IMHO not what you want in
> most situations - at least not in this particular situation. Was there a
> particular motivation to design the language this way?

I can't remember, but the design and implementation of "with module"
dates back to 1996, so my memory is a bit hazy :-)

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.

There might be examples of signature surgery where the current
behavior is useful (I need to go back to my examples to check),
but I agree it's confusing.

- Xavier Leroy
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr