MLton 20070826 RunTimeOptions
Home  Index  
Executables produced by MLton take command line arguments that control the runtime system. These arguments are optional, and occur before the executable's usual arguments. To use these options, the first argument to the executable must be @MLton. The optional arguments then follow, must be terminated by --, and are followed by any arguments to the program. The optional arguments are not made available to the SML program via CommandLine.arguments. For example, a valid call to hello-world is:
hello-world @MLton gc-summary fixed-heap 10k -- a b c
In the above example, CommandLine.arguments () = ["a", "b", "c"].

It is allowed to have a sequence of @MLton arguments, as in:

hello-world @MLton gc-summary -- @MLton fixed-heap 10k -- a b c

Run-time options can also control MLton, as in

mlton @MLton fixed-heap 0.5g -- foo.sml

Options


Last edited on 2007-08-23 04:01:26 by MatthewFluet.