LanguageData Types and Matching Functional Programming If Statements, Loops and Recursions Modules Labels Pointers in OCaml Functors Objects Error Handling
TutorialsFormatting and Wrapping Text Command-line Arguments File Manipulation Calling C Libraries Calling Fortran Libraries
Aspiring towards greater understanding of the language? Want to push the limits and discover brand new things? Check out papers written by leading OCaml researchers:
Eff Directly in OCaml
Oleg Kiselyov, KC Sivaramakrishnan
A Memory Model for Multicore OCaml
Stephen Dolan, KC Sivaramakrishnan
Extending OCaml's `open`
Runhang Li, Jeremy Yallop
The history of OCaml releases with a summary and a complete changelog, as well as the manual at that time.
Some of the highlights in OCaml 4.14.0 are:
- Integrated support for "go to definitions" in Merlin.
- Standard library: new modules In_channel and Out_channel, many new functions in Seq module, UTF decoding and validation support for strings and bytes.
- Runtime optimisation: GC prefetching. Benchmarks show a speedup of around 20% in GC-heavy programs.
- Improved error messages in particular for module-level error.
- Deprecated functions and modules in preparation for OCaml 5. In particular, the Stream and Genlex modules are now deprecated.
- Type variables can be explicitly introduced in value and variant constructor
declarations. For instance,
can now be written as
val fold: ('acc -> 'elt -> 'acc) -> 'acc -> 'elt list -> 'acc type showable = Show: 'a * ('a -> string) -> showable
val fold: 'acc 'elt. ('acc -> 'elt -> 'acc) -> 'acc -> 'elt list -> 'acc type showable = Show: 'a. 'a * ('a -> string) -> showable
- Tail-call with up to 64 arguments are now guaranteed to be optimized for all architectures.
- Experimental tail modulo cons (TMC) transformation