4 MLton has a flag, `-show-basis <file>`, that causes MLton to pretty
5 print to _file_ the basis defined by the input program. For example,
11 then `mlton -show-basis foo.basis foo.sml` will create `foo.basis`
12 with the following contents.
17 If you only want to see the basis and do not wish to compile the
18 program, you can call MLton with `-stop tc`.
20 == Displaying signatures ==
22 When displaying signatures, MLton prefixes types defined in the
23 signature them with `_sig.` to distinguish them from types defined in the
24 environment. For example,
30 val x: t * int -> unit
38 val x: _sig.t * int -> unit
42 Notice that `int` occurs without the `_sig.` prefix.
44 MLton also uses a canonical name for each type in the signature, and
45 that name is used everywhere for that type, no matter what the input
46 signature looked like. For example:
68 Canonical names are always relative to the "top" of the signature,
69 even when used in nested substructures. For example:
101 == Displaying structures ==
103 When displaying structures, MLton uses signature constraints wherever
104 possible, combined with `where type` clauses to specify the meanings
105 of the types defined within the signature. For example:
118 structure S2:> SIG = S