forked from ocaml/ocaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Changes
14311 lines (11171 loc) · 582 KB
/
Changes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Working version
---------------
### Restored and new backends:
- #12276, #12601: native-code compilation for POWER (64 bits, little-endian)
(Xavier Leroy, review by KC Sivaramakrishnan, Anil Madhavapeddy,
and Stephen Dolan)
- #12667: extend the latter to POWER 64 bits, big-endian, ELFv2 ABI
(A. Wilcox, review by Xavier Leroy)
### Language features:
- #12295, #12568: Give `while true' a polymorphic type, similarly to
`assert false'
(Jeremy Yallop, review by Nicolás Ojeda Bär and Gabriel Scherer,
suggestion by Rodolphe Lepigre and John Whitington)
- #12315: Use type annotations from arguments in let rec
(Stephen Dolan, review by Gabriel Scherer)
- #11252, RFC 27: Support raw identifier syntax \#foo
(Stephen Dolan, review by David Allsopp, Gabriel Scherer and Olivier Nicole)
- #12044: Add local module open syntax for types.
```
module A = struct
type t = int
type r = unit
type s = string
end
type example = A.(t * r * s)
```
(Alistair O'Brien, review by Gabriel Scherer, Nicolás Ojeda Bär
and Florian Angeletti)
- #12456: Document the incompatibility between effects on the one
hand, and `caml_callback` and asynchronous callbacks (signal
handlers, finalisers, memprof callbacks...) on the other hand.
(Guillaume Munch-Maccagnoni, review by KC Sivaramakrishnan)
- #12375: allow use of [@untagged] for all immediate types like char, bool,
and variant with only constant constructors.
(Christophe Raffalli, review by Gabriel Scherer)
* #12502: the compiler now normalizes the newline sequence \r\n to
a single \n character during lexing, to guarantee that the semantics
of newlines in string literals is not modified by Windows tools
transforming \n into \r\n in source files.
Warning 29 [eol-in-string] is not emitted anymore, as the normalization
gives a more robust semantics to newlines in string literals.
(Gabriel Scherer and Damien Doligez, review by Daniel Bünzli, David
Allsopp, Andreas Rossberg, Xavier Leroy, report by Andreas Rossberg)
### Type system:
- #12313, #11799: Do not re-build as-pattern type when a ground type annotation
is given. This allows to work around problems with GADTs in as-patterns.
(Jacques Garrigue, report by Leo White, review by Gabriel Scherer)
### Runtime system:
- #12193: Re-introduce GC compaction for shared pools
Adds a parallel compactor for the shared pools (which contain major heap
blocks sized less than 128 words). Explicit only for now, on calls to
`Gc.compact`.
(Sadiq Jaffer, Nick Barnes, review by Anil Madhavapeddy, Damien Doligez,
David Allsopp, Miod Vallat, Artem Pianykh, Stephen Dolan, Mark Shinwell
and KC Sivaramakrishnan)
- #10111: Increase the detail of location information for debugging events to
allow the end line number and character offset to be reported.
(David Allsopp, review by Nick Barnes, Enguerrand Decorne and Stephen Dolan)
- #10403, #12202: introduce `caml_ext_table_add_noexc` that does not
raise `Out_of_memory` exceptions and use it inside the blocking sections
of `caml_read_directory`. Also, check for overflows in ext table sizes.
(Xavier Leroy, report by Arseniy Alekseyev, review by Gabriel Scherer)
- #11332, #12702: make sure `Bool_val(v)` has type `bool` in C++
(Xavier Leroy, report by ygrek, review by Gabriel Scherer)
- #12772, #12787: Avoid using _Bool in public headers for the sake of C++
compatibility
(Guillaume Munch-Maccagnoni, report by KC Sivaramakrishnan, review
by Xavier Leroy and KC Sivaramakrishnan)
- #12223: Constify constructors and flags tables in C code. Now these
tables will go in the readonly segment, where they belong.
(Antonin Décimo, review by Gabriel Scherer and Xavier Leroy)
- #12234: make instrumented time calculation more thread-safe on macOS.
(Anil Madhavapeddy, review by Daniel Bünzli and Xavier Leroy)
- #12235, #12468: introduce and use the `CAMLnoret` macro as
a lighter alternative to `CAMLnoreturn_start` / `CAMLnoreturn_end`.
Implement it so as to conform with C11, C23, C++11, C++17.
(Xavier Leroy and Dhruv Maroo, with help from Antonin Décimo, review by
Gabriel Scherer and David Allsopp)
- #12275: caml/stack.h: more abstract macros to describe OCaml stacks and
how to traverse them, supporting more stack layouts.
(Xavier Leroy, review by KC Sivaramakrishnan and Fabrice Buoro)
- #12268: deliver `Out_of_memory` exception if domain creation fails
due to memory resource exhaustion. It was previous always a `Failure`.
(Anil Madhavapeddy, review by David Allsopp)
- #12300, #12314: Discard out_channel buffered data on permanent I/O error
(Xavier Leroy, report by Török Edwin, review by Anil Madhavapeddy
and Nicolás Ojeda Bär)
- #11386: Simplifications and fixes to multicore systhreads implementation.
(Guillaume Munch-Maccagnoni, review by Anil Madhavapeddy and KC
Sivaramakrishnan)
- #12318: GC: simplify the meaning of custom_minor_max_size: blocks with
out-of-heap memory above this limit are now allocated directly in
the major heap.
(Damien Doligez, report by Stephen Dolan, review by Gabriel Scherer)
- #12408: `Domain.spawn` no longer leaks its functional argument for
the whole duration of the children domain lifetime.
(Guillaume Munch-Maccagnoni, review by Gabriel Scherer)
- #12409: Fix unsafety and deadlocks should an asynchronous exception
arise at specific locations during domain creation and shutdown.
(Guillaume Munch-Maccagnoni, review by Gabriel Scherer)
- #12114: Add ThreadSanitizer support
(Fabrice Buoro and Olivier Nicole, based on an initial work by Anmol Sahoo,
review by Damien Doligez, Sébastien Hinderer, Jacques-Henri Jourdan, Luc
Maranget, Guillaume Munch-Maccagnoni, Gabriel Scherer)
- #11911, #12381: Restore statmemprof functionality in part
(API changes in Gc.Memprof). (Nick Barnes)
- #12430: Simplify dynamic bytecode loading in Meta.reify_bytecode
(Stephen Dolan, review by Sébastien Hinderer, Vincent Laviron and Xavier
Leroy)
- #12439: Finalize and collect dead custom blocks during minor collection
(Damien Doligez, review by Xavier Leroy, Gabriel Scherer and KC
Sivaramakrishnan)
- #12489: Fix an error-handling bug in caml_alloc_sprintf
(Stephen Dolan, report by Chris Casinghino, review by Jeremy Yallop
and Xavier Leroy)
- #11307: Finish adapting the implementation of asynchronous actions for
multicore: soundness, liveness, and performance issues.
Do not crash if a signal handler is called from an unregistered C
thread, and other possible soundness issues. Prevent issues where join
on other domains could make the toplevel unresponsible to Ctrl-C. Avoid
needless repeated polling in C code when callbacks cannot run
immediately.
(Guillaume Munch-Maccagnoni, review by Enguerrand Decorne, Xavier
Leroy, and KC Sivaramakrishnan)
- #12634: Simplify TSan backtrace bookkeeping upon raise
(Olivier Nicole and Fabrice Buoro, review by Gabriel Scherer)
* #12686: Some primitives had the wrong types to be callable from the bytecode
interpreter. Either fix their types, mark them as `CAMLexport` instead of
`CAMLprim`, or remove them entirely if no longer used.
(Xavier Leroy, review by David Allsopp)
- #12700, continuing #11763 and trying to address #12660:
Use the correct types for primitives when generating the table of primitives
used by ocamlrun.
(Xavier Leroy, motivation, review and improvements by Antonin Décimo)
- #12345, #12710: Fix issues with finaliser orphaning at domain termination
(KC Sivaramakrishnan, report by Gabriel Scherer, review by Gabriel Scherer,
Sadiq Jaffer and Fabrice Buoro)
- #12681: Fix TSan false positives due to volatile write handling
(Olivier Nicole, Fabrice Buoro and Anmol Sahoo, review by Luc Maranget,
Gabriel Scherer, Hernan Ponce de Leon and Xavier Leroy)
- #12743: Use pthread_sigmask instead of sigprocmask
Updates usage of sigprocmask to pthread_sigmask in otherlibs/unix.
(Max Slater, review by Miod Vallat and Xavier Leroy)
- #12769: Unify MSVC and MinGW-w64 code paths, by always using WinAPI
directly.
(David Allsopp, Antonin Décimo, and Samuel Hym, review by Nicolas
Ojeda Bar)
- #11911, #12383: Restore statmemprof functionality in part
(backtrace buffers). (Nick Barnes, review by Gabriel Scherer)
- #11911, #12383: Restore statmemprof functionality in part (backtrace
buffers). (Nick Barnes, review by Gabriel Scherer and Fabrice
Buoro).
- #12735: Store both ends of the stack chain in continuations
(Leo White, review by Miod Vallat and KC Sivaramakrishnan)
### Code generation and optimizations:
- #11239: on x86-64 and RISC-V, reduce alignment of OCaml stacks from 16 to 8.
This reduces stack usage. It's only C stacks that require 16-alignment.
(Xavier Leroy, review by Gabriel Scherer and Stephen Dolan)
- #12311: on POWER, 32-bit FP numbers stored in memory (e.g. in bigarrays)
were not correctly rounded sometimes.
(Xavier Leroy, review by Anil Madhavapeddy and Tim McGilchrist)
- #12551, #12608: Overhaul of recursive value compilation.
Extend the Rec_check classification to handle constants, propagate the
classification through the compiler.
(Vincent Laviron and Lunia Ayanides, review by Gabriel Scherer)
- #1809, #12181: rewrite `compare x y op 0` to `x op y` when values are integers
(Xavier Clerc, Stefan Muenzel, review by Gabriel Scherer and Vincent Laviron)
### Standard library:
- #12716: Add `Format.pp_print_nothing` function.
(Léo Andrès, review by Gabriel Scherer and Nicolás Ojeda Bär)
- #11563: Add the Dynarray module to the stdlib. Dynamic arrays are
arrays whose length can be changed by adding or removing elements at
the end, similar to 'vectors' in C++ or Rust.
(Gabriel Scherer, Simon Cruanes and Florian Angeletti, review by
Daniel Bünzli, Guillaume Munch-Maccagnoni, Clément Allain,
Damien Doligez, Wiktor Kuchta and Pieter Goetschalckx)
* #6732, #12423: Make Buffer.add_substitute surjective and fix its
documentation.
(Damien Doligez, review by Antonin Décimo)
* #10775, #12499: Half-precision floating-point elements in Bigarray.
(Anton Yabchinskiy, review by Xavier Leroy and Nicolás Ojeda Bär)
- #11517, #12477: Expose pp_infinity in interface of the format module, and
check that margin is less than pp_infinity when setting or checking geometry.
(Janith Petangoda, reported by Simmo Saan, reviewed by Florian Angeletti,
Simmo Saan, Josh Berdine and Gabriel Scherer)
- #12217: Add `Array.shuffle`.
(Daniel Bünzli, review by Nicolás Ojeda Bär, David Allsopp and Alain Frisch)
- #12212: Add cache-aligned constructor for atomics. The patch ensures that
all allocations (of the right size) in the shared heap are aligned.
(Bartosz Modelski with Gabriel Scherer, Guillaume Munch-Maccagnoni,
Xavier Leroy, review by Alain Frisch, Anil Madhavapeddy, Gabriel Scherer,
Guillaume Munch-Maccagnoni, KC Sivaramakrishnan, Stefan Muenzel,
Xavier Leroy)
- #12365: Add In_channel.input_bigarray, In_channel.really_input_bigarray,
Out_channel.output_bigarray, Unix.read_bigarray, Unix.write_bigarray,
Unix.single_write_bigarray.
(Nicolás Ojeda Bär, review by Jeremy Yallop, Xavier Leroy, Gabriel Scherer,
David Allsopp)
- #12455: Add `Array.init_matrix`, `Float.Array.make_matrix`,
`Float.Array.init_matrix`.
(Glen Mével, review by Xavier Leroy, Gabriel Scherer, Jeremy Yallop,
Nicolas Ojeda Bar)
* #12455: `Array.make_matrix dimx dimy f` now raises `Invalid_argument`
when `dimx = 0 && dimy < 0` This was already specified but not enforced.
(Glen Mével, report by Jeremy Yallop, review by Nicolas Ojeda Bar)
- #12459: Add `Random.int_in_range`, `Random.int32_in_range`,
`Random.int64_in_range`, `Random.nativeint_in_range`,
and their counterpart in `Random.State`.
(Glen Mével and Xavier Leroy, review by Gabriel Scherer, Xavier Leroy,
Florian Angeletti)
- #12459: `Random`: restore compatibility between 32-bit integers (JavaScript)
and 63-bit integers (64-bit OCaml).
For `Random.full_int` this was guaranteed in 4.14 but wrongly removed in 5.0.
(Xavier Leroy, review by Glen Mével)
- #12511: Minor performance improvements and cleanups in the implementation
of modules Int32, Int64, and Nativeint
(Xavier Leroy, review by Gabriel Scherer and Daniel Bünzli)
- #12558: Adapt GC alarms for multicore and fix their documentation.
(Guillaume Munch-Maccagnoni, review by KC Sivaramakrishnan
and Gabriel Scherer)
- #12625: Remove the Closure module from Obj
(Vincent Laviron, review by Xavier Leroy)
- #12784: Fix computation of minor-heap allocation in Gc.counters()
and Gc.allocated_bytes(). (Nick Barnes, review by Gabriel Scherer)
- #12770: Add `Fun.compose`.
(Justin Frank, review by Nicolás Ojeda Bär, Daniel Bünzli and Jeremy Yallop)
### Other libraries:
- #12213: Dynlink library, improve legibility of error messages
(Samuel Hym, review by Gabriel Scherer and Nicolás Ojeda Bär)
* #12686: Runtime_events library, C API: define
`caml_runtime_events_{start,pause,resume}` as returning `void`
instead of `value`.
(Xavier Leroy, review by David Allsopp)
### Tools:
- #12340: testsuite: collect known issues with current -short-paths
implementation for existential types
(Florian Angeletti, Samuel Hym, review by Florian Angeletti and Thomas Refis)
- #12147: ocamllex: Allow carriage returns at the end of line directives.
(SeungCheol Jung, review by Nicolás Ojeda Bär)
- #12260: Fix invalid_argument on some external or module aliases in ocamlnat
(Fabian Hemmer, review by Vincent Laviron)
- #12185: New script language for ocamltest.
(Damien Doligez with Florian Angeletti, Sébastien Hinderer, Gabriel Scherer,
review by Sébastien Hinderer and Gabriel Scherer)
- #12371: ocamltest: fix recursive expansion of variables.
(Antonin Décimo, Damien Doligez, review by Sébastien Hinderer,
Damien Doligez, Gabriel Scherer, and Xavier Leroy)
* #12497, #12613: Make ocamlc/ocamlopt fail with an error when no
input files are specified to build an executable.
(Antonin Décimo, review by Sébastien Hinderer)
- #12576: ocamldep: various refactors.
(Antonin Décimo, review by Florian Angeletti, Gabriel Scherer, and Léo Andrès)
- #12615: ocamldoc: get rid of the odoc_literate and odoc_todo generators.
(Sébaistien Hinderer, review by Gabriel Scherer and Florian Angeletti)
- #12688: Setting the env variable `NO_COLOR` with an empty value no longer
has effects. Previously, setting `NO_COLOR` with any value, including
the empty value, would disable colors (unless `OCAML_COLOR` is also set).
After this change, the user must set `NO_COLOR` with an non-empty value
to disable colors. This reflects a specification clarification/change
from the upstream website at https://no-color.org.
(Favonia, review by Gabriel Scherer)
- #12744: ocamltest: run tests in recursive subdirs more eagerly
(Nick Roberts, review by Nicolás Ojeda Bär)
### Manual and documentation:
- #12338: clarification of the documentation of process related function in
the unix module regarding the first element of args and shell's pid.
(Christophe Raffalli, review by Florian Angeletti)
- #12473: Document in runtime/memory.c our current understanding of
accesses to the OCaml heap from the C runtime code -- the problem
of hybrid programs mixing two memory models.
(Gabriel Scherer and Guillaume Munch-Maccagnoni, review by Olivier
Nicole and Xavier Leroy)
- #12694: Document in runtime/tsan.c the TSan instrumentation choices and the
consequences with regard to the memory model.
(Olivier Nicole, review by Miod Vallat, Gabriel Scherer, Guillaume
Munch-Maccagnoni and Fabrice Buoro)
### Compiler user-interface and warnings:
* #10613, #12405: Simplify the values used for the system variable (`system:` in
`ocamlopt -config` or the `Config.system` constant). In particular, s390x and
ppc64 now report "linux" instead of "elf"; all variants of 32-bit ARM on Linux
now report "linux"; OpenBSD now reports "openbsd" instead of "bsd" for 32-bit
ARM; FreeBSD, NetBSD and OpenBSD now report the same value for both x86_64 and
x86_32; x86_32 systems matching *bsd but not freebsd*, netbsd* or openbsd*
are no longer identified (as on x86_64); x86_32 Linux now reports "linux"
instead of "linux_elf".
(David Allsopp, request by Kate Deplaix, review by Sébastien Hinderer and
Xavier Leroy)
- #11989, #12246, RFC 31: New flag, -H, to allow for transitive dependencies
without including them in the initial environment.
(Chris Casinghino, François Bobot, and Gabriel Scherer, review by Leo White
and Stefan Muenzel, RFC by François Bobot)
- #12247: configure: --disable-ocamldebug can now be used instead
of --disable-debugger (which remains available for compatibility)
(Gabriel Scherer, review by Damien Doligez and Sébastien Hinderer)
- #12199: improve the error message for non-overriding `inherit!`
(Florian Angeletti, review by Jules Aguillon)
- #12210: uniform style for inline code in compiler messages
(Florian Angeletti, review by Gabriel Scherer)
* #12278, #:12325: Remove the OCAML_FLEXLINK environment variable from the
compiler drivers. This environment variable was previously used as part of the
FlexDLL bootstrap procedure and existed solely for that purpose. Its removal
greatly simplifies both the build system and testsuite machinery.
(David Allsopp, review by Sébastien Hinderer)
- #12347: error messages: always report missing polyvariant tags
(Florian Angeletti, report by Tianbo Hao, review by Gabriel Scherer)
- #12224, specialized error message when trying to apply non-functor
module (e.g `module M = Int(Int)`)
(Florian Angeletti, review by Gabriel Scherer)
- #12451: Warning 53 (misplaced attributes) now works for all attributes.
(Chris Casinghino, review by Florian Angeletti)
- #12622: Give hints about existential types appearing in error messages
(Leo White, review by Gabriel Scherer and Florian Angeletti)
- #12671: When a class type parameter or class parameter does not match,
identify which parameter in the error message, instead of saying
"A type parameter" or "A parameter".
(Stefan Muenzel, review by Gabriel Scherer)
- #12679: Add more detail to the error message and manual in case of
invalid module type substitutions.
(Stefan Muenzel, review by Gabriel Scherer and Florian Angeletti)
- #12750: Display the command executed to extract primitives in
`ocamlc -verbose`.
(David Allsopp, review by Nicolás Ojeda Bär)
- #12777: Add details about the actual and expected method types to the method
mismatch error messages.
(Javier Chávarri, review by Gabriel Scherer and Florian Angeletti)
### Internal/compiler-libs changes:
- #12639: parsing: Attach a location to the RHS of Ptyp_alias
and improve the 'alias type mismatch' error message.
(Jules Aguillon, review by Florian Angeletti)
- #12447: Remove 32-bit targets from X86_proc.system
(Masanori Ogino, review by David Allsopp)
- #12216, #12248: Prevent reordering of atomic loads during instruction
scheduling. This is for reference, as instruction scheduling is currently
unused in OCaml 5.
(Xavier Leroy, report by Luc Maranget and KC Sivaramakrishnan,
review by Nicolás Ojeda Bär)
- #12025: Split Typecore.unify_pat_types into two
to avoid unnecessary references to the environment in type_pat
(Jacques Garrigue and Takafumi Saikawa, review by Gabriel Scherer)
- #12031: Use dedicated types to represent names of compilation units
and predefined exceptions in CMO files.
(Sébastien Hinderer, review by Florian Angeletti, Thomas Refis,
Gabriel Scherer, Vincent Laviron, Pierre Chambart, Luke Maurer,
Hugo Heuzard, Xavier Leroy and Damien Doligez)
- #12109: Pack parameters to unification in unification_environment
(Takafumi Saikawa and Jacques Garrigue, review by Richard Eisenberg)
- #12331, #12361: Pack the unification data for pattern checking in Typecore
(Takafumi Saikawa and Jacques Garrigue,
review by Gabriel Scherer, Thomas Refis and Florian Angeletti)
- #12229: Remove global mutable state for typechecking patterns
in Typecore in favor of local mutable state.
(Nick Roberts, review by Takafumi Saikawa)
- #12236, #12386, #12391, #12496, #12673: Use syntax as sole determiner of arity
This changes function arity to be based solely on the source program's
parsetree. Previously, the heuristic for arity had more subtle heuristics
that involved type information about patterns. Function arity is important
because it determines when a pattern match's effects run and is an input
into the fast path for function application.
This change affects tooling: it changes the function constructs in parsetree
and typedtree.
See https://github.com/ocaml/RFCs/pull/32 for the original RFC.
(Nick Roberts; review by Richard Eisenberg, Leo White, and Gabriel Scherer;
RFC by Stephen Dolan)
- #12542: Minor bugfix to #12236: restore dropped call to `instance`
(Nick Roberts, review by Jacques Garrigue)
- #12242: Move the computation of stack frame parameters to a separate
`Stackframe` module, and save the parameters in the results of the
`Linearize` pass
(Xavier Leroy, review by KC Sivaramakrishnan and Mark Shinwell)
- #12442: document jump summaries in the pattern-matching compiler
(Gabriel Scherer and Thomas Refis, review by Florian Angeletti
and Vincent Laviron)
- #12446, #12792: remove the hooks machinery around channel locking
in runtime/io.c
(Gabriel Scherer, review by Xavier Leroy)
- #12389, #12544: centralize the handling of metadata for compilation units and
artifacts in preparation for better unicode support for OCaml source files.
(Florian Angeletti, review by Gabriel Scherer)
- #12532, #12553: improve readability of the pattern-matching debug output
(Gabriel Scherer, review by Thomas Refis)
- #12537: Use C11/C++11 standard static assertion.
(Antonin Décimo, review by Sebastien Hinderer, Xavier Leroy,
and KC Sivaramakrishnan)
- #12169: runtime: document and enforce naming conventions around STW sections.
(Gabriel Scherer, review by Enguerrand Decorne, Miod Vallat, B. Szilvasy
and Nick Barnes, report by KC Sivaramakrishnan)
- #12669 : Clean up some global state handling in schedgen
(Stefan Muenzel, review by Miod Vallat and Gabriel Scherer)
- #12640: Make the module separator used in symbol names configurable
(Miod Vallat, review by Hugo Heuzard and Xavier Leroy)
- #12691 : Clean up Ctype.expand_abbrev_gen and
rename Env.add_local_type to add_local_constraint
(Takafumi Saikawa and Jacques Garrigue, review by Florian Angeletti)
### Build system:
- #12198, #12321, #12586, #12616, #12706: continue the merge of the
sub-makefiles into the root Makefile started with #11243, #11248,
#11268, #11420 and #11675.
(Sébastien Hinderer, review by David Allsopp and Florian Angeletti)
- #12569, #12570: remove 'otherlibraries' as a prerequisite for 'runtop';
use 'runtop-with-otherlibs' to use a library from otherlibs/
(Gabriel Scherer, review by Sébastien Hinderer, suggestion by David Allsopp)
- #12652: Make magic numbers easier to bump and duplicate.
(Sébastien Hinderer, review by Antonin Décimo, David Allsopp and Florian
Angeletti)
### Bug fixes:
- #12712, #12742: fix an assertion boundary case in `caml_reset_young_limit`
(Jan Midtgaard, review by Guillaume Munch-Maccagnoni and KC Sivaramakrishnan)
- #10652, #12720: fix evaluation order in presence of optional arguments
(Jacques Garrigue, report by Leo White, review by Vincent Laviron)
- #11800, #12707: fix an assertion race condition in `install_backup_thread`
(Jan Midtgaard, review by Gabriel Scherer)
- #12590, #12595: fix a race in `caml_collect_gc_stats_sample`
(B. Szilvasy, review by Gabriel Scherer)
- #12595, #12597: fix a race in `caml_clear_gc_stats_sample`
(Gabriel Scherer, review by B. Szilvasy, report by B. Szilvasy)
- #12580: Fix location of alias pattern variables.
(Chris Casinghino, review Gabriel Scherer, report by Milo Davis)
- #12583: Add a closing event for when `EV_MAJOR_EPHE_MARK` is complete
(Sudha Parimala, review by Gabriel Scherer)
- #12566: caml_output_value_to_malloc wrongly uses `caml_stat_alloc`
instead of `malloc` since 4.06, breaking (in pooled mode) user code
that uses `free` on the result. Symmetrically,
caml_input_value_from_malloc should use `free`.
(Gabriel Scherer, review by Xavier Leroy and Enguerrand Decorne,
report by Ido Yariv)
- #12490: Unix: protect the popen_processes hashtable with a mutex
(Gabriel Scherer, report by Olivier Nicole, review by Xavier Leroy)
- #11931: Fix tricky typing bug with type substitutions
(Stephen Dolan, review by Leo White and Jacques Garrigue)
- #12037, #12171: Fix get_extern_state potential NULL dereference.
(Alexander Skvortsov, report by Török Edwin,
design by Gabriel Scherer, Xavier Leroy)
- #12635: Fix get_intern_state potential NULL dereference.
(Antonin Décimo, review by KC Sivaramakrishnan)
- #12032, #12059: Bug fixes related to compilation of recursive definitions
(Vincent Laviron, report by Victoire Noizet, review by Gabriel Scherer)
* #12145: Loopy constraints cause ocamlc to loop.
Fixed by completely removing the call to `update_type` in
`Typedecl.transl_type_decl`, as the expansion is already checked by
`check_regularity`. As a result, recursion is more polymorphic,
which may cause some (essentially wrong) type declarations to have
unbound type variables, and some constraints unrelated to the concrete
type to be ignored (see tests/typing-misc/constraints.ml).
(Jacques Garrigue, report by Richard Eisenberg, review by Leo White)
- #12207, #12222: Make closure computation linear in the number of recursive
functions instead of quadratic
(Vincent Laviron, report by François Pottier, review by Nathanaëlle Courant
and Gabriel Scherer)
- #11040, #12591: fix a data race in major_gc.c
(Gabriel Scherer, review by Guillaume Munch-Maccagnoni
and KC Sivaramakrishnan, report by Sadiq Jaffer)
- #12238, #12403, #12698: read input files in one go to avoid source reprinting
issues.
(Gabriel Scherer, report by Mike Spivey and Vincent Laviron, review by
Nicolás Ojeda Bär, Xavier Leroy and Jeremy Yallop)
- #12334, #12368: Bad error message with mutually recursive abbreviations
(Jacques Garrigue, report by Richard Eisenberg, review by Gabriel Scherer
and Richard Eisenberg)
- #12401: `seek_in` and `seek_out` sometimes returned normally when given
negative offsets, instead of failing. Now both functions should consistently
raise `Sys_error` in this case.
(Nicolás Ojeda Bär, review by Gabriel Scherer)
- #12267: Fix stack alignment computation
(Miod Vallat, report by Jan Midtgaard, review by Gabriel Scherer)
- #12395, #12404: Fix thread-unsafety in the fallback implementation of
`Unix.create_process` (the one used when `posix_spawnp` is unavailable)
(Xavier Leroy, report by Chris Vine, review by Nicolás Ojeda Bär)
- #12949: open shadowing mistriggers
(Gabriel Scherer, review by Florian Angeletti, report by Andreas Rossberg)
- #12526: Honor `ocaml.inline always` attribute on functions with
optional arguments and default values in the Closure backend
(Alain Frisch, review by Vincent Laviron)
- #12486: Fix delivery of unhandled effect exceptions on amd64 with
--enable-frame-pointers
(Miod Vallat, report by Jan Midtgaard, review by Gabriel Scherer)
- #12561: Fix crash when combining TSan and frame-pointers
(Fabrice Buoro and Olivier Nicole, report by Jan Midtgaard, review by Miod
Vallat and Gabriel Scherer)
- #12482: Rework bounds checking code in the POWER backend
(Miod Vallat and Xavier Leroy, report by Jan Midtgaard, review by
KC Sivaramakrishnan)
- #12528, #12703: Avoid pointer arithmetic overflow in Tag_val macro
(very likely harmless, but can trigger alarms)
(Xavier Leroy, report by Sam Goldman, review by Guillaume Munch-Maccagnoni)
- #12593: TSan should handle Effect.Unhandled correctly
(Fabrice Buoro and Olivier Nicole, report by Jan Midtgaard and Miod Vallat,
review by Gabriel Scherer)
- #12684: fix locations filename in AST produced by the `-pp` option
(Gabriel Scherer, review by Florian Angeletti)
- #12713, #12715: disable common subexpression elimination for atomic loads
(Gabriel Scherer and Vincent Laviron,
review by Vincent Laviron, KC Sivaramakrishnan and Xavier Leroy,
report by Vesa Karvonen and Carine Morel)
- #12714: check whether macros are defined before using them to ensure
that the headers can always be used in code which turns on -Wundef
(or equivalent).
(Antonin Décimo, review by Miod Vallat, Gabriel Scherer,
Xavier Leroy, and David Allsopp)
- #12726: fix segmentation fault under Windows when executing a bytecode file if
the runtime (`ocamlrun.exe`) cannot be found.
(Vadim Zborovskii, Nicolás Ojeda Bär, report by Vadim Zborovskii, review by
David Allsopp)
- #12727, #12730: fix bug with value let-rec and labelled applications
(Vincent Laviron, review by Gabriel Scherer)
- #12755: Fix data race on global pools arrays of pool_freelist
(Fabrice Buoro and Olivier Nicole, review by Gabriel Scherer)
OCaml 5.1.1
-----------
### Bug fixes:
- #12623, fix the computation of variance composition
(Florian Angeletti, report by Vesa Karvonen, review by Gabriel Scherer)
- #12645, fix error messages for cyclic type definitions in presence of
the `-short-paths` flag.
(Florian Angeletti, report by Vesa Karvonen, review by Gabriel Scherer)
- #12581, #12609: Fix error on uses of packed modules outside their pack
to correctly handle nested packs
(Vincent Laviron, report by Javier Chávarri, review by Pierre Chambart)
- #12757: Fix ocamlnat (native toplevel) by registering frametables correctly
(Stephen Dolan, Nick Barnes and Mark Shinwell,
review by Vincent Laviron and Sébastien Hinderer)
OCaml 5.1.0 (14 September 2023)
-------------------------------
### Restored backends
- #11418, #11708: RISC-V multicore support.
(Nicolás Ojeda Bär, review by KC Sivaramakrishnan)
- #11712, #12258, #12261: s390x / IBM Z multicore support:
OCaml & C stack separation; dynamic stack size checks; fiber and
effects support.
(Aleksei Nikiforov, with help from Vincent Laviron and Xavier Leroy,
additional suggestions by Luc Maranget,
review by the same and KC Sivaramakrishnan)
- #11642: Restore Cygwin port. Add GC messages for address space reservations
when OCAMLRUNPARAM option v includes 0x1000.
(David Allsopp, review by Xavier Leroy, Guillaume Munch-Maccagnoni
and Gabriel Scherer)
### Standard library:
- #12006, #12064: Add `Marshal.Compression` flag to `Marshal.to_*` functions.
When this flag is explicitly set, marshaled data is compressed using ZSTD.
On some practical examples, the marshalled output became three times smaller
at no noticeable cost on the marshalling time.
(Xavier Leroy, review by Edwin Török and Gabriel Scherer, fix by Damien
Doligez)
- #10464: Add List.is_empty.
(Craig Ferguson, review by David Allsopp)
- #11848: Add `List.find_mapi`,
`List.find_index: ('a -> bool) -> 'a list -> int option`,
`Seq.find_mapi`, `Seq.find_index`, `Array.find_mapi`, `Array.find_index`,
`Float.Array.find_opt`, `Float.Array.find_index`, `Float.Array.find_map`,
`Float.Array.find_mapi`.
(Sima Kinsart, review by Daniel Bünzli and Nicolás Ojeda Bär)
- #11410: Add Set.to_list, Map.to_list, Map.of_list,
`Map.add_to_list: key -> 'a -> 'a list t -> 'a list t`.
(Daniel Bünzli, review by Nicolás Ojeda Bär and Gabriel Scherer)
- #11836, #11837: Add `Array.map_inplace`, `Array.mapi_inplace`,
`Float.Array.mapi_inplace` and `Float.Array.mapi_inplace`.
(Léo Andrès, review by Gabriel Scherer, KC Sivaramakrishnan and
Nicolás Ojeda Bär)
- #10967: Add Filename.temp_dir.
(David Turner, review by Anil Madhavapeddy, Valentin Gatien-Baron, Nicolás
Ojeda Bär, Gabriel Scherer, and Daniel Bünzli)
- #11246: Add "hash" and "seeded_hash" functions to Bool, Int, Char, Float,
Int32, Int64, and Nativeint.
(Nicolás Ojeda Bär, review by Xavier Leroy and Gabriel Scherer)
- #11488: Add `Mutex.protect: Mutex.t -> (unit -> 'a) -> 'a`
for resource-safe critical sections protected by a mutex.
(Simon Cruanes, review by Gabriel Scherer, Xavier Leroy,
Guillaume Munch-Maccagnoni)
- #11581: Add type equality witness
`type (_, _) eq = Equal: ('a, 'a) eq`
in a new module Stdlib.Type.
(Nicolás Ojeda Bär, review by Daniel Bünzli, Jacques Garrigue, Florian
Angeletti, Alain Frisch, Gabriel Scherer, Jeremy Yallop and Xavier Leroy)
- #11843: Add `In_channel.input_lines` and `In_channel.fold_lines`.
(Xavier Leroy, review by Nicolás Ojeda Bär and Wiktor Kuchta).
- #11856, #11859: Using TRMC, the following `Stdlib` functions are now
tail-recursive:
Stdlib.(@), List.append,
List.concat_map.
(Jeremy Yallop, review by Daniel Bünzli, Anil Madhavapeddy, Nicolás Ojeda Bär,
Gabriel Scherer, and Bannerets)
- #11362, #11402: Using TRMC, the following `Stdlib` functions are now
tail-recursive:
List.map, List.mapi, List.map2,
List.filter, List.filteri, List.filter_map,
List.init,
List.of_seq.
(Nicolás Ojeda Bär, review by Xavier Leroy and Gabriel Scherer)
- #11878, #11965: Prevent seek_in from marking buffer data as valid after
closing the channel. This could lead to inputting uninitialized bytes.
(Samuel Hym, review by Xavier Leroy and Olivier Nicole)
- #11128: Add In_channel.isatty, Out_channel.isatty.
(Nicolás Ojeda Bär, review by Gabriel Scherer and Florian Angeletti)
- #10859: Add `Format.pp_print_iter` and `Format.pp_print_array`.
(Léo Andrès and Daniel Bünzli, review by David Allsopp and Hugo Heuzard)
- #10789: Add `Stack.drop`
(Léo Andrès, review by Gabriel Scherer)
* #10899: Change Stdlib.nan from signaling NaN to quiet NaN.
(Greta Yorsh, review by Xavier Leroy, Guillaume Melquiond and
Gabriel Scherer)
- #11026, #11667, #11858: Rename the type of the accumulator
of fold functions to 'acc:
fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a list -> 'acc
fold_right : ('a -> 'acc -> 'acc) -> 'a list -> 'acc -> 'acc
fold_left_map : ('acc -> 'a -> 'acc * 'b) -> 'acc -> 'a list -> 'acc * 'b list
...
(Valentin Gatien-Baron and François Berenger,
review by Gabriel Scherer and Nicolás Ojeda Bär)
- #11354: Hashtbl.find_all is now tail-recursive.
(Fermín Reig, review by Gabriel Scherer)
- #11500: Make Hashtbl.mem non-allocating.
(Simmo Saan, review by Nicolás Ojeda Bär)
- #11412: Add Sys.is_regular_file
(Xavier Leroy, review by Anil Madhavapeddy, Nicolás Ojeda Bär, David Allsopp)
- #11322, #11329: serialization functions Random.State.{of,to}_binary_string
between Random.State.t and string
(Gabriel Scherer, report by Yotam Barnoy,
review by Daniel Bünzli, Damien Doligez, Hugo Heuzard and Xavier Leroy)
- #11830: Add Type.Id with
`val provably_equal : 'a Type.Id.t -> 'b Type.Id.t -> ('a, 'b) Type.eq option`
(Daniel Bünzli, review by Jeremy Yallop, Gabriel Scherer, Wiktor Kuchta,
Nicolás Ojeda Bär)
- #12184, #12320: Sys.rename Windows fixes on directory corner cases.
(Jan Midtgaard, review by Anil Madhavapeddy)
* #11565: Enable -strict-formats by default. Some incorrect format
specifications (for `printf`) where silently ignored and now fail.
Those new failures occur at compile-time, except if you use advanced
format features like `%(...%)` that parse format strings dynamically.
Pass -no-strict-formats to revert to the previous lenient behavior.
(Nicolás Ojeda Bär, review by David Allsopp)
### Installation size
Specific efforts have been made during this release to reduce the filesystem
size of installed artifacts of the compiler distribution.
The installation size of 5.1 is 272 MiB compared to 521 MiB for 5.0.
Some of those changes will benefit all OCaml packages.
- ocaml/RFCs#23, #12006: use compressed marshaled format from #12006 for .cmi,
.cmt, .cmti files, and for debug info in .cmo and .cma files, resulting in
major reduction in size.
(Xavier Leroy, review by Edwin Török and Gabriel Scherer,
RFC by Simon Cruanes)
- #11981: Reduce size of OCaml installations by removing debugging information
from installed bytecode executables. It is no longer possible to
run ocamldebug over these installed bytecode executables, nor to get
exception backtraces for them.
(Xavier Leroy, review by David Allsopp, report by Fabrice Le Fessant)
* #11993: install only bytecode executables for the `ocamlmklib`, `ocamlcmt`,
`ocamlprof`, `ocamlcp`, `ocamloptp`, and `ocamlmktop` tools, but no
native-code executables. A tool like `ocamlmklib` for example is now
installed directly to `$BINDIR/ocamlmklib`; `ocamlmklib.byte` and
`ocamlmklib.opt` are no longer installed to `$BINDIR`.
(Xavier Leroy, review by Gabriel Scherer)
### Runtime system:
- #11589, #11903: Modify the GC pacing code to make sure the GC keeps
up with allocations in the presence of idle domains.
(Damien Doligez and Stephen Dolan, report by Florian Angeletti,
review by KC Sivaramakrishnan and Sadiq Jaffer)
- #11743: Speed up weak array operations
(KC Sivaramakrishnan, review by François Bobot and Sadiq Jaffer)
- #12131: Simplify implementation of weak hash sets, fixing a
performance regression. (Nick Barnes, review by François Bobot,
Alain Frisch and Damien Doligez).
- #11474, #11998, #12065: Add support for user-defined events in the runtime
event tracing system.
(Lucas Pluvinage, review by Sadiq Jaffer, Guillaume Munch-Maccagnoni,
Enguerrand Decorne, Gabriel Scherer and Anil Madhavapeddy)
- #11827, #12249: Restore prefetching for GC marking
(Fabrice Buoro and Stephen Dolan, review by Gabriel Scherer and Sadiq Jaffer)
- #11144: Restore frame-pointers support for amd64
(Fabrice Buoro, review by Frédéric Bour and KC Sivaramakrishnan)
- #11935: Load frametables of dynlink'd modules in batch
(Stephen Dolan, review by David Allsopp and Guillaume Munch-Maccagnoni)
- #11284, #12525: Use compression of entries scheme when pruning mark stack.
Can decrease memory usage for some workloads, otherwise should be
unobservable.
(Tom Kelly, review by Sabine Schmaltz, Sadiq Jaffer and Damien Doligez)
* #11865, #11868, #11876: Clarify that the operations of a custom
block must never access the OCaml runtime. The previous
documentation only mentioned the main illicit usages. In particular,
since OCaml 5.0, it is no longer safe to call
`caml_remove_global_root` or `caml_remove_generational_global_root`
from within the C finalizer of a custom block, or within the
finalization function passed to `caml_alloc_final`. As a workaround,
such a finalization operation can be registered with `Gc.finalize`
instead, which guarantees to run the finalizer at a safe point.
(Report by Timothy Bourke, discussion by Yotam Barnoy, Timothy
Bourke, Sadiq Jaffer, Xavier Leroy, Guillaume Munch-Maccagnoni, and
Gabriel Scherer)
- #12130: Fix multicore crashes with weak hash sets. Fixes #11934.
(Nick Barnes, review by François Bobot)
- #12099: Add ocamlrund option, -events, to produce a trace of
debug events during bytecode interpretation. Fixes #12098.
(Richard L Ford, review by Gabriel Scherer)
- #12001: Fix book keeping for last finalisers during the minor cycle
(KC Sivaramakrishnan and Enguerrand Decorne, report by Guillaume Bury
and Vincent Laviron, review by Sadiq Jaffer and KC Sivaramakrishnan)
- #11919: New runtime events counters for major heap stats and minor heap
resizing.
(Sadiq Jaffer, review by Gabriel Scherer and David Allsopp)
- #11287, #11872, #11955: Clean up reserved header bits (once used for
Spacetime profiling).
(Nick Barnes, review by Gabriel Scherer and Damien Doligez)
- #11750: Decouple major slice from minor GC.
(KC Sivaramakrishnan, review by Sadiq Jaffer, Guillaume Munch-Maccagnoni and
Damien Doligez)
- #11796: protect lazy computation of code fragment digest by a mutex.
This makes the thread sanitizer happier, and avoids duplicating
the hashing work.
(Gabriel Scherer, review by Xavier Leroy, report by Olivier Nicole)
- #11137: new `Unsafe_store_tag(val, new_tag)` macro to stop using
`Tag_val(val)` as lvalue.
(Gabriel Scherer, review by Xavier Leroy, Guillaume Munch-Maccagnoni
and Nicolás Ojeda Bär)
- #11880: Restore the correct sigmask in systhreads.
(Christiano Haesbaert, review by Guillaume Munch-Maccagnoni and
Sébastien Hinderer)
- #11881: Fix thread-unsafety of registration of operations for "custom"
values.
(Guillaume Munch-Maccagnoni, review by Gabriel Scherer and KC
Sivaramakrishnan)
- #11980: fix quadratic behavior in natdynlink by using a STW section
for frame-descriptor updates.
(Gabriel Scherer, review by Sadiq Jaffer, report by André Maroneze
for Frama-C and Guillaume Melquiond for Coq)
- #12121: unrooted implementations of caml_callback*_exn
(Gabriel Scherer, review by KC Sivaramakrishnan and Xavier Leroy)
- #3921, #12039, #12128: poll for signals in long-running polymorphic
comparisons.
(B. Szilvasy, Gabriel Scherer and Xavier Leroy, review by
Stefan Muenzel, Guillaume Munch-Maccagnoni and Damien Doligez)
- #12231: Support MinGW-w64 11.0 winpthreads library, where the macro
to set up to get flexdll working changed
(David Allsopp and Samuel Hym, light review by Xavier Leroy)
- #12491, #12493, #12500, #12754: Do not change GC pace when creating
sub-arrays of bigarrays
(Xavier Leroy, report by Ido Yariv, analysis by Gabriel Scherer,
review by Gabriel Scherer and Fabrice Buoro)
### Language features:
* #11694: Add short syntax for generative functor types `() -> ...`
(Jeremy Yallop, review by Gabriel Scherer, Nicolás Ojeda Bär,
Jacques Garrigue)
* #11457: Remove old polymorphic variant syntax.
With ``type t = [ `A | `B ]``, one could use the syntax `#t` in types,
where it means the same thing as `[< t]`, and in patterns, where it means
``(`A | `B)``. The use of `#t` in types for polymorphic variants
was deprecated since 2001, and is now removed. The syntax remains available
in patterns, or for objects -- when `t` is a class type.
(Stefan Muenzel, review by Gabriel Scherer and Jacques Garrigue)
* #11984: Add dedicated syntax for generative functor application.
Previously, OCaml did not distinguish between `F ()` and
`F (struct end)`, even though the latter looks applicative. Instead,
the decision between generative and applicative functor application
was made based on the type of `F`. With this patch, we now distinguish
these two application forms; writing `F (struct end)` for a generative
functor leads to new warning 73.
(Frédéric Bour and Richard Eisenberg, review by Florian Angeletti)
- #9975, #11365: Make empty types (`type t = |`) immediate.
(Antal Spector-Zabusky, review by Gabriel Scherer)
### Type system:
* #6941, #11187, #12483: prohibit using classes through recursive modules
inheriting or including a class belonging to a mutually-recursive module