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