Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / src / MLBasisPathMap.adoc
CommitLineData
7f918cf1
CE
1MLBasisPathMap
2==============
3
4An <:MLBasis:ML Basis> _path map_ describes a map from ML Basis path
5variables (of the form `$(VAR)`) to file system paths. ML Basis path
6variables provide a flexible way to refer to libraries while allowing
7them to be moved without changing their clients.
8
9The format of an `mlb-path-map` file is a sequence of lines; each line
10consists of two, white-space delimited tokens. The first token is a
11path variable `VAR` and the second token is the path to which the
12variable is mapped. The path may include path variables, which are
13recursively expanded.
14
15The mapping from path variables to paths is initialized by the compiler.
16Additional path maps can be specified with `-mlb-path-map` and
17individual path variable mappings can be specified with
18`-mlb-path-var` (see <:CompileTimeOptions:>). Configuration files are
19processed from first to last and from top to bottom, later mappings
20take precedence over earlier mappings.
21
22The compiler and system-wide configuration file makes the following
23path variables available.
24
25[options="header",cols="^25%,<75%"]
26|====
27|MLB path variable|Description
28|`SML_LIB`|path to system-wide libraries, usually `/usr/lib/mlton/sml`
29|`TARGET_ARCH`|string representation of target architecture
30|`TARGET_OS`|string representation of target operating system
31|`DEFAULT_INT`|binding for default int, usually `int32`
32|`DEFAULT_WORD`|binding for default word, usually `word32`
33|`DEFAULT_REAL`|binding for default real, usually `real64`
34|====