This page describes OCaml version 3.12.1,
released on 2011-07-04. For the latest version,
see Latest OCaml release.
What's new?
Some of the highlights in release 3.12 are:
- Polymorphic recursion is supported, using explicit type declarations on the recursively-defined identifiers.
- First-class modules: module expressions can be embedded as values of the core language, then manipulated like any other first-class value, then projected back to the module level.
- New operator to modify a signature a posteriori:
S with type t := tau denotes signature S
where the t type component is removed and substituted by the type tau elsewhere. - New notations for record expressions and record patterns:
{ lbl } as shorthand for { lbl = lbl }, and { ...; _ }
marks record patterns where some labels were intentionally omitted. - Local open
let open ... in ... now supported by popular demand. - Type variables can be bound as type parameters to functions; such types are treated like abstract types within the function body, and like type variables (possibly generalized) outside.
- The
module type of construct enables to recover the module type of a given module. - Explicit method override using the
method! keyword, with associated warnings and errors.
For more information, please consult the comprehensive list of changes.
Distribution

Source distribution
-
Source tarball (.tar.gz)
for compilation under Unix (including Linux and MacOS X)
and Microsoft Windows (including Cygwin).
-
Also available in .tar.bz2
format.
- GODI
is a source-based distribution of OCaml and
many companion libraries and tools. Compilation and
installation are automated by a powerful package manager.
The INSTALL file of the distribution
provides detailed compilation and installation instruction.

Precompiled binaries for Linux

Precompiled binaries for MacOS X
Binary package
compiled on Mac OS 10.6.4 with XCode tools
3.2.3 (not compatible with Mac OS 10.4.x):

Precompiled binaries for Microsoft Windows
Four ports of OCaml for Microsoft
Windows are currently available. For additional information,
please consult the list of portability issues or
the Windows release notes.
-
MinGW-based native Win32 port (3.12.1).
A self installer. The interactive loop comes with a
simple graphical user interface. Some features require the
Cygwin environment.
However, the compilers generate true
Win32 executables, which do not require Cygwin to run.
-
Microsoft-based native Win32 port (3.12.1).
A self installer. The interactive loop comes with a simple
graphical user interface.
Some features require Microsoft Visual C++ and Microsoft
Assembler.
-
Cygwin-based port.
Requires Cygwin.
No graphical user interface is provided. The compilers
generate executables that do require Cygwin.
The precompiled binaries are part of the Cygwin distribution;
you can install them using the Cygwin
setup
tool. Alternatively, download the source distribution
and compile it under Cygwin.
-
Microsoft-based native Win64 port
Same features as the Microsoft-based native Win32 port,
but generates 64-bit code. No binary distribution available
yet; download the source distribution and compile it.

User's manual
The user's manual for OCaml can be:
Other versions
Many previous releases are still available.
You also have read-only SVN access
to the working sources and to all previous public releases. See:
The Subversion repository for OCaml