caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Ohad Rodeh" <ORODEH@il.ibm.com>
To: caml-list@inria.fr
Subject: [Caml-list] Packaging tool
Date: Thu, 29 Nov 2001 10:39:03 +0200	[thread overview]
Message-ID: <OFA8DC375D.C5D93797-ONC2256B13.002E1632@telaviv.ibm.com> (raw)

There have been long discussions on the list about packaging.
I have a relatively simple suggestion; which we currently use in our system
(Ensemble).
I think people have suggested something similar in the past, though I felt
the
discussion got sidtracked.

Suppose you have a list of modules: A, B, C, and you which to package them
in
a module X.  What I would like to do, regardless of how A, B, and C were
compiled and whether they are directories or not, is  to package them
in a module X. This would allow an application that link with a library
containing A B and C
to write:

   open X
   .....
   A.f  1 2;
   B.g "adsf" "xxx";
   etc.

you get the picture.

Such an automatic tool does not exist for Caml yet, so we wrote something
simple our
self (credit goes to Mark Hayden). What the tool does is to take modules A,
B, and C, and
create a file named X.ml that looks like this:

   module A = A
   module B  = B
   module C = C

Then, a library (X.cma, or X.cmxa) containing A,B,C is created, and
applications can then work as above.
This suffices for us, however, there is a caveat: an application using the
library can
also simply use A without the X, so that if A contains type t, then X.A.t
and A.t are
both legal.

I'd like such a tool to be standard (part of Caml), as it is simple enough
and does not force the
developer to take any design decisions that he is not willing to take. I
also wonder how the above problem can be
fixed.

   thoughts?

   Ohad.

PS
    The tool can be found in ensemble/tools/emrg.ml+mkutil.ml, it also
merges the .mli files: A.mli, B.mli, C.mli, with
the documentation, so that X.mli contains all the documentation of your
library.


-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


             reply	other threads:[~2001-11-29  8:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-29  8:39 Ohad Rodeh [this message]
2002-01-03 14:15 ` Xavier Leroy
2002-01-03 15:29   ` malc
2002-01-03 21:00     ` Dmitry Bely
2002-01-09 16:14 Ohad Rodeh

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=OFA8DC375D.C5D93797-ONC2256B13.002E1632@telaviv.ibm.com \
    --to=orodeh@il.ibm.com \
    --cc=caml-list@inria.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).