OCaml 4.11.1: early bugfix release

A serious bug has been discovered last week in OCaml 4.11.0:
explicit polymorphic annotations are checked too permissively.
Some incorrect programs (possibly segfaulting) are accepted
by the compiler in 4.11.0.

Programs accepted by OCaml 4.10 are unchanged.

We are thus releasing OCaml 4.11.1 as an early bugfix version.
You are advised to upgrade to this new version if you were
using OCaml 4.11.0.

It is (or soon will be) available as a set of OPAM switches with
opam switch create 4.11.1

and as a source download here:
https://caml.inria.fr/pub/distrib/ocaml-4.11/

This bug was introduced when making polymorphic recursion
easier to use. We are working on making the typechecker
more robust and more exhaustively tested to avoid such
issues in the future.


Bug fixes:

  • #9856, #9857: Prevent polymorphic type annotations from generalizing
    weak polymorphic variables.
    (Leo White, report by Thierry Martinez, review by Jacques Garrigue)

  • #9859, #9862: Remove an erroneous assertion when inferred function types
    appear in the right hand side of an explicit :> coercion
    (Florian Angeletti, report by Jerry James, review by Thomas Refis)

13 Likes

Ah, that solves this morning’s puzzle :slightly_smiling_face: Thanks for the clear update and patch release.

We’ve now got 4.11.1 in Fedora 33 & Fedora 34. No apparent problems so far.

1 Like