Re: type variable lexical syntax

Andreas Rossberg <[email protected]> Mon, 22 Apr 2013 08:29:20 +0200
Newsgroups gmane.comp.lang.ml.mlton.devel,gmane.comp.lang.ml.polyml.general
Message-ID <[email protected]>
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.

/Andreas


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