Browse thread
[Caml-list] recursive variants
[
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: | Miles Egan <miles@c...> |
| Subject: | Re: [Caml-list] recursive variants |
On Sat, May 12, 2001 at 10:58:11AM +0200, Francisco Valverde Albacete wrote: > You don't need a recursive type for this: > > type word = Word of string > type word_list = word list > type phrase = unit -> word list > type phrase_list = phrase list I tried this also, but I couldn't figure out how to type the list that contains both (phrase_list * phrase_list) and (phrase_list * word_list) without grouping them in a single common type. The compiler still rejects the grammar list because its elements are not homogenous. -- miles ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr