[MLton] Testing with SML/NJ

Matthew Fluet fluet@cs.cornell.edu
Wed, 5 Apr 2006 15:24:18 -0400 (EDT)


> Is there anyway to run MLton using SML/NJ?  I have looked through the makefiles
> for a way of doing this, and also tried using CM.make with the sources.cm (and
> mlton.cm).  I have been using "make all-no-docs" to compile with MLton, but the
> this takes so long to compile that it makes it hard to use for testing.

You want  "make nj-mlton".  This will dump a mlton.x86-linux SML/NJ heap 
file in the build/lib directory and the build/bin/mlton script will invoke 
SML/NJ with the heap if the heap is newer than a build/lib/mlton-compile 
executable.

You'll want to avoid bootstrapping with the SML/NJ built MLton, as that 
will be very slow.

> I have finished hacking a CPS transform onto MLton, but now I need to be able to
> test it to make sure it works correctly.  Waiting 4 hours between builds seems
> like a somewhat silly way of doing things, so I figured I would ask people with
> more experience working with MLton.

4 hours is quite a long time.  You should look for a machine with more 
RAM.  Most of my self-compiles complete in about 20min on a machine with 
1Gb.