Thicket thicket
ocaml
REPOS 2

Core covers the OCaml compiler and language RFCs.

W45.2026 · 2–8 Nov

Core repository summaries

2 active · 0 unchanged

Back to weekly digest

ocaml/RFCs

Permalink

Features

  • RFC: Implicit source positions ([%call_loc]) — Open proposal (PR #52, updated 2026-11-06). Introduces a Textloc.t parameter type: a labelled function argument annotated [%call_loc] is auto-filled with the caller's source location. Affects monadic bind tracing, test-framework diagnostics, and embedded-language error reporting. Not merged; implementation exists at Jane Street.
  • Discussion in the RFC addresses API gaps: a line_range accessor for multi-line spans, and lossy conversion from Location.t when a span crosses #line directives into a different file. No cross-file span is representable in the proposed Textloc.t.

ocaml/ocaml

Permalink

Features

  • Constructor unboxing / head shapes (open): PR #15227 extends [@unboxed] to multi-constructor variant types by tracking head shapes (tag + block size) in the type checker. Affects pattern-matching compilation and the separability analysis.

  • Warning 8 (partial-match) fatal by default (open, breaking): PR #15269 makes ocamlc/ocamlopt reject non-exhaustive matches by default. The toplevel retains the non-fatal behaviour.

  • Automatic heap compaction (open, RFC): Issue #15242 proposes porting OxCaml's auto-compaction to trunk, triggered at the end of major GC cycles when free-to-live ratio exceeds OCAMLRUNPARAM=O (default 500).

Compatibility and Releases

  • OCaml 4.14.5 (release, 2026-11-06): six security fixes (OSEC-2026-18/21/22/23/24/30) covering Marshal, Str, Unix.map_file, demarshaling, Windows command quoting, and ephemeron marking; plus a pattern-compilation fix and a macOS compatibility fix.

Fixes

  • Typechecker variance check: 99.5% speedup on constrained parameters (merged): PR #15219 adds a fast path using equal-subexpression matching before falling back to the expensive equivalence check. Reduces a 760 s case to 3.7 s.

  • Windows: Ctrl-Break no longer kills the process (merged): PR #15267 restores the console-control handler that maps Ctrl-Break to SIGINT. Cherry-picked to 5.6.

  • Unix.ADDR_INET rejects out-of-range ports (merged): PR #15261 raises Invalid_argument for ports outside 0–65535 instead of silently truncating modulo 65536. Fixes #15249.

  • Native array bounds check bypassed at index 2⁵⁴ (open): Issue #15244 reports that ocamlopt returns a.(0) instead of raising Invalid_argument for a.(18014398509481984). PR #15161 adds overflow checks to the shift rewrite.