From: Judicael Courant <Judicael.Courant@lri.fr>
To: Xavier Leroy <Xavier.Leroy@inria.fr>
Cc: Charles Martin <martin@chasm.org>, caml-list@inria.fr
Subject: Re: Module hierarchies
Date: Mon, 08 Jan 2001 15:01:25 +0100 [thread overview]
Message-ID: <3A59C835.18B126AD@lri.fr> (raw)
In-Reply-To: <20010108112417.D13356@pauillac.inria.fr>
Xavier Leroy a écrit :
>
> I still have no idea how hard it is to implement Judicaël's scheme,
> though.
>
What about the following idea (close to Vitaly Lugovsky's suggestion):
- the name of a compilation_unit would be a string list instead
of a string.
- ocamlnewmagiccommand -o lib.cma a.cmo b.cmo c.cmo
would rename the name of "A", "B" and "C" to [ "Lib" ; "A" ],
[ "Lib" ; "B" ] and [ "Lib" ; "C"], would compile a small
lib.ml with contents "module A = A;; module B = B;; module
C=C;;" into lib.cmo and would replace references of
a.cmo, b.cmo, c.cmo and lib.cmo to A, B, C by references to
["Lib"; "A" ], [ "Lib"; "B" ], [ "Lib"; "C" ].
Then, it would just pack together these modules into one
single library.
I am not really familiar with ocamlc source code but from what I can
read in bytecode/emitcode.mli, I guess implementing the two needed
operations (renaming a compilation unit and renaming some references of
a compilation unit to other compilation units) would be quite easy. Did
I miss anything ?
Judicaël.
--
Judicael.Courant@lri.fr, http://www.lri.fr/~jcourant/
(+33) (0)1 69 15 64 85
"Montre moi des morceaux de ton monde, et je te montrerai le mien"
Tim, matricule #929, condamné à mort.
http://rozenn.picard.free.fr/tim.html
next prev parent reply other threads:[~2001-01-08 17:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-06 19:32 Charles Martin
2001-01-07 10:10 ` Mattias Waldau
2001-01-07 16:07 ` Michael Hicks
2001-01-09 8:03 ` John Max Skaller
2001-01-07 20:37 ` Vitaly Lugovsky
2001-01-08 10:24 ` Xavier Leroy
2001-01-08 14:01 ` Judicael Courant [this message]
2001-01-09 16:46 Dave Berry
2001-01-10 9:40 ` Markus Mottl
2001-01-09 17:34 Daniel Ortmann
2001-01-09 18:06 Dave Berry
2001-01-10 20:12 ` Gerd Stolpmann
2001-01-11 12:53 Dave Berry
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=3A59C835.18B126AD@lri.fr \
--to=judicael.courant@lri.fr \
--cc=Xavier.Leroy@inria.fr \
--cc=caml-list@inria.fr \
--cc=martin@chasm.org \
/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