From: "Yaron M. Minsky" <yminsky@cs.cornell.edu>
To: Alain Frisch <frisch@clipper.ens.fr>
Cc: Francois Pottier <francois.pottier@inria.fr>,
Caml list <caml-list@inria.fr>
Subject: Re: [Caml-list] Functorizing large collections of modules
Date: 20 Mar 2002 07:59:20 -0500 [thread overview]
Message-ID: <1016629161.10273.60.camel@dragonfly.localdomain> (raw)
In-Reply-To: <Pine.SOL.4.44.0203201137040.7739-100000@clipper.ens.fr>
On Wed, 2002-03-20 at 06:24, Alain Frisch wrote:
> On Wed, 20 Mar 2002, Francois Pottier wrote:
>
> > > Another example of this weakness is the lack of support for namespaces.
> >
> > It is true that O'Caml has little support for resolving name conflicts
> > in a modular way, because the semantics of the module language is too
> > intimately tied with the underlying file system. I suppose a CM-like tool
> > would help, but I think this issue is separate from the one above.
>
>
> It seems that the new -pack feature of ocamlc/ocamlopt (see CVS) addresses
> the issue. What kind of extra support for namespace would be needed ?
>
> Concerning the global parametrization, maybe a variation around -pack
> could solve the problem. ocamlc -pack would take a list of modules
> A1,...An (.cmo+.cmi) and a list of interfaces S1,...,Sm (.cmi) and produce
> a functor parametrized by interfaces S1,...Sm and returning a
> bundled version of A1,...,An
This seems like a plausible solution, although ideally I think the shape
of this multi-module functor should be described in a file, not just on
the command-line. So you could have a file with a kind of dummy
functor:
library.ml
module M(ZZp:ZZpSig) =
struct
end
and the compiler would add the appropriate modules to the end of the
struct, in whatever order is specified on the command-line.
One wonders, of course, whether this can easily be implemented without
tossing out separate compilation. If not, then maybe some kind of hack
where you do a manual substitution to make this work would be the right
idea, as suggested by Francois.
y
--
|--------/ Yaron M. Minsky \--------|
|--------\ http://www.cs.cornell.edu/home/yminsky/ /--------|
Open PGP --- KeyID B1FFD916 (new key as of Dec 4th)
Fingerprint: 5BF6 83E1 0CE3 1043 95D8 F8D5 9F12 B3A9 B1FF D916
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
prev parent reply other threads:[~2002-03-20 12:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-18 4:09 Yaron M. Minsky
2002-03-18 9:01 ` Remi VANICAT
2002-03-18 12:19 ` Yaron M. Minsky
2002-03-18 12:52 ` Sami Mäkelä
2002-03-19 23:27 ` Yaron M. Minsky
2002-03-19 23:44 ` Fermin Reig
2002-03-20 9:09 ` Francois Pottier
2002-03-20 11:24 ` Alain Frisch
2002-03-20 12:59 ` Yaron M. Minsky [this message]
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=1016629161.10273.60.camel@dragonfly.localdomain \
--to=yminsky@cs.cornell.edu \
--cc=caml-list@inria.fr \
--cc=francois.pottier@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