Version Compatibility
Here concerned only with source-code compatibility between major releases of the OCaml compiler, not with other enhancements that may be provided by newer releases.
- 4.01 in comparison to 4.02+:
- There is no Bytes module. Workaround: module Bytes = String.
- There is no bytes type. Workaround: type bytes = string or use Bytes.t.
- Module aliases don't work in interface files.
- Catching exceptions directly in match clauses is not supported.
Problems
Interactive
$ utop
Performance
Installation
macOS with Homebrew
- brew install ocaml --with-flambda
- brew install opam
- opam init
- opam switch 4.02.3
Ubuntu 14.04
- sudo apt-add-repository ppa:avsm/ppa
- sudo aptitude update
- sudo aptitude install ocaml-nox opam
- opam init
- eval `opam config env`
- opam switch 4.02.3
- eval `opam config env`
Packages
- opam install core
- opam install utop
- opam install ocp-indent
- opam install async
- opam install yojson
- opam install core_extended
- opam install core_bench
- opam install cohttp
- opam install async_graphics
- opam install cryptokit
- opam install menhir
- opam install ctypes ctypes-foreign
- opam install cmdliner
- opam install gg
Books
- Real World OCaml by Yaron Minsky, Anil Madhavapeddy, and Jason Hickey [2013] (examples)