Home
OCaml 4.00.1
OCaml 3.12.1
[En]
OCaml 3.12.1
License The OCaml system is open source
software: the compiler is distributed under the terms of the Q
Public License, and its library is under LGPL; please read the
license document for more details.
A BSD-style license is also available for a fee through the
OCaml
Consortium.
This page describes OCaml version 3.12.1, released on
2011-07-04. Go here for the latest OCaml
release and here for
earlier releases.
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.
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.
- You also have read-only SVN access to the
working sources and to all previous public releases.
The INSTALL file of the distribution provides detailed
compilation and installation instruction.
Precompiled binaries for FreeBSD
Use binary packages provided by the FreeBSD project. Further information
about the FreeBSD packages is available at
FreshPorts.
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.
Precompiled binaries for Solaris
Available at sunfreeware.com.
User's manual
The user's manual for OCaml can be: