Python has IPython.. does OCaml have anything similar?
I'd very much like to have command history, although other features would be nice too. I've read that I could get command history by running it in Emacs, but I don't use Emacs..
In short, the toplevel is OCaml's Read-Eval-Print-Loop (repl) allowing interative use of the OCaml system. You can consider the toplevel an alternative to compiling OCaml into an executable.
In a terminal window, type utop to start the interactive OCaml session, commonly called the toplevel. Press Control-D to exit the toplevel. You can also enter #quit;; and press return. Note that you must type the # there: it is in addition to the # prompt you already see.
rlwrap gives you readline features (history, editing commands, etc). Also, Findlib adds some functionality, see the quickstart for examples.
There's utop! It has autocompletion, is emacs compatible and so on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With