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 OAA14713; Fri, 19 Mar 2004 14:56:53 +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 OAA14995 for ; Fri, 19 Mar 2004 14:56:51 +0100 (MET) Received: from sark.cc.gatech.edu (sark.cc.gatech.edu [130.207.7.23]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i2JDuoHd007179 for ; Fri, 19 Mar 2004 14:56:50 +0100 Received: from gaia.cc.gatech.edu (gaia.cc.gatech.edu [130.207.3.8]) by sark.cc.gatech.edu (8.12.10/8.12.8) with ESMTP id i2JDuhfR021653; Fri, 19 Mar 2004 08:56:43 -0500 (EST) Received: (from fernando@localhost) by gaia.cc.gatech.edu (8.12.10/8.12.8) id i2JDugZl012506; Fri, 19 Mar 2004 08:56:42 -0500 (EST) Date: Fri, 19 Mar 2004 08:56:42 -0500 From: Fernando Alegre To: Sven Luther Cc: Richard Jones , caml-list@inria.fr Subject: Re: [Caml-list] Modules and namespaces Message-ID: <20040319135642.GA22254@gaia.cc.gatech.edu> References: <200403191049.27133.wolfgang.mueller2@uni-bayreuth.de> <20040319101931.GA10938@redhat.com> <20040319104514.GA21926@lambda> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040319104514.GA21926@lambda> User-Agent: Mutt/1.4.2.1i X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; alegre:01 gatech:01 caml-list:01 namespaces:01 2004:99 sven:01 luther:01 2004:99 dbi:99 dbi:99 -pack:01 ocamllibdir:01 usr:01 3.07:01 usr:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 231 On Fri, Mar 19, 2004 at 11:45:14AM +0100, Sven Luther wrote: > On Fri, Mar 19, 2004 at 10:19:31AM +0000, Richard Jones wrote: > > It would be quite possible for someone else to write a Dbi module > > located in the -I +anotherdbi directory. No conflict would arise > > unless some strange person wanted to use both types of Dbi module > > in their program - an unlikely occurrence presumably. > > You can achieve this by using the -pack option when creating libraries. > Sure it has still some problems, but it is the way to go to solve this > problem. > > What is really missing is support for more than one OCAMLLIBDIR, in > order to be able to easily separate the libraries installed by your > package manager (/usr/lib/ocaml/3.07 for debian), by the one installed > locally by the sysadmin (/usr/local/lib/ocaml/3.07 for debian), and the > user specific ones (less important though, but still usefull). It seems that you both also miss the -pre_open and -stdlib switches in the compiler. A pre_open switch would take care of 2 modules called Dbi without modifying them: (* wrapper1.ml *) module DbiVendor1 = Dbi ==== (* wrapper2.ml *) module DbiVendor2 = Dbi === ocamlc -c -I path_to_vendor1 wrapper1.ml -I path_to_vendor2 wrapper2.ml ... === A stdlib switch is what Sven is asking above. Both switches, along with pack, is all we need to create our custom packaging/namespace management systems independently of INRIA. What do you think? These switches would also be policy-neutral, so that nobody is _forced_ to use GODI, debian packages or any other middleware if they do not fit their environment, but still allow people to use external libraries without fear of namespace clashes. Fernando ------------------- 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