caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Alain Frisch <frisch@clipper.ens.fr>
Cc: Caml list <caml-list@inria.fr>
Subject: Re: first class modules (was: alternative module systems)
Date: Mon, 8 Jan 2001 11:42:03 +0100	[thread overview]
Message-ID: <20010108114203.E13356@pauillac.inria.fr> (raw)
In-Reply-To: <Pine.GSO.4.04.10101070012560.18239-100000@clipper.ens.fr>; from frisch@clipper.ens.fr on Sun, Jan 07, 2001 at 01:20:42AM +0100

> a few month ago, Markus Mottl pointed to this mailing list the work by
> Claudio Russo on first class modules. There were no answer about plans to
> implement such a system for OCaml.

Well, it seems like Russo's first-class modules could be added with
relatively little effort, if there is a sufficient need for them.
(In OCaml and also in Luc Maranget's Hevea, I can see the need for
conditionally selecting between several structures having the same
signature; first-class modules give almost this but not quite.)

> As I see it, the main issue is the unification problem < S > = < T >.

Right.  The last time we met, I asked Claudio about type inference
issues for his scheme.  Basically, to "unify" <S> and <T>, you just
check that the module types S and T are equivalent (using the same
notion of equivalence that OCaml currently uses to for checking
compatibility between manifest module type declarations, see the predicate
Includemod.check_modtype_equiv in the OCaml sources).

If <S> and <T> contain value components with non-generalized type
variables, it is necessary to unify them along the way, and Claudio
alluded to potential traps here.  However, I'm not even sure this can
happen at all in OCaml since module types cannot contain n-g type vars
and "pack" requires an explicit module type constraint.

> (as a side effect, we get the local "open ... in ...")

I'm not sure I follow you here.  Did you mean that "open" and "pack"
subsume "let module ... in ..."?  This I agree with.

- Xavier Leroy



  parent reply	other threads:[~2001-01-08 11:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-07  0:20 Alain Frisch
2001-01-07 23:26 ` Markus Mottl
2001-01-08 10:42 ` Xavier Leroy [this message]
2001-01-10  0:40   ` Brian Rogoff
2001-01-08 10:45 Claudio Russo
2001-01-08 12:17 ` Alain Frisch
2001-01-08 13:48 Claudio Russo
2001-01-08 14:59 Claudio Russo
2001-01-08 15:11 Claudio Russo
2001-01-09 13:36 Claudio Russo
2001-01-10 10:32 Claudio Russo

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=20010108114203.E13356@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=frisch@clipper.ens.fr \
    /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).