Features
-
Head shapes and constructor unboxing (open): Extends
[@unboxed]to multi-constructor variant types via a new[@shape]attribute; enables the compiler to track block sizes and tags for representation decisions. #15227 -
Generative constructors (open): A new
[@generative]attribute compiles immutable constructors as mutable blocks, forbidding compiler sharing and unsharing to make==semantics precise for formal verification. #15297
Compatibility and Releases
- Warning 8 (partial-match) fatal by default (open, breaking):
ocamlcandocamloptwould treat an unhandled match case as a hard error; the toplevel keeps it as a warning. Marked backwards-incompatible. #15269
Fixes
-
Pattern matching fatal error (merged): Redundant cases with
or-patterns andwhenguards in a total match triggeredFatal error: Matching: impossible empty matrix. The compiler now rejects the redundant case instead of aborting. #15184 -
ocamlc -dsourceinfinite loop (merged): Printing special constructors ([],(),true,false) with arguments looped forever; list detection also dropped trailing expressions. Both fixed. #15303 -
String.take_first/take_last/drop_lastatmin_int(merged): Arithmetic overflow in then - 1/length s - ncomputation returned the whole string instead of"". The clamp now applies before the subtraction. #15277 -
Weak.blitquadratic cost on multi-key ephemerons (merged): A full clean of the destination ephemeron on every element copy made the operation O(n²). The check is now O(1), reducing worst-case iteration from 0.28 s to 0.0009 s in the benchmark. #15143 -
TSan support and POWER runtime bugs (merged):
--enable-tsanaborted on exceptions from C calls with stack arguments; a wrong TOC register incaml_runstack's epilogue caused SIGSEGV incaml_free_stackunder flambda. Both fixed. #15243