From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Authentication-Results: plum.tunbury.org; dkim=pass (1024-bit key; unprotected) header.d=inria.fr header.i=@inria.fr header.a=rsa-sha256 header.s=dc header.b=N6/n+Vf/; dkim=fail reason="signature verification failed" (1024-bit key) header.d=inria.fr header.i=@inria.fr header.a=rsa-sha256 header.s=dc header.b=eaY+TNlP; dkim-atps=neutral Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.134.164.83; helo=mail2-relais-roc.national.inria.fr; envelope-from=caml-list-owner@inria.fr; receiver=tunbury.org Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by plum.tunbury.org (Postfix) with ESMTP id 47C5140086 for ; Thu, 9 Oct 2025 20:38:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:message-id:mime-version:subject:reply-to: sender:list-id:list-help:list-subscribe:list-unsubscribe: list-post:list-owner:list-archive; bh=5vRkU741Dre7/UkPHLeV63xclY+IYyajUOEiEWNMX9M=; b=N6/n+Vf/svez/EUdf9TPlRvfE8dFHkkHxF98NU5ctn09iEwHGzCgH9XU xQ92cW7J9d7ZZVxkoFceatv5Qk3u3dVm6VPf+rYaPP9qYqAk07TWJjeNA UWGLgoeUztFE4BiK8kOhOHjciOXL7+9IWI5/aq8qtPGtbZQAjN2fgItt+ 8=; X-CSE-ConnectionGUID: EJaJhxxxRg69hc+td3M2Yg== X-CSE-MsgGUID: ttJem0ooQcKIWZtRUpfmJg== Received-SPF: Pass (mail2-relais-roc.national.inria.fr: domain of caml-list-owner@inria.fr designates 128.93.162.160 as permitted sender) identity=mailfrom; client-ip=128.93.162.160; receiver=mail2-relais-roc.national.inria.fr; envelope-from="caml-list-owner@inria.fr"; x-sender="caml-list-owner@inria.fr"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 include:mailout.safebrands.com a:basic-mail.safebrands.com a:basic-mail01.safebrands.com a:basic-mail02.safebrands.com ip4:128.93.142.0/24 ip4:192.134.164.0/24 ip4:128.93.162.160 ip4:128.93.162.3 ip4:128.93.162.88 ip4:89.107.174.7 mx ~all" Received-SPF: None (mail2-relais-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@sympa.inria.fr) identity=helo; client-ip=128.93.162.160; receiver=mail2-relais-roc.national.inria.fr; envelope-from="caml-list-owner@inria.fr"; x-sender="postmaster@sympa.inria.fr"; x-conformance=spf_only Authentication-Results: mail2-relais-roc.national.inria.fr; spf=Pass smtp.mailfrom=caml-list-owner@inria.fr; spf=None smtp.helo=postmaster@sympa.inria.fr; dkim=hardfail (signature did not verify [final]) header.i=@inria.fr X-IronPort-AV: E=Sophos;i="6.19,217,1754949600"; d="scan'208,217";a="243409713" Received: from prod-listesu18.inria.fr (HELO sympa.inria.fr) ([128.93.162.160]) by mail2-relais-roc.national.inria.fr with ESMTP; 09 Oct 2025 22:38:54 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id 81578E0CEA; Thu, 9 Oct 2025 22:38:51 +0200 (CEST) Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id B6DF7E0CE7 for ; Thu, 9 Oct 2025 22:38:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:message-id:subject:mime-version; bh=5vRkU741Dre7/UkPHLeV63xclY+IYyajUOEiEWNMX9M=; b=eaY+TNlPu0kzuwTz5sS/+ugZFWnL1vV/jNpBpf4Q+15K6MuFIN10LdkD ialswT/uQ+8TNPBRPx7/Ge3uA2/QlFLwLGi/UaxLjU1ZP5r/PEs+zAT68 Wy7C0OfvTSj7kgkx+E40htvB6D76keGjd+lQIbJ9gCvDmaOqDkWtEX3L2 o=; X-CSE-ConnectionGUID: rs5WqjhXRuaLPWJUE5M3zA== X-CSE-MsgGUID: /RBXoM0nRw27cCmD+85aGA== X-ThreatScanner-Verdict: Negative X-IronPort-AV: E=Sophos;i="6.19,217,1754949600"; d="scan'208,217";a="243409478" X-URL-LookUp-ScanningError: 1 X-MGA-submission: =?us-ascii?q?MDFA4Tpx9pXFVAdkFo2dVZeZ8pBViUVwssu/Yw?= =?us-ascii?q?WFgkGZsFic0JSwm83ilqOYCyWRgoJ6o3ynK97TdBdEZTPrD2ch7ntST3?= =?us-ascii?q?2cuIRiDyH2QLFwPf63lDoV3JPHBOw3ggOwa9m6P0+LmnoynyDp+Ylp3C?= =?us-ascii?q?+kTZjH/Yu/OojqD6SQyQsQ6g=3D=3D?= Received: from zcs2-store1.inria.fr ([128.93.142.3]) by mail2-relais-roc.national.inria.fr with ESMTP; 09 Oct 2025 22:38:47 +0200 Date: Thu, 9 Oct 2025 22:38:46 +0200 (CEST) From: Florian Angeletti To: caml-list Message-ID: <1722320717.21576132.1760042326865.JavaMail.zimbra@inria.fr> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_32a5f52a-f4aa-4522-ae4e-25c7ee9e1c3a" X-Originating-IP: [88.164.1.134] X-Mailer: Zimbra 10.1.10_GA_4785 (ZimbraWebClient - FF143 (Linux)/10.1.10_GA_4785) Thread-Index: lz3/bB3nUAq6UAes6OcXaVa4NaRVAw== Thread-Topic: OCaml 5.4.0 released Subject: [Caml-list] OCaml 5.4.0 released Reply-To: Florian Angeletti X-Loop: caml-list@inria.fr X-Sequence: 19387 Errors-To: caml-list-owner@inria.fr Precedence: list Precedence: bulk Sender: caml-list-request@inria.fr X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: --=_32a5f52a-f4aa-4522-ae4e-25c7ee9e1c3a Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Dear Ocaml users,=20 We have the pleasure of celebrating the birthdays of Camille Saint-Sa=EBns = and=20 Karl Schwarzschild by announcing the release of OCaml version 5.4.0.=20 Some of the highlights of OCaml 5.4.0 are:=20 * Labelled tuples=20 It is now possible to add labels on tuple fields=20 let ( * ) (x,~dx) (y,~dx:dy) =3D=20 x*.y, ~dx:(x *. dy +. y *. dx )=20 Those labeled tuples are equivalent to SML records: they are an ordered and= =20 structurally-typed variants of records. In particular, this implies that=20 partial pattern matching on tuples is only possible for labelled tuples wit= h a=20 known type:=20 type t =3D float * dx:float=20 let v (x_and_dx:t) =3D let (x, .. ) =3D x_and_dx in x=20 * Array literal syntax support for immutable arrays and `floatarray`s=20 The array literal syntax is now shared by array-like primitive types,=20 like 'a array, floatarray and the new immutable array iarray.=20 For instance, this code=20 let x =3D Float.Array.of_list [0.;1.;2.]=20 can now be written=20 let x : Float.Array.t =3D [|0.; 1.; 2.|]=20 This syntax is also supported in patterns=20 let one =3D match x with=20 | [|_;y;_|] -> Some y=20 | _ -> None=20 However array indexing still needs to go through user-defined indexing oper= ators=20 let (.$()) =3D Float.Array.get=20 let (.$()<-) =3D Float.Array.set=20 let () =3D x.$(0) <- x.$(1)=20 * Immutable arrays=20 Along with shared array literals, OCaml 5.4 adds support for immutable arra= ys.=20 let v: int iarray =3D [| 0; 1; 2 |]=20 Immutable arrays are covariant in the type of their elements, it is thus po= ssible to coerce=20 immutable arrays with no costs at runtime:=20 let i1: _ iarray =3D [|object method m =3D 0 end|]=20 let i2 =3D ( i1 :> < > iarray)=20 * Atomic record fields=20 It is now possible to mark a field of a record as atomic. Atomic operations= on=20 those fields require to use the new `Atomic.Loc` submodule after accessing = the=20 location with the `[%atomic.loc ...]` builtin extension. For instance,=20 type 'a mpsc_list =3D { mutable head:'a list; mutable tail: 'a list [@atomi= c] }=20 let rec push t x =3D=20 let before =3D Atomic.Loc.get [%atomic.loc t.tail] in=20 let after =3D x :: before in=20 if not (Atomic.Loc.compare_and_set [%atomic.loc t.tail] before after) then= =20 push t x=20 Moreover, it is forbidden to pattern match on atomic fields:=20 let f { head; tail } =3D tail=20 >Error: Atomic fields (here tail) are forbidden in patterns,=20 > as it is difficult to reason about when the atomic read=20 > will happen during pattern matching: the field may be read=20 > zero, one or several times depending on the patterns around it.=20 in order to make all reads on those atomic fields explicit.=20 * Four new standard library modules: Pair, Pqueue, Repr, and Iarray=20 The standard library has been extended with four new modules:=20 - Pair: functions for working on pairs=20 let ones =3D Pair.map_fst succ (0,1)=20 - Pqueue: priority queues, generic or not=20 module Int_pqueue =3D Pqueue.MakeMin(Int)=20 let q =3D Int_pqueue.of_list [4;0;5;7]=20 let some_zero =3D Int_pqueue.pop_min q=20 - Repr: physical and structural equality, comparison function,=20 more generically all functions dependent on the memory representation=20 of values.=20 let f =3D Repr.phys_equal (ref 0) (ref 0)=20 - Iarray: functions on immutable arrays=20 let a =3D Iarray.init 10 Fun.id=20 let b =3D Iarray.map succ a=20 * Restored "memory cleanup upon exit" mode=20 This mode allows to restart many time the OCaml runtime in C-driven program= s=20 that interact with OCaml libraries. It is also useful to reduce noise when= =20 tracking memory leaks in C code running the OCaml runtime. To get around=20 cancellation issues, the restored mode currently assumes that all domains a= re=20 joined before exiting the OCaml runtime.=20 * A new section in the reference manual on profiling OCaml programs on Linu= x and macOS=20 A new section in the reference manual(https://ocaml.org/manual/profil.html)= explains=20 how to use OS specific profiling tools to profile native OCaml programs.=20 * A lot of incremental changes:=20 - Many runtime and code generation improvements=20 - More than thirty new standard library functions=20 - Nearly a dozen improved error messages=20 - Around fifty bug fixes=20 Please report any unexpected behaviours on the OCaml issue tracker at=20 - https://github.com/ocaml/ocaml/issues=20 and post any questions or comments you might have on our discussion forums:= =20 - https://discuss.ocaml.org=20 The full list of changes can be found in the full changelog below.=20 Happy hacking,=20 Florian Angeletti for the OCaml team.=20 Installation Instructions=20 -------------------------------=20 The base compiler can be installed as an opam switch with the following com= mands:=20 opam update=20 opam switch create 5.4.0=20 The source code for the release is also directly available on:=20 - GitHub: https://github.com/ocaml/ocaml/releases/download/5.4.0/ocaml-5.4.= 0.tar.gz=20 - OCaml archives at Inria: https://caml.inria.fr/pub/distrib/ocaml-5.4/ocam= l-5.4.0.tar.gz=20 Fine-Tuned Compiler Configuration=20 -----------------------------------------------=20 If you want to tweak the configuration of the compiler, you can switch to t= he option variant with:=20 opam update=20 opam switch create ocaml-variants.5.4.0+options = =20 where `` is a space separated list of `ocaml-option-*` package= s. For instance, for a `flambda` and `no-flat-float-array` switch:=20 opam switch create 5.4.0+flambda+nffa ocaml-variants.5.4.0+options ocaml-op= tion-flambda ocaml-option-no-flat-float-array=20 Changelog:=20 ----------------=20 Language features:=20 --------------------------=20 - #13097(https://github.com/ocaml/ocaml/issues/13097): added immutable arra= ys (`'a iarray` type, Iarray stdlib module)=20 (Antal Spector-Zabusky and Olivier Nicole, review by Gabriel Scherer,=20 Jeremy Yallop and Vincent Laviron)=20 - #13340(https://github.com/ocaml/ocaml/issues/13340): Array literal syntax= [| e1; ...; en |] can now be used to=20 denote values of type `'a array` and `'a iarray` and `floatarray`,=20 both in expressions and patterns. The compiler disambiguates each=20 case by using contextual type information (assuming `'a array`=20 by default).=20 (Nicol=E1s Ojeda B=E4r, review by Richard Eisenberg, Jeremy Yallop, Jacques= =20 Garrigue, and Gabriel Scherer)=20 - #13498(https://github.com/ocaml/ocaml/issues/13498): Tuple fields are now= optionally labeled:=20 `(x:42, y:0)` and `let (~x, ~y) =3D ... in ...`.=20 (Ryan Tjoa and Chris Casinghino, review by Gabriel Scherer, Chris Casinghin= o,=20 and Leo White)=20 - RFCs#39(https://github.com/ocaml/ocaml/issues/39), #13404(https://github.= com/ocaml/ocaml/issues/13404): atomic record fields=20 `{ ...; mutable readers : int [@atomic]; ... }`=20 `Atomic.Loc.fetch_and_add [%atomic.loc data.readers] 1`=20 (Cl=E9ment Allain and Gabriel Scherer, review by KC Sivaramakrishnan,=20 Basile Cl=E9ment and Olivier Nicole)=20 Standard library:=20 -------------------=20 * (*breaking change*) #14124(https://github.com/ocaml/ocaml/issues/14124): = Do not raise Invalid_argument on negative List.{drop,take}.=20 (Daniel B=FCnzli, review by Gabriel Scherer, Nicol=E1s Ojeda B=E4r)=20 - #13696(https://github.com/ocaml/ocaml/issues/13696): Add Result.product a= nd Result.Syntax:=20 `let open Result.Syntax in let* x =3D ... in ...`=20 (Daniel B=FCnzli, review by Gabriel Scherer, Nicol=E1s Ojeda B=E4r)=20 - #12871(https://github.com/ocaml/ocaml/issues/12871): Add the Pqueue modul= e to the stdlib. It implements priority queues.=20 (Jean-Christophe Filli=E2tre, review by Daniel B=FCnzli, L=E9o Andr=E8s and= =20 Gabriel Scherer)=20 - #13760(https://github.com/ocaml/ocaml/issues/13760): Add String.{edit_dis= tance,spellcheck}=20 (Daniel B=FCnzli, review by wikku, Nicol=E1s Ojeda B=E4r, Gabriel Scherer a= nd=20 Florian Angeletti)=20 - #13753(https://github.com/ocaml/ocaml/issues/13753), #13755(https://githu= b.com/ocaml/ocaml/issues/13755): Add Stdlib.Repr:=20 Repr.phys_equal and Repr.compare are more explicit than (=3D=3D) and `compa= re`.=20 (Kate Deplaix, Thomas Blanc and L=E9o Andr=E8s, review by Gabriel Scherer,= =20 Florian Angeletti, Nicol=E1s Ojeda B=E4r, Daniel B=FCnzli and Jeremy Yallop= )=20 - #13695(https://github.com/ocaml/ocaml/issues/13695): Add Stdlib.Char.Asci= i=20 (Daniel B=FCnzli, review by by Nicol=E1s Ojeda B=E4r and Jeremy Yallop)=20 - #13720(https://github.com/ocaml/ocaml/issues/13720): Add Result.{get_ok',= error_to_failure}=20 (Daniel B=FCnzli, review by wikku, Gabriel Scherer, Nicol=E1s Ojeda B=E4r,= =20 Vincent Laviron and hirrolot)=20 - #13885(https://github.com/ocaml/ocaml/issues/13885): Add Dynarray.{exists= 2, for_all2}.=20 (T. Kinsart, review by Daniel B=FCnzli, Gabriel Scherer, and Nicol=E1s Ojed= a B=E4r)=20 * (*breaking change*) #13862(https://github.com/ocaml/ocaml/issues/13862): = Make List.sort_uniq keep the first occurrences of duplicates.=20 (Beno=EEt Jubin, review by Nicol=E1s Ojeda B=E4r, Gabriel Scherer)=20 - #13836(https://github.com/ocaml/ocaml/issues/13836): Add [Float.]Array.{e= qual,compare}.=20 (Daniel B=FCnzli, review by Nicol=E1s Ojeda B=E4r and Gabriel Scherer)=20 - #13796(https://github.com/ocaml/ocaml/issues/13796): Add Uchar.utf_8_deco= de_length_of_byte and=20 Uchar.max_utf_8_decode_length.=20 (Daniel B=FCnzli, review by Nicol=E1s Ojeda B=E4r and Florian Angeletti)=20 - #13768(https://github.com/ocaml/ocaml/issues/13768): Add Either.get_left = and Either.get_right=20 (T. Kinsart, review by Nicol=E1s Ojeda B=E4r and Florian Angeletti)=20 * (*breaking change*) #13570(https://github.com/ocaml/ocaml/issues/13570), = #13794(https://github.com/ocaml/ocaml/issues/13794): Format, add an out_wid= th function to Format device for=20 approximating unicode width.=20 (Florian Angeletti, review by Nicol=E1s Ojeda B=E4r, Daniel B=FCnzli,=20 and Gabriel Scherer)=20 - #13731(https://github.com/ocaml/ocaml/issues/13731): Add Either.retract= =20 (Daniel B=FCnzli, review by Nicol=E1s Ojeda B=E4r and David Allsopp)=20 - #13729(https://github.com/ocaml/ocaml/issues/13729): Add Seq.filteri=20 (T. Kinsart, review by Nicol=E1s Ojeda B=E4r and Daniel B=FCnzli)=20 - #13721(https://github.com/ocaml/ocaml/issues/13721): Add Result.retract= =20 (Daniel B=FCnzli, review by Gabriel Scherer, Nicol=E1s Ojeda B=E4r and=20 David Allsopp)=20 - #13310(https://github.com/ocaml/ocaml/issues/13310): Add Stdlib.Pair=20 (Victoire Noizet, review by Nicol=E1s Ojeda B=E4r, Daniel B=FCnzli, Xavier = Van de=20 Woestyne, Jeremy Yallop and Florian Angeletti)=20 - #13662(https://github.com/ocaml/ocaml/issues/13662): Add eager boolean op= erations Bool.logand, Bool.logor, Bool.logxor=20 (Jeremy Yallop, review by Nicol=E1s Ojeda B=E4r)=20 - #13463(https://github.com/ocaml/ocaml/issues/13463), #13572(https://githu= b.com/ocaml/ocaml/issues/13572): Avoid raising Queue.empty in Format when i= t is used=20 concurrently, raise a specific exception instead.=20 (Chritophe Raffalli, review by Gabriel Scherer and Daniel B=FCnzli)=20 - #13620(https://github.com/ocaml/ocaml/issues/13620): Avoid copying the st= ring in String.concat, String.sub and=20 String.split_on_char when the full string is returned.=20 (Christophe Raffalli, review by Nicol=E1s Ojeda B=E4r and Gabriel Scherer a= nd=20 Hugo Heuzard)=20 - #13727(https://github.com/ocaml/ocaml/issues/13727): Reimplement Sys.gete= nv_opt not to use exceptions internally, meaning=20 that the current backtrace is preserved when Sys.getenv_opt returns None.= =20 (David Allsopp, review by Nicol=E1s Ojeda B=E4r, Josh Berdine and Gabriel S= cherer)=20 - #13737(https://github.com/ocaml/ocaml/issues/13737): Avoid closure alloca= tions in Weak.Make.add when resizing the=20 table=20 (Vincent Laviron, review by Gabriel Scherer and Daniel B=FCnzli)=20 - #13740(https://github.com/ocaml/ocaml/issues/13740): Improve performance = of Weak.find_aux=20 (Josh Berdine, review by Gabriel Scherer)=20 - #13782(https://github.com/ocaml/ocaml/issues/13782): Improve performance = and type safety of Type.Id by using=20 [%extension_constructor] instead of Obj.Extension_constructor.of_val.=20 (Basile Cl=E9ment, review by Vincent Laviron and Nicol=E1s Ojeda B=E4r)=20 - #13589(https://github.com/ocaml/ocaml/issues/13589): Expose Sys.io_buffer= _size, the size of internal buffers used by the=20 runtime system and the `unix` library.=20 (Yves Ndiaye and Nicol=E1s Ojeda B=E4r, review by Daniel B=FCnzli and Nicol= =E1s Ojeda=20 B=E4r)=20 - #13569(https://github.com/ocaml/ocaml/issues/13569): add a `Format.format= _text` which adds break hints to format literals.=20 (Florian Angeletti, review by Nicol=E1s Ojeda B=E4r, Daniel B=FCnzli,=20 and Gabriel Scherer)=20 - #13578(https://github.com/ocaml/ocaml/issues/13578): On Windows, use the = OS CSPRNG to seed the Stdlib.Random generator.=20 (Antonin D=E9cimo, review by Miod Vallat, Nicol=E1s Ojeda B=E4r, and Xavier= Leroy)=20 - #13859(https://github.com/ocaml/ocaml/issues/13859): Fix Weak.get_copy no= t darkening custom blocks=20 (Josh Berdine, review by Stephen Dolan)=20 - #13909(https://github.com/ocaml/ocaml/issues/13909): Add `Dynarray.unsafe= _to_iarray`=20 (Olivier Nicole, review by Daniel B=FCnzli, Stefan Muenzel and Gabriel Sche= rer,=20 request by Daniel B=FCnzli)=20 - #13932(https://github.com/ocaml/ocaml/issues/13932): Add List.singleton a= nd Seq.singleton=20 (David Allsopp, tariffs applied by Nicol=E1s Ojeda B=E4r and Gabriel Schere= r)=20 * (*breaking change*) #13843(https://github.com/ocaml/ocaml/issues/13843): = Add signal definitions for SIGIO and SIGWINCH. Introduces a=20 type alias for signal int, signal_to_string to convert OCaml signal numbers= =20 to their POSIX equivalent names, and signal_of_int/signal_to_int for=20 converting between OCaml and platform signal numbers. (Reported in #13825(h= ttps://github.com/ocaml/ocaml/issues/13825))=20 (Tim McGilchrist, review by David Allsopp, Nicol=E1s Ojeda B=E4r, Daniel B= =FCnzli=20 Jan Midtgaard and Miod Vallat)=20 Runtime system:=20 -----------------------=20 - #13500(https://github.com/ocaml/ocaml/issues/13500): Add frame pointers s= upport for ARM64 on Linux and macOS.=20 (Tim McGilchrist, review by KC Sivaramakrishnan, Fabrice Buoro=20 and Miod Vallat)=20 - #12964(https://github.com/ocaml/ocaml/issues/12964): Reintroduce "memory = cleanup upon exit" mode. The cleanup will=20 however be incomplete if not all domains have been joined when the main=20 domain terminates.=20 (Miod Vallat, review by KC Sivaramakrishnan, feedback from Nick Barnes=20 and Gabriel Scherer)=20 - #13582(https://github.com/ocaml/ocaml/issues/13582): Enable software pref= etching support for ARM64, s390x, PPC64 and RiscV.=20 Used during GC marking and sweeping to speed up both operations by=20 prefetching data.=20 (Tim McGilchrist, review by Nick Barnes, Antonin D=E9cimo,=20 Stephen Dolan and Miod Vallat)=20 - #13675(https://github.com/ocaml/ocaml/issues/13675): Make Unix.map_file m= emory show up in Gc.Memprof.=20 (Stephen Dolan, review by Guillaume Munch-Maccagnoni and Gabriel Scherer)= =20 - #13785(https://github.com/ocaml/ocaml/issues/13785): Add `Runtime_events.= Timestamp.get_current`.=20 (Simon Cruanes)=20 - #13774(https://github.com/ocaml/ocaml/issues/13774): Fix for inaccurate l= ive blocks/words stats in compaction.=20 (Sadiq Jaffer, report by KC Sivaramakrishnan and Jan Midtgaard, review by= =20 Gabriel Scherer)=20 - #13773(https://github.com/ocaml/ocaml/issues/13773): Ensure that shared p= ool owners are correctly set on pool adoption.=20 (Stephen Dolan, review by Sadiq Jaffer and Gabriel Scherer)=20 * (*breaking change*) #11449(https://github.com/ocaml/ocaml/issues/11449), = #13497(https://github.com/ocaml/ocaml/issues/13497): Add caml_stat_char_arr= ay_{to,of}_os functions allowing=20 conversion of string data which may contain NUL characters. Correct=20 implementation of caml_stat_strdup_to_utf16 to raise Out_of_memory instead = of=20 returning of NULL (the behaviour of caml_stat_strdup_to_os was inconsistent= =20 between Unix/Windows).=20 (David Allsopp, review by Nick Barnes, Antonin D=E9cimo and Miod Vallat)=20 - #13352(https://github.com/ocaml/ocaml/issues/13352): Concurrency refactor= s and cleanups.=20 (Antonin D=E9cimo, review by Gabriel Scherer, David Allsopp, and Miod Valla= t)=20 - #13437(https://github.com/ocaml/ocaml/issues/13437): Stop using GetProcAd= dress to load functions that were not=20 available in older, now unsupported Windows versions.=20 (Antonin D=E9cimo, review by Nicol=E1s Ojeda B=E4r and David Allsopp)=20 - #13470(https://github.com/ocaml/ocaml/issues/13470): Constify some functi= on parameters, flags tables, and some=20 pointers in C code (take 3).=20 (Antonin D=E9cimo, review by Stephen Dolan and Miod Vallat)=20 - #13492(https://github.com/ocaml/ocaml/issues/13492): Parse the CAML_LD_LI= BRARY_PATH environment variable for the=20 shared_libs_path item in `ocamlrun -config` in addition to displaying the= =20 entries found in ld.conf.=20 (David Allsopp, review by Stephen Dolan)=20 - #13496(https://github.com/ocaml/ocaml/issues/13496): Add missing .type an= d .size directives to main frametable to silence=20 warnings from the linker when using libasmrun_shared on amd64 and power. Th= e=20 other backends already carried these directives.=20 (David Allsopp, review by Tim McGilchrist and Miod Vallat)=20 - #13354(https://github.com/ocaml/ocaml/issues/13354): Use C99 flexible arr= ay member syntax everywhere.=20 (Antonin D=E9cimo, review by Miod Vallat, Gabriel Scherer, and Xavier Leroy= )=20 - #11865(https://github.com/ocaml/ocaml/issues/11865), #13584(https://githu= b.com/ocaml/ocaml/issues/13584): Fix a deadlock triggered by deleting C roo= ts from C finalisers=20 (Stephen Dolan, report by Timothy Bourke, review by Mark Shinwell and Damie= n=20 Doligez)=20 - #13613(https://github.com/ocaml/ocaml/issues/13613): Functions from caml/= skiplist.h and caml/lf_skiplist.h no longer raise=20 Out_of_memory exceptions that the runtime could not handle.=20 (Guillaume Munch-Maccagnoni, review by Stephen Dolan)=20 - #13575(https://github.com/ocaml/ocaml/issues/13575), #13635(https://githu= b.com/ocaml/ocaml/issues/13635): Maintain OCaml frame pointers correctly ev= en when using=20 C libraries that do not support them.=20 (Stephen Dolan and David Allsopp, report by Thomas Leonard, review by Tim= =20 McGilchrist and Fabrice Buoro)=20 - #13643(https://github.com/ocaml/ocaml/issues/13643): Allow values reachab= le from ephemeron keys to be collected by minor GC=20 (Stephen Dolan, review by Fran=E7ois Bobot)=20 - #13701(https://github.com/ocaml/ocaml/issues/13701): optimize `caml_conti= nuation_use` based on #12735(https://github.com/ocaml/ocaml/issues/12735)= =20 (Hugo Heuzard, review by KC Sivaramakrishnan)=20 - #13227(https://github.com/ocaml/ocaml/issues/13227), #13714(https://githu= b.com/ocaml/ocaml/issues/13714): Review of locking in the multicore runtime= . Fix=20 deadlocks in runtime events and potential deadlocks with named=20 values.=20 (Guillaume Munch-Maccagnoni, review by Gabriel Scherer, tests by=20 Jan Midtgaard)=20 - #13736(https://github.com/ocaml/ocaml/issues/13736): Fix major GC pacing = bug triggered by synchronous collections.=20 (Nick Barnes, review by Damien Doligez and Tim McGilchrist)=20 - #13827(https://github.com/ocaml/ocaml/issues/13827): Avoid re-marking eph= emerons with trivial data.=20 (Stephen Dolan, review by Nick Barnes and Josh Berdine, benchmarking by=20 Nicol=E1s Ojeda B=E4r)=20 - #13300(https://github.com/ocaml/ocaml/issues/13300), #13861(https://githu= b.com/ocaml/ocaml/issues/13861): introduce `Gc.ramp_up` to explicitly mark = ramp-up=20 phases of memory consumption and avoid GC overwork. Ramp-up behaviors=20 are worse with OCaml 5 than with OCaml 4 due to higher sensitivity=20 to excessive pacing computations. Indicating ramp-up explicitly eliminates= =20 the main known slowdown of OCaml 5 (relative to OCaml 4) for Coq/Rocq.=20 (Gabriel Scherer, review by Damien Doligez and Guillaume Munch-Maccagnoni,= =20 report by Emilio Jes=FAs Gallego Arias and Olivier Nicole)=20 - #14057(https://github.com/ocaml/ocaml/issues/14057): Don't update memprof= too early at the end of a minor GC.=20 (Nick Barnes, review by Damien Doligez).=20 Code generation and optimizations:=20 -----------------------------------------------=20 - #13262(https://github.com/ocaml/ocaml/issues/13262), #14074(https://githu= b.com/ocaml/ocaml/issues/14074): fix performance issue on Apple Silicon mac= OS by emitting=20 `stlr` instead of `dmb ishld; str`.=20 (KC Sivaramakrishnan, report by Fran=E7ois Pottier, analysis by Fr=E9d=E9ri= c Bour,=20 Xavier Leroy, Miod Vallat, Gabriel Scherer and Stephen Dolan, review by Mio= d=20 Vallat, Vincent Laviron and Xavier Leroy)=20 * (*breaking change*) #13050(https://github.com/ocaml/ocaml/issues/13050), = #14104(https://github.com/ocaml/ocaml/issues/14104), #14143(https://github.= com/ocaml/ocaml/issues/14143): Use '$' instead of '.' to separate module na= mes=20 in symbol names on macOS and Windows (including the Cygwin backend).=20 This changes mangling of OCaml identifiers on those operating systems from= =20 `camlModule.name_NNN` to `camlModule$name_NNN`. Additionally it=20 changes the encoding of special characters from $xx (two hex digits)=20 to $$xx (two dollar signs followed by two hex digits).=20 (Tim McGilchrist, with contributions from Xavier Leroy,=20 reviewed by Xavier Leroy, Miod Vallat, Gabriel Scherer,=20 Nick Barnes and Hugo Heuzard)=20 - #13807(https://github.com/ocaml/ocaml/issues/13807): Allow unaligned memo= ry accesses on ARM64.=20 (Matthew Else, review by Xavier Leroy)=20 - #13565(https://github.com/ocaml/ocaml/issues/13565): less tagging in swit= ches compiled to affine transformations=20 by ocamlopt.=20 (Gabriel Scherer and Cl=E9ment Allain, review by Vincent Laviron,=20 report by Vesa Karvonen)=20 - #13672(https://github.com/ocaml/ocaml/issues/13672) Avoid register stall = on conversion instructions on amd64.=20 (Pierre Chambart, review by Gabriel Scherer and Xavier Leroy,=20 report by Patrick Nicodemus)=20 - #13667(https://github.com/ocaml/ocaml/issues/13667): (originally #11162(h= ttps://github.com/ocaml/ocaml/issues/11162)) Fix instr_size computation on = arm64.=20 (Stephen Dolan and Tim McGilchrist, review by Xavier Leroy=20 and David Allsopp)=20 - #13758(https://github.com/ocaml/ocaml/issues/13758): Propagate more value= kinds in Flambda to allow more unboxing=20 (Vincent Laviron, review by Pierre Chambart)=20 - #13759(https://github.com/ocaml/ocaml/issues/13759): Propagate more type = information from clambda to cmm.=20 (Pierre Chambart, review by Gabriel Scherer)=20 - #13735(https://github.com/ocaml/ocaml/issues/13735): Follow the behaviour= of the C compiler to decide whether to emit the=20 `.size` and `.type` directives and the `.note.GNU-stack` section=20 (Samuel Hym, review by Miod Vallat, Antonin D=E9cimo and Gabriel Scherer)= =20 Other libraries:=20 --------------------=20 * (*breaking change*) #13435(https://github.com/ocaml/ocaml/issues/13435): = On Windows, use system calls for `Filename.get_temp_dir_name` instead=20 of directly reading the environment, which in particular improves the secur= ity=20 of OCaml processes running in the SYSTEM security context by mitigating=20 privileged file operation attacks. For all other processes running with the= =20 default environment (where `TEMP` is set), there is no discernible change.= =20 (Antonin D=E9cimo, review by Nicol=E1s Ojeda B=E4r and David Allsopp)=20 - #13504(https://github.com/ocaml/ocaml/issues/13504), #13625(https://githu= b.com/ocaml/ocaml/issues/13625), #14223(https://github.com/ocaml/ocaml/issu= es/14223): Add `Thread.set_current_thread_name`.=20 (Romain Beauxis, review by Gabriel Scherer and Antonin D=E9cimo)=20 * (*breaking change*) #13376(https://github.com/ocaml/ocaml/issues/13376): = Allow Dynlink.loadfile_private to load bytecode libraries with=20 internal dependencies=20 (Vincent Laviron, report by St=E9phane Glondu, review by Nicol=E1s Ojeda B= =E4r=20 and Xavier Leroy)=20 - #13429(https://github.com/ocaml/ocaml/issues/13429): add `Unix.sigwait`, = a binding to the `sigwait` system call;=20 implement `Thread.wait_signal` using `Unix.sigwait`, and=20 `Thread.sigmask` using `Unix.sigprocmask`.=20 (Xavier Leroy, review by Antonin D=E9cimo, Gabriel Scherer, Miod Vallat)=20 - #13442(https://github.com/ocaml/ocaml/issues/13442), #13452(https://githu= b.com/ocaml/ocaml/issues/13452): Fix Unix.getgroups for users belonging to = more than 32 groups=20 when using musl=20 (Kate Deplaix, review by Gabriel Scherer, Antonin D=E9cimo, Anil Madhavaped= dy)=20 - #13576(https://github.com/ocaml/ocaml/issues/13576): Introduce internal h= elpers to convert between time representations.=20 On Windows, prevent erroneously waiting for an unbounded time in Unix.selec= t=20 if more than 64 file descriptors per lists are watched, or if watching=20 non-socket file descriptors, and a timeout longer than $2^{32}$ millisecond= s=20 is used. Cap the timeout to $2^{32}$ milliseconds.=20 (Antonin D=E9cimo, review by Gabriel Scherer and Miod Vallat)=20 - #13921(https://github.com/ocaml/ocaml/issues/13921): Set cloexec correctl= y on CRT file descriptors created by the Unix=20 library on Windows. The inheritance on the underlying Win32 handles was=20 correctly set, but the book-keeping for the CRT was leaking the value of=20 non-inherited handles which combined with re-use of HANDLE values within=20 processes could appear to make a CRT file descriptor "re-open".=20 (David Allsopp, review by Nicol=E1s Ojeda B=E4r)=20 Tools:=20 -------=20 - #13686(https://github.com/ocaml/ocaml/issues/13686): Fix Python debugger = extensions (for LLDB and GDB) to restore=20 functionality broken by #13272(https://github.com/ocaml/ocaml/issues/13272)= in 5.3.=20 (Nick Barnes, review by Tim McGilchrist Gabriel Scherer)=20 - #12019(https://github.com/ocaml/ocaml/issues/12019): ocamlc: add `align_d= ouble` and `align_int64` to `ocamlc -config`=20 output.=20 (Romain Beauxis, review by David Allsopp)=20 - #12642(https://github.com/ocaml/ocaml/issues/12642), #13536(https://githu= b.com/ocaml/ocaml/issues/13536), #14184(https://github.com/ocaml/ocaml/issu= es/14184), #14192(https://github.com/ocaml/ocaml/issues/14192): in the topl= evel, print shorter paths for=20 constructors and labels when only some modules along their path are open.= =20 (Gabriel Scherer, review by Florian Angeletti)=20 - #13199(https://github.com/ocaml/ocaml/issues/13199), #13485(https://githu= b.com/ocaml/ocaml/issues/13485), #13665(https://github.com/ocaml/ocaml/issu= es/13665), #13762(https://github.com/ocaml/ocaml/issues/13762), #13965(http= s://github.com/ocaml/ocaml/issues/13965): Support running native debuggers = in=20 ocamltest.=20 (Tim McGilchrist, Sebastien Hinderer, David Allsopp, Antonin D=E9cimo, revi= ew by=20 Sebastien Hinderer, Gabriel Scherer, Antonin D=E9cimo, and Tim McGilchrist)= =20 - #13764(https://github.com/ocaml/ocaml/issues/13764), #13779(https://githu= b.com/ocaml/ocaml/issues/13779): add missing "-keywords" flag to ocamldep a= nd ocamlprof=20 (Florian Angeletti, report by Prashanth Mundkur, review by Gabriel Scherer)= =20 - #13877(https://github.com/ocaml/ocaml/issues/13877): ocamldoc, add a `-la= tex-escape-underscore` flag to control the=20 escaping of `_` underscore in latex references (in order to be able to matc= h=20 odoc behaviour).=20 (Florian Angeletti, review by Gabriel Scherer)=20 - #13906(https://github.com/ocaml/ocaml/issues/13906): Add support for a `m= ulticore` tag in ocamltest and use it for=20 tests that fail on mono-core systems.=20 (St=E9phane Glondu, review by Nicol=E1s Ojeda B=E4r)=20 Manual and documentation:=20 -------------------------=20 - #13751(https://github.com/ocaml/ocaml/issues/13751): Document support for= profiling with Linux perf and frame pointers.=20 (Tim McGilchrist, review by Gabriel Scherer and Miod Vallat)=20 - #12452(https://github.com/ocaml/ocaml/issues/12452): Add examples to Stdl= ib.Fun documentation.=20 (Hazem ElMasry, review by Florian Angeletti and Gabriel Scherer)=20 - #13924(https://github.com/ocaml/ocaml/issues/13924): Document how to put = [@deprecated] on let bindings, constructors, etc=20 in the manual=20 (Valentin Gatien-Baron, review by Florian Angeletti)=20 - #13694(https://github.com/ocaml/ocaml/issues/13694): Fix name for caml_ha= sh_variant in the C interface.=20 (Michael Hendricks)=20 - #13732(https://github.com/ocaml/ocaml/issues/13732): Document that custom= finalizers must not access the OCaml heap, etc.=20 (Josh Berdine, review by Stephen Dolan and Guillaume Munch-Maccagnoni)=20 Type system:=20 ------------=20 * (*breaking change*) #13830(https://github.com/ocaml/ocaml/issues/13830): = fail rather than silently create abstract module types when avoiding=20 (i.e. hiding) signature items, as in:=20 ```ocaml=20 module N =3D struct=20 open (struct type t =3D A | B end)=20 module type T =3D sig type u =3D t * int end=20 end=20 ```=20 Before, it was succeeding with `module N : sig module type T end`, now it= =20 fails. Similarly for anonymous functor calls (of the form `F(struct ... end= ))=20 (Clement Blaudeau, review by Gabriel Scherer)=20 Compiler user-interface and warnings:=20 -------------------------------------=20 - #13817(https://github.com/ocaml/ocaml/issues/13817): align spellchecking = hints with the possibly misspelled identifier/=20 Error: Unbound type constructor "aray"=20 Hint: Did you mean "array"?=20 (Florian Angeletti, suggestion by Daniel B=FCnzli, review by Gabriel Schere= r)=20 - #13587(https://github.com/ocaml/ocaml/issues/13587): Enable native backen= d on x86_64 GNU/Hurd.=20 (Samuel Thibault, review by Antonin D=E9cimo, S=E9bastien Hinderer and Miod= =20 Vallat)=20 - #13663(https://github.com/ocaml/ocaml/issues/13663): Improve the error me= ssage when GADT parameter variance cannot be=20 checked.=20 (Stefan Muenzel, review by Gabriel Scherer and Florian Angeletti)=20 - #13646(https://github.com/ocaml/ocaml/issues/13646): Improve the error me= ssages when a recursive module type=20 references another recursive module type.=20 (Stefan Muenzel, review by Florian Angeletti and Gabriel Scherer)=20 - #13702(https://github.com/ocaml/ocaml/issues/13702), #13865(https://githu= b.com/ocaml/ocaml/issues/13865): Specialized error messages for functors ap= pearing in contexts=20 where non-functors were expected `module A: sig ... end =3D Set.Make`=20 (and the reverse)=20 (Florian Angeletti, report by Jeremy Yallop, review by Gabriel Scherer)=20 - #13788(https://github.com/ocaml/ocaml/issues/13788), #13813(https://githu= b.com/ocaml/ocaml/issues/13813): Keep the module context in spellchecking h= ints.=20 `Fun.protact` now prompts `Did you mean "Fun.protect?"` rather than=20 `Did you mean "protect?"`.=20 (Florian Angeletti, suggestion by Daniel B=FCnzli, review by Gabriel Schere= r)=20 - #13428(https://github.com/ocaml/ocaml/issues/13428): support dump=3D[sour= ce | parsetree | lambda | ... | cmm | ...]=20 in OCAMLRUNPARAM=20 (Gabriel Scherer, review by Vincent Laviron)=20 - #13493(https://github.com/ocaml/ocaml/issues/13493): Clearer error messag= e in ocamlc for conflicting link options for=20 C stubs when shared libraries are not available.=20 (David Allsopp, review by Gabriel Scherer)=20 - #13563(https://github.com/ocaml/ocaml/issues/13563), lighter inline code = styling for output without bold support: inline=20 code is no longer printed as "..." to avoid confusion with OCaml strings.= =20 (Florian Angeletti, review by Richard Eisenberg)=20 - #13568(https://github.com/ocaml/ocaml/issues/13568), composable formattin= g for warning and alert messages=20 (Florian Angeletti, review by Richard Eisenberg)=20 - #13601(https://github.com/ocaml/ocaml/issues/13601): Enable natdynlink on= x86_64 GNU/Hurd=20 (Samuel Thibault, review by S=E9bastien Hinderer)=20 - #13809(https://github.com/ocaml/ocaml/issues/13809): Distinguish `(module= M : S)` and `(module M) : (module S)` and=20 change locations of error messages when `S` is ill-typed in `(module S)`=20 (Samuel Vivien, review by Florian Angeletti and Gabriel Scherer)=20 - #13814(https://github.com/ocaml/ocaml/issues/13814), 13898: Add an `unuse= d-type-declaration` warning when using=20 a `t as 'a` with no other occurences of `'a`=20 (Samuel Vivien, review by Florian Angeletti, Kate Deplaix)=20 - #13818(https://github.com/ocaml/ocaml/issues/13818): better delimited hin= ts in error message=20 (Florian Angeletti, review by Gabriel Scherer)=20 Internal/compiler-libs changes:=20 -------------------------------=20 - #13539(https://github.com/ocaml/ocaml/issues/13539), #13776(https://githu= b.com/ocaml/ocaml/issues/13776): Use nanosleep instead of usleep or select,= if available.=20 (Antonin D=E9cimo, review by Miod Vallat and Gabriel Scherer)=20 - #13748(https://github.com/ocaml/ocaml/issues/13748): Add a .editorconfig = file for basic editor auto-configuration.=20 (Antonin D=E9cimo, review by Gabriel Scherer and David Allsopp)=20 - #13302(https://github.com/ocaml/ocaml/issues/13302), #14236(https://githu= b.com/ocaml/ocaml/issues/14236): Store locations of longidents components= =20 (Ulysse G=E9rard and Jules Aguillon, review by Jules Aguillon=20 and Florian Angeletti)=20 - #13314(https://github.com/ocaml/ocaml/issues/13314): Comment the code of = Translclass=20 (Vincent Laviron and Nathana=EBlle Courant, review by Olivier Nicole)=20 - #13362(https://github.com/ocaml/ocaml/issues/13362): reimplement Floatarr= ay.concat in C (`caml_floatarray_concat`),=20 matching the implementation of Array.concat.=20 (Gabriel Scherer, review by Nicol=E1s Ojeda B=E4r)=20 - #13624(https://github.com/ocaml/ocaml/issues/13624): Added location to ex= ception definitions and type extensions=20 (Samuel Vivien, review by Gabriel Scherer)=20 - #13425(https://github.com/ocaml/ocaml/issues/13425): undocumented -dmatch= comp flag for the debug=20 output of the pattern-matching compiler=20 (Gabriel Scherer, review by Vincent Laviron and Nicol=E1s Ojeda B=E4r)=20 - #13460(https://github.com/ocaml/ocaml/issues/13460): introduce a variant = of all predefined types=20 (Gabriel Scherer, review by Ulysse G=E9rard and Florian Angeletti)=20 - #13457(https://github.com/ocaml/ocaml/issues/13457), #13537(https://githu= b.com/ocaml/ocaml/issues/13537): Annotate alloc/free open/close pairs of fu= nctions=20 with compiler attributes for static analysis.=20 (Antonin D=E9cimo, review by Gabriel Scherer and Florian Angeletti)=20 - #13464(https://github.com/ocaml/ocaml/issues/13464): Use generic types in= call to `subtype`. This improves=20 inference of type-directed disambiguation in principal mode.=20 (Richard Eisenberg, review by Jacques Garrigue)=20 - #13606(https://github.com/ocaml/ocaml/issues/13606): Fix Numbers.Int_base= .compare=20 (Mark Shinwell, review by Vincent Laviron)=20 - #13612(https://github.com/ocaml/ocaml/issues/13612): Refactor `type_appli= cation`=20 (Ulysse G=E9rard, Leo White, review by Antonin D=E9cimo, Gabriel Scherer,= =20 Samuel Vivien, Florian Angeletti and Jacques Garrigue)=20 - #13744(https://github.com/ocaml/ocaml/issues/13744): Refactor in `collect= _apply_args`=20 (Samuel Vivien, review by Florian Angeletti and Gabriel Scherer)=20 - #13787(https://github.com/ocaml/ocaml/issues/13787): a new -dcanonical-id= s option to show canonicalized identifier stamps=20 in -d{lambda,cmm,...} outputs.=20 (Gabriel Scherer, review by Vincent Laviron and David Allsopp,=20 suggested by David Allsopp)=20 - #13820(https://github.com/ocaml/ocaml/issues/13820): Add a new option -i-= variance to print the variance of every=20 type parameter; bivariance is printed as `+-`, and for consistency,=20 parser is modified too to accept `+-` and `-+` as `type_variance`.=20 (Takafumi Saikawa and Jacques Garrigue, review by Florian Angeletti)=20 - #13828(https://github.com/ocaml/ocaml/issues/13828): Apply BUILD_PATH_PRE= FIX_MAP to Sys.argv.(0) before storing it in .cmt=20 and .cmti files.=20 (David Allsopp, review by Daniel B=FCnzli and Gabriel Scherer)=20 - #13848(https://github.com/ocaml/ocaml/issues/13848): Add all paths compon= ents to the cmt files indexes=20 (Ulysse G=E9rard, review by Florian Angeletti)=20 - #13854(https://github.com/ocaml/ocaml/issues/13854): Make the parser set = loc_ghost more correctly, for `keyword%extension`=20 syntax=20 (Valentin Gatien-Baron, review by Florian Angeletti)=20 - #13856(https://github.com/ocaml/ocaml/issues/13856): Add a new indirectio= n in types AST called `package` that stores the=20 content of a `Tpackage` node=20 (Samuel Vivien, review by Florian Angeletti)=20 - #13866(https://github.com/ocaml/ocaml/issues/13866): Modified occurence c= heck that prevents recursive types for it to see=20 the checked type as a graph rather than a tree=20 (Samuel Vivien, report by Didier Remy, review by Florian Angeletti=20 and Jacques Garrigue)=20 - #13884(https://github.com/ocaml/ocaml/issues/13884) Correctly index modul= es in constructors and labels paths=20 (Ulysse G=E9rard, review by Florian Angeletti)=20 - #13946(https://github.com/ocaml/ocaml/issues/13946): refactor the #instal= l_printer code in the debugger and toplevel=20 (Pierre Boutillier, review by Gabriel Scherer and Florian Angeletti)=20 - #13952(https://github.com/ocaml/ocaml/issues/13952): check and document t= he correctness of `caml_domain_alone ()`.=20 (Gabriel Scherer, review by KC Sivaramakrishnan, report by Olivier Nicole)= =20 - #13971(https://github.com/ocaml/ocaml/issues/13971): Keep generalized str= ucture from patterns when typing `let`=20 (Leo White, review by Samuel Vivien and Florian Angeletti)=20 * (*breaking change*) #13972(https://github.com/ocaml/ocaml/issues/13972): = Renamed the `-no-alias-deps` flag internal representation to=20 `no_alias_deps` instead of `transparent_modules`.=20 (Clement Blaudeau, review by Gabriel Scherer)=20 Build system:=20 -------------=20 * (*breaking change*) #13526(https://github.com/ocaml/ocaml/issues/13526), = #13789(https://github.com/ocaml/ocaml/issues/13789), #13804(https://github.= com/ocaml/ocaml/issues/13804): Simplify the build of cross compilers=20 This replaces the configure `--with-target-bindir` option by an equivalent= =20 `TARGET_BINDIR` variable=20 (Samuel Hym, review by Miod Vallat, Xavier Leroy, Antonin D=E9cimo and S=E9= bastien=20 Hinderer)=20 - #13431(https://github.com/ocaml/ocaml/issues/13431): Simplify github acti= on responsible for flagging PRs with=20 the `parsetree-changes` label and extend it to mention the @ppxlib-dev=20 team.=20 (Nathan Rebours, review by Florian Angeletti)=20 - #13494(https://github.com/ocaml/ocaml/issues/13494): Use native symlinks = on Windows for the OCaml installation, reducing=20 disk usage considerably.=20 (David Allsopp, review by Nicol=E1s Ojeda B=E4r and Gabriel Scherer)=20 - #13789(https://github.com/ocaml/ocaml/issues/13789): Strictly validate th= e host and target triplets when building for the=20 Windows ports to be *-*-cygwin, *-w64-mingw32* or *-pc-windows. Other Cygwi= n=20 variants used to be rejected - other MSVC and mingw-w64 variants are now=20 rejected too.=20 (David Allsopp, review by Antonin D=E9cimo and Gabriel Scherer)=20 Bug fixes:=20 ----------=20 - #13819(https://github.com/ocaml/ocaml/issues/13819): Fix field initialisa= tion bug in runtime events subsystem.=20 (Nick Barnes, review by Gabriel Scherer).=20 - #13977(https://github.com/ocaml/ocaml/issues/13977): Pass `-fPIC` when co= mpiling C files using `ocamlopt`. This was a=20 regression in OCaml 5.3.=20 (Nicol=E1s Ojeda B=E4r, review by Daniel B=FCnzli and Gabriel Scherer)=20 - #13957(https://github.com/ocaml/ocaml/issues/13957): Allow 'effect' as at= tribute id.=20 (Pieter Goetschalckx, review by Nicol=E1s Ojeda B=E4r and Florian Angeletti= )=20 - #13691(https://github.com/ocaml/ocaml/issues/13691) #13895(https://github= .com/ocaml/ocaml/issues/13895): Make four globals underlying Gc.control ato= mic to avoid C data=20 races against them.=20 (Jan Midtgaard, review by Miod Vallat, Sadiq Jaffer and Antonin D=E9cimo)= =20 - #13454(https://github.com/ocaml/ocaml/issues/13454): Output a correct tra= ce of the C_CALLN bytecode.=20 (Miod Vallat, review by Antonin D=E9cimo)=20 - #13595(https://github.com/ocaml/ocaml/issues/13595): Use x19 as Canonical= Frame Address (CFA) register. This would cause=20 backtraces to be truncated when calling no alloc C code.=20 (Tim McGilchrist, report by Nick Barnes, review by Nick Barnes)=20 * (*breaking change*) #13605(https://github.com/ocaml/ocaml/issues/13605): = Fix ungenerated constraints when they where impossible due to polyvars=20 issues=20 (Samuel Vivien, review by Florian Angeletti, Richard Eisenberg=20 and Jacques Garrigue)=20 - #13677(https://github.com/ocaml/ocaml/issues/13677), #13679(https://githu= b.com/ocaml/ocaml/issues/13679): domain.c: remove backup_thread_running to = simplify=20 concurrent state updates to the backup thread status.=20 (Gabriel Scherer, review by Jan Midtgaard and Miod Vallat,=20 report by Jan Midtgaard)=20 - #13896(https://github.com/ocaml/ocaml/issues/13896), #14098(https://githu= b.com/ocaml/ocaml/issues/14098): ocamldoc, do not wrap module description i= n a paragraph tag=20 inside the table of modules=20 (Florian Angeletti, report by John Whitington, review by Gabriel Scherer)= =20 - #13703(https://github.com/ocaml/ocaml/issues/13703): wrong explanation fo= r some polymorphic-variant subtyping errors=20 (Gabriel Scherer, review by Jacques Garrigue,=20 report by Wiktor Kuchta and Richard Eisenberg)=20 - #13710(https://github.com/ocaml/ocaml/issues/13710): Support unicode iden= tifiers in comments.=20 (Pieter Goetschalckx, review by Florian Angeletti and Gabriel Scherer)=20 - #13763(https://github.com/ocaml/ocaml/issues/13763): Track type of variab= les bound by as-patterns=20 (Leo White, review by Gabriel Scherer, port by Vincent Laviron)=20 - #13778(https://github.com/ocaml/ocaml/issues/13778), #13811(https://githu= b.com/ocaml/ocaml/issues/13811): do not warn for unused type declarations w= hen the type is used=20 in a first-class module type (`module S with type t =3D int)`.=20 (Florian Angeletti, report by Nicol=E1s Ojeda B=E4r, review by Gabriel Sche= rer)=20 - #13790(https://github.com/ocaml/ocaml/issues/13790): Fix bytecode-only bu= ild of Cygwin when flexlink is being bootstrapped=20 with the compiler.=20 (David Allsopp, review by Antonin D=E9cimo and Miod Vallat)=20 - #13812(https://github.com/ocaml/ocaml/issues/13812): Add forgotten check = about the validity of the type variable name on=20 the right-hand side of `_ as _`.=20 (Samuel Vivien, review by Gabriel Scherer)=20 - #13845(https://github.com/ocaml/ocaml/issues/13845): Fix bug in untypeast= /pprintast for value bindings with polymorphic=20 type annotations.=20 (Chris Casinghino, review by Florian Angeletti and Gabriel Scherer)=20 - #13930(https://github.com/ocaml/ocaml/issues/13930), #13933(https://githu= b.com/ocaml/ocaml/issues/13933): Fix bugs in recursive values definitions i= nvolving=20 lazy values that have already been evaluated.=20 (Gabriel Scherer, review by Vincent Laviron, report by Vincent Laviron)=20 - #13867(https://github.com/ocaml/ocaml/issues/13867): Fix bug with some re= cursive bindings of lazy values.=20 (Guillaume Bury and Vincent Laviron, review by Stefan Muenzel=20 and Gabriel Scherer)=20 - #13931(https://github.com/ocaml/ocaml/issues/13931): fix bugs in nested r= ecursive value definitions.=20 (Gabriel Scherer, review by Vincent Laviron,=20 report by Vincent Laviron)=20 - #13875(https://github.com/ocaml/ocaml/issues/13875), #13878(https://githu= b.com/ocaml/ocaml/issues/13878): Add dedicated constructor for mutable vari= able access in=20 Cmm to prevent bugs linked to incorrect handling of coeffects.=20 (Vincent Laviron, review by Gabriel Scherer)=20 - #13880(https://github.com/ocaml/ocaml/issues/13880): Make object stat cou= nters atomic=20 (Dimitris Mostrous, review by Gabriel Scherer and Nicol=E1s Ojeda B=E4r)=20 - #13172(https://github.com/ocaml/ocaml/issues/13172), #13829(https://githu= b.com/ocaml/ocaml/issues/13829): Fix a missing check of illegal recursive m= odule-type=20 definitions=20 (Clement Blaudeau, review by Florian Angeletti)=20 - #13541(https://github.com/ocaml/ocaml/issues/13541), #13777(https://githu= b.com/ocaml/ocaml/issues/13777): Using C++11 `thread_local` causes name-man= gling=20 issues when linking with flexlink on Cygwin.=20 (Antonin D=E9cimo and David Allsopp, report by Kate Deplaix)=20 * (*breaking change*) #13874(https://github.com/ocaml/ocaml/issues/13874), = #13882(https://github.com/ocaml/ocaml/issues/13882): Make evaluation order = consistent for applications when using=20 the non-flambda native compiler=20 (Vincent Laviron, report by Jean-Marie Madiot, review by Gabriel Scherer)= =20 - #13942(https://github.com/ocaml/ocaml/issues/13942): Fix assertion on emp= ty array case=20 (Olivier Nicole, review by Gabriel Scherer)=20 - #13950(https://github.com/ocaml/ocaml/issues/13950): Avoid tearing in `Ar= ray.sub`=20 (Gabriel Scherer and Olivier Nicole, report by Jan Midtgaard, review by=20 Gabriel Scherer)=20 - #13928(https://github.com/ocaml/ocaml/issues/13928), #13944(https://githu= b.com/ocaml/ocaml/issues/13944): Fix handling of excessively nested unboxed= types=20 (Vincent Laviron, review by Gabriel Scherer)=20 - #13987(https://github.com/ocaml/ocaml/issues/13987): Remove a spurious TS= an report in case of benign data race between=20 major GC read and write from the mutator (fixes #13427(https://github.com/o= caml/ocaml/issues/13427))=20 (Olivier Nicole, report by Thomas Leonard, review by Gabriel Scherer)=20 - #14007(https://github.com/ocaml/ocaml/issues/14007), #14015(https://githu= b.com/ocaml/ocaml/issues/14015): Fix memory corruption when an exception is= raised during=20 demarshaling.=20 (Beno=EEt Vaugon, review by David Allsopp and Gabriel Scherer)=20 - #14025(https://github.com/ocaml/ocaml/issues/14025): fix data race betwee= n compaction and domain termination=20 (Gabriel Scherer, review by Jan Midtgaard,=20 report by Jan Midtgaard)=20 - #13956(https://github.com/ocaml/ocaml/issues/13956) Fix a regression intr= oduced in #13308(https://github.com/ocaml/ocaml/issues/13308) triggering wr= ong unused warnings.=20 (Ulysse G=E9rard, review by Florian Angeletti)=20 - #14070(https://github.com/ocaml/ocaml/issues/14070): also point to label = mismatches in error messages for labelled tuples=20 (Florian Angeletti, review by Gabriel Scherer)=20 - #14088(https://github.com/ocaml/ocaml/issues/14088), #14091(https://githu= b.com/ocaml/ocaml/issues/14091): fix non-deterministic code generation in= =20 matching.ml (backport of rescript-lang/rescript#7557(https://github.com/oca= ml/ocaml/issues/7557))=20 (Christiano Calgano, review by Gabriel Scherer and Vincent Laviron)=20 - #14105(https://github.com/ocaml/ocaml/issues/14105): Fix a loop in Pprint= ast that could result in a hang when printing=20 constructor `(::)` in isolation.=20 (Ulysse G=E9rard, review by Nicol=E1s Ojeda B=E4r and Florian Angeletti)=20 - #14108(https://github.com/ocaml/ocaml/issues/14108): toplevel, fix a typo= in directive type mismatch=20 (Florian Angeletti, review by Gabriel Scherer)=20 - #13586(https://github.com/ocaml/ocaml/issues/13586), #14093(https://githu= b.com/ocaml/ocaml/issues/14093): Fix closing an out_channel during flush=20 (Stephen Dolan, report by Jan Midtgaard, investigation by Nick Roberts,=20 review by Antonin D=E9cimo and Miod Vallat)=20 - #14101(https://github.com/ocaml/ocaml/issues/14101), #14139(https://githu= b.com/ocaml/ocaml/issues/14139): define atomic helper types inside `caml/mi= sc.h` to improve=20 header compatibility with C++=20 (Florian Angeletti, report by Kate Deplaix, review by Gabriel Scherer)=20 - #14135(https://github.com/ocaml/ocaml/issues/14135): Fix a rare internal = typechecker error when combining recursive=20 modules, polymorphic fields or methods, and constrained type parameters.=20 (Florian Angeletti, review by Gabriel Scherer)=20 - #14169(https://github.com/ocaml/ocaml/issues/14169): runtime, fix cache m= iss within the stack fragments cache=20 (Florian Angeletti, review by Gabriel Scherer)=20 - #14196(https://github.com/ocaml/ocaml/issues/14196), #14197(https://githu= b.com/ocaml/ocaml/issues/14197): ocamlprof: do not instrument unreachable c= lauses=20 (Gabriel Scherer, review by Nicol=E1s Ojeda B=E4r, report by Ali Caglayan)= =20 - #14200(https://github.com/ocaml/ocaml/issues/14200), #14202(https://githu= b.com/ocaml/ocaml/issues/14202) : bad variance check with private aliases= =20 (Jacques Garrigue, report and review by Stephen Dolan)=20 - #14061(https://github.com/ocaml/ocaml/issues/14061), #14209(https://githu= b.com/ocaml/ocaml/issues/14209): fix a memory-ordering bug in Weak.set that= could=20 result in uninitialized memory seen by Weak.get on another domain.=20 (Damien Doligez, review by Gabriel Scherer)=20 - #14214(https://github.com/ocaml/ocaml/issues/14214), #14221(https://githu= b.com/ocaml/ocaml/issues/14221): fix a confused error message for module in= clusions,=20 functor error messages were missing some type equalities potentially leadin= g=20 to nonsensical "type t is not compatible with type t" submessage=20 (Florian Angeletti, report by Basile Cl=E9ment, review by Gabriel Scherer)= =20 - #14238(https://github.com/ocaml/ocaml/issues/14238): Fix certain variadic= macros in misc.h which could trigger C warnings=20 under certain conditions in prerelease versions of OCaml 5.4.=20 (Antonin D=E9cimo, review by Nicol=E1s Ojeda B=E4r)=20 --=_32a5f52a-f4aa-4522-ae4e-25c7ee9e1c3a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Dear Ocaml users,

We have the pleasu= re of celebrating the birthdays of Camille Saint-Sa=EBns and
Karl Schwar= zschild by announcing the release of OCaml version 5.4.0.

Some of th= e highlights of OCaml 5.4.0 are:

* Labelled tuples

  It = is now possible to add labels on tuple fields

    let ( * = ) (x,~dx) (y,~dx:dy) =3D
      x*.y, ~dx:(x *. dy +. y *.= dx )

  Those labeled tuples are equivalent to SML records: the= y are an ordered and
  structurally-typed variants of records. In p= articular, this implies that
  partial pattern matching on tuples i= s only possible for labelled tuples with a
  known type:

&nb= sp;   type t =3D float * dx:float
    let v (x_and_dx:t) = =3D let (x, .. ) =3D x_and_dx in x

* Array literal syntax support fo= r immutable arrays and `floatarray`s

  The array literal syntax= is now shared by array-like primitive types,
  like 'a array, floa= tarray and the new immutable array iarray.
  For instance, this cod= e

    let x =3D Float.Array.of_list [0.;1.;2.]

&nbs= p; can now be written

    let x : Float.Array.t =3D [|0.; = 1.; 2.|]

  This syntax is also supported in patterns

&nb= sp;    let one =3D match x with
       | [= |_;y;_|] -> Some y
       | _ -> None

&= nbsp; However array indexing still needs to go through user-defined indexin= g operators

    let (.$()) =3D Float.Array.get
  &= nbsp; let (.$()<-) =3D Float.Array.set
    let () =3D x.$(0= ) <- x.$(1)

* Immutable arrays

  Along with shared ar= ray literals, OCaml 5.4 adds support for immutable arrays.

  &n= bsp; let v: int iarray =3D [| 0; 1; 2 |]

  Immutable arrays are= covariant in the type of their elements, it is thus possible to coerce
=   immutable arrays with no costs at runtime:

    let = i1: _ iarray =3D [|object method m =3D 0 end|]
    let i2 =3D = ( i1 :> < > iarray)

* Atomic record fields

  It= is now possible to mark a field of a record as atomic. Atomic operations o= n
 those fields require to use the new `Atomic.Loc` submodule after= accessing the
 location with the `[%atomic.loc ...]` builtin exten= sion. For instance,

    type 'a mpsc_list =3D { mutable he= ad:'a list; mutable tail: 'a list [@atomic] }

    let rec = push t x =3D
      let before =3D Atomic.Loc.get [%atomic= .loc t.tail] in
      let after =3D x :: before in
&nb= sp;     if not (Atomic.Loc.compare_and_set [%atomic.loc t.tail] b= efore after) then
        push t x

  Mor= eover, it is forbidden to pattern match on atomic fields:

  &nb= sp; let f { head; tail } =3D tail

>Error: Atomic fields (here tai= l) are forbidden in patterns,
>       as it is di= fficult to reason about when the atomic read
>      &n= bsp;will happen during pattern matching: the field may be read
> = ;      zero, one or several times depending on the patterns = around it.

  in order to make all reads on those atomic fields = explicit.

* Four new standard library modules: Pair, Pqueue, Repr, a= nd Iarray

  The standard library has been extended with four ne= w modules:

  - Pair: functions for working on pairs

&nbs= p;    let ones =3D Pair.map_fst succ (0,1)

  - Pqueue= : priority queues, generic or not

    module Int_pqueue = =3D Pqueue.MakeMin(Int)
    let q =3D Int_pqueue.of_list [4;0;= 5;7]
    let some_zero =3D Int_pqueue.pop_min q

  = - Repr: physical and structural equality, comparison function,
  &n= bsp; more generically all functions dependent on the memory representation<= br>    of values.

    let f =3D Repr.phys_equal = (ref 0) (ref 0)

  - Iarray: functions on immutable arrays
    let a =3D Iarray.init 10 Fun.id
    let b =3D = Iarray.map succ a

* Restored "memory cleanup upon exit" mode

=   This mode allows to restart many time the OCaml runtime in C-driven = programs
  that interact with OCaml libraries. It is also useful to= reduce noise when
  tracking memory leaks in C code running the OC= aml runtime. To get around
  cancellation issues, the restored mode= currently assumes that all domains are
  joined before exiting the= OCaml runtime.

* A new section in the reference manual on profiling= OCaml programs on Linux and macOS

A new section in the reference ma= nual(https://ocaml.org/manual/profil.html) explains
how to use OS specif= ic profiling tools to profile native OCaml programs.

* A lot of incr= emental changes:

  - Many runtime and code generation improveme= nts
  - More than thirty new standard library functions
  -= Nearly a dozen improved error messages
  - Around fifty bug fixes<= br>
Please report any unexpected behaviours on the OCaml issue tracker a= t

- https://github.com/ocaml/ocaml/issues

and post any questi= ons or comments you might have on our discussion forums:

- https://d= iscuss.ocaml.org

The full list of changes can be found in the full c= hangelog below.

Happy hacking,
Florian Angeletti for the OCaml te= am.

Installation Instructions
-------------------------------
=
The base compiler can be installed as an opam switch with the following= commands:

    opam update
    opam switch cr= eate 5.4.0

The source code for the release is also directly availabl= e on:

- GitHub: https://github.com/ocaml/ocaml/releases/download/5.4= .0/ocaml-5.4.0.tar.gz
- OCaml archives at Inria: https://caml.inria.fr/p= ub/distrib/ocaml-5.4/ocaml-5.4.0.tar.gz

Fine-Tuned Compiler Configur= ation
-----------------------------------------------

If you want= to tweak the configuration of the compiler, you can switch to the option v= ariant with:

    opam update
    opam switch = create <switch_name> ocaml-variants.5.4.0+options <option_list>=

where `<option_list>` is a space separated list of `ocaml-opt= ion-*` packages. For instance, for a `flambda` and `no-flat-float-array` sw= itch:

     opam switch create 5.4.0+flambda+nffa ocam= l-variants.5.4.0+options ocaml-option-flambda ocaml-option-no-flat-float-ar= ray


Changelog:
----------------

Language features:
= --------------------------

  - #13097(https://github.com/ocaml/= ocaml/issues/13097): added immutable arrays (`'a iarray` type, Iarray stdli= b module)
    (Antal Spector-Zabusky and Olivier Nicole, revie= w by Gabriel Scherer,
    Jeremy Yallop and Vincent Laviron)
  - #13340(https://github.com/ocaml/ocaml/issues/13340): Array l= iteral syntax [| e1; ...; en |] can now be used to
    denote = values of type `'a array` and `'a iarray` and `floatarray`,
   = ; both in expressions and patterns. The compiler disambiguates each
&nbs= p;   case by using contextual type information (assuming `'a array`    by default).
    (Nicol=E1s Ojeda B=E4r, review= by Richard Eisenberg, Jeremy Yallop, Jacques
    Garrigue, an= d Gabriel Scherer)

  - #13498(https://github.com/ocaml/ocaml/is= sues/13498): Tuple fields are now optionally labeled:
    `(x:= 42, y:0)` and `let (~x, ~y) =3D ... in ...`.
    (Ryan Tjoa an= d Chris Casinghino, review by Gabriel Scherer, Chris Casinghino,
  =   and Leo White)

  - RFCs#39(https://github.com/ocaml/ocam= l/issues/39), #13404(https://github.com/ocaml/ocaml/issues/13404): atomic r= ecord fields
      `{ ...; mutable readers : int [@atomic= ]; ... }`
      `Atomic.Loc.fetch_and_add [%atomic.loc da= ta.readers] 1`
    (Cl=E9ment Allain and Gabriel Scherer, revi= ew by KC Sivaramakrishnan,
     Basile Cl=E9ment and Oliv= ier Nicole)

  Standard library:
  -------------------
  * (*breaking change*) #14124(https://github.com/ocaml/ocaml/is= sues/14124): Do not raise Invalid_argument on negative List.{drop,take}.    (Daniel B=FCnzli, review by Gabriel Scherer, Nicol=E1s Ojeda= B=E4r)

  - #13696(https://github.com/ocaml/ocaml/issues/13696)= : Add Result.product and Result.Syntax:
    `let open Result.S= yntax in let* x =3D ... in ...`
    (Daniel B=FCnzli, review b= y Gabriel Scherer, Nicol=E1s Ojeda B=E4r)

  - #12871(https://gi= thub.com/ocaml/ocaml/issues/12871): Add the Pqueue module to the stdlib. It= implements priority queues.
    (Jean-Christophe Filli=E2tre,= review by Daniel B=FCnzli, L=E9o Andr=E8s and
    Gabriel Sch= erer)

  - #13760(https://github.com/ocaml/ocaml/issues/13760): = Add String.{edit_distance,spellcheck}
    (Daniel B=FCnzli, re= view by wikku, Nicol=E1s Ojeda B=E4r, Gabriel Scherer and
    =  Florian Angeletti)

  - #13753(https://github.com/ocaml/oc= aml/issues/13753), #13755(https://github.com/ocaml/ocaml/issues/13755): Add= Stdlib.Repr:
    Repr.phys_equal and Repr.compare are more ex= plicit than (=3D=3D) and `compare`.
    (Kate Deplaix, Thomas = Blanc and L=E9o Andr=E8s, review by Gabriel Scherer,
     = ;Florian Angeletti, Nicol=E1s Ojeda B=E4r, Daniel B=FCnzli and Jeremy Yallo= p)

  - #13695(https://github.com/ocaml/ocaml/issues/13695): Add= Stdlib.Char.Ascii
    (Daniel B=FCnzli, review by by Nicol=E1= s Ojeda B=E4r and Jeremy Yallop)


  - #13720(https://github.= com/ocaml/ocaml/issues/13720): Add Result.{get_ok',error_to_failure}
&nb= sp;  (Daniel B=FCnzli, review by wikku, Gabriel Scherer, Nicol=E1s Oje= da B=E4r,
    Vincent Laviron and hirrolot)

  - #1= 3885(https://github.com/ocaml/ocaml/issues/13885): Add Dynarray.{exists2, f= or_all2}.
    (T. Kinsart, review by Daniel B=FCnzli, Gabriel = Scherer, and Nicol=E1s Ojeda B=E4r)

  * (*breaking change*) #13= 862(https://github.com/ocaml/ocaml/issues/13862): Make List.sort_uniq keep = the first occurrences of duplicates.
    (Beno=EEt Jubin, revi= ew by Nicol=E1s Ojeda B=E4r, Gabriel Scherer)

  - #13836(https:= //github.com/ocaml/ocaml/issues/13836): Add [Float.]Array.{equal,compare}.<= br>    (Daniel B=FCnzli, review by Nicol=E1s Ojeda B=E4r and Gabr= iel Scherer)

  - #13796(https://github.com/ocaml/ocaml/issues/1= 3796): Add Uchar.utf_8_decode_length_of_byte and
    Uchar.max= _utf_8_decode_length.
    (Daniel B=FCnzli, review by Nicol=E1= s Ojeda B=E4r and Florian Angeletti)

  - #13768(https://github.= com/ocaml/ocaml/issues/13768): Add Either.get_left and Either.get_right
=     (T. Kinsart, review by Nicol=E1s Ojeda B=E4r and Florian Ange= letti)

  * (*breaking change*) #13570(https://github.com/ocaml/= ocaml/issues/13570), #13794(https://github.com/ocaml/ocaml/issues/13794): F= ormat, add an out_width function to Format device for
    &nbs= p;approximating unicode width.
    (Florian Angeletti, review = by Nicol=E1s Ojeda B=E4r, Daniel B=FCnzli,
     and Gabri= el Scherer)

  - #13731(https://github.com/ocaml/ocaml/issues/13= 731): Add Either.retract
    (Daniel B=FCnzli, review by Nicol= =E1s Ojeda B=E4r and David Allsopp)

  - #13729(https://github.c= om/ocaml/ocaml/issues/13729): Add Seq.filteri
    (T. Kinsart,= review by Nicol=E1s Ojeda B=E4r and Daniel B=FCnzli)

  - #1372= 1(https://github.com/ocaml/ocaml/issues/13721): Add Result.retract
 = ;   (Daniel B=FCnzli, review by Gabriel Scherer, Nicol=E1s Ojeda B=E4r= and
     David Allsopp)

  - #13310(https://g= ithub.com/ocaml/ocaml/issues/13310): Add Stdlib.Pair
    (Vict= oire Noizet, review by Nicol=E1s Ojeda B=E4r, Daniel B=FCnzli, Xavier Van d= e
     Woestyne, Jeremy Yallop and Florian Angeletti)
=
  - #13662(https://github.com/ocaml/ocaml/issues/13662): Add eager= boolean operations Bool.logand, Bool.logor, Bool.logxor
    (= Jeremy Yallop, review by Nicol=E1s Ojeda B=E4r)

  - #13463(http= s://github.com/ocaml/ocaml/issues/13463), #13572(https://github.com/ocaml/o= caml/issues/13572): Avoid raising Queue.empty in Format when it is used
=     concurrently, raise a specific exception instead.
  &= nbsp; (Chritophe Raffalli, review by Gabriel Scherer and Daniel B=FCnzli)
  - #13620(https://github.com/ocaml/ocaml/issues/13620): Avoid c= opying the string in String.concat, String.sub and
    String.= split_on_char when the full string is returned.
    (Christoph= e Raffalli, review by Nicol=E1s Ojeda B=E4r and Gabriel Scherer and
&nbs= p;    Hugo Heuzard)

  - #13727(https://github.com/oca= ml/ocaml/issues/13727): Reimplement Sys.getenv_opt not to use exceptions in= ternally, meaning
    that the current backtrace is preserved = when Sys.getenv_opt returns None.
    (David Allsopp, review b= y Nicol=E1s Ojeda B=E4r, Josh Berdine and Gabriel Scherer)

  - = #13737(https://github.com/ocaml/ocaml/issues/13737): Avoid closure allocati= ons in Weak.Make.add when resizing the
    table
  &nb= sp; (Vincent Laviron, review by Gabriel Scherer and Daniel B=FCnzli)
  - #13740(https://github.com/ocaml/ocaml/issues/13740): Improve perf= ormance of Weak.find_aux
    (Josh Berdine, review by Gabriel = Scherer)

  - #13782(https://github.com/ocaml/ocaml/issues/13782= ): Improve performance and type safety of Type.Id by using
   = [%extension_constructor] instead of Obj.Extension_constructor.of_val.
&= nbsp;   (Basile Cl=E9ment, review by Vincent Laviron and Nicol=E1s Oje= da B=E4r)

  - #13589(https://github.com/ocaml/ocaml/issues/1358= 9): Expose Sys.io_buffer_size, the size of internal buffers used by the
=     runtime system and the `unix` library.
    (Yves= Ndiaye and Nicol=E1s Ojeda B=E4r, review by Daniel B=FCnzli and Nicol=E1s = Ojeda
    B=E4r)

  - #13569(https://github.com/oca= ml/ocaml/issues/13569): add a `Format.format_text` which adds break hints t= o format literals.
    (Florian Angeletti, review by Nicol=E1s= Ojeda B=E4r, Daniel B=FCnzli,
     and Gabriel Scherer)<= br>
  - #13578(https://github.com/ocaml/ocaml/issues/13578): On Win= dows, use the OS CSPRNG to seed the Stdlib.Random generator.
  &nbs= p; (Antonin D=E9cimo, review by Miod Vallat, Nicol=E1s Ojeda B=E4r, and Xav= ier Leroy)

  - #13859(https://github.com/ocaml/ocaml/issues/138= 59): Fix Weak.get_copy not darkening custom blocks
    (Josh B= erdine, review by Stephen Dolan)

  - #13909(https://github.com/= ocaml/ocaml/issues/13909): Add `Dynarray.unsafe_to_iarray`
   = (Olivier Nicole, review by Daniel B=FCnzli, Stefan Muenzel and Gabriel Sch= erer,
    request by Daniel B=FCnzli)

  - #13932(h= ttps://github.com/ocaml/ocaml/issues/13932): Add List.singleton and Seq.sin= gleton
    (David Allsopp, tariffs applied by Nicol=E1s Ojeda = B=E4r and Gabriel Scherer)

  * (*breaking change*) #13843(https= ://github.com/ocaml/ocaml/issues/13843): Add signal definitions for SIGIO a= nd SIGWINCH. Introduces a
    type alias for signal int, signa= l_to_string to convert OCaml signal numbers
    to their POSIX= equivalent names, and signal_of_int/signal_to_int for
    con= verting between OCaml and platform signal numbers. (Reported in #13825(http= s://github.com/ocaml/ocaml/issues/13825))
    (Tim McGilchrist= , review by David Allsopp, Nicol=E1s Ojeda B=E4r, Daniel B=FCnzli
 =    Jan Midtgaard and Miod Vallat)

  Runtime system:<= br>  -----------------------

  - #13500(https://github.com= /ocaml/ocaml/issues/13500): Add frame pointers support for ARM64 on Linux a= nd macOS.
    (Tim McGilchrist, review by KC Sivaramakrishnan,= Fabrice Buoro
     and Miod Vallat)

  - #129= 64(https://github.com/ocaml/ocaml/issues/12964): Reintroduce "memory cleanu= p upon exit" mode. The cleanup will
    however be incomplete = if not all domains have been joined when the main
    domain t= erminates.
    (Miod Vallat, review by KC Sivaramakrishnan, fe= edback from Nick Barnes
     and Gabriel Scherer)

=   - #13582(https://github.com/ocaml/ocaml/issues/13582): Enable softwa= re prefetching support for ARM64, s390x, PPC64 and RiscV.
    = Used during GC marking and sweeping to speed up both operations by
 = ;   prefetching data.
    (Tim McGilchrist, review by Nic= k Barnes, Antonin D=E9cimo,
     Stephen Dolan and Miod V= allat)


  - #13675(https://github.com/ocaml/ocaml/issues/136= 75): Make Unix.map_file memory show up in Gc.Memprof.
    (Ste= phen Dolan, review by Guillaume Munch-Maccagnoni and Gabriel Scherer)
  - #13785(https://github.com/ocaml/ocaml/issues/13785): Add `Runtim= e_events.Timestamp.get_current`.
    (Simon Cruanes)

&n= bsp; - #13774(https://github.com/ocaml/ocaml/issues/13774): Fix for inaccur= ate live blocks/words stats in compaction.
    (Sadiq Jaffer, = report by KC Sivaramakrishnan and Jan Midtgaard, review by
   = Gabriel Scherer)

  - #13773(https://github.com/ocaml/ocaml/iss= ues/13773): Ensure that shared pool owners are correctly set on pool adopti= on.
    (Stephen Dolan, review by Sadiq Jaffer and Gabriel Sch= erer)

  * (*breaking change*) #11449(https://github.com/ocaml/o= caml/issues/11449), #13497(https://github.com/ocaml/ocaml/issues/13497): Ad= d caml_stat_char_array_{to,of}_os functions allowing
    conve= rsion of string data which may contain NUL characters. Correct
  &n= bsp; implementation of caml_stat_strdup_to_utf16 to raise Out_of_memory ins= tead of
    returning of NULL (the behaviour of caml_stat_strd= up_to_os was inconsistent
    between Unix/Windows).
 =   (David Allsopp, review by Nick Barnes, Antonin D=E9cimo and Miod Va= llat)

  - #13352(https://github.com/ocaml/ocaml/issues/13352): = Concurrency refactors and cleanups.
    (Antonin D=E9cimo, rev= iew by Gabriel Scherer, David Allsopp, and Miod Vallat)

  - #13= 437(https://github.com/ocaml/ocaml/issues/13437): Stop using GetProcAddress= to load functions that were not
    available in older, now u= nsupported Windows versions.
    (Antonin D=E9cimo, review by = Nicol=E1s Ojeda B=E4r and David Allsopp)

  - #13470(https://git= hub.com/ocaml/ocaml/issues/13470): Constify some function parameters, flags= tables, and some
    pointers in C code (take 3).
  &= nbsp; (Antonin D=E9cimo, review by Stephen Dolan and Miod Vallat)

&n= bsp; - #13492(https://github.com/ocaml/ocaml/issues/13492): Parse the CAML_= LD_LIBRARY_PATH environment variable for the
    shared_libs_p= ath item in `ocamlrun -config` in addition to displaying the
  &nbs= p; entries found in ld.conf.
    (David Allsopp, review by Ste= phen Dolan)

  - #13496(https://github.com/ocaml/ocaml/issues/13= 496): Add missing .type and .size directives to main frametable to silence<= br>    warnings from the linker when using libasmrun_shared on am= d64 and power. The
    other backends already carried these di= rectives.
    (David Allsopp, review by Tim McGilchrist and Mi= od Vallat)

  - #13354(https://github.com/ocaml/ocaml/issues/133= 54): Use C99 flexible array member syntax everywhere.
    (Ant= onin D=E9cimo, review by Miod Vallat, Gabriel Scherer, and Xavier Leroy)
  - #11865(https://github.com/ocaml/ocaml/issues/11865), #13584(h= ttps://github.com/ocaml/ocaml/issues/13584): Fix a deadlock triggered by de= leting C roots from C finalisers
    (Stephen Dolan, report by= Timothy Bourke, review by Mark Shinwell and Damien
    Dolige= z)

  - #13613(https://github.com/ocaml/ocaml/issues/13613): Fun= ctions from caml/skiplist.h and caml/lf_skiplist.h no longer raise
 = ;   Out_of_memory exceptions that the runtime could not handle.
&nb= sp;   (Guillaume Munch-Maccagnoni, review by Stephen Dolan)

&nb= sp; - #13575(https://github.com/ocaml/ocaml/issues/13575), #13635(https://g= ithub.com/ocaml/ocaml/issues/13635): Maintain OCaml frame pointers correctl= y even when using
     C libraries that do not support th= em.
    (Stephen Dolan and David Allsopp, report by Thomas Leo= nard, review by Tim
     McGilchrist and Fabrice Buoro)
  - #13643(https://github.com/ocaml/ocaml/issues/13643): Allow v= alues reachable from ephemeron keys to be collected by minor GC
  &= nbsp; (Stephen Dolan, review by Fran=E7ois Bobot)

  - #13701(ht= tps://github.com/ocaml/ocaml/issues/13701): optimize `caml_continuation_use= ` based on #12735(https://github.com/ocaml/ocaml/issues/12735)
  &n= bsp; (Hugo Heuzard, review by KC Sivaramakrishnan)

  - #13227(h= ttps://github.com/ocaml/ocaml/issues/13227), #13714(https://github.com/ocam= l/ocaml/issues/13714): Review of locking in the multicore runtime. Fix
&= nbsp;   deadlocks in runtime events and potential deadlocks with named=
    values.
    (Guillaume Munch-Maccagnoni, rev= iew by Gabriel Scherer, tests by
    Jan Midtgaard)

&nb= sp; - #13736(https://github.com/ocaml/ocaml/issues/13736): Fix major GC pac= ing bug triggered by synchronous collections.
    (Nick Barnes= , review by Damien Doligez and Tim McGilchrist)

  - #13827(http= s://github.com/ocaml/ocaml/issues/13827): Avoid re-marking ephemerons with = trivial data.
    (Stephen Dolan, review by Nick Barnes and Jo= sh Berdine, benchmarking by
     Nicol=E1s Ojeda B=E4r)
  - #13300(https://github.com/ocaml/ocaml/issues/13300), #13861(= https://github.com/ocaml/ocaml/issues/13861): introduce `Gc.ramp_up` to exp= licitly mark ramp-up
    phases of memory consumption and avoi= d GC overwork. Ramp-up behaviors
    are worse with OCaml 5 th= an with OCaml 4 due to higher sensitivity
    to excessive pac= ing computations. Indicating ramp-up explicitly eliminates
   = the main known slowdown of OCaml 5 (relative to OCaml 4) for Coq/Rocq.
=     (Gabriel Scherer, review by Damien Doligez and Guillaume Munc= h-Maccagnoni,
     report by Emilio Jes=FAs Gallego Arias= and Olivier Nicole)

  - #14057(https://github.com/ocaml/ocaml/= issues/14057): Don't update memprof too early at the end of a minor GC.
=     (Nick Barnes, review by Damien Doligez).

  Code g= eneration and optimizations:
  ------------------------------------= -----------

  - #13262(https://github.com/ocaml/ocaml/issues/13= 262), #14074(https://github.com/ocaml/ocaml/issues/14074): fix performance = issue on Apple Silicon macOS by emitting
    `stlr` instead of= `dmb ishld; str`.
    (KC Sivaramakrishnan, report by Fran=E7= ois Pottier, analysis by Fr=E9d=E9ric Bour,
    Xavier Leroy, = Miod Vallat, Gabriel Scherer and Stephen Dolan, review by Miod
  &n= bsp; Vallat, Vincent Laviron and Xavier Leroy)

  * (*breaking c= hange*) #13050(https://github.com/ocaml/ocaml/issues/13050), #14104(https:/= /github.com/ocaml/ocaml/issues/14104), #14143(https://github.com/ocaml/ocam= l/issues/14143): Use '$' instead of '.' to separate module names
  =   in symbol names on macOS and Windows (including the Cygwin backend).=
    This changes mangling of OCaml identifiers on those opera= ting systems from
    `camlModule.name_NNN` to `camlModule$nam= e_NNN`. Additionally it
    changes the encoding of special ch= aracters from $xx (two hex digits)
    to $$xx (two dollar sig= ns followed by two hex digits).
    (Tim McGilchrist, with con= tributions from Xavier Leroy,
     reviewed by Xavier Ler= oy, Miod Vallat, Gabriel Scherer,
     Nick Barnes and Hu= go Heuzard)

  - #13807(https://github.com/ocaml/ocaml/issues/13= 807): Allow unaligned memory accesses on ARM64.
    (Matthew E= lse, review by Xavier Leroy)


  - #13565(https://github.com/= ocaml/ocaml/issues/13565): less tagging in switches compiled to affine tran= sformations
    by ocamlopt.
    (Gabriel Scherer= and Cl=E9ment Allain, review by Vincent Laviron,
     re= port by Vesa Karvonen)

  - #13672(https://github.com/ocaml/ocam= l/issues/13672) Avoid register stall on conversion instructions on amd64.    (Pierre Chambart, review by Gabriel Scherer and Xavier Lero= y,
     report by Patrick Nicodemus)

  - #136= 67(https://github.com/ocaml/ocaml/issues/13667): (originally #11162(https:/= /github.com/ocaml/ocaml/issues/11162)) Fix instr_size computation on arm64.=
    (Stephen Dolan and Tim McGilchrist, review by Xavier Lero= y
    and David Allsopp)

  - #13758(https://github= .com/ocaml/ocaml/issues/13758): Propagate more value kinds in Flambda to al= low more unboxing
    (Vincent Laviron, review by Pierre Chamb= art)

  - #13759(https://github.com/ocaml/ocaml/issues/13759): P= ropagate more type information from clambda to cmm.
    (Pierr= e Chambart, review by Gabriel Scherer)

  - #13735(https://githu= b.com/ocaml/ocaml/issues/13735): Follow the behaviour of the C compiler to = decide whether to emit the
    `.size` and `.type` directives = and the `.note.GNU-stack` section
    (Samuel Hym, review by M= iod Vallat, Antonin D=E9cimo and Gabriel Scherer)

  Other libra= ries:
  --------------------

  * (*breaking change*) #1= 3435(https://github.com/ocaml/ocaml/issues/13435): On Windows, use system c= alls for `Filename.get_temp_dir_name` instead
    of directly = reading the environment, which in particular improves the security
 = ;   of OCaml processes running in the SYSTEM security context by mitig= ating
    privileged file operation attacks. For all other pro= cesses running with the
    default environment (where `TEMP` = is set), there is no discernible change.
    (Antonin D=E9cimo= , review by Nicol=E1s Ojeda B=E4r and David Allsopp)

  - #13504= (https://github.com/ocaml/ocaml/issues/13504), #13625(https://github.com/oc= aml/ocaml/issues/13625), #14223(https://github.com/ocaml/ocaml/issues/14223= ): Add `Thread.set_current_thread_name`.
    (Romain Beauxis, = review by Gabriel Scherer and Antonin D=E9cimo)

  * (*breaking = change*) #13376(https://github.com/ocaml/ocaml/issues/13376): Allow Dynlink= .loadfile_private to load bytecode libraries with
    internal= dependencies
    (Vincent Laviron, report by St=E9phane Glond= u, review by Nicol=E1s Ojeda B=E4r
     and Xavier Leroy)=

  - #13429(https://github.com/ocaml/ocaml/issues/13429): add `= Unix.sigwait`, a binding to the `sigwait` system call;
    imp= lement `Thread.wait_signal` using `Unix.sigwait`, and
    `Thr= ead.sigmask` using `Unix.sigprocmask`.
    (Xavier Leroy, revi= ew by Antonin D=E9cimo, Gabriel Scherer, Miod Vallat)

  - #1344= 2(https://github.com/ocaml/ocaml/issues/13442), #13452(https://github.com/o= caml/ocaml/issues/13452): Fix Unix.getgroups for users belonging to more th= an 32 groups
    when using musl
    (Kate Deplai= x, review by Gabriel Scherer, Antonin D=E9cimo, Anil Madhavapeddy)

&= nbsp; - #13576(https://github.com/ocaml/ocaml/issues/13576): Introduce inte= rnal helpers to convert between time representations.
    On W= indows, prevent erroneously waiting for an unbounded time in Unix.select    if more than 64 file descriptors per lists are watched, or i= f watching
    non-socket file descriptors, and a timeout long= er than $2^{32}$ milliseconds
    is used. Cap the timeout to = $2^{32}$ milliseconds.
    (Antonin D=E9cimo, review by Gabrie= l Scherer and Miod Vallat)

  - #13921(https://github.com/ocaml/= ocaml/issues/13921): Set cloexec correctly on CRT file descriptors created = by the Unix
    library on Windows. The inheritance on the und= erlying Win32 handles was
    correctly set, but the book-keep= ing for the CRT was leaking the value of
    non-inherited han= dles which combined with re-use of HANDLE values within
    pr= ocesses could appear to make a CRT file descriptor "re-open".
  &nb= sp; (David Allsopp, review by Nicol=E1s Ojeda B=E4r)

  Tools:  -------

  - #13686(https://github.com/ocaml/ocaml/issu= es/13686): Fix Python debugger extensions (for LLDB and GDB) to restore
=     functionality broken by #13272(https://github.com/ocaml/ocaml= /issues/13272) in 5.3.
    (Nick Barnes, review by Tim McGilch= rist Gabriel Scherer)

  - #12019(https://github.com/ocaml/ocaml= /issues/12019): ocamlc: add `align_double` and `align_int64` to `ocamlc -co= nfig`
    output.
    (Romain Beauxis, review by = David Allsopp)

  - #12642(https://github.com/ocaml/ocaml/issues= /12642), #13536(https://github.com/ocaml/ocaml/issues/13536), #14184(https:= //github.com/ocaml/ocaml/issues/14184), #14192(https://github.com/ocaml/oca= ml/issues/14192): in the toplevel, print shorter paths for
   = constructors and labels when only some modules along their path are open.<= br>    (Gabriel Scherer, review by Florian Angeletti)

&nbs= p; - #13199(https://github.com/ocaml/ocaml/issues/13199), #13485(https://gi= thub.com/ocaml/ocaml/issues/13485), #13665(https://github.com/ocaml/ocaml/i= ssues/13665), #13762(https://github.com/ocaml/ocaml/issues/13762), #13965(h= ttps://github.com/ocaml/ocaml/issues/13965): Support running native debugge= rs in
    ocamltest.
    (Tim McGilchrist, Sebast= ien Hinderer, David Allsopp, Antonin D=E9cimo, review by
    S= ebastien Hinderer, Gabriel Scherer, Antonin D=E9cimo, and Tim McGilchrist)<= br>
  - #13764(https://github.com/ocaml/ocaml/issues/13764), #13779= (https://github.com/ocaml/ocaml/issues/13779): add missing "-keywords" flag= to ocamldep and ocamlprof
    (Florian Angeletti, report by P= rashanth Mundkur, review by Gabriel Scherer)

  - #13877(https:/= /github.com/ocaml/ocaml/issues/13877): ocamldoc, add a `-latex-escape-under= score` flag to control the
    escaping of `_` underscore in l= atex references (in order to be able to match
    odoc behavio= ur).
    (Florian Angeletti, review by Gabriel Scherer)
  - #13906(https://github.com/ocaml/ocaml/issues/13906): Add support = for a `multicore` tag in ocamltest and use it for
    tests th= at fail on mono-core systems.
    (St=E9phane Glondu, review b= y Nicol=E1s Ojeda B=E4r)

  Manual and documentation:
  = -------------------------

  - #13751(https://github.com/ocaml/o= caml/issues/13751): Document support for profiling with Linux perf and fram= e pointers.
    (Tim McGilchrist, review by Gabriel Scherer an= d Miod Vallat)

  - #12452(https://github.com/ocaml/ocaml/issues= /12452): Add examples to Stdlib.Fun documentation.
    (Hazem = ElMasry, review by Florian Angeletti and Gabriel Scherer)

  - #= 13924(https://github.com/ocaml/ocaml/issues/13924): Document how to put [@d= eprecated] on let bindings, constructors, etc
    in the manua= l
    (Valentin Gatien-Baron, review by Florian Angeletti)
=

  - #13694(https://github.com/ocaml/ocaml/issues/13694): Fix n= ame for caml_hash_variant in the C interface.
    (Michael Hen= dricks)

  - #13732(https://github.com/ocaml/ocaml/issues/13732)= : Document that custom finalizers must not access the OCaml heap, etc.
&= nbsp;   (Josh Berdine, review by Stephen Dolan and Guillaume Munch-Mac= cagnoni)

  Type system:
  ------------

  * = (*breaking change*) #13830(https://github.com/ocaml/ocaml/issues/13830): fa= il rather than silently create abstract module types when avoiding
 = ;   (i.e. hiding) signature items, as in:
    ```ocaml      module N =3D struct
        op= en (struct type t =3D A | B end)
        module type= T =3D sig type u =3D t * int end
      end
  &nb= sp; ```
    Before, it was succeeding with `module N : sig mod= ule type T end`, now it
    fails. Similarly for anonymous fun= ctor calls (of the form `F(struct ... end))
    (Clement Blaud= eau, review by Gabriel Scherer)

  Compiler user-interface and w= arnings:
  -------------------------------------

  - #1= 3817(https://github.com/ocaml/ocaml/issues/13817): align spellchecking hint= s with the possibly misspelled identifier/
        &= nbsp;       Error: Unbound type constructor "aray"
 =               Hint:     =         Did you mean "array"?
    (Floria= n Angeletti, suggestion by Daniel B=FCnzli, review by Gabriel Scherer)
<= br>  - #13587(https://github.com/ocaml/ocaml/issues/13587): Enable nat= ive backend on x86_64 GNU/Hurd.
    (Samuel Thibault, review b= y Antonin D=E9cimo, S=E9bastien Hinderer and Miod
     Va= llat)

  - #13663(https://github.com/ocaml/ocaml/issues/13663): = Improve the error message when GADT parameter variance cannot be
  =   checked.
    (Stefan Muenzel, review by Gabriel Scherer= and Florian Angeletti)

  - #13646(https://github.com/ocaml/oca= ml/issues/13646): Improve the error messages when a recursive module type    references another recursive module type.
    = (Stefan Muenzel, review by Florian Angeletti and Gabriel Scherer)

&n= bsp; - #13702(https://github.com/ocaml/ocaml/issues/13702), #13865(https://= github.com/ocaml/ocaml/issues/13865): Specialized error messages for functo= rs appearing in contexts
    where non-functors were expected = `module A: sig ... end =3D Set.Make`
    (and the reverse)
=     (Florian Angeletti, report by Jeremy Yallop, review by Gabrie= l Scherer)

  - #13788(https://github.com/ocaml/ocaml/issues/137= 88), #13813(https://github.com/ocaml/ocaml/issues/13813): Keep the module c= ontext in spellchecking hints.
    `Fun.protact` now prompts `= Did you mean "Fun.protect?"` rather than
    `Did you mean "pr= otect?"`.
    (Florian Angeletti, suggestion by Daniel B=FCnzl= i, review by Gabriel Scherer)


  - #13428(https://github.com= /ocaml/ocaml/issues/13428): support dump=3D[source | parsetree | lambda | .= .. | cmm | ...]
    in OCAMLRUNPARAM
    (Gabriel= Scherer, review by Vincent Laviron)

  - #13493(https://github.= com/ocaml/ocaml/issues/13493): Clearer error message in ocamlc for conflict= ing link options for
    C stubs when shared libraries are not= available.
    (David Allsopp, review by Gabriel Scherer)
=
  - #13563(https://github.com/ocaml/ocaml/issues/13563), lighter i= nline code styling for output without bold support: inline
   = code is no longer printed as "..." to avoid confusion with OCaml strings.<= br>    (Florian Angeletti, review by Richard Eisenberg)

&n= bsp; - #13568(https://github.com/ocaml/ocaml/issues/13568), composable form= atting for warning and alert messages
    (Florian Angeletti, = review by Richard Eisenberg)

  - #13601(https://github.com/ocam= l/ocaml/issues/13601): Enable natdynlink on x86_64 GNU/Hurd
   = ; (Samuel Thibault, review by S=E9bastien Hinderer)

  - #13809(= https://github.com/ocaml/ocaml/issues/13809): Distinguish `(module M : S)` = and `(module M) : (module S)` and
    change locations of erro= r messages when `S` is ill-typed in `(module S)`
    (Samuel V= ivien, review by Florian Angeletti and Gabriel Scherer)

  - #13= 814(https://github.com/ocaml/ocaml/issues/13814), 13898: Add an `unused-typ= e-declaration` warning when using
    a `t as 'a` with no othe= r occurences of `'a`
    (Samuel Vivien, review by Florian Ang= eletti, Kate Deplaix)

  - #13818(https://github.com/ocaml/ocaml= /issues/13818): better delimited hints in error message
    (F= lorian Angeletti, review by Gabriel Scherer)

  Internal/compile= r-libs changes:
  -------------------------------

  - #= 13539(https://github.com/ocaml/ocaml/issues/13539), #13776(https://github.c= om/ocaml/ocaml/issues/13776): Use nanosleep instead of usleep or select, if= available.
    (Antonin D=E9cimo, review by Miod Vallat and G= abriel Scherer)

  - #13748(https://github.com/ocaml/ocaml/issue= s/13748): Add a .editorconfig file for basic editor auto-configuration.
=     (Antonin D=E9cimo, review by Gabriel Scherer and David Allsop= p)

  - #13302(https://github.com/ocaml/ocaml/issues/13302), #14= 236(https://github.com/ocaml/ocaml/issues/14236): Store locations of longid= ents components
    (Ulysse G=E9rard and Jules Aguillon, revie= w by Jules Aguillon
     and Florian Angeletti)

  - #13314(https://github.com/ocaml/ocaml/issues/13314): Comment the= code of Translclass
    (Vincent Laviron and Nathana=EBlle Co= urant, review by Olivier Nicole)

  - #13362(https://github.com/= ocaml/ocaml/issues/13362): reimplement Floatarray.concat in C (`caml_floata= rray_concat`),
    matching the implementation of Array.concat= .
    (Gabriel Scherer, review by Nicol=E1s Ojeda B=E4r)
  - #13624(https://github.com/ocaml/ocaml/issues/13624): Added locat= ion to exception definitions and type extensions
    (Samuel V= ivien, review by Gabriel Scherer)

  - #13425(https://github.com= /ocaml/ocaml/issues/13425): undocumented -dmatchcomp flag for the debug
=     output of the pattern-matching compiler
    (Gab= riel Scherer, review by Vincent Laviron and Nicol=E1s Ojeda B=E4r)

&= nbsp; - #13460(https://github.com/ocaml/ocaml/issues/13460): introduce a va= riant of all predefined types
    (Gabriel Scherer, review by = Ulysse G=E9rard and Florian Angeletti)

  - #13457(https://githu= b.com/ocaml/ocaml/issues/13457), #13537(https://github.com/ocaml/ocaml/issu= es/13537): Annotate alloc/free open/close pairs of functions
  &nbs= p; with compiler attributes for static analysis.
    (Antonin = D=E9cimo, review by Gabriel Scherer and Florian Angeletti)

  - = #13464(https://github.com/ocaml/ocaml/issues/13464): Use generic types in c= all to `subtype`. This improves
    inference of type-directed= disambiguation in principal mode.
    (Richard Eisenberg, rev= iew by Jacques Garrigue)

  - #13606(https://github.com/ocaml/oc= aml/issues/13606): Fix Numbers.Int_base.compare
    (Mark Shin= well, review by Vincent Laviron)

  - #13612(https://github.com/= ocaml/ocaml/issues/13612): Refactor `type_application`
    (Ul= ysse G=E9rard, Leo White, review by Antonin D=E9cimo, Gabriel Scherer,
&= nbsp;    Samuel Vivien, Florian Angeletti and Jacques Garrigue)
  - #13744(https://github.com/ocaml/ocaml/issues/13744): Refacto= r in `collect_apply_args`
    (Samuel Vivien, review by Floria= n Angeletti and Gabriel Scherer)

  - #13787(https://github.com/= ocaml/ocaml/issues/13787): a new -dcanonical-ids option to show canonicaliz= ed identifier stamps
    in -d{lambda,cmm,...} outputs.
&nb= sp;   (Gabriel Scherer, review by Vincent Laviron and David Allsopp,     suggested by David Allsopp)

  - #13820(ht= tps://github.com/ocaml/ocaml/issues/13820): Add a new option -i-variance to= print the variance of every
    type parameter; bivariance is= printed as `+-`, and for consistency,
    parser is modified = too to accept `+-` and `-+` as `type_variance`.
    (Takafumi = Saikawa and Jacques Garrigue, review by Florian Angeletti)

  - = #13828(https://github.com/ocaml/ocaml/issues/13828): Apply BUILD_PATH_PREFI= X_MAP to Sys.argv.(0) before storing it in .cmt
    and .cmti = files.
    (David Allsopp, review by Daniel B=FCnzli and Gabri= el Scherer)

  - #13848(https://github.com/ocaml/ocaml/issues/13= 848): Add all paths components to the cmt files indexes
    (U= lysse G=E9rard, review by Florian Angeletti)

  - #13854(https:/= /github.com/ocaml/ocaml/issues/13854): Make the parser set loc_ghost more c= orrectly, for `keyword%extension`
    syntax
    = (Valentin Gatien-Baron, review by Florian Angeletti)

  - #13856= (https://github.com/ocaml/ocaml/issues/13856): Add a new indirection in typ= es AST called `package` that stores the
    content of a `Tpac= kage` node
    (Samuel Vivien, review by Florian Angeletti)
  - #13866(https://github.com/ocaml/ocaml/issues/13866): Modified= occurence check that prevents recursive types for it to see
  &nbs= p; the checked type as a graph rather than a tree
    (Samuel = Vivien, report by Didier Remy, review by Florian Angeletti
   =  and Jacques Garrigue)

  - #13884(https://github.com/ocam= l/ocaml/issues/13884) Correctly index modules in constructors and labels pa= ths
    (Ulysse G=E9rard, review by Florian Angeletti)

=   - #13946(https://github.com/ocaml/ocaml/issues/13946): refactor the = #install_printer code in the debugger and toplevel
    (Pierre= Boutillier, review by Gabriel Scherer and Florian Angeletti)

 = - #13952(https://github.com/ocaml/ocaml/issues/13952): check and document = the correctness of `caml_domain_alone ()`.
    (Gabriel Schere= r, review by KC Sivaramakrishnan, report by Olivier Nicole)

  -= #13971(https://github.com/ocaml/ocaml/issues/13971): Keep generalized stru= cture from patterns when typing `let`
    (Leo White, review b= y Samuel Vivien and Florian Angeletti)

  * (*breaking change*) = #13972(https://github.com/ocaml/ocaml/issues/13972): Renamed the `-no-alias= -deps` flag internal representation to
    `no_alias_deps` ins= tead of `transparent_modules`.
    (Clement Blaudeau, review b= y Gabriel Scherer)

  Build system:
  -------------
<= br>  * (*breaking change*) #13526(https://github.com/ocaml/ocaml/issue= s/13526), #13789(https://github.com/ocaml/ocaml/issues/13789), #13804(https= ://github.com/ocaml/ocaml/issues/13804): Simplify the build of cross compil= ers
    This replaces the configure `--with-target-bindir` opt= ion by an equivalent
    `TARGET_BINDIR` variable
  &n= bsp; (Samuel Hym, review by Miod Vallat, Xavier Leroy, Antonin D=E9cimo and= S=E9bastien
    Hinderer)


  - #13431(https://= github.com/ocaml/ocaml/issues/13431): Simplify github action responsible fo= r flagging PRs with
    the `parsetree-changes` label and exte= nd it to mention the @ppxlib-dev
    team.
    (N= athan Rebours, review by Florian Angeletti)

  - #13494(https://= github.com/ocaml/ocaml/issues/13494): Use native symlinks on Windows for th= e OCaml installation, reducing
    disk usage considerably.    (David Allsopp, review by Nicol=E1s Ojeda B=E4r and Gabriel = Scherer)

  - #13789(https://github.com/ocaml/ocaml/issues/13789= ): Strictly validate the host and target triplets when building for the
=     Windows ports to be *-*-cygwin, *-w64-mingw32* or *-pc-window= s. Other Cygwin
    variants used to be rejected - other MSVC = and mingw-w64 variants are now
    rejected too.
  &nb= sp; (David Allsopp, review by Antonin D=E9cimo and Gabriel Scherer)

=   Bug fixes:
  ----------

  - #13819(https://githu= b.com/ocaml/ocaml/issues/13819): Fix field initialisation bug in runtime ev= ents subsystem.
    (Nick Barnes, review by Gabriel Scherer).<= br>
  - #13977(https://github.com/ocaml/ocaml/issues/13977): Pass `= -fPIC` when compiling C files using `ocamlopt`. This was a
   = regression in OCaml 5.3.
    (Nicol=E1s Ojeda B=E4r, review b= y Daniel B=FCnzli and Gabriel Scherer)

  - #13957(https://githu= b.com/ocaml/ocaml/issues/13957): Allow 'effect' as attribute id.
  =   (Pieter Goetschalckx, review by Nicol=E1s Ojeda B=E4r and Florian An= geletti)

  - #13691(https://github.com/ocaml/ocaml/issues/13691= ) #13895(https://github.com/ocaml/ocaml/issues/13895): Make four globals un= derlying Gc.control atomic to avoid C data
    races against t= hem.
    (Jan Midtgaard, review by Miod Vallat, Sadiq Jaffer a= nd Antonin D=E9cimo)

  - #13454(https://github.com/ocaml/ocaml/= issues/13454): Output a correct trace of the C_CALLN bytecode.
  &n= bsp; (Miod Vallat, review by Antonin D=E9cimo)

  - #13595(https= ://github.com/ocaml/ocaml/issues/13595): Use x19 as Canonical Frame Address= (CFA) register. This would cause
    backtraces to be truncat= ed when calling no alloc C code.
    (Tim McGilchrist, report = by Nick Barnes, review by Nick Barnes)

  * (*breaking change*) = #13605(https://github.com/ocaml/ocaml/issues/13605): Fix ungenerated constr= aints when they where impossible due to polyvars
    issues    (Samuel Vivien, review by Florian Angeletti, Richard Eisenbe= rg
     and Jacques Garrigue)

  - #13677(http= s://github.com/ocaml/ocaml/issues/13677), #13679(https://github.com/ocaml/o= caml/issues/13679): domain.c: remove backup_thread_running to simplify
&= nbsp;   concurrent state updates to the backup thread status.
 = ;   (Gabriel Scherer, review by Jan Midtgaard and Miod Vallat,
&nbs= p;    report by Jan Midtgaard)

  - #13896(https://git= hub.com/ocaml/ocaml/issues/13896), #14098(https://github.com/ocaml/ocaml/is= sues/14098): ocamldoc, do not wrap module description in a paragraph tag    inside the table of modules
    (Florian Angele= tti, report by John Whitington, review by Gabriel Scherer)

  - = #13703(https://github.com/ocaml/ocaml/issues/13703): wrong explanation for = some polymorphic-variant subtyping errors
    (Gabriel Scherer= , review by Jacques Garrigue,
     report by Wiktor Kucht= a and Richard Eisenberg)

  - #13710(https://github.com/ocaml/oc= aml/issues/13710): Support unicode identifiers in comments.
   = ; (Pieter Goetschalckx, review by Florian Angeletti and Gabriel Scherer)
  - #13763(https://github.com/ocaml/ocaml/issues/13763): Track ty= pe of variables bound by as-patterns
    (Leo White, review by= Gabriel Scherer, port by Vincent Laviron)

  - #13778(https://g= ithub.com/ocaml/ocaml/issues/13778), #13811(https://github.com/ocaml/ocaml/= issues/13811): do not warn for unused type declarations when the type is us= ed
    in a first-class module type (`module S with type t =3D= int)`.
    (Florian Angeletti, report by Nicol=E1s Ojeda B=E4= r, review by Gabriel Scherer)

  - #13790(https://github.com/oca= ml/ocaml/issues/13790): Fix bytecode-only build of Cygwin when flexlink is = being bootstrapped
    with the compiler.
    (Da= vid Allsopp, review by Antonin D=E9cimo and Miod Vallat)

  - #1= 3812(https://github.com/ocaml/ocaml/issues/13812): Add forgotten check abou= t the validity of the type variable name on
    the right-hand= side of `_ as _`.
    (Samuel Vivien, review by Gabriel Scher= er)

  - #13845(https://github.com/ocaml/ocaml/issues/13845): Fi= x bug in untypeast/pprintast for value bindings with polymorphic
  =   type annotations.
    (Chris Casinghino, review by Flor= ian Angeletti and Gabriel Scherer)

  - #13930(https://github.co= m/ocaml/ocaml/issues/13930), #13933(https://github.com/ocaml/ocaml/issues/1= 3933): Fix bugs in recursive values definitions involving
    = lazy values that have already been evaluated.
    (Gabriel Sch= erer, review by Vincent Laviron, report by Vincent Laviron)

  -= #13867(https://github.com/ocaml/ocaml/issues/13867): Fix bug with some rec= ursive bindings of lazy values.
    (Guillaume Bury and Vincen= t Laviron, review by Stefan Muenzel
     and Gabriel Sche= rer)

  - #13931(https://github.com/ocaml/ocaml/issues/13931): f= ix bugs in nested recursive value definitions.
    (Gabriel Sc= herer, review by Vincent Laviron,
     report by Vincent = Laviron)

  - #13875(https://github.com/ocaml/ocaml/issues/13875= ), #13878(https://github.com/ocaml/ocaml/issues/13878): Add dedicated const= ructor for mutable variable access in
    Cmm to prevent bugs = linked to incorrect handling of coeffects.
    (Vincent Laviro= n, review by Gabriel Scherer)

  - #13880(https://github.com/oca= ml/ocaml/issues/13880): Make object stat counters atomic
    (= Dimitris Mostrous, review by Gabriel Scherer and Nicol=E1s Ojeda B=E4r)
=
  - #13172(https://github.com/ocaml/ocaml/issues/13172), #13829(ht= tps://github.com/ocaml/ocaml/issues/13829): Fix a missing check of illegal = recursive module-type
    definitions
    (Clemen= t Blaudeau, review by Florian Angeletti)

  - #13541(https://git= hub.com/ocaml/ocaml/issues/13541), #13777(https://github.com/ocaml/ocaml/is= sues/13777): Using C++11 `thread_local` causes name-mangling
  &nbs= p; issues when linking with flexlink on Cygwin.
    (Antonin D= =E9cimo and David Allsopp, report by Kate Deplaix)

  * (*breaki= ng change*) #13874(https://github.com/ocaml/ocaml/issues/13874), #13882(htt= ps://github.com/ocaml/ocaml/issues/13882): Make evaluation order consistent= for applications when using
    the non-flambda native compil= er
    (Vincent Laviron, report by Jean-Marie Madiot, review b= y Gabriel Scherer)

  - #13942(https://github.com/ocaml/ocaml/is= sues/13942): Fix assertion on empty array case
    (Olivier Ni= cole, review by Gabriel Scherer)

  - #13950(https://github.com/= ocaml/ocaml/issues/13950): Avoid tearing in `Array.sub`
    (G= abriel Scherer and Olivier Nicole, report by Jan Midtgaard, review by
&n= bsp;    Gabriel Scherer)

  - #13928(https://github.co= m/ocaml/ocaml/issues/13928), #13944(https://github.com/ocaml/ocaml/issues/1= 3944): Fix handling of excessively nested unboxed types
    (V= incent Laviron, review by Gabriel Scherer)

  - #13987(https://g= ithub.com/ocaml/ocaml/issues/13987): Remove a spurious TSan report in case = of benign data race between
    major GC read and write from t= he mutator (fixes #13427(https://github.com/ocaml/ocaml/issues/13427))
&= nbsp;   (Olivier Nicole, report by Thomas Leonard, review by Gabriel S= cherer)

  - #14007(https://github.com/ocaml/ocaml/issues/14007)= , #14015(https://github.com/ocaml/ocaml/issues/14015): Fix memory corruptio= n when an exception is raised during
    demarshaling.
&nbs= p;   (Beno=EEt Vaugon, review by David Allsopp and Gabriel Scherer)
  - #14025(https://github.com/ocaml/ocaml/issues/14025): fix data= race between compaction and domain termination
    (Gabriel S= cherer, review by Jan Midtgaard,
     report by Jan Midtg= aard)

  - #13956(https://github.com/ocaml/ocaml/issues/13956) F= ix a regression introduced in #13308(https://github.com/ocaml/ocaml/issues/= 13308) triggering wrong unused warnings.
    (Ulysse G=E9rard,= review by Florian Angeletti)

  - #14070(https://github.com/oca= ml/ocaml/issues/14070): also point to label mismatches in error messages fo= r labelled tuples
    (Florian Angeletti, review by Gabriel Sc= herer)

  - #14088(https://github.com/ocaml/ocaml/issues/14088),= #14091(https://github.com/ocaml/ocaml/issues/14091): fix non-deterministic= code generation in
    matching.ml (backport of rescript-lang= /rescript#7557(https://github.com/ocaml/ocaml/issues/7557))
   = ; (Christiano Calgano, review by Gabriel Scherer and Vincent Laviron)
  - #14105(https://github.com/ocaml/ocaml/issues/14105): Fix a loop = in Pprintast that could result in a hang when printing
    con= structor `(::)` in isolation.
    (Ulysse G=E9rard, review by = Nicol=E1s Ojeda B=E4r and Florian Angeletti)

  - #14108(https:/= /github.com/ocaml/ocaml/issues/14108): toplevel, fix a typo in directive ty= pe mismatch
    (Florian Angeletti, review by Gabriel Scherer)=

  - #13586(https://github.com/ocaml/ocaml/issues/13586), #1409= 3(https://github.com/ocaml/ocaml/issues/14093): Fix closing an out_channel = during flush
    (Stephen Dolan, report by Jan Midtgaard, inve= stigation by Nick Roberts,
     review by Antonin D=E9cim= o and Miod Vallat)

  - #14101(https://github.com/ocaml/ocaml/is= sues/14101), #14139(https://github.com/ocaml/ocaml/issues/14139): define at= omic helper types inside `caml/misc.h` to improve
    header c= ompatibility with C++
    (Florian Angeletti, report by Kate D= eplaix, review by Gabriel Scherer)

  - #14135(https://github.co= m/ocaml/ocaml/issues/14135): Fix a rare internal typechecker error when com= bining recursive
    modules, polymorphic fields or methods, a= nd constrained type parameters.
    (Florian Angeletti, review= by Gabriel Scherer)

  - #14169(https://github.com/ocaml/ocaml/= issues/14169): runtime, fix cache miss within the stack fragments cache
=     (Florian Angeletti, review by Gabriel Scherer)

  = - #14196(https://github.com/ocaml/ocaml/issues/14196), #14197(https://githu= b.com/ocaml/ocaml/issues/14197): ocamlprof: do not instrument unreachable c= lauses
    (Gabriel Scherer, review by Nicol=E1s Ojeda B=E4r, = report by Ali Caglayan)

  - #14200(https://github.com/ocaml/oca= ml/issues/14200), #14202(https://github.com/ocaml/ocaml/issues/14202) : bad= variance check with private aliases
    (Jacques Garrigue, re= port and review by Stephen Dolan)

  - #14061(https://github.com= /ocaml/ocaml/issues/14061), #14209(https://github.com/ocaml/ocaml/issues/14= 209): fix a memory-ordering bug in Weak.set that could
    res= ult in uninitialized memory seen by Weak.get on another domain.
  &= nbsp; (Damien Doligez, review by Gabriel Scherer)

  - #14214(ht= tps://github.com/ocaml/ocaml/issues/14214), #14221(https://github.com/ocaml= /ocaml/issues/14221): fix a confused error message for module inclusions,    functor error messages were missing some type equalities po= tentially leading
    to nonsensical "type t is not compatible= with type t" submessage
    (Florian Angeletti, report by Bas= ile Cl=E9ment, review by Gabriel Scherer)

  - #14238(https://gi= thub.com/ocaml/ocaml/issues/14238): Fix certain variadic macros in misc.h w= hich could trigger C warnings
    under certain conditions in = prerelease versions of OCaml 5.4.
    (Antonin D=E9cimo, revie= w by Nicol=E1s Ojeda B=E4r)

= --=_32a5f52a-f4aa-4522-ae4e-25c7ee9e1c3a--