MLton 20070826 ManualPage
Home  Index  
MLton is run from the command line with a collection of options followed by a file name and a list of files to compile, assemble, and link with.
mlton [option ...] file.{c|cm|mlb|o|sml} [file.{c|o|s|S} ...]
The simplest case is to run mlton foo.sml, where foo.sml contains a valid SML program, in which case MLton compiles the program to produce an executable foo. Since MLton does not support separate compilation, the program must be the entire program you wish to compile. However, the program may refer to signatures and structures defined in the Basis Library.

Larger programs, spanning many files, can be compiled with the ML Basis system. In this case, mlton foo.mlb will compile the complete SML program described by the basis foo.mlb, which may specify both SML files and additional bases.

MLton also supports a limited subset of SML/NJ CompilationManager (CM) files. For example, mlton foo.cm will compile the complete SML program consisting of the concatenation of all the SML files referred to (either directly or indirectly) by foo.cm.

Next Steps


Last edited on 2005-12-01 19:31:43 by StephenWeeks.