The OCaml interactive editor for education
OCaml-Top is designed for beginners and students, and specially tailored for exercises, practicals and simple projects
Automatic, state-of-the-art code indentation
Makes understanding the program structure easier
Naturally avoids most beginner's syntactic mistakes
Intuitive code execution
"Run" button runs just what you would expect: the expression under cursor, and what is above if needed
Locate your errors directly in your code
Automatic type display
Put your cursor on the name of a standard library function, and the type shows up in the status bar. Non-intrusive, but here just when you need it.
Fully compatible with Microsoft Windows XP, Vista, 7 and 8, OSX and Linux.
On Linux or OSX, we recommend you use the OPAM package manager:
First install opam and some gtk dependancies. For example, with Ubuntu:
add-apt-repository ppa:avsm/ppa apt-get update apt-get install m4 libgtksourceview2.0-dev opam
Then you need to install OCaml:
opam init default 4.01.0+ocp-bin
Finally install ocaml-top
opam install ocaml-top
The left pane is the code editor, while the right pane contains the OCaml process that will execute the code.
The in the left margin of the editor is the evaluation mark, showing that the code has been successfully executed up to that point. When pressing the button (or Ctrl e), the expression under the cursor is sent to the OCaml pane, and the answer from OCaml is displayed there. In case of an error, the relevant part of the code in the editor is highlighted.
Since programs are usually written in order, the evaluation mark always progresses from top to bottom, and everything in-between the current mark position and the expression to run will be sent to OCaml first. If you happen to need execution of an expression directly, select it before pressing .
The button runs the whole program. In case you get confused, the button restarts a fresh OCaml, rewinds the evaluation mark, and clears the right pane. And in case you got yourself in a loop, or your program just takes too long, the button can interrupt the current computation.
|Ctrl n||Start with a new (blank) file|
|Ctrl o||Load a file|
|Ctrl s||Save the current file|
|Ctrl Shift z||Redo|
|Ctrl e||Execute the current expression|
|Escape||Stop ongoing execution|
|Ctrl +||Zoom in|
|Ctrl -||Zoom out|
|OCaml-Top on Github||Latest sources in the official GIT repository|
|Version 1.1.2||Download for Linux, OSX and Windows|