The ML Basis system is a simple, yet powerful, approach that builds upon the programmer's intuitive notion (and The Definition of Standard ML's formal notion) of the top-level environment (a basis). The system is designed as a natural extension of Standard ML; the formal specification of the ML Basis system (pdf) is given in the style of the Definition.
Here are some of the key features of the ML Basis system:
-
Explicit file order: The order of files (and, hence, the order of evaluation) in the program is explicit. The ML Basis system's semantics are structured in such a way that for any well-formed project, there will be exactly one possible interpretation of the project's syntax, static semantics, and dynamic semantics.
-
Implicit dependencies: A source file (corresponding to an SML top-level declaration) is elaborated in the environment described by preceding declarations. It is not necessary to explicitly list the dependencies of a file.
-
Scoping and renaming: The ML Basis system provides mechanisms for limiting the scope of (i.e, hiding) and renaming identifiers.
-
No naming convention for finding the file that defines a module. To import a module, its defining file must appear in some ML Basis file.