Thicket thicket
ocaml
REPOS 1

Core covers the OCaml compiler and language RFCs.

W37.2026 · 7–13 Sepocaml/ocaml

Features

  • Parsetree: Pexp_hole and Pmod_hole nodes (merged). The parser now emits Pexp_hole / Pmod_hole for _ in simple-expression and module-expression positions instead of a parse error; the type checker reports the diagnostic. PPX rewriters and Merlin can now transform or inspect these positions. #15051

  • [@@deprecated_unlabelled] attribute (open proposal). Annotating a labelled argument with this attribute permits unlabelled calls while emitting a deprecation alert, enabling gradual labelling of existing stdlib functions (e.g. Atomic.compare_and_set). #15054

  • Atomic.compare_and_exchange (open, under consideration). Adds val Atomic.compare_and_exchange : 'a t -> expected:'a -> set:'a -> 'a to the standard library, returning the value found in the atomic. Label naming is still under discussion. #14912

Compatibility and Releases

  • with module type precedence change (merged, breaking). T with module type S = X -> X now parses as T with module type S = (X -> X) rather than (T with module type S = X) -> X, matching the := form. Code relying on the old grouping will fail to compile. #14978

Fixes

  • ocamlopt segfault on partial GADT match (merged). Translcore no longer uses local GADT equations introduced by a refutable pattern to infer parameter value kinds, eliminating a miscompilation that produced invalid lambda and a segfault. #15035

  • Weak.get_copy no longer copies continuations (merged). Shallow-duplicating a continuation produced two handles to the same fiber, causing a segfault on double-resume. Weak.get_copy now treats continuations like custom values and does not duplicate them. #14988

  • Runtime events: consumer no longer reports "corrupt stream" on overwrite (merged). A consumer that falls behind a fast producer of user events now reports lost events instead of a fatal Failure("Runtime_events: corrupt stream"). A producer-side fence ensures the head advance is visible before slot overwrites. Affects all 5.x releases. #15016

  • Set.{union, inter, diff}: fast path for shared structure (merged). Physical-equality shortcuts reduce complexity when sets share subsets and increase sharing in results. #15009