Caml
Power

Installing OCaml

Download and install OCaml. Install the latest release available for your platform.

Windows users, install either the MinGW port or the Cygwin port of OCaml. We use cygwin. Ignore the information on producing standalone Windows executables; you will not need them for this course.

Installing Emacs with Tuareg Mode

You can develop OCaml programs using any text editor. We suggest Emacs with Tuareg mode, a special mode for editing OCaml files. You can find the software and installation instructions on the Tuareg page. From that page, click on released files. Download the latest version. Look at the README and follow the instructions.

Once you have installed OCaml and Emacs, open any file with a .ml or .mli extension. This should start up Tuareg mode and you should see OCaml key-word and comment color highlighting and other features. To start the OCaml top-level interpreter in emacs, on Windows at least, make sure the OCaml bin directory is in your path. At this point, you should be able to type C-c C-s in emacs and the OCaml top-level interpreter will start. Alternatively, you can start OCaml from the Tuareg pull-down menu by choosing "Interactive Mode" and then "Run Caml Toplevel."

Installing the OCaml Plugin for Eclipse

Many of you develop Java programs using Eclipse. There are three OCaml plugins for Eclipse available in various states of development. (There is also a stand-alone OCaml IDE from Brown called Camelia, which we had a lot of trouble with and do not recommend.)

Of the three OCaml plugins for Eclipse, people have had the best luck with OcaIDE. It requires at least Eclipse 3.5 (Galileo), but we recommend upgrading to Eclipse 3.6 (Helios). My sources tell me there were no problems installing it on Ubuntu or on an Intel-based Mac running Mac OS X 10.5 (Leopard) following the online instructions.

Installation and configuration on Windows was a little more painful but ultimately successful. The plugin also requires bash, a Unix command interpreter, which comes with Cygwin, so you may also need to install Cygwin and put C:/cygwin/bin/ on your Windows path.

Real Programmers use Emacs

Acknowledgement

These OCaml set-up notes come from Cornell's CS 3110, run by Dexter Kozen and Nate Foster.