OCaml trunk merges polymorphic-type function parameters, requiring an explicit type annotation. OCaml 5.4 reverts to . as the module separator in symbol names on non-Apple Unix systems, restoring perf and flamegraph.pl compatibility.
Features
OCaml trunk (polymorphic parameters): Merged. Functions can now take polymorphic-type parameters, e.g. val f : ('a. 'a -> 'a list) -> int list; an explicit annotation is required. #13806
OCaml trunk (Hashtbl): Merged. Adds Hashtbl.remove_mem and Hashtbl.replace_mem, returning the previous binding alongside the mutation. #14060
Dune RPC: Merged. Opens a path for ocamllsp formatting requests while the dune watch server is active, removing the need to stop the server first. #12064
oxcaml/merlin (document attribute): Merged. PPX authors can attach hover documentation to syntax extensions in .ml and .mli files via [@@@merlin.document]. #167
opam update: Open PR. Loads only changed opam files during opam update instead of the full repository, reducing Windows load from ~10 s to ~0.01 s. #6614
Releases
opam 2.4.1: Released 2025-07-23. Binaries signed by the opam dev team; see release notes and blog post for upgrade instructions.
Fixes
OCaml 5.4 (symbol mangling): Merged. Reverts to . as the module separator in symbol names on non-Apple Unix systems, restoring perf and flamegraph.pl compatibility. #14143
OCaml trunk (shared-heap GC): Merged. Free blocks are now run-length encoded, making sweep time proportional to the live fraction; benchmarks show up to 3.85× speedup on sparse heaps. #13616
js_of_ocaml 6.1.1: Merged. Fixes an assertion failure in js_assign where inlining a recursive function left an unbound variable reference. #2084
opam 2.4.1 (pin-depends): Fixes pin-depends being ignored on simulated pins (e.g. opam install --deps-only). Backported from master. #6612
Compatibility
OCaml trunk (module patterns): Merged. The parsetree now distinguishes (module M : S) from (module M) : (module S) in patterns, affecting ppxlib consumers. #14149
ocaml-base-compiler 5.0.0: Fails to build on Arch Linux with GCC 15.1.1 due to a prims.h macro incompatibility; other GCC versions build successfully. #28250