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 QAA15581; Thu, 27 Feb 2003 16:41:44 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA15478 for ; Thu, 27 Feb 2003 16:41:43 +0100 (MET) Received: from fort-point-station.mit.edu (FORT-POINT-STATION.MIT.EDU [18.7.7.76]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h1RFfgT23482; Thu, 27 Feb 2003 16:41:42 +0100 (MET) Received: from central-city-carrier-station.mit.edu (CENTRAL-CITY-CARRIER-STATION.MIT.EDU [18.7.7.72]) by fort-point-station.mit.edu (8.9.2/8.9.2) with ESMTP id KAA23631; Thu, 27 Feb 2003 10:41:41 -0500 (EST) Received: from melbourne-city-street.mit.edu (MELBOURNE-CITY-STREET.MIT.EDU [18.7.21.86]) by central-city-carrier-station.mit.edu (8.9.2/8.9.2) with ESMTP id KAA27312; Thu, 27 Feb 2003 10:39:18 -0500 (EST) Received: from contents-vnder-pressvre.mit.edu (CONTENTS-VNDER-PRESSVRE.MIT.EDU [18.7.16.67]) by melbourne-city-street.mit.edu (8.9.2/8.9.2) with ESMTP id KAA00525; Thu, 27 Feb 2003 10:39:18 -0500 (EST) Received: (from jfc@localhost) by contents-vnder-pressvre.mit.edu (8.9.3) id KAA05673; Thu, 27 Feb 2003 10:39:18 -0500 (EST) Message-Id: <200302271539.KAA05673@contents-vnder-pressvre.mit.edu> To: Xavier Leroy cc: caml-list@inria.fr Subject: [Caml-list] hierarchical modules In-Reply-To: Your message of "Thu, 27 Feb 2003 09:29:23 +0100." <20030227092923.A496@pauillac.inria.fr> Date: Thu, 27 Feb 2003 10:39:18 -0500 From: John Carr Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > The '-pack' mechanism was introduced in 3.06 to support separate > compilation of the submodules. Since it is a recent extension, it's > not yet stable enough to be used widely, but I expect this to change > with time. I meant to send this a long time ago, but I forgot. These are three reasons, from least to most important, why I think the -pack feature implemented in ocaml 3.06 is not sufficient for hierarchical modules. 1. Compiled-in module and file names used for backtrace and assert are not fully qualified when using -pack. I have seen several ambiguous backtraces when I used the same module name in two container modules (i.e. used the same file name in two directories). 2. A module can not be -packed into a container module of the same name. 3. I want a separate interface file for the container module. There are two reasons for this: (a) I want to have global, package, and module scope for names, including making a type used by multiple modules within a directory opaque to other code outside the directory. (b) I don't want to recompile all my other code because a change to the implementation of my module caused the container .cmi file to change. I prefer specifying the container module name on the command line or adding a "package" declaration to the source file as in Java. John Carr ------------------- 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