All Releases

OCaml 4.01.0

This page describes OCaml version 4.01.0, released on 2013-09-12.

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.

What's New

Some of the highlights in release 4.01 are:

  • It is now possible to have several variant constructors or record fields of the same name in scope and type information will be used to disambiguate which one is used -- instead of always using the last one. See this post for a more detailed description of the feature.

  • New warnings can be activated to warn about identifiers that are used after having been shadowed by an open construct. The open keyword can be written open! to silence this warning (as method! silences the method warning).

  • The compiler now suggests possible typos on "unbound identifier" errors.

  • Infix application operators (|>) and (@@) are added to Pervasives.

  • The -short-path option changes the way the type-checker prints types to pick a short representation (eg. string instead of StringSet.elt).

  • This release saw a lot of polishing with sets of changes in many places: the type system for GADTs, compilation speed with -bin-annot, ocamlbuild, the test suite, low-level optimizations, etc.

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.
  • OPAM is a source-based distribution of OCaml and many companion libraries and tools. Compilation and installation are automated by powerful package managers.
  • 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.6.3 (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: