[MLton] Nitpicky definition compatibility bug, SML/NJ deviation

Robert J. Simmons rjsimmon at cs.cmu.edu
Thu Aug 25 23:33:55 PDT 2011


MLton accepts the following program:

structure @#$ = struct val foo = 4 end
val y = @#$.foo
val () = print "Goodbye.\n"

However, according to Page 5 of the revised definition, "The
identifier class StrId is represented by alphanumeric identifiers not
starting with a prime," which would seem to exclude symbolic
identifiers from being the names of structures and signatures.

I swear I don't go around looking for these things, I was using the
definition to try to write a syntax highlighter for Standard ML on
GitHub.

In the process of generating
https://bitbucket.org/robsimmons/pygments-main/src/351f8bf6f859/tests/examplefiles/example.sml,
I came up with another SML/NJ vs. MLton deviation. SML/NJ does not
treat the single prime -'- as a type variable, nor -'0- and -'_-.
Similarly, SML/NJ does not treat -'''- or -'''''''- as eqtype
variables.

 - Rob

-- 
Robert J. Simmons
simrob.com
gps.simrob.com
rjsimmon at cs.cmu.edu
robsimmons at gmail.com
Cell: 404-273-6890




More information about the MLton mailing list