smlnj-lib
is a collection of utility libraries for Standard ML.
The original smlnj-lib
is distributed with SML/NJ.
But smlnj-lib
has been ported to MLton with some adjustment. (see MLton/SMLNJLibrary)
This repository provides re-ported smlnj-lib
from MLton to Poly/ML.
To build smlnj-lib
, run the default target of make.
$ make
smlnj-lib
depends on mlyacc-lib
.
Therefore, if you do not have /usr/local/polyml/lib/mlyacc-lib/mlyacc-lib-1.0.0.poly
, please set LIBDIR
or MLYACC_LIB
:
$ make LIBDIR=~/.sml/polyml/5.8.1/lib
The path to the mlyacc-lib
is referenced with $(LIBDIR)/$(MLYACC_LIB)
.
By default, these variables are set to /usr/local/polyml/lib
and mlyacc-lib/mlyacc-lib-1.0.0.poly
each other.
To install library, run the install
target.
$ make install
To change the installation directory, specify PREFIX
:
$ make install PREFIX=~/.sml/polyml/5.8.1
For loading smlnjlib into Poly/ML REPL, use PolyML.loadModule
function.
$ make
$ poly
> PolyML.loadModule "./build/smlnj-util-lib-0.0.1.poly";
see LICENSE file for details.