Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Keiko Nakata <keiko@kurims.kyoto-u.ac.jp>
To: caml-list@inria.fr
Subject: type parameter of polymorphic variant types
Date: Thu, 14 Jul 2005 13:03:08 +0900 (JST)	[thread overview]
Message-ID: <20050714.130308.68552987.keiko@kurims.kyoto-u.ac.jp> (raw)

Hello.

Why I cannot have these type definitions?

#type ('a,'b) t = ['a | 'b] constraint 'a =[>] constraint 'b = [>];;
#type ('a,'b) t = A of 'a * 'b constraint 'a = [>'b];;


Moreover, for the type definition 

#type ('a, 'b) u = 'a constraint 'a = [>`A | 'b] ;;

the type checker reports an error 

  Characters 48-50:
    type ('a,'b) t = A of 'a * 'b constraint 'a = [>'b];;
                                                    ^^
  The type 'a is not a polymorphic variant type

Is this a kind of typo of 'a for 'b or an intention?


Regards,
Keiko.


             reply	other threads:[~2005-07-14  4:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-14  4:03 Keiko Nakata [this message]
2005-07-14  6:42 ` [Caml-list] " Jacques Garrigue

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=20050714.130308.68552987.keiko@kurims.kyoto-u.ac.jp \
    --to=keiko@kurims.kyoto-u.ac.jp \
    --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