From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: Jordan W <jordojw@gmail.com>
Cc: OCaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Row-polymorphic type declarations
Date: Wed, 11 Jun 2014 11:20:44 +0900 [thread overview]
Message-ID: <89099A42-D20A-40E9-B210-C493DB1068CF@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <CAPOA5_7swJ1tQ+S63TAHE+hXxQp8uqiesHJAFxkcNvSxgjQ_6g@mail.gmail.com>
Others answered your questions, but they have missed what I think is probably just a typo:
On 2014/06/10 03:50, Jordan W wrote:
> 4. It appears there are two ways to write the row-polymorphic type annotation:
> type 'a t = ([> `Red ] as 'a) and type 'a t constraint 'a = [> `Red ]. Why are there two ways and what are the advantages?
type 'a t = ([> `Red ] as 'a) and type 'a t = 'a constraint 'a = [> `Red ] are equivalent,
where the parameter is just a trick to allow a row variable inside a definition,
but type 'a t constraint 'a = [> `Red ] is an abstract type, whose parameter is constrained,
so it is different from any other type.
Jacques
prev parent reply other threads:[~2014-06-11 2:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-09 18:50 Jordan W
2014-06-10 9:25 ` Goswin von Brederlow
2014-06-10 14:13 ` Leo White
2014-06-11 2:20 ` 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=89099A42-D20A-40E9-B210-C493DB1068CF@math.nagoya-u.ac.jp \
--to=garrigue@math.nagoya-u.ac.jp \
--cc=caml-list@inria.fr \
--cc=jordojw@gmail.com \
/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