Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / src / ManualPage.adoc
CommitLineData
7f918cf1
CE
1ManualPage
2==========
3
4MLton is run from the command line with a collection of options
5followed by a file name and a list of files to compile, assemble, and
6link with.
7
8----
9mlton [option ...] file.{c|mlb|o|sml} [file.{c|o|s|S} ...]
10----
11
12The simplest case is to run `mlton foo.sml`, where `foo.sml` contains
13a valid SML program, in which case MLton compiles the program to
14produce an executable `foo`. Since MLton does not support separate
15compilation, the program must be the entire program you wish to
16compile. However, the program may refer to signatures and structures
17defined in the <:BasisLibrary:Basis Library>.
18
19Larger programs, spanning many files, can be compiled with the
20<:MLBasis:ML Basis system>. In this case, `mlton foo.mlb` will
21compile the complete SML program described by the basis `foo.mlb`,
22which may specify both SML files and additional bases.
23
24== Next Steps ==
25
26* <:CompileTimeOptions:>
27* <:RunTimeOptions:>