bug report for MLton
Stephen Weeks
MLton@sourcelight.com
Thu, 29 Mar 2001 14:52:58 -0800 (PST)
Thanks for the report, Norman. It will be interesting to see if we can get your
tool to compile under MLton.
> Here's a program which I believe to be syntactically correct but
> non typechecking SML'97. Both SML/NJ and Moscow ML accept the program
> without any syntax errors. MLton complains.
The problem is that SML 97 does not allow withtype specifications in
signatures. Both SML/NJ and Moscow ML deviate from the standard in this
respect. There are occurences of withtypes in signatures on lines 542, 3131,
4896, and 16215 of your file.
There are also two other syntax errors in your code, which are also deviations
of SML/NJ (and possibly Moscow ML) from the standard.
Line 28336 contains a vector expression.
Line 29919 contains a functor nested within structure.
Commenting out all six of these syntax errors makes the file parseable by
MLton. Of course, there are then lots of unbound variables and type errors.
Many of SML/NJ's deviations are listed in the MLton documentation at
http://www.sourcelight.com/MLton/HTML/node50.html
I hope this helps. Let us know if (when? :-) you have more problems.