[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Mark Wotton <mrak@c...> |
| Subject: | [Caml-list] question about modules |
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