I was pleasantly surprised when I saw that SML / NJ had recently made some significant changes to version 110.79 , which is part of a move to something called ML Successor. It looks like a joint venture between SML / NJ and MLton and bodes well for the future of SML.
However, I am trying to use some of the new features that seem to be encountering a strange error (on 64-bit Windows 7). To try, I wrote the following in a file named sml_successor_test.sml:
Control.succML := true;
val n = 123_456;
print (Int.toString n);
when I try to load it into REPL using use "C:\Programs\sml_successor_test.sml";, the compiler does not work on the second line of the file (which uses the new type of numeric literal that should be included). But - when I immediately run the same command useas before, it works.
If you use Control.succML := true;REPL first and then use it useto upload a file (after deleting this line from the file), it works. On the other hand, if I just run SML, enable succMLand then assign val n = 123_456;directly to the REPL, it does not work the first time, but then it works.
To summarize - there seems to be a strange lag between when it Control.succML := trueis evaluated and when it takes effect, a lag that occurs in some contexts, but not in others. Any idea what is behind this and any workaround?
source
share