Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Gabriel Kerneis <kerneis@pps.jussieu.fr>
To: caml-list@inria.fr
Subject: [Caml-list] Recursive polymorphic variants
Date: Tue, 10 Apr 2012 15:51:50 +0200	[thread overview]
Message-ID: <20120410135150.GD27094@kerneis.info> (raw)

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

             reply	other threads:[~2012-04-10 13:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 13:51 Gabriel Kerneis [this message]
2012-04-10 13:57 ` David House
2012-04-10 14:39   ` Romain Bardou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120410135150.GD27094@kerneis.info \
    --to=kerneis@pps.jussieu.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox