The release of OCaml 4.13.0 is approaching. We have released a second alpha version to help fellow hackers join us early in our bug hunting and opam ecosystem fixing fun (see below for the installation instructions). You can see the progress on this front at https://github.com/ocaml/opam-repository/issues/18791 .
Beyond the usual bug fixes (see the full list below), this second alpha integrates a new feature for native code: poll points. Those poll points currently fixes some issues with signals in non-allocating loops
in native code. More importantly, they are prerequisite for the multicore runtime.
Another change is the removal of the removal of interbranch propagation of type information.
The feature, already postponed from 4.12, has been removed to focus for now on better error
message in the
If you find any bugs, please report them here:
The first beta release may follow soon since the opam ecosystem is in quite good shape;
and we are on track for a full release in September.
Florian Angeletti for the OCaml team.
The base compiler can be installed as an opam switch with the following commands
opam update opam switch create 4.13.0~alpha2 --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
If you want to tweak the configuration of the compiler, you can switch to the option variant with:
opam update opam switch create <switch_name> --packages=ocaml-variants.4.13.0~alpha2+options,<option_list> --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
where <option_list> is a comma separated list of ocaml-option-* packages. For instance, for a flambda and no-flat-float-array switch:
opam switch create 4.13.0~alpha2+flambda+nffa --packages=ocaml-variants.4.13.0~alpha2+options,ocaml-option-flambda,ocaml-option-no-flat-float-array --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
All available options can be listed with “opam search ocaml-option”.
If you want to test this version, it is advised to install the alpha opam repository
opam repo add alpha git://github.com/kit-ty-kate/opam-alpha-repository.git
This alpha repository contains various fixes in the process of being upstreamed.
The source code for the alpha is also available at these addresses:
Add poll points to native generated code. These are effectively
zero-sized allocations and fix some signal and remembered set
issues. Also multicore prerequisite.
(Sadiq Jaffer, Stephen Dolan, Damien Doligez, Xavier Leroy,
Anmol Sahoo, Mark Shinwell, review by Damien Doligez, Xavier Leroy,
and Mark Shinwell)
10449: Fix major GC work accounting (the GC was running too fast).
(Damien Doligez, report by Stephen Dolan, review by Nicolás Ojeda Bär and
10454: Check row_more in nondep_type_rec.
(Leo White, review by Thomas Refis)
10468: Correctly pretty print local type substitution, e.g. type t := …,
(Matt Else, review by Florian Angeletti)
caml_send*helper functions take derived pointers
as arguments. Those must be declared with type Addr instead of Val.
Moreover, poll point insertion must be disabled for
otherwise the derived pointer is live across a poll point.
(Vincent Laviron and Xavier Leroy, review by Xavier Leroy and Sadiq Jaffer)
10478: Fix segfault under Windows due to a mistaken initialization of thread
ID when a thread starts.
(David Allsopp, Nicolás Ojeda Bär, review by Xavier Leroy)
10206: Split labels and polymorphic variants tutorials
Splits the labels and polymorphic variants tutorial into two. Moves the GADTs
tutorial from the Language Extensions chapter to the tutorials.
(John Whitington, review by Florian Angeletti and Xavier Leroy)
- [breaking change] 9811: remove propagation from previous branches
Type information inferred from previous branches was propagated in
non-principal mode. Revert this for better compatibility with
For the time being, infringing code should result in a principality warning.
(Jacques Garrigue, review by Thomas Refis and Gabriel Scherer)
The up-to-date list of changes for OCaml 4.13 is available at https://github.com/ocaml/ocaml/blob/4.13/Changes .