From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id NAA19424 for caml-redistribution; Thu, 12 Sep 1996 13:17:20 +0200 Received: (from xleroy@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id LAA18065; Thu, 12 Sep 1996 11:54:10 +0200 From: Xavier Leroy Message-Id: <199609120954.LAA18065@pauillac.inria.fr> Subject: Re: Merging Modules To: Vladimir.Vyskocil@sophia.inria.fr (Vyskocil Vladimir) Date: Thu, 12 Sep 1996 11:54:10 +0200 (MET DST) Cc: caml-list@pauillac.inria.fr In-Reply-To: <199609060935.LAA01708@psyche.inria.fr> from "Vyskocil Vladimir" at Sep 6, 96 11:35:16 am MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: weis > I have a simple question : can I merge two or more implementation > files and get only one module (because in the standard case, each > file define a new module). I want to split a module implementation > into several files, is it possible ? The Caml language does not support this. In Objective Caml, you can have several sub-modules in one input file, but still all the source code for the top module must reside in one source file. A possibility is to compile each file as a distinct module (M1, M2, ...), then have one extra file/module M that re-exports what is made public to the remainder of the program, which then refers only to M. This is exemplified in the Caml Light user's manual, chapter on camllibr. Another possibility is to generate the module implementation from several input files in your Makefile, using "cat", "cpp", or whatever external tool does the job. Regards, - Xavier Leroy