caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] type synonym for polymorphic variant
@ 2015-10-01 21:41 Ashish Agarwal
  2015-10-01 21:47 ` Haoyang Wang
  0 siblings, 1 reply; 8+ messages in thread
From: Ashish Agarwal @ 2015-10-01 21:41 UTC (permalink / raw)
  To: Caml List

[-- Attachment #1: Type: text/plain, Size: 364 bytes --]

I've been doing this in some code for years:

type s = [`A | `B]
type t = [s]

but just discovered it works only because the code was passing through
camlp4. Without camlp4, it fails. You can try in utop with and without
doing #camlp4o.

Is there some way to get the above to work without camlp4? AFAICT, the
grammar allows it, so the normal parser is wrong here.

[-- Attachment #2: Type: text/html, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-10-01 22:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-01 21:41 [Caml-list] type synonym for polymorphic variant Ashish Agarwal
2015-10-01 21:47 ` Haoyang Wang
2015-10-01 22:06   ` Ashish Agarwal
2015-10-01 22:23     ` Daniel Bünzli
2015-10-01 22:26       ` Ashish Agarwal
     [not found]     ` <CAJ_epFM9s64QY88MxPW2apF9wgnXTQiJgns9w_dTtVKyvxsGeA@mail.gmail.com>
2015-10-01 22:28       ` Ashish Agarwal
2015-10-01 22:35         ` Daniel Bünzli
2015-10-01 22:41           ` Ashish Agarwal

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).