-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChanges
7987 lines (6475 loc) · 329 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
---------------
(Changes that can break existing programs are marked with a "*")
### Language features:
- MPR#6422, MPR#7083, GPR#305, GPR#1568: Allow "exception" under or-patterns
(Thomas Refis, with help and review from Alain Frisch, Gabriel Scherer, Jeremy
Yallop, Leo White and Luc Maranget)
- GPR#1705: Allow @@attributes on exceptions.
(Hugo Heuzard, review by Gabriel Radanne and Thomas Refis)
### Type system:
- GPR#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)
### Standard library:
- MPR#6701, GPR#1185, GPR#1803: make float_of_string and string_of_float
locale-independent.
(ygrek, review by Xavier Leroy and Damien Doligez)
- GPR#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, Jérémie Dimino)
- MPR#7795, GPR#1782: Fix off-by-one error in Weak.create.
(KC Sivaramakrishnan)
- GPR#1731: Format, use raise_notrace to preserve backtraces.
(Frédéric Bour, report by Jules Villard, review by Gabriel Scherer)
- GPR#1792, MPR#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)
- GPR#1182: Add new Printf formats %#d %#Ld %#ld %#nd (idem for %i and %u) for
alternative integer formatting.
(ygrek, review by Gabriel Scherer)
- MPR#7235: Format, flush err_formatter at exit.
(Pierre Weis, request by Jun Furuse)
- GPR#1857, MPR#7812: Remove Sort module, deprecated since 2000 and emitting
a deprecation warning since 4.02.
(whitequark)
### Other libraries:
- GPR#1061: Add ?follow parameter to Unix.link. This allows hardlinking
symlinks.
(Christopher Zimmermann, review by Xavier Leroy, Damien Doligez, David
Allsopp, David Sheets)
### Compiler user-interface and warnings:
- PR#6416, GPR#1120: unique printed names for identifiers
(Florian Angeletti, review by Jacques Garrigue)
- MPR#7116, GPR#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)
- GPR#1733: change the perspective of the unexpected existential error message.
(Florian Angeletti, review by Gabriel Scherer and Jeremy Yallop)
- GPR#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)
- GPR#1737: Update locations during destructive substitutions.
(Thomas Refis, review by Gabriel Radanne)
- GPR#1748: do not error when instantiating polymorphic fields in patterns.
(Thomas Refis, review by Gabriel Scherer)
- MPR#6913: 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)
- GPR#1822: keep attributes attached to pattern variables from being discarded.
(Nicolás Ojeda Bär, review by Thomas Refis)
- GPR#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)
- GPR#1856, GPR#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)
- GPR#1906: created warning 64 when using -unsafe and a -pp argument that
returns a syntax tree, to replace the print that was there already
(Valentin Gatien-Baron)
- GPR#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)
### Code generation and optimizations:
- MPR#7725, GPR#1754: improve AFL instrumentation for objects and lazy values.
(Stephen Dolan)
- GPR#1631: AMD64 code generator: emit shorter instruction sequences for the
sign-extension operations.
(LemonBoy, review by Alain Frisch and Xavier Leroy)
### Runtime system:
- GPR#1793: add the -m and -M command-line options to ocamlrun.
(Sébastien Hinderer, review by Xavier Clerc and Damien Doligez)
- GPR#1723: Remove internal Meta.static_{alloc,free} primitives.
(Stephen Dolan, review by Gabriel Scherer)
- GPR#1867: Remove the C plugins mechanism.
(Xavier Leroy, review by David Allsopp, Damien Doligez, Sébastien Hinderer)
- GPR#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)
- GPR#1900, MPR#7814: avoid exporting non-prefixed identifiers in the debug
and instrumented runtimes.
(Damien Doligez, report by Gabriel Scherer)
### Tools
- GPR#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)
### Manual and documentation:
- GPR#1788: move the quoted string description to the main chapters.
(Florian Angeletti, review by Xavier Clerc and Perry E. Metzger)
- GPR#1831: move the local exceptions and exception cases to the main chapters.
(Florian Angeletti, review by Perry E. Metzger and Jeremy Yallop)
### Compiler distribution build system:
- GPR#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)
- GPR#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)
- GPR#1781: cleanup of the manual's build process.
(steinuil, review by Marcello Seri, Gabriel Scherer and Florian Angeletti)
- GPR#1797: remove the deprecated Makefile.nt files.
(Sébastien Hinderer, review by Nicolas Ojeda Bar)
- GPR#1805: fix the bootstrap procedure and its documentation.
(Sébastien Hinderer, Xavier Leroy and Damien Doligez; review by
Gabriel Scherer)
- GPR#1840: build system enhancements.
(Sébastien Hinderer, review by David Allsopp, Xavier Leroy and
Damien Doligez)
- GPR#1852: merge runtime directories
(Sébastien Hinderer, review by Xavier Leroy and Damien Doligez)
- GPR#1854: remove the no longer defined BYTECCCOMPOPTS build variable.
(Sébastien Hinderer, review by Damien Doligez)
### Internal/compiler-libs changes:
- GPR#1894: generalize highlight_dumb in location.ml to handle highlighting
several locations (Armaël Guéneau, review by Gabriel Scherer)
- GPR#1745: do not generalize the type of every sub-pattern, only of variables.
(Thomas Refis, review by Leo White)
- GPR#1746: remove unreachable error variant: Make_seltype_nongen.
(Florian Angeletti, review by Gabriel Radanne)
- GPR#1747: type_cases: always propagate.
(Thomas Refis, review by Jacques Garrigue)
- GPR#1811: shadow the polymorphic comparison in the middle-end
(Xavier Clerc, review by Pierre Chambart)
- GPR#1833: allow non-val payloads in CMM Ccatch handlers
(Simon Fowler, review by Xavier Clerc)
- GPR#1886: move the Location.absname reference to Clflags.absname
(Armaël Guéneau, review by Jérémie Dimino)
### Bug fixes:
- MPR#7726, GPR#1676: Recursive modules, equi-recursive types and stack overflow
(Jacques Garrigue, report by Jeremy Yallop, review by Leo White)
- GPR#1719: fix Pervasives.LargeFile functions under Windows.
(Alain Frisch)
- GPR#1739: ensure ocamltest waits for child processes to terminate on Windows.
(David Allsopp, review by Sébastien Hinderer)
- MPR#7554, GPR#1751: Lambda.subst: also update debug event environments
(Thomas Refis, review by Gabriel Scherer)
- MPR#7238, GPR#1825: in Unix.in_channel_of_descr and Unix.out_channel_of_descr,
raise an error if the given file description is not suitable for
character-oriented I/O, for example if it is a block device or a
datagram socket.
(Xavier Leroy, review by Jérémie Dimino and Perry E. Metzger)
- MPR#7799, GPR#1820: fix bug where Scanf.format_from_string could fail when
the argument string contained characters that require escaping.
(Gabriel Scherer and Nicolás Ojeda Bär, report by Guillaume Melquiond, review
by Gabriel Scherer)
- GPR#1843: ocamloptp was doing the wrong thing with option -inline-max-unroll.
(Github user @poechsel, review by Nicolás Ojeda Bär).
- GPR#1890: remove last use of Ctype.unroll_abbrev
(Thomas Refis, report by Leo White, review by Jacques Garrigue)
- GPR#1893: dev-branch only, warning 40(name not in scope) triggered spurious
warnings 49(missing cmi) with -no-alias-deps.
(Florian Angeletti, report by Valentin Gatien-Baron,
review by Gabriel Scherer)
OCaml 4.07 maintenance branch
-----------------------------
### Bug fixes:
- MPR#7815, GPR#1896: major GC crash with first-fit policy
(Stephen Dolan and Damien Doligez, report by Joris Giovannangeli)
- MPR#7820, GPR#1897: Fix Array.of_seq. This function used to apply a circular
permutation of one cell to the right on the sequence.
(Thierry Martinez, review by Nicolás Ojeda Bär)
- MPR#7821, GPR#1908: make sure that the compilation of extension
constructors doesn't cause the compiler to load more cmi files
(Jérémie Dimino, review by Gabriel Scherer)
- MPR#7824, GPR#1914: subtype_row: filter out absent fields when row is closed
(Leo White and Thomas Refis, report by talex, review by Jacques Garrigue)
OCaml 4.07.0 (10 July 2018)
---------------------------
(Changes that can break existing programs are marked with a "*")
### Language features:
- MPR#6023, GPR#1648: Allow type-based selection of GADT constructors.
(Thomas Refis and Leo White, review by Jacques Garrigue and Gabriel Scherer)
- GPR#1546: Allow empty variants.
(Runhang Li, review by Gabriel Radanne and Jacques Garrigue)
### Standard library:
- MPR#4170, GPR#1674: add the constant `Float.pi`.
(Christophe Troestler, review by Damien Doligez)
- MPR#6139, GPR#1685: Move the Bigarray module to the standard library. Keep the
bigarray library as on overlay adding the deprecated map_file functions.
(Jérémie Dimino, review by Mark Shinwell)
- MPR#7690, GPR#1528: fix the float_of_string function for hexadecimal floats
with very large values of the exponent.
(Olivier Andrieu)
- GPR#1002: add a new `Seq` module defining a list-of-thunks style iterator.
Also add `{to,of}_seq` to several standard modules.
(Simon Cruanes, review by Alain Frisch and François Bobot)
* GPR#1010: pack all standard library modules into a single module Stdlib
which is the default opened module (Stdlib itself includes Pervasives) to free
up the global namespace for other standard libraries, while still allowing any
OCaml standard library module to be referred to as Stdlib.Module). This is
implemented efficiently using module aliases (prefixing all modules with
Stdlib__, e.g. Stdlib__string).
(Jérémie Dimino, David Allsopp and Florian Angeletti, review by David Allsopp
and Gabriel Radanne)
- GPR#1637: String.escaped is faster and does not allocate when called with a
string that does not contain any characters needing to be escaped.
(Alain Frisch, review by Xavier Leroy and Gabriel Scherer)
- GPR#1638: add a Float module.
(Nicolás Ojeda Bär, review by Alain Frisch and Jeremy Yallop)
- GPR#1697: Tune [List.init] tailrec threshold so that it does not stack
overflow when compiled with the Js_of_ocaml backend.
(Hugo Heuzard, reviewed by Gabriel Scherer)
### Other libraries:
- MPR#7745, GPR#1629: Graphics.open_graph displays the correct window title on
Windows again (fault introduced by 4.06 Unicode changes).
(David Allsopp)
* GPR#1406: Unix.isatty now returns true in the native Windows ports when
passed a file descriptor connected to a Cygwin PTY. In particular, compiler
colors for the native Windows ports now work under Cygwin/MSYS2.
(Nicolás Ojeda Bär, review by Gabriel Scherer, David Allsopp, Xavier Leroy)
- GPR#1451: [getpwuid], [getgrgid], [getpwnam], [getgrnam] now raise Unix error
instead of returning [Not_found] when interrupted by a signal.
(Arseniy Alekseyev, review by Mark Shinwell and Xavier Leroy)
- GPR#1477: raw_spacetime_lib can now be used in bytecode.
(Nicolás Ojeda Bär, review by Mark Shinwell)
- GPR#1533: (a) The implementation of Thread.yield for system thread
now uses nanosleep(1) for enabling better preemption.
(b) Thread.delay is now an alias for Unix.sleepf.
(Jacques-Henri Jourdan, review by Xavier Leroy and David Allsopp)
### Compiler user-interface and warnings:
- MPR#7663, GPR#1694: print the whole cycle and add a reference to the manual in
the unsafe recursive module evaluation error message.
(Florian Angeletti, report by Matej Košík, review by Gabriel Scherer)
- GPR#1166: In OCAMLPARAM, an alternative separator can be specified as
first character (instead of comma) in the set ":|; ,"
(Fabrice Le Fessant)
- GPR#1358: Fix usage warnings with no mli file.
(Leo White, review by Alain Frisch)
- GPR#1428: give a non dummy location for warning 49 (no cmi found).
(Valentin Gatien-Baron)
- GPR#1491: Improve error reporting for ill-typed applicative functor
types, F(M).t.
(Valentin Gatien-Baron, review by Florian Angeletti and Gabriel Radanne)
- GPR#1496: Refactor the code printing explanation for unification type errors,
in order to avoid duplicating pattern matches.
(Armaël Guéneau, review by Florian Angeletti and Gabriel Scherer)
- GPR#1505: Add specific error messages for unification errors involving
functions of type "unit -> _".
(Arthur Charguéraud and Armaël Guéneau, with help from Leo White, review by
Florian Angeletti and Gabriel Radanne)
- GPR#1510: Add specific explanation for unification errors caused by type
constraints propagated by keywords (such as if, while, for...).
(Armaël Guéneau and Gabriel Scherer, original design by Arthur Charguéraud,
review by Frédéric Bour, Gabriel Radanne and Alain Frisch)
- GPR#1515: honor the BUILD_PATH_PREFIX_MAP environment variable
to enable reproducible builds.
(Gabriel Scherer, with help from Ximin Luo, review by Damien Doligez)
- GPR#1534: Extend the warning printed when (*) is used, adding a hint to
suggest using ( * ) instead.
(Armaël Guéneau, with help and review from Florian Angeletti and Gabriel
Scherer)
- GPR#1552, GPR#1577: do not warn about ambiguous variables in guards
(warning 57) when the ambiguous values have been filtered by
a previous clause.
(Gabriel Scherer and Thomas Refis, review by Luc Maranget)
- GPR#1554: warnings 52 and 57: fix reference to manual detailed explanation.
(Florian Angeletti, review by Thomas Refis and Gabriel Scherer)
- GPR#1618: add the -dno-unique-ids and -dunique-ids compiler flags.
(Sébastien Hinderer, review by Leo White and Damien Doligez)
- GPR#1649: change compilation order of toplevel definitions, so that some
warnings emitted by the bytecode compiler appear more in-order than before.
(Luc Maranget, advice and review by Damien Doligez)
- GPR#1806: add linscan to OCAMLPARAM options.
(Raja Boujbel)
### Code generation and optimizations:
- MPR#7630, GPR#1401: Faster compilation of large modules with Flambda.
(Pierre Chambart, report by Emilio Jesús Gallego Arias,
Pierre-Marie Pédrot and Paul Steckler, review by Gabriel Scherer
and Leo White)
- MPR#7630, GPR#1455: Disable CSE for the initialization function.
(Pierre Chambart, report by Emilio Jesús Gallego Arias,
review by Gabriel Scherer and Xavier Leroy)
- GPR#1370: Fix code duplication in Cmmgen.
(Vincent Laviron, with help from Pierre Chambart,
reviews by Gabriel Scherer and Luc Maranget)
- GPR#1486: ARM 32-bit port: add support for ARMv8 in 32-bit mode,
a.k.a. AArch32.
For this platform, avoid ITE conditional instruction blocks and use
simpler IT blocks instead.
(Xavier Leroy, review by Mark Shinwell)
- GPR#1487: Treat negated float comparisons more directly.
(Leo White, review by Xavier Leroy)
- GPR#1573: emitcode: merge events after instructions reordering.
(Thomas Refis and Leo White, with help from David Allsopp, review by Frédéric
Bour)
- GPR#1606: Simplify the semantics of Lambda.free_variables and Lambda.subst,
including some API changes in bytecomp/lambda.mli.
(Pierre Chambart, review by Gabriel Scherer)
- GPR#1613: ensure that set-of-closures are processed first so that other
entries in the let-rec symbol do not get dummy approximations.
(Leo White and Xavier Clerc, review by Pierre Chambart)
* GPR#1617: Make string/bytes distinguishable in the bytecode.
(Hugo Heuzard, reviewed by Nicolás Ojeda Bär)
- GPR#1627: Reduce cmx sizes by sharing variable names (Flambda only).
(Fuyong Quah, Leo White, review by Xavier Clerc)
- GPR#1665: reduce the size of cmx files in classic mode by droping the
bodies of functions that will not be inlined.
(Fuyong Quah, review by Leo White and Pierre Chambart)
- GPR#1666: reduce the size of cmx files in classic mode by droping the
bodies of functions that cannot be reached from the module block.
(Fuyong Quah, review by Leo White and Pierre Chambart)
- GPR#1686: Turn off by default flambda invariants checks.
(Pierre Chambart)
- GPR#1707: Add [Closure_origin.t] to trace inlined functions to prevent
infinite loops from repeatedly inlining copies of the same function.
(Fu Yong Quah)
- GPR#1740: make sure startup.o is always linked in when using
"-output-complete-obj". Previously, it was always linked in only on some
platforms, making this option unusable on platforms where it wasn't.
(Jérémie Dimino, review by Sébastien Hinderer and Xavier Leroy)
### Runtime system:
- MPR#6411, GPR#1535: don't compile everything with -static-libgcc on mingw32,
only dllbigarray.dll and libbigarray.a. Allows the use of C++ libraries which
raise exceptions.
(David Allsopp)
- MPR#7100, GPR#1476: trigger a minor GC when custom blocks accumulate
in minor heap.
(Alain Frisch, report by talex, review by Damien Doligez, Leo White,
Gabriel Scherer)
- GPR#1431: remove ocamlrun dependencies on curses/terminfo/termcap C library.
(Xavier Leroy, review by Daniel Bünzli)
- GPR#1478: The Spacetime profiler now works under Windows (but it is not yet
able to collect profiling information from C stubs).
(Nicolás Ojeda Bär, review by Xavier Leroy, Mark Shinwell)
- GPR#1483: fix GC freelist accounting for chunks larger than the maximum block
size.
(David Allsopp and Damien Doligez)
- GPR#1526: install the debug and instrumented runtimes
(lib{caml,asm}run{d,i}.a).
(Gabriel Scherer, reminded by Julia Lawall)
- GPR#1563: simplify implementation of LSRINT and ASRINT.
(Max Mouratov, review by Frédéric Bour)
- GPR#1644: remove caml_alloc_float_array from the bytecode primitives list
(it's a native code primitive).
(David Allsopp)
- GPR#1701: fix missing root bug in GPR#1476.
(Mark Shinwell)
- GPR#1752: do not alias function arguments to sigprocmask.
(Anil Madhavapeddy)
- GPR#1753: avoid potential off-by-one overflow in debugger socket path length.
(Anil Madhavapeddy)
### Tools:
- MPR#7643, GPR#1377: ocamldep, fix an exponential blowup in presence of nested
structures and signatures, e.g. "include struct … include(struct … end) … end"
(Florian Angeletti, review by Gabriel Scherer, report by Christophe Raffalli)
- MPR#7687, GPR#1653: deprecate -thread option,
which is equivalent to -I +threads.
(Nicolás Ojeda Bär, report by Daniel Bünzli)
- MPR#7710: `ocamldep -sort` should exit with nonzero code in case of
cyclic dependencies.
(Xavier Leroy, report by Mantis user baileyparker)
- GPR#1537: boot/ocamldep is no longer included in the source distribution;
boot/ocamlc -depend can be used in its place.
(Nicolás Ojeda Bär, review by Xavier Leroy and Damien Doligez)
- GPR#1585: optimize output of "ocamllex -ml".
(Alain Frisch, review by Frédéric Bour and Gabriel Scherer)
- GPR#1667: add command-line options -no-prompt, -no-version, -no-time,
-no-breakpoint-message and -topdirs-path to ocamldebug.
(Sébastien Hinderer, review by Damien Doligez)
- GPR#1695: add the -null-crc command-line option to ocamlobjinfo.
(Sébastien Hinderer, review by David Allsopp and Gabriel Scherer)
- GPR#1710: ocamldoc, improve the 'man' rendering of subscripts and
superscripts.
(Gabriel Scherer)
- GPR#1771: ocamldebug, avoid out of bound access.
(Thomas Refis)
### Manual and documentation:
- MPR#7613: minor rewording of the "refutation cases" paragraph.
(Florian Angeletti, review by Jacques Garrigue)
- MPR#7647, GPR#1384: emphasize ocaml.org website and forum in README.
(Yawar Amin, review by Gabriel Scherer)
- MPR#7698, GPR#1545: improve wording in OCaml manual in several places,
mostly in Chapter 1. This addresses the easier changes suggested in the PR.
(Jim Fehrle, review by Florian Angeletti and David Allsopp)
- GPR#1540: manual, decouple verbatim and toplevel style in code examples.
(Florian Angeletti, review by Gabriel Scherer)
- GPR#1556: manual, add a consistency test for manual references inside
the compiler source code.
(Florian Angeletti, review by Gabriel Scherer)
- GPR#1647: manual, subsection on record and variant disambiguation.
(Florian Angeletti, review by Alain Frisch and Gabriel Scherer)
- GPR#1702: manual, add a signature mode for code examples.
(Florian Angeletti, review by Gabriel Scherer)
- GPR#1741: manual, improve typesetting and legibility in HTML output.
(steinuil, review by Gabriel Scherer)
- GPR#1757: style the html manual, changing type and layout.
(Charles Chamberlain, review by Florian Angeletti, Xavier Leroy,
Gabriel Radanne, Perry E. Metzger, and Gabriel Scherer)
- GPR#1765: manual, ellipsis in code examples.
(Florian Angeletti, review and suggestion by Gabriel Scherer)
- GPR#1767: change html manual to use relative font sizes.
(Charles Chamberlain, review by Daniel Bünzli, Perry E. Metzger,
Josh Berdine, and Gabriel Scherer)
- GPR#1779: integrate the Bigarray documentation into the main manual.
(Perry E. Metzger, review by Florian Angeletti and Xavier Clerc)
### Type system:
- MPR#7611, GPR#1491: reject the use of generative functors as applicative.
(Valentin Gatien-Baron)
- MPR#7706, GPR#1565: in recursive value declarations, track
static size of locally-defined variables.
(Gabriel Scherer, review by Jeremy Yallop and Leo White, report by Leo White)
- MPR#7717, GPR#1593: in recursive value declarations, don't treat
unboxed constructor size as statically known.
(Jeremy Yallop, report by Pierre Chambart, review by Gabriel Scherer)
- MPR#7767, GPR#1712: restore legacy treatment of partially-applied
labeled functions in 'let rec' bindings.
(Jeremy Yallop, report by Ivan Gotovchits, review by Gabriel Scherer)
* MPR#7787, GPR#1652, GPR#1743: Don't remove module aliases in `module type of`
and `with module`.
The old behaviour can be obtained using the `[@remove_aliases]` attribute.
(Leo White and Thomas Refis, review by Jacques Garrigue)
- GPR#1468: Do not enrich type_decls with incoherent manifests.
(Thomas Refis and Leo White, review by Jacques Garrigue)
- GPR#1469: Use the information from [@@immediate] annotations when
computing whether a type can be [@@unboxed].
(Damien Doligez, report by Stephan Muenzel, review by Alain Frisch)
- GPR#1513: Allow compilation units to shadow sub-modules of Pervasives.
For instance users can now use a largeFile.ml file in their project.
(Jérémie Dimino, review by Nicolás Ojeda Bär, Alain Frisch and Gabriel
Radanne)
- GPR#1516: Allow float array construction in recursive bindings
when configured with -no-flat-float-array.
(Jeremy Yallop, report by Gabriel Scherer)
- GPR#1583: propagate refined ty_arg to Parmatch checks.
(Thomas Refis, review by Jacques Garrigue)
- GPR#1609: Changes to ambivalence scope tracking.
(Thomas Refis and Leo White, review by Jacques Garrigue)
- GPR#1628: Treat reraise and raise_notrace as nonexpansive.
(Leo White, review by Alain Frisch)
* GPR#1778: Fix Soundness bug with non-generalized type variable and
local modules. This is the same bug as MPR#7414, but using local
modules instead of non-local ones.
(Leo White, review by Jacques Garrigue)
### Compiler distribution build system:
- MPR#5219, GPR#1680, GPR#1877: use 'install' instead of 'cp'
in install scripts.
(Gabriel Scherer, review by Sébastien Hinderer and Valentin Gatien-Baron)
- MPR#7679: make sure .a files are erased before calling ar rc, otherwise
leftover .a files from an earlier compilation may contain unwanted modules.
(Xavier Leroy)
- GPR#1571: do not perform architecture tests on 32-bit platforms, allowing
64-bit back-ends to use 64-bit specific constructs.
(Xavier Clerc, review by Damien Doligez)
### Internal/compiler-libs changes:
- MPR#7738, GPR#1624: Asmlink.reset also resets lib_ccobjs/ccopts.
(Cedric Cellier, review by Gabriel Scherer)
- GPR#1488, GPR#1560: Refreshing parmatch.
(Gabriel Scherer and Thomas Refis, review by Luc Maranget)
- GPR#1502: more command line options for expect tests.
(Florian Angeletti, review by Gabriel Scherer)
- GPR#1511: show code at error location in expect-style tests,
using new Location.show_code_at_location function.
(Gabriel Scherer and Armaël Guéneau,
review by Valentin Gatien-Baron and Damien Doligez)
- GPR#1519, GPR#1532, GRP#1570: migrate tests to ocamltest.
(Sébastien Hinderer, review by Gabriel Scherer, Valentin Gatien-Baron
and Nicolás Ojeda Bär)
- GPR#1520: more robust implementation of Misc.no_overflow_mul.
(Max Mouratov, review by Xavier Leroy)
- GPR#1557: Organise and simplify translation of primitives.
(Leo White, review by François Bobot and Nicolás Ojeda Bär)
- GPR#1567: register all idents relevant for reraise.
(Thomas Refis, review by Alain Frisch and Frédéric Bour)
- GPR#1586: testsuite: 'make promote' for ocamltest tests.
(The new "-promote" option for ocamltest is experimental
and subject to change/removal).
(Gabriel Scherer)
- GPR#1619: expect_test: print all the exceptions, even the unexpected ones.
(Thomas Refis, review by Jérémie Dimino)
- GPR#1621: expect_test: make sure to not use the installed stdlib.
(Jérémie Dimino, review by Thomas Refis)
- GPR#1646: add ocamldoc test to ocamltest and
migrate ocamldoc tests to ocamltest.
(Florian Angeletti, review by Sébastien Hinderer)
- GPR#1663: refactor flambda specialise/inlining handling.
(Leo White and Xavier Clerc, review by Pierre Chambart)
- GPR#1679: remove Pbittest from primitives in lambda.
(Hugo Heuzard, review by Mark Shinwell)
* GPR#1704: Make Ident.t abstract and immutable.
(Gabriel Radanne, review by Mark Shinwell)
### Bug fixes:
- MPR#4499, GPR#1479: Use native Windows API to implement Sys.getenv,
Unix.getenv and Unix.environment under Windows.
(Nicolás Ojeda Bär, report by Alain Frisch, review by David Allsopp, Xavier
Leroy)
- MPR#5250, GPR#1435: on Cygwin, when ocamlrun searches the path
for a bytecode executable file, skip directories and other
non-regular files, like other Unix variants do.
(Xavier Leroy)
- MPR#6394, GPR#1425: fix fatal_error from Parmatch.get_type_path.
(Virgile Prevosto, review by David Allsopp, Thomas Refis and Jacques Garrigue)
* MPR#6604, GPR#931: Only allow directives with filename and at the beginning of
the line.
(Tadeu Zagallo, report by Roberto Di Cosmo,
review by Hongbo Zhang, David Allsopp, Gabriel Scherer, Xavier Leroy)
- MPR#7138, MPR#7701, GPR#1693: Keep documentation comments
even in empty structures and signatures.
(Leo White, Florian Angeletti, report by Anton Bachin)
- MPR#7178, MPR#7253, MPR#7796, GPR#1790: Make sure a function
registered with "at_exit" is executed only once when the program exits.
(Nicolás Ojeda Bär and Xavier Leroy, review by Max Mouratov)
- MPR#7391, GPR#1620: Do not put a dummy method in object types.
(Thomas Refis, review by Jacques Garrigue)
- PR#7660, GPR#1445: Use native Windows API to implement Unix.utimes in order to
avoid unintended shifts of the argument timestamp depending on DST setting.
(Nicolás Ojeda Bär, review by David Allsopp, Xavier Leroy)
- MPR#7668: -principal is broken with polymorphic variants.
(Jacques Garrigue, report by Jun Furuse)
- MPR#7680, GPR#1497: Incorrect interaction between Matching.for_let and
Simplif.simplify_exits.
(Alain Frisch, report and review by Vincent Laviron)
- MPR#7682, GPR#1495: fix [@@unboxed] for records with 1 polymorphic field.
(Alain Frisch, report by Stéphane Graham-Lengrand, review by Gabriel Scherer)
- MPR#7695, GPR#1541: Fatal error: exception Ctype.Unify(_) with field override
(Jacques Garrigue, report by Nicolás Ojeda Bär)
- MPR#7704, GPR#1564: use proper variant tag in non-exhaustiveness warning.
(Jacques Garrigue, report by Thomas Refis)
- MPR#7711, GPR#1581: Internal typechecker error triggered by a constraint on
self type in a class type.
(Jacques Garrigue, report and review by Florian Angeletti)
- MPR#7712, GPR#1576: assertion failure with type abbreviations.
(Thomas Refis, report by Michael O'Connor, review by Jacques Garrigue)
- MPR#7747: Type checker can loop infinitely and consume all computer memory.
(Jacques Garrigue, report by kantian)
- MPR#7751, GPR#1657: The toplevel prints some concrete types as abstract.
(Jacques Garrigue, report by Matej Kosik)
- MPR#7765, GPR#1718: When unmarshaling bigarrays, protect against integer
overflows in size computations.
(Xavier Leroy, report by Maximilian Tschirschnitz,
review by Gabriel Scherer)
- MPR#7760, GPR#1713: Exact selection of lexing engine, that is
correct "Segfault in ocamllex-generated code using 'shortest'".
(Luc Maranget, Frédéric Bour, report by Stephen Dolan,
review by Gabriel Scherer)
- MPR#7769, GPR#1714: calls to Stream.junk could, under some conditions, be
ignored when used on streams based on input channels.
(Nicolás Ojeda Bär, report by Michael Perin, review by Gabriel Scherer)
- MPR#7793, GPR#1766: the toplevel #use directive now accepts sequences of ';;'
tokens. This fixes a bug in which certain files accepted by the compiler were
rejected by ocamldep.
(Nicolás Ojeda Bär, report by Hugo Heuzard, review by Hugo Heuzard)
- GPR#1517: More robust handling of type variables in mcomp.
(Leo White and Thomas Refis, review by Jacques Garrigue)
- GPR#1530, GPR#1574: testsuite, fix 'make parallel' and 'make one DIR=...'
to work on ocamltest-based tests.
(Runhang Li and Sébastien Hinderer, review by Gabriel Scherer)
- GPR#1550, GPR#1555: Make pattern matching warnings more robust
to ill-typed columns.
(Thomas Refis, with help from Gabriel Scherer and Luc Maranget)
- GPR#1614: consider all bound variables when inlining, fixing a compiler
fatal error.
(Xavier Clerc, review by Pierre Chambart, Leo White)
- GPR#1622: fix bug in the expansion of command-line arguments under Windows
which could result in some elements of Sys.argv being truncated in some cases.
(Nicolás Ojeda Bär, review by Sébastien Hinderer)
- GPR#1623: Segfault on Windows 64 bits when expanding wildcards in arguments.
(Marc Lasson, review by David Allsopp, Alain Frisch, Sébastien Hinderer,
Xavier Leroy, Nicolas Ojeda Bar)
- GPR#1661: more precise principality warning regarding record fields
disambiguation.
(Thomas Refis, review by Leo White)
- GPR#1687: fix bug in the printing of short functor types "(S1 -> S2) -> S3".
(Pieter Goetschalckx, review by Gabriel Scherer)
- GPR#1722: Scrape types in Typeopt.maybe_pointer.
(Leo White, review by Thomas Refis)
- GPR#1755: ensure that a bigarray is never collected while reading complex
values.
(Xavier Clerc, Mark Shinwell and Leo White, report by Chris Hardin,
reviews by Stephen Dolan and Xavier Leroy)
- GPR#1764: in byterun/memory.c, struct pool_block, use C99 flexible arrays
if available.
(Xavier Leroy, review by Max Mouratov)
- GPR#1774: ocamlopt for ARM could generate VFP loads and stores with bad
offsets, rejected by the assembler.
(Xavier Leroy, review by Mark Shinwell)
- GPR#1808: handle `[@inlined]` attributes under a module constraint.
(Xavier Clerc, review by Leo White)
- GPR#1810: use bit-pattern comparison when meeting float approximations.
(Xavier Clerc, report by Christophe Troestler, review by Nicolás Ojeda Bär
and Gabriel Scherer)
- GPR#1835: Fix off-by-one errors in Weak.get_copy and Weak.blit.
(KC Sivaramakrishnan)
- GPR#1849: bug in runtime function generic_final_minor_update()
that could lead to crashes when Gc.finalise_last is used.
(report and fix by Yuriy Vostrikov, review by François Bobot)
OCaml 4.06.1 (16 Feb 2018):
---------------------------
### Bug fixes:
- MPR#7661, GPR#1459: fix faulty compilation of patterns
using extensible variants constructors
(Luc Maranget, review by Thomas Refis and Gabriel Scherer, report
by Abdelraouf Ouadjaout and Thibault Suzanne)
- MPR#7702, GPR#1553: refresh raise counts when inlining a function
(Vincent Laviron, Xavier Clerc, report by Cheng Sun)
- MPR#7704, GPR#1559: Soundness issue with private rows and pattern-matching
(Jacques Garrigue, report by Jeremy Yallop, review by Thomas Refis)
- MPR#7705, GPR#1558: add missing bounds check in Bigarray.Genarray.nth_dim.
(Nicolás Ojeda Bär, report by Jeremy Yallop, review by Gabriel Scherer)
- MPR#7713, GPR#1587: Make pattern matching warnings more robust
to ill-typed columns; this is a backport of GPR#1550 from 4.07+dev
(Thomas Refis, review by Gabriel Scherer, report by Andreas Hauptmann)
- GPR#1470: Don't commute negation with float comparison
(Leo White, review by Xavier Leroy)
- GPR#1538: Make pattern matching compilation more robust to ill-typed columns
(Gabriel Scherer and Thomas Refis, review by Luc Maranget)
OCaml 4.06.0 (3 Nov 2017):
--------------------------
(Changes that can break existing programs are marked with a "*")
### Language features:
- MPR#6271, MPR#7529, GPR#1249: Support "let open M in ..."
in class expressions and class type expressions.
(Alain Frisch, reviews by Thomas Refis and Jacques Garrigue)
- GPR#792: fix limitations of destructive substitutions, by
allowing "S with type t := type-expr",
"S with type M.t := type-expr", "S with module M.N := path"
(Valentin Gatien-Baron, review by Jacques Garrigue and Leo White)
* GPR#1064, GPR#1392: extended indexing operators, add a new class of
user-defined indexing operators, obtained by adding at least
one operator character after the dot symbol to the standard indexing
operators: e,g ".%()", ".?[]", ".@{}<-":
let ( .%() ) = List.nth in [0; 1; 2].%(1)
After this change, functions or methods with an explicit polymorphic type
annotation and of which the first argument is optional now requires a space
between the dot and the question mark,
e.g. "<f:'a.?opt:int->unit>" must now be written "<f:'a. ?opt:int->unit>".
(Florian Angeletti, review by Damien Doligez and Gabriel Radanne)
- GPR#1118: Support inherited field in object type expression
type t = < m : int >
type u = < n : int; t; k : int >
(Runhang Li, review by Jeremy Yallop, Leo White, Jacques Garrigue,
and Florian Angeletti)
* GPR#1232: Support Unicode character escape sequences in string
literals via the \u{X+} syntax. These escapes are substituted by the
UTF-8 encoding of the Unicode character.
(Daniel Bünzli, review by Damien Doligez, Alain Frisch, Xavier
Leroy and Leo White)
- GPR#1247: M.(::) construction for expressions
and patterns (plus fix printing of (::) in the toplevel)
(Florian Angeletti, review by Alain Frisch, Gabriel Scherer)
* GPR#1252: The default mode is now safe-string, can be overridden
at configure time or at compile time.
(See GPR#1386 below for the configure-time options)
This breaks the code that uses the 'string' type as mutable
strings (instead of Bytes.t, introduced by 4.02 in 2014).
(Damien Doligez)
* GPR#1253: Private extensible variants
This change breaks code relying on the undocumented ability to export
extension constructors for abstract type in signature. Briefly,
module type S = sig
type t
type t += A
end
must now be written
module type S = sig
type t = private ..
type t += A
end
(Leo White, review by Alain Frisch)
- GPR#1333: turn off warning 40 by default
(Constructor or label name used out of scope)
(Leo White)
- GPR#1348: accept anonymous type parameters in `with` constraints:
S with type _ t = int
(Valentin Gatien-Baron, report by Jeremy Yallop)
### Type system
- MPR#248, GPR#1225: unique names for weak type variables
# ref [];;
- : '_weak1 list ref = {contents = []}
(Florian Angeletti, review by Frédéric Bour, Jacques Garrigue,
Gabriel Radanne and Gabriel Scherer)
* MPR#6738, MPR#7215, MPR#7231, GPR#556: Add a new check that 'let rec'
bindings are well formed.
(Jeremy Yallop, reviews by Stephen Dolan, Gabriel Scherer, Leo
White, and Damien Doligez)
- GPR#1142: Mark assertions nonexpansive, so that 'assert false'
can be used as a placeholder for a polymorphic function.
(Stephen Dolan)
### Standard library:
- MPR#1771, MPR#7309, GPR#1026: Add update to maps. Allows to update a
binding in a map or create a new binding if the key had no binding
val update: key -> ('a option -> 'a option) -> 'a t -> 'a t
(Sébastien Briais, review by Daniel Bünzli, Alain Frisch and
Gabriel Scherer)
- MPR#7515, GPR#1147: Arg.align now optionally uses the tab character '\t' to
separate the "unaligned" and "aligned" parts of the documentation string. If
tab is not present, then space is used as a fallback. Allows to have spaces in
the unaligned part, which is useful for Tuple options.
(Nicolás Ojeda Bär, review by Alain Frisch and Gabriel Scherer)
* GPR#615: Format, add symbolic formatters that output symbolic
pretty-printing items. New fields have been added to the
formatter_out_functions record, thus this change will break any code building
such record from scratch.
When building Format.formatter_out_functions values redefining the out_spaces
field, "{ fmt_out_funs with out_spaces = f; }" should be replaced by
"{ fmt_out_funs with out_spaces = f; out_indent = f; }" to maintain the old
behavior.
(Richard Bonichon and Pierre Weis, review by Alain Frisch, original request by
Spiros Eliopoulos in GPR#506)
* GPR#943: Fixed the divergence of the Pervasives module between the stdlib
and threads implementations. In rare circumstances this can change the
behavior of existing applications: the implementation of Pervasives.close_out
used when compiling with thread support was inconsistent with the manual.
It will now not suppress exceptions escaping Pervasives.flush anymore.
Developers who want the old behavior should use Pervasives.close_out_noerr
instead. The stdlib implementation, used by applications not compiled
with thread support, will now only suppress Sys_error exceptions in
Pervasives.flush_all. This should allow exceedingly unlikely assertion
exceptions to escape, which could help reveal bugs in the standard library.
(Markus Mottl, review by Hezekiah M. Carty, Jeremie Dimino, Damien Doligez,
Alain Frisch, Xavier Leroy, Gabriel Scherer and Mark Shinwell)
- GPR#1034: List.init : int -> (int -> 'a) -> 'a list
(Richard Degenne, review by David Allsopp, Thomas Braibant, Florian
Angeletti, Gabriel Scherer, Nathan Moreau, Alain Frisch)
- GRP#1091 Add the Uchar.{bom,rep} constants.
(Daniel Bünzli, Alain Frisch)