Fixes
-
ctype scope error in modular explicits (merged): A scoping mistake in
occur_univar_or_unscopedcaused non-dependent applications to erase the result type with the first package type encountered, producing unsound type assignments. Fixed in #14892; the author notes a 5.5.1 release is warranted. -
Recursive function compilation regression (5.2) (merged): Since #12596,
let rec f = let __0 = f in function …generated an extra closure allocation, breaking inlining for ppx_deriving-generated code. Two PRs restore the optimisation: #14885 inlines variable-to-variable renamings; #14894 extends it to module-identifier redefinitions. -
Assertion failure with external types under module constraints (merged):
module Q(P : P) : P with type t = P.ttriggered an assertion inout_typewhen the constrained type wasexternal "int". External types are now treated as always abstract in this path. #14882 -
Pattern-matching switch overflow (open): The integer-overflow guard in the pattern-matching compiler failed to handle
abs min_int = min_int. A fix is proposed in #14890.
Features
-
Static linking and link-time linking (open): New compiler options
-cclib-static,-static,-cclib-variant, and-linking-variantallow recording per-variant C library lists in.cmafiles and resolving them at link time via an external command (e.g.pkg-config). Proposed in #14895. -
RISC-V compressed instructions (merged): The RISC-V backend now emits C-extension instructions when the host supports them, reducing
ocamlopt.optcode size by 11%. Register allocation is adjusted to favour x8–x15. #14873 -
Native
Iatomic_fetch_addon all backends (merged):Atomic.fetch_addnow compiles to a single atomic instruction (lock xadd, ldaddal, amoadd.d.aqrl, or ldarx/stdcx loop) instead of a C call, on amd64, arm64, riscv, and power. #14575 -
Pattern counter-example printing (merged): Constructor patterns with all-underscore fields now print as
A _instead ofA (_,_). Nested records collapse similarly. #14887