OCaml/Bases

      Installing OCaml

      Unix

      Most Linux distributions have OCaml in their repositories, it is usually named "ocaml". It's also in the ports of FreeBSD, OpenBSD and NetBSD. You can also download the source from here. See the README and INSTALL files for instructions on how to build OCaml.

      Windows

      There are no binary packages of the most recent (3.12) version of OCaml for Windows. You either must use version number 3.11 or build OCaml from source.

      The Toplevel

      After successful installation, open a terminal and execute ocaml. You are now in the Toplevel, an environment for interactively evaluation of Ocaml expressions and definitions, e.g.

      3 + 4 ;;
      - : int = 7
      

      The ";;" ends an expression.

      Last modified on 20 November 2012, at 16:03