I found that polyml
is the implementation of ML that can be easily installed on Ubuntu (named polyml in repository and can be executed with poly
). I am following the A Gentle Introduction to ML by Andrew Cumming. After few minutes of experiment with polyml
interpreter I found that it does not supports readline (pressing arrow up key produces a ^[[A).
This doesn't seems to be normal for an interpreter. This should only happen if I have no readline installed, but my Python interpreter doesn't behaves so.
The simplest way to add readline support to a terminal program that does not natively support it, is to call the program using
rlwrap
. You can install the package of the same name through several package managers. Pressing ↑ in the examples below:You can run it like this:
Or you can add an alias in your
~/.bashrc
or similar: