caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Hendrik Tews <tews@os.inf.tu-dresden.de>
To: caml-list@inria.fr
Subject: difference of [< `A of & int] and [< `A of int] ?
Date: Tue, 21 Sep 2010 14:16:12 +0200	[thread overview]
Message-ID: <19608.41484.202892.641777@blau.inf.tu-dresden.de> (raw)

Hi,

I am trying to grasp the camlp4 constructor for types TyOfAmp,
which is declared as 

    | TyOfAmp of loc and ctyp and ctyp (* t of & t *)

in camlp4/Camlp4/Camlp4Ast.partial.ml. It is used in the ast of 
``[< `A of & int]''.

Can somebody explain the meaning of [< `A of & int]? What is the
difference between [< `A of & int]  and  [< `A of int] ?


And why does 

  type 'a t = [< `A of & int] as 'a

produce the weird error 

File "test/x.ml", line 1, characters 0-1:
Error: The implementation test/x.ml
       does not match the interface (inferred signature):
       Type declarations do not match:
         type 'a t = 'a constraint 'a = [< `A of & int ]
       is not included in
         type 'a t = 'a constraint 'a = [< `A of & int ]

? Is this a bug or a feature?

Bye,

Hendrik


             reply	other threads:[~2010-09-21 12:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-21 12:16 Hendrik Tews [this message]
2010-09-21 12:41 ` [Caml-list] " Jacques Garrigue
2010-09-21 13:35   ` Hendrik Tews

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=19608.41484.202892.641777@blau.inf.tu-dresden.de \
    --to=tews@os.inf.tu-dresden.de \
    --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;
as well as URLs for NNTP newsgroup(s).