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 OAA25849; Sat, 28 Feb 2004 14:04:17 +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 OAA25865 for ; Sat, 28 Feb 2004 14:04:16 +0100 (MET) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from tonto (CM-lcon6-153-5.cm.vtr.net [200.83.153.5]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i1SD4Eae003495 for ; Sat, 28 Feb 2004 14:04:15 +0100 Received: from www-data by tonto with local (Exim 3.36 #1 (Debian)) id 1Ax48X-0004lO-00; Sat, 28 Feb 2004 10:04:09 -0300 Received: from 139.229.3.218 (SquirrelMail authenticated user andrew) by localhost with HTTP; Sat, 28 Feb 2004 10:04:09 -0300 (CLST) Message-ID: <56216.139.229.3.218.1077973449.squirrel@localhost> In-Reply-To: <56125.139.229.3.218.1077971452.squirrel@localhost> References: <56125.139.229.3.218.1077971452.squirrel@localhost> Date: Sat, 28 Feb 2004 10:04:09 -0300 (CLST) Subject: To beginners list Re: [Caml-list] Newbie: Separate compilation of interfaces, modules From: "andrew cooke" To: "ocaml list" , ocaml_beginners@yahoogroups.com Reply-To: andrew@acooke.org User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal 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; beginners:01 caml-list:01 newbie:01 beginners:01 conceptual:01 mli:01 mli:01 gallery:99 bug:01 faq:01 faq:01 beginner's:01 gallery:99 bin:01 implements:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Ah, sorry - I've just seen the pointer to the beginners list. Will repost this question there (but not the one on polymorphic variants). Cheers, Andrew andrew cooke said: > > Hi, > > I can't work out how to structure the following in files (there are > examples in the documentation, but all seem to be for interactive work). > I don't know if the problem is conceptual (not understanding modules, > signatures etc) or practical (don't know what to type). > > I have an interface, PersistentArray, that I define in PersistentArray.mli > > Then I have an implementation, BinaryTreeArray, that I code in > BinaryTree.ml > > But where do I put the information that BinaryTreeArray implements > PersistentArray? What should go in BinaryTreeArray.mli so that I can use > it as a particular implementation of PersistentArray? > > The idea is that later I can define some other implementation, say > TrieArray, that can be used as the PersistentArray implementation without > changing any more code than is necessary (preferably just one line > somewhere). > > Thanks, > Andrew > > -- > __ _ __ ___ ___| |_____ work web site: > http://www.ctio.noao.edu/~andrew > / _` / _/ _ \/ _ \ / / -_) personal web site: > http://www.acooke.org/andrew > \__,_\__\___/\___/_\_\___| personal gallery: > http://www.acooke.org/pancito > > ------------------- > 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 > > -- __ _ __ ___ ___| |_____ work web site: http://www.ctio.noao.edu/~andrew / _` / _/ _ \/ _ \ / / -_) personal web site: http://www.acooke.org/andrew \__,_\__\___/\___/_\_\___| personal gallery: http://www.acooke.org/pancito ------------------- 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