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 PAA01777; Wed, 6 Jun 2001 15:17:29 +0200 (MET DST) 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 PAA00966 for ; Wed, 6 Jun 2001 15:17:28 +0200 (MET DST) Received: from staff.cs.usyd.edu.au (staff.cs.usyd.edu.au [129.78.8.1]) by concorde.inria.fr (8.11.1/8.10.0) with SMTP id f56DHOL13892 for ; Wed, 6 Jun 2001 15:17:26 +0200 (MET DST) Received: from hons.cs.usyd.edu.au. by staff.cs.usyd.edu.au.; Wed, 06 Jun 2001 23:17:21 +1000 Received: from localhost (mrak@localhost) by hons.cs.usyd.edu.au (8.9.3/8.9.3) with ESMTP id XAA01939 for ; Wed, 6 Jun 2001 23:17:20 +1000 X-Authentication-Warning: hons.cs.usyd.edu.au: mrak owned process doing -bs Date: Wed, 6 Jun 2001 23:17:20 +1000 (EST) From: Mark Wotton cc: caml-list@inria.fr Subject: Re: [Caml-list] question about modules In-Reply-To: <20010606120127.A30717@miss.wu-wien.ac.at> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Thank you very much for your informative replies. I understand more clearly now, I think. I have one more question to do with patternmatching on modules. Currently, I have this: module Deque = RealTimeDeque(struct let c = 3 end);; type 'a deque = 'a Deque.queue type tree = CompTree of tree deque * tree deque;; let dcons = Deque.cons;; let dhead = Deque.head;; let dtail = Deque.tail;; let dsnoc = Deque.snoc;; let dlast = Deque.last;; let dinit = Deque.init;; ... let rec lastTree t acc = match t with (* CompTree(Deque.empty, d2) -> acc *) CompTree(d1,d2) -> let newTree = CompTree(dinit d1, dcons (dhead d1) d2) in lastTree newTree (newTree::acc) I'd like to match the empty Deque, but this gives me a syntax error when i uncomment the third line. What should I be doing here? Apologies for asking so many simple/silly questions. I'm still coming to grips with Ocaml. Regards, Mark ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr