Re: type variable lexical syntax

Michael Norrish <[email protected]> Mon, 22 Apr 2013 18:09:56 +1000
Newsgroups gmane.comp.lang.ml.mlton.devel,gmane.comp.lang.ml.polyml.general
Message-ID <[email protected]>
On 22/04/13 4:29 PM, Andreas Rossberg wrote:
> On Apr 22, 2013, at 03:31 , Michael Norrish
> <[email protected]> wrote:
>> Is the following really supposed to be acceptable? Both Poly/ML and
>> mlton accept it without complaining:
>> 
>> datatype '+ = C | D;
>> 
>> (Moscow ML rejects it.  mlton and Poly/ML treat it as the
>> declaration of a unary type operator called +.)
>> 
>> and what about
>> 
>> datatype '' foo = C | D;
> 
> MLton and Poly/ML are correct. A type variable can be named plain '
> or '', and symbolic identifiers (except *) are allowed as type
> names.

Wow; you learn something new everyday.

Thanks for the quick feedback.

Incidentally, I think that makes your grammar at
http://www.mpi-sws.org/~rossberg/sml.html incorrect: the grammar there
wants an <id> to follow the apostrophe for <var>, and <id>s have at
least one character in them.

Best,
Michael

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter

_______________________________________________
MLton-devel mailing list
[email protected]; [email protected]
https://lists.sourceforge.net/lists/listinfo/mlton-devel
signature.asc (application/pgp-signature, 552 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRdPBYAAoJEGKGQ6ej3R2RSiAIALoZN6c12LDFAjhRki6mZVDc
vd4rXur55hFvwrUnxNonsgnij6FgnGCcrrMPry6ZIbw/zoNEOJX+AJGnY7CfvVEA
wkkWxqxBuESl4v8ywXxHl1XEMeZ9bqq+YbtW3d+Hs+palE6FcE1YgkxfZZYXSOwk
BZcHYoYtELhPzuRPKYKgj9ac6sWwcS6YMVUoEisKfMUc6DLqToJFXOaHsoNBdpsj
7E+pkxmVyqLrw5AAweP3z3G4k/7b+FYjNVqAgkzhblmQlvvT7tO9n0NJflaXOJDB
4qiKEwyiUk37Z9y7U0DBhDv9n4H3ntS0Vl2OLiPaPikQFzNTeIm5kotsq67WOUs=
=CWnR
-----END PGP SIGNATURE-----