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 LAA28065; Wed, 6 Jun 2001 11:01:45 +0200 (MET DST) 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 LAA27870 for ; Wed, 6 Jun 2001 11:01:44 +0200 (MET DST) Received: from staff.cs.usyd.edu.au (staff.cs.usyd.edu.au [129.78.8.1]) by nez-perce.inria.fr (8.11.1/8.10.0) with SMTP id f5691fn23082 for ; Wed, 6 Jun 2001 11:01:42 +0200 (MET DST) Received: from hons.cs.usyd.edu.au. by staff.cs.usyd.edu.au.; Wed, 06 Jun 2001 19:01:24 +1000 Received: from localhost (mrak@localhost) by hons.cs.usyd.edu.au (8.9.3/8.9.3) with ESMTP id TAA31439 for ; Wed, 6 Jun 2001 19:01:23 +1000 X-Authentication-Warning: hons.cs.usyd.edu.au: mrak owned process doing -bs Date: Wed, 6 Jun 2001 19:01:23 +1000 (EST) From: Mark Wotton cc: caml-list@inria.fr Subject: [Caml-list] question about modules In-Reply-To: <20010606105106.A7120@lambda.u-strasbg.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, I'm using the translation of Chris Okasaki's code that Markus Mottl has provided, and I've got a question about the way modules work. I had assumed that it worked in a similar way to lists: ie, i write "int list", i'd assumed I'd do something similar with Deques, "int Deque" for instance. Obviously this doesn't work: I understand that once I've added an element to a Deque, the polymorphic type is fixed, so there's no worries about type safety there; however, I had something like this: type tree = CompTree of tree list * tree list;; before I realised that I needed deques. It would seem that the translation is to type tree = CompTree of Deque * Deque;; but it worries me a little that I'm no longer explicitly showing the recursive structure of my tree in my data type. Am I worrying unnecessarily? Is there a way around this problem, if it is a problem? Regards, Mark ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr