Next: Built-in typesconstructors and
Up: No Title
Previous: Interactive sessions
The Moscow ML module language is much simplified compared to the full
Standard ML Modules language.
The equivalent of a Standard ML structure is a unit. A unit U
consists of a unit interface in file U.sig (corresponding to an SML
signature) and a unit body in file U.sml (corresponding to an SML
structure). The unit signature can be left out.
- In Moscow ML, the unitid, if specified in a unit signature
or unit body file, must agree with the filename. The name of the
constraining signature, if any, must equal that of the structure.
- No specification valdesc, typdesc,
typbind, datdesc, or exdesc may describe the
same identifier twice; this applies also to value constructors
within a datdesc.
- In the left side tyvarseq tycon in any typdesc,
typbind, or datdesc, tyvarseq must not
contain the same tyvar twice. Any tyvar occurring
within the right side of a typbind or datdesc must
occur in tyvarseq.
- No type, value, or exception may be specified twice at top-level
in a signature.
- No datdesc or exdesc may specify true,
false, it, nil, ::, or ref.
Moscow ML 1.42