Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Packaging tool
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Ohad Rodeh <ORODEH@i...>
Subject: [Caml-list] Packaging tool
There have been long discussions on the list about packaging.
I have a relatively simple suggestion; which we currently use in our system
I think people have suggested something similar in the past, though I felt
discussion got sidtracked.

Suppose you have a list of modules: A, B, C, and you which to package them
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";

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 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



    The tool can be found in ensemble/tools/, 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

Bug reports:  FAQ:
To unsubscribe, mail  Archives: