This section provides an overview of what sml is, and why a developer might want to use it.
It should also mention any large subjects within sml, and link out to the related topics. Since the Documentation for sml is new, you may need to create initial versions of those related topics.
There is a dozen implementations of Standard ML. MLton produces very optimized code, but has no REPL. SML/NJ is the most widely used, but has slightly difficult error messages for learning purposes. Moscow ML and Poly/ML are easy to get started with, but don't support the .mlb package format. That isn't essential for getting started, though.
Here are instructions for installing each of SML/NJ, Moscow ML and Poly/ML divided by operating system.
C:\Program Files (x86)\SML NJ\bin\sml.bat.
C:\Program Files (x86)\mosml\bin\mosml.exe.
brew install smlnjas your own user. Test REPL with
sudo apt-get install smlnjas the super user. Test REPL with
(Ubuntu) Add the PPA as the super user. Test REPL with
sudo add-apt-repository ppa:kflarsen/mosml sudo apt-get update sudo apt-get install mosml
In order to be able to use the arrow keys to navigate lines that were previously typed into the REPL, most of the SML compilers can benefit from the program
rlwrap. Using Homebrew on MacOS, install this by
brew install rlwrap, and on Ubuntu / Debian Linux, install this by
sudo apt-get install rlwrap. Then in the terminal, try the following:
alias mosml='rlwrap mosml -P full' alias sml='rlwrap sml' alias poly='rlwrap poly'
These aliases can be added to e.g. your
~/.bashrc so they work by default.
The arrows key should now work better.