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 GAA12173; Wed, 23 Oct 2002 06:16:21 +0200 (MET DST) 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 GAA11781 for ; Wed, 23 Oct 2002 06:16:19 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from opus.davidb.org (24-165-4-233.san.rr.com [24.165.4.233]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9N4GI514336; Wed, 23 Oct 2002 06:16:18 +0200 (MET DST) Received: from davidb by opus.davidb.org with local (Exim 3.31 #1 (Debian)) id 184Cw7-0000I2-00; Tue, 22 Oct 2002 21:16:03 -0700 Date: Tue, 22 Oct 2002 21:16:03 -0700 From: David Brown To: Chris Hecker Cc: Sven Luther , Xavier Leroy , Yang Shouxun , caml-list@inria.fr Subject: Re: [Caml-list] Error during partial linking Message-ID: <20021023041603.GA1069@opus.davidb.org> References: <20021022190056.A28301@pauillac.inria.fr> <20021022104215.A9456@pauillac.inria.fr> <200210221333.36858.yangsx@fltrp.com> <20021022104215.A9456@pauillac.inria.fr> <200210221737.56370.yangsx@fltrp.com> <4.3.2.7.2.20021022090136.035ec2f8@mail.d6.com> <20021022190056.A28301@pauillac.inria.fr> <4.3.2.7.2.20021022163353.0306a5d0@mail.d6.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4.3.2.7.2.20021022163353.0306a5d0@mail.d6.com> User-Agent: Mutt/1.4i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, Oct 22, 2002 at 04:38:48PM -0700, Chris Hecker wrote: > >That is what -pack is for, isn't it ? Has anyone though of a way to actually put submodules in separate files. Ada allows this by placing the modules in separate files (you can still code the submodule (package) in the one file). The GNU Ada compiler uses naming conventions to resolve this. For example: A file std-list.ml would be the module Std.List We have to figure out how this interacts with the std.ml module, but this is the general idea. This is actually the single feature I've wished the ocaml module system had. The Ada approach also allows you to add submodules after the fact. One proposal would be that before compiling std-list.ml, you have to compile std.ml. When std-list.cmo is linked, the new module (List) is added to the std's names. There is a possibility of duplicate names, but camls seems to handle that normally by just replacing the previous definition. Dave Brown ------------------- 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