← Software

OCaml

A statically typed functional language with a powerful module system.

OCaml logo

OCaml combines functional, imperative, and object-oriented programming with a Hindley-Milner type system, parametric polymorphism, modules with first-class functors, and pattern matching with exhaustive case analysis. Type inference removes most type annotations from day-to-day code, and the type system catches a substantial class of errors before runtime.

The language descends from Caml at INRIA, Rocquencourt, with Xavier Leroy and others joining the design effort in the 1990s. OCaml has a large standard library (the OCaml Standard Library plus the more modern Core distributed by Jane Street), and its ecosystem has grown around the opam package manager and Dune build system over the past decade.

OCaml is the implementation language of Coq, the Flow type checker for JavaScript, the original ReasonML/ReScript toolchain, the MirageOS unikernel, and the Tezos blockchain. Jane Street, a major OCaml user in finance, releases substantial parts of its internal toolchain as open source, which has benefited the ecosystem considerably.

License: LGPL-2.1-only with linking exception

Category: Language

Website: https://ocaml.org/

Install

Debian/Ubuntu: sudo apt install ocaml opam
Fedora/RHEL:   sudo dnf install ocaml opam
Arch:          sudo pacman -S ocaml opam
macOS:         brew install opam

Authors

  • INRIA and the OCaml team
PreviousOBS Studio NextONLYOFFICE Desktop Editors

This site is currently in Beta. Contact: Chris Paton

Textbook of AI · Textbook of Usability · Textbook of Digital Health

Auckland Maths and Science Tutoring