caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques GARRIGUE <garrigue@math.nagoya-u.ac.jp>
To: eliot@generation.net
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Re: records with polymorphic variants?
Date: Mon, 05 Mar 2007 17:01:48 +0900 (JST)	[thread overview]
Message-ID: <20070305.170148.2004170112.garrigue@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <45EBAA19.6030605@generation.net>

From: Eliot Handelman <eliot@generation.net>
> Martin Jambon wrote:
> >
> > You can do this directly if you prefer:
> >
> > type 'a f = 'a
> >   constraint 'a = [> `A of int ]
> 
> This is exactly what I was trying to do in the first place.
> Where exactly is the main documentation for this syntax? Not in
> JG's papers, unless I've missed something, as is possible.

It's not in my papers, because it is a rather subtle feature of the
type system, and is not directly related to type inference. It should
be in Vouillon&Remy's paper about objects.

It is documented in the manual, at the very end of section 6.8.1.
There are some examples involving objects (using the class syntax) in
section 3.10 of the tutorial.

Jacques Garrigue


      parent reply	other threads:[~2007-03-05  8:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-04  6:03 Eliot Handelman
2007-03-04 12:04 ` [Caml-list] " Lukasz Stafiniak
2007-03-05  1:24   ` Jacques Garrigue
2007-03-04 12:08 ` Dmitri Boulytchev
2007-03-04 14:22 ` Zheng Li
2007-03-04 16:24   ` [Caml-list] " Lukasz Stafiniak
2007-03-04 16:50     ` Eliot Handelman
2007-03-04 21:02     ` Martin Jambon
2007-03-05  5:26       ` Eliot Handelman
2007-03-05  5:47         ` Martin Jambon
2007-03-05  8:01         ` Jacques GARRIGUE [this message]

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=20070305.170148.2004170112.garrigue@math.nagoya-u.ac.jp \
    --to=garrigue@math.nagoya-u.ac.jp \
    --cc=caml-list@inria.fr \
    --cc=eliot@generation.net \
    /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).