OCaml release 5.1.0

Florian Angeletti <[email protected]> Thu, 14 Sep 2023 20:35:12 +0200 (CEST)
Newsgroups gmane.comp.lang.caml.announce,gmane.comp.lang.caml.inria
Message-ID <[email protected]>
--=_91c0edc4-cc8a-4922-8f39-4b6f519f87dd
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Dear OCaml users,=20

We have the pleasure of celebrating the anniversary of Olympe de Gouges'=20
"Declaration of the Rights of Woman and of the Female Citizen" by announcin=
g the=20
release of OCaml version 5.1.0.=20

Some of the highlights in OCaml 5.1.0 are:=20

- Many runtime performance regression and memory-leaks fixes=20
(dynlinking, weak array, weak hash sets, GC with idle domains, GC prefetchi=
ng)=20
- Restored support for native code generation on RISC-V and s390x architect=
ures=20
- Restored Cygwin port=20
- Reduced installation size (50% reduction)=20
- Compressed compilation artefacts (.cmi, .cmt, .cmti, .cmo, .cma files)=20
- 19 error message improvements=20
- 14 standard library functions made tail-recursive with Tail-Recursion-Mod=
ulo-Cons (TRMC), such as `List.append` and `List.map`=20
- 57 new standard library functions=20
- More examples in the standard library documentation=20
- 42 bug fixes=20

OCaml 5.1.0 is still a relatively experimental release compared to the OCam=
l 4.14 branch. In particular:=20

- The POWER port is being tested in the dev version of the compiler.=20
- The Windows MSVC port is still unavailable.=20
- Ephemeron performances need to be investigated.=20
- GC compaction is a work in progress.=20
- `statmemprof` is a work in progress.=20
- There are a number of known runtime concurrency bugs (that trigger under=
=20
rare circumstances).=20

We are planning to address those regressions, hopefully in time for the OCa=
ml 5.2.0 release for some of them.=20
Meanwhile, the OCaml 4.14 branch will be maintained, and the next release o=
n the OCaml 4.14 branch, OCaml 4.14.2, should follow this release in the up=
coming months.=20

Please report any unexpected behaviours on the OCaml issue tracker (https:/=
/github.com/ocaml/ocaml/issues)=20
and post any questions or comments you might have on our discussion forums =
at https://discuss.ocaml.org.=20

The full list of changes can be found in the changelog below.=20

Happy hacking,=20
=E2=80=94 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.1.0=20

The source code for the release candidate is also directly available on:=20

* GitHub: https://github.com/ocaml/ocaml/archive/5.1.0.tar.gz=20
* OCaml archives at Inria: https://caml.inria.fr/pub/distrib/ocaml-5.1/ocam=
l-5.1.0.tar.gz=20

Fine-Tuned Compiler Configuration=20
----------------------------------------------=20

If you want to tweak the configuration of the compiler, you can switch to t=
he option variant with:=20

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

where `<option_list>` is a comma-separated list of `ocaml-option-*` package=
s. For instance, for a `flambda` and `no-flat-float-array` switch:=20

opam switch create 5.1.0+flambda+nffa ocaml-variants.5.1.0+options ocaml-op=
tion-flambda ocaml-option-no-flat-float-array=20


Changelog for OCaml 5.1.0 (14 September 2023)=20
---------------------------------------------------------------------=20

### Restored backends=20

- #11418, #11708: RISC-V multicore support.=20
(Nicol=C3=A1s Ojeda B=C3=A4r, review by KC Sivaramakrishnan)=20

- #11712, #12258, #12261: s390x / IBM Z multicore support:=20
OCaml & C stack separation; dynamic stack size checks; fiber and=20
effects support.=20
(Aleksei Nikiforov, with help from Vincent Laviron and Xavier Leroy,=20
additional suggestions by Luc Maranget,=20
review by the same and KC Sivaramakrishnan)=20

- #11642: Restore Cygwin port. Add GC messages for address space reservatio=
ns=20
when OCAMLRUNPARAM option v includes 0x1000.=20
(David Allsopp, review by Xavier Leroy, Guillaume Munch-Maccagnoni=20
and Gabriel Scherer)=20

### Standard library:=20

- #12006, #12064: Add `Marshal.Compression` flag to `Marshal.to_*` function=
s.=20
When this flag is explicitly set, marshaled data is compressed using ZSTD.=
=20
On some practical examples, the marshalled output became three times smalle=
r=20
at no noticeable cost on the marshalling time.=20
(Xavier Leroy, review by Edwin T=C3=B6r=C3=B6k and Gabriel Scherer, fix by =
Damien=20
Doligez)=20

- #10464: Add List.is_empty.=20
(Craig Ferguson, review by David Allsopp)=20

- #11848: Add `List.find_mapi`,=20
`List.find_index: ('a -> bool) -> 'a list -> int option`,=20
`Seq.find_mapi`, `Seq.find_index`, `Array.find_mapi`, `Array.find_index`,=
=20
`Float.Array.find_opt`, `Float.Array.find_index`, `Float.Array.find_map`,=
=20
`Float.Array.find_mapi`.=20
(Sima Kinsart, review by Daniel B=C3=BCnzli and Nicol=C3=A1s Ojeda B=C3=A4r=
)=20

- #11410: Add Set.to_list, Map.to_list, Map.of_list,=20
`Map.add_to_list: key -> 'a -> 'a list t -> 'a list t`.=20
(Daniel B=C3=BCnzli, review by Nicol=C3=A1s Ojeda B=C3=A4r and Gabriel Sche=
rer)=20

- #11836, #11837: Add `Array.map_inplace`, `Array.mapi_inplace`,=20
`Float.Array.mapi_inplace` and `Float.Array.mapi_inplace`.=20
(L=C3=A9o Andr=C3=A8s, review by Gabriel Scherer, KC Sivaramakrishnan and=
=20
Nicol=C3=A1s Ojeda B=C3=A4r)=20

- #10967: Add Filename.temp_dir.=20
(David Turner, review by Anil Madhavapeddy, Valentin Gatien-Baron, Nicol=C3=
=A1s=20
Ojeda B=C3=A4r, Gabriel Scherer, and Daniel B=C3=BCnzli)=20

- #11246: Add "hash" and "seeded_hash" functions to Bool, Int, Char, Float,=
=20
Int32, Int64, and Nativeint.=20
(Nicol=C3=A1s Ojeda B=C3=A4r, review by Xavier Leroy and Gabriel Scherer)=
=20

- #11488: Add `Mutex.protect: Mutex.t -> (unit -> 'a) -> 'a`=20
for resource-safe critical sections protected by a mutex.=20
(Simon Cruanes, review by Gabriel Scherer, Xavier Leroy,=20
Guillaume Munch-Maccagnoni)=20

- #11581: Add type equality witness=20
`type (_, _) eq =3D Equal: ('a, 'a) eq`=20
in a new module Stdlib.Type.=20
(Nicol=C3=A1s Ojeda B=C3=A4r, review by Daniel B=C3=BCnzli, Jacques Garrigu=
e, Florian=20
Angeletti, Alain Frisch, Gabriel Scherer, Jeremy Yallop and Xavier Leroy)=
=20

- #11843: Add `In_channel.input_lines` and `In_channel.fold_lines`.=20
(Xavier Leroy, review by Nicol=C3=A1s Ojeda B=C3=A4r and Wiktor Kuchta).=20

- #11856, #11859: Using TRMC, the following `Stdlib` functions are now=20
tail-recursive:=20
Stdlib.(@), List.append,=20
List.concat_map.=20
(Jeremy Yallop, review by Daniel B=C3=BCnzli, Anil Madhavapeddy, Nicol=C3=
=A1s Ojeda B=C3=A4r,=20
Gabriel Scherer, and Bannerets)=20

- #11362, #11402: Using TRMC, the following `Stdlib` functions are now=20
tail-recursive:=20
List.map, List.mapi, List.map2,=20
List.filter, List.filteri, List.filter_map,=20
List.init,=20
List.of_seq.=20
(Nicol=C3=A1s Ojeda B=C3=A4r, review by Xavier Leroy and Gabriel Scherer)=
=20


- #11878, #11965: Prevent seek_in from marking buffer data as valid after=
=20
closing the channel. This could lead to inputting uninitialized bytes.=20
(Samuel Hym, review by Xavier Leroy and Olivier Nicole)=20

- #11128: Add In_channel.isatty, Out_channel.isatty.=20
(Nicol=C3=A1s Ojeda B=C3=A4r, review by Gabriel Scherer and Florian Angelet=
ti)=20

- #10859: Add `Format.pp_print_iter` and `Format.pp_print_array`.=20
(L=C3=A9o Andr=C3=A8s and Daniel B=C3=BCnzli, review by David Allsopp and H=
ugo Heuzard)=20

- #10789: Add `Stack.drop`=20
(L=C3=A9o Andr=C3=A8s, review by Gabriel Scherer)=20

* #10899: Change Stdlib.nan from signaling NaN to quiet NaN.=20
(Greta Yorsh, review by Xavier Leroy, Guillaume Melquiond and=20
Gabriel Scherer)=20

- #11026, #11667, #11858: Rename the type of the accumulator=20
of fold functions to 'acc:=20
fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a list -> 'acc=20
fold_right : ('a -> 'acc -> 'acc) -> 'a list -> 'acc -> 'acc=20
fold_left_map : ('acc -> 'a -> 'acc * 'b) -> 'acc -> 'a list -> 'acc * 'b l=
ist=20
...=20
(Valentin Gatien-Baron and Francois Berenger,=20
review by Gabriel Scherer and Nicol=C3=A1s Ojeda B=C3=A4r)=20

- #11354: Hashtbl.find_all is now tail-recursive.=20
(Ferm=C3=ADn Reig, review by Gabriel Scherer)=20

- #11500: Make Hashtbl.mem non-allocating.=20
(Simmo Saan, review by Nicol=C3=A1s Ojeda B=C3=A4r)=20

- #11412: Add Sys.is_regular_file=20
(Xavier Leroy, review by Anil Madhavapeddy, Nicol=C3=A1s Ojeda B=C3=A4r, Da=
vid Allsopp)=20

- #11322, #11329: serialization functions Random.State.{of,to}_binary_strin=
g=20
between Random.State.t and string=20
(Gabriel Scherer, report by Yotam Barnoy,=20
review by Daniel B=C3=BCnzli, Damien Doligez, Hugo Heuzard and Xavier Leroy=
)=20

- #11830: Add Type.Id with=20
`val provably_equal : 'a Type.Id.t -> 'b Type.Id.t -> ('a, 'b) Type.eq opti=
on`=20
(Daniel B=C3=BCnzli, review by Jeremy Yallop, Gabriel Scherer, Wiktor Kucht=
a,=20
Nicol=C3=A1s Ojeda B=C3=A4r)=20

- #12184, #12320: Sys.rename Windows fixes on directory corner cases.=20
(Jan Midtgaard, review by Anil Madhavapeddy)=20

* #11565: Enable -strict-formats by default. Some incorrect format=20
specifications (for `printf`) where silently ignored and now fail.=20
Those new failures occur at compile-time, except if you use advanced=20
format features like `%(...%)` that parse format strings dynamically.=20
Pass -no-strict-formats to revert to the previous lenient behavior.=20
(Nicol=C3=A1s Ojeda B=C3=A4r, review by David Allsopp)=20

### Installation size=20

Specific efforts have been made during this release to reduce the filesyste=
m=20
size of installed artifacts of the compiler distribution.=20
The installation size of 5.1 is 272 MiB compared to 521 MiB for 5.0.=20
Some of those changes will benefit all OCaml packages.=20

- ocaml/RFCs#23, #12006: use compressed marshaled format from #12006 for .c=
mi,=20
.cmt, .cmti files, and for debug info in .cmo and .cma files, resulting in=
=20
major reduction in size.=20
(Xavier Leroy, review by Edwin T=C3=B6r=C3=B6k and Gabriel Scherer,=20
RFC by Simon Cruanes)=20

- #11981: Reduce size of OCaml installations by removing debugging informat=
ion=20
from installed bytecode executables. It is no longer possible to=20
run ocamldebug over these installed bytecode executables, nor to get=20
exception backtraces for them.=20
(Xavier Leroy, review by David Allsopp, report by Fabrice Le Fessant)=20

* #11993: install only bytecode executables for the `ocamlmklib`, `ocamlcmt=
`,=20
`ocamlprof`, `ocamlcp`, `ocamloptp`, and `ocamlmktop` tools, but no=20
native-code executables. A tool like `ocamlmklib` for example is now=20
installed directly to `$BINDIR/ocamlmklib`; `ocamlmklib.byte` and=20
`ocamlmklib.opt` are no longer installed to `$BINDIR`.=20
(Xavier Leroy, review by Gabriel Scherer)=20

### Runtime system:=20

- #11589, #11903: Modify the GC pacing code to make sure the GC keeps=20
up with allocations in the presence of idle domains.=20
(Damien Doligez and Stephen Dolan, report by Florian Angeletti,=20
review by KC Sivaramakrishnan and Sadiq Jaffer)=20

- #11743: Speed up weak array operations=20
(KC Sivaramakrishnan, review by Fran=C3=A7ois Bobot and Sadiq Jaffer)=20

- #12131: Simplify implementation of weak hash sets, fixing a=20
performance regression. (Nick Barnes, review by Fran=C3=A7ois Bobot,=20
Alain Frisch and Damien Doligez).=20

- #11474, #11998, #12065: Add support for user-defined events in the runtim=
e=20
event tracing system.=20
(Lucas Pluvinage, review by Sadiq Jaffer, Guillaume Munch-Maccagnoni,=20
Enguerrand Decorne, Gabriel Scherer and Anil Madhavapeddy)=20

- #11827, #12249: Restore prefetching for GC marking=20
(Fabrice Buoro and Stephen Dolan, review by Gabriel Scherer and Sadiq Jaffe=
r)=20

- #11144: Restore frame-pointers support for amd64=20
(Fabrice Buoro, review by Frederic Bour and KC Sivaramakrishnan)=20

- #11935: Load frametables of dynlink'd modules in batch=20
(Stephen Dolan, review by David Allsopp and Guillaume Munch-Maccagnoni)=20

- #11284, #12525: Use compression of entries scheme when pruning mark stack=
.=20
Can decrease memory usage for some workloads, otherwise should be=20
unobservable.=20
(Tom Kelly, review by Sabine Schmaltz, Sadiq Jaffer and Damien Doligez)=20

* #11865, #11868, #11876: Clarify that the operations of a custom=20
block must never access the OCaml runtime. The previous=20
documentation only mentioned the main illicit usages. In particular,=20
since OCaml 5.0, it is no longer safe to call=20
`caml_remove_global_root` or `caml_remove_generational_global_root`=20
from within the C finalizer of a custom block, or within the=20
finalization function passed to `caml_alloc_final`. As a workaround,=20
such a finalization operation can be registered with `Gc.finalize`=20
instead, which guarantees to run the finalizer at a safe point.=20
(Report by Timothy Bourke, discussion by Yotam Barnoy, Timothy=20
Bourke, Sadiq Jaffer, Xavier Leroy, Guillaume Munch-Maccagnoni, and=20
Gabriel Scherer)=20

- #12130: Fix multicore crashes with weak hash sets. Fixes #11934.=20
(Nick Barnes, review by Fran=C3=A7ois Bobot)=20

- #12099: Add ocamlrund option, -events, to produce a trace of=20
debug events during bytecode interpretation. Fixes #12098.=20
(Richard L Ford, review by Gabriel Scherer)=20

- #12001: Fix book keeping for last finalisers during the minor cycle=20
(KC Sivaramakrishnan and Enguerrand Decorne, report by Guillaume Bury=20
and Vincent Laviron, review by Sadiq Jaffer and KC Sivaramakrishnan)=20

- #11919: New runtime events counters for major heap stats and minor heap=
=20
resizing.=20
(Sadiq Jaffer, review by Gabriel Scherer and David Allsopp)=20

- #11287, #11872, #11955: Clean up reserved header bits (once used for=20
Spacetime profiling).=20
(Nick Barnes, review by Gabriel Scherer and Damien Doligez)=20

- #11750: Decouple major slice from minor GC.=20
(KC Sivaramakrishnan, review by Sadiq Jaffer, Guillaume Munch-Maccagnoni an=
d=20
Damien Doligez)=20

- #11796: protect lazy computation of code fragment digest by a mutex.=20
This makes the thread sanitizer happier, and avoids duplicating=20
the hashing work.=20
(Gabriel Scherer, review by Xavier Leroy, report by Olivier Nicole)=20

- #11137: new `Unsafe_store_tag(val, new_tag)` macro to stop using=20
`Tag_val(val)` as lvalue.=20
(Gabriel Scherer, review by Xavier Leroy, Guillaume Munch-Maccagnoni=20
and Nicol=C3=A1s Ojeda B=C3=A4r)=20

- #11880: Restore the correct sigmask in systhreads.=20
(Christiano Haesbaert, review by Guillaume Munch-Maccagnoni and=20
S=C3=A9bastien Hinderer)=20

- #11881: Fix thread-unsafety of registration of operations for "custom"=20
values.=20
(Guillaume Munch-Maccagnoni, review by Gabriel Scherer and KC=20
Sivaramakrishnan)=20

- #11980: fix quadratic behavior in natdynlink by using a STW section=20
for frame-descriptor updates.=20
(Gabriel Scherer, review by Sadiq Jaffer, report by Andr=C3=A9 Maroneze=20
for Frama-C and Guillaume Melquiond for Coq)=20

- #12121: unrooted implementations of caml_callback*_exn=20
(Gabriel Scherer, review by KC Sivaramakrishnan and Xavier Leroy)=20

- #3921, #12039, #12128: poll for signals in long-running polymorphic=20
comparisons.=20
(B. Szilvasy, Gabriel Scherer and Xavier Leroy, review by=20
Stefan Muenzel, Guillaume Munch-Maccagnoni and Damien Doligez)=20

- #12231: Support MinGW-w64 11.0 winpthreads library, where the macro=20
to set up to get flexdll working changed=20
(David Allsopp and Samuel Hym, light review by Xavier Leroy)=20

### Language features:=20

* #11694: Add short syntax for generative functor types `() -> ...`=20
(Jeremy Yallop, review by Gabriel Scherer, Nicol=C3=A1s Ojeda B=C3=A4r,=20
Jacques Garrigue)=20


* #11457: Remove old polymorphic variant syntax.=20
With ``type t =3D [ `A | `B ]``, one could use the syntax `#t` in types,=20
where it means the same thing as `[< t]`, and in patterns, where it means=
=20
``(`A | `B)``. The use of `#t` in types for polymorphic variants=20
was deprecated since 2001, and is now removed. The syntax remains available=
=20
in patterns, or for objects -- when `t` is a class type.=20
(Stefan Muenzel, review by Gabriel Scherer and Jacques Garrigue)=20

* #11984: Add dedicated syntax for generative functor application.=20
Previously, OCaml did not distinguish between `F ()` and=20
`F (struct end)`, even though the latter looks applicative. Instead,=20
the decision between generative and applicative functor application=20
was made based on the type of `F`. With this patch, we now distinguish=20
these two application forms; writing `F (struct end)` for a generative=20
functor leads to new warning 73.=20
(Frederic Bour and Richard Eisenberg, review by Florian Angeletti)=20


- #9975, #11365: Make empty types (`type t =3D |`) immediate.=20
(Antal Spector-Zabusky, review by Gabriel Scherer)=20

### Type system:=20

* #6941, #11187, #12483: prohibit using classes through recursive modules=
=20
inheriting or including a class belonging to a mutually-recursive module=20
would previous behave incorrectly, and now results in a clean error.=20
(Leo White, review by Gabriel Scherer and Florian Angeletti)=20

* #12189, #12211: anonymous row variables in explicitly polymorphic type=20
annotation, e.g. `'a. [< X of 'a ] -> 'a`, are now implicitly=20
universally quantified (in other words, the example above is now read=20
as `'a 'r. ([< X of 'a ] as 'r) -> 'a`).=20
(Florian Angeletti and Gabriel Scherer, review by Jacques Garrigue)=20

### Code generation and optimizations:=20

- #11967: Remove traces of Obj.truncate, which allows some mutable=20
loads to become immutable.=20
(Nick Barnes, review by Vincent Laviron and KC Sivaramakrishnan)=20

- #9945, #10883: Turn boolean-result float comparisons into primitive opera=
tions=20
Uses the architecture's elementary operations for float comparisons,=20
when available, rather than branching and then setting the return value.=20
(Stefan Muenzel, review by Stephen Dolan, Alain Frisch and Vincent Laviron)=
=20

- #8998, #11321, #11430: change mangling of OCaml long identifiers=20
from `camlModule__name_NNN` to `camlModule.name_NNN`. The previous=20
mangling schema, using `__`, was ambiguous.=20
(Xavier Leroy, report by sliquister and Michael Bacarella,=20
review by Gabriel Scherer)=20

- #10834: The -safer-matching option disables type-based optimizations of=
=20
pattern-matching compilation. This allows to produce a match failure if=20
a pattern-matching was wrongly assumed to be exhaustive. Since the=20
exhaustiveness check for GADTs has had bugs in the past, it may be=20
useful if you need extra security with GADTs.=20
(Jacques Garrigue, review by Gabriel Scherer)=20

- #11102: Speed up register allocation by permanently spilling registers=20
(Stephen Dolan, review by Xavier Leroy)=20

- #11383: Restrict the local function optimisation to forbid moving code=20
inside a sub-function=20
(Vincent Laviron, review by Gabriel Scherer)=20

- #11686: Better spilling heuristic for the Linear Scan allocator for more=
=20
efficient stack usage.=20
(Nicol=C3=A1s Ojeda B=C3=A4r, Gabriel Scherer, Alain Frisch, review by Gabr=
iel Scherer,=20
Alain Frisch and Nathana=C3=ABlle Courant)=20

- #11904: Remove arm, i386 native-code backends that were already=20
disabled at configuration time.=20
(Nicol=C3=A1s Ojeda B=C3=A4r, review by Stephen Dolan, Anil Madhavapeddy, a=
nd Xavier=20
Leroy)=20

- #11134: Optimise 'include struct' in more cases=20
(Stephen Dolan, review by Leo White and Vincent Laviron)=20

### Other libraries:=20

- #11374: Remove pointer cast to a type with stricter alignment requirement=
s=20
in Windows implementation of Unix.gettimeofday. Windows implementations of=
=20
caml_unix_map_file, caml_unix_lseek and caml_unix_lseek_64 now release the=
=20
runtime lock. Windows implementation of caml_unix_lockf modernised and=20
simplified. Where possible, 64 bit integers are used instead of LARGE_INTEG=
ER=20
structs.=20
(David Allsopp, review by Jonah Beckford and Xavier Leroy)=20

- #11475: Make Unix terminal interface bindings domain-safe=20
(Olivier Nicole and Xavier Leroy, review by Xavier Leroy)=20

- #11775: Unix.write on a non-blocking socket under Windows will return nor=
mally=20
if the write blocks after some data has already been written (as otherwise=
=20
there is no way of knowing how much data has been written before=20
blocking). The same behaviour was already present under Unix.=20
(Nicol=C3=A1s Ojeda B=C3=A4r, review by David Allsopp)=20

* #11991: Unix on Windows: map ERROR_TOO_MANY_LINKS to EMLINK.=20
(Nicol=C3=A1s Ojeda B=C3=A4r)=20

- #12067: Document Windows specific meanings of `Unix.process_status`=20
type=20
(Samuel Hym, review by David Allsopp)=20

- #12072: Document and test that Sys.rename works over directories too=20
(Jan Midtgaard, review by Anil Madhavapeddy and Xavier Leroy)=20

### Tools:=20

- #11889, #11978: ocamldoc: handle injectivity annotations and wildcards in=
 type=20
parameters.=20
(Florian Angeletti, report by Wiktor Kuchta, review by Jules Aguillon)=20

- #11787: Fix GDB scripts to work with OCaml 5's heap layout. (Nick=20
Barnes)=20

- #11772: fix ocamlyacc's handling of raw string literals=20
(Demi Marie Obenour)=20

- #9290: Add a directive to switch off debugging in toplevel.=20
This allows to see optimized bytecode with -dlambda.=20
(Jacques Garrigue, review by Gabriel Scherer)=20

- #11166: ocamllex: the union of two character sets "cset1 | cset2" can now=
 be=20
used in any context where a character set is expected.=20
(Nicol=C3=A1s Ojeda B=C3=A4r, Martin Jambon, review by S=C3=A9bastien Hinde=
rer)=20

- #11718: ocamlyacc: OCaml-style comments are now supported, in addition to=
=20
the C-style comments already supported. The syntax is the same as that used=
=20
in OCaml code.=20
(Demi Marie Obenour, review by Damien Doligez)=20

- #11728: ocamlyacc: generate line directives for %type declarations=20
(Demi Marie Obenour, review by Damien Doligez)=20

- #11773: ocamlyacc: Do not allow quoted literals (such as 'a' or "bc")=20
in a token name or %type declaration. Previously such literals were=20
accepted by ocamlyacc, but produced malformed OCaml that was rejected=20
by the compiler.=20
(Demi Marie Obenour, review by Gabriel Scherer)=20

- #11774: ocamlyacc: fail if there is an I/O error=20
(Demi Marie Obenour, review by Gabriel Scherer)=20

- #11973: Add support for postfixed mingw host triplets=20
(Romain Beauxis)=20

- #12165: ocamldoc, use standard doctype to avoid quirk mode.=20
(Florian Angeletti, review by Gabriel Scherer)=20

### Manual and documentation:=20

- #11476: Add examples in documentation of Hashtbl, Queue, Atomic, Format=
=20
(Simon Cruanes, review by Yotam Barnoy, Gabriel Scherer, Daniel B=C3=BCnzli=
,=20
Ulugbek Abdullaev, and Nicol=C3=A1s Ojeda B=C3=A4r)=20

- #11883, #11884: Update documentation for In_channel and Out_channel=20
with examples and sections to group related functions.=20
(Kiran Gopinathan, review by Daniel B=C3=BCnzli and Xavier Leroy)=20


- #12095, #12097: Put the sample code of the user's manual and reference=20
documentation of the standard library under the CC0 1.0 Universal=20
(CC0 1.0) Public Domain Dedication license.=20

- #11892: Document the semantic differences of Unix.exec* between Unix and=
=20
Windows.=20
(Boris Yakobowski, review by Daniel B=C3=BCnzli, Gabriel Scherer and Nicol=
=C3=A1s Ojeda=20
B=C3=A4r)=20

- #9430, #11291: Document the general desugaring rules for binding operator=
s.=20
(Gabriel Scherer, review by Nicol=C3=A1s Ojeda B=C3=A4r)=20

- #11481: Fix the type of Unix.umask to Unix.file_perm -> Unix.file_perm=20
(Favonia, review by S=C3=A9bastien Hinderer)=20

- #11514: Document ocamltest builtin variables and actions=20
(Olivier Nicole, review by S=C3=A9bastien Hinderer)=20

- #11676: Fix missing since annotation in the `Sys` and `Format` modules=20
(Github user Bukolab99, review by Florian Angeletti)=20

- #12028: Update format documentation to make it clearer that=20
`pp_print_newline` flushes its newline=20
(Florian Angeletti, review by Gabriel Scherer)=20

- #12201: in the tutorial on modules, replace priority queue example by=20
a simpler example based on FIFO queues.=20
(Xavier Leroy, review by Anil Madhavapeddy and Nicol=C3=A1s Ojeda B=C3=A4r)=
.=20

- #12352: Fix a typo in the documentation of Arg.write_arg=20
(Christophe Raffalli, review by Florian Angeletti)=20

- #7179, #11894: correct the description of CAMLreturn and CAMLreturn0 in=
=20
the Interfacing C page and memory.h file.=20
(Dong An, review by Guillaume Munch-Maccagnoni and Olivier Nicole )=20

### Compiler user-interface and warnings:=20

- #10647: Show hints for the "undefined global" error in the toplevel=20
(Wiktor Kuchta, review by Gabriel Scherer)=20

- #12116: Don't suggest to insert a semicolon when the type is not unit=20
(Jules Aguillon, review by Florian Angeletti)=20

- #11679: Improve the error message about too many arguments to a function=
=20
(Jules Aguillon, review by Gabriel Scherer and Florian Angeletti)=20

- #10009: Improve the error reported by mismatched struct/sig and =3D/: in =
module=20
and module type bindings.=20
(Jules Aguillon, review by Gabriel Scherer)=20

- #11530: Include kinds in kind mismatch error message.=20
"Error: This variant or record definition does not match that of type M.t=
=20
The original is abstract, but this is a record".=20
(Leonhard Markert, review by Gabriel Scherer and Florian Angeletti)=20

- #11646: Add colors to error message hints.=20
(Christiana Anthony, review by Florian Angeletti)=20

- #11235, #11864: usage warnings for constructors and fields can now be dis=
abled=20
on field-by-field or constructor-by-constructor basis=20
(Florian Angeletti, review by Gabriel Scherer)=20

- #11888: Improve the error message when type variables cannot be deduced f=
rom=20
the type parameters:=20
Before:=20
"Error: In this definition, a type variable cannot be deduced=20
from the type parameters."=20
After:=20
"Error: In the GADT constructor=20
T : 'a -> 'a s t=20
the type variable 'a cannot be deduced from the type parameters."=20
(Stefan Muenzel, review by Florian Angeletti and Gabriel Scherer)=20


- #10818: Preserve integer literal formatting in type hint.=20
(Leonhard Markert, review by Gabriel Scherer and Florian Angeletti)=20

- #11338: Turn some partial application warnings into hints.=20
(Leo White, review by Stephen Dolan)=20

- #10931: Improve warning 14 (illegal backslash) with a better explanation=
=20
of the causes and how to fix it.=20
(David Allsopp, Florian Angeletti, Lucas De Angelis, Gabriel Scherer,=20
review by Nicol=C3=A1s Ojeda B=C3=A4r, Florian Angeletti, David Allsopp and=
=20
Gabriel Scherer)=20

- #10911: Improve the location reported by parenthesized assert expressions=
=20
(Fabian Hemmer, review by Gabriel Scherer)=20

- #1391, #7645, #3922: Add an early error when compiling different=20
modules with mismatching -for-pack=20
(Pierre Chambart and Vincent Laviron, review by Mark Shinwell)=20

- #11297: Report "unclosed" error when "done" is missing in a "do .. done"=
=20
construct.=20
(Nicol=C3=A1s Ojeda B=C3=A4r, review by Gabriel Scherer)=20

- #11635, #5461, #10564: turn warning 31 (Module_linked_twice) into a hard =
error=20
for ocamlc =E2=80=94 this was already an error with ocamlopt.=20
(Hugo Heuzard, review by Valentin Gatien-Baron and Gabriel Scherer)=20

- #11653: Add the -no-absname option to ocamlc, ocamlopt and ocamldep.=20
(Abiola Abdulsalam, review by S=C3=A9bastien Hinderer and Florian Angeletti=
)=20

- #11696: Add the -no-g option to ocamlc and ocamlopt.=20
(Abiola Abdulsalam, review by S=C3=A9bastien Hinderer, Nicol=C3=A1s Ojeda B=
=C3=A4r and=20
Florian Angeletti)=20

- #11722: clearer error messages on non-well-founded type definitions=20
(Gabriel Scherer, review by Jacques Garrigue)=20

- #11819: make the `native_compiler` and `native_dynlink` configuration=20
variables available through ocamlc -config.=20
(S=C3=A9bastien Hinderer, review by Gabriel Scherer and David Allsopp)=20

- #8602, #11863: Add -stop-after lambda flag option=20
(Douglas Smith and Dmitrii Kosarev, review by Gabriel Scherer)=20

- #11910: Simplify naming convention for shadowed or ephemeral identifiers =
in=20
error messages (eg: `Illegal shadowing of included type t/2 by t`)=20
(Florian Angeletti, review by Jules Aguillon)=20

- #12024: insert a blank line between separate compiler messages=20
(Gabriel Scherer, review by Florian Angeletti, report by David Wong)=20

- #12088, #9265, #11949: ocamldebug: fix confusing repeating behavior=20
on blank lines within source scripts=20
(Damien Doligez, review by Gabriel Scherer, report by Ga=C3=ABtan Gilbert)=
=20

- #12107: use aliases to mark weak row variables: `_[< ... ]`, `< _..>`, `_=
#ct`=20
are now rendered as `[< ...] as '_weak1`, `< .. > as '_weak1`,=20
and `#ct as '_weak1`.=20
(Florian Angeletti, suggestion by Stefan Muenzel, review by Gabriel Scherer=
)=20

- #12051: Improve the error messages when type variables cannot be generali=
zed=20
(Stefan Muenzel, review by Florian Angeletti)=20

* #12094: Trigger warning 5 (ignored-partial-application) when the scrutine=
e of=20
a pattern matching is of arrow type and all cases match wildcard or excepti=
on=20
patterns.=20
(Nicol=C3=A1s Ojeda B=C3=A4r, review by Gabriel Scherer)=20

### Internal/compiler-libs changes:=20

- #11018, #11869: Clean up Types.Variance, adding a description of=20
the lattice used, and defining explicitly composition.=20
(Jacques Garrigue, review by Gabriel Scherer and Jeremy Yallop)=20

- #11536: Introduce wrapper functions for level management=20
([Ctype.with_level], etc) and for type variable scoping=20
([Typetexp.with_local_type_variable_scope]).=20
The older API ([Ctype.(begin_def,end_def)], [Typetexp.(narrow,widen)], etc.=
)=20
is now removed.=20
(Jacques Garrigue and Takafumi Saikawa, review by Gabriel Scherer)=20

- #11601, #11612, #11628, #11613, #11623, #12120 : Clean up some=20
global state handling in emitcode, bytepackager, bytegen,=20
bytesections, spill.=20
(Hugo Heuzard, Stefan Muenzel, review by Vincent Laviron, Gabriel Scherer=
=20
and Nathana=C3=ABlle Courant)=20

- #12119, #12188, #12191: mirror type constraints on value binding in the=
=20
parsetree:=20
the constraint `typ` in `let pat : typ =3D exp` is now directly stored=20
in the value binding node in the parsetree.=20
(Florian Angeletti, review by Richard Eisenberg)=20

- #11912: Refactoring handling of scoped type variables=20
(Richard Eisenberg, review by Gabriel Scherer and Florian Angeletti)=20


- #11691, #11706: use __asm__ instead of asm for strict ISO C conformance=
=20
(Xavier Leroy, report by Gregg Reynolds , review by Sadiq Jaffer)=20

- #11764: add prototypes to old-style C function definitions and declaratio=
ns=20
(Antonin D=C3=A9cimo, review by Xavier Leroy)=20

- #11693: Remove use of C99 Variable Length Arrays (VLAs) in the runtime.=
=20
(David Allsopp, review by Xavier Leroy, Guillaume Munch-Maccagnoni,=20
Stefan Muenzel and Gabriel Scherer)=20

- #12138: Generalise interface for BUILD_PATH_PREFIX_MAP mapping.=20
Absolute paths are now rewritten too.=20
(Richard L Ford, suggestions and review by Gabriel Scherer)=20

- #10512: explain the compilation strategy for switches on constructors=20
(Gabriel Scherer, review by Vincent Laviron)=20

- #11990: Improve comments and macros around frame descriptors.=20
(Nick Barnes, review by Gabriel Scherer)=20

- #11847, #11849, #11851, #11898: small refactorings in the type checker=20
(Gabriel Scherer, review by Nicol=C3=A1s Ojeda B=C3=A4r)=20

- #11027: Separate typing counter-examples from type_pat into retype_pat;=
=20
type_pat is no longer in CPS.=20
(Jacques Garrigue and Takafumi Saikawa, review by Gabriel Scherer)=20

- #11286, #11515: disambiguate identifiers by using how recently they have=
=20
been bound in the current environment=20
(Florian Angeletti, review by Gabriel Scherer)=20

- #11364: Allow `make -C testsuite promote` to take `TEST` and `LIST` varia=
bles=20
(Antal Spector-Zabusky, review by Gabriel Scherer and David Allsopp)=20

- #11446: document switch compilation (lambda/switch.ml)=20
(Gabriel Scherer, review by Luc Maranget and Vincent Laviron)=20

- #11568: Encode inline record types in Path.t=20
(Leo White and Hyunggyu Jang, review by Gabriel Scherer)=20

- #11569: Remove hash type encoding=20
(Hyunggyu Jang, review by Gabriel Scherer and Florian Angeletti)=20

- #11627: use return values instead of globals for linear scan intervals=20
(Stefan Muenzel, review by Nicol=C3=A1s Ojeda B=C3=A4r)=20

- #11634: Dll.open_dll now properly handles opening for execution while alr=
eady=20
opened for checking=20
(Hugo Heuzard, review by Nicol=C3=A1s Ojeda B=C3=A4r)=20

* #11745, #12358: Debugger and toplevels: embed printer types rather than=
=20
reading their representations from topdirs.cmi at runtime.=20
This change also removes the ocamlmktop initialization module introduced=20
in #11382 which was no longer useful.=20
This change breaks toplevel scripts relying on the visibility of `Topdirs`=
=20
in the initial toplevel environment without loading `topfind`.=20
Since the opam default `.ocamlinit` file loads `topfind`, it is expected=20
that only scripts run with `ocaml -noinit` are affected.=20
For those scripts, accessing `Topdirs` now requires the `compiler-libs`=20
directory to be added to the toplevel search path with=20
```=20
#directory "+compiler-libs";;=20
````=20
as was already the case for the other modules in the toplevel interface=20
library.=20
(S=C3=A9bastien Hinderer, review by Florian Angeletti, Nicol=C3=A1s Ojeda B=
=C3=A4r and=20
Gabriel Scherer)=20

- #11615: remove global variables form asmcomp/linearize.ml=20
(Stefan Muenzel, review by Nicol=C3=A1s Ojeda B=C3=A4r=20

- #10856: Add location, attribute(s) visitors to Tast_mapper/Tast_iterator=
=20
(Yan Dong, review by Nicol=C3=A1s Ojeda B=C3=A4r and Gabriel Scherer)=20

- #11763, #11759, #11861: Enable stricter C compilation warnings, use=20
strict prototypes on primitives.=20
(Antonin D=C3=A9cimo, review by Xavier Leroy, David Allsopp and S=C3=A9bast=
ien=20
Hinderer)=20

- #11933: Use the correct machtype when reading the code pointer from closu=
res=20
(Nathana=C3=ABlle Courant, review by Gabriel Scherer and Vincent Laviron)=
=20

- #11972: refactor runtime/frame_descriptors.c=20
in preparation for quadratic-time fix=20
(Gabriel Scherer, review by Enguerrand Decorne)=20

- #11997: translate structured constants into their Obj.t representation=20
at compile time rather than link time. Changes the way dumpobj prints=20
these constants because their representation becomes untyped.=20
(S=C3=A9bastien Hinderer, review by Xavier Leroy, Nicol=C3=A1s Ojeda B=C3=
=A4r and=20
Hugo Heuzard)=20

- #12011: remove Ctype.reified_var_counter=20
(Takafumi Saikawa and Jacques Garrigue, review by Gabriel Scherer)=20

- #12012: move calls to Typetexp.TyVarEnv.reset inside with_local_level etc=
.=20
(Jacques Garrigue and Takafumi Saikawa, review by Gabriel Scherer)=20

- #12034: a logarithmic algorithm to find the next free variable=20
(Gabriel Scherer, review by Stefan Muenzel)=20

- #12092: remove Lev_module_definition from lambda=20
(Nick Roberts, review by Gabriel Scherer)=20

- #12117: Remove arity-interrupting elaboration of module unpacks=20
(Nick Roberts, review by Richard Eisenberg and Jacques Garrigue)=20

- #12118: stop storing names of predefined exceptions in the=20
cu_required_globals field of compilation unit descriptors.=20
(S=C3=A9bastien Hinderer, review by Vincent Laviron)=20

- #12125: Add Misc.print_see_manual and modify [@manual_ref] to accept=20
lists for simpler printing of manual references=20
(Stefan Muenzel, review by Florian Angeletti)=20

- #12509: Use strict prototypes on primitives when generating a standalone=
=20
bytecode executable (`ocamlc -custom`).=20
(Antonin D=C3=A9cimo, review by Xavier Leroy)=20

### Build system:=20

- #11844: Reduce verbosity of `make` logs by printing program invocations i=
n=20
shorthand (eg `OCAMLC foo.cmo`). Setting `V=3D1` recovers the old style (wi=
th=20
full command-lines).=20
(Xavier Leroy, Nicol=C3=A1s Ojeda B=C3=A4r, review by S=C3=A9bastien Hinder=
er)=20


- #11590: Allow installing to a destination path containing spaces.=20
(=C3=89lie Brami, review by S=C3=A9bastien Hinderer and David Allsopp)=20

- #11243, #11248, #11268, #11420, #11675: merge the sub-makefiles into=20
the root Makefile.=20
(S=C3=A9bastien Hinderer, review by David Allsopp and Florian Angeletti)=20

- #11828: Compile otherlibs/ C stubs in two version for native and bytecode=
=20
(Olivier Nicole, review by S=C3=A9bastien Hinderer and Xavier Leroy)=20

- #12265: Stop adding -lexecinfo to cclibs (leftover debugging code from th=
e=20
multicore project). Harden the feature probe for -lm in configure so -lm is=
=20
only added if strictly necessary. configure.ac now correctly propagates=20
library flags for the Windows ports, allowing Windows OCaml to be configure=
d=20
with ZSTD support.=20
(David Allsopp, review by S=C3=A9bastien Hinderer)=20

- #12372: Pass option -no-execute-only to the linker for OpenBSD >=3D 7.3=
=20
so that code sections remain readable, as needed for closure marshaling.=20
(Xavier Leroy and Anil Madhavapeddy, review by Anil Madhavapeddy and=20
S=C3=A9bastien Hinderer)=20

### Bug fixes:=20

- #12062: fix runtime events consumer: when events are dropped they shouldn=
't be=20
parsed. (Lucas Pluvinage)=20

- #12132: Fix overcounting of minor collections in GC stats.=20
(Damien Doligez, review by Gabriel Scherer)=20

- #12017: Re-register finaliser only after calling user alarm in Gc.create_=
alarm=20
(Fabrice Buoro, report by Sam Goldman, review by Guillaume Munch-Maccagnoni=
)=20

- #11887, #11893: Code duplication in pattern-matching compilation=20
(Vincent Laviron, report par Greta Yorsh, review by Luc Maranget and=20
Gabriel Scherer)=20

- #10664, #11600: Unsoundness in the typing of polymorphic methods=20
involving polymorphic variants=20
(Jacques Garrigue, report by Mike Shulman, review by Gabriel Scherer)=20

- #11302, #11412: `ocamlc` and `ocamlopt` should not remove generated files=
=20
when they are not regular files.=20
(Xavier Leroy, report by Thierry Martinez, review by=20
Anil Madhavapeddy, Nicol=C3=A1s Ojeda B=C3=A4r, David Allsopp)=20

- #10348, #10560, #11561: Expand GADT equations lazily during unification t=
o=20
avoid ambiguity=20
(Jacques Garrigue, review by Leo White)=20

- #11436: Fix wrong stack backtrace for out-of-bound exceptions raised=20
by leaf functions.=20
(Tom Kelly and Xavier Leroy, review by Mark Shinwell)=20

- #11450, #12018: Fix erroneous functor error messages that were too eager =
to=20
cast `struct end` functor arguments as unit modules in `F(struct end)`.=20
(Florian Angetti, review by Gabriel Scherer)=20

- #11643: Add missing test declaration to float_compare test, so that it wi=
ll=20
run.=20
(Stefan Muenzel, review by David Allsopp)=20

- #11630: Use correct location when reporting record labels with non-existe=
nt=20
paths.=20
(Nicol=C3=A1s Ojeda B=C3=A4r, report by Jason Gross, review by Gabriel Sche=
rer)=20

- #11727: Ensure push_defaults can push past module patterns, fixing an=20
currying optimisation accidentally disabled by #10340.=20
(Stephen Dolan, review by Gabriel Scherer)=20

- #11771: Use a more relaxed mode for unification in Ctype.subst=20
(Leo White, review by Jacques Garrigue and Gabriel Scherer)=20

- #11803, #11808: on x86, the destination of an integer comparison must be=
=20
a register, it cannot be a stack slot.=20
(Vincent Laviron, review by Xavier Leroy, report by=20
Emilio Jes=C3=BAs Gallego Arias)=20

- #11809: Protect Parmatch.pats_of_type from missing cmis=20
(Jacques Garrigue, review by Stephen Dolan and Gabriel Scherer)=20

- #11824: Fix a crash when calling `ocamlrun -b`=20
(Florian Angeletti, review by S=C3=A9bastien Hinderer)=20

- #11815: Marshalling continuations raises invalid argument exception.=20
(J=C3=A9r=C3=B4me Vouillon, review by Nicol=C3=A1s Ojeda B=C3=A4r, Stephen =
Dolan and=20
Hugo Heuzard)=20

- #11846: Mark rbx as destroyed at C call for Win64 (mingw-w64 and Cygwin64=
).=20
Reserve the shadow store for the ABI in the c_stack_link struct instead of=
=20
explictly when calling C functions. This simultaneously reduces the number =
of=20
stack pointer manipulations and also fixes a bug when calling noalloc=20
functions where the shadow store was not being reserved.=20
(David Allsopp, report by Vesa Karvonen, review by Xavier Leroy and=20
KC Sivaramakrishnan)=20

- #11850: When stopping before the `emit` phase (using `-stop-after`), an e=
mpty=20
temporary assembly file is no longer left in the file system.=20
(Nicol=C3=A1s Ojeda B=C3=A4r, review by Gabriel Scherer and Xavier Leroy)=
=20

- #11866: Fix the result of `caml_read_directory()` on non-existent paths.=
=20
(Andrei Paskevich and Charl=C3=A8ne Gros, review by David Allsopp and=20
Nicol=C3=A1s Ojeda B=C3=A4r)=20

- #11879: Bugfix for Ctype.nondep_type=20
(Stephen Dolan, review by Gabriel Scherer)=20

- #12004: Don't ignore function attributes on lambdas with locally abstract=
=20
types.=20
(Chris Casinghino, review by Gabriel Scherer)=20

- #12037: Fix some data races by using volatile when necessary=20
(Fabrice Buoro and Olivier Nicole, review by Guillaume Munch-Maccagnoni,=20
Gabriel Scherer and Luc Maranget)=20

- #12046: Flush stderr when tracing the parser=20
(Hugo Heuzard, review by David Allsopp and Nicol=C3=A1s Ojeda B=C3=A4r)=20

- #12061, #12063: don't add inconsistent equalities when computing=20
high-level error messages for functor applications and inclusions.=20
(Florian Angeletti, review by Gabriel Scherer)=20

- #12075: auto-detect whether `ar` support @FILE arguments at=20
configure-time to avoid using this feature with toolchains=20
that do not support it (eg FreeBSD/Darwin).=20
(Nicol=C3=A1s Ojeda B=C3=A4r, review by Xavier Leroy, David Allsop, Javier=
=20
Ch=C3=A1varri, Anil Madhavapeddy)=20

- #12103, 12104: fix a concurrency memory-safety bug in Buffer=20
(Gabriel Scherer, review by Florian Angeletti, report by Samuel Hym)=20

- #12112: Fix caml_callback{2,3}_exn when used with effect handlers.=20
(Lucas Pluvinage, review by Gabriel Scherer, David Allsopp and Xavier Leroy=
)=20

- #12134: Use ghost location for nodes created when handling defaults in=20
optional arguments.=20
(Paul-Elliot Angl=C3=A8s d'Auriac, review by Gabriel Scherer)=20

- #12153: Fix segfault in bytecode programs involving recursive value=20
definitions of values of size 0=20
(Vincent Laviron, Xavier Leroy, Gabriel Scherer,=20
review by Xavier Leroy, report by Nick Roberts)=20

- #12162: Fix miscompilation on amd64 backends involving integer overflows=
=20
(Vincent Laviron and Greta Yorsh, review by Stefan Muenzel)=20

- #12170: fix pthread_geaffinity_np configure check for android=20
(David Allsopp, review by S=C3=A9bastien Hinderer)=20

- #12178: Fix runtime events consumer poll function returning an invalid va=
lue=20
instead of an OCaml integer value. (Lucas Pluvinage)=20

- #12252: Fix shared library build error on RISC-V.=20
(Edwin T=C3=B6r=C3=B6k, review by Nicol=C3=A1s Ojeda B=C3=A4r and Xavier Le=
roy)=20

- #12255, #12256: Handle large signal numbers correctly (Nick Barnes,=20
review by David Allsopp).=20

- #12277: ARM64, fix a potential assembler error for very large functions b=
y=20
emitting stack reallocation code before the body of the function.=20
(Xavier Leroy, review by KC Sivaramakrishnan)=20

- #12253, #12342: Fix infinite loop in signal handling.=20
(Guillaume Munch-Maccagnoni, report by Thomas Leonard, review by=20
KC Sivaramakrishnan and Sadiq Jaffer)=20

- #12445: missing GC root registrations in runtime/io.c=20
(Gabriel Scherer, review by Xavier Leroy and Jeremy Yallop)=20

- #12481, #12505: Fix incorrect initialization of array expressions=20
`[|e1;...;eN|]` when `N` is large enough to require major heap allocation.=
=20
(Xavier Leroy, report by Andrey Popp, analysis by KC Sivaramakrishnan=20
and Vincent Laviron, review by Gabriel Scherer)=20

- #11150, #11207, #11936: Avoid recomputation in Typedecl.check_wellfounded=
=20
(Jacques Garrigue, report by Boris Yakobowski, review by Gabriel Scherer)=
=20

- #11186, #11188: Fix composition of coercions with aliases=20
(Vincent Laviron, report and review by Leo White)=20

- #12486: Fix delivery of unhandled effect exceptions on s390x=20
(Miod Vallat, report by Jan Midtgaard, review by Vincent Laviron and Xavier=
=20
Leroy)=20



--=_91c0edc4-cc8a-4922-8f39-4b6f519f87dd
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><body><div style=3D"font-family: arial, helvetica, sans-serif; font-s=
ize: 12pt; color: #000000"><div data-marker=3D"__QUOTED_TEXT__"><div style=
=3D"font-family:'arial' , 'helvetica' , sans-serif;font-size:12pt;color:#00=
0000"><div>Dear OCaml users,<br></div><br><div>We have the pleasure of cele=
brating the anniversary of Olympe de Gouges'</div><div>"Declaration of the =
Rights of Woman and of the Female Citizen" by announcing the<br>release of =
OCaml version 5.1.0.<br><br>Some of the highlights in OCaml 5.1.0 are:<br><=
br>&nbsp;&nbsp; - Many runtime performance regression and memory-leaks fixe=
s<br>&nbsp; &nbsp;&nbsp; (dynlinking, weak array, weak hash sets, GC with i=
dle domains, GC prefetching)<br>&nbsp;&nbsp; - Restored support for native =
code generation on RISC-V and s390x architectures<br>&nbsp;&nbsp; - Restore=
d Cygwin port<br>&nbsp;&nbsp; - Reduced installation size (50% reduction)<b=
r>&nbsp;&nbsp; - Compressed compilation artefacts (.cmi, .cmt, .cmti, .cmo,=
 .cma files)<br>&nbsp;&nbsp; - 19 error message improvements<br>&nbsp;&nbsp=
; - 14 standard library functions made tail-recursive with Tail-Recursion-M=
odulo-Cons (TRMC), such as `List.append` and `List.map`<br>&nbsp;&nbsp; - 5=
7 new standard library functions<br>&nbsp;&nbsp; - More examples in the sta=
ndard library documentation<br>&nbsp;&nbsp; - 42 bug fixes<br><br>OCaml 5.1=
.0 is still a relatively experimental release compared to the OCaml 4.14 br=
anch. In particular:<br><br>&nbsp;&nbsp; - The POWER port is being tested i=
n the dev version of the compiler.<br>&nbsp;&nbsp; - The Windows MSVC port =
is still unavailable.<br>&nbsp;&nbsp; - Ephemeron performances need to be i=
nvestigated.<br>&nbsp;&nbsp; - GC compaction is a work in progress.<br>&nbs=
p;&nbsp; - `statmemprof` is a work in progress.<br>&nbsp;&nbsp; - There are=
 a number of known runtime concurrency bugs (that trigger under<br>&nbsp;&n=
bsp;&nbsp;&nbsp; rare circumstances).<br><br>We are planning to address tho=
se regressions, hopefully in time for the OCaml 5.2.0 release for some of t=
hem.</div><div>Meanwhile, the OCaml 4.14 branch will be maintained, and the=
 next release on the OCaml 4.14 branch, OCaml 4.14.2, should follow this re=
lease in the upcoming months.<br><br>Please report any unexpected behaviour=
s on the OCaml issue tracker (https://github.com/ocaml/ocaml/issues)<br>and=
 post any questions or comments you might have on our discussion forums at =
https://discuss.ocaml.org.<br><br>The full list of changes can be found in =
the changelog below.</div><div><br>Happy hacking,<br>=E2=80=94 Florian Ange=
letti for the OCaml team.</div><br><div>Installation Instructions<br></div>=
<div>------------------------------<br></div><div><br>The base compiler can=
 be installed as an opam switch with the following commands:<br><br>&nbsp;&=
nbsp;&nbsp; opam update<br>&nbsp;&nbsp;&nbsp; opam switch create 5.1.0<br><=
br>The source code for the release candidate is also directly available on:=
<br><br>* GitHub: https://github.com/ocaml/ocaml/archive/5.1.0.tar.gz<br>* =
OCaml archives at Inria: https://caml.inria.fr/pub/distrib/ocaml-5.1/ocaml-=
5.1.0.tar.gz<br><br>Fine-Tuned Compiler Configuration</div><div>-----------=
-----------------------------------<br><br>If you want to tweak the configu=
ration of the compiler, you can switch to the option variant with:<br><br>&=
nbsp;&nbsp;&nbsp; opam update<br>&nbsp;&nbsp;&nbsp; opam switch create &lt;=
switch_name&gt; ocaml-variants.5.1.0+options &lt;option_list&gt;<br><br>whe=
re `&lt;option_list&gt;` is a comma-separated list of `ocaml-option-*` pack=
ages. For instance, for a `flambda` and `no-flat-float-array` switch:<br><b=
r>&nbsp;&nbsp;&nbsp; opam switch create 5.1.0+flambda+nffa ocaml-variants.5=
.1.0+options ocaml-option-flambda ocaml-option-no-flat-float-array<br><br><=
br>Changelog for OCaml 5.1.0 (14 September 2023)</div><div>----------------=
-----------------------------------------------------<br><br>### Restored b=
ackends<br><br>- #11418, #11708: RISC-V multicore support.<br>&nbsp; (Nicol=
=C3=A1s Ojeda B=C3=A4r, review by KC Sivaramakrishnan)<br><br>- #11712, #12=
258, #12261: s390x / IBM Z multicore support:<br>&nbsp; OCaml &amp; C stack=
 separation; dynamic stack size checks; fiber and<br>&nbsp; effects support=
.<br>&nbsp; (Aleksei Nikiforov, with help from Vincent Laviron and Xavier L=
eroy,<br>&nbsp;&nbsp; additional suggestions by Luc Maranget,<br>&nbsp;&nbs=
p; review by the same and KC Sivaramakrishnan)<br><br>- #11642: Restore Cyg=
win port. Add GC messages for address space reservations<br>&nbsp; when OCA=
MLRUNPARAM option v includes 0x1000.<br>&nbsp; (David Allsopp, review by Xa=
vier Leroy, Guillaume Munch-Maccagnoni<br>&nbsp; and Gabriel Scherer)<br><b=
r>### Standard library:<br><br>- #12006, #12064: Add `Marshal.Compression` =
flag to `Marshal.to_*` functions.<br>&nbsp; When this flag is explicitly se=
t, marshaled data is compressed using ZSTD.<br>&nbsp; On some practical exa=
mples, the marshalled output became three times smaller<br>&nbsp; at no not=
iceable cost on the marshalling time.<br>&nbsp; (Xavier Leroy, review by Ed=
win T=C3=B6r=C3=B6k and Gabriel Scherer, fix by Damien<br>&nbsp;&nbsp; Doli=
gez)<br><br>- #10464: Add List.is_empty.<br>&nbsp; (Craig Ferguson, review =
by David Allsopp)<br><br>- #11848: Add `List.find_mapi`,<br>&nbsp; `List.fi=
nd_index: ('a -&gt; bool) -&gt; 'a list -&gt; int option`,<br>&nbsp; `Seq.f=
ind_mapi`, `Seq.find_index`, `Array.find_mapi`, `Array.find_index`,<br>&nbs=
p; `Float.Array.find_opt`, `Float.Array.find_index`, `Float.Array.find_map`=
,<br>&nbsp; `Float.Array.find_mapi`.<br>&nbsp; (Sima Kinsart, review by Dan=
iel B=C3=BCnzli and Nicol=C3=A1s Ojeda B=C3=A4r)<br><br>- #11410: Add Set.t=
o_list, Map.to_list, Map.of_list,<br>&nbsp; `Map.add_to_list: key -&gt; 'a =
-&gt; 'a list t -&gt; 'a list t`.<br>&nbsp; (Daniel B=C3=BCnzli, review by =
Nicol=C3=A1s Ojeda B=C3=A4r and Gabriel Scherer)<br><br>- #11836, #11837: A=
dd `Array.map_inplace`, `Array.mapi_inplace`,<br>&nbsp; `Float.Array.mapi_i=
nplace` and `Float.Array.mapi_inplace`.<br>&nbsp; (L=C3=A9o Andr=C3=A8s, re=
view by Gabriel Scherer, KC Sivaramakrishnan and<br>&nbsp; Nicol=C3=A1s Oje=
da B=C3=A4r)<br><br>- #10967: Add Filename.temp_dir.<br>&nbsp; (David Turne=
r, review by Anil Madhavapeddy, Valentin Gatien-Baron, Nicol=C3=A1s<br>&nbs=
p; Ojeda B=C3=A4r, Gabriel Scherer, and Daniel B=C3=BCnzli)<br><br>- #11246=
: Add "hash" and "seeded_hash" functions to Bool, Int, Char, Float,<br>&nbs=
p; Int32, Int64, and Nativeint.<br>&nbsp; (Nicol=C3=A1s Ojeda B=C3=A4r, rev=
iew by Xavier Leroy and Gabriel Scherer)<br><br>- #11488: Add `Mutex.protec=
t: Mutex.t -&gt; (unit -&gt; 'a) -&gt; 'a`<br>&nbsp; for resource-safe crit=
ical sections protected by a mutex.<br>&nbsp; (Simon Cruanes, review by Gab=
riel Scherer, Xavier Leroy,<br>&nbsp;&nbsp; Guillaume Munch-Maccagnoni)<br>=
<br>- #11581: Add type equality witness<br>&nbsp;&nbsp;&nbsp; `type (_, _) =
eq =3D Equal: ('a, 'a) eq`<br>&nbsp; in a new module Stdlib.Type.<br>&nbsp;=
 (Nicol=C3=A1s Ojeda B=C3=A4r, review by Daniel B=C3=BCnzli, Jacques Garrig=
ue, Florian<br>&nbsp; Angeletti, Alain Frisch, Gabriel Scherer, Jeremy Yall=
op and Xavier Leroy)<br><br>- #11843: Add `In_channel.input_lines` and `In_=
channel.fold_lines`.<br>&nbsp; (Xavier Leroy, review by Nicol=C3=A1s Ojeda =
B=C3=A4r and Wiktor Kuchta).<br><br>- #11856, #11859: Using TRMC, the follo=
wing `Stdlib` functions are now<br>&nbsp; tail-recursive:<br>&nbsp;&nbsp;&n=
bsp; Stdlib.(@), List.append,<br>&nbsp;&nbsp;&nbsp; List.concat_map.<br>&nb=
sp; (Jeremy Yallop, review by Daniel B=C3=BCnzli, Anil Madhavapeddy, Nicol=
=C3=A1s Ojeda B=C3=A4r,<br>&nbsp;&nbsp; Gabriel Scherer, and Bannerets)<br>=
<br>- #11362, #11402: Using TRMC, the following `Stdlib` functions are now<=
br>&nbsp; tail-recursive:<br>&nbsp;&nbsp;&nbsp; List.map, List.mapi, List.m=
ap2,<br>&nbsp;&nbsp;&nbsp; List.filter, List.filteri, List.filter_map,<br>&=
nbsp;&nbsp;&nbsp; List.init,<br>&nbsp;&nbsp;&nbsp; List.of_seq.<br>&nbsp; (=
Nicol=C3=A1s Ojeda B=C3=A4r, review by Xavier Leroy and Gabriel Scherer)<br=
><br><br>- #11878, #11965: Prevent seek_in from marking buffer data as vali=
d after<br>&nbsp; closing the channel. This could lead to inputting uniniti=
alized bytes.<br>&nbsp; (Samuel Hym, review by Xavier Leroy and Olivier Nic=
ole)<br><br>- #11128: Add In_channel.isatty, Out_channel.isatty.<br>&nbsp; =
(Nicol=C3=A1s Ojeda B=C3=A4r, review by Gabriel Scherer and Florian Angelet=
ti)<br><br>- #10859: Add `Format.pp_print_iter` and `Format.pp_print_array`=
.<br>&nbsp; (L=C3=A9o Andr=C3=A8s and Daniel B=C3=BCnzli, review by David A=
llsopp and Hugo Heuzard)<br><br>- #10789: Add `Stack.drop`<br>&nbsp; (L=C3=
=A9o Andr=C3=A8s, review by Gabriel Scherer)<br><br>* #10899: Change Stdlib=
.nan from signaling NaN to quiet NaN.<br>&nbsp; (Greta Yorsh, review by Xav=
ier Leroy, Guillaume Melquiond and<br>&nbsp; Gabriel Scherer)<br><br>- #110=
26, #11667, #11858: Rename the type of the accumulator<br>&nbsp; of fold fu=
nctions to 'acc:<br>&nbsp; fold_left : ('acc -&gt; 'a -&gt; 'acc) -&gt; 'ac=
c -&gt; 'a list -&gt; 'acc<br>&nbsp; fold_right : ('a -&gt; 'acc -&gt; 'acc=
) -&gt; 'a list -&gt; 'acc -&gt; 'acc<br>&nbsp; fold_left_map : ('acc -&gt;=
 'a -&gt; 'acc * 'b) -&gt; 'acc -&gt; 'a list -&gt; 'acc * 'b list<br>&nbsp=
; ...<br>&nbsp; (Valentin Gatien-Baron and Francois Berenger,<br>&nbsp; rev=
iew by Gabriel Scherer and Nicol=C3=A1s Ojeda B=C3=A4r)<br><br>- #11354: Ha=
shtbl.find_all is now tail-recursive.<br>&nbsp; (Ferm=C3=ADn Reig, review b=
y Gabriel Scherer)<br><br>- #11500: Make Hashtbl.mem non-allocating.<br>&nb=
sp; (Simmo Saan, review by Nicol=C3=A1s Ojeda B=C3=A4r)<br><br>- #11412: Ad=
d Sys.is_regular_file<br>&nbsp; (Xavier Leroy, review by Anil Madhavapeddy,=
 Nicol=C3=A1s Ojeda B=C3=A4r, David Allsopp)<br><br>- #11322, #11329: seria=
lization functions Random.State.{of,to}_binary_string<br>&nbsp; between Ran=
dom.State.t and string<br>&nbsp; (Gabriel Scherer, report by Yotam Barnoy,<=
br>&nbsp;&nbsp; review by Daniel B=C3=BCnzli, Damien Doligez, Hugo Heuzard =
and Xavier Leroy)<br><br>- #11830: Add Type.Id with<br>&nbsp; `val provably=
_equal : 'a Type.Id.t -&gt; 'b Type.Id.t -&gt; ('a, 'b) Type.eq option`<br>=
&nbsp; (Daniel B=C3=BCnzli, review by Jeremy Yallop, Gabriel Scherer, Wikto=
r Kuchta,<br>&nbsp;&nbsp; Nicol=C3=A1s Ojeda B=C3=A4r)<br><br>- #12184, #12=
320: Sys.rename Windows fixes on directory corner cases.<br>&nbsp; (Jan Mid=
tgaard, review by Anil Madhavapeddy)<br><br>* #11565: Enable -strict-format=
s by default. Some incorrect format<br>&nbsp; specifications (for `printf`)=
 where silently ignored and now fail.<br>&nbsp; Those new failures occur at=
 compile-time, except if you use advanced<br>&nbsp; format features like `%=
(...%)` that parse format strings dynamically.<br>&nbsp; Pass -no-strict-fo=
rmats to revert to the previous lenient behavior.<br>&nbsp; (Nicol=C3=A1s O=
jeda B=C3=A4r, review by David Allsopp)<br><br>### Installation size<br><br=
>&nbsp; Specific efforts have been made during this release to reduce the f=
ilesystem<br>size of installed artifacts of the compiler distribution.<br>T=
he installation size of 5.1 is 272 MiB compared to 521 MiB for 5.0.<br>Some=
 of those changes will benefit all OCaml packages.<br><br>- ocaml/RFCs#23, =
#12006: use compressed marshaled format from #12006 for .cmi,<br>&nbsp; .cm=
t, .cmti files, and for debug info in .cmo and .cma files, resulting in<br>=
&nbsp; major reduction in size.<br>&nbsp; (Xavier Leroy, review by Edwin T=
=C3=B6r=C3=B6k and Gabriel Scherer,<br>&nbsp;&nbsp; RFC by Simon Cruanes)<b=
r><br>- #11981: Reduce size of OCaml installations by removing debugging in=
formation<br>&nbsp; from installed bytecode executables.&nbsp; It is no lon=
ger possible to<br>&nbsp; run ocamldebug over these installed bytecode exec=
utables, nor to get<br>&nbsp; exception backtraces for them.<br>&nbsp; (Xav=
ier Leroy, review by David Allsopp, report by Fabrice Le Fessant)<br><br>* =
#11993: install only bytecode executables for the `ocamlmklib`, `ocamlcmt`,=
<br>&nbsp; `ocamlprof`, `ocamlcp`, `ocamloptp`, and `ocamlmktop` tools, but=
 no<br>&nbsp; native-code executables.&nbsp; A tool like `ocamlmklib` for e=
xample is now<br>&nbsp; installed directly to `$BINDIR/ocamlmklib`; `ocamlm=
klib.byte` and<br>&nbsp; `ocamlmklib.opt` are no longer installed to `$BIND=
IR`.<br>&nbsp; (Xavier Leroy, review by Gabriel Scherer)<br><br>### Runtime=
 system:<br><br>- #11589, #11903: Modify the GC pacing code to make sure th=
e GC keeps<br>&nbsp;&nbsp; up with allocations in the presence of idle doma=
ins.<br>&nbsp;&nbsp; (Damien Doligez and Stephen Dolan, report by Florian A=
ngeletti,<br>&nbsp;&nbsp; review by KC Sivaramakrishnan and Sadiq Jaffer)<b=
r><br>- #11743: Speed up weak array operations<br>&nbsp; (KC Sivaramakrishn=
an, review by Fran=C3=A7ois Bobot and Sadiq Jaffer)<br><br>- #12131: Simpli=
fy implementation of weak hash sets, fixing a<br>&nbsp; performance regress=
ion. (Nick Barnes, review by Fran=C3=A7ois Bobot,<br>&nbsp; Alain Frisch an=
d Damien Doligez).<br><br>- #11474, #11998, #12065: Add support for user-de=
fined events in the runtime<br>&nbsp; event tracing system.<br>&nbsp; (Luca=
s Pluvinage, review by Sadiq Jaffer, Guillaume Munch-Maccagnoni,<br>&nbsp;&=
nbsp; Enguerrand Decorne, Gabriel Scherer and Anil Madhavapeddy)<br><br>- #=
11827, #12249: Restore prefetching for GC marking<br>&nbsp; (Fabrice Buoro =
and Stephen Dolan, review by Gabriel Scherer and Sadiq Jaffer)<br><br>- #11=
144: Restore frame-pointers support for amd64<br>&nbsp; (Fabrice Buoro, rev=
iew by Frederic Bour and KC Sivaramakrishnan)<br><br>- #11935: Load frameta=
bles of dynlink'd modules in batch<br>&nbsp; (Stephen Dolan, review by Davi=
d Allsopp and Guillaume Munch-Maccagnoni)<br><br>- #11284, #12525: Use comp=
ression of entries scheme when pruning mark stack.<br>&nbsp; Can decrease m=
emory usage for some workloads, otherwise should be<br>&nbsp; unobservable.=
<br>&nbsp; (Tom Kelly, review by Sabine Schmaltz, Sadiq Jaffer and Damien D=
oligez)<br><br>* #11865, #11868, #11876: Clarify that the operations of a c=
ustom<br>&nbsp; block must never access the OCaml runtime. The previous<br>=
&nbsp; documentation only mentioned the main illicit usages. In particular,=
<br>&nbsp; since OCaml 5.0, it is no longer safe to call<br>&nbsp; `caml_re=
move_global_root` or `caml_remove_generational_global_root`<br>&nbsp; from =
within the C finalizer of a custom block, or within the<br>&nbsp; finalizat=
ion function passed to `caml_alloc_final`. As a workaround,<br>&nbsp; such =
a finalization operation can be registered with `Gc.finalize`<br>&nbsp; ins=
tead, which guarantees to run the finalizer at a safe point.<br>&nbsp; (Rep=
ort by Timothy Bourke, discussion by Yotam Barnoy, Timothy<br>&nbsp; Bourke=
, Sadiq Jaffer, Xavier Leroy, Guillaume Munch-Maccagnoni, and<br>&nbsp; Gab=
riel Scherer)<br><br>- #12130: Fix multicore crashes with weak hash sets. F=
ixes #11934.<br>&nbsp; (Nick Barnes, review by Fran=C3=A7ois Bobot)<br><br>=
- #12099: Add ocamlrund option, -events, to produce a trace of<br>&nbsp; de=
bug events during bytecode interpretation. Fixes #12098.<br>&nbsp; (Richard=
 L Ford, review by Gabriel Scherer)<br><br>- #12001: Fix book keeping for l=
ast finalisers during the minor cycle<br>&nbsp; (KC Sivaramakrishnan and En=
guerrand Decorne, report by Guillaume Bury<br>&nbsp;&nbsp; and Vincent Lavi=
ron, review by Sadiq Jaffer and KC Sivaramakrishnan)<br><br>- #11919: New r=
untime events counters for major heap stats and minor heap<br>&nbsp; resizi=
ng.<br>&nbsp; (Sadiq Jaffer, review by Gabriel Scherer and David Allsopp)<b=
r><br>- #11287, #11872, #11955: Clean up reserved header bits (once used fo=
r<br>&nbsp; Spacetime profiling).<br>&nbsp; (Nick Barnes, review by Gabriel=
 Scherer and Damien Doligez)<br><br>- #11750: Decouple major slice from min=
or GC.<br>&nbsp; (KC Sivaramakrishnan, review by Sadiq Jaffer, Guillaume Mu=
nch-Maccagnoni and<br>&nbsp; Damien Doligez)<br><br>- #11796: protect lazy =
computation of code fragment digest by a mutex.<br>&nbsp; This makes the th=
read sanitizer happier, and avoids duplicating<br>&nbsp; the hashing work.<=
br>&nbsp; (Gabriel Scherer, review by Xavier Leroy, report by Olivier Nicol=
e)<br><br>- #11137: new `Unsafe_store_tag(val, new_tag)` macro to stop usin=
g<br>&nbsp; `Tag_val(val)` as lvalue.<br>&nbsp; (Gabriel Scherer, review by=
 Xavier Leroy, Guillaume Munch-Maccagnoni<br>&nbsp;&nbsp; and Nicol=C3=A1s =
Ojeda B=C3=A4r)<br><br>- #11880: Restore the correct sigmask in systhreads.=
<br>&nbsp; (Christiano Haesbaert, review by Guillaume Munch-Maccagnoni and<=
br>&nbsp;&nbsp; S=C3=A9bastien Hinderer)<br><br>- #11881: Fix thread-unsafe=
ty of registration of operations for "custom"<br>&nbsp;&nbsp; values.<br>&n=
bsp; (Guillaume Munch-Maccagnoni, review by Gabriel Scherer and KC<br>&nbsp=
;&nbsp; Sivaramakrishnan)<br><br>- #11980: fix quadratic behavior in natdyn=
link by using a STW section<br>&nbsp; for frame-descriptor updates.<br>&nbs=
p; (Gabriel Scherer, review by Sadiq Jaffer, report by Andr=C3=A9 Maroneze<=
br>&nbsp; for Frama-C and Guillaume Melquiond for Coq)<br><br>- #12121: unr=
ooted implementations of caml_callback*_exn<br>&nbsp; (Gabriel Scherer, rev=
iew by KC Sivaramakrishnan and Xavier Leroy)<br><br>- #3921, #12039, #12128=
: poll for signals in long-running polymorphic<br>&nbsp; comparisons.<br>&n=
bsp; (B. Szilvasy, Gabriel Scherer and Xavier Leroy, review by<br>&nbsp;&nb=
sp; Stefan Muenzel, Guillaume Munch-Maccagnoni and Damien Doligez)<br><br>-=
 #12231: Support MinGW-w64 11.0 winpthreads library, where the macro<br>&nb=
sp; to set up to get flexdll working changed<br>&nbsp; (David Allsopp and S=
amuel Hym, light review by Xavier Leroy)<br><br>### Language features:<br><=
br>* #11694: Add short syntax for generative functor types `() -&gt; ...`<b=
r>&nbsp; (Jeremy Yallop, review by Gabriel Scherer, Nicol=C3=A1s Ojeda B=C3=
=A4r,<br>&nbsp; Jacques Garrigue)<br><br><br>* #11457: Remove old polymorph=
ic variant syntax.<br>&nbsp; With ``type t =3D [ `A | `B ]``, one could use=
 the syntax `#t` in types,<br>&nbsp; where it means the same thing as `[&lt=
; t]`, and in patterns, where it means<br>&nbsp; ``(`A | `B)``. The use of =
`#t` in types for polymorphic variants<br>&nbsp; was deprecated since 2001,=
 and is now removed. The syntax remains available<br>&nbsp; in patterns, or=
 for objects -- when `t` is a class type.<br>&nbsp; (Stefan Muenzel, review=
 by Gabriel Scherer and Jacques Garrigue)<br><br>* #11984: Add dedicated sy=
ntax for generative functor application.<br>&nbsp; Previously, OCaml did no=
t distinguish between `F ()` and<br>&nbsp; `F (struct end)`, even though th=
e latter looks applicative. Instead,<br>&nbsp; the decision between generat=
ive and applicative functor application<br>&nbsp; was made based on the typ=
e of `F`. With this patch, we now distinguish<br>&nbsp; these two applicati=
on forms; writing `F (struct end)` for a generative<br>&nbsp; functor leads=
 to new warning 73.<br>&nbsp; (Frederic Bour and Richard Eisenberg, review =
by Florian Angeletti)<br><br><br>- #9975, #11365: Make empty types (`type t=
 =3D |`) immediate.<br>&nbsp; (Antal Spector-Zabusky, review by Gabriel Sch=
erer)<br><br>### Type system:<br><br>* #6941, #11187, #12483: prohibit usin=
g classes through recursive modules<br>&nbsp; inheriting or including a cla=
ss belonging to a mutually-recursive module<br>&nbsp; would previous behave=
 incorrectly, and now results in a clean error.<br>&nbsp; (Leo White, revie=
w by Gabriel Scherer and Florian Angeletti)<br><br>* #12189, #12211: anonym=
ous row variables in explicitly polymorphic type<br>&nbsp; annotation, e.g.=
 `'a. [&lt; X of 'a ] -&gt; 'a`, are now implicitly<br>&nbsp; universally q=
uantified (in other words, the example above is now read<br>&nbsp; as `'a '=
r. ([&lt; X of 'a ] as 'r) -&gt; 'a`).<br>&nbsp; (Florian Angeletti and Gab=
riel Scherer, review by Jacques Garrigue)<br><br>### Code generation and op=
timizations:<br><br>- #11967: Remove traces of Obj.truncate, which allows s=
ome mutable<br>&nbsp; loads to become immutable.<br>&nbsp; (Nick Barnes, re=
view by Vincent Laviron and KC Sivaramakrishnan)<br><br>- #9945, #10883: Tu=
rn boolean-result float comparisons into primitive operations<br>&nbsp; Use=
s the architecture's elementary operations for float comparisons,<br>&nbsp;=
 when available, rather than branching and then setting the return value.<b=
r>&nbsp; (Stefan Muenzel, review by Stephen Dolan, Alain Frisch and Vincent=
 Laviron)<br><br>- #8998, #11321, #11430: change mangling of OCaml long ide=
ntifiers<br>&nbsp; from `camlModule__name_NNN` to `camlModule.name_NNN`.&nb=
sp; The previous<br>&nbsp; mangling schema, using `__`, was ambiguous.<br>&=
nbsp; (Xavier Leroy, report by sliquister and Michael Bacarella,<br>&nbsp;&=
nbsp; review by Gabriel Scherer)<br><br>- #10834: The -safer-matching optio=
n disables type-based optimizations of<br>&nbsp; pattern-matching compilati=
on. This allows to produce a match failure if<br>&nbsp; a pattern-matching =
was wrongly assumed to be exhaustive. Since the<br>&nbsp; exhaustiveness ch=
eck for GADTs has had bugs in the past, it may be<br>&nbsp; useful if you n=
eed extra security with GADTs.<br>&nbsp; (Jacques Garrigue, review by Gabri=
el Scherer)<br><br>- #11102: Speed up register allocation by permanently sp=
illing registers<br>&nbsp; (Stephen Dolan, review by Xavier Leroy)<br><br>-=
 #11383: Restrict the local function optimisation to forbid moving code<br>=
&nbsp; inside a sub-function<br>&nbsp; (Vincent Laviron, review by Gabriel =
Scherer)<br><br>- #11686: Better spilling heuristic for the Linear Scan all=
ocator for more<br>&nbsp; efficient stack usage.<br>&nbsp; (Nicol=C3=A1s Oj=
eda B=C3=A4r, Gabriel Scherer, Alain Frisch, review by Gabriel Scherer,<br>=
&nbsp; Alain Frisch and Nathana=C3=ABlle Courant)<br><br>- #11904: Remove a=
rm, i386 native-code backends that were already<br>&nbsp; disabled at confi=
guration time.<br>&nbsp; (Nicol=C3=A1s Ojeda B=C3=A4r, review by Stephen Do=
lan, Anil Madhavapeddy, and Xavier<br>&nbsp; Leroy)<br><br>- #11134: Optimi=
se 'include struct' in more cases<br>&nbsp; (Stephen Dolan, review by Leo W=
hite and Vincent Laviron)<br><br>### Other libraries:<br><br>- #11374: Remo=
ve pointer cast to a type with stricter alignment requirements<br>&nbsp; in=
 Windows implementation of Unix.gettimeofday. Windows implementations of<br=
>&nbsp; caml_unix_map_file, caml_unix_lseek and caml_unix_lseek_64 now rele=
ase the<br>&nbsp; runtime lock. Windows implementation of caml_unix_lockf m=
odernised and<br>&nbsp; simplified. Where possible, 64 bit integers are use=
d instead of LARGE_INTEGER<br>&nbsp; structs.<br>&nbsp; (David Allsopp, rev=
iew by Jonah Beckford and Xavier Leroy)<br><br>- #11475: Make Unix terminal=
 interface bindings domain-safe<br>&nbsp; (Olivier Nicole and Xavier Leroy,=
 review by Xavier Leroy)<br><br>- #11775: Unix.write on a non-blocking sock=
et under Windows will return normally<br>&nbsp; if the write blocks after s=
ome data has already been written (as otherwise<br>&nbsp; there is no way o=
f knowing how much data has been written before<br>&nbsp; blocking). The sa=
me behaviour was already present under Unix.<br>&nbsp; (Nicol=C3=A1s Ojeda =
B=C3=A4r, review by David Allsopp)<br><br>* #11991: Unix on Windows: map ER=
ROR_TOO_MANY_LINKS to EMLINK.<br>&nbsp; (Nicol=C3=A1s Ojeda B=C3=A4r)<br><b=
r>- #12067: Document Windows specific meanings of `Unix.process_status`<br>=
&nbsp; type<br>&nbsp; (Samuel Hym, review by David Allsopp)<br><br>- #12072=
: Document and test that Sys.rename works over directories too<br>&nbsp; (J=
an Midtgaard, review by Anil Madhavapeddy and Xavier Leroy)<br><br>### Tool=
s:<br><br>- #11889, #11978: ocamldoc: handle injectivity annotations and wi=
ldcards in type<br>&nbsp; parameters.<br>&nbsp; (Florian Angeletti, report =
by Wiktor Kuchta, review by Jules Aguillon)<br><br>- #11787: Fix GDB script=
s to work with OCaml 5's heap layout. (Nick<br>&nbsp; Barnes)<br><br>- #117=
72: fix ocamlyacc's handling of raw string literals<br>&nbsp; (Demi Marie O=
benour)<br><br>- #9290: Add a directive to switch off debugging in toplevel=
.<br>&nbsp; This allows to see optimized bytecode with -dlambda.<br>&nbsp; =
(Jacques Garrigue, review by Gabriel Scherer)<br><br>- #11166: ocamllex: th=
e union of two character sets "cset1 | cset2" can now be<br>&nbsp; used in =
any context where a character set is expected.<br>&nbsp; (Nicol=C3=A1s Ojed=
a B=C3=A4r, Martin Jambon, review by S=C3=A9bastien Hinderer)<br><br>- #117=
18: ocamlyacc: OCaml-style comments are now supported, in addition to<br>&n=
bsp; the C-style comments already supported.&nbsp; The syntax is the same a=
s that used<br>&nbsp; in OCaml code.<br>&nbsp; (Demi Marie Obenour, review =
by Damien Doligez)<br><br>- #11728: ocamlyacc: generate line directives for=
 %type declarations<br>&nbsp; (Demi Marie Obenour, review by Damien Doligez=
)<br><br>- #11773: ocamlyacc: Do not allow quoted literals (such as 'a' or =
"bc")<br>&nbsp; in a token name or %type declaration.&nbsp; Previously such=
 literals were<br>&nbsp; accepted by ocamlyacc, but produced malformed OCam=
l that was rejected<br>&nbsp; by the compiler.<br>&nbsp; (Demi Marie Obenou=
r, review by Gabriel Scherer)<br><br>- #11774: ocamlyacc: fail if there is =
an I/O error<br>&nbsp; (Demi Marie Obenour, review by Gabriel Scherer)<br><=
br>- #11973: Add support for postfixed mingw host triplets<br>&nbsp; (Romai=
n Beauxis)<br><br>- #12165: ocamldoc, use standard doctype to avoid quirk m=
ode.<br>&nbsp; (Florian Angeletti, review by Gabriel Scherer)<br><br>### Ma=
nual and documentation:<br><br>- #11476: Add examples in documentation of H=
ashtbl, Queue, Atomic, Format<br>&nbsp; (Simon Cruanes, review by Yotam Bar=
noy, Gabriel Scherer, Daniel B=C3=BCnzli,<br>&nbsp;&nbsp; Ulugbek Abdullaev=
, and Nicol=C3=A1s Ojeda B=C3=A4r)<br><br>- #11883, #11884: Update document=
ation for In_channel and Out_channel<br>&nbsp; with examples and sections t=
o group related functions.<br>&nbsp; (Kiran Gopinathan, review by Daniel B=
=C3=BCnzli and Xavier Leroy)<br><br><br>- #12095, #12097: Put the sample co=
de of the user's manual and reference<br>&nbsp; documentation of the standa=
rd library under the CC0 1.0 Universal<br>&nbsp; (CC0 1.0) Public Domain De=
dication license.<br><br>- #11892: Document the semantic differences of Uni=
x.exec* between Unix and<br>&nbsp; Windows.<br>&nbsp; (Boris Yakobowski, re=
view by Daniel B=C3=BCnzli, Gabriel Scherer and Nicol=C3=A1s Ojeda<br>&nbsp=
; B=C3=A4r)<br><br>- #9430, #11291: Document the general desugaring rules f=
or binding operators.<br>&nbsp; (Gabriel Scherer, review by Nicol=C3=A1s Oj=
eda B=C3=A4r)<br><br>- #11481: Fix the type of Unix.umask to Unix.file_perm=
 -&gt; Unix.file_perm<br>&nbsp; (Favonia, review by S=C3=A9bastien Hinderer=
)<br><br>- #11514: Document ocamltest builtin variables and actions<br>&nbs=
p; (Olivier Nicole, review by S=C3=A9bastien Hinderer)<br><br>- #11676: Fix=
 missing since annotation in the `Sys` and `Format` modules<br>&nbsp; (Gith=
ub user Bukolab99, review by Florian Angeletti)<br><br>- #12028: Update for=
mat documentation to make it clearer that<br>&nbsp; `pp_print_newline` flus=
hes its newline<br>&nbsp; (Florian Angeletti, review by Gabriel Scherer)<br=
><br>- #12201: in the tutorial on modules, replace priority queue example b=
y<br>&nbsp; a simpler example based on FIFO queues.<br>&nbsp; (Xavier Leroy=
, review by Anil Madhavapeddy and Nicol=C3=A1s Ojeda B=C3=A4r).<br><br>- #1=
2352: Fix a typo in the documentation of Arg.write_arg<br>&nbsp; (Christoph=
e Raffalli, review by Florian Angeletti)<br><br>- #7179, #11894: correct th=
e description of CAMLreturn and CAMLreturn0 in<br>&nbsp; the Interfacing C =
page and memory.h file.<br>&nbsp; (Dong An, review by Guillaume Munch-Macca=
gnoni and Olivier Nicole )<br><br>### Compiler user-interface and warnings:=
<br><br>- #10647: Show hints for the "undefined global" error in the toplev=
el<br>&nbsp; (Wiktor Kuchta, review by Gabriel Scherer)<br><br>- #12116: Do=
n't suggest to insert a semicolon when the type is not unit<br>&nbsp; (Jule=
s Aguillon, review by Florian Angeletti)<br><br>- #11679: Improve the error=
 message about too many arguments to a function<br>&nbsp; (Jules Aguillon, =
review by Gabriel Scherer and Florian Angeletti)<br><br>- #10009: Improve t=
he error reported by mismatched struct/sig and =3D/: in module<br>&nbsp; an=
d module type bindings.<br>&nbsp; (Jules Aguillon, review by Gabriel Schere=
r)<br><br>- #11530: Include kinds in kind mismatch error message.<br>&nbsp;=
 "Error: This variant or record definition does not match that of type M.t<=
br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The original is a=
bstract, but this is a record".<br>&nbsp; (Leonhard Markert, review by Gabr=
iel Scherer and Florian Angeletti)<br><br>- #11646: Add colors to error mes=
sage hints.<br>&nbsp; (Christiana Anthony, review by Florian Angeletti)<br>=
<br>- #11235, #11864: usage warnings for constructors and fields can now be=
 disabled<br>&nbsp; on field-by-field or constructor-by-constructor basis<b=
r>&nbsp; (Florian Angeletti, review by Gabriel Scherer)<br><br>- #11888: Im=
prove the error message when type variables cannot be deduced from<br>&nbsp=
; the type parameters:<br>&nbsp; Before:<br>&nbsp;&nbsp;&nbsp; "Error: In t=
his definition, a type variable cannot be deduced<br>&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from the type parameters."<br>=
&nbsp; After:<br>&nbsp;&nbsp;&nbsp; "Error: In the GADT constructor<br>&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
T : 'a -&gt; 'a s t<br>&nbsp;&nbsp;&nbsp;&nbsp; the type variable 'a cannot=
 be deduced from the type parameters."<br>&nbsp; (Stefan Muenzel, review by=
 Florian Angeletti and Gabriel Scherer)<br><br><br>- #10818: Preserve integ=
er literal formatting in type hint.<br>&nbsp; (Leonhard Markert, review by =
Gabriel Scherer and Florian Angeletti)<br><br>- #11338: Turn some partial a=
pplication warnings into hints.<br>&nbsp; (Leo White, review by Stephen Dol=
an)<br><br>- #10931: Improve warning 14 (illegal backslash) with a better e=
xplanation<br>&nbsp; of the causes and how to fix it.<br>&nbsp; (David Alls=
opp, Florian Angeletti, Lucas De Angelis, Gabriel Scherer,<br>&nbsp; review=
 by Nicol=C3=A1s Ojeda B=C3=A4r, Florian Angeletti, David Allsopp and<br>&n=
bsp; Gabriel Scherer)<br><br>- #10911: Improve the location reported by par=
enthesized assert expressions<br>&nbsp; (Fabian Hemmer, review by Gabriel S=
cherer)<br><br>- #1391, #7645, #3922: Add an early error when compiling dif=
ferent<br>&nbsp; modules with mismatching -for-pack<br>&nbsp; (Pierre Chamb=
art and Vincent Laviron, review by Mark Shinwell)<br><br>- #11297: Report "=
unclosed" error when "done" is missing in a "do .. done"<br>&nbsp; construc=
t.<br>&nbsp; (Nicol=C3=A1s Ojeda B=C3=A4r, review by Gabriel Scherer)<br><b=
r>- #11635, #5461, #10564: turn warning 31 (Module_linked_twice) into a har=
d error<br>&nbsp; for ocamlc =E2=80=94 this was already an error with ocaml=
opt.<br>&nbsp; (Hugo Heuzard, review by Valentin Gatien-Baron and Gabriel S=
cherer)<br><br>- #11653: Add the -no-absname option to ocamlc, ocamlopt and=
 ocamldep.<br>&nbsp; (Abiola Abdulsalam, review by S=C3=A9bastien Hinderer =
and Florian Angeletti)<br><br>- #11696: Add the -no-g option to ocamlc and =
ocamlopt.<br>&nbsp; (Abiola Abdulsalam, review by S=C3=A9bastien Hinderer, =
Nicol=C3=A1s Ojeda B=C3=A4r and<br>&nbsp; Florian Angeletti)<br><br>- #1172=
2: clearer error messages on non-well-founded type definitions<br>&nbsp; (G=
abriel Scherer, review by Jacques Garrigue)<br><br>- #11819: make the `nati=
ve_compiler` and `native_dynlink` configuration<br>&nbsp; variables availab=
le through ocamlc -config.<br>&nbsp; (S=C3=A9bastien Hinderer, review by Ga=
briel Scherer and David Allsopp)<br><br>- #8602, #11863: Add -stop-after la=
mbda flag option<br>&nbsp; (Douglas Smith and Dmitrii Kosarev, review by Ga=
briel Scherer)<br><br>- #11910: Simplify naming convention for shadowed or =
ephemeral identifiers in<br>&nbsp; error messages (eg: `Illegal shadowing o=
f included type t/2 by t`)<br>&nbsp; (Florian Angeletti, review by Jules Ag=
uillon)<br><br>- #12024: insert a blank line between separate compiler mess=
ages<br>&nbsp; (Gabriel Scherer, review by Florian Angeletti, report by Dav=
id Wong)<br><br>- #12088, #9265, #11949: ocamldebug: fix confusing repeatin=
g behavior<br>&nbsp; on blank lines within source scripts<br>&nbsp; (Damien=
 Doligez, review by Gabriel Scherer, report by Ga=C3=ABtan Gilbert)<br><br>=
- #12107: use aliases to mark weak row variables: `_[&lt; ... ]`, `&lt; _..=
&gt;`, `_#ct`<br>&nbsp; are now rendered as `[&lt; ...] as '_weak1`, `&lt; =
.. &gt; as '_weak1`,<br>&nbsp; and `#ct as '_weak1`.<br>&nbsp; (Florian Ang=
eletti, suggestion by Stefan Muenzel, review by Gabriel Scherer)<br><br>- #=
12051: Improve the error messages when type variables cannot be generalized=
<br>&nbsp; (Stefan Muenzel, review by Florian Angeletti)<br><br>* #12094: T=
rigger warning 5 (ignored-partial-application) when the scrutinee of<br>&nb=
sp; a pattern matching is of arrow type and all cases match wildcard or exc=
eption<br>&nbsp; patterns.<br>&nbsp; (Nicol=C3=A1s Ojeda B=C3=A4r, review b=
y Gabriel Scherer)<br><br>### Internal/compiler-libs changes:<br><br>- #110=
18, #11869: Clean up Types.Variance, adding a description of<br>&nbsp; the =
lattice used, and defining explicitly composition.<br>&nbsp; (Jacques Garri=
gue, review by Gabriel Scherer and Jeremy Yallop)<br><br>- #11536: Introduc=
e wrapper functions for level management<br>&nbsp; ([Ctype.with_level], etc=
) and for type variable scoping<br>&nbsp; ([Typetexp.with_local_type_variab=
le_scope]).<br>&nbsp; The older API ([Ctype.(begin_def,end_def)], [Typetexp=
.(narrow,widen)], etc.)<br>&nbsp; is now removed.<br>&nbsp; (Jacques Garrig=
ue and Takafumi Saikawa, review by Gabriel Scherer)<br><br>- #11601, #11612=
, #11628, #11613, #11623, #12120 : Clean up some<br>&nbsp; global state han=
dling in emitcode, bytepackager, bytegen,<br>&nbsp; bytesections, spill.<br=
>&nbsp; (Hugo Heuzard, Stefan Muenzel, review by Vincent Laviron, Gabriel S=
cherer<br>&nbsp;&nbsp; and Nathana=C3=ABlle Courant)<br><br>- #12119, #1218=
8, #12191: mirror type constraints on value binding in the<br>&nbsp; parset=
ree:<br>&nbsp; the constraint `typ` in `let pat : typ =3D exp` is now direc=
tly stored<br>&nbsp; in the value binding node in the parsetree.<br>&nbsp; =
(Florian Angeletti, review by&nbsp; Richard Eisenberg)<br><br>- #11912: Ref=
actoring handling of scoped type variables<br>&nbsp; (Richard Eisenberg, re=
view by Gabriel Scherer and Florian Angeletti)<br><br><br>- #11691, #11706:=
 use __asm__ instead of asm for strict ISO C conformance<br>&nbsp; (Xavier =
Leroy, report by Gregg Reynolds , review by Sadiq Jaffer)<br><br>- #11764: =
add prototypes to old-style C function definitions and declarations<br>&nbs=
p; (Antonin D=C3=A9cimo, review by Xavier Leroy)<br><br>- #11693: Remove us=
e of C99 Variable Length Arrays (VLAs) in the runtime.<br>&nbsp; (David All=
sopp, review by Xavier Leroy, Guillaume Munch-Maccagnoni,<br>&nbsp;&nbsp; S=
tefan Muenzel and Gabriel Scherer)<br><br>- #12138: Generalise interface fo=
r BUILD_PATH_PREFIX_MAP mapping.<br>&nbsp; Absolute paths are now rewritten=
 too.<br>&nbsp; (Richard L Ford, suggestions and review by Gabriel Scherer)=
<br><br>- #10512: explain the compilation strategy for switches on construc=
tors<br>&nbsp; (Gabriel Scherer, review by Vincent Laviron)<br><br>- #11990=
: Improve comments and macros around frame descriptors.<br>&nbsp; (Nick Bar=
nes, review by Gabriel Scherer)<br><br>- #11847, #11849, #11851, #11898: sm=
all refactorings in the type checker<br>&nbsp; (Gabriel Scherer, review by =
Nicol=C3=A1s Ojeda B=C3=A4r)<br><br>- #11027: Separate typing counter-examp=
les from type_pat into retype_pat;<br>&nbsp; type_pat is no longer in CPS.<=
br>&nbsp; (Jacques Garrigue and Takafumi Saikawa, review by Gabriel Scherer=
)<br><br>- #11286, #11515: disambiguate identifiers by using how recently t=
hey have<br>&nbsp; been bound in the current environment<br>&nbsp; (Florian=
 Angeletti, review by Gabriel Scherer)<br><br>- #11364: Allow `make -C test=
suite promote` to take `TEST` and `LIST` variables<br>&nbsp; (Antal Spector=
-Zabusky, review by Gabriel Scherer and David Allsopp)<br><br>- #11446: doc=
ument switch compilation (lambda/switch.ml)<br>&nbsp; (Gabriel Scherer, rev=
iew by Luc Maranget and Vincent Laviron)<br><br>- #11568: Encode inline rec=
ord types in Path.t<br>&nbsp; (Leo White and Hyunggyu Jang, review by Gabri=
el Scherer)<br><br>- #11569: Remove hash type encoding<br>&nbsp; (Hyunggyu =
Jang, review by Gabriel Scherer and Florian Angeletti)<br><br>- #11627: use=
 return values instead of globals for linear scan intervals<br>&nbsp; (Stef=
an Muenzel, review by Nicol=C3=A1s Ojeda B=C3=A4r)<br><br>- #11634: Dll.ope=
n_dll now properly handles opening for execution while already<br>&nbsp; op=
ened for checking<br>&nbsp; (Hugo Heuzard, review by Nicol=C3=A1s Ojeda B=
=C3=A4r)<br><br>* #11745, #12358: Debugger and toplevels: embed printer typ=
es rather than<br>&nbsp; reading their representations from topdirs.cmi at =
runtime.<br>&nbsp; This change also removes the ocamlmktop initialization m=
odule introduced<br>&nbsp; in #11382 which was no longer useful.<br>&nbsp; =
This change breaks toplevel scripts relying on the visibility of `Topdirs`<=
br>&nbsp; in the initial toplevel environment without loading `topfind`.<br=
>&nbsp; Since the opam default `.ocamlinit` file loads `topfind`, it is exp=
ected<br>&nbsp; that only scripts run with `ocaml -noinit` are affected.<br=
>&nbsp; For those scripts, accessing `Topdirs` now requires the `compiler-l=
ibs`<br>&nbsp; directory to be added to the toplevel search path with<br>&n=
bsp; ```<br>&nbsp;&nbsp;&nbsp; #directory "+compiler-libs";;<br>&nbsp; ````=
<br>&nbsp; as was already the case for the other modules in the toplevel in=
terface<br>&nbsp; library.<br>&nbsp; (S=C3=A9bastien Hinderer, review by Fl=
orian Angeletti, Nicol=C3=A1s Ojeda B=C3=A4r and<br>&nbsp; Gabriel Scherer)=
<br><br>- #11615: remove global variables form asmcomp/linearize.ml<br>&nbs=
p; (Stefan Muenzel, review by Nicol=C3=A1s Ojeda B=C3=A4r<br><br>- #10856: =
Add location, attribute(s) visitors to Tast_mapper/Tast_iterator<br>&nbsp; =
(Yan Dong, review by Nicol=C3=A1s Ojeda B=C3=A4r and Gabriel Scherer)<br><b=
r>- #11763, #11759, #11861: Enable stricter C compilation warnings, use<br>=
&nbsp; strict prototypes on primitives.<br>&nbsp; (Antonin D=C3=A9cimo, rev=
iew by Xavier Leroy, David Allsopp and S=C3=A9bastien<br>&nbsp; Hinderer)<b=
r><br>- #11933: Use the correct machtype when reading the code pointer from=
 closures<br>&nbsp; (Nathana=C3=ABlle Courant, review by Gabriel Scherer an=
d Vincent Laviron)<br><br>- #11972: refactor runtime/frame_descriptors.c<br=
>&nbsp; in preparation for quadratic-time fix<br>&nbsp; (Gabriel Scherer, r=
eview by Enguerrand Decorne)<br><br>- #11997: translate structured constant=
s into their Obj.t representation<br>&nbsp; at compile time rather than lin=
k time. Changes the way dumpobj prints<br>&nbsp; these constants because th=
eir representation becomes untyped.<br>&nbsp; (S=C3=A9bastien Hinderer, rev=
iew by Xavier Leroy, Nicol=C3=A1s Ojeda B=C3=A4r and<br>&nbsp; Hugo Heuzard=
)<br><br>- #12011: remove Ctype.reified_var_counter<br>&nbsp; (Takafumi Sai=
kawa and Jacques Garrigue, review by Gabriel Scherer)<br><br>- #12012: move=
 calls to Typetexp.TyVarEnv.reset inside with_local_level etc.<br>&nbsp; (J=
acques Garrigue and Takafumi Saikawa, review by Gabriel Scherer)<br><br>- #=
12034: a logarithmic algorithm to find the next free variable<br>&nbsp; (Ga=
briel Scherer, review by Stefan Muenzel)<br><br>- #12092: remove Lev_module=
_definition from lambda<br>&nbsp; (Nick Roberts, review by Gabriel Scherer)=
<br><br>- #12117: Remove arity-interrupting elaboration of module unpacks<b=
r>&nbsp; (Nick Roberts, review by Richard Eisenberg and Jacques Garrigue)<b=
r><br>- #12118: stop storing names of predefined exceptions in the<br>&nbsp=
; cu_required_globals field of compilation unit descriptors.<br>&nbsp; (S=
=C3=A9bastien Hinderer, review by Vincent Laviron)<br><br>- #12125: Add Mis=
c.print_see_manual and modify [@manual_ref] to accept<br>&nbsp; lists for s=
impler printing of manual references<br>&nbsp; (Stefan Muenzel, review by F=
lorian Angeletti)<br><br>- #12509: Use strict prototypes on primitives when=
 generating a standalone<br>&nbsp; bytecode executable (`ocamlc -custom`).<=
br>&nbsp; (Antonin D=C3=A9cimo, review by Xavier Leroy)<br><br>### Build sy=
stem:<br><br>- #11844: Reduce verbosity of `make` logs by printing program =
invocations in<br>&nbsp; shorthand (eg `OCAMLC foo.cmo`). Setting `V=3D1` r=
ecovers the old style (with<br>&nbsp; full command-lines).<br>&nbsp; (Xavie=
r Leroy, Nicol=C3=A1s Ojeda B=C3=A4r, review by S=C3=A9bastien Hinderer)<br=
><br><br>- #11590: Allow installing to a destination path containing spaces=
.<br>&nbsp;&nbsp; (=C3=89lie Brami, review by S=C3=A9bastien Hinderer and D=
avid Allsopp)<br><br>- #11243, #11248, #11268, #11420, #11675: merge the su=
b-makefiles into<br>&nbsp; the root Makefile.<br>&nbsp; (S=C3=A9bastien Hin=
derer, review by David Allsopp and Florian Angeletti)<br><br>- #11828: Comp=
ile otherlibs/ C stubs in two version for native and bytecode<br>&nbsp; (Ol=
ivier Nicole, review by S=C3=A9bastien Hinderer and Xavier Leroy)<br><br>- =
#12265: Stop adding -lexecinfo to cclibs (leftover debugging code from the<=
br>&nbsp; multicore project). Harden the feature probe for -lm in configure=
 so -lm is<br>&nbsp; only added if strictly necessary. configure.ac now cor=
rectly propagates<br>&nbsp; library flags for the Windows ports, allowing W=
indows OCaml to be configured<br>&nbsp; with ZSTD support.<br>&nbsp; (David=
 Allsopp, review by S=C3=A9bastien Hinderer)<br><br>- #12372: Pass option -=
no-execute-only to the linker for OpenBSD &gt;=3D 7.3<br>&nbsp; so that cod=
e sections remain readable, as needed for closure marshaling.<br>&nbsp; (Xa=
vier Leroy and Anil Madhavapeddy, review by Anil Madhavapeddy and<br>&nbsp;=
 S=C3=A9bastien Hinderer)<br><br>### Bug fixes:<br><br>- #12062: fix runtim=
e events consumer: when events are dropped they shouldn't be<br>&nbsp; pars=
ed. (Lucas Pluvinage)<br><br>- #12132: Fix overcounting of minor collection=
s in GC stats.<br>&nbsp; (Damien Doligez, review by Gabriel Scherer)<br><br=
>- #12017: Re-register finaliser only after calling user alarm in Gc.create=
_alarm<br>&nbsp; (Fabrice Buoro, report by Sam Goldman, review by Guillaume=
 Munch-Maccagnoni)<br><br>- #11887, #11893: Code duplication in pattern-mat=
ching compilation<br>&nbsp; (Vincent Laviron, report par Greta Yorsh, revie=
w by Luc Maranget and<br>&nbsp;&nbsp; Gabriel Scherer)<br><br>- #10664, #11=
600: Unsoundness in the typing of polymorphic methods<br>&nbsp; involving p=
olymorphic variants<br>&nbsp; (Jacques Garrigue, report by Mike Shulman, re=
view by Gabriel Scherer)<br><br>- #11302, #11412: `ocamlc` and `ocamlopt` s=
hould not remove generated files<br>&nbsp; when they are not regular files.=
<br>&nbsp; (Xavier Leroy, report by Thierry Martinez, review by<br>&nbsp;&n=
bsp; Anil Madhavapeddy, Nicol=C3=A1s Ojeda B=C3=A4r, David Allsopp)<br><br>=
- #10348, #10560, #11561: Expand GADT equations lazily during unification t=
o<br>&nbsp; avoid ambiguity<br>&nbsp; (Jacques Garrigue, review by Leo Whit=
e)<br><br>- #11436: Fix wrong stack backtrace for out-of-bound exceptions r=
aised<br>&nbsp; by leaf functions.<br>&nbsp; (Tom Kelly and Xavier Leroy, r=
eview by Mark Shinwell)<br><br>- #11450, #12018: Fix erroneous functor erro=
r messages that were too eager to<br>&nbsp; cast `struct end` functor argum=
ents as unit modules in `F(struct end)`.<br>&nbsp; (Florian Angetti, review=
 by Gabriel Scherer)<br><br>- #11643: Add missing test declaration to float=
_compare test, so that it will<br>&nbsp; run.<br>&nbsp; (Stefan Muenzel, re=
view by David Allsopp)<br><br>- #11630: Use correct location when reporting=
 record labels with non-existent<br>&nbsp; paths.<br>&nbsp; (Nicol=C3=A1s O=
jeda B=C3=A4r, report by Jason Gross, review by Gabriel Scherer)<br><br>- #=
11727: Ensure push_defaults can push past module patterns, fixing an<br>&nb=
sp; currying optimisation accidentally disabled by #10340.<br>&nbsp; (Steph=
en Dolan, review by Gabriel Scherer)<br><br>- #11771: Use a more relaxed mo=
de for unification in Ctype.subst<br>&nbsp; (Leo White, review by Jacques G=
arrigue and Gabriel Scherer)<br><br>- #11803, #11808: on x86, the destinati=
on of an integer comparison must be<br>&nbsp; a register, it cannot be a st=
ack slot.<br>&nbsp; (Vincent Laviron, review by Xavier Leroy, report by<br>=
&nbsp;&nbsp; Emilio Jes=C3=BAs Gallego Arias)<br><br>- #11809: Protect Parm=
atch.pats_of_type from missing cmis<br>&nbsp; (Jacques Garrigue, review by =
Stephen Dolan and Gabriel Scherer)<br><br>- #11824: Fix a crash when callin=
g `ocamlrun -b`<br>&nbsp; (Florian Angeletti, review by S=C3=A9bastien Hind=
erer)<br><br>- #11815: Marshalling continuations raises invalid argument ex=
ception.<br>&nbsp; (J=C3=A9r=C3=B4me Vouillon, review by Nicol=C3=A1s Ojeda=
 B=C3=A4r, Stephen Dolan and<br>&nbsp;&nbsp; Hugo Heuzard)<br><br>- #11846:=
 Mark rbx as destroyed at C call for Win64 (mingw-w64 and Cygwin64).<br>&nb=
sp; Reserve the shadow store for the ABI in the c_stack_link struct instead=
 of<br>&nbsp; explictly when calling C functions. This simultaneously reduc=
es the number of<br>&nbsp; stack pointer manipulations and also fixes a bug=
 when calling noalloc<br>&nbsp; functions where the shadow store was not be=
ing reserved.<br>&nbsp; (David Allsopp, report by Vesa Karvonen, review by =
Xavier Leroy and<br>&nbsp;&nbsp; KC Sivaramakrishnan)<br><br>- #11850: When=
 stopping before the `emit` phase (using `-stop-after`), an empty<br>&nbsp;=
 temporary assembly file is no longer left in the file system.<br>&nbsp; (N=
icol=C3=A1s Ojeda B=C3=A4r, review by Gabriel Scherer and Xavier Leroy)<br>=
<br>- #11866: Fix the result of `caml_read_directory()` on non-existent pat=
hs.<br>&nbsp; (Andrei Paskevich and Charl=C3=A8ne Gros, review by David All=
sopp and<br>&nbsp;&nbsp; Nicol=C3=A1s Ojeda B=C3=A4r)<br><br>- #11879: Bugf=
ix for Ctype.nondep_type<br>&nbsp; (Stephen Dolan, review by Gabriel Schere=
r)<br><br>- #12004: Don't ignore function attributes on lambdas with locall=
y abstract<br>&nbsp; types.<br>&nbsp; (Chris Casinghino, review by Gabriel =
Scherer)<br><br>- #12037: Fix some data races by using volatile when necess=
ary<br>&nbsp; (Fabrice Buoro and Olivier Nicole, review by Guillaume Munch-=
Maccagnoni,<br>&nbsp; Gabriel Scherer and Luc Maranget)<br><br>- #12046: Fl=
ush stderr when tracing the parser<br>&nbsp; (Hugo Heuzard, review by David=
 Allsopp and Nicol=C3=A1s Ojeda B=C3=A4r)<br><br>- #12061, #12063: don't ad=
d inconsistent equalities when computing<br>&nbsp; high-level error message=
s for functor applications and inclusions.<br>&nbsp; (Florian Angeletti, re=
view by Gabriel Scherer)<br><br>- #12075: auto-detect whether `ar` support =
@FILE arguments at<br>&nbsp; configure-time to avoid using this feature wit=
h toolchains<br>&nbsp; that do not support it (eg FreeBSD/Darwin).<br>&nbsp=
; (Nicol=C3=A1s Ojeda B=C3=A4r, review by Xavier Leroy, David Allsop, Javie=
r<br>&nbsp; Ch=C3=A1varri, Anil Madhavapeddy)<br><br>- #12103, 12104: fix a=
 concurrency memory-safety bug in Buffer<br>&nbsp; (Gabriel Scherer, review=
 by Florian Angeletti, report by Samuel Hym)<br><br>- #12112: Fix caml_call=
back{2,3}_exn when used with effect handlers.<br>&nbsp; (Lucas Pluvinage, r=
eview by Gabriel Scherer, David Allsopp and Xavier Leroy)<br><br>- #12134: =
Use ghost location for nodes created when handling defaults in<br>&nbsp; op=
tional arguments.<br>&nbsp; (Paul-Elliot Angl=C3=A8s d'Auriac, review by Ga=
briel Scherer)<br><br>- #12153: Fix segfault in bytecode programs involving=
 recursive value<br>&nbsp; definitions of values of size 0<br>&nbsp; (Vince=
nt Laviron, Xavier Leroy, Gabriel Scherer,<br>&nbsp;&nbsp; review by Xavier=
 Leroy, report by Nick Roberts)<br><br>- #12162: Fix miscompilation on amd6=
4 backends involving integer overflows<br>&nbsp; (Vincent Laviron and Greta=
 Yorsh, review by Stefan Muenzel)<br><br>- #12170: fix pthread_geaffinity_n=
p configure check for android<br>&nbsp; (David Allsopp, review by S=C3=A9ba=
stien Hinderer)<br><br>- #12178: Fix runtime events consumer poll function =
returning an invalid value<br>&nbsp; instead of an OCaml integer value. (Lu=
cas Pluvinage)<br><br>- #12252: Fix shared library build error on RISC-V.<b=
r>&nbsp; (Edwin T=C3=B6r=C3=B6k, review by Nicol=C3=A1s Ojeda B=C3=A4r and =
Xavier Leroy)<br><br>- #12255, #12256: Handle large signal numbers correctl=
y (Nick Barnes,<br>&nbsp;&nbsp; review by David Allsopp).<br><br>- #12277: =
ARM64, fix a potential assembler error for very large functions by<br>&nbsp=
; emitting stack reallocation code before the body of the function.<br>&nbs=
p; (Xavier Leroy, review by KC Sivaramakrishnan)<br><br>- #12253, #12342: F=
ix infinite loop in signal handling.<br>&nbsp; (Guillaume Munch-Maccagnoni,=
 report by Thomas Leonard, review by<br>&nbsp;&nbsp; KC Sivaramakrishnan an=
d Sadiq Jaffer)<br><br>- #12445: missing GC root registrations in runtime/i=
o.c<br>&nbsp; (Gabriel Scherer, review by Xavier Leroy and Jeremy Yallop)<b=
r><br>- #12481, #12505: Fix incorrect initialization of array expressions<b=
r>&nbsp; `[|e1;...;eN|]` when `N` is large enough to require major heap all=
ocation.<br>&nbsp; (Xavier Leroy, report by Andrey Popp, analysis by KC Siv=
aramakrishnan<br>&nbsp;&nbsp; and Vincent Laviron, review by Gabriel Schere=
r)<br><br>- #11150, #11207, #11936: Avoid recomputation in Typedecl.check_w=
ellfounded<br>&nbsp; (Jacques Garrigue, report by Boris Yakobowski, review =
by Gabriel Scherer)<br><br>- #11186, #11188: Fix composition of coercions w=
ith aliases<br>&nbsp; (Vincent Laviron, report and review by Leo White)<br>=
<br>- #12486: Fix delivery of unhandled effect exceptions on s390x<br>&nbsp=
; (Miod Vallat, report by Jan Midtgaard, review by Vincent Laviron and Xavi=
er<br>&nbsp; Leroy)<br><br>&nbsp; </div></div><br></div></div></body></html=
>
--=_91c0edc4-cc8a-4922-8f39-4b6f519f87dd--