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 KAA28226; Mon, 18 Mar 2002 10:01:29 +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 KAA26824 for ; Mon, 18 Mar 2002 10:01:28 +0100 (MET) Received: from mel-rto6.wanadoo.fr (smtp-out-6.wanadoo.fr [193.252.19.25]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g2I91S912674 for ; Mon, 18 Mar 2002 10:01:28 +0100 (MET) Received: from mel-rta5.wanadoo.fr (193.252.19.122) by mel-rto6.wanadoo.fr; 18 Mar 2002 10:01:28 +0100 Received: from debian (80.8.75.125) by mel-rta5.wanadoo.fr; 18 Mar 2002 10:01:21 +0100 Received: from moi by debian with local (Exim 3.35 #1 (Debian)) id 16mt18-0000X8-00 for ; Mon, 18 Mar 2002 10:01:22 +0100 To: caml-list@inria.fr Subject: Re: [Caml-list] Functorizing large collections of modules References: <1016424584.26193.42.camel@dragonfly.localdomain> From: Remi VANICAT Date: 18 Mar 2002 10:01:22 +0100 In-Reply-To: <1016424584.26193.42.camel@dragonfly.localdomain> Message-ID: <87vgbu2qsd.dlv@wanadoo.fr> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk "Yaron M. Minsky" writes: > This seems messy and kind of silly. Conceptually what I want is a > single structure like this: > > module Library(ZZp:ZZpSig) = > struct > > module Foo = > struct ... end > > module Bar = > struct ... end > > ... > > end > > That way, all the interior modules (Foo, Bar) get to reference the same > ZZp, without having to functorize the individual modules. So, what I'd > like is to be able to do this without sticking the modules Foo and Bar > into the same single large unmanageable file. you can call the functor in a bigger functor : file foo.ml module Make(ZZp:ZZpSig) = struct ... end file bar.ml module Make(ZZp:ZZpSig) = struct ... end file library.ml module Make(ZZp:ZZpSig)= struct module Foo = Foo.Make(ZZp) module Bar = Bar.Make(ZZp) end -- Rémi Vanicat vanicat@labri.u-bordeaux.fr http://dept-info.labri.u-bordeaux.fr/~vanicat ------------------- 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