Import Upstream version 20180207
[hcoop/debian/mlton.git] / basis-library / README
... / ...
CommitLineData
1This directory contains the MLton implementation of the Basis Library.
2The files are grouped in directories in the same way that the
3corresponding modules are grouped in the basis library documentation.
4All other implementation files are in the misc/ and libs/ directories.
5
6The basis is constructed using the ML Basis system.
7
8There are several special files that make use of non-SML extensions.
9
10misc/primitive.sml
11posix/primitve.sml
12 These are not Standard ML. They describe all of the primitives and
13 C routines used in the basis.
14
15top-level/overloads.sml
16 Not Standard ML.
17 Uses the notation _overload <var> : <ty> as <var> (and <var>)*
18
19
20Dead Code Elimination
21----------------------------------------
22In order to compile small programs rapidly, a pass of dead code
23elimination (core-ml/dead-code.{sig,fun}) is run in order to eliminate
24as much of the basis library as possible. The dead code elimination
25algorithm used is not safe in general, and only works because the
26basis library implementation has special properties:
27 * it terminates
28 * it performs no I/O
29The dead code elimination includes the minimal set of
30declarations from the basis so that there are no free variables in the
31user program (or basis). It has a special hack to include all
32bindings of the form
33
34 val _ = ...
35