/
Changes
8968 lines (7198 loc) · 362 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
OCaml 4.09.0
------------
(Changes that can break existing programs are marked with a "*")
### Code generation and optimizations:
- #2278: Remove native code generation support for 32-bit Intel macOS,
iOS and other Darwin targets.
(Mark Shinwell, review by Nicolas Ojeda Bar and Xavier Leroy)
- #8507: Shorten symbol names of anonymous functions in Flambda mode
(the directory portions are now hidden)
(Mark Shinwell, review by Nicolás Ojeda Bär)
- #7931, #1904: Add FreeBSD/aarch64 support
(Greg V, review by Sébastien Hinderer, Stephen Dolan, Damien Doligez
and Xavier Leroy)
- #8547: Optimize matches that are an affine function of the input.
(Stefan Muenzel, review by Alain Frisch, Gabriel Scherer)
- #8681, #8699, #8712: Fix code generation with nested let rec of functions.
(Stephen Dolan, Leo White, Gabriel Scherer and Pierre Chambart,
review by Gabriel Scherer, reports by Alexey Solovyev and Jonathan French)
### Compiler user-interface and warnings:
* #2276: Remove support for compiler plugins and hooks (also adds
[Dynlink.unsafe_get_global_value])
(Mark Shinwell, Xavier Clerc, review by Nicolás Ojeda Bär,
Florian Angeletti, David Allsopp and Xavier Leroy)
- #2301: Hint on type error on int literal
(Jules Aguillon, review by Nicolás Ojeda Bär , Florian Angeletti,
Gabriel Scherer and Armaël Guéneau)
- #2307: Hint on type error on int's operators
(Jules Aguillon, with help from Armaël Guéneau,
review by Gabriel Scherer and Florian Angeletti)
- #2309: New options -with-runtime and -without-runtime in ocamlopt/ocamlc
that control the inclusion of the runtime system in the generated program.
(Lucas Pluvinage, review by Daniel Bünzli, Damien Doligez, David Allsopp
and Florian Angeletti)
- #2314: Remove support for gprof profiling.
(Mark Shinwell, review by Xavier Clerc and Stephen Dolan)
- #3819, #8546 more explanations and tests for illegal permutation
(Florian Angeletti, review by Gabriel Scherer)
- #8537: fix the -runtime-variant option for bytecode
(Damien Doligez, review by David Allsopp)
- #8541: Correctly print multi-lines locations
(Louis Roché, review by Gabriel Scherer)
- #8579: Better error message for private constructors
of an extensible variant type
(Guillaume Bury, review by many fine eyes)
### Compiler distribution build system:
- #2267: merge generation of header programs, also fixing parallel build on
Cygwin.
(David Allsopp, review by Sébastien Hinderer)
- #8514: Use boot/ocamlc.opt for building, if available.
(Stephen Dolan, review by Gabriel Scherer)
### Internal/compiler-libs changes:
- #1579: Add a separate types for clambda primitives
(Pierre Chambart, review by Vincent Laviron and Mark Shinwell)
- #1965: remove loop constructors in Cmm and Mach
(Vincent Laviron)
- #1973: fix compilation of catches with multiple handlers
(Vincent Laviron)
- #2190: fix pretty printing (using Pprintast) of "lazy ..." patterns and
"fun (type t) -> ..." expressions.
(Nicolás Ojeda Bär, review by Gabriel Scherer)
- #2228, #8545: refactoring the handling of .cmi files
by moving the logic from Env to a new module Persistent_env
(Gabriel Scherer, review by Jérémie Dimino and Thomas Refis)
- #2229: Env: remove prefix_idents cache
(Thomas Refis, review by Frédéric Bour and Gabriel Scherer)
- #2237, #8582: Reorder linearisation of Trywith to avoid a call instruction
(Vincent Laviron and Greta Yorsh, additional review by Mark Shinwell;
fix in #8582 by Mark Shinwell, Xavier Leroy and Anil Madhavapeddy)
- #2265: Add bytecomp/opcodes.mli
(Mark Shinwell, review by Nicolas Ojeda Bar)
- #2268: Improve packing mechanism used for building compilerlibs modules
into the Dynlink libraries
(Mark Shinwell, Stephen Dolan, review by David Allsopp)
- #2277: Use newtype names as type variable names
(Matthew Ryan)
- #2280: Don't make more Clambda constants after starting Cmmgen
(Mark Shinwell, review by Vincent Laviron)
- #2281: Move some middle-end files around
(Mark Shinwell)
- #2283: Add [is_prefix] and [find_and_chop_longest_common_prefix] to
[Misc.Stdlib.List]
(Mark Shinwell, review by Alain Frisch and Stephen Dolan)
- #2284: Add various utility functions to [Misc] and remove functions
from [Misc.Stdlib.Option] that are now in [Stdlib.Option]
(Mark Shinwell, review by Thomas Refis)
- #2286: Functorise [Consistbl]
(Mark Shinwell, review by Gabriel Radanne)
- #2291: Add [Compute_ranges] pass
(Mark Shinwell, review by Vincent Laviron)
- #2292: Add [Proc.frame_required] and [Proc.prologue_required].
Move tail recursion label creation to [Linearize]. Correctly position
[Lprologue] relative to [Iname_for_debugger] operations.
(Mark Shinwell, review by Vincent Laviron)
- #2308: More debugging information on [Cmm] terms
(Mark Shinwell, review by Stephen Dolan)
- #7878, #8542: Replaced TypedtreeIter with tast_iterator
(Isaac "Izzy" Avram, review by Gabriel Scherer and Nicolás Ojeda Bär)
- #8598: Replace "not is_nonexpansive" by "maybe_expansive".
(Thomas Refis, review by David Allsopp, Florian Angeletti, Gabriel Radanne,
Gabriel Scherer and Xavier Leroy)
### Runtime system:
- #1725, #2279: Deprecate Obj.set_tag and Obj.truncate
(Stephen Dolan, review by Gabriel Scherer, Damien Doligez and Xavier Leroy)
- #2075, #7729: rename _T macro used to support Unicode in the (Windows) runtime
in order to avoid compiler warning
(Nicolás Ojeda Bär, review by Gabriel Scherer and David Allsopp)
* #2240: Constify "identifier" in struct custom_operations
(Cedric Cellier, review by Xavier Leroy)
- #2250: Remove extra integer sign-extension in compare functions
(Stefan Muenzel, review by Xavier Leroy)
* #2293: Constify "caml_named_value"
(Stephen Dolan, review by Xavier Leroy)
- #8607: Remove obsolete macros for pre-2002 MSVC support
(Stephen Dolan, review by Nicolás Ojeda Bär and David Allsopp)
- #8656: Fix a bug in [caml_modify_generational_global_root]
(Jacques-Henri Jourdan, review by Gabriel Scherer)
- #8787, #8788: avoid integer overflow in caml_output_value_to_bytes
(Jeremy Yallop, report by Marcello Seri)
### Standard library:
- #2262: take precision (.<n>) and flags ('+' and ' ') into account
in printf %F
(Pierre Roux, review by Gabriel Scherer)
- #6148, #8596: optimize some buffer operations
(Damien Doligez, reports by John Whitington and Alain Frisch,
review by Jeremy Yallop and Gabriel Scherer)
### Other libraries:
- #2112: Fix Thread.yield unfairness with busy threads yielding to each
other.
(Andrew Hunter, review by Jacques-Henri Jourdan, Spiros Eliopoulos, Stephen
Weeks, & Mark Shinwell)
- #7903, #2306: Make Thread.delay interruptible by signals again
(Xavier Leroy, review by Jacques-Henri Jourdan and Edwin Török)
- #2248: Unix alloc_sockaddr: Fix read of uninitialized memory for an
unbound Unix socket. Add support for receiving abstract (Linux) socket paths.
(Tim Cuthbertson, review by Sébastien Hinderer and Jérémie Dimino)
- #2289: Delete the vmthreads library. This library was deprecated in 4.08.0.
(Jérémie Dimino)
- #2318: Delete the graphics library. This library is now available
as a separate "graphics" package in opam. Its new home is:
https://github.com/ocaml/graphics
(Jérémie Dimino, review by Nicolas Ojeda Bar, Xavier Leroy and
Sébastien Hinderer)
### Tools:
- #2221: ocamldep will now correctly allow a .ml file in an include directory
that appears first in the search order to shadow a .mli appearing in a later
include directory.
(Nicolás Ojeda Bär, review by Florian Angeletti)
### Manual and documentation:
- #8757: Rename Pervasives to Stdlib in core library documentation.
(Ian Zimmerman, review by David Allsopp)
- #7584, #8538: Document .cmt* files in the "overview" of ocaml{c,opt}
(Oxana Kostikova, rewiew by Florian Angeletti)
- #8515: manual, precise constraints on reexported types
(Florian Angeletti, review by Gabriel Scherer)
### Bug fixes:
- #7156, #8594: make top level use custom printers if they are available
(Andrew Litteken, report by Martin Jambon, review by Nicolás Ojeda Bär,
Thomas Refis, Armaël Guéneau, Gabriel Scherer, David Allsopp)
- #3249: ocamlmklib should reject .cmxa files
(Xavier Leroy)
- #7937, #2287: fix uncaught Unify exception when looking for type
declaration
(Florian Angeletti, review by Jacques Garrigue)
- #2296: Fix parsing of hexadecimal floats with underscores in the exponent.
(Hugo Heuzard and Xavier Leroy, review by Gabriel Scherer)
- #8610, #8613: toplevel printing, consistent deduplicated name for types
(Florian Angeletti, review by Thomas Refis and Gabriel Scherer,
reported by Xavier Clerc)
- #8635, #8636: Fix a bad side-effect of the -allow-approx option of
ocamldep. It used to turn some errors into successes
(Jérémie Dimino)
- #8701, #8725: Variance of constrained parameters causes principality issues
(Jacques Garrigue, report by Leo White, review by Gabriel Scherer)
- #8779, more cautious variance computation to avoid missing cmis
(Florian Angeletti, report by Antonio Nuno Monteiro, review by Leo White)
- #8800: Fix soundness bug in extension constructor inclusion
(Leo White, review by Jacques Garrigue)
OCaml 4.08 maintenance branch:
------------------------------
### Bug fixes:
- #7887: ensure frame table is 8-aligned on ARM64 and PPC64
(Xavier Leroy, report by Mark Hayden, review by Mark Shinwell
and Gabriel Scherer)
- #8751: fix bug that could result in misaligned data section when compiling to
native-code on amd64. (observed with the mingw64 compiler)
(Nicolás Ojeda Bär, review by David Allsopp)
- #8769, #8770: Fix assertion failure with -pack
(Leo White, review by Gabriel Scherer, report by Fabian @copy)
OCaml 4.08.0 (13 June 2019)
---------------------------
### Language features:
- #1947: Introduce binding operators (let*, let+, and* etc.)
(Leo White, review by Thomas Refis)
- #1892: Allow shadowing of items coming from an include
(Thomas Refis, review by Gabriel Radanne)
- #2122: Introduce local substitutions in signatures: "type t := type_expr"
and "module M := Extended(Module).Path"
(Thomas Refis, with help and review from Leo White, and Alain Frisch)
- #1804: New notion of "alerts" that generalizes the deprecated warning
[@@ocaml.alert deprecated "Please use bar instead!"]
[@@ocaml.alert unsafe "Please use safe_foo instead!"]
(Alain Frisch, review by Leo White and Damien Doligez)
- #6422, #7083, #305, #1568: Allow `exception` under or-patterns
(Thomas Refis, with help and review from Alain Frisch, Gabriel Scherer, Jeremy
Yallop, Leo White and Luc Maranget)
- #1705: Allow @@attributes on exception declarations.
(Hugo Heuzard, review by Gabriel Radanne and Thomas Refis)
- #1506, #2147, #2166, #2167: Extended `open` to arbitrary module
expression in structures and to applicative paths in signatures
(Runhang Li, review by Alain Frisch, Florian Angeletti, Jeremy Yallop,
Leo White and Thomas Refis)
* #2106: .~ is now a reserved keyword, and is no longer available
for use in extended indexing operators
(Jeremy Yallop, review by Gabriel Scherer, Florian Angeletti, and
Damien Doligez)
* #7841, #2041, #2235: allow modules from include directories
to shadow other ones, even in the toplevel; for a example, including
a directory that defines its own Result module will shadow the stdlib's.
(Jérémie Dimino, review by Alain Frisch and David Allsopp)
### Type system:
- #2110: Partial support for GADTs inside or-patterns;
The type equalities introduced by the GADT constructor are only
available inside the or-pattern; they cannot be used in the
right-hand-side of the clause, when both sides of the or-pattern
agree on it.
(Thomas Refis and Leo White, review by Jacques Garrigue)
- #1826: allow expanding a type to a private abbreviation instead of
abstracting when removing references to an identifier.
(Thomas Refis and Leo White, review by Jacques Garrigue)
- #1942, #2244: simplification of the static check
for recursive definitions
(Alban Reynaud and Gabriel Scherer,
review by Jeremy Yallop, Armaël Guéneau and Damien Doligez)
### Standard library:
- #2128: Add Fun module: `id, const, flip, negate, protect`
(protect is a "try_finally" combinator)
https://caml.inria.fr/pub/docs/manual-ocaml/libref/Fun.html
(Many fine eyes)
- #2010: Add Bool module
https://caml.inria.fr/pub/docs/manual-ocaml/libref/Bool.html
(Many fine eyes)
- #2011: Add Int module
https://caml.inria.fr/pub/docs/manual-ocaml/libref/Int.html
(Many fine eyes)
- #1940: Add Option module and Format.pp_print_option
`none, some, value, get, bind, join, map, fold, iter`, etc.
https://caml.inria.fr/pub/docs/manual-ocaml/libref/Option.html
(Many fine eyes)
- #1956: Add Result module and Format.pp_print_result
`ok, error, value, get_ok, bind, join, map, map_error`, etc.
https://caml.inria.fr/pub/docs/manual-ocaml/libref/Result.html
(Many fine eyes)
- #1855, #2118: Add `Fun.protect ~finally` for enforcing local
invariants whether a function raises or not, similar to
`unwind-protect` in Lisp and `FINALLY` in Modula-2. It is careful
about preserving backtraces and treating exceptions in finally as
errors.
(Marcello Seri and Guillaume Munch-Maccagnoni, review by Daniel
Bünzli, Gabriel Scherer, François Bobot, Nicolás Ojeda Bär, Xavier
Clerc, Boris Yakobowski, Damien Doligez, and Xavier Leroy)
* #1605: Deprecate Stdlib.Pervasives. Following #1010, Pervasives
is no longer needed and Stdlib should be used instead.
(Jérémie Dimino, review by Nicolás Ojeda Bär)
- #2185: Add `List.filter_map`
(Thomas Refis, review by Alain Frisch and Gabriel Scherer)
- #1957: Add Stack.{top_opt,pop_opt} and Queue.{peek_opt,take_opt}.
(Vladimir Keleshev, review by Nicolás Ojeda Bär and Gabriel Scherer)
- #1182: Add new Printf formats %#d %#Ld %#ld %#nd (idem for %i and %u) for
alternative integer formatting -- inserts '_' between blocks of digits.
(ygrek, review by Gabriel Scherer)
- #1959: Add Format.dprintf, a printing function which outputs a closure
usable with %t.
(Gabriel Radanne, request by Armaël Guéneau,
review by Florian Angeletti and Gabriel Scherer)
- #1986, #6450: Add Set.disjoint
(Nicolás Ojeda Bär, review by Gabriel Scherer)
- #7812, #2125: Add Filename.chop_suffix_opt
(Alain Frisch, review by Nicolás Ojeda Bär, suggestion by whitequark)
- #1864: Extend Bytes and Buffer with functions to read/write
binary representations of numbers
(Alain Frisch and Daniel Bünzli)
- #1458: Add unsigned operations unsigned_div, unsigned_rem, unsigned_compare
and unsigned_to_int to modules Int32, Int64, Nativeint.
(Nicolás Ojeda Bär, review by Daniel Bünzli, Alain Frisch and Max Mouratov)
- #2002: Add Format.pp_print_custom_break, a new more general kind of break
hint that can emit non-whitespace characters.
(Vladimir Keleshev and Pierre Weis, review by Josh Berdine, Gabriel Radanne)
- #1966: Add Format semantic tags using extensible sum types.
(Gabriel Radanne, review by Nicolás Ojeda Bär)
- #1794: Add constants zero, one, minus_one and functions succ,
pred, is_finite, is_infinite, is_nan, is_integer, trunc, round,
next_after, sign_bit, min, max, min_max, min_num, max_num,
min_max_num to module Float.
(Christophe Troestler, review by Alain Frish, Xavier Clerc and Daniel Bünzli)
- #1354, #2177: Add fma support to Float module.
(Laurent Thévenoux, review by Alain Frisch, Jacques-Henri Jourdan,
Xavier Leroy)
- #5072, #6655, #1876: add aliases in Stdlib for built-in types
and exceptions.
(Jeremy Yallop, reports by Pierre Letouzey and David Sheets,
review by Valentin Gatien-Baron, Gabriel Scherer and Alain Frisch)
- #1731: Format, use raise_notrace to preserve backtraces.
(Frédéric Bour, report by Jules Villard, review by Gabriel Scherer)
- #6701, #1185, #1803: make float_of_string and string_of_float
locale-independent.
(ygrek, review by Xavier Leroy and Damien Doligez)
- #7795, #1782: Fix off-by-one error in Weak.create.
(KC Sivaramakrishnan, review by Gabriel Scherer and François Bobot)
- #7235: Format, flush err_formatter at exit.
(Pierre Weis, request by Jun Furuse)
- #1857, #7812: Remove Sort module, deprecated since 2000 and emitting
a deprecation warning since 4.02.
(whitequark)
- #1923: Arg module sometimes misbehaved instead of rejecting invalid
-keyword=arg inputs
(Valentin Gatien-Baron, review by Gabriel Scherer)
- #1959: Small simplification and optimization to Format.ifprintf
(Gabriel Radanne, review by Gabriel Scherer)
- #2119: clarify the documentation of Set.diff
(Gabriel Scherer, suggestion by John Skaller)
- #2145: Deprecate the mutability of Gc.control record fields
(Damien Doligez, review by Alain Frisch)
- #2159, #7874: annotate {String,Bytes}.equal as being [@@noalloc].
(Pierre-Marie Pédrot, review by Nicolás Ojeda Bär)
- #1936: Add module Float.Array
(Damien Doligez, review by Xavier Clerc and Alain Frisch)
- #2183: Fix segfault in Array.create_float with -no-flat-float-array
(Damien Doligez, review by Gabriel Scherer and Jeremy Yallop)
- #1525: Make function set_max_indent respect documentation
(Pierre Weis, Richard Bonichon, review by Florian Angeletti)
- #2202: Correct Hashtbl.MakeSeeded.{add_seq,replace_seq,of_seq} to use
functor hash function instead of default hash function. Hashtbl.Make.of_seq
shouldn't create randomized hash tables.
(David Allsopp, review by Alain Frisch)
### Other libraries:
- #2533, #1839, #1949: added Unix.fsync
(Francois Berenger, Nicolás Ojeda Bär, review by Daniel Bünzli, David Allsopp
and ygrek)
- #1792, #7794: Add Unix.open_process_args{,_in,_out,_full} similar to
Unix.open_process{,_in,_out,_full}, but passing an explicit argv array.
(Nicolás Ojeda Bär, review by Jérémie Dimino, request by Volker Diels-Grabsch)
- #1999: Add Unix.process{,_in,_out,_full}_pid to retrieve opened process's
pid.
(Romain Beauxis, review by Nicolás Ojeda Bär)
- #2222: Set default status in waitpid when pid is zero. Otherwise,
status value is undefined.
(Romain Beauxis and Xavier Leroy, review by Stephen Dolan)
* #2104, #2211, #4127, #7709: Fix Thread.sigmask. When
system threads are loaded, Unix.sigprocmask is now an alias for
Thread.sigmask. This changes the behavior at least on MacOS, where
Unix.sigprocmask used to change the masks of all threads.
(Jacques-Henri Jourdan, review by Jérémie Dimino)
- #1061: Add ?follow parameter to Unix.link. This allows hardlinking
symlinks.
(Christopher Zimmermann, review by Xavier Leroy, Damien Doligez, David
Allsopp, David Sheets)
- #2038: Deprecate vm threads.
OCaml supported both "native threads", based on pthreads,
and its own green-threads implementation, "vm threads". We are not
aware of any recent usage of "vm threads", and removing them simplifies
further maintenance.
(Jérémie Dimino)
* #4208, #4229, #4839, #6462, #6957, #6950, #1063, #2176,
#2297: Make (nat)dynlink sound by correctly failing when
dynlinked module names clash with other modules or interfaces.
(Mark Shinwell, Leo White, Nicolás Ojeda Bär, Pierre Chambart)
- #2263: Delete the deprecated Bigarray.*.map_file functions in
favour of `*_of_genarray (Unix.map_file ...)` functions instead. The
`Unix.map_file` function was introduced in OCaml 4.06.0 onwards.
(Jérémie Dimino, reviewed by David Allsopp and Anil Madhavapeddy)
### Compiler user-interface and warnings:
- #2096: Add source highlighting for errors & warnings in batch mode
(Armaël Guéneau, review by Gabriel Scherer and Jérémie Dimino)
- #2133: [@ocaml.warn_on_literal_pattern]: now warn on literal patterns
found anywhere in a constructor's arguments.
(Jeremy Yallop, review by Gabriel Scherer)
- #1720: Improve error reporting for missing 'rec' in let-bindings.
(Arthur Charguéraud and Armaël Guéneau, with help and advice
from Gabriel Scherer, Frédéric Bour, Xavier Clerc and Leo White)
- #7116, #1430: new -config-var option
to get the value of a single configuration variable in scripts.
(Gabriel Scherer, review by Sébastien Hinderer and David Allsopp,
request by Adrien Nader)
- #1733,1993,1998,2058,2094,2140: Typing error message improvements
- #1733, change the perspective of the unexpected existential error
message.
- #1993, expanded error messages for universal quantification failure
- #1998, more context for unbound type parameter error
- #2058, full explanation for unsafe cycles in recursive module
definitions (suggestion by Ivan Gotovchits)
- #2094, rewording for "constructor has no type" error
- #7565, #2140, more context for universal variable escape
in method type
(Florian Angeletti, reviews by Jacques Garrique, Armaël Guéneau,
Gabriel Radanne, Gabriel Scherer and Jeremy Yallop)
- #1913: new flag -dump-into-file to print debug output like -dlambda into
a file named after the file being built, instead of on stderr.
(Valentin Gatien-Baron, review by Thomas Refis)
- #1921: in the compilation context passed to ppx extensions,
add more configuration options related to type-checking:
-rectypes, -principal, -alias-deps, -unboxed-types, -unsafe-string
(Gabriel Scherer, review by Gabriel Radanne, Xavier Clerc and Frédéric Bour)
- #1976: Better error messages for extension constructor type mismatches
(Thomas Refis, review by Gabriel Scherer)
- #1841, #7808: the environment variable OCAMLTOP_INCLUDE_PATH can now
specify a list of additional include directories for the ocaml toplevel.
(Nicolás Ojeda Bär, request by Daniel Bünzli, review by Daniel Bünzli and
Damien Doligez)
- #6638, #1110: introduced a dedicated warning to report
unused "open!" statements
(Alain Frisch, report by dwang, review by and design from Leo White)
- #1974: Trigger warning 5 in "let _ = e" and "ignore e" if e is of function
type and syntactically an application. (For the case of "ignore e" the warning
already existed, but used to be triggered even when e was not an application.)
(Nicolás Ojeda Bär, review by Alain Frisch and Jacques Garrigue)
- #7408, #7846, #2015: Check arity of primitives.
(Hugo Heuzard, review by Nicolás Ojeda Bär)
- #2091: Add a warning triggered by type declarations "type t = ()"
(Armaël Guéneau, report by linse, review by Florian Angeletti and Gabriel
Scherer)
- #2004: Use common standard library path `lib/ocaml` for Windows,
for consistency with OSX & Linux. Previously was located at `lib`.
(Bryan Phelps, Jordan Walke, review by David Allsopp)
- #6416, #1120: unique printed names for identifiers
(Florian Angeletti, review by Jacques Garrigue)
- #1691: add shared_libraries to ocamlc -config exporting
SUPPORTS_SHARED_LIBRARIES from Makefile.config.
(David Allsopp, review by Gabriel Scherer and Mark Shinwell)
- #6913, #1786: new -match-context-rows option
to control the degree of optimization in the pattern matching compiler.
(Dwight Guth, review by Gabriel Scherer and Luc Maranget)
- #1822: keep attributes attached to pattern variables from being discarded.
(Nicolás Ojeda Bär, review by Thomas Refis)
- #1845: new `-dcamlprimc` option to keep the generated C file containing
the information about primitives; pass `-fdebug-prefix-map` to the C compiler
when supported, for reproducible builds
(Xavier Clerc, review by Jérémie Dimino)
- #1856, #1869: use `BUILD_PATH_PREFIX_MAP` when compiling primitives
in order to make builds reproducible if code contains uses of
`__FILE__` or `__LOC__`
(Xavier Clerc, review by Gabriel Scherer and Sébastien Hinderer)
- #1906: the -unsafe option does not apply to marshalled ASTs passed
to the compiler directly or by a -pp preprocessor; add a proper
warning (64) instead of a simple stderr message
(Valentin Gatien-Baron)
- #1925: Print error locations more consistently between batch mode, toplevel
and expect tests
(Armaël Guéneau, review by Thomas Refis, Gabriel Scherer and François Bobot)
- #1930: pass the elements from `BUILD_PATH_PREFIX_MAP` to the assembler
(Xavier Clerc, review by Gabriel Scherer, Sébastien Hinderer, and
Xavier Leroy)
- #1945, #2032: new "-stop-after [parsing|typing]" option
to stop compilation after the parsing or typing pass
(Gabriel Scherer, review by Jérémie Dimino)
- #1953: Add locations to attributes in the parsetree.
(Hugo Heuzard, review by Gabriel Radanne)
- #1954: Add locations to toplevel directives.
(Hugo Heuzard, review by Gabriel Radanne)
* #1979: Remove support for TERM=norepeat when displaying errors
(Armaël Guéneau, review by Gabriel Scherer and Florian Angeletti)
- #1960: The parser keeps previous location when relocating ast node.
(Hugo Heuzard, review by Jérémie Dimino)
- #7864, #2109: remove duplicates from spelling suggestions.
(Nicolás Ojeda Bär, review by Armaël Guéneau)
### Manual and documentation:
- #7548: printf example in the tutorial part of the manual
(Kostikova Oxana, rewiew by Gabriel Scherer, Florian Angeletti,
Marcello Seri and Armaël Guéneau)
- #7546, #2020: preambles and introduction for compiler-libs.
(Florian Angeletti, review by Daniel Bünzli, Perry E. Metzger
and Gabriel Scherer)
- #7547, #2273: Tutorial on Lazy expressions and patterns in OCaml Manual
(Ulugbek Abdullaev, review by Florian Angeletti and Gabriel Scherer)
- #7720, #1596, precise the documentation
of the maximum indentation limit in Format.
(Florian Angeletti, review by Richard Bonichon and Pierre Weis)
- #7825: html manual split compilerlibs from stdlib in the html
index of modules
(Florian Angeletti, review by Perry E. Metzger and Gabriel Scherer)
- #1209, #2008: in the Extension section, use the caml_example environment
(uses the compiler to check the example code).
This change was made possible by a lot of tooling work from Florian Angeletti:
#1702, #1765, #1863, and Gabriel Scherer's #1903.
(Gabriel Scherer, review by Florian Angeletti)
- #1788, 1831, 2007, 2198, 2232, move language extensions to the core
chapters:
- #1788: quoted string description
- #1831: local exceptions and exception cases
- #2007: 32-bit, 64-bit and native integer literals
- #2198: lazy patterns
- #2232: short object copy notation
(Florian Angeletti, review by Xavier Clerc, Perry E. Metzger, Gabriel Scherer
and Jeremy Yallop)
- #1863: caml-tex2, move to compiler-libs
(Florian Angeletti, review by Sébastien Hinderer and Gabriel Scherer)
- #2105: Change verbatim to caml_example in documentation
(Maxime Flin, review by Florian Angeletti)
- #2114: ocamldoc, improved manpages for documentation inside modules
(Florian Angeletti, review by Gabriel Scherer)
- #2117: stdlib documentation, duplicate the operator precedence table
from the manual inside a separate "OCaml_operators" module.
(Florian Angeletti, review by Daniel Bünzli, Perry E. Metzger
and Gabriel Scherer)
- #2187: document "exception A | pat" patterns
(Florian Angeletti, review by Perry E. Metzger and Jeremy Yallop)
- #8508: refresh \moduleref macro
(Florian Angeletti, review by Gabriel Scherer)
### Code generation and optimizations:
- #7725, #1754: improve AFL instrumentation for objects and lazy values.
(Stephen Dolan)
- #1631: AMD64 code generator: emit shorter instruction sequences for the
sign-extension operations.
(LemonBoy, review by Alain Frisch and Xavier Leroy)
- #7246, #2146: make a few int64 primitives use [@@unboxed]
stubs on 32bits
(Jérémie Dimino)
- #1917: comballoc: ensure object allocation order is preserved
(Stephen Dolan)
- #6242, #2143, #8558, #8559: Optimize some local functions.
Local functions that do not escape and whose calls all have
the same continuation are lowered into a static-catch handler.
(Alain Frisch, review by Gabriel Scherer)
- #2082: New options [-insn-sched] and [-no-insn-sched] to control
instruction scheduling.
(Mark Shinwell, review by Damien Doligez)
- #2239: Fix match miscompilation with flambda
(Leo White, review by Alain Frisch)
### Runtime system:
- #7198, #7750, #1738: add a function (caml_alloc_custom_mem)
and three GC parameters to give the user better control of the
out-of-heap memory retained by custom values; use the function to
allocate bigarrays and I/O channels.
(Damien Doligez, review by Alain Frisch)
- #1793: add the -m and -M command-line options to ocamlrun.
Option -m prints the magic number of the bytecode executable passed
as argument, -M prints the magic number expected by ocamlrun.
(Sébastien Hinderer, review by Xavier Clerc and Damien Doligez)
- #1867: Remove the C plugins mechanism.
(Xavier Leroy, review by David Allsopp, Damien Doligez, Sébastien Hinderer)
- #8627: Require SSE2 for 32-bit mingw port to generate correct code
for caml_round with GCC 7.4.
(David Allsopp, review by Xavier Leroy)
- #7676, #2144: Remove old GC heuristic
(Damien Doligez, report and review by Alain Frisch)
- #1723: Remove internal Meta.static_{alloc,free} primitives.
(Stephen Dolan, review by Gabriel Scherer)
- #1895: Printexc.get_callstack would return only one frame in native
code in threads other then the initial one
(Valentin Gatien-Baron, review by Xavier Leroy)
- #1900, #7814: avoid exporting non-prefixed identifiers in the debug
and instrumented runtimes.
(Damien Doligez, report by Gabriel Scherer)
- #2079: Avoid page table lookup in Pervasives.compare with
no-naked-pointers
(Sam Goldman, review by Gabriel Scherer, David Allsopp, Stephen Dolan)
- #7829, #8585: Fix pointer comparisons in freelist.c (for 32-bit platforms)
(David Allsopp and Damien Doligez)
- #8567, #8569: on ARM64, use 32-bit loads to access caml_backtrace_active
(Xavier Leroy, review by Mark Shinwell and Greta Yorsh)
- #8568: Fix a memory leak in mmapped bigarrays
(Damien Doligez, review by Xavier Leroy and Jérémie Dimino)
### Tools
- #2182: Split Emacs caml-mode as an independent project.
(Christophe Troestler, review by Gabriel Scherer)
- #1865: support dark themes in Emacs, and clean up usage of
deprecated Emacs APIs
(Wilfred Hughes, review by Clément Pit-Claudel)
- #1590: ocamllex-generated lexers can be instructed not to update
their lex_curr_p/lex_start_p fields, resulting in a significant
performance gain when those fields are not required.
(Alain Frisch, review by Jérémie Dimino)
- #7843, #2013: ocamldoc, better handling of {{!label}text} in the latex
backend.
(Florian Angeletti, review by Nicolás Ojeda Bär and Gabriel Scherer)
- #7844, #2040: Emacs, use built-in detection of comments,
fixes an imenu crash.
(Wilfred Hughes, review by Christophe Troestler)
- #7850: Emacs, use symbol boundaries in regular expressions,
fixes an imenu crash.
(Wilfred Hughes, review by Christophe Troestler)
- #1711: the new 'open' flag in OCAMLRUNPARAM takes a comma-separated list of
modules to open as if they had been passed via the command line -open flag.
(Nicolás Ojeda Bär, review by Mark Shinwell)
- #2000: ocamdoc, extended support for "include module type of ..."
(Florian Angeletti, review by Jérémie Dimino)
- #2045: ocamlmklib now supports options -args and -args0 to provide extra
command-line arguments in a file.
(Nicolás Ojeda Bär, review by Gabriel Scherer and Daniel Bünzli)
- #2189: change ocamldep Makefile-output to print each dependency
on a new line, for more readable diffs of versioned dependencies.
(Gabriel Scherer, review by Nicolás Ojeda Bär)
- #2223: ocamltest: fix the "bsd" and "not-bsd" built-in actions to
recognize all BSD variants
(Damien Doligez, review by Sébastien Hinderer and David Allsopp)
### Compiler distribution build system:
- #1776: add -no-install-bytecode-programs and related configure options to
control (non-)installation of ".byte" executables.
(Mark Shinwell, review by Sébastien Hinderer and Gabriel Scherer)
- #1777: add -no-install-source-artifacts and related configure options to
control installation of .cmt, .cmti, .mli and .ml files.
(Mark Shinwell, review by Nicolás Ojeda Bär and Sébastien Hinderer)
- #1781: cleanup of the manual's build process.
(steinuil, review by Marcello Seri, Gabriel Scherer and Florian Angeletti)
- #1797: remove the deprecated Makefile.nt files.
(Sébastien Hinderer, review by Nicolas Ojeda Bar)
- #1805: fix the bootstrap procedure and its documentation.
(Sébastien Hinderer, Xavier Leroy and Damien Doligez; review by
Gabriel Scherer)
- #1840: build system enhancements.
(Sébastien Hinderer, review by David Allsopp, Xavier Leroy and
Damien Doligez)
- #1852: merge runtime directories
(Sébastien Hinderer, review by Xavier Leroy and Damien Doligez)
- #1854: remove the no longer defined BYTECCCOMPOPTS build variable.
(Sébastien Hinderer, review by Damien Doligez)
- #2024: stop supporting obsolete platforms: Rhapsody (old beta
version of MacOS X, BeOS, alpha*-*-linux*, mips-*-irix6*,
alpha*-*-unicos, powerpc-*-aix, *-*-solaris2*, mips*-*-irix[56]*,
i[3456]86-*-darwin[89].*, i[3456]86-*-solaris*, *-*-sunos* *-*-unicos.
(Sébastien Hinderer, review by Xavier Leroy, Damien Doligez, Gabriel
Scherer and Armaël Guéneau)
- #2053: allow unix, vmthreads and str not to be built.
(David Allsopp, review by Sébastien Hinderer)
* #2059: stop defining OCAML_STDLIB_DIR in s.h.
(Sébastien Hinderer, review by David Allsopp and Damien Doligez)
* #2066: remove the standard_runtime configuration variable.
(Sébastien Hinderer, review by Xavier Leroy, Stephen Dolan and
Damien Doligez)
* #2139: use autoconf to generate the compiler's configuration script
(Sébastien Hinderer, review by Damien Doligez and David Allsopp)
- #2148: fix a parallel build bug involving CamlinternalLazy.
(Stephen Dolan, review by Gabriel Scherer and Nicolas Ojeda Bar)
- #2264, #7904: the configure script now sets the Unicode handling mode
under Windows according to the value of the variable WINDOWS_UNICODE_MODE. If
WINDOWS_UNICODE_MODE is "ansi" then it is assumed to be the current code page
encoding. If WINDOWS_UNICODE_MODE is "compatible" or empty or not set at all,
then encoding is UTF-8 with code page fallback.
(Nicolás Ojeda Bär, review by Sébastien Hinderer and David Allsopp)
- #2266: ensure Cygwin ports configure with `EXE=.exe`, or the compiler is
unable to find the camlheader files (subtle regression of #2139/2041)
(David Allsopp, report and review by Sébastien Hinderer)
- #7919, #2311: Fix assembler detection in configure
(Sébastien Hinderer, review by David Allsopp)
- #2295: Restore support for bytecode target XLC/AIX/Power
(Konstantin Romanov, review by Sébastien Hinderer and David Allsopp)
- #8528: get rid of the direct call to the C preprocessor in the testsuite
(Sébastien Hinderer, review by David Allsopp)
- #7938, #8532: Fix alignment detection for ints on 32-bits platforms
(Sébastien Hinderer, review by Xavier Leroy)
* #8533: Remove some unused configure tests
(Stephen Dolan, review by David Allsopp and Sébastien Hinderer)
- #2207, #8604: Add opam files to allow pinning
(Leo White, Greta Yorsh, review by Gabriel Radanne)
- #8616: configure: use variables rather than arguments for a few options
(Sébastien Hinderer, review by David Allsopp, Gabriel Scherer and
Damien Doligez)
- #8632: Correctly propagate flags for --with-pic in configure.
(David Allsopp, review by Sébastien Hinderer and Damien Doligez)
- #8673: restore SpaceTime and libunwind support in configure script
(Sébastien Hinderer, review by Damien Doligez)
### Internal/compiler-libs changes:
- #7918, #1703, #1944, #2213, #2257: Add the module
Compile_common, which factorizes the common part in Compile and
Optcompile. This also makes the pipeline more modular.
(Gabriel Radanne, help from Gabriel Scherer and Valentin
Gatien-Baron, review by Mark Shinwell and Gabriel Radanne,
regression spotted by Clément Franchini)
- #292: use Menhir as the parser generator for the OCaml parser.
Satellite GPRs: #1844, #1846, #1853, #1850, #1934, #2151,
#2174
(Gabriel Scherer, Nicolás Ojeda Bär, Frédéric Bour, Thomas Refis
and François Pottier,
review by Nicolás Ojeda Bär, Leo White and David Allsopp)
- #374: use Misc.try_finally for resource cleanup in the compiler
codebase. This should fix the problem of catch-and-reraise `try .. with`
blocks destroying backtrace information -- in the compiler.
(François Bobot, help from Gabriel Scherer and Nicolás Ojeda Bär,
review by Gabriel Scherer)
- #1148, #1287, #1288, #1874: significant improvements
of the tools/check-typo script used over the files of the whole repository;
contributors are now expected to check that check-typo passes on their
pull requests; see CONTRIBUTING.md for more details.
(David Allsopp, review by Damien Doligez and Sébastien Hinderer)
- #1610, #2252: Remove positions from paths
(Leo White, review by Frédéric Bour and Thomas Refis)
- #1745: do not generalize the type of every sub-pattern,
only of variables. (preliminary work for GADTs in or-patterns)
(Thomas Refis, review by Leo White)
- #1909: unsharing pattern types (preliminary work for GADTs in or-patterns)
(Thomas Refis, with help from Leo White, review by Jacques Garrigue)
- #1748: do not error when instantiating polymorphic fields in patterns.
(Thomas Refis, review by Gabriel Scherer)
- #2317: type_let: be more careful generalizing parts of the pattern
(Thomas Refis and Leo White, review by Jacques Garrigue)
- #1746: remove unreachable error variant: Make_seltype_nongen.
(Florian Angeletti, review by Gabriel Radanne)
- #1747: type_cases: always propagate (preliminary work
for GADTs in or-patterns)
(Thomas Refis, review by Jacques Garrigue)
- #1811: shadow the polymorphic comparison in the middle-end
(Xavier Clerc, review by Pierre Chambart)
- #1833: allow non-val payloads in CMM Ccatch handlers
(Simon Fowler, review by Xavier Clerc)
- #1866: document the release process
(Damien Doligez and Gabriel Scherer, review by Sébastien Hinderer,
Perry E. Metzger, Xavier Leroy and David Allsopp)
- #1886: move the Location.absname reference to Clflags.absname
(Armaël Guéneau, review by Jérémie Dimino)
- #1894: generalize highlight_dumb in location.ml to handle highlighting
several locations
(Armaël Guéneau, review by Gabriel Scherer)
- #1903: parsetree, add locations to all nodes with attributes
(Gabriel Scherer, review by Thomas Refis)
- #1905: add check-typo-since to check the files changed
since a given git reference
(Gabriel Scherer, review by David Allsopp)
- #1910: improve the check-typo use of .gitattributes
(Gabriel Scherer, review by David Allsopp and Damien Doligez)
- #1938: always check ast invariants after preprocessing
(Florian Angeletti, review by Alain Frisch and Gabriel Scherer)
- #1941: refactor the command line parsing of ocamlcp and ocamloptp
(Valentin Gatien-Baron, review by Florian Angeletti)
- #1948: Refactor Stdlib.Format. Notably, use Stdlib.Stack and Stdlib.Queue,
and avoid exceptions for control flow.
(Vladimir Keleshev, review by Nicolás Ojeda Bär and Gabriel Scherer)
* #1952: refactor the code responsible for displaying errors and warnings
`Location.report_error` is removed, use `Location.print_report` instead
(Armaël Guéneau, review by Thomas Refis)
- #7835, #1980, #8548, #8586: separate scope from stamp in idents and explicitly