The SML/NJ Library provides useful utility modules that supplement the The Standard ML Basis Library. A subset of these modules are particularly useful for writing compilers, and we document them here.

To use any of these modules in your projects, include the following line in your CM file:

$/smlnj-lib.cm

These modules can also be used directly in the SML/NJ REPL, since CM autoloads them. For example:

% sml
Standard ML of New Jersey v110.78 [built: Sun Dec 21 16:30:08 2014]
- Atom.atom "abc";
[autoloading]
[library $SMLNJ-LIB/Util/smlnj-lib.cm is stable]
[autoloading done]
val it = - : Atom.atom