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 NAA24528; Sat, 28 Feb 2004 13:30:58 +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 NAA24455 for ; Sat, 28 Feb 2004 13:30:57 +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 i1SCUuae032606 for ; Sat, 28 Feb 2004 13:30:56 +0100 Received: from www-data by tonto with local (Exim 3.36 #1 (Debian)) id 1Ax3cK-0004iC-00 for ; Sat, 28 Feb 2004 09:30:52 -0300 Received: from 139.229.3.218 (SquirrelMail authenticated user andrew) by localhost with HTTP; Sat, 28 Feb 2004 09:30:52 -0300 (CLST) Message-ID: <56125.139.229.3.218.1077971452.squirrel@localhost> Date: Sat, 28 Feb 2004 09:30:52 -0300 (CLST) Subject: [Caml-list] Newbie: Separate compilation of interfaces, modules From: "andrew cooke" To: "ocaml list" 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; newbie:01 conceptual:01 mli:01 mli:01 gallery:99 implements:01 interfaces:01 signatures:02 modules:02 modules:02 interface:03 compilation:04 somewhere:04 define:05 define:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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