I am learning standard ML using its interpreter. Sometimes I make typo and just want to repeat the previous command like in Linux shell. However, up arrow will end up with printing special characters on the screen. Sometimes I want to go back left to correct something, left arrow also results in printing special characters.
Does anybody know what is the correct way to do them?
If you are going to be doing any serious SML hacking I strongly suggest you use a development environment that allows you to interact with the SML top level environment.
I use Emacs with the SML mode. The beauty here is that in the top window you can code functions and save them to a file. You can then send them to the lower window that holds the Inferior-SML process for compilation. Also the Inferior-SML process has by default a command history.