Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* [Caml-list] Recursive polymorphic variants
@ 2012-04-10 13:51 Gabriel Kerneis
  2012-04-10 13:57 ` David House
  0 siblings, 1 reply; 3+ messages in thread
From: Gabriel Kerneis @ 2012-04-10 13:51 UTC (permalink / raw)
  To: caml-list

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
simple case.)

Many thanks,
-- 
Gabriel Kerneis

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-10 14:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-10 13:51 [Caml-list] Recursive polymorphic variants Gabriel Kerneis
2012-04-10 13:57 ` David House
2012-04-10 14:39   ` Romain Bardou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox