[MLton] MLton Installation question

Matthew Fluet fluet@cs.cornell.edu
Mon, 10 Apr 2006 14:31:44 -0400 (EDT)

>> I did
>> 1) unpacked the sources
>> 2) renamed mllex to ml-lex in mlton/front-end/Makefile
>>    (In my, what I thought, standard installation of
>>     NJ mllex is called ml-lex; similarly ml-yacc. This
>>     brings me quite far in the next step.)
>> 3) compiled with make nj-mlton
> My guess is that the SML/NJ compile failed.  It seems that when SML/NJ exits, 
> it always returns 'success', even if the last invoked command failed, so make 
> will assume that the SML/NJ compile succeeded.  You should scan back through 
> the output of 'make nj-mlton' and verify that the SML/NJ compile succeeded.

The front-end files derived by SML/NJ's ml-lex and ml-yacc are 
incompatible for use within the source code of the mlton compiler.

Note, for many projects, one could use SML/NJ's ml-lex/ml-yacc 
interchangebly with MLton's mllex/mlyacc; However, within the mlton 
compiler itself, we need the default int size to be 32-bits, so there are 
stub environments around to make SML/NJ's environment look like it 
provides 32-bit integers as the Int structure.  Unfortunately, there isn't 
a good way to make the unqualified top-level int correspond to Int32.int, 
which is the source of the problem with SML/NJ's ml-lex and ml-yacc 
generated files.

You're best bet is to just download the derived files from: