next up previous contents
Next: Compile-time options Up: MLton User Guide Previous: Drawbacks of MLton   Contents


Manual page

MLton is run from the command line with a collection of options followed by a file name and a list of files to assemble and libraries to link with.

mlton [option ...] file.{cm|sml|c|o} [file.{S|o} ...] [library ...]
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 called foo. MLton has no notion of separate compilation. The program must be the entire program you wish to compile; however, it may refer to signatures and structures defined in the SML basis library.

For developing large programs spanning many files, MLton supports a limited subset of SML/NJ Compilation Manager (CM) files. For example, mlton foo.cm, will compile the complete SML program consisting of the concatenatation of all the SML files referred to (either directly or indirectly) by foo.cm. See Section 9 for details.



Subsections