forked from ocaml/ocaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Changes
8727 lines (7021 loc) · 358 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 "*")
### Code generation and optimizations:
- GPR#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)
### Compiler user-interface and warnings:
* GPR#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)
- GPR#2314: Remove support for gprof profiling.
(Mark Shinwell, review by Xavier Clerc and Stephen Dolan)
### Internal/compiler-libs changes:
- GPR#1579: Add a separate types for clambda primitives
(Pierre Chambart, review by Vincent Laviron and Mark Shinwell)
- GPR#1965: remove loop constructors in Cmm and Mach
(Vincent Laviron)
- GPR#1973: fix compilation of catches with multiple handlers
(Vincent Laviron)
- GPR#2228: refactoring the handling of .cmi files by moving it from
Env to a new module Persistent_env
(Gabriel Scherer, review by Jérémie Dimino and Thomas Refis)
- GPR#2229: Env: remove prefix_idents cache
(Thomas Refis, review by Frédéric Bour and Gabriel Scherer)
- GPR#2237: Reorder linearisation of Trywith to avoid a call instruction
(Vincent Laviron and Greta Yorsh, additional review by Mark Shinwell)
- GPR#2265: Add bytecomp/opcodes.mli
(Mark Shinwell, review by Nicolas Ojeda Bar)
- GPR#2280: Don't make more Clambda constants after starting Cmmgen
(Mark Shinwell, review by Vincent Laviron)
- GPR#2283: Add [is_prefix] and [find_and_chop_longest_common_prefix] to
[Misc.Stdlib.List]
(Mark Shinwell, review by Alain Frisch and Stephen Dolan)
- GPR#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)
- GPR#2286: Functorise [Consistbl]
(Mark Shinwell, review by Gabriel Radanne)
- GPR#2308: More debugging information on [Cmm] terms
(Mark Shinwell, review by Stephen Dolan)
### Runtime system:
- GPR#1725: Deprecate Obj.set_tag
(Stephen Dolan, review by Gabriel Scherer and Damien Doligez)
* GPR#2240: Constify "identifier" in struct custom_operations
(Cedric Cellier, review by Xavier Leroy)
### Standard library:
- GPR#2262: take precision (.<n>) and flags ('+' and ' ') into account
in printf %F
(Pierre Roux, review by Gabriel Scherer)
### Other libraries:
- MPR#7903, GPR#2306: Make Thread.delay interruptible by signals again
(Xavier Leroy, review by Jacques-Henri Jourdan and Edwin Török)
- GPR#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)
- GPR#2289: Delete the vmthreads library. This library was deprecated in 4.08.0.
(Jérémie Dimino)
### Compiler user-interface and warnings:
- GPR#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)
- GPR#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)
### Bug fixes:
- MPR#7937, GPR#2287: fix uncaught Unify exception when looking for type
declaration
(Florian Angeletti, review by Jacques Garrigue)
OCaml 4.08.0
------------
### 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#1506, GPR#2147, GPR#2166, GPR#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)
- GPR#1705: Allow @@attributes on exceptions.
(Hugo Heuzard, review by Gabriel Radanne and Thomas Refis)
- GPR#1804: New notion of "alerts" that generalizes the deprecated warning
(Alain Frisch, review by Leo White and Damien Doligez)
- GPR#1892: Allow shadowing of items coming from an include
(Thomas Refis, review by Gabriel Radanne)
- GPR#1947: Add "monadic" let operators
(Leo White, review by Thomas Refis)
* GPR#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)
- GPR#2110: Allow GADT constructors to introduce equations and existential types
under or-patterns.
(Thomas Refis and Leo White, review by Jacques Garrigue)
- GPR#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)
### 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)
- GPR#1909: unsharing pattern types
(Thomas Refis, with help from Leo White, review by Jacques Garrigue)
- GPR#1942, GPR#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)
* MPR#7814, GPR#2041, GPR#2235: allow modules from include directories
to shadow other ones, even in the toplevel
(Jérémie Dimino, review by Alain Frisch and David Allsopp)
### Standard library:
- GPR#2128: Add Fun module.
(Many fine eyes)
- GPR#2010: Add Bool module.
(Many fine eyes)
- GPR#2011: Add Int module.
(Many fine eyes)
- GPR#1940: Add Option module and Format.pp_print_option
(Many fine eyes)
- GPR#1956: Add Result module and Format.pp_print_result
(Many fine eyes)
- MPR#2533, GPR#1839, GPR#1949: added Unix.fsync
(Francois Berenger, Nicolás Ojeda Bär, review by Daniel Bünzli, David Allsopp
and ygrek)
- MPR#5072, MPR#6655, GPR#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)
- 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#1999: Add Unix.process{,_in,_out,_full}_pid to retrieve opened process's
pid.
(Romain Beauxis, review by Nicolás Ojeda Bär)
- GPR#2220: Remove duplicate process management code in
otherlibs/threads/unix.ml
(Romain Beauxis, review by Gabriel Scherer and Alain Frisch)
- 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)
- GPR#1923: Arg module sometimes misbehaved instead of rejecting invalid
-keyword=arg inputs
(Valentin Gatien-Baron, review by Gabriel Scherer)
- GPR#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)
- GPR#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)
- GPR#1959: Small simplification and optimization to Format.ifprintf
(Gabriel Radanne, review by Gabriel Scherer)
- GPR#1855, GPR#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)
- GPR#1986, MPR#6450: Add Set.disjoint
(Nicolás Ojeda Bär, review by Gabriel Scherer)
* GPR#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)
- GPR#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)
- GPR#1966: Add Format semantic tags using extensible sum types.
(Gabriel Radanne, review by Nicolás Ojeda Bär)
- GPR#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)
- GPR#1354, GPR#2177: Add fma support to Float module.
(Laurent Thévenoux, review by Alain Frisch, Jacques-Henri Jourdan,
Xavier Leroy)
- GPR#2119: clarify the documentation of Set.diff
(Gabriel Scherer, suggestion by John Skaller)
- MPR#7812, GPR#2125: Add Filename.chop_suffix_opt
(Alain Frisch, review by Nicolás Ojeda Bär, suggestion by whitequark)
- GPR#1864: Extend Bytes and Buffer with functions to read/write
binary representations of numbers
(Alain Frisch and Daniel Bünzli)
- GPR#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)
- GPR#2145: Deprecate the mutability of Gc.control record fields
(Damien Doligez, review by Alain Frisch)
- GPR#2159, MPR#7874: annotate {String,Bytes}.equal as being [@@noalloc].
(Pierre-Marie Pédrot, review by Nicolás Ojeda Bär)
- GPR#1936: Add module Float.Array
(Damien Doligez, review by Xavier Clerc and Alain Frisch)
- GPR#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)
- GPR#2183: Fix segfault in Array.create_float with -no-flat-float-array
(Damien Doligez, review by Gabriel Scherer and Jeremy Yallop)
- GPR#2185: Add `List.filter_map`
(Thomas Refis, review by Alain Frisch and Gabriel Scherer)
- GPR#1525: Make function set_max_indent respect documentation
(Pierre Weis, Richard Bonichon, review by Florian Angeletti)
### Other libraries:
- GPR#2222: Set default status in waitpid when pid is zero. Otherwise,
status value is undefined.
(Romain Beauxis and Xavier Leroy, review by Stephen Dolan)
* GPR#2104, GPR#2211, PR#4127, PR#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)
- GPR#1061: Add ?follow parameter to Unix.link. This allows hardlinking
symlinks.
(Christopher Zimmermann, review by Xavier Leroy, Damien Doligez, David
Allsopp, David Sheets)
- GPR#2038: Deprecate vm threads
(Jérémie Dimino)
* PR#4208, PR#4229, PR#4839, PR#6462, PR#6957, PR#6950, GPR#1063, GPR#2176,
GPR#2297: Make (nat)dynlink sound.
(Mark Shinwell, Leo White, Nicolás Ojeda Bär, Pierre Chambart)
- GPR#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:
- GPR#2133: Warn on literal patterns found anywhere in a constructor's
arguments.
(Jeremy Yallop, review by Gabriel Scherer)
- PR#2096: Add source highlighting for errors & warnings in batch mode
(Armaël Guéneau, review by Gabriel Scherer and Jérémie Dimino)
- PR#2091: Add a warning triggered by type declarations "type t = ()"
(Armaël Guéneau, report by linse, review by Florian Angeletti and Gabriel
Scherer)
- 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#1691: add shared_libraries to ocamlc -config exporting
SUPPORTS_SHARED_LIBRARIES from Makefile.config.
(David Allsopp, review by Gabriel Scherer and Mark Shinwell)
- 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#1733,1993,1998,2058,2094,2140: Typing error message improvements
- GPR#1733, change the perspective of the unexpected existential error
message.
- GPR#1993, expanded error messages for universal quantification failure
- GPR#1998, more context for unbound type parameter error
- GPR#2058, full explanation for unsafe cycles in recursive module
definitions (suggestion by Ivan Gotovchits)
- GPR#2094, rewording for "constructor has no type" error
- MPR#7565, GPR#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)
- GPR#1748: do not error when instantiating polymorphic fields in patterns.
(Thomas Refis, review by Gabriel Scherer)
- MPR#6913, GPR#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)
- 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#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)
- 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)
- GPR#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)
- GPR#1930: pass the elements from `BUILD_PATH_PREFIX_MAP` to the assembler
(Xavier Clerc, review by Gabriel Scherer, Sébastien Hinderer, and
Xavier Leroy)
- GPR#1945, GPR#2032: new "-stop-after [parsing|typing]" option
to stop compilation after the parsing or typing pass
(Gabriel Scherer, review by Jérémie Dimino)
- GRP#1953: Add locations to attributes in the parsetree.
(Hugo Heuzard, review by Gabriel Radanne)
- GPR#1954: Add locations to toplevel directives.
(Hugo Heuzard, review by Gabriel Radanne)
- GPR#1976: Better error messages for extension constructor type mismatches
(Thomas Refis, review by Gabriel Scherer)
* GPR#1979: Remove support for TERM=norepeat when displaying errors
(Armaël Guéneau, review by Gabriel Scherer and Florian Angeletti)
- GPR#1960: The parser keeps previous location when relocating ast node.
(Hugo Heuzard, review by Jérémie Dimino)
- GPR#1841, MPR#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)
- MPR#7864, GPR#2109: remove duplicates from spelling suggestions.
(Nicolás Ojeda Bär, review by Armaël Guéneau)
- MPR#6638, GPR#1110: introduced a dedicated warning to report
unused "open!" statements
(Alain Frisch, report by dwang, review by and design from Leo White)
- GPR#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)
### 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)
- MPR#7246, GPR#2146: make a few int64 primitives use [@@unboxed]
stubs on 32bits
(Jérémie Dimino)
- GPR#1917: comballoc: ensure object allocation order is preserved
(Stephen Dolan)
- MPR#6242, GPR#2143: optimize some local functions
(Alain Frisch, review by Gabriel Scherer)
- GPR#2082: New options [-insn-sched] and [-no-insn-sched] to control
instruction scheduling.
(Mark Shinwell, review by Damien Doligez)
- GPR#2239: Fix match miscompilation with flambda
(Leo White, review by Alain Frisch)
### Runtime system:
- MPR#7198, MPR#7750, GPR#1738: add a function (caml_custom_alloc_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)
- MPR#7676, GPR#2144: Remove old GC heuristic
(Damien Doligez, report and review by Alain Frisch)
- 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)
- GPR#2079: Avoid page table lookup in Pervasives.compare with
no-naked-pointers
(Sam Goldman, review by Gabriel Scherer, David Allsopp, Stephen Dolan)
### Tools
- GPR#2182: Split Emacs caml-mode as an independent project.
(Christophe Troestler, review by Gabriel Scherer)
- MPR#7843, GPR#2013: ocamldoc, better handling of {{!label}text} in the latex
backend.
(Florian Angeletti, review by Nicolás Ojeda Bär and Gabriel Scherer)
- MPR#7844, GPR#2040: Emacs, use built-in detection of comments,
fixes an imenu crash.
(Wilfred Hughes, review by Christophe Troestler)
- MPR#7850: Emacs, use symbol boundaries in regular expressions,
fixes an imenu crash.
(Wilfred Hughes, review by Christophe Troestler)
- 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)
- GPR#1865: support dark themes in Emacs, and clean up usage of
deprecated Emacs APIs
(Wilfred Hughes, review by Clément Pit-Claudel)
- GPR#2000: ocamdoc, extended support for "include module type of ..."
(Florian Angeletti, review by Jérémie Dimino)
- GPR#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)
- GPR#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)
- GPR#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)
### Manual and documentation:
- MPR#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)
- MPR#7546, GPR#2020: preambles and introduction for compiler-libs.
(Florian Angeletti, review by Daniel Bünzli, Perry E. Metzger
and Gabriel Scherer)
- MPR#7547, GPR#2273: Tutorial on Lazy expressions and patterns in OCaml Manual
(Ulugbek Abdullaev, review by Florian Angeletti and Gabriel Scherer)
- MPR#7720, GPR#1596, precise the documentation
of the maximum indentation limit in Format.
(Florian Angeletti, review by Richard Bonichon and Pierre Weis)
- MPR#7825: html manual split compilerlibs from stdlib in the html
index of modules
(Florian Angeletti, review by Perry E. Metzger and Gabriel Scherer)
- GPR#1209, GPR#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:
GPR#1702, GPR#1765, GPR#1863, and Gabriel Scherer's GPR#1903.
(Gabriel Scherer, review by Florian Angeletti)
- GPR#1788, 1831, 2007, 2198, 2232, move language extensions to the core
chapters:
- GPR#1788: quoted string description
- GPR#1831: local exceptions and exception cases
- GPR#2007: 32-bit, 64-bit and native integer literals
- GPR#2198: lazy patterns
- GPR#2232: short object copy notation
(Florian Angeletti, review by Xavier Clerc, Perry E. Metzger, Gabriel Scherer
and Jeremy Yallop)
- GPR#1863: caml-tex2, move to compiler-libs
(Florian Angeletti, review by Sébastien Hinderer and Gabriel Scherer)
- GPR#2105: Change verbatim to caml_example in documentation
(Maxime Flin, review by Florian Angeletti)
- GPR#2114: ocamldoc, improved manpages for documentation inside modules
(Florian Angeletti, review by Gabriel Scherer)
- GPR#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)
- GPR#2187: document "exception A | pat" patterns
(Florian Angeletti, review by Perry E. Metzger and Jeremy Yallop)
- GPR#8508: refresh \moduleref macro
(Florian Angeletti, review by Gabriel Scherer)
### 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)
- GPR#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)
- GPR#2053: allow unix, vmthreads and str not to be built.
(David Allsopp, review by Sébastien Hinderer)
* GPR#2059: stop defining OCAML_STDLIB_DIR in s.h.
(Sébastien Hinderer, review by David Allsopp and Damien Doligez)
* GPR#2066: remove the standard_runtime configuration variable.
(Sébastien Hinderer, review by Xavier Leroy, Stephen Dolan and
Damien Doligez)
* GPR#2139: use autoconf to generate the compiler's configuration script
(Sébastien Hinderer, review by Damien Doligez and David Allsopp)
- GPR#2148: fix a parallel build bug involving CamlinternalLazy.
(Stephen Dolan, review by Gabriel Scherer and Nicolas Ojeda Bar)
- GPR#2264, MPR#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)
- GPR#2266: ensure Cygwin ports configure with `EXE=.exe`, or the compiler is
unable to find the camlheader files (subtle regression of GPR#2139/2041)
(David Allsopp, report and review by Sébastien Hinderer)
- MPR#7919, GPR#2311: Fix assembler detection in configure
(Sébastien Hinderer, review by David Allsopp)
### Internal/compiler-libs changes:
- MPR#7918, GPR#1703, GPR#1944, GPR#2213, GPR#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)
- GPR#292: use Menhir as the parser generator for the OCaml parser.
Satellite GPRs: GPR#1844, GPR#1846, GPR#1853, GPR#1850, GPR#1934, GPR#2151,
GPR#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)
- GPR#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.
(François Bobot, help from Gabriel Scherer and Nicolás Ojeda Bär,
review by Gabriel Scherer)
- GPR#1148, GPR#1287, GPR#1288, GPR#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)
- GPR#1610, GPR#2252: Remove positions from paths
(Leo White, review by Frédéric Bour and Thomas Refis)
- 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#1866: document the release process
(Damien Doligez and Gabriel Scherer, review by Sébastien Hinderer,
Perry E. Metzger, Xavier Leroy and David Allsopp)
- GPR#1886: move the Location.absname reference to Clflags.absname
(Armaël Guéneau, review by Jérémie Dimino)
- GPR#1894: generalize highlight_dumb in location.ml to handle highlighting
several locations
(Armaël Guéneau, review by Gabriel Scherer)
- GPR#1903: parsetree, add locations to all nodes with attributes
(Gabriel Scherer, review by Thomas Refis)
- GPR#1905: add check-typo-since to check the files changed
since a given git reference
(Gabriel Scherer, review by David Allsopp)
- GPR#1910: improve the check-typo use of .gitattributes
(Gabriel Scherer, review by David Allsopp and Damien Doligez)
- GPR#1938: always check ast invariants after preprocessing
(Florian Angeletti, review by Alain Frisch and Gabriel Scherer)
- GPR#1941: refactor the command line parsing of ocamlcp and ocamloptp
(Valentin Gatien-Baron, review by Florian Angeletti)
- GPR#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)
* GPR#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)
- MPR#7835, GPR#1980: separate scope from stamp in idents
(Thomas Refis, review by Leo White)
- GPR#1996: expose Pprintast.longident to help compiler-libs users print
Longident.t values.
(Gabriel Scherer, review by Florian Angeletti and Thomas Refis)
- GPR#2030: makefile targets to build AST files of sources
for parser testing. See parsing/HACKING.adoc.
(Gabriel Scherer, review by Nicolás Ojeda Bär)
* GPR#2041: add a cache for looking up files in the load path
(Jérémie Dimino, review by Alain Frisch and David Allsopp)
- GPR#2047, GPR#2269: a new type for unification traces
(Florian Angeletti, report by Leo White (GPR#2269),
review by Thomas Refis and Gabriel Scherer)
- GPR#2055: Add [Linearize.Lprologue].
(Mark Shinwell, review by Pierre Chambart)
- GPR#2056: Use [Backend_var] rather than [Ident] from [Clambda] onwards;
use [Backend_var.With_provenance] for variables in binding position.
(Mark Shinwell, review by Pierre Chambart)
- GPR#2060: "Phantom let" support for the Clambda language.
(Mark Shinwell, review by Vincent Laviron)
- GPR#2065: Add [Proc.destroyed_at_reloadretaddr].
(Mark Shinwell, review by Damien Doligez)
- GPR#2060: "Phantom let" support for the Clambda language.
(Mark Shinwell, review by Vincent Laviron)
- GPR#2070: "Phantom let" support for the Cmm language.
(Mark Shinwell, review by Vincent Laviron)
- GPR#2072: Always associate a scope to a type
(Thomas Refis, review by Jacques Garrigue and Leo White)
- GPR#2074: Correct naming of record field inside [Ialloc] terms.
(Mark Shinwell, review by Jérémie Dimino)
- GPR#2076: Add [Targetint.print].
(Mark Shinwell)
- GPR#2080: Add [Proc.dwarf_register_numbers] and
[Proc.stack_ptr_dwarf_register_number].
(Mark Shinwell, review by Bernhard Schommer)
- GPR#2088: Add [Clambda.usymbol_provenance].
(Mark Shinwell, review by Damien Doligez)
- GPR#2152, GPR#2517: refactorize the fixpoint to compute type-system
properties of mutually-recursive type declarations.
(Gabriel Scherer and Rodolphe Lepigre, review by Armaël Guéneau)
- GPR#2156: propagate more type information through Lambda and Clambda
intermediate language, as a preparation step for more future optimizations
(Pierre Chambart and Alain Frisch, cross-reviewed by themselves)
- GPR#2160: restore --disable-shared support and ensure testsuite runs correctly
when compiled without shared library support.
(David Allsopp, review by Damien Doligez and Sébastien Hinderer)
* GPR#2173: removed TypedtreeMap
(Thomas Refis, review by Gabriel Scherer)
- GPR#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)
- MPR#7867: Fix #mod_use raising an exception for filenames with no
extension.
(Geoff Gole)
- GPR#2100: Fix Unix.getaddrinfo when called on strings containing
null bytes; it would crash the GC later on.
(Armaël Guéneau, report and fix by Joe, review by Sébastien Hinderer)
- MPR#7847, GPR#2019: Fix an infinite loop that could occur when the
(Menhir-generated) parser encountered a syntax error in a certain
specific state.
(François Pottier, report by Stefan Muenzel,
review by Frédéric Bour, Thomas Refis, Gabriel Scherer)
- GPR#1626: Do not allow recursive modules in `with module`
(Leo White, review by Gabriel Radanne)
- MPR#7726, GPR#1676: Recursive modules, equi-recursive types and stack overflow
(Jacques Garrigue, report by Jeremy Yallop, review by Leo White)
- MPR#7723, GPR#1698: Ensure `with module` and `with type` do not weaken
module aliases.
(Leo White, review by Gabriel Radanne and Jacques Garrigue)
- 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)
- GPR#1912: Allow quoted strings, octal/unicode escape sequences and identifiers
containing apostrophes in ocamllex actions and comments.
(Pieter Goetschalckx, review by Damien Doligez)
- MPR#7828, GPR#1935: correct the conditions that generate warning 61,
Unboxable_type_in_prim_decl
(Stefan Muenzel)
- GPR#1958: allow [module M(_:S) = struct end] syntax
(Hugo Heuzard, review by Gabriel Scherer)
- GPR#1970: fix order of floatting documentation comments in classes
(Hugo Heuzard, review by Nicolás Ojeda Bär)
- GPR#1977: [@@ocaml.warning "..."] attributes attached to type declarations are
no longer ignored.
(Nicolás Ojeda Bär, review by Gabriel Scherer)
- MPR#7830, GPR#1987: fix ocamldebug crash when printing a value in the scope of
an `open` statement for which the `.cmi` is not available.
(Nicolás Ojeda Bär, report by Jocelyn Sérot, review by Gabriel Scherer)
- MPR#7408, MPR#7846, GPR#2015: Check arity of primitives.
(Hugo Heuzard, review by Nicolás Ojeda Bär)
- MPR#7854, GPR#2062: fix an issue where the wrong locale may be used when using
the legacy ANSI encoding under Windows.
(Nicolás Ojeda Bär, report by Tiphaine Turpin)
- GPR#2083: Fix excessively aggressive float unboxing and introduce similar fix
as a preventative measure for boxed int unboxing.
(Thomas Refis, Mark Shinwell, Leo White)
- GPR#2130: fix printing of type variables with a quote in their name
(Alain Frisch, review by Armaël Guéneau and Gabriel Scherer,
report by Hugo Heuzard)
- GPR#2131: fix wrong calls to Env.normalize_path on non-module paths
(Alain Frisch, review by Jacques Garrigue)
- GPR#2175: Apply substitution to all modules when packing
(Leo White, review by Gabriel Scherer)
- GPR#2231: Env: always freshen persistent signatures before using them
(Thomas Refis and Leo White, review by Gabriel Radanne)
- MPR#7923, GPR#2259: fix regression in FlexDLL bootstrapped build caused by
refactoring the root Makefile for Dune in GPR#2093)
(David Allsopp, report by Marc Lasson)
- MPR#7929, GPR#2261: Subst.signature: call cleanup_types exactly once
(Thomas Refis, review by Gabriel Scherer and Jacques Garrigue,
report by Daniel Bünzli and Jon Ludlam)
OCaml 4.07.1 (4 October 2018)
-----------------------------
### Bug fixes:
- MPR#7815, GPR#1896: major GC crash with first-fit policy
(Stephen Dolan and Damien Doligez, report by Joris Giovannangeli)
* MPR#7818, GPR#2051: Remove local aliases in functor argument types,
to prevent the aliasing of their target.
(Jacques Garrigue, report by mandrykin, review by Leo White)
- 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)
- GPR#1915: rec_check.ml is too permissive for certain class declarations.
(Alban Reynaud with Gabriel Scherer, review by Jeremy Yallop)
- MPR#7833, GPR#1946: typecore: only 1k existential per match, not 100k
(Thomas Refis, report by Jerome Simeon, review by Jacques Garrigue)
- MPR#7838: -principal causes assertion failure in type checker
(Jacques Garrigue, report by Markus Mottl, review by Thomas Refis)
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#7528, GPR#1500: add a Format.pp_set_geometry function to avoid memory
effects in set_margin and set_max_indent.
(Florian Angeletti, review by Richard Bonichon, Gabriel Radanne,
Gabiel Scherer and Pierre Weis)