From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA19948; Thu, 29 Nov 2001 09:38:51 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA19892 for ; Thu, 29 Nov 2001 09:38:50 +0100 (MET) Received: from d12lmsgate-3.de.ibm.com (d12lmsgate-3.de.ibm.com [195.212.91.201]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id fAT8cnH20893 for ; Thu, 29 Nov 2001 09:38:49 +0100 (MET) Received: from d12relay01.de.ibm.com (d12relay01.de.ibm.com [9.165.215.22]) by d12lmsgate-3.de.ibm.com (1.0.0) with ESMTP id JAA19580 for ; Thu, 29 Nov 2001 09:38:48 +0100 Received: from d10hubm1.telaviv.ibm.com (d10ml001.telaviv.ibm.com [9.148.216.55]) by d12relay01.de.ibm.com (8.11.1m3/NCO v5.01) with ESMTP id fAT8d2R111236 for ; Thu, 29 Nov 2001 09:39:03 +0100 Importance: Normal Subject: [Caml-list] Packaging tool To: caml-list@inria.fr X-Mailer: Lotus Notes Release 5.0.7 March 21, 2001 Message-ID: From: "Ohad Rodeh" Date: Thu, 29 Nov 2001 10:39:03 +0200 X-MIMETrack: Serialize by Router on D10ML001/10/M/IBM(Release 5.0.8 |June 18, 2001) at 29/11/2001 10:39:09 MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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