forked from colinbenner/ocaml-llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Changes
3531 lines (3081 loc) · 156 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
Bug fixes:
- PR#4855: 'camlp4 -I +dir' accepted, dir is related to 'camlp4 -where'
- PR#5820: Fix camlp4 lexer roll back problem
- PR#6062: Fix a regression bug caused by commit 13047
- PR#6165: Alterations to handling of \013 in source files breaking other tools
- PR#6173: Typing error message is worse that before
- PR#6174: OCaml compiler loops on an example using GADTs (non -rectypes)
- PR#6175: Fix open!
- PR#6183: enhanced documentation for 'Unix.shutdown_connection'
- PR#6194: Incorrect unused warning with first-class modules in patterns
- PR#6216: inlining of GADT matches generates invalid assembly
- PR#6233: out-of-bounds exceptions lose their locations on ARM, PowerPC
- PR#6235: Issue with type information flowing through a variant pattern
- PR#6239: sometimes wrong stack alignment when raising exceptions
in -g mode with backtraces active
- PR#6240: Fail to expand module type abbreviation during substyping
- PR#6241: Assumed inequality between paths involving functor arguments
- PR#6243: Make "ocamlopt -g" more resistant to ill-formed locations
- PR#6267: more information printed by "bt" command of ocamldebug
- PR#6275: Soundness bug related to type constraints
OCaml 4.01.0:
-------------
(Changes that can break existing programs are marked with a "*")
Other libraries:
- Labltk: updated to Tcl/Tk 8.6.
Type system:
- PR#5759: use well-disciplined type information propagation to
disambiguate label and constructor names
(Jacques Garrigue, Alain Frisch and Leo P. White)
* Propagate type information towards pattern-matching, even in the presence of
polymorphic variants (discarding only information about possibly-present
constructors). As a result, matching against absent constructors is no longer
allowed for exact and fixed polymorphic variant types.
(Jacques Garrigue)
* PR#6035: Reject multiple declarations of the same method or instance variable
in an object
(Alain Frisch)
Compilers:
- PR#5861: raise an error when multiple private keywords are used in type
declarations
(Hongbo Zhang)
- PR#5634: parsetree rewriter (-ppx flag)
(Alain Frisch)
- ocamldep now supports -absname
(Alain Frisch)
- PR#5768: On "unbound identifier" errors, use spell-checking to suggest names
present in the environment
(Gabriel Scherer)
- ocamlc has a new option -dsource to visualize the parsetree
(Alain Frisch, Hongbo Zhang)
- tools/eqparsetree compares two parsetree ignoring location
(Hongbo Zhang)
- ocamlopt now uses clang as assembler on OS X if available, which enables
CFI support for OS X.
(Benedikt Meurer)
- Added a new -short-paths option, which attempts to use the shortest
representation for type constructors inside types, taking open modules
into account. This can make types much more readable if your code
uses lots of functors.
(Jacques Garrigue)
- PR#5986: added flag -compat-32 to ocamlc, ensuring that the generated
bytecode executable can be loaded on 32-bit hosts.
(Xavier Leroy)
- PR#5980: warning on open statements which shadow an existing
identifier (if it is actually used in the scope of the open); new
open! syntax to silence it locally
(Alain Frisch, thanks to a report of Daniel Bünzli)
* warning 3 is extended to warn about other deprecated features:
- ISO-latin1 characters in identifiers
- uses of the (&) and (or) operators instead of (&&) and (||)
(Damien Doligez)
- Experimental OCAMLPARAM for ocamlc and ocamlopt
(Fabrice Le Fessant)
- PR#5571: incorrect ordinal number in error message
(Alain Frisch, report by John Carr)
- PR#6073: add signature to Tstr_include
(patch by Leo P. White)
Standard library:
- PR#5899: expose a way to inspect the current call stack,
Printexc.get_callstack
(Gabriel Scherer, Jacques-Henri Jourdan, Alain Frisch)
- PR#5986: new flag Marshal.Compat_32 for the serialization functions
(Marshal.to_*), forcing the output to be readable on 32-bit hosts.
(Xavier Leroy)
- infix application operators |> and @@ in Pervasives
(Fabrice Le Fessant)
Other libraries:
- PR#5568: add O_CLOEXEC flag to Unix.openfile, so that the returned
file descriptor is created in close-on-exec mode
(Xavier Leroy)
Runtime system:
* PR#6019: more efficient implementation of caml_modify() and caml_initialize().
The new implementations are less lenient than the old ones: now,
the destination pointer of caml_modify() must point within the minor or
major heaps, and the destination pointer of caml_initialize() must
point within the major heap.
(Xavier Leroy, from an experiment by Brian Nigito, with feedback
from Yaron Minsky and Gerd Stolpmann)
Internals:
- Moved debugger/envaux.ml to typing/envaux.ml to publish env_of_only_summary
as part of compilerlibs, to be used on bin-annot files.
(Fabrice Le Fessant)
- The test suite can now be run without installing OCaml first.
(Damien Doligez)
Bug fixes:
- PR#3236: Document the fact that queues are not thread-safe
(Damien Doligez)
- PR#3468: (part 1) Sys_error documentation
(Damien Doligez)
- PR#3679: Warning display problems
(Fabrice Le Fessant)
- PR#3963: Graphics.wait_next_event in Win32 hangs if window closed
(Damien Doligez)
- PR#4079: Queue.copy is now tail-recursive
(patch by Christophe Papazian)
- PR#4138: Documentation for Unix.mkdir
(Damien Doligez)
- PR#4469: emacs mode: caml-set-compile-command is annoying with ocamlbuild
(Daniel Bünzli)
- PR#4485: Graphics: Keyboard events incorrectly delivered in native code
(Damien Doligez, report by Sharvil Nanavati)
- PR#4502: ocamlbuild now reliably excludes the build-dir from hygiene check
(Gabriel Scherer, report by Romain Bardou)
- PR#4762: ?? is not used at all, but registered as a lexer token
(Alain Frisch)
- PR#4788: wrong error message when executable file is not found for backtrace
(Damien Doligez, report by Claudio Sacerdoti Coen)
- PR#4812: otherlibs/unix: add extern int code_of_unix_error (value error);
(Goswin von Berdelow)
- PR#4887: input_char after close_in crashes ocaml (msvc runtime)
(Alain Frisch and Christoph Bauer, report by ygrek)
- PR#4994: ocaml-mode doesn't work with xemacs21
(Damien Doligez, report by Stéphane Glondu)
- PR#5098: creating module values may lead to memory leaks
(Alain Frisch, report by Milan Stanojević)
- PR#5102: ocamlbuild fails when using an unbound variable in rule dependency
(Xavier Clerc, report by Daniel Bünzli)
* PR#5119: camlp4 now raises a specific exception when 'DELETE_RULE' fails,
rather than raising 'Not_found'
(ygrek)
- PR#5121: %( %) in Format module seems to be broken
(Pierre Weis, first patch by Valentin Gatien-Baron, report by Khoo Yit Phang)
- PR#5178: document in INSTALL how to build a 32-bit version under Linux x86-64
(Benjamin Monate)
- PR#5212: Improve ocamlbuild error messages of _tags parser
(ygrek)
- PR#5240: register exception printers for Unix.Unix_error and Dynlink.Error
(Jérémie Dimino)
- PR#5300: ocamlbuild: verbose parameter should implicitly set classic display
(Xavier Clerc, report by Robert Jakob)
- PR#5327: (Windows) Unix.select blocks if same socket listed in first and
third arguments
(David Allsopp, displaying impressive MSDN skills)
- PR#5343: ocaml -rectypes is unsound wrt module subtyping (was still unsound)
(Jacques Garrigue)
- PR#5350: missing return code checks in the runtime system
(Xavier Leroy)
- PR#5468: ocamlbuild should preserve order of parametric tags
(Wojciech Meyer, report by Dario Texeira)
- PR#5551: Avoid repeated lookups for missing cmi files
(Alain Frisch)
- PR#5552: unrecognized gcc option -no-cpp-precomp
(Damien Doligez, report by Markus Mottl)
- PR#5580: missed opportunities for constant propagation
(Xavier Leroy and John Carr)
- PR#5611: avoid clashes betwen .cmo files and output files during linking
(Wojciech Meyer)
- PR#5662: typo in md5.c
(Olivier Andrieu)
- PR#5673: type equality in a polymorphic field
(Jacques Garrigue, report by Jean-Louis Giavitto)
- PR#5674: Methods call are 2 times slower with 4.00 than with 3.12
(Jacques Garrigue, Gabriel Scherer, report by Jean-Louis Giavitto)
- PR#5694: Exception raised by type checker
(Jacques Garrigue, report by Markus Mottl)
- PR#5695: remove warnings on sparc code emitter
(Fabrice Le Fessant)
- PR#5697: better location for warnings on statement expressions
(Dan Bensen)
- PR#5698: remove harcoded limit of 200000 labels in emitaux.ml
(Fabrice Le Fessant, report by Marcin Sawicki)
- PR#5702: bytecomp/bytelibrarian lib_sharedobjs was defined but never used
(Hongbo Zhang, Fabrice Le Fessant)
- PR#5708: catch Failure"int_of_string" in ocamldebug
(Fabrice Le Fessant, report by user 'schommer')
- PR#5712: (9) new option -bin-annot is not documented
(Damien Doligez, report by Hendrik Tews)
- PR#5731: instruction scheduling forgot to account for destroyed registers
(Xavier Leroy, Benedikt Meurer, reported by Jeffrey Scofield)
- PR#5734: improved Win32 implementation of Unix.gettimeofday
(David Allsopp)
- PR#5735: %apply and %revapply not first class citizens
(Fabrice Le Fessant, reported by Jun Furuse)
- PR#5738: first class module patterns not handled by ocamldep
(Fabrice Le Fessant, Jacques Garrigue, reported by Hongbo Zhang)
- PR#5739: Printf.printf "%F" (-.nan) returns -nan
(Xavier Leroy, David Allsopp, reported by Samuel Mimram)
- PR#5741: make pprintast.ml in compiler_libs
(Alain Frisch, Hongbo Zhang)
- PR#5747: 'unused open' warning not given when compiling with -annot
(Alain Frisch, reported by Valentin Gatien-Baron)
- PR#5752: missing dependencies at byte-code link with mlpack
(Wojciech Meyer, Nicholas Lucaroni)
- PR#5763: ocamlbuild does not give correct flags when running menhir
(Gabriel Scherer, reported by Philippe Veber)
- PR#5765: ocamllex doesn't preserve line directives
(Damien Doligez, reported by Martin Jambon)
- PR#5770: Syntax error messages involving unclosed parens are sometimes
incorrect
(Michel Mauny)
- PR#5772: problem with marshaling of mutually-recursive functions
(Jacques-Henri Jourdan, reported by Cédric Pasteur)
- PR#5775: several bug fixes for tools/pprintast.ml
(Hongbo Zhang)
- PR#5784: -dclambda option is ignored
(Pierre Chambart)
- PR#5785: misbehaviour with abstracted structural type used as GADT index
(Jacques Garrigue, report by Jeremy Yallop)
- PR#5787: Bad behavior of 'Unused ...' warnings in the toplevel
(Alain Frisch)
- PR#5793: integer marshalling is inconsistent between architectures
(Xavier Clerc, report by Pierre-Marie Pédrot)
- PR#5798: add ARM VFPv2 support for Raspbian (ocamlopt)
(Jeffrey Scofield and Anil Madhavapeddy, patch review by Benedikt Meurer)
- PR#5802: Avoiding "let" as a value name
(Jacques Garrigue, report by Tiphaine Turpin)
- PR#5805: Assert failure with warning 34 on pre-processed file
(Alain Frisch, report by Tiphaine Turpin)
- PR#5806: ensure that backtrace tests are always run (testsuite)
(Xavier Clerc, report by user 'michi')
- PR#5809: Generating .cmt files takes a long time, in case of type error
(Alain Frisch)
- PR#5810: error in switch printing when using -dclambda
(Pierre Chambart)
- PR#5811: Untypeast produces singleton tuples for constructor patterns
with only one argument
(Tiphaine Turpin)
- PR#5813: GC not called when unmarshaling repeatedly in a tight loop (ocamlopt)
(Xavier Leroy, report by David Waern)
- PR#5814: read_cmt -annot does not report internal references
(Alain Frisch)
- PR#5815: Multiple exceptions in signatures gives an error
(Leo P. White)
- PR#5816: read_cmt -annot does not work for partial .cmt files
(Alain Frisch)
- PR#5819: segfault when using [with] on large recursive record (ocamlopt)
(Xavier Leroy, Damien Doligez)
- PR#5821: Wrong record field is reported as duplicate
(Alain Frisch, report by Martin Jambon)
- PR#5824: Generate more efficient code for immediate right shifts.
(Pierre Chambart, review by Xavier Leroy)
- PR#5825: Add a toplevel primitive to use source file wrapped with the
coresponding module
(Grégoire Henry, Wojciech Meyer, caml-list discussion)
- PR#5833: README.win32 can leave the wrong flexlink in the path
(Damien Doligez, report by William Smith)
- PR#5835: nonoptional labeled arguments can be passed with '?'
(Jacques Garrigue, report by Elnatan Reisner)
- PR#5840: improved documentation for 'Unix.lseek'
(Xavier Clerc, report by Matej Košík)
- PR#5848: Assertion failure in type checker
(Jacques Garrigue, Alain Frisch, report by David Waern)
- PR#5858: Assert failure during typing of class
(Jacques Garrigue, report by Julien Signoles)
- PR#5865: assert failure when reporting undefined field label
(Jacques Garrigue, report by Anil Madhavapeddy)
- PR#5872: Performance: Buffer.add_char is not inlined
(Gerd Stolpmann, Damien Doligez)
- PR#5876: Uncaught exception with a typing error
(Alain Frisch, Gabriel Scherer, report by Julien Moutinho)
- PR#5877: multiple "open" can become expensive in memory
(Fabrice Le Fessant and Alain Frisch)
- PR#5880: 'Genlex.make_lexer' documention mentions the wrong exception
(Xavier Clerc, report by Virgile Prevosto)
- PR#5885: Incorrect rule for compiling C stubs when shared libraries are not
supported.
(Jérôme Vouillon)
- PR#5891: ocamlbuild: support rectypes tag for mlpack
(Khoo Yit Phang)
- PR#5892: GADT exhaustiveness check is broken
(Jacques Garrigue and Leo P. White)
- PR#5906: GADT exhaustiveness check is still broken
(Jacques Garrigue, report by Sébastien Briais)
- PR#5907: Undetected cycle during typecheck causes exceptions
(Jacques Garrigue, report by Pascal Zimmer)
- PR#5910: Fix code generation bug for "mod 1" on ARM.
(Benedikt Meurer, report by user 'jteg68')
- PR#5911: Signature substitutions fail in submodules
(Jacques Garrigue, report by Markus Mottl)
- PR#5912: add configure option -no-cfi (for OSX 10.6.x with XCode 4.0.2)
(Damien Doligez against XCode versions, report by Thomas Gazagnaire)
- PR#5914: Functor breaks with an equivalent argument signature
(Jacques Garrigue, report by Markus Mottl and Grégoire Henry)
- PR#5920, PR#5957: linking failure for big bytecodes on 32bit architectures
(Benoît Vaugon and Chet Murthy, report by Jun Furuse and Sebastien Mondet)
- PR#5928: Missing space between words in manual page for ocamlmktop
(Damien Doligez, report by Matej Košík)
- PR#5930: ocamldep leaks temporary preprocessing files
(Gabriel Scherer, report by Valentin Gatien-Baron)
- PR#5933: Linking is slow when there are functions with large arities
(Valentin Gatien-Baron, review by Gabriel Scherer)
- PR#5934: integer shift by negative amount (in otherlibs/num)
(Xavier Leroy, report by John Regehr)
- PR#5944: Bad typing performances of big variant type declaration
(Benoît Vaugon)
- PR#5945: Mix-up of Minor_heap_min and Minor_heap_max units
(Benoît Vaugon)
- PR#5948: GADT with polymorphic variants bug
(Jacques Garrigue, report by Leo P. White)
- PR#5953: Unix.system does not handle EINTR
(Jérémie Dimino)
- PR#5965: disallow auto-reference to a recursive module in its definition
(Alain Frisch, report by Arthur Windler via Gabriel Scherer)
- PR#5973: Format module incorrectly parses format string
(Pierre Weis, report by Frédéric Bour)
- PR#5974: better documentation for Str.regexp
(Damien Doligez, report by william)
- PR#5976: crash after recovering from two stack overflows (ocamlopt on MacOS X)
(Xavier Leroy, report by Pierre Boutillier)
- PR#5977: Build failure on raspberry pi: "input_value: integer too large"
(Alain Frisch, report by Sylvain Le Gall)
- PR#5981: Incompatibility check assumes abstracted types are injective
(Jacques Garrigue, report by Jeremy Yallop)
- PR#5982: caml_leave_blocking section and errno corruption
(Jérémie Dimino)
- PR#5985: Unexpected interaction between variance and GADTs
(Jacques Garrigue, Jeremy Yallop and Leo P. White and Gabriel Scherer)
- PR#5988: missing from the documentation: -impl is a valid flag for ocamlopt
(Damien Doligez, report by Vincent Bernardoff)
- PR#5989: Assumed inequalities involving private rows
(Jacques Garrigue, report by Jeremy Yallop)
- PR#5992: Crash when pattern-matching lazy values modifies the scrutinee
(Luc Maranget, Leo P. White)
- PR#5993: Variance of private type abbreviations not checked for modules
(Jacques Garrigue)
- PR#5997: Non-compatibility assumed for concrete types with same constructor
(Jacques Garrigue, report by Gabriel Scherer)
- PR#6004: Type information does not flow to "inherit" parameters
(Jacques Garrigue, report by Alain Frisch)
- PR#6005: Type unsoundness with recursive modules
(Jacques Garrigue, report by Jérémie Dimino and Josh Berdine)
- PR#6010: Big_int.extract_big_int gives wrong results on negative arguments
(Xavier Leroy, report by Drake Wilson via Stéphane Glondu)
- PR#6024: Format syntax for printing @ is incompatible with 3.12.1
(Damien Doligez, report by Boris Yakobowski)
- PR#6001: Reduce the memory used by compiling Camlp4
(Hongbo Zhang and Gabriel Scherer, report by Henri Gouraud)
- PR#6031: Camomile problem with -with-frame-pointers
(Fabrice Le Fessant, report by Anil Madhavapeddy)
- PR#6032: better Random.self_init under Windows
(Alain Frisch, Xavier Leroy)
- PR#6033: Matching.inline_lazy_force needs eta-expansion (command-line flags)
(Pierre Chambart, Xavier Leroy and Luc Maranget,
regression report by Gabriel Scherer)
- PR#6046: testsuite picks up the wrong ocamlrun dlls
(Anil Madhavapeddy)
- PR#6056: Using 'match' prevents generalization of values
(Jacques Garrigue, report by Elnatan Reisner)
- PR#6058: 'ocamlbuild -use-ocamlfind -tag thread -package threads t.cma' fails
(Gabriel Scherer, report by Hezekiah M. Carty)
- PR#6060: ocamlbuild rules for -principal, -strict-sequence and -short-paths
(Anil Madhavapeddy)
- PR#6069: ocamldoc: lexing: empty token
(Maxence Guesdon, Grégoire Henry, report by ygrek)
- PR#6072: configure does not handle FreeBSD current (i.e. 10) correctly
(Damien Doligez, report by Prashanth Mundkur)
- PR#6074: Wrong error message for failing Condition.broadcast
(Markus Mottl)
- PR#6084: Define caml_modify and caml_initialize as weak symbols to help
with Netmulticore
(Xavier Leroy, Gerd Stolpmann)
- PR#6090: Module constraint + private type seems broken in ocaml 4.01.0
(Jacques Garrigue, report by Jacques-Pascal Deplaix)
- PR#6109: Typos in ocamlbuild error messages
(Gabriel Kerneis)
- PR#6123: Assert failure when self escapes its class
(Jacques Garrigue, report by whitequark)
- PR#6158: Fatal error using GADTs
(Jacques Garrigue, report by Jeremy Yallop)
- PR#6163: Assert_failure using polymorphic variants in GADTs
(Jacques Garrigue, report by Leo P. White)
- PR#6164: segmentation fault on Num.power_num of 0/1
(Fabrice Le Fessant, report by Johannes Kanig)
- PR#6210: Camlp4 location error
(Hongbo Zhang, report by Jun Furuse)
Feature wishes:
- PR#5181: Merge common floating point constants in ocamlopt
(Benedikt Meurer)
- PR#5243: improve the ocamlbuild API documentation in signatures.mli
(Christophe Troestler)
- PR#5546: moving a function into an internal module slows down its use
(Alain Frisch, report by Fabrice Le Fessant)
- PR#5597: add instruction trace option 't' to OCAMLRUNPARAM
(Anil Madhavapeddy, Wojciech Meyer)
- PR#5676: IPv6 support under Windows
(Jérôme Vouillon, review by Jonathan Protzenko)
- PR#5721: configure -with-frame-pointers for Linux perf profiling
(Fabrice Le Fessant, test by Jérémie Dimino)
- PR#5722: toplevel: print full module path only for first record field
(Jacques Garrigue, report by ygrek)
- PR#5762: Add primitives for fast access to bigarray dimensions
(Pierre Chambart)
- PR#5769: Allow propagation of Sys.big_endian in native code
(Pierre Chambart, stealth commit by Fabrice Le Fessant)
- PR#5771: Add primitives for reading 2, 4, 8 bytes in strings and bigarrays
(Pierre Chambart)
- PR#5774: Add bswap primitives for amd64 and arm
(Pierre Chambart, test by Alain Frisch)
- PR#5795: Generate sqrtsd opcode instead of external call to sqrt on amd64
(Pierre Chambart)
- PR#5827: provide a dynamic command line parsing mechanism
(Hongbo Zhang)
- PR#5832: patch to improve "wrong file naming" error messages
(William Smith)
- PR#5864: Add a find operation to Set
(François Berenger)
- PR#5886: Small changes to compile for Android
(Jérôme Vouillon, review by Benedikt Meurer)
- PR#5902: -ppx based pre-processor executables accept arguments
(Alain Frisch, report by Wojciech Meyer)
- PR#5986: Protect against marshaling 64-bit integers in bytecode
(Xavier Leroy, report by Alain Frisch)
- PR#6049: support for OpenBSD/macppc platform
(Anil Madhavapeddy, review by Benedikt Meurer)
- PR#6059: add -output-obj rules for ocamlbuild
(Anil Madhavapeddy)
Tools:
- OCamlbuild now features a bin_annot tag to generate .cmt files.
(Jonathan Protzenko)
- OCamlbuild now features a strict_sequence tag to trigger the
strict-sequence option.
(Jonathan Protzenko)
- OCamlbuild now picks the non-core tools like ocamlfind and menhir from PATH
(Wojciech Meyer)
- PR#5884: Misc minor fixes and cleanup for emacs mode
(Stefan Monnier)
- PR#6030: Improve performance of -annot
(Guillaume Melquiond, Alain Frisch)
OCaml 4.00.1:
-------------
Bug fixes:
- PR#4019: better documentation of Str.matched_string
- PR#5111: ocamldoc, heading tags inside spans tags is illegal in html
- PR#5278: better error message when typing "make"
- PR#5468: ocamlbuild should preserve order of parametric tags
- PR#5563: harden Unix.select against file descriptors above FD_SETSIZE
- PR#5690: "ocamldoc ... -text README" raises exception
- PR#5700: crash with native-code stack backtraces under MacOS 10.8 x86-64
- PR#5707: AMD64 code generator: do not use r10 and r11 for parameter passing,
as these registers can be destroyed by the dynamic loader
- PR#5712: some documentation problems
- PR#5715: configuring with -no-shared-libs breaks under cygwin
- PR#5718: false positive on 'unused constructor' warning
- PR#5719: ocamlyacc generates code that is not warning 33-compliant
- PR#5725: ocamldoc output of preformatted code
- PR#5727: emacs caml-mode indents shebang line in toplevel scripts
- PR#5729: tools/untypeast.ml creates unary Pexp_tuple
- PR#5731: instruction scheduling forgot to account for destroyed registers
- PR#5735: %apply and %revapply not first class citizens
- PR#5738: first class module patterns not handled by ocamldep
- PR#5742: missing bound checks in Array.sub
- PR#5744: ocamldoc error on "val virtual"
- PR#5757: GC compaction bug (crash)
- PR#5758: Compiler bug when matching on floats
- PR#5761: Incorrect bigarray custom block size
OCaml 4.00.0:
-------------
(Changes that can break existing programs are marked with a "*")
- The official name of the language is now OCaml.
Language features:
- Added Generalized Algebraic Data Types (GADTs) to the language.
See chapter "Language extensions" of the reference manual for documentation.
- It is now possible to omit type annotations when packing and unpacking
first-class modules. The type-checker attempts to infer it from the context.
Using the -principal option guarantees forward compatibility.
- New (module M) and (module M : S) syntax in patterns, for immediate
unpacking of a first-class module.
Compilers:
- Revised simplification of let-alias (PR#5205, PR#5288)
- Better reporting of compiler version mismatch in .cmi files
* Warning 28 is now enabled by default.
- New option -absname to use absolute paths in error messages
- Optimize away compile-time beta-redexes, e.g. (fun x y -> e) a b.
- Added option -bin-annot to dump the AST with type annotations.
- Added lots of new warnings about unused variables, opens, fields,
constructors, etc.
* New meaning for warning 7: it is now triggered when a method is overridden
with the "method" keyword. Use "method!" to avoid the warning.
Native-code compiler:
- Optimized handling of partially-applied functions (PR#5287)
- Small improvements in code generated for array bounds checks (PR#5345,
PR#5360).
* New ARM backend (PR#5433):
. Supports both Linux/EABI (armel) and Linux/EABI+VFPv3 (armhf).
. Added support for the Thumb-2 instruction set with average code size
savings of 28%.
. Added support for position-independent code, natdynlink, profiling and
exception backtraces.
- Generation of CFI information, and filename/line number debugging (with -g)
annotations, enabling in particular precise stack backtraces with
the gdb debugger. Currently supported for x86 32-bits and 64-bits only.
(PR#5487)
- New tool: ocamloptp, the equivalent of ocamlcp for the native-code compiler.
OCamldoc:
- PR#5645: ocamldoc doesn't handle module/type substitution in signatures
- PR#5544: improve HTML output (less formatting in html code)
- PR#5522: allow refering to record fields and variant constructors
- fix PR#5419 (error message in french)
- fix PR#5535 (no cross ref to class after dump+load)
* Use first class modules for custom generators, to be able to
load various plugins incrementally adding features to the current
generator
* PR#5507: Use Location.t structures for locations.
- fix: do not keep code when not told to keep code.
Standard library:
- Added float functions "hypot" and "copysign" (PR#3806, PR#4752, PR#5246)
* Arg: options with empty doc strings are no longer included in the usage string
(PR#5437)
- Array: faster implementations of "blit", "copy", "sub", "append" and "concat"
(PR#2395, PR#2787, PR#4591)
* Hashtbl:
. Statistically-better generic hash function based on Murmur 3 (PR#5225)
. Fixed behavior of generic hash function w.r.t. -0.0 and NaN (PR#5222)
. Added optional "random" parameter to Hashtbl.create to randomize
collision patterns and improve security (PR#5572, CVE-2012-0839)
. Added "randomize" function and "R" parameter to OCAMLRUNPARAM
to turn randomization on by default (PR#5572, CVE-2012-0839)
. Added new functorial interface "MakeSeeded" to support randomization
with user-provided seeded hash functions.
. Install new header <caml/hash.h> for C code.
- Filename: on-demand (lazy) initialization of the PRNG used by "temp_file".
- Marshal: marshalling of function values (flag Marshal.Closures) now
also works for functions that come from dynamically-loaded modules (PR#5215)
- Random:
. More random initialization (Random.self_init()), using /dev/urandom
when available (e.g. Linux, FreeBSD, MacOS X, Solaris)
* Faster implementation of Random.float (changes the generated sequences)
- Format strings for formatted input/output revised to correct PR#5380
. Consistently treat %@ as a plain @ character
. Consistently treat %% as a plain % character
- Scanf: width and precision for floating point numbers are now handled
- Scanf: new function "unescaped" (PR#3888)
- Set and Map: more efficient implementation of "filter" and "partition"
- String: new function "map" (PR#3888)
Installation procedure:
- Compiler internals are now installed in `ocamlc -where`/compiler-libs.
The files available there include the .cmi interfaces for all compiler
modules, plus the following libraries:
ocamlcommon.cma/.cmxa modules common to ocamlc, ocamlopt, ocaml
ocamlbytecomp.cma/.cmxa modules for ocamlc and ocaml
ocamloptcomp.cma/.cmxa modules specific to ocamlopt
ocamltoplevel.cma modules specific to ocaml
(PR#1804, PR#4653, frequently-asked feature).
* Some .cmi for toplevel internals that used to be installed in
`ocamlc -where` are now to be found in `ocamlc -where`/compiler-libs.
Add "-I +compiler-libs" where needed.
* toplevellib.cma is no longer installed because subsumed by
ocamlcommon.cma ocamlbytecomp.cma ocamltoplevel.cma
- Added a configuration option (-with-debug-runtime) to compile and install
a debug version of the runtime system, and a compiler option
(-runtime-variant) to select the debug runtime.
Bug Fixes:
- PR#1643: functions of the Lazy module whose named started with 'lazy_' have
been deprecated, and new ones without the prefix added
- PR#3571: in Bigarrays, call msync() before unmapping to commit changes
- PR#4292: various documentation problems
- PR#4511, PR#4838: local modules remove polymorphism
* PR#4549: Filename.dirname is not handling multiple / on Unix
- PR#4688: (Windows) special floating-point values aren't converted to strings
correctly
- PR#4697: Unix.putenv leaks memory on failure
- PR#4705: camlp4 does not allow to define types with `True or `False
- PR#4746: wrong detection of stack overflows in native code under Linux
- PR#4869: rare collisions between assembly labels for code and data
- PR#4880: "assert" constructs now show up in the exception stack backtrace
- PR#4892: Array.set could raise "out of bounds" before evaluating 3rd arg
- PR#4937: camlp4 incorrectly handles optional arguments if 'option' is
redefined
- PR#5024: camlp4r now handles underscores in irrefutable pattern matching of
records
- PR#5064, PR#5485: try to ensure that 4K words of stack are available
before calling into C functions, raising a Stack_overflow exception
otherwise. This reduces (but does not eliminate) the risk of
segmentation faults due to stack overflow in C code
- PR#5073: wrong location for 'Unbound record field label' error
- PR#5084: sub-sub-module building fails for native code compilation
- PR#5120: fix the output function of Camlp4.Debug.formatter
- PR#5131: compilation of custom runtime with g++ generates lots of warnings
- PR#5137: caml-types-explore does not work
- PR#5159: better documentation of type Lexing.position
- PR#5171: Map.join does more comparisons than needed
- PR#5176: emacs mode: stack overflow in regexp matcher
- PR#5179: port OCaml to mingw-w64
- PR#5211: updated Genlex documentation to state that camlp4 is mandatory for
'parser' keyword and associated notation
- PR#5214: ocamlfind plugin invokes 'cut' utility
- PR#5218: use $(MAKE) instead of "make" in Makefiles
- PR#5224: confusing error message in non-regular type definition
- PR#5231: camlp4: fix parsing of <:str_item< type t = $x$ >>
- PR#5233: finaliser on weak array gives dangling pointers (crash)
- PR#5238, PR#5277: Sys_error when getting error location
- PR#5261, PR#5497: Ocaml source-code examples are not "copy-paste-able"
* PR#5279: executable name is not initialized properly in caml_startup_code
- PR#5290: added hash functions for channels, nats, mutexes, conditions
- PR#5291: undetected loop in class initialization
- PR#5295: OS threads: problem with caml_c_thread_unregister()
- PR#5301: camlp4r and exception equal to another one with parameters
- PR#5305: prevent ocamlbuild from complaining about links to _build/
- PR#5306: comparing to Thread.self() raises exception at runtime
- PR#5309: Queue.add is not thread/signal safe
- PR#5310: Ratio.create_ratio/create_normalized_ratio have misleading names
- PR#5311: better message for warning 23
* PR#5312: command-line arguments @reponsefile auto-expansion feature
removed from the Windows OCaml runtime, to avoid conflicts with "-w @..."
- PR#5313: ocamlopt -g misses optimizations
- PR#5214: ocamlfind plugin invokes 'cut' utility
- PR#5316: objinfo now shows ccopts/ccobjs/force_link when applicable
- PR#5318: segfault on stack overflow when reading marshaled data
- PR#5319: %r11 clobbered by Lswitch in Windows AMD64 native-code compilation
- PR#5322: type abbreviations expanding to a universal type variable
- PR#5328: under Windows, Unix.select leaves sockets in non-blocking mode
- PR#5330: thread tag with '.top' and '.inferred.mli' targets
- PR#5331: ocamlmktop is not always a shell script
- PR#5335: Unix.environment segfaults after a call to clearenv
- PR#5338: sanitize.sh has windows style end-of-lines (mingw)
- PR#5344: some predefined exceptions need special printing
- PR#5349: Hashtbl.replace uses new key instead of reusing old key
- PR#5356: ocamlbuild handling of 'predicates' for ocamlfind
- PR#5364: wrong compilation of "((val m : SIG1) : SIG2)"
- PR#5370: ocamldep omits filename in syntax error message
- PR#5374: camlp4 creates wrong location for type definitions
- PR#5380: strange sscanf input segfault
- PR#5382: EOPNOTSUPP and ENOTSUPP different on exotic platforms
- PR#5383: build failure in Win32/MSVC
- PR#5387: camlp4: str_item and other syntactic elements with Nils are
not very usable
- PR#5389: compaction sometimes leaves a very large heap
- PR#5393: fails to build from source on GNU/kFreeBSD because of -R link option
- PR#5394: documentation for -dtypes is missing in manpage
- PR#5397: Filename.temp_dir_name should be mutable
- PR#5410: fix printing of class application with Camlp4
- PR#5416: (Windows) Unix.(set|clear)_close_on_exec now preserves blocking mode
- PR#5435: ocamlbuild does not find .opt executables on Windows
- PR#5436: update object ids on unmarshaling
- PR#5442: camlp4: quotation issue with strings
- PR#5453: configure doesn't find X11 under Ubuntu/MultiarchSpec
- PR#5461: Double linking of bytecode modules
- PR#5463: Bigarray.*.map_file fail if empty array is requested
- PR#5465: increase stack size of ocamlopt.opt for windows
- PR#5469: private record type generated by functor loses abbreviation
- PR#5475: Wrapper script for interpreted LablTk wrongly handles command line
parameters
- PR#5476: bug in native code compilation of let rec on float arrays
- PR#5477: use pkg-config to configure graphics on linux
- PR#5481: update camlp4 magic numbers
- PR#5482: remove bashism in test suite scripts
- PR#5495: camlp4o dies on infix definition (or)
- PR#5498: Unification with an empty object only checks the absence of
the first method
- PR#5503: error when ocamlbuild is passed an absolute path as build directory
- PR#5509: misclassification of statically-allocated empty array that
falls exactly at beginning of an otherwise unused data page.
- PR#5510: ocamldep has duplicate -ml{,i}-synonym options
- PR#5511: in Bigarray.reshape, unwarranted limitation on new array dimensions.
- PR#5513: Int64.div causes floating point exception (ocamlopt, x86)
- PR#5516: in Bigarray C stubs, use C99 flexible array types if possible
- PR#5518: segfault with lazy empty array
- PR#5531: Allow ocamlbuild to add ocamldoc flags through -docflag
and -docflags switches
- PR#5538: combining -i and -annot in ocamlc
- PR#5543: in Bigarray.map_file, try to avoid using lseek() when growing file
- PR#5648: (probably fixed) test failures in tests/lib-threads
- PR#5551: repeated calls to find_in_path degrade performance
- PR#5552: Mac OS X: unrecognized gcc option "-no-cpp-precomp"
- PR#5555: add Hashtbl.reset to resize the bucket table to its initial size
- PR#5560: incompatible type for tuple pattern with -principal
- PR#5575: Random states are not marshallable across architectures
- PR#5579: camlp4: when a plugin is loaded in the toplevel,
Token.Filter.define_filter has no effect before the first syntax error
- PR#5585: typo: "explicitely"
- PR#5587: documentation: "allows to" is not correct English
- PR#5593: remove C file when -output-obj fails
- PR#5597: register names for instrtrace primitives in embedded bytecode
- PR#5598: add backslash-space support in strings in ocamllex
- PR#5603: wrong .file debug info generated by ocamlopt -g
- PR#5604: fix permissions of files created by ocamlbuild itself
- PR#5610: new unmarshaler (from PR#5318) fails to freshen object identifiers
- PR#5614: add missing -linkall flag when compiling ocamldoc.opt
- PR#5616: move ocamlbuild documentation to the reference manual
- PR#5619: Uncaught CType.Unify exception in the compiler
- PR#5620: invalid printing of type manifest (camlp4 revised syntax)
- PR#5637: invalid printing of anonymous type parameters (camlp4 revised syntax)
- PR#5643: issues with .cfi and .loc directives generated by ocamlopt -g
- PR#5644: Stream.count broken when used with Sapp or Slazy nodes
- PR#5647: Cannot use install_printer in debugger
- PR#5651: printer for abstract data type (camlp4 revised syntax)
- PR#5654: self pattern variable location tweak
- PR#5655: ocamlbuild doesn't pass cflags when building C stubs
- PR#5657: wrong error location for abbreviated record fields
- PR#5659: ocamlmklib -L option breaks with MSVC
- PR#5661: fixes for the test suite
- PR#5668: Camlp4 produces invalid syntax for "let _ = ..."
- PR#5671: initialization of compare_ext field in caml_final_custom_operations()
- PR#5677: do not use "value" as identifier (genprintval.ml)
- PR#5687: dynlink broken when used from "output-obj" main program (bytecode)
- problem with printing of string literals in camlp4 (reported on caml-list)
- emacs mode: colorization of comments and strings now works correctly
- problem with forall and method (reported on caml-list on 2011-07-26)
- crash when using OCAMLRUNPARAM=a=X with invalid X (reported in private)
Feature wishes:
- PR#352: new option "-stdin" to make ocaml read stdin as a script
- PR#1164: better error message when mixing -a and .cmxa
- PR#1284: documentation: remove restriction on mixed streams
- PR#1496: allow configuring LIBDIR, BINDIR, and MANDIR relative to $(PREFIX)
- PR#1835: add Digest.from_hex
- PR#1898: toplevel: add option to suppress continuation prompts
- PR#4278: configure: option to disable "graph" library
- PR#4444: new String.trim function, removing leading and trailing whistespace
- PR#4549: make Filename.dirname/basename POSIX compliant
- PR#4830: add option -v to expunge.ml
- PR#4898: new Sys.big_endian boolean for machine endianness
- PR#4963, PR#5467: no extern "C" into ocaml C-stub headers
- PR#5199: tests are run only for bytecode if either native support is missing,
or a non-empty value is set to "BYTECODE_ONLY" Makefile variable
- PR#5215: marshalling of dynlinked closure
- PR#5236: new '%revapply' primitive with the semantics 'revapply x f = f x',
and '%apply' with semantics 'apply f x = f x'.
- PR#5255: natdynlink detection on powerpc, hurd, sparc
- PR#5295: OS threads: problem with caml_c_thread_unregister()
- PR#5297: compiler now checks existence of builtin primitives
- PR#5329: (Windows) more efficient Unix.select if all fd's are sockets
- PR#5357: warning for useless open statements
- PR#5358: first class modules don't allow "with type" declarations for types
in sub-modules
- PR#5385: configure: emit a warning when MACOSX_DEPLOYMENT_TARGET is set
- PR#5396: ocamldep: add options -sort, -all, and -one-line
- PR#5397: Filename.temp_dir_name should be mutable
- PR#5403: give better error message when emacs is not found in PATH
- PR#5411: new directive for the toplevel: #load_rec
- PR#5420: Unix.openfile share mode (Windows)
- PR#5421: Unix: do not leak fds in various open_proc* functions
- PR#5434: implement Unix.times in win32unix (partially)
- PR#5438: new warnings for unused declarations
- PR#5439: upgrade config.guess and config.sub
- PR#5445 and others: better printing of types with user-provided names
- PR#5454: Digest.compare is missing and md5 doc update
- PR#5455: .emacs instructions, add lines to recognize ocaml scripts
- PR#5456: pa_macro: replace __LOCATION__ after macro expansion; add LOCATION_OF
- PR#5461: bytecode: emit warning when linking two modules with the same name
- PR#5478: ocamlopt assumes ar command exists
- PR#5479: Num.num_of_string may raise an exception, not reflected in the
documentation.
- PR#5501: increase IO_BUFFER_SIZE to 64KiB
- PR#5532: improve error message when bytecode file is wrong
- PR#5555: add function Hashtbl.reset to resize the bucket table to
its initial size.
- PR#5586: increase UNIX_BUFFER_SIZE to 64KiB
- PR#5597: register names for instrtrace primitives in embedded bytecode
- PR#5599: Add warn() tag in ocamlbuild to control -w compiler switch
- PR#5628: add #remove_directory and Topdirs.remove_directory to remove
a directory from the load path
- PR#5636: in system threads library, issue with linking of pthread_atfork
- PR#5666: C includes don't provide a revision number
- ocamldebug: ability to inspect values that contain code pointers
- ocamldebug: new 'environment' directive to set environment variables
for debuggee
- configure: add -no-camlp4 option
Shedding weight:
* Removed the obsolete native-code generators for Alpha, HPPA, IA64 and MIPS.
* The "DBM" library (interface with Unix DBM key-value stores) is no
longer part of this distribution. It now lives its own life at
https://forge.ocamlcore.org/projects/camldbm/
* The "OCamlWin" toplevel user interface for MS Windows is no longer
part of this distribution. It now lives its own life at
https://forge.ocamlcore.org/projects/ocamltopwin/
Other changes:
- Copy VERSION file to library directory when installing.
OCaml 3.12.1:
-------------
Bug fixes:
- PR#4345, PR#4767: problems with camlp4 printing of float values
- PR#4380: ocamlbuild should not use tput on windows
- PR#4487, PR#5164: multiple 'module type of' are incompatible
- PR#4552: ocamlbuild does not create symlinks when using '.itarget' file
- PR#4673, PR#5144: camlp4 fails on object copy syntax
- PR#4702: system threads: cleanup tick thread at exit
- PR#4732: camlp4 rejects polymorphic variants using keywords from macros
- PR#4778: Win32/MSVC port: rare syntax error in generated MASM assembly file
- PR#4794, PR#4959: call annotations not generated by ocamlopt
- PR#4820: revised syntax pretty printer crashes with 'Stack_overflow'
- PR#4928: wrong printing of classes and class types by camlp4
- PR#4939: camlp4 rejects patterns of the '?x:_' form
- PR#4967: ocamlbuild passes wrong switches to ocamldep through menhir
- PR#4972: mkcamlp4 does not include 'dynlink.cma'
- PR#5039: ocamlbuild should use '-linkpkg' only when linking programs
- PR#5066: ocamldoc: add -charset option used in html generator
- PR#5069: fcntl() in caml_sys_open may block, do it within blocking section
- PR#5071, PR#5129, PR#5134: inconsistencies between camlp4 and camlp4* binaries
- PR#5080, PR#5104: regression in type constructor handling by camlp4
- PR#5090: bad interaction between toplevel and camlp4
- PR#5095: ocamlbuild ignores some tags when building bytecode objects
- PR#5100: ocamlbuild always rebuilds a 'cmxs' file
- PR#5103: build and install objinfo when building with ocamlbuild
- PR#5109: crash when a parser calls a lexer that calls another parser
- PR#5110: invalid module name when using optional argument
- PR#5115: bytecode executables produced by msvc64 port crash on 32-bit versions
- PR#5117: bigarray: wrong function name without HAS_MMAP; missing include
- PR#5118: Camlp4o and integer literals
- PR#5122: camlp4 rejects lowercase identifiers for module types
- PR#5123: shift_right_big_int returns a wrong zero
- PR#5124: substitution inside a signature leads to odd printing
- PR#5128: typo in 'Camlp4ListComprehension' syntax extension
- PR#5136: obsolete function used in emacs mode
- PR#5145: ocamldoc: missing html escapes
- PR#5146: problem with spaces in multi-line string constants
- PR#5149: (partial) various documentation problems
- PR#5156: rare compiler crash with objects
- PR#5165: ocamlbuild does not pass '-thread' option to ocamlfind
- PR#5167: camlp4r loops when printing package type
- PR#5172: camlp4 support for 'module type of' construct
- PR#5175: in bigarray accesses, make sure bigarray expr is evaluated only once
- PR#5177: Gc.compact implies Gc.full_major
- PR#5182: use bytecode version of ocamldoc to generate man pages
- PR#5184: under Windows, alignment issue with bigarrays mapped from files
- PR#5188: double-free corruption in bytecode system threads
- PR#5192: mismatch between words and bytes in interpreting max_young_wosize
- PR#5202: error in documentation of atan2
- PR#5209: natdynlink incorrectly detected on BSD systems
- PR#5213: ocamlbuild should pass '-rectypes' to ocamldoc when needed
- PR#5217: ocamlfind plugin should add '-linkpkg' for toplevel
- PR#5228: document the exceptions raised by functions in 'Filename'
- PR#5229: typo in build script ('TAG_LINE' vs 'TAGLINE')
- PR#5230: error in documentation of Scanf.Scanning.open_in
- PR#5234: option -shared reverses order of -cclib options
- PR#5237: incorrect .size directives generated for x86-32 and x86-64
- PR#5244: String.compare uses polymorphic compare_val (regression of PR#4194)
- PR#5248: regression introduced while fixing PR#5118
- PR#5252: typo in docs
- PR#5258: win32unix: unix fd leak under windows
- PR#5269: (tentative fix) Wrong ext_ref entries in .annot files
- PR#5272: caml.el doesn't recognize downto as a keyword
- PR#5276: issue with ocamlc -pack and recursively-packed modules
- PR#5280: alignment constraints incorrectly autodetected on MIPS 32
- PR#5281: typo in error message
- PR#5308: unused variables not detected in "include (struct .. end)"
- camlp4 revised syntax printing bug in the toplevel (reported on caml-list)
- configure: do not define _WIN32 under cygwin
- Hardened generic comparison in the case where two custom blocks
are compared and have different sets of custom operations.
- Hardened comparison between bigarrays in the case where the two
bigarrays have different kinds.
- Fixed wrong autodetection of expm1() and log1p().
- don't add .exe suffix when installing the ocamlmktop shell script
- ocamldoc: minor fixes related to the display of ocamldoc options
- fixed bug with huge values in OCAMLRUNPARAM
- mismatch between declaration and definition of caml_major_collection_slice
Feature wishes:
- PR#4992: added '-ml-synonym' and '-mli-synonym' options to ocamldep
- PR#5065: added '-ocamldoc' option to ocamlbuild
- PR#5139: added possibility to add options to ocamlbuild
- PR#5158: added access to current camlp4 parsers and printers
- PR#5180: improved instruction selection for float operations on amd64
- stdlib: added a 'usage_string' function to Arg
- allow with constraints to add a type equation to a datatype definition
- ocamldoc: allow to merge '@before' tags like other ones
- ocamlbuild: allow dependency on file "_oasis"
Other changes:
- Changed default minor heap size from 32k to 256k words.
- Added new operation 'compare_ext' to custom blocks, called when
comparing a custom block value with an unboxed integer.
Objective Caml 3.12.0:
----------------------
(Changes that can break existing programs are marked with a "*" )
Language features:
- Shorthand notation for records: in expressions and patterns,
{ lbl } stands for { lbl = lbl } and { M.lbl } for { M.lbl = lbl }
- Record patterns of the form { lbl = pat; _ } to mark that not all
labels are listed, purposefully. (See new warning below.)
- Explicit naming of a generic type; in an expression
"fun ... (type t) ... -> e", the type t is considered abstract in its
scope (the arguments that follow it and the body of the function),
and then replaced by a fresh type variable. In particular, the type
t can be used in contexts where a type variable is not allowed
(e.g. for defining an exception in a local module).
- Explicit polymorphic types and polymorphic recursion. In let
definitions, one can write an explicit polymorphic type just
immediately the function name; the polymorphism will be enforced,
and recursive calls may use the polymorphism.
The syntax is the same as for polymorphic methods:
"let [rec] <ident> : 'a1 ... 'an. <typexp> = ..."
- First-class packages modules.
New kind of type expression, for packaged modules: (module PT).
New kind of expression, to pack a module as a first-class value:
(module MODEXPR : PT).
New kind of module expression, to unpack a first-class value as a module:
(val EXPR : PT).
PT is a package type of the form "S" or
"S with type t1 = ... and ... and type tn = ..." (S refers to a module type).
- Local opening of modules in a subexpression.
Syntax: "let open M in e", or "M.(e)"
- In class definitions, method and instance variable override can now
be made explicit, by writing "method!", "val!" or "inherit!" in place of
"method", "val" and "inherit". It is an error to override an
undefined member (or to use overriding inheritance when nothing get
overridden). Additionally, these constructs disactivate respectively
warnings 7 (method override, code 'M') and 13 (instance variable
override, code 'V'). Note that, by default, warning 7 is inactive
and warning 13 is active.
- "Destructive" substitution in signatures.
By writing "<signature> with type t := <typeconstr>" and
"<signature> with module M := <module-path>" one replaces "t" and "M"
inside the signature, removing their respective fields. Among other
uses, this allows to merge two signatures containing identically
named fields.
* While fixing PR#4824, also corrected a gaping hole in the type checker,
which allowed instantiating separately object parameters and instance
variables in an interface. This hole was here since the beginning of
ocaml, and as a result many programs using object inheritance in a non
trivial way will need to be corrected. You can look at lablgtk2 for an
example.
Compilers and toplevel:
- Warnings are now numbered and can be switched on and off individually.
The old system with letters referring to sets of warnings is still
supported.
- New warnings:
+ 9 (code 'R') to signal record patterns without "; _" where
some labels of the record type are not listed in the pattern.
+ 28 when giving a wildcard argument to a constant constructor in
a pattern-matching.
+ 29 when an end-of-line appears unescaped in a string constant.
+ 30 when the same constructor or record field is defined twice in
mutually-recursive type definitions.
* The semantics of warning 7 (code 'M', method override) have changed
(it now detects all overrides, not just repeated definitions inside
the same class body), and it is now inactive by default.
- Better error report in case of unbound qualified identifier: if the module
is unbound this error is reported in the first place.
- Added option '-strict-sequence' to force left hand part of sequence to have
type unit.
- Added option '-no-app-funct' to turn applicative functors off.
This option can help working around mysterious type incompatibilities
caused by the incomplete comparison of applicative paths F(X).t.
Native-code compiler:
- AMD64: shorter and slightly more efficient code generated for
float comparisons.
Standard library:
- Format: new function ikfprintf analoguous to ifprintf with a continuation
argument.
* PR#4210, #4245: stricter range checking in string->integer conversion
functions (int_of_string, Int32.of_string, Int64.of_string,
Nativeint.of_string). The decimal string corresponding to
max_int + 1 is no longer accepted.
- Scanf: to prevent confusion when mixing Scanf scanning functions and direct
low level input, value Scanf.stdin has been added.
* Random: changed the algorithm to produce better randomness. Now passes the
DieHard tests.
- Map: implement functions from Set that make sense for Map.
Other libraries: