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=KuyTJnsj; 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 CFCFB4008C for ; Fri, 19 Jun 2026 21:36:48 +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=ZX1C1XXYm9gaXEOtgIKBHjfuOqbZghdx4NWVb7pFXnE=; b=KuyTJnsjffDrGqcQf1LI0ID/RqHLcxRCC4H0tobRGLhuQBk5bxoGpG89 6/qaxHkzjy7zWy/x6GmT2jJ3Thmpxw01nBnsz9sYozrBeSP40k2nePXm/ +ZoBTf8bVMvfnONC4BxeOwNMnW2wK3MtrCEkRrth5gOilSu8qAYdY/xyg M=; X-CSE-ConnectionGUID: UTqd2vz6Q/mZYuxRRAq0Vw== X-CSE-MsgGUID: QVVX7vtoTuqfIkvk+JQqYw== Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=caml-list-owner@inria.fr; spf=None smtp.helo=postmaster@prod-sympa-app.inria.fr Received-SPF: SoftFail (mail2-relais-roc.national.inria.fr: domain of caml-list-owner@inria.fr is inclined to not designate 128.93.162.27 as permitted sender) identity=mailfrom; client-ip=128.93.162.27; 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 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@prod-sympa-app.inria.fr) identity=helo; client-ip=128.93.162.27; receiver=mail2-relais-roc.national.inria.fr; envelope-from="caml-list-owner@inria.fr"; x-sender="postmaster@prod-sympa-app.inria.fr"; x-conformance=spf_only X-IronPort-AV: E=Sophos;i="6.24,214,1774306800"; d="scan'208,217";a="282497629" Received: from prod-sympa-app.inria.fr ([128.93.162.27]) by mail2-relais-roc.national.inria.fr with ESMTP; 19 Jun 2026 23:36:45 +0200 Received: by prod-sympa-app.inria.fr (Postfix, from userid 990) id BE82481A45; Fri, 19 Jun 2026 23:36:44 +0200 (CEST) Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by prod-sympa-app.inria.fr (Postfix) with ESMTP id 72113819E3; Fri, 19 Jun 2026 23:36:26 +0200 (CEST) X-CSE-ConnectionGUID: Zz1gt6heQCiAghJzrFYh0w== X-CSE-MsgGUID: 5Yvy2P3RR8KQa79co+NW4Q== X-ThreatScanner-Verdict: Negative IronPort-Data: A9a23:QDNzya/FPl6OJIMW0V35DrUDWH+TJUtcMsCJ2f8bNWPcYEJGY0x3z WdOD2yCOveCZWL8fNxzaYi0pkJTsJ7SytY3S1Bs/30xFiIbosf7WeiUfxz6V8+wBp2aHRg/t 63ySfGZcZtqFieEzvuJGuK8xZWp/fjQHtIQMMadZGYpA1MiEH5/4f5as7ZRqpZyhtSkCB+6t 9r3osnOUHeowDcc3lg8sspvkzsx+q6u0N8klgZmP64T4gaPzyN94K83fsldEVOoGuG4IcbhH 44v/JnhlkvF8hEkDM+Sk7qTWiUiXr7IMAGSvWFdUq6kjwIqjnRaPnETaZLwwW8O49m4t4gZJ Odl7PRcei9wVkH4o9nxZjEEe81IFf0fqeWfeRBThuTIp6HOWyOEL/yDlyjaN6VAkgp8KTgmG fD1tFnhx/1M7g676OvTdwViuigsBPv5ZYwD5HFt9BrYJPkmY4LZbZTKvcANiV/chugWdRrfT 9gScmAqdwjHeRAWfFYREpM32umy7pX9W2QC+BTE/uxuvzKVl2Sd05C1WDbRUtKOQt9Ul0Der 2TJ8mD0Hg0bHN2Z0zuMtHy27gPKtXmrAt5DS+fkp5aGhnXO93ICUiVNb2HrgsCw1R+1XJF5F BAtr39GQa8asRbDosPGdxaxpXrBuh8HR/JLAugi4UeMzLDV6kCXHAAsRTdEbJkvsskxWDoh2 3eSjtbxDHputqeUQDST7N+pQSiaKyMOdyoZeSgeQFJD4t/5oYh1gAinostfLZNZR+bdQVnYq w1mZgBn71nPpabnFplX/GwrRxq+rYOTCxUp4R/aBySk6Bl4bcirfeRELLQdAelodO6kopup5 BDoWPRyKMgPC4uMnWqDWo3h2Zm3su2dPmS0bUFHRvEcythmx5JvkU28Lt2zyIeF//vooQPUX XI= IronPort-HdrOrdr: A9a23:YWMvJKB5/UA2cb/lHem555DYdb4zR+YMi2TDtnoRdfU7SKelfq yV9sjztiWbtN9yYh0dcLm7UcG9qBjnmqKdlLNhX4tKKzOW3VdAQrsO0WKb+UyCJ8SozI5g6Z s= X-Talos-CUID: =?us-ascii?q?9a23=3A3RnMK2o7Vjn2+GQlczWs7HbmUfI3K3LBknfdGmS?= =?us-ascii?q?5IGlpaq+PZ26QoLwxxg=3D=3D?= X-Talos-MUID: 9a23:od+xmwvs3Dr1Eq831M2n2QB8JZ1QuJ6UWGM0mMpXsM7HExMsAmLI X-URL-LookUp-ScanningError: 1 X-IronPort-AV: E=Sophos;i="6.24,214,1774306800"; d="scan'208,217";a="282497249" X-IronPort-Outbreak-Status: No, level 0, Unknown - Unknown X-MGA-submission: =?us-ascii?q?MDE8Y0WdSwbheJM/dJJgomp/tRxcbinSBxKsXj?= =?us-ascii?q?6jY+pgXP5yfxmaliyTwrhHUAqkzA+ExvQCtTo8QQDYyZrjxki3KX8ppQ?= =?us-ascii?q?mbRrLh/NqekZFyDpLbPS1pJDjXOiaJ9khRkvioyU7flY1u6zJqnHrsLc?= =?us-ascii?q?8uWdufesC7ny8L7fs+TjF5UA=3D=3D?= Received: from zcs2-store1.inria.fr ([128.93.142.3]) by mail2-relais-roc.national.inria.fr with ESMTP; 19 Jun 2026 23:36:26 +0200 Date: Fri, 19 Jun 2026 23:36:26 +0200 (CEST) From: Florian Angeletti To: caml-list , caml-announce Message-ID: <956896430.39194034.1781904986088.JavaMail.zimbra@inria.fr> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_d8422e55-5759-4e6e-b61f-b99e9da155d1" X-Originating-IP: [88.162.13.102] X-Mailer: Zimbra 10.1.16_GA_4850 (ZimbraWebClient - FF151 (Linux)/10.1.16_GA_4863) Thread-Index: 8huVSudiB+HBANvIIUJVKw0pneitkg== Thread-Topic: OCaml 5.5.0 released Subject: [Caml-list] OCaml 5.5.0 released Reply-To: Florian Angeletti X-Loop: caml-list@inria.fr X-Sequence: 19535 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: --=_d8422e55-5759-4e6e-b61f-b99e9da155d1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dear OCaml users,=20 We have the pleasure of celebrating the birthday of Blaise Pascal by announ= cing the release of OCaml version 5.5.0.=20 Some of the highlights in OCaml 5.5.0 are:=20 ### Module-dependent Functions=20 Modules can now be used as function arguments in a form of lightweight func= tors.=20 For instance, we can define a function for printing a map generated by=20 the `Map.Make` functor:=20 let pp_map (module M: Map.S) pp_key pp_v ppf set =3D=20 if M.is_empty set then=20 Format.fprintf ppf "=C3=B8"=20 else=20 let pp_sep ppf () =3D Format.fprintf ppf ",@ " in=20 let pp_binding ppf (k,v) =3D=20 Format.fprintf ppf "@[%a@ =3D@ %a@]" pp_key k pp_v v=20 in=20 Format.fprintf ppf "@[{@ %a@ }@]"=20 (Format.pp_print_seq ~pp_sep pp_binding) (M.to_seq set)=20 We can then apply this function on a string map=20 module String_map =3D Map.Make(String)=20 with=20 let () =3D=20 let m =3D String_map.of_list ["Zero", "Zero"; "One", "Un"] in=20 let pp_str =3D Format.pp_print_string in=20 Format.printf "%a@."=20 (pp_map (module String_map) pp_str pp_str) m=20 Compared to first-class modules, the type of the function `pp_map`=20 type 'a printer =3D Format.formatter -> 'a -> unit=20 val pp_map: (module M: Map.S) -> M.key printer -> 'a printer -> 'a M.t prin= ter=20 is dependent over the value of the module `S`, and thus the function can on= ly=20 applied over a statically known module:=20 let f (): (module Map.S) =3D=20 if Random.bool () then=20 (module Map.Make(Int))=20 else=20 (module Map.Make(Float))=20 let fail =3D pp_map (f ())=20 Error: This expression has type=20 (module M : Map.S) ->=20 (Format.formatter -> M.key -> unit) ->=20 (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a M.t -> unit=20 but an expression was expected of type (module Map.S) -> 'b=20 The module M would escape its scope=20 This function is module-dependent. The dependency is preserved=20 when the function is passed a static module argument (module M : S)=20 or (module M). Its argument here is not static, so the type-checker=20 tried instead to change the function type to be non-dependent.=20 ### Relocatable Compiler=20 A compiler installation can now be moved or copied with no risk=20 of hard-to-debug errors due to mixing incompatible bytecode runtime interpr= eters.=20 In practice, this means that creating a local switch when there is a=20 global switch with the same compiler version and configuration=20 available can be done by cloning the global switch rather than=20 recompiling the whole compiler.=20 This should considerably reduce the time required to create=20 new local opam switches out-of-the-box.=20 ### Polymorphic Functions as Function Arguments=20 Higher-rank polymorphic functions can now be defined directly by=20 using an explicit type annotation in a function argument=20 let apply_map (map: 'a 'b. ('a -> 'b) -> 'a list -> 'b list) =3D=20 map string_of_int [1;2;3], map List.singleton ["x"; "y"]=20 let _ =3D apply_map List.map=20 Previously defining such a function required going through either a record = or an object=20 with a polymorphic field or methods=20 type map =3D { map: 'a 'b. ('a -> 'b) -> 'a list -> 'b list }=20 let apply_map {map} =3D=20 map string_of_int [1;2;3], map List.singleton ["x"; "y"]=20 ### Search and Replace Substring Functions=20 The `String` module has been extended with many functions=20 for searching and replacing substrings inside a string.=20 let _true =3D String.includes ~affix:"aba" "abbaba"=20 let sentence =3D String.replace_all ~sub:"=F0=9D=84=BD" ~by:"word" "A =F0= =9D=84=BD is re=F0=9D=84=BDed"=20 The substring search is using the 2-way string matching algorithm=20 which has the advantage of requiring constant space memory overhead=20 independently of the needle size.=20 ### Generalised Local Definitions=20 It is now always possible to define locally a type,=20 a class, a module type or any kind of item that can be defined=20 globally:=20 let mandelbrot n x =3D=20 let type t =3D Converge | Escape of int in=20 ...=20 match orbit n x with=20 | Converge -> 0=20 | Exit_at n -> colorize n=20 ### External Types=20 When interfacing with foreign function libraries, it is now possible=20 to define external type=20 type int_gmp =3D external "mpz_t"=20 type float_gmp =3D external "mpf_t"=20 Compared to an abstract type definition, the external type name=20 "mpz_t" (resp. `mpf_t`) makes the type distinguishable from any=20 non-abstract types or external types with a different name.=20 In particular, this makes FFI types better behaved when combined with=20 Generalised Abstract Data Types (GADTs). For instance, The typechecker=20 is able to prove that=20 let ok: (int_gmp,[` A] ) Type.eq -> _ =3D function _ -> .=20 is a total function because the external type `int_gmp` is not compatible= =20 with a polymorphic variant type.=20 ### Warning: Abstract types in the current module=20 The astute reader has probably noticed in the definition above that,=20 in OCaml 5.4.0, the typechecker does accept=20 type int_gmp=20 let ok: (int_gmp, [` A] ) Type.eq -> _ =3D function _ -> .=20 as total.=20 Indeed until OCaml 5.5.0, abstract types defined in the current module=20 type a=20 type b=20 were considered as unique and provably different=20 let f: 'x. (a,b) Type.eq -> 'x =3D function _ -> .=20 However, this special rule for local definition of abstract types was=20 very brittle. As soon as one moved outside of the current module, it=20 was no longer possible to prove that the types were different.=20 module M =3D struct=20 type a=20 type b=20 end=20 let fail: 'x. (M.a,M.b) Type.eq -> 'x =3D function _ -> .=20 Error: This match case could not be refuted.=20 Here is an example of a value that would reach it: Equal=20 This special typechecking rule has been removed in OCaml 5.5.0. If you were= relying on it,=20 for instance, because you used an abstract type as type-level label in a GA= DTs, you=20 can change your abstract type definition to a possibly private abbreviation= of a polymorphic variant=20 type a =3D private [`A]=20 type b =3D [`B]=20 or a (possibly private) sum type=20 type a =3D A=20 type b =3D private B=20 If you were using an abstract type as both a type-level label and a FFI typ= e, you=20 can now use an external type definition which will give you a provably dist= inct type=20 even outside of the current module.=20 ### GC improvements=20 Some of the ongoing work to improve the pacing of the garbage=20 collector has been integrated in OCaml 5.5.0, two of the important=20 changes in OCaml 5.5 GC are=20 - the addition of a sweep-only phase at the start of major GC=20 - the addition of an idle phase to smooth the behaviour of the GC=20 at the start.=20 ### Many incremental changes=20 - The Windows implementation is no more reliant on Winpthreads=20 - Around 60 new standard library functions=20 - Around 90 various improvements=20 - A dozen of documentation updates=20 - Around 40 bug fixes=20 Please report any unexpected behaviours on the [OCaml issue=20 tracker](https://github.com/ocaml/ocaml/issues) and post any questions or= =20 comments you might have on our discussion forums at=20 - [ https://discuss.ocaml.org/ | https://discuss.ocaml.org ]=20 The full list of changes can be found in the full changelog.=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.5.0=20 The source code for the release is also directly available on:=20 - GitHub: https://github.com/ocaml/ocaml/releases/download/5.5.0/ocaml-5.5.= 0.tar.gz=20 - OCaml archives at Inria: https://caml.inria.fr/pub/distrib/ocaml-5.5/ocam= l-5.5.0.tar.gz=20 ### Fine-Tuned Compiler Configuration=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.5.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.5.0+flambda+nffa ocaml-variants.5.5.0+options ocaml-op= tion-flambda ocaml-option-no-flat-float-array=20 Changes in OCaml 5.5.0=20 ---------------------------------=20 ### Language features:=20 * (*breaking change*) [#13681](https://github.com/ocaml/ocaml/issues/13681)= , [#13682](https://github.com/ocaml/ocaml/issues/13682), [#13683](https://g= ithub.com/ocaml/ocaml/issues/13683), [#13684](https://github.com/ocaml/ocam= l/issues/13684), [#13275](https://github.com/ocaml/ocaml/issues/13275) :=20 Introduce a new type `(module M : S) -> t[M]` that corresponds to=20 module-dependent functions (also called: modular explicits).=20 val mapM: (module M : Monad) (f : 'a -> 'b M.t) : 'a list -> 'b list M.t=20 (Samuel Vivien review by Leo White, Gabriel Scherer, Florian Angeletti,=20 Jacques Garrigue and Stephen Dolan)=20 - [#14040](https://github.com/ocaml/ocaml/issues/14040): generalize the con= structs `let module`, `let exception` and `let open`=20 to most other structure items, for example:=20 let type t =3D ... in ...=20 let type Effect.t +=3D Yield in ...=20 (Nicol=C3=A1s Ojeda B=C3=A4r, review by Valentin Gatien-Baron)=20 - [#13806](https://github.com/ocaml/ocaml/issues/13806): Enable the use of = function parameters with polymorphic types.=20 let extract (getter : 'a . 'a t -> 'a) =3D ...=20 let runST (m : 's . ('s, 'a) ST.t) : 'a =3D ...=20 (Ulysse G=C3=A9rard, Leo White, review by Florian Angeletti, Samuel Vivien,= Gabriel=20 Scherer and Jacques Garrigue)=20 * (*breaking change*) [#13712](https://github.com/ocaml/ocaml/issues/13712)= : Introduce a new kind `Type_external` and syntax=20 `type t =3D external "name"` to discriminate external types from other type= s=20 and each other. This PR turns primitive types into external and removes the= =20 past behavior of discriminating abstract types defined in the current modul= e.=20 (Takafumi Saikawa, Jacques Garrigue, review by Richard Eisenberg)=20 * (*breaking change*) [#14009](https://github.com/ocaml/ocaml/issues/14009)= : infix extension points/attributes appearing in local structure items,=20 eg `let module%foo[@bar] ... in ...` are attached to the AST node of the=20 corresponding structure item (similar to their global counterparts) and no= =20 longer to the enclosing `let` expression. Extension points/attributes that= =20 are to be attached to the enclosing `let` expression are to be written next= to=20 the `let` keyword, eg `let%foo[@bar] module ... in ...`. The same holds for= =20 `let exception` and `let open`.=20 (Nicol=C3=A1s Ojeda B=C3=A4r, review by Gabriel Scherer)=20 - [#14029](https://github.com/ocaml/ocaml/issues/14029): Recognize `%identi= ty` as nonexpansive=20 (Stephen Dolan and Olivier Nicole, review by Hugo Heuzard, Jacques Garrigue= ,=20 Jeremy Yallop, and Gabriel Scherer)=20 ### Standard library:=20 - [#13372](https://github.com/ocaml/ocaml/issues/13372): New Format and Pri= ntf printf-like functions that accept a=20 heterogeneous list as arguments.=20 Format.lprintf "@[%s@ %d@]@." [ "x =3D"; 1 ]=20 (Leonardo Santos, review by Florian Angeletti and Gabriel Scherer)=20 - [#14437](https://github.com/ocaml/ocaml/issues/14437): Add String.split_{= first,last,all} and String.rsplit_all=20 split_first: sep:string -> string -> (string * string) option=20 split_all: sep:string -> drop:(string -> bool) -> string -> string list=20 (Daniel B=C3=BCnzli, review by Nicol=C3=A1s Ojeda B=C3=A4r and Florian Ange= letti)=20 - [#14436](https://github.com/ocaml/ocaml/issues/14436): Add String.replace= _{first,last,all}=20 replace_first: sub:string -> by:string -> ?start:int -> string -> string=20 (Daniel B=C3=BCnzli, review by Nicol=C3=A1s Ojeda B=C3=A4r, Ali Caglayan an= d=20 Florian Angeletti)=20 - [#14439](https://github.com/ocaml/ocaml/issues/14439): Add String.include= s, to complete the trio:=20 starts_with: prefix:string -> string -> bool=20 ends_with: suffix:string -> string -> bool=20 includes: affix:string -> string -> bool=20 (Daniel B=C3=BCnzli, review by Nicol=C3=A1s Ojeda B=C3=A4r and Olivier Nico= le)=20 - [#14381](https://github.com/ocaml/ocaml/issues/14381): Add String.find_{f= irst,last}_index, String.find_{first,last},=20 String.[r]find_all.=20 find_first_index: (char -> bool) -> ?start:int -> string -> int option=20 (Daniel B=C3=BCnzli, review by Nicol=C3=A1s Ojeda B=C3=A4r, Ali Caglayan an= d=20 Florian Angeletti)=20 - [#14438](https://github.com/ocaml/ocaml/issues/14438): Add String.is_empt= y=20 (Daniel B=C3=BCnzli, review by Nicol=C3=A1s Ojeda B=C3=A4r and Gabriel Sche= rer)=20 - [#14440](https://github.com/ocaml/ocaml/issues/14440): Add String.of_char= =20 (Daniel B=C3=BCnzli, review by Nicol=C3=A1s Ojeda B=C3=A4r and Gabriel Sche= rer)=20 - [#14352](https://github.com/ocaml/ocaml/issues/14352): Add String.{drop,t= ake,cut}_{first,last}.=20 take_first: int -> string -> string=20 cut_first: int -> string -> string * string=20 (Daniel B=C3=BCnzli, review by David Allsopp, Nicol=C3=A1s Ojeda B=C3=A4r a= nd=20 Vincent Laviron)=20 - [#14362](https://github.com/ocaml/ocaml/issues/14362): Add String.{drop,t= ake,cut}_{first,last}_while=20 drop_first_while: (char -> bool) -> string -> string=20 (Daniel B=C3=BCnzli, review by Nicol=C3=A1s Ojeda B=C3=A4r and David Allsop= p)=20 - [#13916](https://github.com/ocaml/ocaml/issues/13916): Add Option.product= and Option.Syntax.=20 (Nicol=C3=A1s Ojeda B=C3=A4r, review by Daniel B=C3=BCnzli, Gabriel Scherer= and David=20 Allsopp)=20 - [#13995](https://github.com/ocaml/ocaml/issues/13995): Option.blend: ('a = -> 'a -> 'a) -> 'a option -> 'a option -> 'a option=20 (Kate Deplaix, review by Daniel B=C3=BCnzli, Gabriel Scherer,=20 Nicol=C3=A1s Ojeda B=C3=A4r, Florian Angeletti and Josh Berdine)=20 - [#13920](https://github.com/ocaml/ocaml/issues/13920): add Option.{for_al= l, exists}=20 (Gabriel Scherer, review by Kate Deplaix, Nicol=C3=A1s Ojeda B=C3=A4r, Rich= ard Eisenberg=20 and Jeremy Yallop)=20 - [#14185](https://github.com/ocaml/ocaml/issues/14185): List.split_map: ('= a -> 'b * 'c) -> 'a list -> 'b list * 'c list=20 (Jeremy Yallop, review by Daniel B=C3=BCnzli, Nicol=C3=A1s Ojeda B=C3=A4r a= nd Damien Doligez)=20 - [#14043](https://github.com/ocaml/ocaml/issues/14043), [#14393](https://g= ithub.com/ocaml/ocaml/issues/14393): Lazy.Mutexed: simple mutex-protected l= azy thunks,=20 that may block the entire domain/thread on initialization races.=20 (Gabriel Scherer, suggestion by Kate Deplaix and Pierre Chambart,=20 review by KC Sivaramakrishnan, Florian Angeletti, Kate Deplaix=20 and Daniel B=C3=BCnzli)=20 - [#14118](https://github.com/ocaml/ocaml/issues/14118): Add {Set,Map}.S.is= _singleton=20 (Kate Deplaix, review by Daniel B=C3=BCnzli, Vincent Laviron, Nicol=C3=A1s = Ojeda B=C3=A4r=20 and Stephen Dolan)=20 - [#14060](https://github.com/ocaml/ocaml/issues/14060): Add Hashtbl.find_a= nd_replace and Hashtbl.find_and_remove.=20 find_and_replace: ('k, 'a) Hashtbl.t -> 'k -> 'a -> 'a option=20 find_and_remove: ('k, 'a) Hashtbl.t -> 'k -> 'a option=20 (Sacha-=C3=89lie Ayoun, review by Nicol=C3=A1s Ojeda B=C3=A4r and Gabriel S= cherer)=20 - [#14227](https://github.com/ocaml/ocaml/issues/14227): Add List.filter_ma= pi.=20 (=C3=89mile Trotignon, review by Nicol=C3=A1s Ojeda B=C3=A4r, Jan Midtgaard= and=20 Damien Doligez)=20 - [#14432](https://github.com/ocaml/ocaml/issues/14432): Add floor division= , ceil division, Euclidean division and remainder=20 to the Int, Int32, Int64 and Nativeint modules: `fdiv`, `cdiv`, `ediv`.=20 (Xavier Leroy, review by Ali Caglayan, Nicol=C3=A1s Ojeda B=C3=A4r, Gabriel= Scherer)=20 - [#14433](https://github.com/ocaml/ocaml/issues/14433): Add bit-counting f= unctions `leading_zeros`, `leading_sign_bits`,=20 `trailing_zeros`, `bit_count`, `unsigned_bitsize`, `signed_bitsize`=20 to Int, Int32, Int64, and Nativeint=20 (Xavier Leroy, review by Ali Caglayan and David Allsopp)=20 - [#10177](https://github.com/ocaml/ocaml/issues/10177): Seq.(delay : (unit= -> 'a t) -> 'a t)=20 (Gabriel Scherer, review by Jeremy Yallop and Fran=C3=A7ois Pottier)=20 - [#13343](https://github.com/ocaml/ocaml/issues/13343): Add Array.stable_s= ort_sub=20 (Fran=C3=A7ois Pottier, review by Gabriel Scherer, Corentin Leruth and Nico= l=C3=A1s=20 Ojeda B=C3=A4r)=20 - [#14363](https://github.com/ocaml/ocaml/issues/14363): Preserve the backt= race at exceptional domain termination. Domain.join=20 on an exceptionally terminated domain re-raises the exception with the=20 backtrace.=20 (KC Sivaramakrishnan, report by Nathan Taylor, review by Gabriel Scherer,= =20 David Allsopp)=20 - [#13728](https://github.com/ocaml/ocaml/issues/13728): Add Sys.runtime_ex= ecutable containing the full path (if available) to=20 the currently executing runtime.=20 (David Allsopp, review by Nicol=C3=A1s Ojeda B=C3=A4r and Daniel B=C3=BCnzl= i)=20 - [#14086](https://github.com/ocaml/ocaml/issues/14086): Add Domain.count.= =20 (Nicol=C3=A1s Ojeda B=C3=A4r, review by David Allsopp, Gabriel Scherer, Dan= iel B=C3=BCnzli=20 and KC Sivaramakrishnan)=20 - [#12877](https://github.com/ocaml/ocaml/issues/12877): Dynarray.rev_iter,= Dynarray.rev_iteri=20 (Gabriel Scherer, review by L=C3=A9o Andr=C3=A8s, Jeremy Yallop and Nicol= =C3=A1s Ojeda B=C3=A4r)=20 - [#14084](https://github.com/ocaml/ocaml/issues/14084): Future-proof Dynar= ray implementation against a smarter compiler=20 (Basile Cl=C3=A9ment, review by Gabriel Scherer)=20 ### Tools:=20 - [#13728](https://github.com/ocaml/ocaml/issues/13728), [#14014](https://g= ithub.com/ocaml/ocaml/issues/14014), [#14243](https://github.com/ocaml/ocam= l/issues/14243), [#14244](https://github.com/ocaml/ocaml/issues/14244), [#1= 4245](https://github.com/ocaml/ocaml/issues/14245) : The compiler is now re= locatable: it=20 can be copied/moved to a different directory and everything still=20 works.=20 (David Allsopp, review by Nicol=C3=A1s Ojeda B=C3=A4r, Jonah Beckford, Dani= el B=C3=BCnzli,=20 Antonin D=C3=A9cimo, Damien Doligez, Hugo Heuzard, Samuel Hym,=20 and Vincent Laviron)=20 - [#14055](https://github.com/ocaml/ocaml/issues/14055): Invert BUILD_PATH_= PREFIX_MAP in directories loaded at startup=20 by the debugger.=20 (Pierre Boutillier, review by Gabriel Scherer and Daniel B=C3=BCnzli)=20 * (*breaking change*) [#13638](https://github.com/ocaml/ocaml/issues/13638)= : ocamlmklib exits with code 4 if passed an unrecognised option, as it=20 does with an unrecognised file.=20 (David Allsopp, review by Antonin D=C3=A9cimo and S=C3=A9bastien Hinderer)= =20 - [#13941](https://github.com/ocaml/ocaml/issues/13941), [#13961](https://g= ithub.com/ocaml/ocaml/issues/13961): Fix `ocamltest` variable handing.=20 (Damien Doligez, report by Olivier Nicole, review by Gabriel Scherer)=20 - [#13962](https://github.com/ocaml/ocaml/issues/13962): Little ocamltest r= efactors. Fix error handling in C code,=20 leaking file descriptors, code style.=20 (Antonin D=C3=A9cimo, review by Gabriel Scherer)=20 - [#14059](https://github.com/ocaml/ocaml/issues/14059): Fix flaky TSan tes= ts=20 (Fabrice Buoro and Olivier Nicole, review by Gabriel Scherer)=20 - [#13966](https://github.com/ocaml/ocaml/issues/13966), [#13969](https://g= ithub.com/ocaml/ocaml/issues/13969): Enable "generalized polymorphic #insta= ll_printer"=20 in the debugger=20 (Pierre Boutillier and Gabriel Scherer, review by Florian Angeletti)=20 - [#14063](https://github.com/ocaml/ocaml/issues/14063) : Debugger fallback= s to "looking for 'module_name'.ml in the=20 loadpath" when seeking source files. It improves hit rate for=20 sources of installed packages.=20 (Pierre Boutillier, review by Gabriel Scherer)=20 - [#14032](https://github.com/ocaml/ocaml/issues/14032), [#14034](https://g= ithub.com/ocaml/ocaml/issues/14034): Update to and require FlexDLL 0.44.=20 (Jan Midtgaard, Antonin D=C3=A9cimo, review by David Allsopp)=20 - [#14239](https://github.com/ocaml/ocaml/issues/14239): Fix `#show_constru= ctor` when printing non-GADT type parameters=20 (Takafumi Saikawa, Jacques Garrigue, review by Gabriel Scherer)=20 - [#14245](https://github.com/ocaml/ocaml/issues/14245): ocamlobjinfo now d= isplays the runtime invoked by a bytecode=20 executable (either from the RNTM section or by analysing the shebang lines)= =20 (David Allsopp, review by Damien Doligez and Samuel Hym)=20 ### Runtime system:=20 - [#14365](https://github.com/ocaml/ocaml/issues/14365): Add an Idle phase = to the GC for better performance on small=20 heaps and for a smooth start at program launch and after a forced major GC.= =20 (Damien Doligez, review by Stephen Dolan and Nick Barnes)=20 - [#13416](https://github.com/ocaml/ocaml/issues/13416): Implement concurre= ncy primitives using WinAPI instead of=20 winpthreads on Windows.=20 (Antonin D=C3=A9cimo, review by Samuel Hym, Gabriel Scherer, Miod Vallat,= =20 B. Szilvasy, and Nicol=C3=A1s Ojeda B=C3=A4r)=20 - [#14367](https://github.com/ocaml/ocaml/issues/14367): Gc.Tweak mechanism= to allow named GC parameters=20 (Stephen Dolan and Nick Barnes, review by Gabriel Scherer, David Allsopp an= d=20 Antonin D=C3=A9cimo)=20 - [#13574](https://github.com/ocaml/ocaml/issues/13574), [#13594](https://g= ithub.com/ocaml/ocaml/issues/13594): Generational scanning of stack frames = for ARM 64 bits, POWER,=20 and RISC-V. This reduces minor GC work in the presence of deep call stacks.= =20 (Xavier Leroy, review by Miod Vallat, Gabriel Scherer and Olivier Nicole)= =20 - [#14416](https://github.com/ocaml/ocaml/issues/14416): Spawned domains wi= ll record backtraces if the parent domain has=20 enabled it.=20 (Nathan Taylor, review by Gabriel Scherer)=20 - [#14275](https://github.com/ocaml/ocaml/issues/14275): Add function caml_= c_thread_register_in_domain, which makes it=20 possible to register "C threads" in another domain than 0 (which is=20 what caml_c_thread_register does). The function takes a domain unique=20 ID in which to register the thread. The domain must be running=20 when the function is called.=20 (Jack N=C3=B8rskov J=C3=B8rgensen, review by Gabriel Scherer,=20 Guillaume Munch-Maccagnoni)=20 - [#13616](https://github.com/ocaml/ocaml/issues/13616): Change free list r= epresentation in shared heap=20 (Sadiq Jaffer, review by Damien Doligez)=20 - [#13580](https://github.com/ocaml/ocaml/issues/13580): Introduce sweep-on= ly phase at start of major GC cycle,=20 to reduce latent-garbage delay and therefore improve GC performance.=20 (Stephen Dolan and Nick Barnes, review by KC Sivaramakrishnan)=20 - [#14053](https://github.com/ocaml/ocaml/issues/14053): Statmemprof: it is= now possible to replace a profile in the=20 current domain without stopping it in all domains.=20 Added the function [Gc.Memprof.is_sampling].=20 (Guillaume Munch-Maccagnoni, review by Gabriel Scherer)=20 - [#14168](https://github.com/ocaml/ocaml/issues/14168): restore the stack = size statistic in `Gc.stat` and adds a new=20 `live_stacks_words` field tracking the total size in words of live stacks.= =20 (Florian Angeletti, review by Gabriel Scherer)=20 - [#14189](https://github.com/ocaml/ocaml/issues/14189): Add runtime counte= rs EV_C_MINOR_PROMOTED_WORDS and=20 EV_C_MINOR_ALLOCATED_WORDS. EV_C_MINOR_PROMOTED_WORDS reports words promote= d=20 by minor GC and EV_C_MINOR_ALLOCATED_WORDS reports words allocated by minor= =20 GC. Both have equivalent bytes counters. Also updated the documentation for= =20 EV_C_MINOR_PROMOTED and EV_C_MINOR_ALLOCATED to qualify scope of the values= =20 reported as being per-domain.=20 (Tim McGilchrist, review by Nick Barnes, Sadiq Jaffer and=20 Gabriel Scherer)=20 * (*breaking change*) [#14243](https://github.com/ocaml/ocaml/issues/14243)= : Explicit relative paths in ld.conf (".", "..", "./",=20 "../") are interpreted as being relative to the directory ld.conf= =20 was loaded from, and the default ld.conf now uses relative paths, rather th= an=20 embedding the absolute path to the Standard Library. The brave may continue= to=20 put implicit paths in ld.conf. The interpretation of CAML_LD_LIBRARY_PATH i= s=20 unaltered. Additionally, ld.conf is loaded from all of $OCAMLLIB/ld.conf,= =20 $CAMLLIB/ld.conf and standard_library_default/ld.conf rather than just the= =20 first one found. ld.conf files with CRLF line endings are now consistently= =20 normalised on both Windows and Unix.=20 (David Allsopp, review by Jonah Beckford, Damien Doligez and Hugo Heuzard)= =20 - [#14244](https://github.com/ocaml/ocaml/issues/14244): Added --with-relat= ive-libdir which allows the runtime and the=20 compilers to locate the Standard Library relative to where the binaries=20 themselves are installed, removing the absolute path previously embedded in= =20 caml_standard_library_default. Executables linked with `ocamlc -custom` now= =20 always attempt to load bytecode from the executable itself, rather than fir= st=20 trying `argv[0]`.=20 (David Allsopp, review by Jonah Beckford, Antonin D=C3=A9cimo, Damien Dolig= ez,=20 Samuel Hym and Vincent Laviron)=20 - [#14245](https://github.com/ocaml/ocaml/issues/14245): Introduce Runtime = IDs for use in filename mangling to allow different=20 configurations and different versions of the runtime system to coexist=20 harmoniously on a single system. The IDs are used, along with the host=20 triplet, to provide mangled names for the ocamlrun executable and its varia= nts=20 and the DLL versions of both the bytecode and native runtimes, with symlink= s=20 created for the original names. They are also used to mangle the names of s= tub=20 libraries so that stub libraries compiled for a given configuration of the= =20 runtime will only be sought by that runtime. The behaviour is disabled by= =20 configuring with --disable-suffixing.=20 (David Allsopp, review by Damien Doligez and Samuel Hym)=20 - [#12269](https://github.com/ocaml/ocaml/issues/12269), [#12410](https://g= ithub.com/ocaml/ocaml/issues/12410), [#13063](https://github.com/ocaml/ocam= l/issues/13063): Fix unsafety, deadlocks, and/or leaks should=20 rare errors happen during domain creation and thread=20 creation/registration.=20 (Guillaume Munch-Maccagnoni, review by Gabriel Scherer, B. Szilvasy,=20 Miod Vallat)=20 - [#14337](https://github.com/ocaml/ocaml/issues/14337): Fix potential segf= ault due to the C callback mechanism dropping=20 continuations without calling `caml_continuation_use`.=20 (Max Slater, review by Nick Barnes and Stephen Dolan)=20 - [#14461](https://github.com/ocaml/ocaml/issues/14461): Fix racy socketpai= r on Windows. Address-in-use errors would sometimes=20 occur when concurrent threads or processes were trying to create socketpair= s.=20 (Jessie Grosen, review by Antonin D=C3=A9cimo and Nicol=C3=A1s Ojeda B=C3= =A4r)=20 - [#14820](https://github.com/ocaml/ocaml/issues/14820): caml_ba_alloc must= account for memory it allocated itself.=20 CAML_BA_SUBARRAY (introduced in 5.2) with data=3DNULL would result in the= =20 Gc accounting for the allocation as 0 bytes, which can eventually lead=20 to OOM. This condition never occurs in the compiler itself, but occurs=20 in external C bindings that attempt to create a new bigarray in the=20 shape of an existing one. For backwards compatibility ignore CAML_BA_SUBARR= AY=20 when data is NULL.=20 (Edwin T=C3=B6r=C3=B6k, review by Damien Doligez)=20 ### Type system:=20 - [#13781](https://github.com/ocaml/ocaml/issues/13781): Set scope of inter= nal type nodes during abbreviation expansion=20 rather than recursing during unification.=20 (Jacques Garrigue, review by Gabriel Scherer)=20 * (*breaking change*) [#14066](https://github.com/ocaml/ocaml/issues/14066)= : catch invalid aliases introduced by signature constraints during=20 merging rather than in subtyping:=20 ```ocaml=20 module X =3D struct end module F (_:sig end) =3D struct end=20 module type T =3D (sig module X0 : sig end module X1 =3D X0 end)=20 with module X0 :=3D F(X)=20 ```=20 Before, it failed with a subtyping error. Now, it fails with a proper error= ,=20 explaining that `X1` would keep an invalid alias to `F(X)`=20 (Clement Blaudeau, review by Florian Angeletti)=20 * (*breaking change*) [#14100](https://github.com/ocaml/ocaml/issues/14100)= : Do not ignore type-constraints and module-constraints when building=20 the approximated signature of recursive modules. Ignoring those constraints= =20 resulted in incorrect (wrong set of fields, wrong shadowing between fields)= =20 approximated signatures, failing to typecheck, as in:=20 ```ocaml=20 module X0 : sig type t end=20 module rec X : ((sig module A : sig end end) with module A :=3D X0)=20 and Y : sig type t =3D X.A.t end (* Unbound type constructor X.A.t *)=20 ```=20 Now, type and module constraints are properly merged during approximation ,= =20 reusing the infrastructure for normal merging of constraints, but disabling= =20 any wellformedness check.=20 (Clement Blaudeau and Ryan Tjoa, review by Florian Angeletti)=20 - [#14327](https://github.com/ocaml/ocaml/issues/14327): Allow retyping as-= patterns that contain existentials=20 (completing [#14229](https://github.com/ocaml/ocaml/issues/14229))=20 (Jacques Garrigue and Takafumi Saikawa, reported by Olivier Nicole,=20 review by Gabriel Scherer)=20 - [#14434](https://github.com/ocaml/ocaml/issues/14434), [#14652](https://g= ithub.com/ocaml/ocaml/issues/14652): Protect check_counter_example_pat agai= nst polymorphic types,=20 restoring type soundness.=20 (Stephen Dolan and Jacques Garrigue, report and review by Alistair O'Brien)= =20 ### Compiler user-interface and warnings:=20 - [#14330](https://github.com/ocaml/ocaml/issues/14330): add suggestions wh= en a signature mismatch is likely to be be caused by=20 spellchecking mistakes, for instance=20 ```=20 module M: sig type albatross end =3D struct type albatros end=20 ```=20 (Malo Monin, Florian Angeletti, review by Gabriel Scherer)=20 - [#12628](https://github.com/ocaml/ocaml/issues/12628): Improved error mes= sage for unsafe values: print out the full path for=20 the value that is unsafe when they are detected during the compilation of= =20 recursive modules.=20 (Shivam Acharya, review by Gabriel Scherer and Florian Angeletti)=20 - [#14076](https://github.com/ocaml/ocaml/issues/14076), 14111: error messa= ges, add a short explanation for mismatched=20 universal variables and universal quantifications.=20 (Florian Angeletti, review by Gabriel Scherer)=20 - [#14126](https://github.com/ocaml/ocaml/issues/14126): Document the `-i-v= ariance` option and `+-`, `-+` variance indicators=20 in the reference manual.=20 (Takafumi Saikawa, review by Florian Angeletti)=20 - [#14146](https://github.com/ocaml/ocaml/issues/14146): add an error messa= ge for external declaration with=20 a non-syntactic arity=20 ```=20 external fail: (int -> int as 'a) -> 'a =3D "%identity"=20 ```=20 rather than failing with an internal error.=20 (Florian Angeletti, review by Gabriel Scherer)=20 - [#14147](https://github.com/ocaml/ocaml/issues/14147): print row types in= error messages when they are a type constructor,=20 e.g. `< foo : int; .. as $0>` when $0 is introduced by a GADT constructor= =20 (Stefan Muenzel, review by Jacques Garrigue and Florian Angeletti)=20 - [#14190](https://github.com/ocaml/ocaml/issues/14190): `ocaml -e` now als= o processes `-init` (previously it was ignored).=20 (Emile Trotignon, review by David Allsopp and @ygrek)=20 - [#14225](https://github.com/ocaml/ocaml/issues/14225): do not raise unuse= d-constructor warning on private=20 constructor in type implementations, for example=20 `type safe =3D private Safe`, which are typically used to=20 create new fresh/generative types (here `safe`) to be used=20 as GADT indices.=20 (Gabriel Scherer, review by Nicol=C3=A1s Ojeda B=C3=A4r and Florian Angelet= ti,=20 report by Kate Deplaix)=20 - [#14244](https://github.com/ocaml/ocaml/issues/14244): Add -set-runtime-d= efault option to the compiler, allowing the default=20 value of the Standard Library location used by the runtime to be overridden= .=20 (Antonin D=C3=A9cimo, review by David Allsopp, Jonah Beckford, Damien Dolig= ez and=20 Samuel Hym)=20 - [#14245](https://github.com/ocaml/ocaml/issues/14245): New option -launch= -method for ocamlc allows the method used by a=20 tendered bytecode executable to locate the interpreter to be given explicit= ly.=20 In particular, it makes it easier to specify the use of the executable=20 launcher on Unix. New option -runtime-search extends the bytecode executabl= e=20 header to be able to search for the runtime interpreter in the directory=20 containing the executable and in PATH rather than relying on a single=20 hard-coded path.=20 (David Allsopp, review by Damien Doligez and Samuel Hym)=20 - [#14315](https://github.com/ocaml/ocaml/issues/14315): enable -i-variance= also for classes and extension constructors,=20 and add description of -i-variance in manpages and the manual=20 (Takafumi Saikawa, review by Florian Angeletti and Jacques Garrigue)=20 - [#14373](https://github.com/ocaml/ocaml/issues/14373): remove the OCAML_B= INANNOT_WITHENV environment variable, and=20 always strip typing environment in cmt files=20 (Florian Angeletti, review by David Allsopp)=20 ### Other libraries:=20 - [#13700](https://github.com/ocaml/ocaml/issues/13700), [#14454](https://g= ithub.com/ocaml/ocaml/issues/14454), [#14715](https://github.com/ocaml/ocam= l/issues/14715): Use POSIX thread-safe getgrnam_r, getgrgid_r,=20 getpwnam_r, getpwuid_r, gmtime_r, localtime_r, getlogin_r, and fix mktime= =20 error checking.=20 (Antonin D=C3=A9cimo, review by Florian Angeletti, David Allsopp, Stefan Mu= enzel,=20 Gabriel Scherer, and Miod Vallat)=20 - [#14406](https://github.com/ocaml/ocaml/issues/14406): Better handling of= address length for unix sockets, improving Haiku=20 compatibility.=20 (Sylvain Kerjean, review by Antonin D=C3=A9cimo and Nicol=C3=A1s Ojeda B=C3= =A4r)=20 * (*breaking change*) [#14046](https://github.com/ocaml/ocaml/issues/14046)= : On Windows, `Unix.kill pid Sys.sigkill` causes the receiving process=20 to exit with code ERROR_PROCESS_ABORTED (1067) instead of 0.=20 (Nicol=C3=A1s Ojeda B=C3=A4r, review by Miod Vallat, Antonin D=C3=A9cimo an= d David Allsopp)=20 - [#14020](https://github.com/ocaml/ocaml/issues/14020): Add Unix.unsetenv.= =20 (Nicol=C3=A1s Ojeda B=C3=A4r, review by Antonin D=C3=A9cimo and David Allso= pp)=20 - [#13447](https://github.com/ocaml/ocaml/issues/13447): Symmetrize shared = `Sys` and `Unix` functions. Apply fixes=20 of [#12072](https://github.com/ocaml/ocaml/issues/12072), [#12184](https://= github.com/ocaml/ocaml/issues/12184), [#12320](https://github.com/ocaml/oca= ml/issues/12320), and [#13166](https://github.com/ocaml/ocaml/issues/13166)= , from `Sys.rename` to=20 `Unix.rename`. Make `caml_sys_close` raise on error, allowing=20 `Filename.temp_file` retries if close fails. Flush buffers when=20 calling `caml_sys_system_command` on Windows. Error with EINVAL=20 instead of ENOENT if the command string is not a valid C string.=20 (Antonin D=C3=A9cimo, review by Gabriel Scherer and Nicol=C3=A1s Ojeda B=C3= =A4r)=20 - [#14310](https://github.com/ocaml/ocaml/issues/14310): Deprecate union so= ck_addr_union for struct sockaddr_storage=20 and socklen_param_type for socklen_t.=20 (Antonin D=C3=A9cimo, review by Nicol=C3=A1s Ojeda B=C3=A4r, David Allsopp = and Samuel Hym)=20 - [#14391](https://github.com/ocaml/ocaml/issues/14391): unload native dynl= inked objects when an error occurs and it is safe to=20 do so. (Fixes [#14323](https://github.com/ocaml/ocaml/issues/14323))=20 (Nicol=C3=A1s Ojeda B=C3=A4r, review by Vincent Laviron)=20 ### Code generation and optimizations:=20 - [#14583](https://github.com/ocaml/ocaml/issues/14583): fix bug in linear = scan spilling heuristic that in certain situations=20 could lead to miscompilations.=20 (Nicol=C3=A1s Ojeda B=C3=A4r, review by Vincent Laviron)=20 ### Manual and documentation:=20 - [#14684](https://github.com/ocaml/ocaml/issues/14684), [#14782](https://g= ithub.com/ocaml/ocaml/issues/14782), [#14838](https://github.com/ocaml/ocam= l/issues/14838): Improve ocamlc's and ocamlopt's manual pages and fix=20 small issues in the manual=20 (Samuel Hym, review by Florian Angeletti, Antonin D=C3=A9cimo, Gabriel Sche= rer and=20 Nicol=C3=A1s Ojeda B=C3=A4r)=20 - [#14397](https://github.com/ocaml/ocaml/issues/14397): Improve documentat= ion of type-directed disambiguation of array=20 literals=20 (Alicia Michael, review by Olivier Nicole and Florian Angeletti)=20 - [#14293](https://github.com/ocaml/ocaml/issues/14293): Improve documentat= ion of Runtime_events.Timestamp=20 (Rapha=C3=ABl Proust, review by Gabriel Scherer)=20 - [#13747](https://github.com/ocaml/ocaml/issues/13747): Document support f= or native debugging with GDB and LLDB.=20 (Tim McGilchrist, review by Daniel B=C3=BCnzli, Samuel Hym, Olivier Nicole= =20 and Antonin D=C3=A9cimo)=20 * (*breaking change*) [#13975](https://github.com/ocaml/ocaml/issues/13975)= : documented the `[@remove_aliases]` built-in attribute for signatures=20 (introduced by [#1652](https://github.com/ocaml/ocaml/issues/1652) in 2018)= . Small refactor of the code that fetches the=20 attribute.=20 (Clement Blaudeau, review by Gabriel Scherer)=20 - [#14002](https://github.com/ocaml/ocaml/issues/14002): Add anchors to ite= ms and headings of the web version of the API=20 documentation for easier linking.=20 (Nicol=C3=A1s Ojeda B=C3=A4r, report by Louis Roch=C3=A9, review by Gabriel= Scherer and=20 Florian Angeletti)=20 - [#14023](https://github.com/ocaml/ocaml/issues/14023): Add documentation = for the [row_more] function.=20 (Richard Eisenberg, review by Jacques Garrigue)=20 - [#14038](https://github.com/ocaml/ocaml/issues/14038): Fall back immediat= ely to user-agent-defined fonts when web fonts=20 fail to load.=20 (toastal)=20 - [#14048](https://github.com/ocaml/ocaml/issues/14048): document modular e= xplicits=20 (Gabriel Scherer, review by Samuel Vivien, Ali Caglayan,=20 Didier Remy and Fran=C3=A7ois Pottier)=20 - [#13994](https://github.com/ocaml/ocaml/issues/13994): document external = types=20 (Gabriel Scherer, review by Jan Midtgaard, Jacques Garrigue=20 and Florian Angeletti)=20 - [#14077](https://github.com/ocaml/ocaml/issues/14077): Add missing `item-= attribute` rule for `let-binding`s in documentation=20 for attributes.=20 (Shon Feder)=20 - [#14228](https://github.com/ocaml/ocaml/issues/14228): Trim leading space= s from first lines of LaTeX `ocamldoccode`=20 environments.=20 (Yukai Chou, review by Nicol=C3=A1s Ojeda B=C3=A4r)=20 - [#14248](https://github.com/ocaml/ocaml/issues/14248): Added documentatio= n about the way `Domain.join` triggers a=20 `Thread.join` on the domain's systhreads.=20 (Rapha=C3=ABl Proust, review by Gabriel Scherer)=20 - [#14392](https://github.com/ocaml/ocaml/issues/14392): Fix AsciiDoc files= , add more markup, xrefs, documentation.=20 (Antonin D=C3=A9cimo, review by Gabriel Scherer and David Allsopp)=20 - [#13590](https://github.com/ocaml/ocaml/issues/13590): Document automatic= command-line expansion of `*` and `?` wildcards by=20 the runtime under Windows.=20 (Benjamin Sigonneau, review by Nicol=C3=A1s Ojeda B=C3=A4r)=20 ### Internal/compiler-libs changes:=20 - [#13913](https://github.com/ocaml/ocaml/issues/13913): Use Blake128 as th= e hash function for the compiler's CRCs=20 (Vincent Laviron, review by Xavier Leroy and Gabriel Scherer)=20 - [#13911](https://github.com/ocaml/ocaml/issues/13911), [#14117](https://g= ithub.com/ocaml/ocaml/issues/14117), [#14127](https://github.com/ocaml/ocam= l/issues/14127): Refactor the merging of signature constraints, by=20 splitting the monolithic merge function into separate, specialized function= s=20 (for merging types, modules and module types) - sharing only the recursive= =20 part for handling deep constraints.=20 (Clement Blaudeau, review by Florian Angeletti and Samuel Vivien, fix by Ry= an=20 Tjoa)=20 - [#14120](https://github.com/ocaml/ocaml/issues/14120), [#14474](https://g= ithub.com/ocaml/ocaml/issues/14474), [#14476](https://github.com/ocaml/ocam= l/issues/14476): Associate Uids to items that don't have a concrete=20 definition; improves Merlin's renaming for functors.=20 (Ulysse G=C3=A9rard, review by Florian Angeletti and Gabriel Scherer)=20 - [#13839](https://github.com/ocaml/ocaml/issues/13839), [#14008](https://g= ithub.com/ocaml/ocaml/issues/14008): Reimplement `let open`, `let module` a= nd `let exception` in=20 terms of a single construct.=20 (Nicol=C3=A1s Ojeda B=C3=A4r, review by Gabriel Scherer, Samuel Vivien, Uly= sse G=C3=A9rard=20 and Vincent Laviron, temporary regression reported by Antonio Monteiro)=20 - [#13980](https://github.com/ocaml/ocaml/issues/13980) Refactor `type-appr= ox` and improve some errors' locations.=20 (Leo White, Ulysse G=C3=A9rard, review by Samuel Vivien and Florian Angelet= ti)=20 - [#14024](https://github.com/ocaml/ocaml/issues/14024): Fix unterminated-s= tring-initialization warnings from the C compiler.=20 (Antonin D=C3=A9cimo, review by David Allsopp and Miod Vallat)=20 - [#14094](https://github.com/ocaml/ocaml/issues/14094): toplevel, simplify= check on installed printer types=20 (Florian Angeletti, review by Gabriel Scherer)=20 - [#13656](https://github.com/ocaml/ocaml/issues/13656), [#14114](https://g= ithub.com/ocaml/ocaml/issues/14114), [#14308](https://github.com/ocaml/ocam= l/issues/14308): Use C99 stdint.h/inttypes.h fixed-width=20 integer types and macros to define OCaml integers.=20 (Antonin D=C3=A9cimo, review by Nick Barnes and David Allsopp)=20 - [#14148](https://github.com/ocaml/ocaml/issues/14148): Remove an unused f= ield from package_type in typedtree=20 (Samuel Vivien, review by Gabriel Scherer)=20 - [#14141](https://github.com/ocaml/ocaml/issues/14141): Rename cstrs to co= nstraints when it refers to constraints to avoid=20 confusing it with constructors.=20 (Stefan Muenzel, review by Nicol=C3=A1s Ojeda B=C3=A4r)=20 - [#14149](https://github.com/ocaml/ocaml/issues/14149): Distinguish `(modu= le M : S)` from `(module M) : (module S)` in=20 patterns.=20 (Samuel Vivien, review by Gabriel Scherer)=20 - [#14161](https://github.com/ocaml/ocaml/issues/14161): refactor the STW-p= articipants machinery to add an intermediate=20 category of 'parked' domain structures.=20 (Gabriel Scherer, review by Sivaramakrishnan)=20 - [#14198](https://github.com/ocaml/ocaml/issues/14198) Constraints on modu= le unpacking are not ghost=20 (Thomas Refis, review by Nicol=C3=A1s Ojeda B=C3=A4r)=20 - [#14243](https://github.com/ocaml/ocaml/issues/14243): ocamlc now uses th= e same code as the runtime to parse ld.conf (via a=20 C primitive), eliminating some highly obscure corner cases.=20 (David Allsopp, review by Jonah Beckford, Damien Doligez and Hugo Heuzard)= =20 - [#14260](https://github.com/ocaml/ocaml/issues/14260): Refactor Lambda.st= ructured_constant to avoid duplicate=20 representations for string constants=20 (Vincent Laviron, review by Nicol=C3=A1s Ojeda B=C3=A4r and Gabriel Scherer= )=20 - [#14297](https://github.com/ocaml/ocaml/issues/14297), [#14299](https://g= ithub.com/ocaml/ocaml/issues/14299): Avoid iterating on hash tables to prod= uce types or terms=20 (Vincent Laviron, review by Nicol=C3=A1s Ojeda B=C3=A4r and Gabriel Scherer= )=20 * (*breaking change*) [#14322](https://github.com/ocaml/ocaml/issues/14322)= : Remove leftover hacks for handling pattern constraints=20 As a side effect, `let rec (_ as x) =3D ...` is now always rejected instead= of=20 being treated as equivalent to `let rec x =3D ...`=20 (Vincent Laviron, review by Alistair O'Brien and Florian Angeletti)=20 - [#14331](https://github.com/ocaml/ocaml/issues/14331): Enforce current_le= vel <=3D generic_level, and explain create_scope=20 (Jacques Garrigue and Takafumi Saikawa, review by Gabriel Scherer)=20 * (*breaking change*) [#14388](https://github.com/ocaml/ocaml/issues/14388)= : Remove support for `let rec (module M : S) =3D e1 in e2`.=20 (Alistair O'Brien, review by Vincent Laviron and Gabriel Scherer)=20 - [#14422](https://github.com/ocaml/ocaml/issues/14422): Refactoring an `if= match e with p1 -> true | p2 -> false then ...`=20 into a match in typetexp.=20 (Samuel Vivien, review by Gabriel Scherer)=20 - [#13224](https://github.com/ocaml/ocaml/issues/13224): Clarify barriers a= nd spin macros with delayed expansion.=20 (Antonin D=C3=A9cimo, review by David Allsopp and Gabriel Scherer)=20 - [#14435](https://github.com/ocaml/ocaml/issues/14435), [#14455](https://g= ithub.com/ocaml/ocaml/issues/14455), [#14550](https://github.com/ocaml/ocam= l/issues/14550): Add the not-root builtin ocamltest action. This=20 allows to skip tests that fail if the current user is root (superuser).=20 (Kate Deplaix, review by Gabriel Scherer, Nicol=C3=A1s Ojeda B=C3=A4r, and= =20 Antonin D=C3=A9cimo)=20 - [#14457](https://github.com/ocaml/ocaml/issues/14457): Handle qualified `= M.{ x }` patterns in untypeast=20 (Basile Cl=C3=A9ment, review by Florian Angeletti)=20 ### Build system:=20 - [#13705](https://github.com/ocaml/ocaml/issues/13705), [#14444](https://g= ithub.com/ocaml/ocaml/issues/14444): Cache test results of custom Autoconf = tests from aclocal.m4.=20 (Antonin D=C3=A9cimo, review by David Allsopp and Miod Vallat)=20 - [#13810](https://github.com/ocaml/ocaml/issues/13810): Support build of c= ross compilers to native freestanding targets=20 (Samuel Hym, review by Antonin D=C3=A9cimo and Romain Calascibetta)=20 - [#14243](https://github.com/ocaml/ocaml/issues/14243): New configure opti= on --with-additional-stublibsdir allows an=20 additional directory to be added to the start of ld.conf. Additionally, the= =20 stublibs subdirectory is no longer created, nor added to ld.conf, when=20 building OCaml with --disable-shared.=20 (David Allsopp, review by Jonah Beckford, Damien Doligez and Hugo Heuzard)= =20 - [#14244](https://github.com/ocaml/ocaml/issues/14244): When targeting nat= ive Windows on Cygwin or MSYS2, preserve=20 backslashes in the supplied `--prefix` (in particular, backslashes instead = of=20 slashes will then be displayed by `ocamlopt -config-var standard_library`).= =20 If the supplied prefix contains a slash, then it is normalised, as=20 previously.=20 (David Allsopp, review by Jonah Beckford, Antonin D=C3=A9cimo, Damien Dolig= ez and=20 Samuel Hym)=20 - [#14245](https://github.com/ocaml/ocaml/issues/14245): New --enable-runti= me-search configure option controls the=20 -runtime-search option used to build the bytecode binaries in the compiler= =20 distribution. --enable-runtime-search-target controls the default value of= =20 -runtime-search used for bytecode executables produced by the compiler.=20 (David Allsopp, review by Damien Doligez and Samuel Hym)=20 - [#14484](https://github.com/ocaml/ocaml/issues/14484): Set `_WIN32_WINNT`= to require Windows 8/Server 2012 Windows header SDK=20 support.=20 (Antonin D=C3=A9cimo, review by David Allsopp)=20 ### Bug fixes:=20 - [#14123](https://github.com/ocaml/ocaml/issues/14123): Fix integer-overfl= ow problems in heap compaction.=20 (Nick Barnes, review by Antonin D=C3=A9cimo).=20 - [#14035](https://github.com/ocaml/ocaml/issues/14035): Fix the alignment = of _Atomic long long unsigned int fields=20 before GCC 11.1 on i686. Silence GCC note on newer versions.=20 (Antonin D=C3=A9cimo, review by Sadiq Jaffer)=20 - [#14010](https://github.com/ocaml/ocaml/issues/14010): Fix miscompilation= / liveness errors for string operations=20 (Mark Shinwell, Xavier Clerc, review by Xavier Leroy and Gabriel Scherer)= =20 - [#14036](https://github.com/ocaml/ocaml/issues/14036): Fix nontermination= of cycle printing in recursive modules with=20 `-short-paths`. Add error message for types considered abstract while=20 checking recursive modules.=20 (Brandon Stride, review by Florian Angeletti)=20 - [#14065](https://github.com/ocaml/ocaml/issues/14065): Fix function signa= ture mismatch of `__tsan_func_exit` with GCC 15.=20 Check in the configure step if the TSan provided internal builtins are the= =20 same as what we expect, introduce `caml_tsan_*` wrappers for the `__tsan_*`= =20 functions we use.=20 (Hari Hara Naveen S, report by Hari Hara Naveen S,=20 review by Gabriel Scherer, Antonin D=C3=A9cimo, Olivier Nicole)=20 - [#14071](https://github.com/ocaml/ocaml/issues/14071): Fix exception name= in Dynlink.Error printer.=20 (Etienne Millon, review by Nicol=C3=A1s Ojeda B=C3=A4r)=20 - [#13853](https://github.com/ocaml/ocaml/issues/13853): Format breaks some= line too early when there=20 is a break hint at the end.=20 (Florian Angeletti, review by Gabriel Scherer)=20 - [#10570](https://github.com/ocaml/ocaml/issues/10570): Fix handling of ca= ml_sys_argv when exposed directly as an=20 external=20 (Keryan Didier, review by Vincent Laviron and Gabriel Scherer)=20 - [#14155](https://github.com/ocaml/ocaml/issues/14155): Audit unexecuted p= hrases in compiler expect tests and=20 fix all occurrences=20 (Stefan Muenzel, review by Gabriel Scherer)=20 - [#14163](https://github.com/ocaml/ocaml/issues/14163), [#14176](https://g= ithub.com/ocaml/ocaml/issues/14176): add a filename location to the depreca= tion alert for implicit=20 uses of libraries bundled with the compiler (unix,re,threads,dynlink)=20 (Florian Angeletti, report by Ali Caglayan, review by Gabriel Scherer)=20 - [#14210](https://github.com/ocaml/ocaml/issues/14210): fix TSan-reported = data race in weak pointers runtime=20 (Gabriel Scherer and Damien Doligez, report by Olivier Nicole,=20 review by KC Sivaramakrishnan)=20 - [#14213](https://github.com/ocaml/ocaml/issues/14213): Fix shadow-stack-r= elated crashes with TSan=20 (Olivier Nicole, report by Nathan Taylor, review by Gabriel Scherer and=20 Stefan Muenzel)=20 - [#13658](https://github.com/ocaml/ocaml/issues/13658), [#14181](https://g= ithub.com/ocaml/ocaml/issues/14181): Fix handling of recursive function typ= es that can result=20 in an unbounded number of labeled or optional arguments.=20 (Stefan Muenzel, report by Samuel Vivien, review by Florian Angeletti)=20 - [#14255](https://github.com/ocaml/ocaml/issues/14255): Fix TSan bug with = C calls that take many arguments=20 (Olivier Nicole and Miod Vallat, report by Nathan Taylor, review by Gabriel= =20 Scherer)=20 - [#14230](https://github.com/ocaml/ocaml/issues/14230) : ocamltest fails t= o link test program with -custom in some cases=20 (Damien Doligez, review by David Allsopp)=20 - [#14279](https://github.com/ocaml/ocaml/issues/14279): -dsource, preserve= (mod) and other escaped infix keyword operators in=20 the printed source wherever possible.=20 (Florian Angeletti, review by Gabriel Scherer)=20 - [#14300](https://github.com/ocaml/ocaml/issues/14300), [#14304](https://g= ithub.com/ocaml/ocaml/issues/14304): fix a race between memprof and the min= or GC, detected by TSan=20 (Gabriel Scherer, review by Stephen Dolan and Nick Barnes,=20 report by Olivier Nicole)=20 - [#14332](https://github.com/ocaml/ocaml/issues/14332): Fix missing TSan i= nstrumentation in subexpressions=20 (Vincent Laviron, review by Gabriel Scherer and Olivier Nicole)=20 - [#14370](https://github.com/ocaml/ocaml/issues/14370), [#14429](https://g= ithub.com/ocaml/ocaml/issues/14429): Fix headers for C++ inclusion.=20 (Antonin D=C3=A9cimo, review by Gabriel Scherer)=20 - [#14417](https://github.com/ocaml/ocaml/issues/14417): Fix issue with nes= ted packs on macOS.=20 (Vincent Laviron, report by Kate Deplaix, review by Gabriel Scherer)=20 - [#14423](https://github.com/ocaml/ocaml/issues/14423): Fix detection of S= etThreadDescription on 32-bit builds, meaning that=20 Thread.set_current_thread_name now works on 32-bit MSVC and uses the correc= t=20 mechanism on 32-bit mingw-w64.=20 (David Allsopp, review by Antonin D=C3=A9cimo)=20 - [#14431](https://github.com/ocaml/ocaml/issues/14431): Enable native back= end for DragonFly BSD. This builds ocamlopt on=20 DragonFly.=20 (Michael Neumann, review by Gabriel Scherer and Kate Deplaix)=20 - [#14495](https://github.com/ocaml/ocaml/issues/14495): Fix infix-tag bug = in the minor collector which could cause SEGVs=20 in multi-domain programs.=20 (Nick Barnes, review by Gabriel Scherer)=20 - [#14519](https://github.com/ocaml/ocaml/issues/14519): Fix segfault when = using `Runtime_events` under certain=20 circumstances due to bad error checking when calling `mmap()`.=20 (Mark Elvers, review by Nicol=C3=A1s Ojeda B=C3=A4r)=20 - private, CVE-2026-28364, OSEC-2026-01: robustify intern.c=20 (Xavier Leroy and Nicol=C3=A1s Ojeda B=C3=A4r, review by Olivier Nicole, Mi= ndy Preston,=20 Edwin T=C3=B6r=C3=B6k, and Gabriel Scherer)=20 - [#13693](https://github.com/ocaml/ocaml/issues/13693), [#14514](https://g= ithub.com/ocaml/ocaml/issues/14514): s390x: fix heap corruption with libasm= run_shared.so caused=20 by PLT lazy binding trampoline saving FPRs into OCaml's fiber stack.=20 Replace @PLT calls with GOT-indirect calls in the s390x code emitter.=20 (Zane Hambly, review by David Allsopp and Xavier Leroy)=20 - [#14557](https://github.com/ocaml/ocaml/issues/14557), [#12150](https://g= ithub.com/ocaml/ocaml/issues/12150), [#14696](https://github.com/ocaml/ocam= l/issues/14696): ensure that the self type of class cannot escape=20 through type constraints.=20 (Leo White, review by Florian Angeletti)=20 - [#14603](https://github.com/ocaml/ocaml/issues/14603), [#14604](https://g= ithub.com/ocaml/ocaml/issues/14604): avoid Ctype.apply failures when mixing= =20 polymorphic types and unboxed constructors.=20 (Gabriel Scherer and Stefan Muenzel, report by Brandon Stride,=20 review by Florian Angeletti)=20 - [#14626](https://github.com/ocaml/ocaml/issues/14626), [#14675](https://g= ithub.com/ocaml/ocaml/issues/14675): take in account module-dependent funct= ions when=20 determining if an optional argument is non-erasable.=20 (Alistair O'Brien and Florian Angeletti, review by Gabriel Scherer)=20 - [#14635](https://github.com/ocaml/ocaml/issues/14635): Fix a bug in `caml= _floatarray_gather` that would cause=20 the result of `Float.Array.sub`, `Float.Array.append`, `Float.Array.concat`= =20 (when empty) not to be equal to `[||]`.=20 (Marc Lasson, review by Gabriel Scherer)=20 - [#14644](https://github.com/ocaml/ocaml/issues/14644), [#14647](https://g= ithub.com/ocaml/ocaml/issues/14647): Fix a bug related to unhandled effects= in bytecode.=20 (Vincent Laviron, report by Thibaut Mattio,=20 review by Nicol=C3=A1s Ojeda B=C3=A4r, Stephen Dolan and Olivier Nicole)=20 - [#14655](https://github.com/ocaml/ocaml/issues/14655), [#14691](https://g= ithub.com/ocaml/ocaml/issues/14691): check for size overflow in caml_ba_res= hape=20 (Stephen Dolan, review by Xavier Leroy)=20 - [#14667](https://github.com/ocaml/ocaml/issues/14667): enable application= related warnings for module-dependent functions=20 (Florian Angeletti, review by Gabriel Scherer)=20 - [#14690](https://github.com/ocaml/ocaml/issues/14690): Fix `Name_type_mis= match` error message when the expected type is an=20 alias: print the expanded path on the right-hand side of the equality, not= =20 the alias twice.=20 (Weixie Cui, review by Florian Angeletti)=20 - [#14349](https://github.com/ocaml/ocaml/issues/14349), [#14718](https://g= ithub.com/ocaml/ocaml/issues/14718), [#14722](https://github.com/ocaml/ocam= l/issues/14722): runtime, fix in the orphaning of ephemerons=20 (Gabriel Scherer, review by Olivier Nicole and Damien Doligez,=20 report by Jan Midtgaard)=20 - [#14702](https://github.com/ocaml/ocaml/issues/14702): Fix hidden directo= ry files leaking into the visible load path table.=20 When a hidden directory contained a file whose basename was already present= ,=20 the file could be incorrectly added to the visible table.=20 (Hugo Heuzard, review by Florian Angeletti)=20 - [#14719](https://github.com/ocaml/ocaml/issues/14719), [#14721](https://g= ithub.com/ocaml/ocaml/issues/14721): compute arity correctly for module-dep= endent function=20 (Florian Angeletti, report by Jeremy Yallop, review by Stefan Muenzel)=20 - [#14760](https://github.com/ocaml/ocaml/issues/14760), [#14802](https://g= ithub.com/ocaml/ocaml/issues/14802), [#14846](https://github.com/ocaml/ocam= l/issues/14846): Correct the detection of argument defaults in=20 configure, fixing an incorrect error message when installing OCaml through= =20 opam on OpenSUSE with the site-config package installed.=20 (David Allsopp, report and review by Edwin T=C3=B6r=C3=B6k)=20 - [#14797](https://github.com/ocaml/ocaml/issues/14797): avoid dropping att= ributes attached to package types when pretty=20 printing in surface syntax.=20 (Chet Murthy, review by Nicol=C3=A1s Ojeda B=C3=A4r)=20 - [#14853](https://github.com/ocaml/ocaml/issues/14853), CVE-2026-41083, OS= EC-2026-05: fix quoting of filenames=20 passed to Filename.quote_command on Windows.=20 (David Allsopp, report by Andrew Nesbitt, review by Florian Angeletti)=20 --=_d8422e55-5759-4e6e-b61f-b99e9da155d1 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Dear OCaml users,

We have the pleasu= re of celebrating the birthday of Blaise Pascal by announcing the release o= f OCaml version 5.5.0.

Some of the highlights in OCaml 5.5.0 are:
### Module-dependent Functions

Modules can now be used as funct= ion arguments in a form of lightweight functors.

For instance, we ca= n define a function for printing a map generated by
the `Map.Make` funct= or:

    let pp_map (module M: Map.S) pp_key pp_v ppf set = =3D
      if M.is_empty set then
      =   Format.fprintf ppf "=C3=B8"
      else
  &= nbsp;     let pp_sep ppf () =3D Format.fprintf ppf ",@ " in
&n= bsp;       let pp_binding ppf (k,v) =3D
    &nb= sp;   Format.fprintf ppf "@[%a@ =3D@ %a@]" pp_key k pp_v v
  &= nbsp;   in
      Format.fprintf ppf "@[{@ %a@ }@]"     (Format.pp_print_seq ~pp_sep pp_binding) (M.to_seq se= t)


We can then apply this function on a string map

 =   module String_map =3D Map.Make(String)

with

  &n= bsp; let () =3D
      let m =3D String_map.of_list ["Zero= ", "Zero"; "One", "Un"] in
      let pp_str =3D Format.pp= _print_string in
      Format.printf "%a@."
  &nb= sp;   (pp_map (module String_map) pp_str pp_str) m

Compared to = first-class modules, the type of the function `pp_map`

   = type 'a printer =3D Format.formatter -> 'a -> unit
    = val pp_map: (module M: Map.S) -> M.key printer -> 'a printer -> 'a= M.t printer

is dependent over the value of the module `S`, and thus= the function can only
applied over a statically known module:

&n= bsp;   let f (): (module Map.S) =3D
      if Random.= bool () then
        (module Map.Make(Int))
 = ;     else
        (module Map.Make(Float)= )
    let fail =3D pp_map (f ())

     Er= ror: This expression has type
            = (module M : Map.S) ->
            (Form= at.formatter -> M.key -> unit) ->
        &= nbsp;  (Format.formatter -> 'a -> unit) -> Format.formatter -= > 'a M.t -> unit
         but an expressi= on was expected of type (module Map.S) -> 'b
      &nb= sp;  The module M would escape its scope
    This functio= n is module-dependent. The dependency is preserved
    when th= e function is passed a static module argument (module M : S)
  &nbs= p; or (module M). Its argument here is not static, so the type-checker
&= nbsp;   tried instead to change the function type to be non-dependent.=


### Relocatable Compiler

A compiler installation can now= be moved or copied with no risk
of hard-to-debug errors due to mixing i= ncompatible bytecode runtime interpreters.

In practice, this means t= hat creating a local switch when there is a
global switch with the same = compiler version and configuration
available can be done by cloning the = global switch rather than
recompiling the whole compiler.

This sh= ould considerably reduce the time required to create
new local opam swit= ches out-of-the-box.

### Polymorphic Functions as Function Arguments=

Higher-rank polymorphic functions can now be defined directly byusing an explicit type annotation in a function argument

  &nb= sp; let apply_map (map: 'a 'b. ('a -> 'b) -> 'a list -> 'b list) = =3D
      map string_of_int [1;2;3], map List.singleton [= "x"; "y"]
    let _ =3D apply_map List.map

Previously d= efining such a function required going through either a record or an object=
with a polymorphic field or methods

    type map =3D {= map: 'a 'b. ('a -> 'b) -> 'a list -> 'b list }
    l= et apply_map {map} =3D
      map string_of_int [1;2;3], m= ap List.singleton ["x"; "y"]

### Search and Replace Substring Functi= ons

The `String` module has been extended with many functions
for= searching and replacing substrings inside a string.

    l= et _true =3D String.includes ~affix:"aba" "abbaba"
    let sen= tence =3D String.replace_all ~sub:"=F0=9D=84=BD" ~by:"word" "A =F0=9D=84=BD= is re=F0=9D=84=BDed"

The substring search is using the 2-way string= matching algorithm
which has the advantage of requiring constant space = memory overhead
independently of the needle size.

### Generalised= Local Definitions

It is now always possible to define locally a typ= e,
a class, a module type or any kind of item that can be defined
glo= bally:

    let mandelbrot n x =3D
      = let type t =3D Converge | Escape of int in
      ...
&= nbsp;     match orbit n x with
     | Converge = -> 0
     | Exit_at n -> colorize n

### Exte= rnal Types

When interfacing with foreign function libraries, it is n= ow possible
to define external type

    type int_gmp = =3D external "mpz_t"
    type float_gmp =3D external "mpf_t"
Compared to an abstract type definition, the external type name
"m= pz_t" (resp. `mpf_t`) makes the type distinguishable from any
non-abstra= ct types or external types with a different name.

In particular, thi= s makes FFI types better behaved when combined with
Generalised Abstract= Data Types (GADTs). For instance, The typechecker
is able to prove that=

     let ok: (int_gmp,[` A] ) Type.eq -> _ =3D fu= nction _ -> .

is a total function because the external type `int_= gmp` is not compatible
with a polymorphic variant type.

### Warni= ng: Abstract types in the current module

The astute reader has proba= bly noticed in the definition above that,
in OCaml 5.4.0, the typechecke= r does accept

     type int_gmp
    let = ok: (int_gmp, [` A] ) Type.eq -> _ =3D function _ -> .

as tota= l.

Indeed until OCaml 5.5.0, abstract types defined in the current m= odule

    type a
    type b

were consi= dered as unique and provably different

     let f: 'x= . (a,b) Type.eq -> 'x =3D function _ -> .

However, this specia= l rule for local definition of abstract types was
very brittle. As soon = as one moved outside of the current module, it
was no longer possible to= prove that the types were different.

     module M = =3D struct
       type a
      &nb= sp;type b
     end
    let fail: 'x. (M.a,M.= b) Type.eq -> 'x =3D function _ -> .

     Error= : This match case could not be refuted.
        &nbs= p;     Here is an example of a value that would reach it: Equal
This special typechecking rule has been removed in OCaml 5.5.0. If yo= u were relying on it,
for instance, because you used an abstract type as= type-level label in a GADTs, you
can change your abstract type definiti= on to a possibly private abbreviation of a polymorphic variant

 = ;    type a =3D private [`A]
     type b =3D [`= B]

or a (possibly private) sum type

     type = a =3D A
     type b =3D private B

If you were usin= g an abstract type as both a type-level label and a FFI type, you
can no= w use an external type definition which will give you a provably distinct t= ype
even outside of the current module.

### GC improvements
Some of the ongoing work to improve the pacing of the garbage
collecto= r has been integrated in OCaml 5.5.0, two of the important
changes in OC= aml 5.5 GC are

- the addition of a sweep-only phase at the start of = major GC
- the addition of an idle phase to smooth the behaviour of the = GC
  at the start.

### Many incremental changes

- The= Windows implementation is no more reliant on Winpthreads
- Around 60 ne= w standard library functions
- Around 90 various improvements
- A doz= en of documentation updates
- Around 40 bug fixes

Please report a= ny unexpected behaviours on the [OCaml issue
tracker](https://github.com= /ocaml/ocaml/issues) and post any questions or
comments you might have o= n our discussion forums at

-= https://discuss.ocaml.org
The full list of changes can be found in the full changelog.

Happy = hacking,
Florian Angeletti for the OCaml team.


Installation I= nstructions
-------------------------------

The= base compiler can be installed as an opam switch with the following comman= ds:

     opam update
     opam swit= ch create 5.5.0

The source code for the release is also directly ava= ilable on:

- GitHub: https://github.com/ocaml/ocaml/releases/downloa= d/5.5.0/ocaml-5.5.0.tar.gz
- OCaml archives at Inria: https://caml.inria= .fr/pub/distrib/ocaml-5.5/ocaml-5.5.0.tar.gz

### Fine-Tuned Compiler= Configuration

If you want to tweak the configuration of the compile= r, you can switch to the option variant with:

    opam upd= ate
    opam switch create <switch_name> ocaml-variants.= 5.5.0+options <option_list>

where `<option_list>` is a s= pace separated list of `ocaml-option-*` packages. For instance, for a `flam= bda` and `no-flat-float-array` switch:

    opam switch cre= ate 5.5.0+flambda+nffa ocaml-variants.5.5.0+options ocaml-option-flambda oc= aml-option-no-flat-float-array


Changes in OCaml 5.5.0
<= div>---------------------------------
  
### Languag= e features:

* (*breaking change*) [#13681](https://github.com/ocaml/= ocaml/issues/13681), [#13682](https://github.com/ocaml/ocaml/issues/13682),= [#13683](https://github.com/ocaml/ocaml/issues/13683), [#13684](https://gi= thub.com/ocaml/ocaml/issues/13684), [#13275](https://github.com/ocaml/ocaml= /issues/13275) :
  Introduce a new type `(module M : S) -> t[M]`= that corresponds to
  module-dependent functions (also called: mod= ular explicits).
    val mapM: (module M : Monad) (f : 'a ->= ; 'b M.t) : 'a list -> 'b list M.t
  (Samuel Vivien review by Le= o White, Gabriel Scherer, Florian Angeletti,
    Jacques Garri= gue and Stephen Dolan)

- [#14040](https://github.com/ocaml/ocaml/iss= ues/14040): generalize the constructs `let module`, `let exception` and `le= t open`
  to most other structure items, for example:
  &nb= sp; let type t =3D ... in ...
    let type Effect.t +=3D Yield= in ...
  (Nicol=C3=A1s Ojeda B=C3=A4r, review by Valentin Gatien-B= aron)

- [#13806](https://github.com/ocaml/ocaml/issues/13806): Enabl= e the use of function parameters with polymorphic types.
    l= et extract (getter : 'a . 'a t -> 'a) =3D ...
    let runST= (m : 's . ('s, 'a) ST.t) : 'a =3D ...
  (Ulysse G=C3=A9rard, Leo W= hite, review by Florian Angeletti, Samuel Vivien, Gabriel
  Scherer= and Jacques Garrigue)


* (*breaking change*) [#13712](https://gi= thub.com/ocaml/ocaml/issues/13712): Introduce a new kind `Type_external` an= d syntax
  `type t =3D external "name"` to discriminate external ty= pes from other types
  and each other.  This PR turns primitiv= e types into external and removes the
  past behavior of discrimina= ting abstract types defined in the current module.
  (Takafumi Saik= awa, Jacques Garrigue, review by Richard Eisenberg)

* (*breaking cha= nge*) [#14009](https://github.com/ocaml/ocaml/issues/14009): infix extensio= n points/attributes appearing in local structure items,
  eg `let m= odule%foo[@bar] ... in ...` are attached to the AST node of the
  c= orresponding structure item (similar to their global counterparts) and no  longer to the enclosing `let` expression.  Extension points/a= ttributes that
  are to be attached to the enclosing `let` expressi= on are to be written next to
  the `let` keyword, eg `let%foo[@bar]= module ... in ...`. The same holds for
  `let exception` and `let = open`.
  (Nicol=C3=A1s Ojeda B=C3=A4r, review by Gabriel Scherer)
- [#14029](https://github.com/ocaml/ocaml/issues/14029): Recognize `%= identity` as nonexpansive
  (Stephen Dolan and Olivier Nicole, revi= ew by Hugo Heuzard, Jacques Garrigue,
  Jeremy Yallop,  and Ga= briel Scherer)

### Standard library:

- [#13372](https://githu= b.com/ocaml/ocaml/issues/13372): New Format and Printf printf-like function= s that accept a
   heterogeneous list as arguments.
  =   Format.lprintf "@[%s@ %d@]@." [ "x =3D"; 1 ]
  (Leonardo San= tos, review by Florian Angeletti and Gabriel Scherer)

- [#14437](htt= ps://github.com/ocaml/ocaml/issues/14437): Add String.split_{first,last,all= } and String.rsplit_all
    split_first: sep:string -> stri= ng -> (string * string) option
    split_all: sep:string -&= gt; drop:(string -> bool) -> string -> string list
  (Dani= el B=C3=BCnzli, review by Nicol=C3=A1s Ojeda B=C3=A4r and Florian Angeletti= )

- [#14436](https://github.com/ocaml/ocaml/issues/14436): Add Strin= g.replace_{first,last,all}
    replace_first: sub:string ->= by:string -> ?start:int -> string -> string
  (Daniel B= =C3=BCnzli, review by Nicol=C3=A1s Ojeda B=C3=A4r, Ali Caglayan and
&nbs= p;  Florian Angeletti)

- [#14439](https://github.com/ocaml/ocam= l/issues/14439): Add String.includes, to complete the trio:
   = ; starts_with: prefix:string -> string -> bool
    ends_= with: suffix:string -> string -> bool
    includes: affi= x:string -> string -> bool
  (Daniel B=C3=BCnzli, review by N= icol=C3=A1s Ojeda B=C3=A4r and Olivier Nicole)

- [#14381](https://gi= thub.com/ocaml/ocaml/issues/14381): Add String.find_{first,last}_index, Str= ing.find_{first,last},
  String.[r]find_all.
    find_= first_index: (char -> bool) -> ?start:int -> string -> int opti= on
  (Daniel B=C3=BCnzli, review by Nicol=C3=A1s Ojeda B=C3=A4r, Al= i Caglayan and
   Florian Angeletti)

- [#14438](https:/= /github.com/ocaml/ocaml/issues/14438): Add String.is_empty
  (Danie= l B=C3=BCnzli, review by Nicol=C3=A1s Ojeda B=C3=A4r and Gabriel Scherer)
- [#14440](https://github.com/ocaml/ocaml/issues/14440): Add String.o= f_char
  (Daniel B=C3=BCnzli, review by Nicol=C3=A1s Ojeda B=C3=A4r= and Gabriel Scherer)

- [#14352](https://github.com/ocaml/ocaml/issu= es/14352): Add String.{drop,take,cut}_{first,last}.
    take_f= irst: int -> string -> string
    cut_first: int -> s= tring -> string * string
  (Daniel B=C3=BCnzli, review by David = Allsopp, Nicol=C3=A1s Ojeda B=C3=A4r and
  Vincent Laviron)

= - [#14362](https://github.com/ocaml/ocaml/issues/14362): Add String.{drop,t= ake,cut}_{first,last}_while
    drop_first_while: (char -> = bool) -> string -> string
  (Daniel B=C3=BCnzli, review by Ni= col=C3=A1s Ojeda B=C3=A4r and David Allsopp)

- [#13916](https://gith= ub.com/ocaml/ocaml/issues/13916): Add Option.product and Option.Syntax.
=   (Nicol=C3=A1s Ojeda B=C3=A4r, review by Daniel B=C3=BCnzli, Gabriel = Scherer and David
  Allsopp)

- [#13995](https://github.com/o= caml/ocaml/issues/13995): Option.blend: ('a -> 'a -> 'a) -> 'a opt= ion -> 'a option -> 'a option
  (Kate Deplaix, review by Dani= el B=C3=BCnzli, Gabriel Scherer,
   Nicol=C3=A1s Ojeda B=C3=A4= r, Florian Angeletti and Josh Berdine)

- [#13920](https://github.com= /ocaml/ocaml/issues/13920): add Option.{for_all, exists}
  (Gabriel= Scherer, review by Kate Deplaix, Nicol=C3=A1s Ojeda B=C3=A4r, Richard Eise= nberg
  and Jeremy Yallop)

- [#14185](https://github.com/oca= ml/ocaml/issues/14185): List.split_map: ('a -> 'b * 'c) -> 'a list -&= gt; 'b list * 'c list
  (Jeremy Yallop, review by Daniel B=C3=BCnzl= i, Nicol=C3=A1s Ojeda B=C3=A4r and Damien Doligez)

- [#14043](https:= //github.com/ocaml/ocaml/issues/14043), [#14393](https://github.com/ocaml/o= caml/issues/14393): Lazy.Mutexed: simple mutex-protected lazy thunks,
&n= bsp; that may block the entire domain/thread on initialization races.
&n= bsp; (Gabriel Scherer, suggestion by Kate Deplaix and Pierre Chambart,
&= nbsp; review by KC Sivaramakrishnan, Florian Angeletti, Kate Deplaix
&nb= sp; and Daniel B=C3=BCnzli)

- [#14118](https://github.com/ocaml/ocam= l/issues/14118): Add {Set,Map}.S.is_singleton
  (Kate Deplaix, revi= ew by Daniel B=C3=BCnzli, Vincent Laviron, Nicol=C3=A1s Ojeda B=C3=A4r
&= nbsp;  and Stephen Dolan)

- [#14060](https://github.com/ocaml/o= caml/issues/14060): Add Hashtbl.find_and_replace and Hashtbl.find_and_remov= e.
    find_and_replace: ('k, 'a) Hashtbl.t -> 'k -> 'a = -> 'a option
    find_and_remove: ('k, 'a) Hashtbl.t -> = 'k -> 'a option
  (Sacha-=C3=89lie Ayoun, review by Nicol=C3=A1s= Ojeda B=C3=A4r and Gabriel Scherer)

- [#14227](https://github.com/o= caml/ocaml/issues/14227): Add List.filter_mapi.
  (=C3=89mile Troti= gnon, review by Nicol=C3=A1s Ojeda B=C3=A4r, Jan Midtgaard and
  &n= bsp;Damien Doligez)

- [#14432](https://github.com/ocaml/ocaml/issues= /14432): Add floor division, ceil division, Euclidean division and remainde= r
  to the Int, Int32, Int64 and Nativeint modules: `fdiv`, `cdiv`,= `ediv`.
  (Xavier Leroy, review by Ali Caglayan, Nicol=C3=A1s Ojed= a B=C3=A4r, Gabriel Scherer)

- [#14433](https://github.com/ocaml/oca= ml/issues/14433): Add bit-counting functions `leading_zeros`, `leading_sign= _bits`,
  `trailing_zeros`, `bit_count`, `unsigned_bitsize`, `signe= d_bitsize`
  to Int, Int32, Int64, and Nativeint
  (Xavier = Leroy, review by Ali Caglayan and David Allsopp)


- [#10177](http= s://github.com/ocaml/ocaml/issues/10177): Seq.(delay : (unit -> 'a t) -&= gt; 'a t)
  (Gabriel Scherer, review by Jeremy Yallop and Fran=C3= =A7ois Pottier)

- [#13343](https://github.com/ocaml/ocaml/issues/133= 43): Add Array.stable_sort_sub
  (Fran=C3=A7ois Pottier, review by = Gabriel Scherer, Corentin Leruth and Nicol=C3=A1s
   Ojeda B= =C3=A4r)

- [#14363](https://github.com/ocaml/ocaml/issues/14363): Pr= eserve the backtrace at exceptional domain termination. Domain.join
&nbs= p; on an exceptionally terminated domain re-raises the exception with the  backtrace.
  (KC Sivaramakrishnan, report by Nathan Taylor= , review by Gabriel Scherer,
  David Allsopp)

- [#13728](htt= ps://github.com/ocaml/ocaml/issues/13728): Add Sys.runtime_executable conta= ining the full path (if available) to
  the currently executing run= time.
  (David Allsopp, review by Nicol=C3=A1s Ojeda B=C3=A4r and D= aniel B=C3=BCnzli)

- [#14086](https://github.com/ocaml/ocaml/issues/= 14086): Add Domain.count.
  (Nicol=C3=A1s Ojeda B=C3=A4r, review by= David Allsopp, Gabriel Scherer, Daniel B=C3=BCnzli
  and KC Sivara= makrishnan)

- [#12877](https://github.com/ocaml/ocaml/issues/12877):= Dynarray.rev_iter, Dynarray.rev_iteri
  (Gabriel Scherer, review b= y L=C3=A9o Andr=C3=A8s, Jeremy Yallop and Nicol=C3=A1s Ojeda B=C3=A4r)
<= br>- [#14084](https://github.com/ocaml/ocaml/issues/14084): Future-proof Dy= narray implementation against a smarter compiler
  (Basile Cl=C3=A9= ment, review by Gabriel Scherer)

### Tools:

- [#13728](https:= //github.com/ocaml/ocaml/issues/13728), [#14014](https://github.com/ocaml/o= caml/issues/14014), [#14243](https://github.com/ocaml/ocaml/issues/14243), = [#14244](https://github.com/ocaml/ocaml/issues/14244), [#14245](https://git= hub.com/ocaml/ocaml/issues/14245) : The compiler is now relocatable: it
=   can be copied/moved to a different directory and everything still  works.
  (David Allsopp, review by Nicol=C3=A1s Ojeda B=C3= =A4r, Jonah Beckford, Daniel B=C3=BCnzli,
   Antonin D=C3=A9ci= mo, Damien Doligez, Hugo Heuzard, Samuel Hym,
   and Vincent L= aviron)


- [#14055](https://github.com/ocaml/ocaml/issues/14055):= Invert BUILD_PATH_PREFIX_MAP in directories loaded at startup
  by= the debugger.
  (Pierre Boutillier, review by Gabriel Scherer and = Daniel B=C3=BCnzli)

* (*breaking change*) [#13638](https://github.co= m/ocaml/ocaml/issues/13638): ocamlmklib exits with code 4 if passed an unre= cognised option, as it
  does with an unrecognised file.
  = (David Allsopp, review by Antonin D=C3=A9cimo and S=C3=A9bastien Hinderer)<= br>
- [#13941](https://github.com/ocaml/ocaml/issues/13941), [#13961](ht= tps://github.com/ocaml/ocaml/issues/13961): Fix `ocamltest` variable handin= g.
  (Damien Doligez, report by Olivier Nicole, review by Gabriel S= cherer)

- [#13962](https://github.com/ocaml/ocaml/issues/13962): Lit= tle ocamltest refactors. Fix error handling in C code,
  leaking fi= le descriptors, code style.
  (Antonin D=C3=A9cimo, review by Gabri= el Scherer)

- [#14059](https://github.com/ocaml/ocaml/issues/14059):= Fix flaky TSan tests
  (Fabrice Buoro and Olivier Nicole, review b= y Gabriel Scherer)

- [#13966](https://github.com/ocaml/ocaml/issues/= 13966), [#13969](https://github.com/ocaml/ocaml/issues/13969): Enable "gene= ralized polymorphic #install_printer"
  in the debugger
  (= Pierre Boutillier and Gabriel Scherer, review by Florian Angeletti)

= - [#14063](https://github.com/ocaml/ocaml/issues/14063) : Debugger fallback= s to "looking for 'module_name'.ml in the
  loadpath" when seeking = source files. It improves hit rate for
  sources of installed packa= ges.
  (Pierre Boutillier, review by Gabriel Scherer)

- [#14= 032](https://github.com/ocaml/ocaml/issues/14032), [#14034](https://github.= com/ocaml/ocaml/issues/14034): Update to and require FlexDLL 0.44.
 = ; (Jan Midtgaard, Antonin D=C3=A9cimo, review by David Allsopp)

- [#= 14239](https://github.com/ocaml/ocaml/issues/14239): Fix `#show_constructor= ` when printing non-GADT type parameters
  (Takafumi Saikawa, Jacqu= es Garrigue, review by Gabriel Scherer)

- [#14245](https://github.co= m/ocaml/ocaml/issues/14245): ocamlobjinfo now displays the runtime invoked = by a bytecode
  executable (either from the RNTM section or by anal= ysing the shebang lines)
  (David Allsopp, review by Damien Doligez= and Samuel Hym)

### Runtime system:

- [#14365](https://githu= b.com/ocaml/ocaml/issues/14365): Add an Idle phase to the GC for better per= formance on small
  heaps and for a smooth start at program launch = and after a forced major GC.
  (Damien Doligez, review by Stephen D= olan and Nick Barnes)

- [#13416](https://github.com/ocaml/ocaml/issu= es/13416): Implement concurrency primitives using WinAPI instead of
&nbs= p; winpthreads on Windows.
  (Antonin D=C3=A9cimo, review by Samuel= Hym, Gabriel Scherer, Miod Vallat,
  B. Szilvasy, and Nicol=C3=A1s= Ojeda B=C3=A4r)

- [#14367](https://github.com/ocaml/ocaml/issues/14= 367): Gc.Tweak mechanism to allow named GC parameters
  (Stephen Do= lan and Nick Barnes, review by Gabriel Scherer, David Allsopp and
 = Antonin D=C3=A9cimo)

- [#13574](https://github.com/ocaml/ocaml/issu= es/13574), [#13594](https://github.com/ocaml/ocaml/issues/13594): Generatio= nal scanning of stack frames for ARM 64 bits, POWER,
  and RISC-V. = This reduces minor GC work in the presence of deep call stacks.
  (= Xavier Leroy, review by Miod Vallat, Gabriel Scherer and Olivier Nicole)
- [#14416](https://github.com/ocaml/ocaml/issues/14416): Spawned domai= ns will record backtraces if the parent domain has
  enabled it.  (Nathan Taylor, review by Gabriel Scherer)

- [#14275](https:= //github.com/ocaml/ocaml/issues/14275): Add function caml_c_thread_register= _in_domain, which makes it
  possible to register "C threads" in an= other domain than 0 (which is
  what caml_c_thread_register does). = The function takes a domain unique
  ID in which to register the th= read. The domain must be running
  when the function is called.
=   (Jack N=C3=B8rskov J=C3=B8rgensen, review by Gabriel Scherer,
&nb= sp;  Guillaume Munch-Maccagnoni)


- [#13616](https://github.= com/ocaml/ocaml/issues/13616): Change free list representation in shared he= ap
  (Sadiq Jaffer, review by Damien Doligez)

- [#13580](htt= ps://github.com/ocaml/ocaml/issues/13580): Introduce sweep-only phase at st= art of major GC cycle,
  to reduce latent-garbage delay and therefo= re improve GC performance.
  (Stephen Dolan and Nick Barnes, review= by KC Sivaramakrishnan)

- [#14053](https://github.com/ocaml/ocaml/i= ssues/14053): Statmemprof: it is now possible to replace a profile in the  current domain without stopping it in all domains.
  Added= the function [Gc.Memprof.is_sampling].
  (Guillaume Munch-Maccagno= ni, review by Gabriel Scherer)

- [#14168](https://github.com/ocaml/o= caml/issues/14168): restore the stack size statistic in `Gc.stat` and adds = a new
  `live_stacks_words` field tracking the total size in words = of live stacks.
  (Florian Angeletti, review by Gabriel Scherer)
- [#14189](https://github.com/ocaml/ocaml/issues/14189): Add runtime c= ounters EV_C_MINOR_PROMOTED_WORDS and
  EV_C_MINOR_ALLOCATED_WORDS.= EV_C_MINOR_PROMOTED_WORDS reports words promoted
  by minor GC and= EV_C_MINOR_ALLOCATED_WORDS reports words allocated by minor
  GC. = Both have equivalent bytes counters. Also updated the documentation for
=   EV_C_MINOR_PROMOTED and EV_C_MINOR_ALLOCATED to qualify scope of the= values
  reported as being per-domain.
  (Tim McGilchrist,= review by Nick Barnes, Sadiq Jaffer and
  Gabriel Scherer)

= * (*breaking change*) [#14243](https://github.com/ocaml/ocaml/issues/14243)= : Explicit relative paths in ld.conf (".", "..", "./<path...>",
&n= bsp; "../<path...>") are interpreted as being relative to the directo= ry ld.conf
  was loaded from, and the default ld.conf now uses rela= tive paths, rather than
  embedding the absolute path to the Standa= rd Library. The brave may continue to
  put implicit paths in ld.co= nf. The interpretation of CAML_LD_LIBRARY_PATH is
  unaltered. Addi= tionally, ld.conf is loaded from all of $OCAMLLIB/ld.conf,
  $CAMLL= IB/ld.conf and standard_library_default/ld.conf rather than just the
&nb= sp; first one found. ld.conf files with CRLF line endings are now consisten= tly
  normalised on both Windows and Unix.
  (David Allsopp= , review by Jonah Beckford, Damien Doligez and Hugo Heuzard)

- [#142= 44](https://github.com/ocaml/ocaml/issues/14244): Added --with-relative-lib= dir which allows the runtime and the
  compilers to locate the Stan= dard Library relative to where the binaries
  themselves are instal= led, removing the absolute path previously embedded in
  caml_stand= ard_library_default. Executables linked with `ocamlc -custom` now
 = always attempt to load bytecode from the executable itself, rather than fi= rst
  trying `argv[0]`.
  (David Allsopp, review by Jonah B= eckford, Antonin D=C3=A9cimo, Damien Doligez,
   Samuel Hym an= d Vincent Laviron)

- [#14245](https://github.com/ocaml/ocaml/issues/= 14245): Introduce Runtime IDs for use in filename mangling to allow differe= nt
  configurations and different versions of the runtime system to= coexist
  harmoniously on a single system. The IDs are used, along= with the host
  triplet, to provide mangled names for the ocamlrun= executable and its variants
  and the DLL versions of both the byt= ecode and native runtimes, with symlinks
  created for the original= names. They are also used to mangle the names of stub
  libraries = so that stub libraries compiled for a given configuration of the
  = runtime will only be sought by that runtime. The behaviour is disabled by  configuring with --disable-suffixing.
  (David Allsopp, re= view by Damien Doligez and Samuel Hym)

- [#12269](https://github.com= /ocaml/ocaml/issues/12269), [#12410](https://github.com/ocaml/ocaml/issues/= 12410), [#13063](https://github.com/ocaml/ocaml/issues/13063): Fix unsafety= , deadlocks, and/or leaks should
  rare errors happen during domain= creation and thread
  creation/registration.
  (Guillaume = Munch-Maccagnoni, review by Gabriel Scherer, B. Szilvasy,
   M= iod Vallat)

- [#14337](https://github.com/ocaml/ocaml/issues/14337):= Fix potential segfault due to the C callback mechanism dropping
  = continuations without calling `caml_continuation_use`.
  (Max Slate= r, review by Nick Barnes and Stephen Dolan)

- [#14461](https://githu= b.com/ocaml/ocaml/issues/14461): Fix racy socketpair on Windows. Address-in= -use errors would sometimes
  occur when concurrent threads or proc= esses were trying to create socketpairs.
  (Jessie Grosen, review b= y Antonin D=C3=A9cimo and Nicol=C3=A1s Ojeda B=C3=A4r)

- [#14820](ht= tps://github.com/ocaml/ocaml/issues/14820): caml_ba_alloc must account for = memory it allocated itself.
  CAML_BA_SUBARRAY (introduced in 5.2) = with data=3DNULL would result in the
  Gc accounting for the alloca= tion as 0 bytes, which can eventually lead
  to OOM. This condition= never occurs in the compiler itself, but occurs
  in external C bi= ndings that attempt to create a new bigarray in the
  shape of an e= xisting one. For backwards compatibility ignore CAML_BA_SUBARRAY
  = when data is NULL.
  (Edwin T=C3=B6r=C3=B6k, review by Damien Dolig= ez)

### Type system:

- [#13781](https://github.com/ocaml/ocam= l/issues/13781): Set scope of internal type nodes during abbreviation expan= sion
  rather than recursing during unification.
  (Jacques= Garrigue, review by Gabriel Scherer)

* (*breaking change*) [#14066]= (https://github.com/ocaml/ocaml/issues/14066): catch invalid aliases introd= uced by signature constraints during
  merging rather than in subty= ping:
  ```ocaml
    module X =3D struct end module F = (_:sig end) =3D struct end
    module type T =3D (sig module X= 0 : sig end module X1 =3D X0 end)
      with module X0 := =3D F(X)
  ```
  Before, it failed with a subtyping error. = Now, it fails with a proper error,
  explaining that `X1` would kee= p an invalid alias to `F(X)`
  (Clement Blaudeau, review by Florian= Angeletti)

* (*breaking change*) [#14100](https://github.com/ocaml/= ocaml/issues/14100): Do not ignore type-constraints and module-constraints = when building
  the approximated signature of recursive modules. Ig= noring those constraints
  resulted in incorrect (wrong set of fiel= ds, wrong shadowing between fields)
  approximated signatures, fail= ing to typecheck, as in:
  ```ocaml
  module X0 : sig type = t end
  module rec X : ((sig module A : sig end end) with module A = :=3D X0)
  and Y : sig type t =3D X.A.t end (* Unbound type constru= ctor X.A.t *)
  ```
  Now, type and module constraints are = properly merged during approximation ,
  reusing the infrastructure= for normal merging of constraints, but disabling
  any wellformedn= ess check.
  (Clement Blaudeau and Ryan Tjoa, review by Florian Ang= eletti)

- [#14327](https://github.com/ocaml/ocaml/issues/14327): All= ow retyping as-patterns that contain existentials
  (completing [#1= 4229](https://github.com/ocaml/ocaml/issues/14229))
  (Jacques Garr= igue and Takafumi Saikawa, reported by Olivier Nicole,
   revi= ew by Gabriel Scherer)

- [#14434](https://github.com/ocaml/ocaml/iss= ues/14434), [#14652](https://github.com/ocaml/ocaml/issues/14652): Protect = check_counter_example_pat against polymorphic types,
  restoring ty= pe soundness.
  (Stephen Dolan and Jacques Garrigue, report and rev= iew by Alistair O'Brien)

### Compiler user-interface and warnings:
- [#14330](https://github.com/ocaml/ocaml/issues/14330): add suggesti= ons when a signature mismatch is likely to be be caused by
  spellc= hecking mistakes, for instance
  ```
      module= M: sig type albatross end =3D struct type albatros end
  ```
&n= bsp; (Malo Monin, Florian Angeletti, review by Gabriel Scherer)

- [#= 12628](https://github.com/ocaml/ocaml/issues/12628): Improved error message= for unsafe values: print out the full path for
  the value that is= unsafe when they are detected during the compilation of
  recursiv= e modules.
  (Shivam Acharya, review by Gabriel Scherer and Florian= Angeletti)


- [#14076](https://github.com/ocaml/ocaml/issues/140= 76), 14111: error messages, add a short explanation for mismatched
 = ; universal variables and universal quantifications.
  (Florian Ang= eletti, review by Gabriel Scherer)

- [#14126](https://github.com/oca= ml/ocaml/issues/14126): Document the `-i-variance` option and `+-`, `-+` va= riance indicators
  in the reference manual.
  (Takafumi Sa= ikawa, review by Florian Angeletti)

- [#14146](https://github.com/oc= aml/ocaml/issues/14146): add an error message for external declaration with=
  a non-syntactic arity
  ```
   external fai= l: (int -> int as 'a) -> 'a =3D "%identity"
  ```
  r= ather than failing with an internal error.
  (Florian Angeletti, re= view by Gabriel Scherer)

- [#14147](https://github.com/ocaml/ocaml/i= ssues/14147): print row types in error messages when they are a type constr= uctor,
  e.g. `< foo : int; .. as $0>` when $0 is introduced = by a GADT constructor
  (Stefan Muenzel, review by Jacques Garrigue= and Florian Angeletti)

- [#14190](https://github.com/ocaml/ocaml/is= sues/14190): `ocaml -e` now also processes `-init` (previously it was ignor= ed).
  (Emile Trotignon, review by David Allsopp and @ygrek)
- [#14225](https://github.com/ocaml/ocaml/issues/14225): do not raise unus= ed-constructor warning on private
  constructor in type implementat= ions, for example
  `type safe =3D private Safe`, which are typical= ly used to
  create new fresh/generative types (here `safe`) to be = used
  as GADT indices.
  (Gabriel Scherer, review by Nicol= =C3=A1s Ojeda B=C3=A4r and Florian Angeletti,
   report by Kat= e Deplaix)

- [#14244](https://github.com/ocaml/ocaml/issues/14244): = Add -set-runtime-default option to the compiler, allowing the default
&n= bsp; value of the Standard Library location used by the runtime to be overr= idden.
  (Antonin D=C3=A9cimo, review by David Allsopp, Jonah Beckf= ord, Damien Doligez and
   Samuel Hym)

- [#14245](https= ://github.com/ocaml/ocaml/issues/14245): New option -launch-method for ocam= lc allows the method used by a
  tendered bytecode executable to lo= cate the interpreter to be given explicitly.
  In particular, it ma= kes it easier to specify the use of the executable
  launcher on Un= ix. New option -runtime-search extends the bytecode executable
  he= ader to be able to search for the runtime interpreter in the directory
&= nbsp; containing the executable and in PATH rather than relying on a single=
  hard-coded path.
  (David Allsopp, review by Damien Doli= gez and Samuel Hym)

- [#14315](https://github.com/ocaml/ocaml/issues= /14315): enable -i-variance also for classes and extension constructors,  and add description of -i-variance in manpages and the manual
&n= bsp; (Takafumi Saikawa, review by Florian Angeletti and Jacques Garrigue)
- [#14373](https://github.com/ocaml/ocaml/issues/14373): remove the O= CAML_BINANNOT_WITHENV environment variable, and
   always stri= p typing environment in cmt files
   (Florian Angeletti, revie= w by David Allsopp)

### Other libraries:

- [#13700](https://g= ithub.com/ocaml/ocaml/issues/13700), [#14454](https://github.com/ocaml/ocam= l/issues/14454), [#14715](https://github.com/ocaml/ocaml/issues/14715): Use= POSIX thread-safe getgrnam_r, getgrgid_r,
  getpwnam_r, getpwuid_r= , gmtime_r, localtime_r, getlogin_r, and fix mktime
  error checkin= g.
  (Antonin D=C3=A9cimo, review by Florian Angeletti, David Allso= pp, Stefan Muenzel,
   Gabriel Scherer, and Miod Vallat)
- [#14406](https://github.com/ocaml/ocaml/issues/14406): Better handling = of address length for unix sockets, improving Haiku
  compatibility= .
  (Sylvain Kerjean, review by Antonin D=C3=A9cimo and Nicol=C3=A1= s Ojeda B=C3=A4r)

* (*breaking change*) [#14046](https://github.com/= ocaml/ocaml/issues/14046): On Windows, `Unix.kill pid Sys.sigkill` causes t= he receiving process
  to exit with code ERROR_PROCESS_ABORTED (106= 7) instead of 0.
  (Nicol=C3=A1s Ojeda B=C3=A4r, review by Miod Val= lat, Antonin D=C3=A9cimo and David Allsopp)

- [#14020](https://githu= b.com/ocaml/ocaml/issues/14020): Add Unix.unsetenv.
  (Nicol=C3=A1s= Ojeda B=C3=A4r, review by Antonin D=C3=A9cimo and David Allsopp)

- = [#13447](https://github.com/ocaml/ocaml/issues/13447): Symmetrize shared `S= ys` and `Unix` functions. Apply fixes
  of [#12072](https://github.= com/ocaml/ocaml/issues/12072), [#12184](https://github.com/ocaml/ocaml/issu= es/12184), [#12320](https://github.com/ocaml/ocaml/issues/12320), and [#131= 66](https://github.com/ocaml/ocaml/issues/13166), from `Sys.rename` to
&= nbsp; `Unix.rename`.  Make `caml_sys_close` raise on error, allowing  `Filename.temp_file` retries if close fails. Flush buffers when  calling `caml_sys_system_command` on Windows. Error with EINVAL
=   instead of ENOENT if the command string is not a valid C string.
=   (Antonin D=C3=A9cimo, review by Gabriel Scherer and Nicol=C3=A1s Oje= da B=C3=A4r)

- [#14310](https://github.com/ocaml/ocaml/issues/14310)= : Deprecate union sock_addr_union for struct sockaddr_storage
  and= socklen_param_type for socklen_t.
  (Antonin D=C3=A9cimo, review b= y Nicol=C3=A1s Ojeda B=C3=A4r, David Allsopp and Samuel Hym)

- [#143= 91](https://github.com/ocaml/ocaml/issues/14391): unload native dynlinked o= bjects when an error occurs and it is safe to
  do so. (Fixes [#143= 23](https://github.com/ocaml/ocaml/issues/14323))
  (Nicol=C3=A1s O= jeda B=C3=A4r, review by Vincent Laviron)

### Code generation and op= timizations:

- [#14583](https://github.com/ocaml/ocaml/issues/14583)= : fix bug in linear scan spilling heuristic that in certain situations
&= nbsp; could lead to miscompilations.
  (Nicol=C3=A1s Ojeda B=C3=A4r= , review by Vincent Laviron)

### Manual and documentation:

- = [#14684](https://github.com/ocaml/ocaml/issues/14684), [#14782](https://git= hub.com/ocaml/ocaml/issues/14782), [#14838](https://github.com/ocaml/ocaml/= issues/14838): Improve ocamlc's and ocamlopt's manual pages and fix
&nbs= p; small issues in the manual
  (Samuel Hym, review by Florian Ange= letti, Antonin D=C3=A9cimo, Gabriel Scherer and
  Nicol=C3=A1s Ojed= a B=C3=A4r)

- [#14397](https://github.com/ocaml/ocaml/issues/14397):= Improve documentation of type-directed disambiguation of array
  l= iterals
  (Alicia Michael, review by Olivier Nicole and Florian Ang= eletti)

- [#14293](https://github.com/ocaml/ocaml/issues/14293): Imp= rove documentation of Runtime_events.Timestamp
  (Rapha=C3=ABl Prou= st, review by Gabriel Scherer)

- [#13747](https://github.com/ocaml/o= caml/issues/13747): Document support for native debugging with GDB and LLDB= .
   (Tim McGilchrist, review by Daniel B=C3=BCnzli, Samuel Hy= m, Olivier Nicole
   and Antonin D=C3=A9cimo)

* (*break= ing change*) [#13975](https://github.com/ocaml/ocaml/issues/13975): documen= ted the `[@remove_aliases]` built-in attribute for signatures
  (in= troduced by [#1652](https://github.com/ocaml/ocaml/issues/1652) in 2018). S= mall refactor of the code that fetches the
  attribute.
  (= Clement Blaudeau, review by Gabriel Scherer)

- [#14002](https://gith= ub.com/ocaml/ocaml/issues/14002): Add anchors to items and headings of the = web version of the API
  documentation for easier linking.
 = ; (Nicol=C3=A1s Ojeda B=C3=A4r, report by Louis Roch=C3=A9, review by Gabri= el Scherer and
  Florian Angeletti)

- [#14023](https://githu= b.com/ocaml/ocaml/issues/14023): Add documentation for the [row_more] funct= ion.
  (Richard Eisenberg, review by Jacques Garrigue)

- [#1= 4038](https://github.com/ocaml/ocaml/issues/14038): Fall back immediately t= o user-agent-defined fonts when web fonts
  fail to load.
 = (toastal)

- [#14048](https://github.com/ocaml/ocaml/issues/14048): = document modular explicits
  (Gabriel Scherer, review by Samuel Viv= ien, Ali Caglayan,
   Didier Remy and Fran=C3=A7ois Pottier)
- [#13994](https://github.com/ocaml/ocaml/issues/13994): document ext= ernal types
  (Gabriel Scherer, review by Jan Midtgaard, Jacques Ga= rrigue
   and Florian Angeletti)

- [#14077](https://git= hub.com/ocaml/ocaml/issues/14077): Add missing `item-attribute` rule for `l= et-binding`s in documentation
  for attributes.
  (Shon Fed= er)

- [#14228](https://github.com/ocaml/ocaml/issues/14228): Trim le= ading spaces from first lines of LaTeX `ocamldoccode`
  environment= s.
  (Yukai Chou, review by Nicol=C3=A1s Ojeda B=C3=A4r)

- [= #14248](https://github.com/ocaml/ocaml/issues/14248): Added documentation a= bout the way `Domain.join` triggers a
  `Thread.join` on the domain= 's systhreads.
  (Rapha=C3=ABl Proust, review by Gabriel Scherer)
- [#14392](https://github.com/ocaml/ocaml/issues/14392): Fix AsciiDoc= files, add more markup, xrefs, documentation.
  (Antonin D=C3=A9ci= mo, review by Gabriel Scherer and David Allsopp)

- [#13590](https://= github.com/ocaml/ocaml/issues/13590): Document automatic command-line expan= sion of `*` and `?` wildcards by
  the runtime under Windows.
&n= bsp; (Benjamin Sigonneau, review by Nicol=C3=A1s Ojeda B=C3=A4r)

###= Internal/compiler-libs changes:

- [#13913](https://github.com/ocaml= /ocaml/issues/13913): Use Blake128 as the hash function for the compiler's = CRCs
  (Vincent Laviron, review by Xavier Leroy and Gabriel Scherer= )

- [#13911](https://github.com/ocaml/ocaml/issues/13911), [#14117](= https://github.com/ocaml/ocaml/issues/14117), [#14127](https://github.com/o= caml/ocaml/issues/14127): Refactor the merging of signature constraints, by=
  splitting the monolithic merge function into separate, specializ= ed functions
  (for merging types, modules and module types) - shar= ing only the recursive
  part for handling deep constraints.
&nb= sp; (Clement Blaudeau, review by Florian Angeletti and Samuel Vivien, fix b= y Ryan
  Tjoa)

- [#14120](https://github.com/ocaml/ocaml/iss= ues/14120), [#14474](https://github.com/ocaml/ocaml/issues/14474), [#14476]= (https://github.com/ocaml/ocaml/issues/14476): Associate Uids to items that= don't have a concrete
  definition; improves Merlin's renaming for= functors.
  (Ulysse G=C3=A9rard, review by Florian Angeletti and G= abriel Scherer)


- [#13839](https://github.com/ocaml/ocaml/issues= /13839), [#14008](https://github.com/ocaml/ocaml/issues/14008): Reimplement= `let open`, `let module` and `let exception` in
  terms of a singl= e construct.
  (Nicol=C3=A1s Ojeda B=C3=A4r, review by Gabriel Sche= rer, Samuel Vivien, Ulysse G=C3=A9rard
  and Vincent Laviron, tempo= rary regression reported by Antonio Monteiro)

- [#13980](https://git= hub.com/ocaml/ocaml/issues/13980) Refactor `type-approx` and improve some e= rrors' locations.
  (Leo White, Ulysse G=C3=A9rard, review by Samue= l Vivien and Florian Angeletti)

- [#14024](https://github.com/ocaml/= ocaml/issues/14024): Fix unterminated-string-initialization warnings from t= he C compiler.
  (Antonin D=C3=A9cimo, review by David Allsopp and = Miod Vallat)

- [#14094](https://github.com/ocaml/ocaml/issues/14094)= : toplevel, simplify check on installed printer types
  (Florian An= geletti, review by Gabriel Scherer)

- [#13656](https://github.com/oc= aml/ocaml/issues/13656), [#14114](https://github.com/ocaml/ocaml/issues/141= 14), [#14308](https://github.com/ocaml/ocaml/issues/14308): Use C99 stdint.= h/inttypes.h fixed-width
  integer types and macros to define OCaml= integers.
  (Antonin D=C3=A9cimo, review by Nick Barnes and David = Allsopp)

- [#14148](https://github.com/ocaml/ocaml/issues/14148): Re= move an unused field from package_type in typedtree
  (Samuel Vivie= n, review by Gabriel Scherer)

- [#14141](https://github.com/ocaml/oc= aml/issues/14141): Rename cstrs to constraints when it refers to constraint= s to avoid
  confusing it with constructors.
  (Stefan Muen= zel, review by Nicol=C3=A1s Ojeda B=C3=A4r)

- [#14149](https://githu= b.com/ocaml/ocaml/issues/14149): Distinguish `(module M : S)` from `(module= M) : (module S)` in
  patterns.
  (Samuel Vivien, review b= y Gabriel Scherer)

- [#14161](https://github.com/ocaml/ocaml/issues/= 14161): refactor the STW-participants machinery to add an intermediate
&= nbsp; category of 'parked' domain structures.
  (Gabriel Scherer, r= eview by Sivaramakrishnan)

- [#14198](https://github.com/ocaml/ocaml= /issues/14198) Constraints on module unpacking are not ghost
  (Tho= mas Refis, review by Nicol=C3=A1s Ojeda B=C3=A4r)

- [#14243](https:/= /github.com/ocaml/ocaml/issues/14243): ocamlc now uses the same code as the= runtime to parse ld.conf (via a
  C primitive), eliminating some h= ighly obscure corner cases.
  (David Allsopp, review by Jonah Beckf= ord, Damien Doligez and Hugo Heuzard)

- [#14260](https://github.com/= ocaml/ocaml/issues/14260): Refactor Lambda.structured_constant to avoid dup= licate
  representations for string constants
  (Vincent La= viron, review by Nicol=C3=A1s Ojeda B=C3=A4r and Gabriel Scherer)

- = [#14297](https://github.com/ocaml/ocaml/issues/14297), [#14299](https://git= hub.com/ocaml/ocaml/issues/14299): Avoid iterating on hash tables to produc= e types or terms
  (Vincent Laviron, review by Nicol=C3=A1s Ojeda B= =C3=A4r and Gabriel Scherer)

* (*breaking change*) [#14322](https://= github.com/ocaml/ocaml/issues/14322): Remove leftover hacks for handling pa= ttern constraints
  As a side effect, `let rec (_ as x) =3D ...` is= now always rejected instead of
  being treated as equivalent to `l= et rec x =3D ...`
  (Vincent Laviron, review by Alistair O'Brien an= d Florian Angeletti)

- [#14331](https://github.com/ocaml/ocaml/issue= s/14331): Enforce current_level <=3D generic_level, and explain create_s= cope
  (Jacques Garrigue and Takafumi Saikawa, review by Gabriel Sc= herer)

* (*breaking change*) [#14388](https://github.com/ocaml/ocaml= /issues/14388): Remove support for `let rec (module M : S) =3D e1 in e2`.  (Alistair O'Brien, review by Vincent Laviron and Gabriel Scherer)<= br>
- [#14422](https://github.com/ocaml/ocaml/issues/14422): Refactoring= an `if match e with p1 -> true | p2 -> false then ...`
  int= o a match in typetexp.
  (Samuel Vivien, review by Gabriel Scherer)=

- [#13224](https://github.com/ocaml/ocaml/issues/13224): Clarify ba= rriers and spin macros with delayed expansion.
  (Antonin D=C3=A9ci= mo, review by David Allsopp and Gabriel Scherer)

- [#14435](https://= github.com/ocaml/ocaml/issues/14435), [#14455](https://github.com/ocaml/oca= ml/issues/14455), [#14550](https://github.com/ocaml/ocaml/issues/14550): Ad= d the not-root builtin ocamltest action. This
  allows to skip test= s that fail if the current user is root (superuser).
  (Kate Deplai= x, review by Gabriel Scherer, Nicol=C3=A1s Ojeda B=C3=A4r, and
  &n= bsp;Antonin D=C3=A9cimo)

- [#14457](https://github.com/ocaml/ocaml/i= ssues/14457): Handle qualified `M.{ x }` patterns in untypeast
  (B= asile Cl=C3=A9ment, review by Florian Angeletti)

### Build system:
- [#13705](https://github.com/ocaml/ocaml/issues/13705), [#14444](htt= ps://github.com/ocaml/ocaml/issues/14444): Cache test results of custom Aut= oconf tests from aclocal.m4.
  (Antonin D=C3=A9cimo, review by Davi= d Allsopp and Miod Vallat)

- [#13810](https://github.com/ocaml/ocaml= /issues/13810): Support build of cross compilers to native freestanding tar= gets
  (Samuel Hym, review by Antonin D=C3=A9cimo and Romain Calasc= ibetta)

- [#14243](https://github.com/ocaml/ocaml/issues/14243): New= configure option --with-additional-stublibsdir allows an
  additio= nal directory to be added to the start of ld.conf. Additionally, the
&nb= sp; stublibs subdirectory is no longer created, nor added to ld.conf, when<= br>  building OCaml with --disable-shared.
  (David Allsopp, r= eview by Jonah Beckford, Damien Doligez and Hugo Heuzard)

- [#14244]= (https://github.com/ocaml/ocaml/issues/14244): When targeting native Window= s on Cygwin or MSYS2, preserve
  backslashes in the supplied `--pre= fix` (in particular, backslashes instead of
  slashes will then be = displayed by `ocamlopt -config-var standard_library`).
  If the sup= plied prefix contains a slash, then it is normalised, as
  previous= ly.
  (David Allsopp, review by Jonah Beckford, Antonin D=C3=A9cimo= , Damien Doligez and
   Samuel Hym)

- [#14245](https://= github.com/ocaml/ocaml/issues/14245): New --enable-runtime-search configure= option controls the
  -runtime-search option used to build the byt= ecode binaries in the compiler
  distribution. --enable-runtime-sea= rch-target controls the default value of
  -runtime-search used for= bytecode executables produced by the compiler.
  (David Allsopp, r= eview by Damien Doligez and Samuel Hym)

- [#14484](https://github.co= m/ocaml/ocaml/issues/14484): Set `_WIN32_WINNT` to require Windows 8/Server= 2012 Windows header SDK
  support.
  (Antonin D=C3=A9cimo,= review by David Allsopp)

### Bug fixes:

- [#14123](https://g= ithub.com/ocaml/ocaml/issues/14123): Fix integer-overflow problems in heap = compaction.
  (Nick Barnes, review by Antonin D=C3=A9cimo).

= - [#14035](https://github.com/ocaml/ocaml/issues/14035): Fix the alignment = of _Atomic long long unsigned int fields
  before GCC 11.1 on i686.= Silence GCC note on newer versions.
  (Antonin D=C3=A9cimo, review= by Sadiq Jaffer)

- [#14010](https://github.com/ocaml/ocaml/issues/1= 4010): Fix miscompilation / liveness errors for string operations
 = (Mark Shinwell, Xavier Clerc, review by Xavier Leroy and Gabriel Scherer)<= br>
- [#14036](https://github.com/ocaml/ocaml/issues/14036): Fix nonterm= ination of cycle printing in recursive modules with
  `-short-paths= `. Add error message for types considered abstract while
  checking= recursive modules.
  (Brandon Stride, review by Florian Angeletti)=

- [#14065](https://github.com/ocaml/ocaml/issues/14065): Fix functi= on signature mismatch of `__tsan_func_exit` with GCC 15.
  Check in= the configure step if the TSan provided internal builtins are the
 = ; same as what we expect, introduce `caml_tsan_*` wrappers for the `__tsan_= *`
  functions we use.
  (Hari Hara Naveen S, report by Har= i Hara Naveen S,
  review by Gabriel Scherer, Antonin D=C3=A9cimo, = Olivier Nicole)

- [#14071](https://github.com/ocaml/ocaml/issues/140= 71): Fix exception name in Dynlink.Error printer.
  (Etienne Millon= , review by Nicol=C3=A1s Ojeda B=C3=A4r)

- [#13853](https://github.c= om/ocaml/ocaml/issues/13853): Format breaks some line too early when there<= br>  is a break hint at the end.
  (Florian Angeletti, review = by Gabriel Scherer)

- [#10570](https://github.com/ocaml/ocaml/issues= /10570): Fix handling of caml_sys_argv when exposed directly as an
 = ; external
  (Keryan Didier, review by Vincent Laviron and Gabriel = Scherer)

- [#14155](https://github.com/ocaml/ocaml/issues/14155): Au= dit unexecuted phrases in compiler expect tests and
  fix all occur= rences
  (Stefan Muenzel, review by Gabriel Scherer)

- [#141= 63](https://github.com/ocaml/ocaml/issues/14163), [#14176](https://github.c= om/ocaml/ocaml/issues/14176): add a filename location to the deprecation al= ert for implicit
  uses of libraries bundled with the compiler (uni= x,re,threads,dynlink)
  (Florian Angeletti, report by Ali Caglayan,= review by Gabriel Scherer)

- [#14210](https://github.com/ocaml/ocam= l/issues/14210): fix TSan-reported data race in weak pointers runtime
&n= bsp; (Gabriel Scherer and Damien Doligez, report by Olivier Nicole,
&nbs= p;  review by KC Sivaramakrishnan)

- [#14213](https://github.co= m/ocaml/ocaml/issues/14213): Fix shadow-stack-related crashes with TSan
=   (Olivier Nicole, report by Nathan Taylor, review by Gabriel Scherer = and
   Stefan Muenzel)

- [#13658](https://github.com/oc= aml/ocaml/issues/13658), [#14181](https://github.com/ocaml/ocaml/issues/141= 81): Fix handling of recursive function types that can result
  in = an unbounded number of labeled or optional arguments.
  (Stefan Mue= nzel, report by Samuel Vivien, review by Florian Angeletti)

- [#1425= 5](https://github.com/ocaml/ocaml/issues/14255): Fix TSan bug with C calls = that take many arguments
  (Olivier Nicole and Miod Vallat, report = by Nathan Taylor, review by Gabriel
   Scherer)

- [#142= 30](https://github.com/ocaml/ocaml/issues/14230) : ocamltest fails to link = test program with -custom in some cases
  (Damien Doligez, review b= y David Allsopp)

- [#14279](https://github.com/ocaml/ocaml/issues/14= 279): -dsource, preserve (mod) and other escaped infix keyword operators in=
  the printed source wherever possible.
  (Florian Angelet= ti, review by Gabriel Scherer)

- [#14300](https://github.com/ocaml/o= caml/issues/14300), [#14304](https://github.com/ocaml/ocaml/issues/14304): = fix a race between memprof and the minor GC, detected by TSan
  (Ga= briel Scherer, review by Stephen Dolan and Nick Barnes,
   rep= ort by Olivier Nicole)

- [#14332](https://github.com/ocaml/ocaml/iss= ues/14332): Fix missing TSan instrumentation in subexpressions
  (V= incent Laviron, review by Gabriel Scherer and Olivier Nicole)

- [#14= 370](https://github.com/ocaml/ocaml/issues/14370), [#14429](https://github.= com/ocaml/ocaml/issues/14429): Fix headers for C++ inclusion.
  (An= tonin D=C3=A9cimo, review by Gabriel Scherer)

- [#14417](https://git= hub.com/ocaml/ocaml/issues/14417): Fix issue with nested packs on macOS.  (Vincent Laviron, report by Kate Deplaix, review by Gabriel Scherer= )

- [#14423](https://github.com/ocaml/ocaml/issues/14423): Fix detec= tion of SetThreadDescription on 32-bit builds, meaning that
  Threa= d.set_current_thread_name now works on 32-bit MSVC and uses the correct
=   mechanism on 32-bit mingw-w64.
  (David Allsopp, review by A= ntonin D=C3=A9cimo)

- [#14431](https://github.com/ocaml/ocaml/issues= /14431): Enable native backend for DragonFly BSD. This builds ocamlopt on  DragonFly.
  (Michael Neumann, review by Gabriel Scherer a= nd Kate Deplaix)

- [#14495](https://github.com/ocaml/ocaml/issues/14= 495): Fix infix-tag bug in the minor collector which could cause SEGVs
&= nbsp; in multi-domain programs.
  (Nick Barnes, review by Gabriel S= cherer)

- [#14519](https://github.com/ocaml/ocaml/issues/14519): Fix= segfault when using `Runtime_events` under certain
  circumstances= due to bad error checking when calling `mmap()`.
  (Mark Elvers, r= eview by Nicol=C3=A1s Ojeda B=C3=A4r)

- private, CVE-2026-28364, OSE= C-2026-01: robustify intern.c
  (Xavier Leroy and Nicol=C3=A1s Ojed= a B=C3=A4r, review by Olivier Nicole, Mindy Preston,
  Edwin T=C3= =B6r=C3=B6k, and Gabriel Scherer)

- [#13693](https://github.com/ocam= l/ocaml/issues/13693), [#14514](https://github.com/ocaml/ocaml/issues/14514= ): s390x: fix heap corruption with libasmrun_shared.so caused
  by = PLT lazy binding trampoline saving FPRs into OCaml's fiber stack.
 = Replace @PLT calls with GOT-indirect calls in the s390x code emitter.
&= nbsp; (Zane Hambly, review by David Allsopp and Xavier Leroy)

- [#14= 557](https://github.com/ocaml/ocaml/issues/14557), [#12150](https://github.= com/ocaml/ocaml/issues/12150), [#14696](https://github.com/ocaml/ocaml/issu= es/14696): ensure that the self type of class cannot escape
  throu= gh type constraints.
  (Leo White, review by Florian Angeletti)
=
- [#14603](https://github.com/ocaml/ocaml/issues/14603), [#14604](https= ://github.com/ocaml/ocaml/issues/14604): avoid Ctype.apply failures when mi= xing
  polymorphic types and unboxed constructors.
  (Gabri= el Scherer and Stefan Muenzel, report by Brandon Stride,
   re= view by Florian Angeletti)

- [#14626](https://github.com/ocaml/ocaml= /issues/14626), [#14675](https://github.com/ocaml/ocaml/issues/14675): take= in account module-dependent functions when
  determining if an opt= ional argument is non-erasable.
  (Alistair O'Brien and Florian Ang= eletti, review by Gabriel Scherer)

- [#14635](https://github.com/oca= ml/ocaml/issues/14635): Fix a bug in `caml_floatarray_gather` that would ca= use
  the result of `Float.Array.sub`, `Float.Array.append`, `Float= .Array.concat`
  (when empty) not to be equal to `[||]`.
  = (Marc Lasson, review by Gabriel Scherer)

- [#14644](https://github.c= om/ocaml/ocaml/issues/14644), [#14647](https://github.com/ocaml/ocaml/issue= s/14647): Fix a bug related to unhandled effects in bytecode.
  (Vi= ncent Laviron, report by Thibaut Mattio,
   review by Nicol=C3= =A1s Ojeda B=C3=A4r, Stephen Dolan and Olivier Nicole)

- [#14655](ht= tps://github.com/ocaml/ocaml/issues/14655), [#14691](https://github.com/oca= ml/ocaml/issues/14691): check for size overflow in caml_ba_reshape
 = ; (Stephen Dolan, review by Xavier Leroy)

- [#14667](https://github.= com/ocaml/ocaml/issues/14667): enable application related warnings for modu= le-dependent functions
  (Florian Angeletti, review by Gabriel Sche= rer)

- [#14690](https://github.com/ocaml/ocaml/issues/14690): Fix `N= ame_type_mismatch` error message when the expected type is an
  ali= as: print the expanded path on the right-hand side of the equality, not
=   the alias twice.
  (Weixie Cui, review by Florian Angeletti)=

- [#14349](https://github.com/ocaml/ocaml/issues/14349), [#14718](h= ttps://github.com/ocaml/ocaml/issues/14718), [#14722](https://github.com/oc= aml/ocaml/issues/14722): runtime, fix in the orphaning of ephemerons
&nb= sp; (Gabriel Scherer, review by Olivier Nicole and Damien Doligez,
 = ;  report by Jan Midtgaard)

- [#14702](https://github.com/ocaml= /ocaml/issues/14702): Fix hidden directory files leaking into the visible l= oad path table.
  When a hidden directory contained a file whose ba= sename was already present,
  the file could be incorrectly added t= o the visible table.
  (Hugo Heuzard, review by Florian Angeletti)<= br>
- [#14719](https://github.com/ocaml/ocaml/issues/14719), [#14721](ht= tps://github.com/ocaml/ocaml/issues/14721): compute arity correctly for mod= ule-dependent function
  (Florian Angeletti, report by Jeremy Yallo= p, review by Stefan Muenzel)

- [#14760](https://github.com/ocaml/oca= ml/issues/14760), [#14802](https://github.com/ocaml/ocaml/issues/14802), [#= 14846](https://github.com/ocaml/ocaml/issues/14846): Correct the detection = of argument defaults in
  configure, fixing an incorrect error mess= age when installing OCaml through
  opam on OpenSUSE with the site-= config package installed.
  (David Allsopp, report and review by Ed= win T=C3=B6r=C3=B6k)

- [#14797](https://github.com/ocaml/ocaml/issue= s/14797): avoid dropping attributes attached to package types when pretty  printing in surface syntax.
  (Chet Murthy, review by Nico= l=C3=A1s Ojeda B=C3=A4r)

- [#14853](https://github.com/ocaml/ocaml/i= ssues/14853), CVE-2026-41083, OSEC-2026-05: fix quoting of filenames
&nb= sp;  passed to Filename.quote_command on Windows.
  (David All= sopp, report by Andrew Nesbitt, review by Florian Angeletti)

<= /div> --=_d8422e55-5759-4e6e-b61f-b99e9da155d1--