Thicket thicket
ocaml
REPOS 2

Core covers the OCaml compiler and language RFCs.

W38.2026 · 14–20 Sepocaml/ocaml

Features

  • Parsetree: Pexp_hole and Pmod_hole nodes (#15051, merged). Wildcards in simple and module expressions now produce dedicated parsetree nodes instead of a parse error, enabling ppx transforms to operate on them.

  • Bit counting primitives %clz/%ctz (#15018, open). Int.leading_zeros and Int.trailing_zeros lower to single clz/ctz instructions on amd64 and arm64; measured 2–3× speedup over trunk.

  • Float ↔ boxed-integer conversion inlined (#15084, open). Int64.of_float, Int64.to_float and Int32/Nativeint equivalents compile to Cintoffloat/Cfloatofint instead of C calls; 1.3–2× faster on amd64, arm64, POWER10, s390x.

Compatibility and Releases

  • with module type precedence changed (#14978, merged). module type T = T with module type T = T -> T now parses as T with module type T = (T -> T), matching the := form. Existing code relying on the old grouping will fail to compile.

  • ocamldebug transmits full 64-bit object headers (#15022, merged). The REQ_GET_HEADER protocol previously clamped to 32 bits, truncating array sizes above 2²².

Fixes

  • Deadcode: atomic loads with discarded results are preserved (#15045, merged, backported to 5.5). Such loads act as fences and were incorrectly eliminated, breaking memory ordering.

  • Runtime_events.read_poll survives a user decoder exception (#15075, merged). A raising decode function no longer leaves cursor_in_poll set; the cursor remains usable and the decoder's own error is delivered.

  • Runtime_events lost-words counter widened to uint64_t (#15010, merged). The C lost_events callback previously wrapped at INT_MAX; the OCaml API retains its 63-bit int.

  • Unerasable-optional-argument check relaxed for CPS-style functions (#14671, merged). Warning 16 no longer fires when the return type is a type variable, restoring usability of continuation-passing combinators with optional arguments.