Re: [Caml-list] Recursive polymorphic variants

2012-04-10 Thread Romain Bardou
Le 10/04/2012 15:57, David House a écrit : On Tue, Apr 10, 2012 at 2:51 PM, Gabriel Kerneis wrote: Is there any work-around? Depending on your requirements, just wrapping up the recursive copy of [t] in another constructor might do: type t = [ `A of [ `B | `C of t ]] I don't know why your o

Re: [Caml-list] Recursive polymorphic variants

2012-04-10 Thread David House
On Tue, Apr 10, 2012 at 2:51 PM, Gabriel Kerneis wrote: > Is there any work-around? Depending on your requirements, just wrapping up the recursive copy of [t] in another constructor might do: type t = [ `A of [ `B | `C of t ]] I don't know why your original example is disallowed. -- Caml-list

[Caml-list] Recursive polymorphic variants

2012-04-10 Thread Gabriel Kerneis
Hi list, why is this definition allowed: type t = [`A of t] but the following one fails: type t = [`A of [t|`B]] Error: The type constructor t is not yet completely defined Is there any work-around? (My actual example is much larger and complex but I think it boils down to this simpl