OCaml for the Skeptical
U of C Library DLDC Informal OCaml Class

Installing OCaml

Installing via GODI

My preferred way to install ocaml is via GODI, a complete multi-platform package system exclusively for OCaml. With it, you can install, and later update, the latest OCaml distribution and some 50-odd third-party libraries, applications and modules. It's advantages are that it tends to have the absolute latest versions of everything, that installs are totally automated, and that it does full dependency analysis across all the third-party modules. GODI runs on Linux, Solaris, FreeBSD, NetBSD, Cygwin, HP-UX, MacOS X.

However, if you're just getting started with OCaml, you won't be needing all those exotic modules, and you may find that your operating system's native OCaml installation is easier to set up initially.

Installing on FreeBSD

Installing OCaml on a FreeBSD box is very simple, since it's in the ports. You should install the following:

The compilers, interpreters, etc.
If you want local docs in HTML and PostScript.
This package-manager is optional, but many useful third-party apps use it.
These Perl-Compatible Regular Expressions are much more powerful than the ancient Emacs-derived regexps in the standard library; they are also an order of magnitude faster.
See below.

There are many other useful third-party OCaml packages in the ports.

Installing on NetBSD

Installing OCaml on a NetBSD box is very simple, since it's in the packages (though there are fewer additions than in the FreeBSD ports). You should install lang/ocaml and Tuareg-Mode.

Installing on Linux

Up-to-date Linux RPMs for Intel versions of RedHat (7.3, 8, and 9) and Mandrake 8.0 are available from INRIA, and some Linux distributions (e.g. Debian, RedHat, Mandrake) come with a reasonably recent version of OCaml already installed. You will also want Tuareg-Mode.

Installing on Mac OS X

OCaml can be installed via apt-get or Fink. There is also a GUI top-level environment for Mac OS called CocOCaml.

Installing on Windows

You have a choice of two binary installations for Microsoft Windows (95, 98, NT, ME, 2000, XP): one built using the Microsoft toolchain and one using MinGW; you can also compile it yourself with Cygwin. See the download page at INRIA for details.

Tuareg Mode

If you are an Emacs or Xemacs user, I highly recommend you install Albert Cohen's stupendous tuareg-mode so that you have the best possible development environment.