• en

OCaml 4.00.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 4.00.1, released on 2012-10-05. Go here for a list of all releases.

What's New

Release 4.00.1 is mostly a bugfix release.

Some of the highlights in release 4.0.0 (July 2012) are:

  • The name the language is now officially "OCaml", and this name is used consistently in all the documentation and tool outputs.
  • Generalized Algebraic Data Types (GADTs): this is a powerful extension of the type system that provides great flexibility and power to the programmer.
  • A new and improved ARM back-end.
  • Changes to first-class modules: type annotations can now be omitted when packing and unpacking modules (and are inferred from context whenever possible), and first-class modules can now be unpacked by pattern-matching.
  • Support for randomized hash tables to avoid denial-of-service vulnerabilities.
  • Installation of the compiler's internal libraries in +compiler-libs for easier access by third-party programming tools.

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 .zip format.
  • You also have 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 Linux

Precompiled binaries for MacOS X

Binary package compiled on Mac OS 10.7.5 with XCode tools 4.4 (probably not compatible with earlier versions of Mac OS 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.

  • Cygwin-based native Win32 port (4.00.0). A self installer. The interactive loop comes with a simple graphical user interface. Some features require the Cygwin environment, which the installer can fetch for you. However, the compilers are, and generate true Win32 executables, which do not require Cygwin to run.
  • Microsoft-based native Win32 port. No binary distribution available yet; download the source distribution and compile it.
  • 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.

Alternative Compilers

Additionally, the following projects allow you to compile OCaml code to targets traditionally associated with other languages:

User's manual

The user's manual for OCaml can be: