Debian Codegraph @

Changes

raw
1 OCaml 5.4.1 (17 February 2026)
2 ------------------------------
3
4 ### Bug fixes:
5
6 - #14010: Fix miscompilation / liveness errors for string operations
7 (Mark Shinwell, Xavier Clerc, review by Xavier Leroy and Gabriel Scherer)
8
9 - #14065: Fix function signature mismatch of `__tsan_func_exit` with GCC 15.
10 Check in the configure step if the TSan provided internal builtins are the
11 same as what we expect, introduce `caml_tsan_*` wrappers for the `__tsan_*`
12 functions we use.
13 (Hari Hara Naveen S, report by Hari Hara Naveen S,
14 review by Gabriel Scherer, Antonin Décimo, Olivier Nicole)
15
16 - #14417: Fix issue with nested packs on macOS.
17 (Vincent Laviron, report by Kate Deplaix, review by Gabriel Scherer)
18
19 - #14213: Fix shadow-stack-related crashes with TSan
20 (Olivier Nicole, report by Nathan Taylor, review by Gabriel Scherer and
21 Stefan Muenzel)
22
23 - #14255: Fix TSan bug with C calls that take many arguments
24 (Olivier Nicole and Miod Vallat, report by Nathan Taylor, review by Gabriel
25 Scherer)
26
27 - private: robustify intern.c
28 (Xavier Leroy and Nicolás Ojeda Bär, review by Olivier Nicole, Mindy Preston,
29 and Edwin Török)
30
31 OCaml 5.4.0 (9 October 2025)
32 ----------------------------
33
34 (Changes that can break existing programs are marked with a "*")
35
36 ### Language features:
37
38 - #13097: added immutable arrays (`'a iarray` type, Iarray stdlib module)
39 (Antal Spector-Zabusky and Olivier Nicole, review by Gabriel Scherer,
40 Jeremy Yallop and Vincent Laviron)
41
42 - #13340: Array literal syntax [| e1; ...; en |] can now be used to
43 denote values of type `'a array` and `'a iarray` and `floatarray`,
44 both in expressions and patterns. The compiler disambiguates each
45 case by using contextual type information (assuming `'a array`
46 by default).
47 (Nicolás Ojeda Bär, review by Richard Eisenberg, Jeremy Yallop, Jacques
48 Garrigue, and Gabriel Scherer)
49
50 - #13498: Tuple fields are now optionally labeled:
51 `(x:42, y:0)` and `let (~x, ~y) = ... in ...`.
52 (Ryan Tjoa and Chris Casinghino, review by Gabriel Scherer, Chris Casinghino,
53 and Leo White)
54
55 - RFCs#39, #13404: atomic record fields
56 `{ ...; mutable readers : int [@atomic]; ... }`
57 `Atomic.Loc.fetch_and_add [%atomic.loc data.readers] 1`
58 (Clément Allain and Gabriel Scherer, review by KC Sivaramakrishnan,
59 Basile Clément and Olivier Nicole)
60
61 ### Standard library:
62
63 * #14124: Do not raise Invalid_argument on negative List.{drop,take}.
64 (Daniel Bünzli, review by Gabriel Scherer, Nicolás Ojeda Bär)
65
66 - #13696: Add Result.product and Result.Syntax:
67 `let open Result.Syntax in let* x = ... in ...`
68 (Daniel Bünzli, review by Gabriel Scherer, Nicolás Ojeda Bär)
69
70 - #12871: Add the Pqueue module to the stdlib. It implements priority queues.
71 (Jean-Christophe Filliâtre, review by Daniel Bünzli, Léo Andrès and
72 Gabriel Scherer)
73
74 - #13760: Add String.{edit_distance,spellcheck}
75 (Daniel Bünzli, review by wikku, Nicolás Ojeda Bär, Gabriel Scherer and
76 Florian Angeletti)
77
78 - #13753, #13755: Add Stdlib.Repr:
79 Repr.phys_equal and Repr.compare are more explicit than (==) and `compare`.
80 (Kate Deplaix, Thomas Blanc and Léo Andrès, review by Gabriel Scherer,
81 Florian Angeletti, Nicolás Ojeda Bär, Daniel Bünzli and Jeremy Yallop)
82
83 - #13695: Add Stdlib.Char.Ascii
84 (Daniel Bünzli, review by by Nicolás Ojeda Bär and Jeremy Yallop)
85
86
87 - #13720: Add Result.{get_ok',error_to_failure}
88 (Daniel Bünzli, review by wikku, Gabriel Scherer, Nicolás Ojeda Bär,
89 Vincent Laviron and hirrolot)
90
91 - #13885: Add Dynarray.{exists2, for_all2}.
92 (T. Kinsart, review by Daniel Bünzli, Gabriel Scherer, and Nicolás Ojeda Bär)
93
94 * #13862: Make List.sort_uniq keep the first occurrences of duplicates.
95 (Benoît Jubin, review by Nicolás Ojeda Bär, Gabriel Scherer)
96
97 - #13836: Add [Float.]Array.{equal,compare}.
98 (Daniel Bünzli, review by Nicolás Ojeda Bär and Gabriel Scherer)
99
100 - #13796: Add Uchar.utf_8_decode_length_of_byte and
101 Uchar.max_utf_8_decode_length.
102 (Daniel Bünzli, review by Nicolás Ojeda Bär and Florian Angeletti)
103
104 - #13768: Add Either.get_left and Either.get_right
105 (T. Kinsart, review by Nicolás Ojeda Bär and Florian Angeletti)
106
107 * #13570, #13794: Format, add an out_width function to Format device for
108 approximating unicode width.
109 (Florian Angeletti, review by Nicolás Ojeda Bär, Daniel Bünzli,
110 and Gabriel Scherer)
111
112 - #13731: Add Either.retract
113 (Daniel Bünzli, review by Nicolás Ojeda Bär and David Allsopp)
114
115 - #13729: Add Seq.filteri
116 (T. Kinsart, review by Nicolás Ojeda Bär and Daniel Bünzli)
117
118 - #13721: Add Result.retract
119 (Daniel Bünzli, review by Gabriel Scherer, Nicolás Ojeda Bär and
120 David Allsopp)
121
122 - #13310: Add Stdlib.Pair
123 (Victoire Noizet, review by Nicolás Ojeda Bär, Daniel Bünzli, Xavier Van de
124 Woestyne, Jeremy Yallop and Florian Angeletti)
125
126 - #13662: Add eager boolean operations Bool.logand, Bool.logor, Bool.logxor
127 (Jeremy Yallop, review by Nicolás Ojeda Bär)
128
129 - #13463, #13572: Avoid raising Queue.empty in Format when it is used
130 concurrently, raise a specific exception instead.
131 (Chritophe Raffalli, review by Gabriel Scherer and Daniel Bünzli)
132
133 - #13620: Avoid copying the string in String.concat, String.sub and
134 String.split_on_char when the full string is returned.
135 (Christophe Raffalli, review by Nicolás Ojeda Bär and Gabriel Scherer and
136 Hugo Heuzard)
137
138 - #13727: Reimplement Sys.getenv_opt not to use exceptions internally, meaning
139 that the current backtrace is preserved when Sys.getenv_opt returns None.
140 (David Allsopp, review by Nicolás Ojeda Bär, Josh Berdine and Gabriel Scherer)
141
142 - #13737: Avoid closure allocations in Weak.Make.add when resizing the
143 table
144 (Vincent Laviron, review by Gabriel Scherer and Daniel Bünzli)
145
146 - #13740: Improve performance of Weak.find_aux
147 (Josh Berdine, review by Gabriel Scherer)
148
149 - #13782: Improve performance and type safety of Type.Id by using
150 [%extension_constructor] instead of Obj.Extension_constructor.of_val.
151 (Basile Clément, review by Vincent Laviron and Nicolás Ojeda Bär)
152
153 - #13589: Expose Sys.io_buffer_size, the size of internal buffers used by the
154 runtime system and the `unix` library.
155 (Yves Ndiaye and Nicolás Ojeda Bär, review by Daniel Bünzli and Nicolás Ojeda
156 Bär)
157
158 - #13569: add a `Format.format_text` which adds break hints to format literals.
159 (Florian Angeletti, review by Nicolás Ojeda Bär, Daniel Bünzli,
160 and Gabriel Scherer)
161
162 - #13578: On Windows, use the OS CSPRNG to seed the Stdlib.Random generator.
163 (Antonin Décimo, review by Miod Vallat, Nicolás Ojeda Bär, and Xavier Leroy)
164
165 - #13859: Fix Weak.get_copy not darkening custom blocks
166 (Josh Berdine, review by Stephen Dolan)
167
168 - #13909: Add `Dynarray.unsafe_to_iarray`
169 (Olivier Nicole, review by Daniel Bünzli, Stefan Muenzel and Gabriel Scherer,
170 request by Daniel Bünzli)
171
172 - #13932: Add List.singleton and Seq.singleton
173 (David Allsopp, tariffs applied by Nicolás Ojeda Bär and Gabriel Scherer)
174
175 * #13843: Add signal definitions for SIGIO and SIGWINCH. Introduces a
176 type alias for signal int, signal_to_string to convert OCaml signal numbers
177 to their POSIX equivalent names, and signal_of_int/signal_to_int for
178 converting between OCaml and platform signal numbers. (Reported in #13825)
179 (Tim McGilchrist, review by David Allsopp, Nicolás Ojeda Bär, Daniel Bünzli
180 Jan Midtgaard and Miod Vallat)
181
182 ### Runtime system:
183
184 - #13500: Add frame pointers support for ARM64 on Linux and macOS.
185 (Tim McGilchrist, review by KC Sivaramakrishnan, Fabrice Buoro
186 and Miod Vallat)
187
188 - #12964: Reintroduce "memory cleanup upon exit" mode. The cleanup will
189 however be incomplete if not all domains have been joined when the main
190 domain terminates.
191 (Miod Vallat, review by KC Sivaramakrishnan, feedback from Nick Barnes
192 and Gabriel Scherer)
193
194 - #13582: Enable software prefetching support for ARM64, s390x, PPC64 and RiscV.
195 Used during GC marking and sweeping to speed up both operations by
196 prefetching data.
197 (Tim McGilchrist, review by Nick Barnes, Antonin Décimo,
198 Stephen Dolan and Miod Vallat)
199
200
201 - #13675: Make Unix.map_file memory show up in Gc.Memprof.
202 (Stephen Dolan, review by Guillaume Munch-Maccagnoni and Gabriel Scherer)
203
204 - #13785: Add `Runtime_events.Timestamp.get_current`.
205 (Simon Cruanes)
206
207 - #13774: Fix for inaccurate live blocks/words stats in compaction.
208 (Sadiq Jaffer, report by KC Sivaramakrishnan and Jan Midtgaard, review by
209 Gabriel Scherer)
210
211 - #13773: Ensure that shared pool owners are correctly set on pool adoption.
212 (Stephen Dolan, review by Sadiq Jaffer and Gabriel Scherer)
213
214 * #11449, #13497: Add caml_stat_char_array_{to,of}_os functions allowing
215 conversion of string data which may contain NUL characters. Correct
216 implementation of caml_stat_strdup_to_utf16 to raise Out_of_memory instead of
217 returning of NULL (the behaviour of caml_stat_strdup_to_os was inconsistent
218 between Unix/Windows).
219 (David Allsopp, review by Nick Barnes, Antonin Décimo and Miod Vallat)
220
221 - #13352: Concurrency refactors and cleanups.
222 (Antonin Décimo, review by Gabriel Scherer, David Allsopp, and Miod Vallat)
223
224 - #13437: Stop using GetProcAddress to load functions that were not
225 available in older, now unsupported Windows versions.
226 (Antonin Décimo, review by Nicolás Ojeda Bär and David Allsopp)
227
228 - #13470: Constify some function parameters, flags tables, and some
229 pointers in C code (take 3).
230 (Antonin Décimo, review by Stephen Dolan and Miod Vallat)
231
232 - #13492: Parse the CAML_LD_LIBRARY_PATH environment variable for the
233 shared_libs_path item in `ocamlrun -config` in addition to displaying the
234 entries found in ld.conf.
235 (David Allsopp, review by Stephen Dolan)
236
237 - #13496: Add missing .type and .size directives to main frametable to silence
238 warnings from the linker when using libasmrun_shared on amd64 and power. The
239 other backends already carried these directives.
240 (David Allsopp, review by Tim McGilchrist and Miod Vallat)
241
242 - #13354: Use C99 flexible array member syntax everywhere.
243 (Antonin Décimo, review by Miod Vallat, Gabriel Scherer, and Xavier Leroy)
244
245 - #11865, #13584: Fix a deadlock triggered by deleting C roots from C finalisers
246 (Stephen Dolan, report by Timothy Bourke, review by Mark Shinwell and Damien
247 Doligez)
248
249 - #13613: Functions from caml/skiplist.h and caml/lf_skiplist.h no longer raise
250 Out_of_memory exceptions that the runtime could not handle.
251 (Guillaume Munch-Maccagnoni, review by Stephen Dolan)
252
253 - #13575, #13635: Maintain OCaml frame pointers correctly even when using
254 C libraries that do not support them.
255 (Stephen Dolan and David Allsopp, report by Thomas Leonard, review by Tim
256 McGilchrist and Fabrice Buoro)
257
258 - #13643: Allow values reachable from ephemeron keys to be collected by minor GC
259 (Stephen Dolan, review by François Bobot)
260
261 - #13701: optimize `caml_continuation_use` based on #12735
262 (Hugo Heuzard, review by KC Sivaramakrishnan)
263
264 - #13227, #13714: Review of locking in the multicore runtime. Fix
265 deadlocks in runtime events and potential deadlocks with named
266 values.
267 (Guillaume Munch-Maccagnoni, review by Gabriel Scherer, tests by
268 Jan Midtgaard)
269
270 - #13736: Fix major GC pacing bug triggered by synchronous collections.
271 (Nick Barnes, review by Damien Doligez and Tim McGilchrist)
272
273 - #13827: Avoid re-marking ephemerons with trivial data.
274 (Stephen Dolan, review by Nick Barnes and Josh Berdine, benchmarking by
275 Nicolás Ojeda Bär)
276
277 - #13300, #13861: introduce `Gc.ramp_up` to explicitly mark ramp-up
278 phases of memory consumption and avoid GC overwork. Ramp-up behaviors
279 are worse with OCaml 5 than with OCaml 4 due to higher sensitivity
280 to excessive pacing computations. Indicating ramp-up explicitly eliminates
281 the main known slowdown of OCaml 5 (relative to OCaml 4) for Coq/Rocq.
282 (Gabriel Scherer, review by Damien Doligez and Guillaume Munch-Maccagnoni,
283 report by Emilio Jesús Gallego Arias and Olivier Nicole)
284
285 - #14057: Don't update memprof too early at the end of a minor GC.
286 (Nick Barnes, review by Damien Doligez).
287
288 ### Code generation and optimizations:
289
290 - #13262, #14074: fix performance issue on Apple Silicon macOS by emitting
291 `stlr` instead of `dmb ishld; str`.
292 (KC Sivaramakrishnan, report by François Pottier, analysis by Frédéric Bour,
293 Xavier Leroy, Miod Vallat, Gabriel Scherer and Stephen Dolan, review by Miod
294 Vallat, Vincent Laviron and Xavier Leroy)
295
296 * #13050, #14104, #14143: Use '$' instead of '.' to separate module names
297 in symbol names on macOS and Windows (including the Cygwin backend).
298 This changes mangling of OCaml identifiers on those operating systems from
299 `camlModule.name_NNN` to `camlModule$name_NNN`. Additionally it
300 changes the encoding of special characters from $xx (two hex digits)
301 to $$xx (two dollar signs followed by two hex digits).
302 (Tim McGilchrist, with contributions from Xavier Leroy,
303 reviewed by Xavier Leroy, Miod Vallat, Gabriel Scherer,
304 Nick Barnes and Hugo Heuzard)
305
306 - #13807: Allow unaligned memory accesses on ARM64.
307 (Matthew Else, review by Xavier Leroy)
308
309
310 - #13565: less tagging in switches compiled to affine transformations
311 by ocamlopt.
312 (Gabriel Scherer and Clément Allain, review by Vincent Laviron,
313 report by Vesa Karvonen)
314
315 - #13672 Avoid register stall on conversion instructions on amd64.
316 (Pierre Chambart, review by Gabriel Scherer and Xavier Leroy,
317 report by Patrick Nicodemus)
318
319 - #13667: (originally #11162) Fix instr_size computation on arm64.
320 (Stephen Dolan and Tim McGilchrist, review by Xavier Leroy
321 and David Allsopp)
322
323 - #13758: Propagate more value kinds in Flambda to allow more unboxing
324 (Vincent Laviron, review by Pierre Chambart)
325
326 - #13759: Propagate more type information from clambda to cmm.
327 (Pierre Chambart, review by Gabriel Scherer)
328
329 - #13735: Follow the behaviour of the C compiler to decide whether to emit the
330 `.size` and `.type` directives and the `.note.GNU-stack` section
331 (Samuel Hym, review by Miod Vallat, Antonin Décimo and Gabriel Scherer)
332
333 ### Other libraries:
334
335 * #13435: On Windows, use system calls for `Filename.get_temp_dir_name` instead
336 of directly reading the environment, which in particular improves the security
337 of OCaml processes running in the SYSTEM security context by mitigating
338 privileged file operation attacks. For all other processes running with the
339 default environment (where `TEMP` is set), there is no discernible change.
340 (Antonin Décimo, review by Nicolás Ojeda Bär and David Allsopp)
341
342 - #13504, #13625, #14223: Add `Thread.set_current_thread_name`.
343 (Romain Beauxis, review by Gabriel Scherer and Antonin Décimo)
344
345 * #13376: Allow Dynlink.loadfile_private to load bytecode libraries with
346 internal dependencies
347 (Vincent Laviron, report by Stéphane Glondu, review by Nicolás Ojeda Bär
348 and Xavier Leroy)
349
350 - #13429: add `Unix.sigwait`, a binding to the `sigwait` system call;
351 implement `Thread.wait_signal` using `Unix.sigwait`, and
352 `Thread.sigmask` using `Unix.sigprocmask`.
353 (Xavier Leroy, review by Antonin Décimo, Gabriel Scherer, Miod Vallat)
354
355 - #13442, #13452: Fix Unix.getgroups for users belonging to more than 32 groups
356 when using musl
357 (Kate Deplaix, review by Gabriel Scherer, Antonin Décimo, Anil Madhavapeddy)
358
359 - #13576: Introduce internal helpers to convert between time representations.
360 On Windows, prevent erroneously waiting for an unbounded time in Unix.select
361 if more than 64 file descriptors per lists are watched, or if watching
362 non-socket file descriptors, and a timeout longer than $2^{32}$ milliseconds
363 is used. Cap the timeout to $2^{32}$ milliseconds.
364 (Antonin Décimo, review by Gabriel Scherer and Miod Vallat)
365
366 - #13921: Set cloexec correctly on CRT file descriptors created by the Unix
367 library on Windows. The inheritance on the underlying Win32 handles was
368 correctly set, but the book-keeping for the CRT was leaking the value of
369 non-inherited handles which combined with reuse of HANDLE values within
370 processes could appear to make a CRT file descriptor "re-open".
371 (David Allsopp, review by Nicolás Ojeda Bär)
372
373 ### Tools:
374
375 - #13686: Fix Python debugger extensions (for LLDB and GDB) to restore
376 functionality broken by #13272 in 5.3.
377 (Nick Barnes, review by Tim McGilchrist Gabriel Scherer)
378
379 - #12019: ocamlc: add `align_double` and `align_int64` to `ocamlc -config`
380 output.
381 (Romain Beauxis, review by David Allsopp)
382
383 - #12642, #13536, #14184, #14192: in the toplevel, print shorter paths for
384 constructors and labels when only some modules along their path are open.
385 (Gabriel Scherer, review by Florian Angeletti)
386
387 - #13199, #13485, #13665, #13762, #13965: Support running native debuggers in
388 ocamltest.
389 (Tim McGilchrist, Sebastien Hinderer, David Allsopp, Antonin Décimo, review by
390 Sebastien Hinderer, Gabriel Scherer, Antonin Décimo, and Tim McGilchrist)
391
392 - #13764, #13779: add missing "-keywords" flag to ocamldep and ocamlprof
393 (Florian Angeletti, report by Prashanth Mundkur, review by Gabriel Scherer)
394
395 - #13877: ocamldoc, add a `-latex-escape-underscore` flag to control the
396 escaping of `_` underscore in latex references (in order to be able to match
397 odoc behaviour).
398 (Florian Angeletti, review by Gabriel Scherer)
399
400 - #13906: Add support for a `multicore` tag in ocamltest and use it for
401 tests that fail on mono-core systems.
402 (Stéphane Glondu, review by Nicolás Ojeda Bär)
403
404 ### Manual and documentation:
405
406 - #13751: Document support for profiling with Linux perf and frame pointers.
407 (Tim McGilchrist, review by Gabriel Scherer and Miod Vallat)
408
409 - #12452: Add examples to Stdlib.Fun documentation.
410 (Hazem ElMasry, review by Florian Angeletti and Gabriel Scherer)
411
412 - #13924: Document how to put [@deprecated] on let bindings, constructors, etc
413 in the manual
414 (Valentin Gatien-Baron, review by Florian Angeletti)
415
416
417 - #13694: Fix name for caml_hash_variant in the C interface.
418 (Michael Hendricks)
419
420 - #13732: Document that custom finalizers must not access the OCaml heap, etc.
421 (Josh Berdine, review by Stephen Dolan and Guillaume Munch-Maccagnoni)
422
423 ### Type system
424
425 * #13830: fail rather than silently create abstract module types when avoiding
426 (i.e. hiding) signature items, as in:
427 ```ocaml
428 module N = struct
429 open (struct type t = A | B end)
430 module type T = sig type u = t * int end
431 end
432 ```
433 Before, it was succeeding with `module N : sig module type T end`, now it
434 fails. Similarly for anonymous functor calls (of the form `F(struct ... end))
435 (Clement Blaudeau, review by Gabriel Scherer)
436
437 - #13747: Document support for native debugging with GDB and LLDB.
438 (Tim McGilchrist, review by Daniel Bünzli, Samuel Hym, Olivier Nicole
439 and Antonin Décimo)
440
441 ### Compiler user-interface and warnings:
442
443 - #13817: align spellchecking hints with the possibly misspelled identifier/
444 Error: Unbound type constructor "aray"
445 Hint: Did you mean "array"?
446 (Florian Angeletti, suggestion by Daniel Bünzli, review by Gabriel Scherer)
447
448 - #13587: Enable native backend on x86_64 GNU/Hurd.
449 (Samuel Thibault, review by Antonin Décimo, Sébastien Hinderer and Miod
450 Vallat)
451
452 - #13663: Improve the error message when GADT parameter variance cannot be
453 checked.
454 (Stefan Muenzel, review by Gabriel Scherer and Florian Angeletti)
455
456 - #13646: Improve the error messages when a recursive module type
457 references another recursive module type.
458 (Stefan Muenzel, review by Florian Angeletti and Gabriel Scherer)
459
460 - #13702, #13865: Specialized error messages for functors appearing in contexts
461 where non-functors were expected `module A: sig ... end = Set.Make`
462 (and the reverse)
463 (Florian Angeletti, report by Jeremy Yallop, review by Gabriel Scherer)
464
465 - #13788, #13813: Keep the module context in spellchecking hints.
466 `Fun.protact` now prompts `Did you mean "Fun.protect?"` rather than
467 `Did you mean "protect?"`.
468 (Florian Angeletti, suggestion by Daniel Bünzli, review by Gabriel Scherer)
469
470
471 - #13428: support dump=[source | parsetree | lambda | ... | cmm | ...]
472 in OCAMLRUNPARAM
473 (Gabriel Scherer, review by Vincent Laviron)
474
475 - #13493: Clearer error message in ocamlc for conflicting link options for
476 C stubs when shared libraries are not available.
477 (David Allsopp, review by Gabriel Scherer)
478
479 - #13563, lighter inline code styling for output without bold support: inline
480 code is no longer printed as "..." to avoid confusion with OCaml strings.
481 (Florian Angeletti, review by Richard Eisenberg)
482
483 - #13568, composable formatting for warning and alert messages
484 (Florian Angeletti, review by Richard Eisenberg)
485
486 - #13601: Enable natdynlink on x86_64 GNU/Hurd
487 (Samuel Thibault, review by Sébastien Hinderer)
488
489 - #13809: Distinguish `(module M : S)` and `(module M) : (module S)` and
490 change locations of error messages when `S` is ill-typed in `(module S)`
491 (Samuel Vivien, review by Florian Angeletti and Gabriel Scherer)
492
493 - #13814, 13898: Add an `unused-type-declaration` warning when using
494 a `t as 'a` with no other occurrences of `'a`
495 (Samuel Vivien, review by Florian Angeletti, Kate Deplaix)
496
497 - #13818: better delimited hints in error message
498 (Florian Angeletti, review by Gabriel Scherer)
499
500 ### Internal/compiler-libs changes:
501
502 - #13539, #13776: Use nanosleep instead of usleep or select, if available.
503 (Antonin Décimo, review by Miod Vallat and Gabriel Scherer)
504
505 - #13748: Add a .editorconfig file for basic editor auto-configuration.
506 (Antonin Décimo, review by Gabriel Scherer and David Allsopp)
507
508 - #13302, #14236: Store locations of longidents components
509 (Ulysse Gérard and Jules Aguillon, review by Jules Aguillon
510 and Florian Angeletti)
511
512
513 - #13314: Comment the code of Translclass
514 (Vincent Laviron and Nathanaëlle Courant, review by Olivier Nicole)
515
516 - #13362: reimplement Floatarray.concat in C (`caml_floatarray_concat`),
517 matching the implementation of Array.concat.
518 (Gabriel Scherer, review by Nicolás Ojeda Bär)
519
520 - #13624: Added location to exception definitions and type extensions
521 (Samuel Vivien, review by Gabriel Scherer)
522
523 - #13425: undocumented -dmatchcomp flag for the debug
524 output of the pattern-matching compiler
525 (Gabriel Scherer, review by Vincent Laviron and Nicolás Ojeda Bär)
526
527 - #13460: introduce a variant of all predefined types
528 (Gabriel Scherer, review by Ulysse Gérard and Florian Angeletti)
529
530 - #13457, #13537: Annotate alloc/free open/close pairs of functions
531 with compiler attributes for static analysis.
532 (Antonin Décimo, review by Gabriel Scherer and Florian Angeletti)
533
534 - #13464: Use generic types in call to `subtype`. This improves
535 inference of type-directed disambiguation in principal mode.
536 (Richard Eisenberg, review by Jacques Garrigue)
537
538 - #13606: Fix Numbers.Int_base.compare
539 (Mark Shinwell, review by Vincent Laviron)
540
541 - #13612: Refactor `type_application`
542 (Ulysse Gérard, Leo White, review by Antonin Décimo, Gabriel Scherer,
543 Samuel Vivien, Florian Angeletti and Jacques Garrigue)
544
545 - #13744: Refactor in `collect_apply_args`
546 (Samuel Vivien, review by Florian Angeletti and Gabriel Scherer)
547
548 - #13787: a new -dcanonical-ids option to show canonicalized identifier stamps
549 in -d{lambda,cmm,...} outputs.
550 (Gabriel Scherer, review by Vincent Laviron and David Allsopp,
551 suggested by David Allsopp)
552
553 - #13820: Add a new option -i-variance to print the variance of every
554 type parameter; bivariance is printed as `+-`, and for consistency,
555 parser is modified too to accept `+-` and `-+` as `type_variance`.
556 (Takafumi Saikawa and Jacques Garrigue, review by Florian Angeletti)
557
558 - #13828: Apply BUILD_PATH_PREFIX_MAP to Sys.argv.(0) before storing it in .cmt
559 and .cmti files.
560 (David Allsopp, review by Daniel Bünzli and Gabriel Scherer)
561
562 - #13848: Add all paths components to the cmt files indexes
563 (Ulysse Gérard, review by Florian Angeletti)
564
565 - #13854: Make the parser set loc_ghost more correctly, for `keyword%extension`
566 syntax
567 (Valentin Gatien-Baron, review by Florian Angeletti)
568
569 - #13856: Add a new indirection in types AST called `package` that stores the
570 content of a `Tpackage` node
571 (Samuel Vivien, review by Florian Angeletti)
572
573 - #13866: Modified occurrence check that prevents recursive types for it to see
574 the checked type as a graph rather than a tree
575 (Samuel Vivien, report by Didier Remy, review by Florian Angeletti
576 and Jacques Garrigue)
577
578 - #13884 Correctly index modules in constructors and labels paths
579 (Ulysse Gérard, review by Florian Angeletti)
580
581 - #13946: refactor the #install_printer code in the debugger and toplevel
582 (Pierre Boutillier, review by Gabriel Scherer and Florian Angeletti)
583
584 - #13952: check and document the correctness of `caml_domain_alone ()`.
585 (Gabriel Scherer, review by KC Sivaramakrishnan, report by Olivier Nicole)
586
587 - #13971: Keep generalized structure from patterns when typing `let`
588 (Leo White, review by Samuel Vivien and Florian Angeletti)
589
590 * #13972: Renamed the `-no-alias-deps` flag internal representation to
591 `no_alias_deps` instead of `transparent_modules`.
592 (Clement Blaudeau, review by Gabriel Scherer)
593
594 ### Build system:
595
596 * #13526, #13789, #13804: Simplify the build of cross compilers
597 This replaces the configure `--with-target-bindir` option by an equivalent
598 `TARGET_BINDIR` variable
599 (Samuel Hym, review by Miod Vallat, Xavier Leroy, Antonin Décimo and Sébastien
600 Hinderer)
601
602
603 - #13431: Simplify github action responsible for flagging PRs with
604 the `parsetree-changes` label and extend it to mention the @ppxlib-dev
605 team.
606 (Nathan Rebours, review by Florian Angeletti)
607
608 - #13494: Use native symlinks on Windows for the OCaml installation, reducing
609 disk usage considerably.
610 (David Allsopp, review by Nicolás Ojeda Bär and Gabriel Scherer)
611
612 - #13789: Strictly validate the host and target triplets when building for the
613 Windows ports to be *-*-cygwin, *-w64-mingw32* or *-pc-windows. Other Cygwin
614 variants used to be rejected - other MSVC and mingw-w64 variants are now
615 rejected too.
616 (David Allsopp, review by Antonin Décimo and Gabriel Scherer)
617
618 ### Bug fixes:
619
620 - #13819: Fix field initialisation bug in runtime events subsystem.
621 (Nick Barnes, review by Gabriel Scherer).
622
623 - #13977: Pass `-fPIC` when compiling C files using `ocamlopt`. This was a
624 regression in OCaml 5.3.
625 (Nicolás Ojeda Bär, review by Daniel Bünzli and Gabriel Scherer)
626
627 - #13957: Allow 'effect' as attribute id.
628 (Pieter Goetschalckx, review by Nicolás Ojeda Bär and Florian Angeletti)
629
630 - #13691 #13895: Make four globals underlying Gc.control atomic to avoid C data
631 races against them.
632 (Jan Midtgaard, review by Miod Vallat, Sadiq Jaffer and Antonin Décimo)
633
634 - #13454: Output a correct trace of the C_CALLN bytecode.
635 (Miod Vallat, review by Antonin Décimo)
636
637 - #13595: Use x19 as Canonical Frame Address (CFA) register. This would cause
638 backtraces to be truncated when calling no alloc C code.
639 (Tim McGilchrist, report by Nick Barnes, review by Nick Barnes)
640
641 * #13605: Fix ungenerated constraints when they where impossible due to polyvars
642 issues
643 (Samuel Vivien, review by Florian Angeletti, Richard Eisenberg
644 and Jacques Garrigue)
645
646 - #13677, #13679: domain.c: remove backup_thread_running to simplify
647 concurrent state updates to the backup thread status.
648 (Gabriel Scherer, review by Jan Midtgaard and Miod Vallat,
649 report by Jan Midtgaard)
650
651 - #13896, #14098: ocamldoc, do not wrap module description in a paragraph tag
652 inside the table of modules
653 (Florian Angeletti, report by John Whitington, review by Gabriel Scherer)
654
655 - #13703: wrong explanation for some polymorphic-variant subtyping errors
656 (Gabriel Scherer, review by Jacques Garrigue,
657 report by Wiktor Kuchta and Richard Eisenberg)
658
659 - #13710: Support unicode identifiers in comments.
660 (Pieter Goetschalckx, review by Florian Angeletti and Gabriel Scherer)
661
662 - #13763: Track type of variables bound by as-patterns
663 (Leo White, review by Gabriel Scherer, port by Vincent Laviron)
664
665 - #13778, #13811: do not warn for unused type declarations when the type is used
666 in a first-class module type (`module S with type t = int)`.
667 (Florian Angeletti, report by Nicolás Ojeda Bär, review by Gabriel Scherer)
668
669 - #13790: Fix bytecode-only build of Cygwin when flexlink is being bootstrapped
670 with the compiler.
671 (David Allsopp, review by Antonin Décimo and Miod Vallat)
672
673 - #13812: Add forgotten check about the validity of the type variable name on
674 the right-hand side of `_ as _`.
675 (Samuel Vivien, review by Gabriel Scherer)
676
677 - #13845: Fix bug in untypeast/pprintast for value bindings with polymorphic
678 type annotations.
679 (Chris Casinghino, review by Florian Angeletti and Gabriel Scherer)
680
681 - #13930, #13933: Fix bugs in recursive values definitions involving
682 lazy values that have already been evaluated.
683 (Gabriel Scherer, review by Vincent Laviron, report by Vincent Laviron)
684
685 - #13867: Fix bug with some recursive bindings of lazy values.
686 (Guillaume Bury and Vincent Laviron, review by Stefan Muenzel
687 and Gabriel Scherer)
688
689 - #13931: fix bugs in nested recursive value definitions.
690 (Gabriel Scherer, review by Vincent Laviron,
691 report by Vincent Laviron)
692
693 - #13875, #13878: Add dedicated constructor for mutable variable access in
694 Cmm to prevent bugs linked to incorrect handling of coeffects.
695 (Vincent Laviron, review by Gabriel Scherer)
696
697 - #13880: Make object stat counters atomic
698 (Dimitris Mostrous, review by Gabriel Scherer and Nicolás Ojeda Bär)
699
700 - #13172, #13829: Fix a missing check of illegal recursive module-type
701 definitions
702 (Clement Blaudeau, review by Florian Angeletti)
703
704 - #13541, #13777: Using C++11 `thread_local` causes name-mangling
705 issues when linking with flexlink on Cygwin.
706 (Antonin Décimo and David Allsopp, report by Kate Deplaix)
707
708 * #13874, #13882: Make evaluation order consistent for applications when using
709 the non-flambda native compiler
710 (Vincent Laviron, report by Jean-Marie Madiot, review by Gabriel Scherer)
711
712 - #13942: Fix assertion on empty array case
713 (Olivier Nicole, review by Gabriel Scherer)
714
715 - #13950: Avoid tearing in `Array.sub`
716 (Gabriel Scherer and Olivier Nicole, report by Jan Midtgaard, review by
717 Gabriel Scherer)
718
719 - #13928, #13944: Fix handling of excessively nested unboxed types
720 (Vincent Laviron, review by Gabriel Scherer)
721
722 - #13987: Remove a spurious TSan report in case of benign data race between
723 major GC read and write from the mutator (fixes #13427)
724 (Olivier Nicole, report by Thomas Leonard, review by Gabriel Scherer)
725
726 - #14007, #14015: Fix memory corruption when an exception is raised during
727 demarshaling.
728 (Benoît Vaugon, review by David Allsopp and Gabriel Scherer)
729
730 - #14025: fix data race between compaction and domain termination
731 (Gabriel Scherer, review by Jan Midtgaard,
732 report by Jan Midtgaard)
733
734 - #13956 Fix a regression introduced in #13308 triggering wrong unused warnings.
735 (Ulysse Gérard, review by Florian Angeletti)
736
737 - #14070: also point to label mismatches in error messages for labelled tuples
738 (Florian Angeletti, review by Gabriel Scherer)
739
740 - #14088, #14091: fix non-deterministic code generation in
741 matching.ml (backport of rescript-lang/rescript#7557)
742 (Christiano Calgano, review by Gabriel Scherer and Vincent Laviron)
743
744 - #14105: Fix a loop in Pprintast that could result in a hang when printing
745 constructor `(::)` in isolation.
746 (Ulysse Gérard, review by Nicolás Ojeda Bär and Florian Angeletti)
747
748 - #14108: toplevel, fix a typo in directive type mismatch
749 (Florian Angeletti, review by Gabriel Scherer)
750
751 - #13586, #14093: Fix closing an out_channel during flush
752 (Stephen Dolan, report by Jan Midtgaard, investigation by Nick Roberts,
753 review by Antonin Décimo and Miod Vallat)
754
755 - #14101, #14139: define atomic helper types inside `caml/misc.h` to improve
756 header compatibility with C++
757 (Florian Angeletti, report by Kate Deplaix, review by Gabriel Scherer)
758
759 - #14135: Fix a rare internal typechecker error when combining recursive
760 modules, polymorphic fields or methods, and constrained type parameters.
761 (Florian Angeletti, review by Gabriel Scherer)
762
763 - #14169: runtime, fix cache miss within the stack fragments cache
764 (Florian Angeletti, review by Gabriel Scherer)
765
766 - #14196, #14197: ocamlprof: do not instrument unreachable clauses
767 (Gabriel Scherer, review by Nicolás Ojeda Bär, report by Ali Caglayan)
768
769 - #14200, #14202 : bad variance check with private aliases
770 (Jacques Garrigue, report and review by Stephen Dolan)
771
772 - #14061, #14209: fix a memory-ordering bug in Weak.set that could
773 result in uninitialized memory seen by Weak.get on another domain.
774 (Damien Doligez, review by Gabriel Scherer)
775
776 - #14214, #14221: fix a confused error message for module inclusions,
777 functor error messages were missing some type equalities potentially leading
778 to nonsensical "type t is not compatible with type t" submessage
779 (Florian Angeletti, report by Basile Clément, review by Gabriel Scherer)
780
781 - #14238: Fix certain variadic macros in misc.h which could trigger C warnings
782 under certain conditions in prerelease versions of OCaml 5.4.
783 (Antonin Décimo, review by Nicolás Ojeda Bär)
784
785 - #14287: Bugfix for GC root mishandling in memprof.c
786 (Stephen Dolan, review by Leo White)
787
788 OCaml 5.3.0 (8 January 2025)
789 ----------------------------
790
791 (Changes that can break existing programs are marked with a "*")
792
793 ### Restored backend:
794
795 - #12954: Restore the MSVC port
796 (David Allsopp, Antonin Décimo, Samuel Hym, and Miod Vallat, review by Nicolás
797 Ojeda Bär)
798
799 - #13093: Allow building the MSVC port with clang-cl.
800 (Antonin Décimo, review by Nicolás Ojeda Bär, Samuel Hym,
801 David Allsopp and Sébastien Hinderer)
802
803 ### Language features:
804
805 - #12309, #13158: Add syntax support for deep effect handlers
806 (Leo White, Tom Kelly, Anil Madhavapeddy, KC Sivaramakrishnan, Xavier Leroy
807 and Florian Angeletti, review by the same, Hugo Heuzard, and Ulysse Gérard)
808
809 - #11736, #12664, #13628: Support utf-8 encoded source files and latin-9
810 compatible identifiers.
811 (Xavier Leroy and Florian Angeletti, review by Daniel Bünzli and
812 Jules Aguillon)
813
814
815 - #12828, #13283: Add short syntax for dependent functor types `(X:A) -> ...`
816 (Jeremy Yallop, review by Nicolás Ojeda Bär and Gabriel Scherer)
817
818 ### Type system
819
820 - #11891, #12507: Allow to name new locally abstract types in constructor type
821 annotations.
822 (Jacques Garrigue, report and review by Gabriel Scherer and Florian Angeletti)
823
824 ### Runtime system:
825
826 - #11911, #12923: Multicore statistical memory profiling.
827 This restores a notable OCaml 4 feature that was missing
828 in OCaml 5.
829 (Nick Barnes, review by Stephen Dolan, Jacques-Henri Jourdan
830 and Guillaume Munch-Maccagnoni).
831
832
833 - #13419: Fix memory bugs in runtime events system.
834 (B. Szilvasy and Nick Barnes, review by Miod Vallat, Nick Barnes,
835 Tim McGilchrist, and Gabriel Scherer)
836
837 - #13364: Emit major slice counters in the runtime events.
838 (KC Sivaramakrishnan and Sadiq Jaffer, review by Gabriel Scherer)
839
840 - #13382: Add more documentation for Runtime_events types
841 (Sadiq Jaffer, review by Tim McGilchrist, Miod Vallat and KC Sivaramakrishnan)
842
843 - #13370: Fix a low-probability crash when calling Gc.counters.
844 (Demi Marie Obenour, review by Gabriel Scherer)
845
846 - #13272: Allow maximum number of domains to be specified as a OCAMLRUNPARAM
847 parameter.
848 (KC Sivaramakrishnan, review by Guillaume Munch-Maccagnoni, Miod Vallat,
849 Gabriel Scherer, David Allsopp, request by Zachary Yedidia).
850
851 - #12579: OS-based Synchronisation for Stop-the-World Sections
852 (B. Szilvasy, review by Miod Vallat, Nick Barnes, Olivier Nicole,
853 Gabriel Scherer and Damien Doligez)
854
855 - #12789: Restore caml_unregister_frametable from OCaml 4
856 (Frédéric Recoules, review by Gabriel Scherer)
857
858 - #13003: new, more consistent names for array-creation C functions
859 (Gabriel Scherer, review by Olivier Nicole)
860
861 - #13013: introduce a `caml_result` type to supersede the
862 use of 'encoded exception values' in the FFI.
863 (Gabriel Scherer, review by Damien Doligez,
864 Guillaume Munch-Maccagnoni and Xavier Leroy,
865 suggested by Guillaume Munch-Maccagnoni)
866
867 - #12407, #13226: Resource-handling improvements: add
868 exception-returning variants for all exception-raising functions in
869 `caml/fail.h`, for the purpose of cleaning-up state and resources
870 before raising.
871 (Guillaume Munch-Maccagnoni, review by Damien Doligez, Xavier Leroy
872 and Gabriel Scherer)
873
874 - #13086: Avoid spurious major GC slices.
875 (Damien Doligez, report by Stephen Dolan, review by Gabriel Scherer
876 and Stephen Dolan)
877
878 - #11779, #13117: Improve logic for fiber stack alignment.
879 (Miod Vallat, report by Damien Doligez, review by Gabriel Scherer)
880
881 - #12839: Remove ATOMIC_UINTNAT_INIT from camlatomic.h (as part of a larger
882 cleanup of camlatomic.h)
883 (David Allsopp, review by Antonin Décimo, Sébastien Hinderer, Samuel Hym,
884 Guillaume Munch-Maccagnoni and Miod Vallat)
885
886 - #13163: Enable frame pointers on macOS x86_64
887 (Tim McGilchrist, review by Sébastien Hinderer and Fabrice Buoro)
888
889 - #12951: Constify constructors and flags tables in C code (take 2).
890 Now these tables will go in the readonly segment, where they belong.
891 (Antonin Décimo, review by David Allsopp)
892
893 - #10696: Introduce __has_attribute and __has_c_attributes in
894 <caml/misc.h> to test the support of specific attributes in C
895 code. Introduce fallthrough as a wrapper around the fallthrough
896 attribute.
897 (Antonin Décimo, review by Nicolás Ojeda Bär, Xavier Leroy, and
898 Gabriel Scherer)
899
900 - #13083: Use macros from limits.h to avoid signed-integer wrap-around.
901 Introduce CAML_{U,}INTNAT_{MIN,MAX} macros to expose {u,}intnat limits.
902 (Antonin Décimo, review by Nick Barnes, Xavier Leroy, Gabriel Scherer,
903 and Miod Vallat)
904
905 - #13239: Check whether the compiler supports the labels as values
906 extension to enable threaded code interpretation.
907 (Antonin Décimo, review by Miod Vallat)
908
909 - #13238: Enable software prefetching on x86 and x86_64 when building
910 with MSVC or clang-cl.
911 (Antonin Décimo, review by Miod Vallat)
912
913 - #13241, #13261, #13271: Add CFI_SIGNAL_FRAME to ARM64 and RiscV runtimes,
914 for the purpose of displaying backtraces correctly in GDB.
915 (Tim McGilchrist, review by Miod Vallat, Gabriel Scherer and
916 KC Sivaramakrishnan)
917
918 - #13139: Simplify CAMLalign to always use C23/C++11 alignas or C11
919 _Alignas. Ensures that stat data is always aligned to the best
920 boundary.
921 (Antonin Décimo, review by Miod Vallat and Xavier Leroy)
922
923 - #13280: Check for support of compiler attributes. Allows using
924 compiler attributes with clang-cl.
925 (Antonin Décimo, review by Miod Vallat)
926
927 - #13243: Enable C compiler warnings internally when building with
928 clang-cl or MSVC. Provide fixes too.
929 (Antonin Décimo, review by Miod Vallat and Xavier Leroy)
930
931 - #13242: Define and use unreachable and trap annotation, and clean-up some
932 runtime assertions.
933 (Antonin Décimo, review by Miod Vallat, Gabriel Scherer, and David Allsopp)
934
935 - #13402, #13512, #13549, #13553: Revise bytecode implementation of callbacks
936 so that it no longer produces dangling registered bytecode fragments.
937 (Xavier Leroy, report by Jan Midtgaard, analysis by Stephen Dolan,
938 review by Miod Vallat)
939
940 - #13407: Add Runtime_events.EV_EMPTY_MINOR.
941 (Thomas Leonard, review by KC Sivaramakrishnan, Sadiq Jaffer and
942 Gabriel Scherer)
943
944 - #13522: Confirm runtime events ring is still active after callback.
945 (KC Sivaramakrishnan, review by Sadiq Jaffer and Miod Vallat)
946
947 - #13529: Do not write to event ring after going out of stw participant set.
948 (KC Sivaramakrishnan, review by Sadiq Jaffer)
949
950 ### Code generation and optimizations:
951
952 - #13014: Enable compile-time option -function-sections on all previously
953 unsupported native backends (POWER, riscv64 and s390x)
954 (Miod Vallat, review by Nicolás Ojeda Bär)
955
956 - #7241, #12555, #13076, #13138, #13338, #13152, #13153, #13154:
957 fix a soundness bug in the pattern-matching compiler
958 when side-effects mutate the scrutinee during matching.
959 (Gabriel Scherer, review by Nick Roberts)
960
961 - #13341: a warning when the pattern-matching compiler pessimizes code
962 because side-effects may mutate the scrutinee during
963 matching. (This warning is disabled by default, as this rarely
964 happens and its performance impact is typically not noticeable.)
965 (Gabriel Scherer, review by Nick Roberts, Florian Angeletti
966 and David Allsopp)
967
968 - #13179: Fix evaluation of toplevel lets in classes containing
969 local opens
970 (Vincent Laviron, review by Hugo Heuzard, Nathanaëlle Courant
971 and Gabriel Scherer)
972
973 - #13543: Remove some String-Bytes conversion from the stdlib to behave better
974 with js_of_ocaml
975 (Hugo Heuzard, review by Gabriel Scherer)
976
977 ### Standard library:
978
979 - #12885: move Dynarray to an unboxed representation
980 (Gabriel Scherer, suggestions by Vincent Laviron,
981 review by Olivier Nicole and Simon Cruanes, Yann Leray, Alain Frisch)
982
983
984 - #12884: Add `Queue.drop`
985 (Léo Andrès, review by Nicolás Ojeda Bär and Gabriel Scherer)
986
987 - #13168: In Array.shuffle, clarify the code that validates the
988 result of the user-supplied function `rand`, and improve the
989 error message that is produced when this result is invalid.
990 (François Pottier, review by Florian Angeletti, Daniel Bünzli
991 and Gabriel Scherer)
992
993 - #12133: Expose support for printing substrings in Format
994 (Florian Angeletti, review by Daniel Bünzli, Gabriel Scherer
995 and Nicolás Ojeda Bär)
996
997 - #12869: Add List.take, List.drop, List.take_while and List.drop_while
998 (Kate Deplaix and Oscar Butler-Aldridge, review by Nicolás Ojeda Bär,
999 Craig Ferguson and Gabriel Scherer)
1000
1001 - #13047: Add Sys.poll_actions to (only) run pending runtime actions.
1002 (Nick Barnes, review by Gabriel Scherer, Guillaume Munch-Maccagnoni, and
1003 Vincent Laviron)
1004
1005 - #13144: Dynarray.{equal, compare}
1006 (Gabriel Scherer,
1007 review by Jeremy Yallop, Daniel Bünzli and Olivier Nicole,
1008 request by Olivier Nicole)
1009
1010 - #13171: expose `Domain.self_index : unit -> int` (a somewhat-dense
1011 indexing of currently-running domains) for advanced use-cases of
1012 domain-indexed concurrent data structures.
1013 (Gabriel Scherer,
1014 review by KC Sivaramakrishnan, Miod Vallat and Nicolás Ojeda Bär,
1015 report by Vesa Karvonen)
1016
1017 - #13197: Dynarray.blit, which allows to extend the destination
1018 dynarray (0 <= dst_pos <= dst_length).
1019 (Gabriel Scherer, report by Hazem ElMasry,
1020 review by Olivier Nicole, Hazem ElMasry and Nicolás Ojeda Bär)
1021
1022 * #13240: Add Uchar.seeded_hash, Change Uchar.hash implementation.
1023 Previously, Uchar.hash was aliased to Uchar.to_int. If you need that behavior,
1024 change your module instantiation from eg `module HT = Hashtbl.Make(Uchar)` to
1025 ```
1026 module HT = Hashtbl.Make(struct
1027 ...
1028 let hash = Uchar.to_int
1029 end)
1030 ```
1031 If the current implementation is desired, and you have a hashtable module `HT`
1032 (produced with the `Make` functor) in persistent storage, use `HT.rebuild` to
1033 ensure it doesn't break when reading from or writing to buckets.
1034 (Hazem ElMasry, review by Gabriel Scherer and Nicolás Ojeda Bär)
1035
1036 - #13318: Fix regression in GC alarms, and fix them for flambda.
1037 (Guillaume Munch-Maccagnoni, report by Benjamin Monate, review by
1038 Vincent Laviron and Gabriel Scherer)
1039
1040 - #13296: Add mem, memq, find_opt, find_index, find_map and find_mapi
1041 to Dynarray.
1042 (Jake H, review by Gabriel Scherer and Florian Angeletti)
1043
1044 ### Other libraries:
1045
1046 - #11996: release the dependency of dynlink on compilerlibs.
1047 (Sébastien Hinderer and Stephen Dolan, review by Damien Doligez and
1048 Hugo Heuzard)
1049
1050 - #13326: Implement Unix.O_APPEND on windows.
1051 (Romain Beauxis, review by Miod Vallat, Gabriel Scherer and Antonin Décimo)
1052
1053 ### Tools:
1054
1055 - #11716: ocamllex: mismatched parentheses and curly brackets are now caught
1056 by ocamllex, instead of causing invalid OCaml code to be generated.
1057 (Demi Marie Obenour, review by Damien Doligez and Xavier Leroy)
1058
1059 - #12904: Run the testsuite with ThreadSanitizer on a PR when label
1060 `run-thread-sanitizer` is added
1061 (Olivier Nicole, suggested by Sébastien Hinderer and David Allsopp, review by
1062 Gabriel Scherer)
1063
1064 * #13114: Support ocamldebug remote debugging over IPv6 on all
1065 platforms, and over Unix domain sockets on Windows.
1066 (Antonin Décimo, review by Gabriel Scherer and Miod Vallat)
1067
1068 - #13136: Rewrite GDB extensions and macros in debugger-agnostic Python, and add
1069 LLDB support for them.
1070 (Nick Barnes, review by Tim McGilchrist and Gabriel Scherer)
1071
1072 ### Toplevel:
1073
1074 - #12891: Improved styling for initial prompt
1075 (Florian Angeletti, review by Gabriel Scherer)
1076
1077 - #13053: Improved display of builtin types such as `_ list` when aliased.
1078 (Samuel Vivien, review by Florian Angeletti)
1079
1080 ### Manual and documentation:
1081
1082 - #13370: Document that that temporary variables holding GCd pointers must
1083 not be live across a GC.
1084 (Demi Marie Obenour)
1085
1086 - #12298: Manual: emphasize that Bigarray.int refers to an OCaml integer,
1087 which does not match the C int type.
1088 (Edwin Török, review by Florian Angeletti)
1089
1090 - #12868: Manual: simplify style colours of the post-processed manual and API
1091 HTML pages, and fix the search button icon
1092 (Yawar Amin, review by Simon Grondin, Gabriel Scherer, and Florian Angeletti)
1093
1094 - #12949: document OCaml release cycles and version strings in
1095 `release-info/introduction.md`.
1096 (Florian Angeletti, review by Fabrice Buoro, Kate Deplaix, Damien Doligez, and
1097 Gabriel Scherer)
1098
1099 - #12976: Manual: use webman/<version>/*.html and
1100 webman/<version>/api/ for OCaml.org HTML manual generation
1101 (Shakthi Kannan, review by Hannes Mehnert, and Florian Angeletti)
1102
1103 - #13045: Emphasize caution about behaviour of custom block finalizers.
1104 (Nick Barnes)
1105
1106 - #13216: document the new `caml_result` type in the FFI chapter of the manual.
1107 (Gabriel Scherer, review by Miod Vallat, Daniel Bünzli, Nick Barnes,
1108 Guillaume Munch-Maccagnoni and Antonin Décimo)
1109
1110 - #13287: stdlib/sys.mli: Update documentation on Sys.opaque_identity
1111 following #9412.
1112 (Matt Walker, review by Guillaume Munch-Maccagnoni and Vincent Laviron)
1113
1114 - #13295: Use syntax for deep effect handlers in the effect handlers manual
1115 page.
1116 (KC Sivaramakrishnan, review by Anil Madhavapeddy, Florian Angeletti and Miod
1117 Vallat)
1118
1119 - #13424: Fix `Gc.quick_stat` documentation to clarify that returned fields
1120 `live_words`, `live_blocks`, `free_words`, and `fragments` are not zero.
1121 (Jan Midtgaard, review by Damien Doligez and KC Sivaramakrishnan)
1122
1123 - #13440: Update documentation of `Gc.{control,get,set}` to reflect fields
1124 not currently supported on OCaml 5.
1125 (Jan Midtgaard, review by Gabriel Scherer)
1126
1127 - #13469, #13474, #13535: Document that [Hashtbl.create n] creates a hash table
1128 with a default minimal size, even if [n] is very small or negative.
1129 (Antonin Décimo, Nick Barnes, report by Nikolaus Huber and Jan Midtgaard,
1130 review by Florian Angeletti, Anil Madhavapeddy, Gabriel Scherer,
1131 and Miod Vallat)
1132
1133 - #13666: Rewrite parts of the example code around nested lists in Chapter 6
1134 (Polymorphism and its limitations -> Polymorphic recursion) giving the
1135 "depth" function [in the non-polymorphically-recursive part of the example]
1136 a much more sensible behavior; also fix a typo and some formatting.
1137 (Frank Steffahn, review by Florian Angeletti)
1138
1139 - #13668: Document the basic support for unicode identifiers and the switch to
1140 UTF-8 encoded Unicode text for OCaml source file
1141 (Florian Angeletti, review by Nicolás Ojeda Bär and Daniel Bünzli)
1142
1143 ### Compiler user-interface and warnings:
1144
1145 * #12084, #13669, #13673: Check link order when creating archive and when using
1146 ocamlopt.
1147 (Hugo Heuzard, review by Stefan Muenzel and Sébastien Hinderer)
1148
1149 - #12980: Explain type mismatch involving first-class modules by including
1150 the module level error message
1151 (Florian Angeletti, review by Vincent Laviron)
1152
1153 - #12985, #12988: Better error messages for partially applied functors.
1154 (Florian Angeletti, report by Arthur Wendling, review by Gabriel Scherer)
1155
1156 - #13034, #13260: Better error messages for mismatched function labels
1157 (Florian Angeletti, report by Daniel Bünzli, review by Gabriel Scherer and
1158 Samuel Vivien)
1159
1160 - #13051: Add a "Syntax error" to error messages for invalid package signatures.
1161 (Samuel Vivien, review by Gabriel Scherer)
1162
1163 - #13099: Fix erroneous loading of cmis for some module type errors.
1164 (Nick Roberts, review by Florian Angeletti)
1165
1166 - #13151, name conflicts explanation as a footnote
1167 (Florian Angeletti, review by Gabriel Scherer)
1168
1169 - #13228: Re-export Cmt2annot.{iterator,binary_part} which had become hidden
1170 since #11288 and broke ocamlbrowser.
1171 (David Allsopp, report by Jacques Garrigue, review by Sébastien Hinderer)
1172
1173 - #13251: Register printer for errors in Emitaux
1174 (Vincent Laviron, review by Miod Vallat and Florian Angeletti)
1175
1176 - #13255: Re-enable warning 34 for unused locally abstract types
1177 (Nick Roberts, review by Chris Casinghino and Florian Angeletti)
1178
1179 - #12182: Improve the type clash error message.
1180 For example, this message:
1181 This expression has type ...
1182 is changed into:
1183 The constant "42" has type ...
1184 (Jules Aguillon, review by Gabriel Scherer and Florian Angeletti)
1185
1186 - #13471: add `-keywords <version?+list>` flag to define the list of keywords
1187 recognized by the lexer, for instance `-keywords 5.2` disable the `effect`
1188 keyword.
1189 (Florian Angeletti, review by Gabriel Scherer)
1190
1191 ### Internal/compiler-libs changes:
1192
1193 - #13286: Distinguish unique identifiers `Shape.Uid.t` according to their
1194 provenance: either an implementation or an interface.
1195 (Ulysse Gérard, review by Florian Angeletti and Leo White)
1196
1197 - #13308: keep track of relations between declaration in the cmt files. This is
1198 useful information for external tools for navigation and analysis purposis.
1199 (Ulysse Gérard, Florian Angeletti, review by Florian Angeletti and Gabriel
1200 Scherer)
1201
1202
1203 - #11129, #11148: enforce that ppxs do not produce `parsetree`s with
1204 an empty list of universally quantified type variables
1205 (`. int -> int` instead of `'a . int -> int'`)
1206 (Florian Angeletti, report by Simmo Saan, review by Gabriel Scherer)
1207
1208 - #12534: document and refactor Matching.mk_failaction_pos
1209 (Gabriel Scherer, review by Vincent Laviron and Nick Roberts)
1210
1211 - #13076: change the handling of Match_failure exits in the pattern-matching
1212 compiler, to prepare for a complete fix for #7241
1213 (Gabriel Scherer, review by Thomas Refis and Nick Roberts)
1214
1215 - #12896: Simplify the compilation of custom bytecode runtimes by explicitly
1216 compiling the primitives file before calling the linker. Tidy-up both the
1217 generating code and the output itself for C code being generated by the
1218 bytecode linker in `-custom` and `-output-*` modes.
1219 (David Allsopp, Antonin Décimo and Samuel Hym, review by Vincent Laviron)
1220
1221 - #12932: Remove useless code in Typecore.type_label_exp (was a fix for #4862)
1222 (Jacques Garrigue, review by Gabriel Scherer)
1223
1224 - #12943: Make transient_expr.scope a bitfield, and use it to store marks.
1225 Marks are automatically allocated, and removed when leaving their scope.
1226 Falls back to using TransientTypeSet when marks are exhausted.
1227 (Jacques Garrigue and Takafumi Saikawa, review by Basile Clément)
1228
1229 - #12946: Make generalization automatic when leaving scope.
1230 As a result, the `Ctype.generalize*` and `Ctype.correct_levels` functions
1231 were removed. The latter is now called `Ctype.duplicate_type`.
1232 (Jacques Garrigue and Takafumi Saikawa, review by Richard Eisenberg)
1233
1234 - #12968: Attach location to constants in the parsetree
1235 (Jules Aguillon, review by Gabriel Scherer)
1236
1237 - #12959, #13055: Avoid an internal error on recursive module type inconsistency
1238 (Florian Angeletti, review by Jacques Garrigue and Gabriel Scherer)
1239
1240 - #13049: graphical debugging printer for types
1241 (Florian Angeletti, review by Gabriel Scherer)
1242
1243 - #13074, #13082, #13084: refactoring in the pattern-matching compiler
1244 (Gabriel Scherer, review by Thomas Refis, Vincent Laviron and Nick Roberts)
1245
1246 - #13067: rework volatile memory access rules under TSan to consider properly
1247 aligned smaller-than-register read operations as atomic, which gets rid of
1248 false positives on s390x
1249 (Miod Vallat, review by Fabrice Buoro)
1250
1251 - #13162: Use quoted strings to clarify code being generated.
1252 (Antonin Décimo, review by Miod Vallat and Gabriel Scherer)
1253
1254 - #13015: Emit floating-point literals in .rodata section on ELF arm64
1255 platforms (Linux, *BSD).
1256 (Miod Vallat, review by Nicolás Ojeda Bär)
1257
1258 - #13169, #13311: Introduce a document data type for compiler messages
1259 rather than relying on `Format.formatter -> unit` closures.
1260 (Florian Angeletti, review by Gabriel Scherer)
1261
1262 - #13193: Remove the unused env_init field from class blocks
1263 (Vincent Laviron, review by Jacques Garrigue)
1264
1265 - #13257: integrate MetaOCaml in the Menhir grammar to ease MetaOCaml
1266 maintenance. This is a purely internal change: there is no support
1267 in the lexer, so no change to the surface OCaml grammar.
1268 (Oleg Kiselyov, Gabriel Scherer and Florian Angeletti,
1269 review by Jeremy Yallop)
1270
1271 - #13289: Use C99 for loop to reduce the scope of the for loop iterator.
1272 (Antonin Décimo, review by Miod Vallat and Gabriel Scherer)
1273
1274 - #13336: compiler-libs, split the `Printtyp` in three to only keep
1275 "user-friendly" functions in the `Printtyp` module.
1276 (Florian Angeletti, review by Gabriel Scherer)
1277
1278 - #13361: split runtime/array.c functions to consistently expose
1279 uniform_array and floatarray versions, use floatarray versions
1280 in Float.Array.
1281 (Gabriel Scherer, review by Nicolás Ojeda Bär)
1282
1283 - #13507: A small refactoring to [free_vars] to make it a bit faster
1284 by not allocating a list when the list is not necessary.
1285 (Richard Eisenberg, review by Jacques Garrigue)
1286
1287 ### Build system:
1288
1289 - #12909: Reorganise how MKEXE_VIA_CC is built to make it correct for MSVC by
1290 grouping all the linker flags at the end of the C compiler commandline
1291 (David Allsopp and Samuel Hym, review by Nicolás Ojeda Bär)
1292
1293 - #12992, #13009: Check that flexlink can be executed only when building in a
1294 native windows environment.
1295 (Romain Beauxis, review by David Allsopp and Sébastien Hinderer)
1296
1297 - #12996: Only link with -lgcc_eh when available.
1298 (Romain Beauxis, review by David Allsopp and Miod Vallat)
1299
1300 * #13200: Do not use CFLAGS for linking.
1301 (Sébastien Hinderer, review by Gabriel Scherer, Antonin Décimo,
1302 Miod Vallat and Samuel Hym)
1303
1304 - #13201, #13244: Fix and speedup builds with TSan.
1305 (Sébastien Hinderer, review by Miod Vallat, Gabriel Scherer and
1306 Olivier Nicole)
1307
1308 * #12578, #12589, #13322, #13519: Use configured CFLAGS and CPPFLAGS *only*
1309 during the build of the compiler itself. Do not use them when
1310 compiling third-party C sources through the compiler. Flags for
1311 compiling third-party C sources can still be specified at configure
1312 time in the COMPILER_{BYTECODE,NATIVE}_{CFLAGS,CPPFLAGS}
1313 configuration variables.
1314 (Sébastien Hinderer, report by William Hu, review by David Allsopp)
1315
1316 - #13285: continue the merge of the sub-makefiles into the root
1317 Makefile started with #11243, #11248, #11268, #11420, #11675,
1318 #12198, #12321, #12586, #12616, #12706 and #13048.
1319 (Sébastien Hinderer, review by David Allsopp and Florian Angeletti)
1320
1321 ### Bug fixes:
1322
1323 - #12854: Add a test in the regression suite that flags the bug #12825.
1324 (Luc Maranget)
1325
1326 - #12888: fix printing of uncaught exceptions in `.cmo` files passed on the
1327 command-line of the toplevel.
1328 (Nicolás Ojeda Bär, review by Florian Angeletti, report by Daniel Bünzli)
1329
1330 - #12910, #12920: Fix an unsound interaction between first-class modules
1331 and polymorphic records by saving and restoring univar_pairs.
1332 (Stephen Dolan, review by Gabriel Scherer, report by Jeremy Yallop)
1333
1334 - #12994: Remove un-used and unsafe caml_drop_continuation
1335 (Tim McGilchrist, reviewed by Gabriel Scherer and Miod Vallat)
1336
1337 - #12963: Restore caml_runtime_parameters implementation. This primitive allows
1338 programs to query the runtime parameters supplied to an OCaml program.
1339 Implementation missing since OCaml 5.0.
1340 (Tim McGilchrist, reviewed by David Allsopp and Miod Vallat)
1341
1342 - #13012: parsing: Fix dropped attributes after a '-' or '+'
1343 The syntax '-(1 [@foo])' was incorrectly parsed as '-1'.
1344 (Jules Aguillon, reviewed by Gabriel Scherer, report by Gabriel Scherer)
1345
1346 * #13070: On Windows, when configured with bootstrapped flexdll, don't add
1347 +flexdll to the search path when -nostdlib is specified (which then means
1348 -L <path-to-flexdll> no longer gets passed to the system linker).
1349 (David Allsopp, review by Florian Angeletti)
1350
1351 - #13089: Fix bug in `runtime_events` library which could result in garbled
1352 output under Windows.
1353 (B. Szilvasy, review by Nicolás Ojeda Bär and Miod Vallat)
1354
1355 - #13088: A few type-checker behaviors look at a type to see if there are
1356 any labeled arguments in it. This sometimes required expansion, which
1357 could, in obscure scenarios, result in superfluous type errors.
1358 (Richard Eisenberg, review by Gabriel Scherer and Jacques Garrigue)
1359
1360 - #13103: FreeBSD/amd64: properly annotate .o files with non-executable stack
1361 notes (Konstantin Belousov, review by Nicolás Ojeda Bär)
1362
1363 - #13150: improve a transitive-closure computation algorithm in the flambda
1364 middle-end to avoid a compilation time blowup on Menhir-generated code
1365 (Florian Weimer, review by Gabriel Scherer and Pierre Chambart,
1366 report by Richard Jones)
1367
1368 - #13166: Fix a MinGW/MSVC Sys.rename regression on renaming a parent directory
1369 to an empty child directory.
1370 (Jan Midtgaard, review by Antonin Décimo, Sébastien Hinderer, and
1371 David Allsopp)
1372
1373 - #13185, #13192: Reject type-level module aliases on functor parameter
1374 inside signatures.
1375 (Jacques Garrigue, report by Richard Eisenberg, review by Florian Angeletti)
1376
1377 - #13170: Fix a bug that would result in some floating alerts `[@@@alert ...]`
1378 incorrectly triggering Warning 53.
1379 (Nicolás Ojeda Bär, review by Chris Casinghino and Florian Angeletti)
1380
1381 - #13203: Do not issue warning 53 if the compiler is stopping before attributes
1382 have been accurately marked.
1383 (Chris Casinghino, review by Florian Angeletti)
1384
1385 - #13207: Be sure to reload the register caching the exception handler in
1386 caml_c_call and caml_c_call_stack_args, as its value may have been changed
1387 if the OCaml stack is expanded during a callback.
1388 (Miod Vallat, report by Vesa Karvonen, review by Gabriel Scherer and
1389 Xavier Leroy)
1390
1391 - #13209: Fix configure test that checks whether `ar` supports `@FILE`
1392 arguments.
1393 (Nicolás Ojeda Bär, report by Boris D.)
1394
1395 - #13221: Compute more accurate instruction sizes for branch relocation on
1396 POWER.
1397 (Miod Vallat, review by Gabriel Scherer)
1398
1399 - #13252: Rework register assignment in the interpreter code on m68k on Linux,
1400 due to the %a5 register being used by Glibc.
1401 (Miod Vallat, report by Stéphane Glondu, review by Gabriel Scherer and
1402 Xavier Leroy)
1403
1404 - #13247: Disable lib_unix/kill test for MacOS AMD64 with TSan, linking
1405 to llvm bug report causing infinite signal loops.
1406 (Tim McGilchrist, review by Olivier Nicole, Miod Vallat, Sébastien Hinderer
1407 and Gabriel Scherer)
1408
1409 - #13234, #13267: Open runtime events file in read-write mode on armel
1410 (armv5) systems due to atomic operations limitations on that
1411 platform.
1412 (Stéphane Glondu, review by Miod Vallat and Vincent Laviron)
1413
1414 - #13273: Fix a call to test in configure.ac that was causing errors when
1415 LDFLAGS contains several words.
1416 (Stéphane Glondu, review by Miod Vallat)
1417
1418 - #13290: Fix uninitialized and out of bounds reads in runtime_events_consumer.c
1419 (Edwin Török, review by Miod Vallat and Antonin Décimo)
1420
1421 - #13306: An algorithm in the type-checker that checks two types for equality
1422 could sometimes, in theory, return the wrong answer. This patch fixes the
1423 oversight. No known program triggers the bug.
1424 (Richard Eisenberg, review by Florian Angeletti)
1425
1426 - #13400: Initialize th->signal_stack to avoid free of uninitialized data
1427 if the user calls caml_c_thread_unregister on the main thread.
1428 (Richard W.M. Jones, review by Guillaume Munch-Maccagnoni and
1429 Gabriel Scherer)
1430
1431 - #13140: POWER back-end: fix issue with call to `caml_call_realloc_stack`
1432 from a DLL
1433 (Xavier Leroy, review by Miod Vallat)
1434
1435 - #13263, #13560: fix printing true and false in toplevel and error
1436 messages (no more unexpected \#true)
1437 (Florian Angeletti, report by Samuel Vivien, review by Gabriel Scherer)
1438
1439 - #13388, #13540: raises an error message (and not an internal compiler error)
1440 when two local substitutions are incompatible (for instance `module type
1441 S:=sig end type t:=(module S)`)
1442 (Florian Angeletti, report by Nailen Matschke, review by Gabriel Scherer, and
1443 Leo White)
1444
1445 - #13408: Fix misplaced debug runtime assertion triggerable by a race
1446 between domain exit and backup thread
1447 (Miod Vallat and Gabriel Scherer, report by Jan Midtgaard)
1448
1449 - #13417: `Filename.quote_command`: fix handling of forward slashes in program
1450 path under Win32.
1451 (Nicolás Ojeda Bär, review by David Allsopp and Damien Doligez)
1452
1453 - #13501: Regression on mutually recursive types caused by #12180.
1454 Resuscitate Typedecl.update_type.
1455 (Jacques Garrigue and Takafumi Saikawa, review by Florian Angeletti, Richard
1456 Eisenberg and Gabriel Scherer)
1457
1458 - #13502: Fix misindexing related to `Gc.finalise_last` that could prevent
1459 finalisers from being run.
1460 (Nick Roberts, review by Mark Shinwell)
1461
1462 - #13495, #13514: Fix typechecker crash while typing objects
1463 (Jacques Garrigue, report by Nicolás Ojeda Bär, review by
1464 Nicolás Ojeda Bär, Gabriel Scherer, Stephen Dolan, Florian Angeletti)
1465
1466 - #13391, #13551: fix a printing bug with `-dsource` when using
1467 raw literal inside a locally abstract type constraint
1468 (i.e. `let f: type \#for. ... `)
1469 (Florian Angeletti, report by Nick Roberts, review by Richard Eisenberg)
1470
1471 - #13520: Fix compilation of native-code version of systhreads. Bytecode fields
1472 were being included in the thread descriptors.
1473 (David Allsopp, review by Sébastien Hinderer and Miod Vallat)
1474
1475 - #13541, #13591: Fix headers for C++ inclusion.
1476 (Antonin Décimo, review by Nick Barnes, report by Kate Deplaix)
1477
1478 - #13579, #13583: Unsoundness involving non-injective types + gadts
1479 (Jacques Garrigue, report by @v-gb,
1480 review by Richard Eisenberg and Florian Angeletti)
1481
1482 - #13598: Falsely triggered warning 56 [unreachable-case]
1483 This was caused by unproper protection of the retyping function.
1484 (Jacques Garrigue, report by Tõivo Leedjärv, review by Florian Angeletti)
1485
1486 - #13603, #13604: fix source printing in the presence of the escaped raw
1487 identifier `\#mod`.
1488 (Florian Angeletti, report by Chris Casinghino, review by Gabriel Scherer)
1489
1490 OCaml 5.2.0 (13 May 2024)
1491 -------------------------
1492
1493 (Changes that can break existing programs are marked with a "*")
1494
1495 ### Restored and new backends:
1496
1497 - #12276, #12601: native-code compilation for POWER (64 bits, little-endian)
1498 (Xavier Leroy, review by KC Sivaramakrishnan, Anil Madhavapeddy,
1499 and Stephen Dolan)
1500
1501 - #12667: extend the latter to POWER 64 bits, big-endian, ELFv2 ABI
1502 (A. Wilcox, review by Xavier Leroy)
1503
1504 ### Language features:
1505
1506 - #12295, #12568: Give `while true' a polymorphic type, similarly to
1507 `assert false'
1508 (Jeremy Yallop, review by Nicolás Ojeda Bär and Gabriel Scherer,
1509 suggestion by Rodolphe Lepigre and John Whitington)
1510
1511 - #12315: Use type annotations from arguments in let rec
1512 (Stephen Dolan, review by Gabriel Scherer)
1513
1514 - #11252, RFC 27: Support raw identifier syntax \#foo
1515 (Stephen Dolan, review by David Allsopp, Gabriel Scherer and Olivier Nicole)
1516
1517 - #12044: Add local module open syntax for types.
1518 ```
1519 module A = struct
1520 type t = int
1521 type r = unit
1522 type s = string
1523 end
1524
1525 type example = A.(t * r * s)
1526 ```
1527 (Alistair O'Brien, review by Gabriel Scherer, Nicolás Ojeda Bär
1528 and Florian Angeletti)
1529
1530 - #12456: Document the incompatibility between effects on the one
1531 hand, and `caml_callback` and asynchronous callbacks (signal
1532 handlers, finalisers, memprof callbacks...) on the other hand.
1533 (Guillaume Munch-Maccagnoni, review by KC Sivaramakrishnan)
1534
1535 - #12375: allow use of [@untagged] for all immediate types like char, bool,
1536 and variant with only constant constructors.
1537 (Christophe Raffalli, review by Gabriel Scherer)
1538
1539 * #12502: the compiler now normalizes the newline sequence \r\n to
1540 a single \n character during lexing, to guarantee that the semantics
1541 of newlines in string literals is not modified by Windows tools
1542 transforming \n into \r\n in source files.
1543 Warning 29 [eol-in-string] is not emitted anymore, as the normalization
1544 gives a more robust semantics to newlines in string literals.
1545 (Gabriel Scherer and Damien Doligez, review by Daniel Bünzli, David
1546 Allsopp, Andreas Rossberg, Xavier Leroy, report by Andreas Rossberg)
1547
1548 - #13130: minor fixes to pprintast for raw identifiers and local module open
1549 syntax for types.
1550 (Chet Murthy, review by Gabriel Scherer)
1551
1552 ### Type system:
1553
1554 - #12313, #11799: Do not re-build as-pattern type when a ground type annotation
1555 is given. This allows to work around problems with GADTs in as-patterns.
1556 (Jacques Garrigue, report by Leo White, review by Gabriel Scherer)
1557
1558 ### Runtime system:
1559
1560 - #12193: Re-introduce GC compaction for shared pools
1561 Adds a parallel compactor for the shared pools (which contain major heap
1562 blocks sized less than 128 words). Explicit only for now, on calls to
1563 `Gc.compact`.
1564 (Sadiq Jaffer, Nick Barnes, review by Anil Madhavapeddy, Damien Doligez,
1565 David Allsopp, Miod Vallat, Artem Pianykh, Stephen Dolan, Mark Shinwell
1566 and KC Sivaramakrishnan)
1567
1568 - #12850: Update Gc.quick_stat data at the end of major cycles and compaction
1569 This PR adds an additional caml_collect_gc_stats_sample_stw to the major heap
1570 cycling stw. This means that Gc.quick_stat now actually reflects the state of
1571 the heap after a major cycle or compaction.
1572 (Sadiq Jaffer, review by Miod Vallat and Gabriel Scherer)
1573
1574 - #12859: Ensure Gc.compact does a full major before the compactor runs
1575 (Sadiq Jaffer, review by Leo White, Mark Shinwell, Gabriel Scherer,
1576 Josh Berdine, David Allsopp and KC Sivaramakrishnan)
1577
1578 - #10111: Increase the detail of location information for debugging events to
1579 allow the end line number and character offset to be reported.
1580 (David Allsopp, review by Nick Barnes, Enguerrand Decorne and Stephen Dolan)
1581
1582 - #10403, #12202: introduce `caml_ext_table_add_noexc` that does not
1583 raise `Out_of_memory` exceptions and use it inside the blocking sections
1584 of `caml_read_directory`. Also, check for overflows in ext table sizes.
1585 (Xavier Leroy, report by Arseniy Alekseyev, review by Gabriel Scherer)
1586
1587 - #11332, #12702: make sure `Bool_val(v)` has type `bool` in C++
1588 (Xavier Leroy, report by ygrek, review by Gabriel Scherer)
1589
1590 - #12772, #12787: Avoid using _Bool in public headers for the sake of C++
1591 compatibility
1592 (Guillaume Munch-Maccagnoni, report by KC Sivaramakrishnan, review
1593 by Xavier Leroy and KC Sivaramakrishnan)
1594
1595 - #12223: Constify constructors and flags tables in C code. Now these
1596 tables will go in the readonly segment, where they belong.
1597 (Antonin Décimo, review by Gabriel Scherer and Xavier Leroy)
1598
1599 - #12234: make instrumented time calculation more thread-safe on macOS.
1600 (Anil Madhavapeddy, review by Daniel Bünzli and Xavier Leroy)
1601
1602 - #12235, #12468: introduce and use the `CAMLnoret` macro as
1603 a lighter alternative to `CAMLnoreturn_start` / `CAMLnoreturn_end`.
1604 Implement it so as to conform with C11, C23, C++11, C++17.
1605 (Xavier Leroy and Dhruv Maroo, with help from Antonin Décimo, review by
1606 Gabriel Scherer and David Allsopp)
1607
1608 - #12275: caml/stack.h: more abstract macros to describe OCaml stacks and
1609 how to traverse them, supporting more stack layouts.
1610 (Xavier Leroy, review by KC Sivaramakrishnan and Fabrice Buoro)
1611
1612 - #12268: deliver `Out_of_memory` exception if domain creation fails
1613 due to memory resource exhaustion. It was previous always a `Failure`.
1614 (Anil Madhavapeddy, review by David Allsopp)
1615
1616 - #12300, #12314: Discard out_channel buffered data on permanent I/O error
1617 (Xavier Leroy, report by Török Edwin, review by Anil Madhavapeddy
1618 and Nicolás Ojeda Bär)
1619
1620 - #11386: Simplifications and fixes to multicore systhreads implementation.
1621 (Guillaume Munch-Maccagnoni, review by Anil Madhavapeddy and KC
1622 Sivaramakrishnan)
1623
1624 - #12875, #12879, #12882: Execute preemptive systhread switching as a
1625 delayed pending action. This ensures that one can reason within the
1626 FFI that no mutation happens on the same domain when allocating on
1627 the OCaml heap from C, consistently with OCaml 4. This also fixes
1628 further bugs with the multicore systhreads implementation.
1629 (Guillaume Munch-Maccagnoni, bug reports and suggestion by Mark
1630 Shinwell, review by Nick Barnes and Stephen Dolan)
1631
1632 - #12408: `Domain.spawn` no longer leaks its functional argument for
1633 the whole duration of the children domain lifetime.
1634 (Guillaume Munch-Maccagnoni, review by Gabriel Scherer)
1635
1636 - #12409: Fix unsafety and deadlocks should an asynchronous exception
1637 arise at specific locations during domain creation and shutdown.
1638 (Guillaume Munch-Maccagnoni, review by Gabriel Scherer)
1639
1640 - #12114: Add ThreadSanitizer support
1641 (Fabrice Buoro and Olivier Nicole, based on an initial work by Anmol Sahoo,
1642 review by Damien Doligez, Sébastien Hinderer, Jacques-Henri Jourdan, Luc
1643 Maranget, Guillaume Munch-Maccagnoni, Gabriel Scherer)
1644
1645 - #11911, #12381: Restore statmemprof functionality in part, with
1646 some API changes in Gc.Memprof.
1647 (Nick Barnes, review by Jacques-Henri Jourdan
1648 and Guillaume Munch-Maccagnoni).
1649
1650 - #12430: Simplify dynamic bytecode loading in Meta.reify_bytecode
1651 (Stephen Dolan, review by Sébastien Hinderer, Vincent Laviron and Xavier
1652 Leroy)
1653
1654 - #12489: Fix an error-handling bug in caml_alloc_sprintf
1655 (Stephen Dolan, report by Chris Casinghino, review by Jeremy Yallop
1656 and Xavier Leroy)
1657
1658 - #11307: Finish adapting the implementation of asynchronous actions for
1659 multicore: soundness, liveness, and performance issues.
1660 Do not crash if a signal handler is called from an unregistered C
1661 thread, and other possible soundness issues. Prevent issues where join
1662 on other domains could make the toplevel unresponsible to Ctrl-C. Avoid
1663 needless repeated polling in C code when callbacks cannot run
1664 immediately.
1665 (Guillaume Munch-Maccagnoni, review by Enguerrand Decorne, Xavier
1666 Leroy, and KC Sivaramakrishnan)
1667
1668 - #12634: Simplify TSan backtrace bookkeeping upon raise
1669 (Olivier Nicole and Fabrice Buoro, review by Gabriel Scherer)
1670
1671 * #12686: Some primitives had the wrong types to be callable from the bytecode
1672 interpreter. Either fix their types, mark them as `CAMLexport` instead of
1673 `CAMLprim`, or remove them entirely if no longer used.
1674 (Xavier Leroy, review by David Allsopp)
1675
1676 - #12700, continuing #11763 and trying to address #12660:
1677 Use the correct types for primitives when generating the table of primitives
1678 used by ocamlrun.
1679 (Xavier Leroy, motivation, review and improvements by Antonin Décimo)
1680
1681 - #12345, #12710: Fix issues with finaliser orphaning at domain termination
1682 (KC Sivaramakrishnan, report by Gabriel Scherer, review by Gabriel Scherer,
1683 Sadiq Jaffer and Fabrice Buoro)
1684
1685 - #12599: Refactor Dynlink startup to avoid parsing bytecode sections twice
1686 (Stephen Dolan, review by David Allsopp, Hugo Heuzard, Damien Doligez and
1687 Xavier Leroy)
1688
1689 - #12678, #12898: free channel buffers on close rather than on finalization
1690 (Damien Doligez, review by Jan Midtgaard and Gabriel Scherer, report
1691 by Jan Midtgaard)
1692
1693 - #12681: Fix TSan false positives due to volatile write handling
1694 (Olivier Nicole, Fabrice Buoro and Anmol Sahoo, review by Luc Maranget,
1695 Gabriel Scherer, Hernan Ponce de Leon and Xavier Leroy)
1696
1697 - #12743: Use pthread_sigmask instead of sigprocmask
1698 Updates usage of sigprocmask to pthread_sigmask in otherlibs/unix.
1699 (Max Slater, review by Miod Vallat and Xavier Leroy)
1700
1701 - #12769: Unify MSVC and MinGW-w64 code paths, by always using WinAPI
1702 directly.
1703 (David Allsopp, Antonin Décimo, and Samuel Hym, review by Nicolás Ojeda Bär)
1704
1705 - #11911, #12382, #12383: Restore statmemprof functionality in part
1706 (backtrace buffers, per-thread and per-domain data structures,
1707 GC/allocation interface). (Nick Barnes, review by Gabriel Scherer,
1708 Fabrice Buoro, Sadiq Jaffer, Guillaume Munch-Maccagnoni, and
1709 Jacques-Henri Jourdan).
1710
1711 - #12735: Store both ends of the stack chain in continuations
1712 (Leo White, review by Miod Vallat and KC Sivaramakrishnan)
1713
1714 - #12746: Simplify and clean up TSan annotations
1715 (Olivier Nicole, review by Miod Vallat and Fabrice Buoro)
1716
1717 - #12809: Add ThreadSanitizer support to FreeBSD/amd64
1718 (Miod Vallat, review by Gabriel Scherer)
1719
1720 - #12810: Port ThreadSanitizer support to Linux and macOS on arm64
1721 (Miod Vallat, review by Tim McGilchrist)
1722
1723 - #12811: Define and use the CAMLthread_local macro for TLS variables.
1724 (Antonin Décimo and Samuel Hym, review by Miod Vallat and Xavier Leroy)
1725
1726 - #12814: More detailed failure messages from `input_value` and `Marshal.from_*`
1727 (Xavier Leroy, review by Stephen Dolan and Anil Madhavapeddy)
1728
1729 - #12815: Correctly format multi-line locations in exception backtraces, in the
1730 style that the compiler driver uses.
1731 (David Allsopp, review by Gabriel Scherer)
1732
1733 - #12773, #12830, #12834: Rewrite `caml_c_thread_(un)register` to fix
1734 various bugs.
1735 (Guillaume Munch-Maccagnoni, reported by Miod Vallat, suggested by
1736 Hari Hara Naveen S, reviewed by Fabrice Buoro, Gabriel Scherer and
1737 Miod Vallat)
1738
1739 - #12876: Port ThreadSanitizer support to Linux on POWER
1740 (Miod Vallat, review by Tim McGilchrist)
1741
1742 - #12886: Reinitialize IO mutexes after fork
1743 (Max Slater, review by Guillaume Munch-Maccagnoni and Xavier Leroy)
1744
1745 - #12907: Port ThreadSanitizer support to Linux on RiscV
1746 (Miod Vallat, review by Nicolás Ojeda Bär and Fabrice Buoro)
1747
1748 - #12915: Port ThreadSanitizer support to Linux on s390x
1749 (Miod Vallat, review by Tim McGilchrist)
1750
1751 - #12934: Fix data races between marking and sweeping functions
1752 (Olivier Nicole, suggested by Stephen Dolan, review by Gabriel Scherer,
1753 Miod Vallat and Damien Doligez)
1754
1755 ### Code generation and optimizations:
1756
1757 - #11239: on x86-64 and RISC-V, reduce alignment of OCaml stacks from 16 to 8.
1758 This reduces stack usage. It's only C stacks that require 16-alignment.
1759 (Xavier Leroy, review by Gabriel Scherer and Stephen Dolan)
1760
1761 - #12311: on POWER, 32-bit FP numbers stored in memory (e.g. in bigarrays)
1762 were not correctly rounded sometimes.
1763 (Xavier Leroy, review by Anil Madhavapeddy and Tim McGilchrist)
1764
1765 - #12551, #12608, #12782, #12596: Overhaul of recursive value compilation.
1766 Non-function recursive bindings are now forbidden from Lambda onwards,
1767 and compiled using a new Value_rec_compiler module.
1768 (Vincent Laviron and Lunia Ayanides, review by Gabriel Scherer,
1769 Stefan Muenzel and Nathanaëlle Courant)
1770
1771 - #1809, #12181: rewrite `compare x y op 0` to `x op y` when values are integers
1772 (Xavier Clerc, Stefan Muenzel, review by Gabriel Scherer and Vincent Laviron)
1773
1774 - #12825: disable common subexpression elimination for atomic loads... again.
1775 (Gabriel Scherer, review by KC Sivaramakrishnan, Xavier Leroy
1776 and Vincent Laviron, report by Vesa Karvonen)
1777
1778 ### Standard library:
1779
1780 - #12716: Add `Format.pp_print_nothing` function.
1781 (Léo Andrès, review by Gabriel Scherer and Nicolás Ojeda Bär)
1782
1783 - #11563: Add the Dynarray module to the stdlib. Dynamic arrays are
1784 arrays whose length can be changed by adding or removing elements at
1785 the end, similar to 'vectors' in C++ or Rust.
1786 (Gabriel Scherer, Simon Cruanes and Florian Angeletti, review by
1787 Daniel Bünzli, Guillaume Munch-Maccagnoni, Clément Allain,
1788 Damien Doligez, Wiktor Kuchta and Pieter Goetschalckx)
1789
1790 * #6732, #12423: Make Buffer.add_substitute surjective and fix its
1791 documentation.
1792 (Damien Doligez, review by Antonin Décimo)
1793
1794 * #10775, #12499: Half-precision floating-point elements in Bigarray.
1795 (Anton Yabchinskiy, review by Xavier Leroy and Nicolás Ojeda Bär)
1796
1797 - #11517, #12477: Expose pp_infinity in interface of the format module, and
1798 check that margin is less than pp_infinity when setting or checking geometry.
1799 (Janith Petangoda, reported by Simmo Saan, reviewed by Florian Angeletti,
1800 Simmo Saan, Josh Berdine and Gabriel Scherer)
1801
1802 - #12217: Add `Array.shuffle`.
1803 (Daniel Bünzli, review by Nicolás Ojeda Bär, David Allsopp and Alain Frisch)
1804
1805 - #12212: Add cache-aligned constructor for atomics. The patch ensures that
1806 all allocations (of the right size) in the shared heap are aligned.
1807 (Bartosz Modelski with Gabriel Scherer, Guillaume Munch-Maccagnoni,
1808 Xavier Leroy, review by Alain Frisch, Anil Madhavapeddy, Gabriel Scherer,
1809 Guillaume Munch-Maccagnoni, KC Sivaramakrishnan, Stefan Muenzel,
1810 Xavier Leroy)
1811
1812 - #12307: Add BLAKE2b hashing and an MD5 submodule to the Digest module.
1813 (Xavier Leroy, review by Olivier Nicole, Gabriel Scherer, Wiktor Kuchta,
1814 Daniel Bünzli, David Allsopp)
1815
1816 - #12365: Add In_channel.input_bigarray, In_channel.really_input_bigarray,
1817 Out_channel.output_bigarray, Unix.read_bigarray, Unix.write_bigarray,
1818 Unix.single_write_bigarray.
1819 (Nicolás Ojeda Bär, review by Jeremy Yallop, Xavier Leroy, Gabriel Scherer,
1820 David Allsopp)
1821
1822 - #12455: Add `Array.init_matrix`, `Float.Array.make_matrix`,
1823 `Float.Array.init_matrix`.
1824 (Glen Mével, review by Xavier Leroy, Gabriel Scherer, Jeremy Yallop,
1825 Nicolas Ojeda Bar)
1826
1827 * #12455: `Array.make_matrix dimx dimy f` now raises `Invalid_argument`
1828 when `dimx = 0 && dimy < 0` This was already specified but not enforced.
1829 (Glen Mével, report by Jeremy Yallop, review by Nicolás Ojeda Bär)
1830
1831 - #12459: Add `Random.int_in_range`, `Random.int32_in_range`,
1832 `Random.int64_in_range`, `Random.nativeint_in_range`,
1833 and their counterpart in `Random.State`.
1834 (Glen Mével and Xavier Leroy, review by Gabriel Scherer, Xavier Leroy,
1835 Florian Angeletti)
1836
1837 - #12459: `Random`: restore compatibility between 32-bit integers (JavaScript)
1838 and 63-bit integers (64-bit OCaml).
1839 For `Random.full_int` this was guaranteed in 4.14 but wrongly removed in 5.0.
1840 (Xavier Leroy, review by Glen Mével)
1841
1842 - #12511: Minor performance improvements and cleanups in the implementation
1843 of modules Int32, Int64, and Nativeint
1844 (Xavier Leroy, review by Gabriel Scherer and Daniel Bünzli)
1845
1846 - #12558: Adapt GC alarms for multicore and fix their documentation.
1847 (Guillaume Munch-Maccagnoni, review by KC Sivaramakrishnan
1848 and Gabriel Scherer)
1849
1850 - #12625: Remove the Closure module from Obj
1851 (Vincent Laviron, review by Xavier Leroy)
1852
1853 - #12758, #12998: Remove the `Marshal.Compression` flag to the
1854 `Marshal.to_*` functions. The compilers are still able to use
1855 ZSTD compression for compilation artefacts.
1856 This is a forward port and clean-up of the emergency fix that was introduced
1857 in OCaml 5.1.1 by #12734.
1858 (Xavier Leroy, review by Damien Doligez)
1859
1860 - #12784: Fix computation of minor-heap allocation in Gc.counters()
1861 and Gc.allocated_bytes(). (Nick Barnes, review by Gabriel Scherer)
1862
1863 - #12770: Add `Fun.compose`.
1864 (Justin Frank, review by Nicolás Ojeda Bär, Daniel Bünzli and Jeremy Yallop)
1865
1866 - #12845: Add `{In,Out}_channel.is_binary_mode` as the dual of
1867 `set_binary_mode`. This function was previously only available in the internal
1868 C API.
1869 (David Allsopp, review by Nicolás Ojeda Bär and Xavier Leroy)
1870
1871 ### Other libraries:
1872
1873 - #12213: Dynlink library, improve legibility of error messages
1874 (Samuel Hym, review by Gabriel Scherer and Nicolás Ojeda Bär)
1875
1876 * #12686: Runtime_events library, C API: define
1877 `caml_runtime_events_{start,pause,resume}` as returning `void`
1878 instead of `value`.
1879 (Xavier Leroy, review by David Allsopp)
1880
1881 ### Tools:
1882
1883 - #12340: testsuite: collect known issues with current -short-paths
1884 implementation for existential types
1885 (Florian Angeletti, Samuel Hym, review by Florian Angeletti and Thomas Refis)
1886
1887 - #12147: ocamllex: Allow carriage returns at the end of line directives.
1888 (SeungCheol Jung, review by Nicolás Ojeda Bär)
1889
1890 - #12260: Fix invalid_argument on some external or module aliases in ocamlnat
1891 (Fabian Hemmer, review by Vincent Laviron)
1892
1893 - #12185: New script language for ocamltest.
1894 (Damien Doligez with Florian Angeletti, Sébastien Hinderer, Gabriel Scherer,
1895 review by Sébastien Hinderer and Gabriel Scherer)
1896
1897 - #12371: ocamltest: fix recursive expansion of variables.
1898 (Antonin Décimo, Damien Doligez, review by Sébastien Hinderer,
1899 Damien Doligez, Gabriel Scherer, and Xavier Leroy)
1900
1901 * #12497, #12613: Make ocamlc/ocamlopt fail with an error when no
1902 input files are specified to build an executable.
1903 (Antonin Décimo, review by Sébastien Hinderer)
1904
1905 - #12576: ocamldep: various refactors.
1906 (Antonin Décimo, review by Florian Angeletti, Gabriel Scherer, and Léo Andrès)
1907
1908 - #12615: ocamldoc: get rid of the odoc_literate and odoc_todo generators.
1909 (Sébastien Hinderer, review by Gabriel Scherer and Florian Angeletti)
1910
1911 - #12624: Use $XDG_CONFIG_DIRS in addition to $XDG_CONFIG_HOME when searching
1912 for init.ml and use this to extend init.ml support to the toplevel when
1913 running on Windows.
1914 (David Allsopp, report by Jonah Beckford, review by Nicolás Ojeda Bär and
1915 Antonin Décimo)
1916
1917 - #12688: Setting the env variable `NO_COLOR` with an empty value no longer
1918 has effects. Previously, setting `NO_COLOR` with any value, including
1919 the empty value, would disable colors (unless `OCAML_COLOR` is also set).
1920 After this change, the user must set `NO_COLOR` with an non-empty value
1921 to disable colors. This reflects a specification clarification/change
1922 from the upstream website at https://no-color.org.
1923 (Favonia, review by Gabriel Scherer)
1924
1925 - #12744: ocamltest: run tests in recursive subdirs more eagerly
1926 (Nick Roberts, review by Nicolás Ojeda Bär)
1927
1928 - #12901, 12908: ocamllex: add overflow checks to prevent generating incorrect
1929 lexers; use unsigned numbers in the table encoding when possible.
1930 (Vincent Laviron, report by Edwin Török, review by Xavier Leroy)
1931
1932 ### Manual and documentation:
1933
1934 - #12338: clarification of the documentation of process related function in
1935 the unix module regarding the first element of args and shell's pid.
1936 (Christophe Raffalli, review by Florian Angeletti)
1937
1938 - #12473: Document in runtime/memory.c our current understanding of
1939 accesses to the OCaml heap from the C runtime code -- the problem
1940 of hybrid programs mixing two memory models.
1941 (Gabriel Scherer and Guillaume Munch-Maccagnoni, review by Olivier
1942 Nicole and Xavier Leroy)
1943
1944 - #12694: Document in runtime/tsan.c the TSan instrumentation choices and the
1945 consequences with regard to the memory model.
1946 (Olivier Nicole, review by Miod Vallat, Gabriel Scherer, Guillaume
1947 Munch-Maccagnoni and Fabrice Buoro)
1948
1949 - #12802: Add manual chapter about ThreadSanitizer support
1950 (Olivier Nicole, review by Miod Vallat, Sebastien Hinderer, Fabrice Buoro,
1951 Gabriel Scherer and KC Sivaramakrishnan)
1952
1953 - #12819: Clarify which runtime interactions are allowed in custom ops
1954 (Basile Clément, review by Guillaume Munch-Maccagnoni and Xavier Leroy)
1955
1956 - #12840: manual: update runtime tracing chapter for custom events (ex #12335)
1957 (Lucas Pluvinage, Sadiq Jaffer and Olivier Nicole, review by Gabriel Scherer,
1958 David Allsopp, Tim McGilchrist and Thomas Leonard)
1959
1960 - #13066, update OCAMLRUNPARAM documentation for the stack size parameter l
1961 (Florian Angeletti, review by Nicolás Ojeda Bär, Tim McGilchrist, and
1962 Miod Vallat)
1963
1964 - #13078: update Format tutorial on structural boxes to mention alignment
1965 questions.
1966 (Edwin Török, review by Florian Angeletti)
1967
1968 - #13092: document the existence of the `[@@poll error]` built-in attribute
1969 (Florian Angeletti, review by Gabriel Scherer)
1970
1971 ### Compiler user-interface and warnings:
1972
1973 * #10613, #12405: Simplify the values used for the system variable (`system:` in
1974 `ocamlopt -config` or the `Config.system` constant). In particular, s390x and
1975 ppc64 now report "linux" instead of "elf"; all variants of 32-bit ARM on Linux
1976 now report "linux"; OpenBSD now reports "openbsd" instead of "bsd" for 32-bit
1977 ARM; FreeBSD, NetBSD and OpenBSD now report the same value for both x86_64 and
1978 x86_32; x86_32 systems matching *bsd but not freebsd*, netbsd* or openbsd*
1979 are no longer identified (as on x86_64); x86_32 Linux now reports "linux"
1980 instead of "linux_elf".
1981 (David Allsopp, request by Kate Deplaix, review by Sébastien Hinderer and
1982 Xavier Leroy)
1983
1984 - #11989, #12246, RFC 31: New flag, -H, to allow for transitive dependencies
1985 without including them in the initial environment.
1986 (Chris Casinghino, François Bobot, and Gabriel Scherer, review by Leo White
1987 and Stefan Muenzel, RFC by François Bobot)
1988
1989 - #12247: configure: --disable-ocamldebug can now be used instead
1990 of --disable-debugger (which remains available for compatibility)
1991 (Gabriel Scherer, review by Damien Doligez and Sébastien Hinderer)
1992
1993 - #12199: improve the error message for non-overriding `inherit!`
1994 (Florian Angeletti, review by Jules Aguillon)
1995
1996 - #12210: uniform style for inline code in compiler messages
1997 (Florian Angeletti, review by Gabriel Scherer)
1998
1999 * #12278, #:12325: Remove the OCAML_FLEXLINK environment variable from the
2000 compiler drivers. This environment variable was previously used as part of the
2001 FlexDLL bootstrap procedure and existed solely for that purpose. Its removal
2002 greatly simplifies both the build system and testsuite machinery.
2003 (David Allsopp, review by Sébastien Hinderer)
2004
2005 - #12347: error messages: always report missing polyvariant tags
2006 (Florian Angeletti, report by Tianbo Hao, review by Gabriel Scherer)
2007
2008 - #12224, specialized error message when trying to apply non-functor
2009 module (e.g `module M = Int(Int)`)
2010 (Florian Angeletti, review by Gabriel Scherer)
2011
2012 - #12451: Warning 53 (misplaced attributes) now works for all attributes.
2013 (Chris Casinghino, review by Florian Angeletti)
2014
2015 - #12622: Give hints about existential types appearing in error messages
2016 (Leo White, review by Gabriel Scherer and Florian Angeletti)
2017
2018 - #12671: When a class type parameter or class parameter does not match,
2019 identify which parameter in the error message, instead of saying
2020 "A type parameter" or "A parameter".
2021 (Stefan Muenzel, review by Gabriel Scherer)
2022
2023 - #12679: Add more detail to the error message and manual in case of
2024 invalid module type substitutions.
2025 (Stefan Muenzel, review by Gabriel Scherer and Florian Angeletti)
2026
2027 - #12750: Display the command executed to extract primitives in
2028 `ocamlc -verbose`.
2029 (David Allsopp, review by Nicolás Ojeda Bär)
2030
2031 - #12777: Add details about the actual and expected method types to the method
2032 mismatch error messages.
2033 (Javier Chávarri, review by Gabriel Scherer and Florian Angeletti)
2034
2035 * #12942: Fix an line ordering in some module inclusion error messages
2036 (Nick Roberts, review by Florian Angeletti, report by Carl Eastlund)
2037
2038 ### Internal/compiler-libs changes:
2039
2040 - #12639: parsing: Attach a location to the RHS of Ptyp_alias
2041 and improve the 'alias type mismatch' error message.
2042 (Jules Aguillon, review by Florian Angeletti)
2043
2044 - #12447: Remove 32-bit targets from X86_proc.system
2045 (Masanori Ogino, review by David Allsopp)
2046
2047 - #12216, #12248: Prevent reordering of atomic loads during instruction
2048 scheduling. This is for reference, as instruction scheduling is currently
2049 unused in OCaml 5.
2050 (Xavier Leroy, report by Luc Maranget and KC Sivaramakrishnan,
2051 review by Nicolás Ojeda Bär)
2052
2053 - #12025: Split Typecore.unify_pat_types into two
2054 to avoid unnecessary references to the environment in type_pat
2055 (Jacques Garrigue and Takafumi Saikawa, review by Gabriel Scherer)
2056
2057 - #12031: Use dedicated types to represent names of compilation units
2058 and predefined exceptions in CMO files.
2059 (Sébastien Hinderer, review by Florian Angeletti, Thomas Refis,
2060 Gabriel Scherer, Vincent Laviron, Pierre Chambart, Luke Maurer,
2061 Hugo Heuzard, Xavier Leroy and Damien Doligez)
2062
2063 - #12109: Pack parameters to unification in unification_environment
2064 (Takafumi Saikawa and Jacques Garrigue, review by Richard Eisenberg)
2065
2066 - #12331, #12361: Pack the unification data for pattern checking in Typecore
2067 (Takafumi Saikawa and Jacques Garrigue,
2068 review by Gabriel Scherer, Thomas Refis and Florian Angeletti)
2069
2070 - #12229: Remove global mutable state for typechecking patterns
2071 in Typecore in favor of local mutable state.
2072 (Nick Roberts, review by Takafumi Saikawa)
2073
2074 - #12236, #12386, #12391, #12496, #12673: Use syntax as sole determiner of arity
2075 This changes function arity to be based solely on the source program's
2076 parsetree. Previously, the heuristic for arity had more subtle heuristics
2077 that involved type information about patterns. Function arity is important
2078 because it determines when a pattern match's effects run and is an input
2079 into the fast path for function application.
2080
2081 This change affects tooling: it changes the function constructs in parsetree
2082 and typedtree.
2083
2084 See https://github.com/ocaml/RFCs/pull/32 for the original RFC.
2085
2086 (Nick Roberts; review by Richard Eisenberg, Leo White, and Gabriel Scherer;
2087 RFC by Stephen Dolan)
2088
2089 - #12542: Minor bugfix to #12236: restore dropped call to `instance`
2090 (Nick Roberts, review by Jacques Garrigue)
2091
2092 - #12242: Move the computation of stack frame parameters to a separate
2093 `Stackframe` module, and save the parameters in the results of the
2094 `Linearize` pass
2095 (Xavier Leroy, review by KC Sivaramakrishnan and Mark Shinwell)
2096
2097 - #12442: document jump summaries in the pattern-matching compiler
2098 (Gabriel Scherer and Thomas Refis, review by Florian Angeletti
2099 and Vincent Laviron)
2100
2101 - #12446, #12792: remove the hooks machinery around channel locking
2102 in runtime/io.c
2103 (Gabriel Scherer, review by Xavier Leroy)
2104
2105 - #12389, #12544, #12984, #12987: centralize the handling of metadata for
2106 compilation units and artifacts in preparation for better unicode support for
2107 OCaml source files.
2108 (Florian Angeletti, review by Vincent Laviron and Gabriel Scherer)
2109
2110 - #12532, #12553: improve readability of the pattern-matching debug output
2111 (Gabriel Scherer, review by Thomas Refis)
2112
2113 - #12537: Use C11/C++11 standard static assertion.
2114 (Antonin Décimo, review by Sebastien Hinderer, Xavier Leroy,
2115 and KC Sivaramakrishnan)
2116
2117 - #12169: runtime: document and enforce naming conventions around STW sections.
2118 (Gabriel Scherer, review by Enguerrand Decorne, Miod Vallat, B. Szilvasy
2119 and Nick Barnes, report by KC Sivaramakrishnan)
2120
2121 - #12669 : Clean up some global state handling in schedgen
2122 (Stefan Muenzel, review by Miod Vallat and Gabriel Scherer)
2123
2124 - #12640: Make the module separator used in symbol names configurable
2125 (Miod Vallat, review by Hugo Heuzard and Xavier Leroy)
2126
2127 - #12691 : Clean up Ctype.expand_abbrev_gen and
2128 rename Env.add_local_type to add_local_constraint
2129 (Takafumi Saikawa and Jacques Garrigue, review by Florian Angeletti)
2130
2131 - #12786 : Clean up the algorithm of Ctype.limited_generalize
2132 (Takafumi Saikawa and Jacques Garrigue, review by Gabriel Scherer)
2133
2134 - #10691: Ast_mapper, Ast_iterator: add functions directive_argument,
2135 toplevel_directive and toplevel_phrase.
2136 (Guillaume Petiot, review by Gabriel Scherer and Kate Deplaix)
2137
2138 - #12764: Move all installable headers in `caml/` sub-directories.
2139 (Antonin Décimo, review by Gabriel Scherer and David Allsopp)
2140
2141 - #12508 : Add compiler-side support for project-wide occurrences in Merlin, by
2142 generating index tables of all identifier occurrences. This extra data in .cmt
2143 files is only added when the new flag -bin-annot-occurrences is passed.
2144 (Ulysse Gérard, Nathanaëlle Courant, suggestions by Gabriel Scherer and Thomas
2145 Refis, review by Florian Angeletti, Gabriel Scherer and Thomas Refis)
2146
2147 - #12914: Slightly change the s390x assembly dialect in order to build with
2148 Clang's integrated assembler.
2149 (Miod Vallat, review by Gabriel Scherer)
2150
2151 - #13001: do not read_back entire shapes to get aliases' uids when building the
2152 usages index
2153 (Ulysse Gérard, review by Gabriel Scherer and Nathanaëlle Courant)
2154
2155 ### Build system:
2156
2157 - #12198, #12321, #12586, #12616, #12706, #13048: continue the merge of the
2158 sub-makefiles into the root Makefile started with #11243, #11248,
2159 #11268, #11420 and #11675.
2160 (Sébastien Hinderer, review by David Allsopp and Florian Angeletti)
2161
2162 - #12569, #12570: remove 'otherlibraries' as a prerequisite for 'runtop';
2163 use 'runtop-with-otherlibs' to use a library from otherlibs/
2164 (Gabriel Scherer, review by Sébastien Hinderer, suggestion by David Allsopp)
2165
2166 - #12652: Make magic numbers easier to bump and duplicate.
2167 (Sébastien Hinderer, review by Antonin Décimo, David Allsopp and Florian
2168 Angeletti)
2169
2170 * #12751: --with-target-bindir configure option implemented. This option
2171 refers to the location of the runtime binaries on the target system for a
2172 cross-compiler and is embedded in executables produced by ocamlc. It does
2173 not affect the bytecode executables installed as part of the build. The old
2174 mechanism `make TARGET_BINDIR=..` no longer works.
2175 (David Allsopp, review by Damien Doligez, Xavier Leroy and Olivier Nicole)
2176
2177 - #12768, #13030: Detect mingw-w64 coupling with GCC or LLVM, detect clang-cl,
2178 and fix C compiler feature detection on macOS.
2179 (Antonin Décimo, review by Miod Vallat and Sébastien Hinderer)
2180
2181 ### Bug fixes:
2182
2183 - #10652, #12720: fix evaluation order in presence of optional arguments
2184 (Jacques Garrigue, report by Leo White, review by Vincent Laviron)
2185
2186 - #12595, #12597: fix a race in `caml_clear_gc_stats_sample`
2187 (Gabriel Scherer, review by B. Szilvasy, report by B. Szilvasy)
2188
2189 - #12580: Fix location of alias pattern variables.
2190 (Chris Casinghino, review Gabriel Scherer, report by Milo Davis)
2191
2192 - #12583: Add a closing event for when `EV_MAJOR_EPHE_MARK` is complete
2193 (Sudha Parimala, review by Gabriel Scherer)
2194
2195 - #12566: caml_output_value_to_malloc wrongly uses `caml_stat_alloc`
2196 instead of `malloc` since 4.06, breaking (in pooled mode) user code
2197 that uses `free` on the result. Symmetrically,
2198 caml_input_value_from_malloc should use `free`.
2199 (Gabriel Scherer, review by Xavier Leroy and Enguerrand Decorne,
2200 report by Ido Yariv)
2201
2202 - #12490: Unix: protect the popen_processes hashtable with a mutex
2203 (Gabriel Scherer, report by Olivier Nicole, review by Xavier Leroy)
2204
2205 - #11931: Fix tricky typing bug with type substitutions
2206 (Stephen Dolan, review by Leo White and Jacques Garrigue)
2207
2208 - #12037, #12171: Fix get_extern_state potential NULL dereference.
2209 (Alexander Skvortsov, report by Török Edwin,
2210 design by Gabriel Scherer, Xavier Leroy)
2211
2212 - #12635: Fix get_intern_state potential NULL dereference.
2213 (Antonin Décimo, review by KC Sivaramakrishnan)
2214
2215 - #12032, #12059: Bug fixes related to compilation of recursive definitions
2216 (Vincent Laviron, report by Victoire Noizet, review by Gabriel Scherer)
2217
2218 * #12145: Loopy constraints cause ocamlc to loop.
2219 Fixed by completely removing the call to `update_type` in
2220 `Typedecl.transl_type_decl`, as the expansion is already checked by
2221 `check_regularity`. As a result, recursion is more polymorphic,
2222 which may cause some (essentially wrong) type declarations to have
2223 unbound type variables, and some constraints unrelated to the concrete
2224 type to be ignored (see tests/typing-misc/constraints.ml).
2225 (Jacques Garrigue, report by Richard Eisenberg, review by Leo White)
2226
2227 - #12207, #12222: Make closure computation linear in the number of recursive
2228 functions instead of quadratic
2229 (Vincent Laviron, report by François Pottier, review by Nathanaëlle Courant
2230 and Gabriel Scherer)
2231
2232 - #11040, #12591: fix a data race in major_gc.c
2233 (Gabriel Scherer, review by Guillaume Munch-Maccagnoni
2234 and KC Sivaramakrishnan, report by Sadiq Jaffer)
2235
2236 - #12238, #12403, #12698: read input files in one go to avoid source reprinting
2237 issues.
2238 (Gabriel Scherer, report by Mike Spivey and Vincent Laviron, review by
2239 Nicolás Ojeda Bär, Xavier Leroy and Jeremy Yallop)
2240
2241 - #12334, #12368: Bad error message with mutually recursive abbreviations
2242 (Jacques Garrigue, report by Richard Eisenberg, review by Gabriel Scherer
2243 and Richard Eisenberg)
2244
2245 - #12401: `seek_in` and `seek_out` sometimes returned normally when given
2246 negative offsets, instead of failing. Now both functions should consistently
2247 raise `Sys_error` in this case.
2248 (Nicolás Ojeda Bär, review by Gabriel Scherer)
2249
2250 - #12267: Fix stack alignment computation
2251 (Miod Vallat, report by Jan Midtgaard, review by Gabriel Scherer)
2252
2253 - #12395, #12404: Fix thread-unsafety in the fallback implementation of
2254 `Unix.create_process` (the one used when `posix_spawnp` is unavailable)
2255 (Xavier Leroy, report by Chris Vine, review by Nicolás Ojeda Bär)
2256
2257 - #12949: open shadowing mistriggers
2258 (Gabriel Scherer, review by Florian Angeletti, report by Andreas Rossberg)
2259
2260 - #12526: Honor `ocaml.inline always` attribute on functions with
2261 optional arguments and default values in the Closure backend
2262 (Alain Frisch, review by Vincent Laviron)
2263
2264 - #12677, #12889: make Domain.DLS thread-safe
2265 (Gabriel Scherer, review by Olivier Nicole and Damien Doligez,
2266 report by Vesa Karvonen)
2267
2268 - #12561: Fix crash when combining TSan and frame-pointers
2269 (Fabrice Buoro and Olivier Nicole, report by Jan Midtgaard, review by Miod
2270 Vallat and Gabriel Scherer)
2271
2272 - #12482: Rework bounds checking code in the POWER backend
2273 (Miod Vallat and Xavier Leroy, report by Jan Midtgaard, review by
2274 KC Sivaramakrishnan)
2275
2276 - #12528, #12703: Avoid pointer arithmetic overflow in Tag_val macro
2277 (very likely harmless, but can trigger alarms)
2278 (Xavier Leroy, report by Sam Goldman, review by Guillaume Munch-Maccagnoni)
2279
2280 - #12593: TSan should handle Effect.Unhandled correctly
2281 (Fabrice Buoro and Olivier Nicole, report by Jan Midtgaard and Miod Vallat,
2282 review by Gabriel Scherer)
2283
2284 - #12684: fix locations filename in AST produced by the `-pp` option
2285 (Gabriel Scherer, review by Florian Angeletti)
2286
2287 - #12714: check whether macros are defined before using them to ensure
2288 that the headers can always be used in code which turns on -Wundef
2289 (or equivalent).
2290 (Antonin Décimo, review by Miod Vallat, Gabriel Scherer,
2291 Xavier Leroy, and David Allsopp)
2292
2293 - #12726: fix segmentation fault under Windows when executing a bytecode file if
2294 the runtime (`ocamlrun.exe`) cannot be found.
2295 (Vadim Zborovskii, Nicolás Ojeda Bär, report by Vadim Zborovskii, review by
2296 David Allsopp)
2297
2298 - #12727, #12730: fix bug with value let-rec and labelled applications
2299 (Vincent Laviron, review by Gabriel Scherer)
2300
2301 * #12751: Always keep within the 128 character limit for shebang lines. Previous
2302 fix in #8622 handled building the compiler with a long prefix; this patch
2303 extends this to the bytecode executables emitted by that compiler.
2304 (David Allsopp, review by Damien Doligez, Xavier Leroy and Olivier Nicole)
2305
2306 - #12755: Fix data race on global pools arrays of pool_freelist
2307 (Fabrice Buoro and Olivier Nicole, review by Gabriel Scherer)
2308
2309 - #12796, #12801: Fix memory corruption in caml_unix_alloc_sockaddr
2310 (Thomas Leonard, review by Nicolás Ojeda Bär)
2311
2312 - #12737: Fix data races in minor_gc.c and caml_natdynlink_open
2313 (Olivier Nicole, review by Stefan Muenzel, Miod Vallat, Guillaume
2314 Munch-Maccagnoni, Gabriel Scherer and Xavier Leroy)
2315
2316 - #12831: Fix call to caml_call_realloc_stack for s390x in PIC mode
2317 (Vincent Laviron, report by Jerry James, review by Miod Vallat)
2318
2319 * #12837: Show non-generalizable type parameters in type definitions
2320 Changes type of type parameters in outcometree.mli.
2321 (Jacques Garrigue, review by Richard Eisenberg)
2322
2323 - #12897: fix locking bugs in Runtime_events
2324 (Gabriel Scherer and Thomas Leonard,
2325 review by Olivier Nicole, Vincent Laviron and Damien Doligez,
2326 report by Thomas Leonard)
2327
2328 - #12851: Fix race between runtime events teardown and event emission
2329 (Olivier Nicole, review by Miod Vallat and Gabriel Scherer)
2330
2331 - #12860: Fix an assertion that wasn't taking into account the possibility of an
2332 ephemeron pointing at static data.
2333 (Mark Shinwell, review by Gabriel Scherer and KC Sivaramakrishnan)
2334
2335 - #12861: Fix a possible crash in the `threads` library.
2336 (Mark Shinwell, review by Gabriel Scherer and KC Sivaramakrishnan)
2337
2338 - #11040, #12894: Silence false data race observed between caml_shared_try_alloc
2339 and oldify. Introduces macros to call tsan annotations which help annotate
2340 a ``happens before'' relationship.
2341 (Hari Hara Naveen S and Olivier Nicole,
2342 review by Gabriel Scherer and Miod Vallat)
2343
2344 - #12958: Fix tail-modulo-cons compilation of try-with, && and ||
2345 expressions.
2346 (Gabriel Scherer and Nicolás Ojeda Bär, report by Sylvain Boilard, review by
2347 Gabriel Scherer)
2348
2349 - #12919: Fix register corruption in caml_callback2_asm on s390x.
2350 (Miod Vallat, review by Gabriel Scherer)
2351
2352 - #12924, #12930: Rework package constraint checking to improve interaction with
2353 immediacy
2354 (Chris Casinghino and Florian Angeletti, review by Florian Angeletti and
2355 Richard Eisenberg)
2356
2357 - #12969: Fix a data race in caml_darken_cont
2358 (Fabrice Buoro and Olivier Nicole, review by Gabriel Scherer and Miod Vallat)
2359
2360 - #12971, #12974: fix an uncaught Ctype.Escape exception on some
2361 invalid programs forming recursive types.
2362 (Gabriel Scherer, review by Florian Angeletti, report by Neven Villani)
2363
2364 - #13019: Remove linking instructions for the Unix library from threads.cma
2365 (this was done for threads.cmxa in OCaml 3.11). Eliminates warnings from
2366 new lld when using threads.cma of duplicated libraries.
2367 (David Allsopp, review by Nicolás Ojeda Bär)
2368
2369 - #13058: Add TSan instrumentation to caml_call_gc(), since it may raise
2370 exceptions.
2371 (Fabrice Buoro, Olivier Nicole, Gabriel Scherer and Miod Vallat)
2372
2373 - #13079: Save and restore frame pointer across Iextcall on ARM64
2374 (Tim McGilchrist, review by KC Sivaramakrishnan and Miod Vallat)
2375
2376 - #13094: Fix undefined behavior of left-shifting a negative number.
2377 (Antonin Décimo, review by Miod Vallat and Nicolás Ojeda Bär)
2378
2379 OCaml 5.1.1 (8 December 2023)
2380 ----------------------------
2381
2382 ### Standard library:
2383
2384 * #12562, #12734, #12783: Remove the `Marshal.Compression` flag to the
2385 `Marshal.to_*` functions introduced in 5.1 by #12006, as it cannot
2386 be implemented without risking to link -lzstd with all
2387 ocamlopt-generated executables. The compilers are still able to use
2388 ZSTD compression for compilation artefacts.
2389 (Xavier Leroy and David Allsopp, report by Kate Deplaix, review by
2390 Nicolás Ojeda Bär, Kate Deplaix, and Damien Doligez).
2391
2392 ### Bug fixes:
2393
2394 - #11800, #12707: fix an assertion race condition in `install_backup_thread`
2395 (Jan Midtgaard, review by Gabriel Scherer)
2396
2397 - #12318: GC: simplify the meaning of custom_minor_max_size: blocks with
2398 out-of-heap memory above this limit are now allocated directly in
2399 the major heap.
2400 (Damien Doligez, report by Stephen Dolan, review by Gabriel Scherer)
2401
2402 - #12439: Finalize and collect dead custom blocks during minor collection
2403 (Damien Doligez, review by Xavier Leroy, Gabriel Scherer and KC
2404 Sivaramakrishnan)
2405
2406 - #12486, #12535: Fix delivery of unhandled effect exceptions on amd64 with
2407 --enable-frame-pointers
2408 (Miod Vallat, report by Jan Midtgaard, review by Gabriel Scherer)
2409
2410 - #12581, #12609: Fix error on uses of packed modules outside their pack
2411 to correctly handle nested packs
2412 (Vincent Laviron, report by Javier Chávarri, review by Pierre Chambart)
2413
2414 - #12590, #12595: Move `caml_collect_gc_stats_sample` in
2415 `caml_empty_minor_heap_promote` before barrier arrival.
2416 (B. Szilvasy, review by Gabriel Scherer)
2417
2418 - #12623, fix the computation of variance composition
2419 (Florian Angeletti, report by Vesa Karvonen, review by Gabriel Scherer)
2420
2421 - #12645, #12649 fix error messages for cyclic type definitions in presence of
2422 the `-short-paths` flag.
2423 (Florian Angeletti, report by Vesa Karvonen, review by Gabriel Scherer)
2424
2425 - #12712, #12742: fix an assertion boundary case in `caml_reset_young_limit`
2426 (Jan Midtgaard, review by Guillaume Munch-Maccagnoni and KC Sivaramakrishnan)
2427
2428 - #12713, #12715: disable common subexpression elimination for atomic loads
2429 (Gabriel Scherer and Vincent Laviron,
2430 review by Vincent Laviron, KC Sivaramakrishnan and Xavier Leroy,
2431 report by Vesa Karvonen and Carine Morel)
2432
2433 - #12757: Fix ocamlnat (native toplevel) by registering frametables correctly
2434 (Stephen Dolan, Nick Barnes and Mark Shinwell,
2435 review by Vincent Laviron and Sébastien Hinderer)
2436
2437 - #12791: `extern` is applied to definitions of `caml_builtin_cprim`
2438 and `caml_names_of_builtin_cprim` when linking bytecode '-custom'
2439 executables with a C++ linker.
2440 (Shayne Fletcher, review by Antonin Décimo and Xavier Leroy)
2441
2442 - #12491, #12493, #12500, #12754: Do not change GC pace when creating
2443 sub-arrays of bigarrays
2444 (Xavier Leroy, report by Ido Yariv, analysis by Gabriel Scherer,
2445 review by Gabriel Scherer and Fabrice Buoro)
2446
2447 OCaml 5.1.0 (14 September 2023)
2448 -------------------------------
2449
2450 ### Restored backends
2451
2452 - #11418, #11708: RISC-V multicore support.
2453 (Nicolás Ojeda Bär, review by KC Sivaramakrishnan)
2454
2455 - #11712, #12258, #12261: s390x / IBM Z multicore support:
2456 OCaml & C stack separation; dynamic stack size checks; fiber and
2457 effects support.
2458 (Aleksei Nikiforov, with help from Vincent Laviron and Xavier Leroy,
2459 additional suggestions by Luc Maranget,
2460 review by the same and KC Sivaramakrishnan)
2461
2462 - #11642: Restore Cygwin port. Add GC messages for address space reservations
2463 when OCAMLRUNPARAM option v includes 0x1000.
2464 (David Allsopp, review by Xavier Leroy, Guillaume Munch-Maccagnoni
2465 and Gabriel Scherer)
2466
2467 ### Standard library:
2468
2469 - #12006, #12064: Add `Marshal.Compression` flag to `Marshal.to_*` functions.
2470 When this flag is explicitly set, marshaled data is compressed using ZSTD.
2471 On some practical examples, the marshalled output became three times smaller
2472 at no noticeable cost on the marshalling time.
2473 (Xavier Leroy, review by Edwin Török and Gabriel Scherer, fix by Damien
2474 Doligez)
2475
2476 - #10464: Add List.is_empty.
2477 (Craig Ferguson, review by David Allsopp)
2478
2479 - #11848: Add `List.find_mapi`,
2480 `List.find_index: ('a -> bool) -> 'a list -> int option`,
2481 `Seq.find_mapi`, `Seq.find_index`, `Array.find_mapi`, `Array.find_index`,
2482 `Float.Array.find_opt`, `Float.Array.find_index`, `Float.Array.find_map`,
2483 `Float.Array.find_mapi`.
2484 (T. Kinsart, review by Daniel Bünzli and Nicolás Ojeda Bär)
2485
2486 - #11410: Add Set.to_list, Map.to_list, Map.of_list,
2487 `Map.add_to_list: key -> 'a -> 'a list t -> 'a list t`.
2488 (Daniel Bünzli, review by Nicolás Ojeda Bär and Gabriel Scherer)
2489
2490 - #11836, #11837: Add `Array.map_inplace`, `Array.mapi_inplace`,
2491 `Float.Array.mapi_inplace` and `Float.Array.mapi_inplace`.
2492 (Léo Andrès, review by Gabriel Scherer, KC Sivaramakrishnan and
2493 Nicolás Ojeda Bär)
2494
2495 - #10967: Add Filename.temp_dir.
2496 (David Turner, review by Anil Madhavapeddy, Valentin Gatien-Baron, Nicolás
2497 Ojeda Bär, Gabriel Scherer, and Daniel Bünzli)
2498
2499 - #11246: Add "hash" and "seeded_hash" functions to Bool, Int, Char, Float,
2500 Int32, Int64, and Nativeint.
2501 (Nicolás Ojeda Bär, review by Xavier Leroy and Gabriel Scherer)
2502
2503 - #11488: Add `Mutex.protect: Mutex.t -> (unit -> 'a) -> 'a`
2504 for resource-safe critical sections protected by a mutex.
2505 (Simon Cruanes, review by Gabriel Scherer, Xavier Leroy,
2506 Guillaume Munch-Maccagnoni)
2507
2508 - #11581: Add type equality witness
2509 `type (_, _) eq = Equal: ('a, 'a) eq`
2510 in a new module Stdlib.Type.
2511 (Nicolás Ojeda Bär, review by Daniel Bünzli, Jacques Garrigue, Florian
2512 Angeletti, Alain Frisch, Gabriel Scherer, Jeremy Yallop and Xavier Leroy)
2513
2514 - #11843: Add `In_channel.input_lines` and `In_channel.fold_lines`.
2515 (Xavier Leroy, review by Nicolás Ojeda Bär and Wiktor Kuchta).
2516
2517 - #11856, #11859: Using TRMC, the following `Stdlib` functions are now
2518 tail-recursive:
2519 Stdlib.(@), List.append,
2520 List.concat_map.
2521 (Jeremy Yallop, review by Daniel Bünzli, Anil Madhavapeddy, Nicolás Ojeda Bär,
2522 Gabriel Scherer, and Bannerets)
2523
2524 - #11362, #11402: Using TRMC, the following `Stdlib` functions are now
2525 tail-recursive:
2526 List.map, List.mapi, List.map2,
2527 List.filter, List.filteri, List.filter_map,
2528 List.init,
2529 List.of_seq.
2530 (Nicolás Ojeda Bär, review by Xavier Leroy and Gabriel Scherer)
2531
2532
2533 - #11878, #11965: Prevent seek_in from marking buffer data as valid after
2534 closing the channel. This could lead to inputting uninitialized bytes.
2535 (Samuel Hym, review by Xavier Leroy and Olivier Nicole)
2536
2537 - #11128: Add In_channel.isatty, Out_channel.isatty.
2538 (Nicolás Ojeda Bär, review by Gabriel Scherer and Florian Angeletti)
2539
2540 - #10859: Add `Format.pp_print_iter` and `Format.pp_print_array`.
2541 (Léo Andrès and Daniel Bünzli, review by David Allsopp and Hugo Heuzard)
2542
2543 - #10789: Add `Stack.drop`
2544 (Léo Andrès, review by Gabriel Scherer)
2545
2546 * #10899: Change Stdlib.nan from signaling NaN to quiet NaN.
2547 (Greta Yorsh, review by Xavier Leroy, Guillaume Melquiond and
2548 Gabriel Scherer)
2549
2550 - #11026, #11667, #11858: Rename the type of the accumulator
2551 of fold functions to 'acc:
2552 fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a list -> 'acc
2553 fold_right : ('a -> 'acc -> 'acc) -> 'a list -> 'acc -> 'acc
2554 fold_left_map : ('acc -> 'a -> 'acc * 'b) -> 'acc -> 'a list -> 'acc * 'b list
2555 ...
2556 (Valentin Gatien-Baron and François Berenger,
2557 review by Gabriel Scherer and Nicolás Ojeda Bär)
2558
2559 - #11354: Hashtbl.find_all is now tail-recursive.
2560 (Fermín Reig, review by Gabriel Scherer)
2561
2562 - #11500: Make Hashtbl.mem non-allocating.
2563 (Simmo Saan, review by Nicolás Ojeda Bär)
2564
2565 - #11412: Add Sys.is_regular_file
2566 (Xavier Leroy, review by Anil Madhavapeddy, Nicolás Ojeda Bär, David Allsopp)
2567
2568 - #11322, #11329: serialization functions Random.State.{of,to}_binary_string
2569 between Random.State.t and string
2570 (Gabriel Scherer, report by Yotam Barnoy,
2571 review by Daniel Bünzli, Damien Doligez, Hugo Heuzard and Xavier Leroy)
2572
2573 - #11830: Add Type.Id with
2574 `val provably_equal : 'a Type.Id.t -> 'b Type.Id.t -> ('a, 'b) Type.eq option`
2575 (Daniel Bünzli, review by Jeremy Yallop, Gabriel Scherer, Wiktor Kuchta,
2576 Nicolás Ojeda Bär)
2577
2578 - #12184, #12320: Sys.rename Windows fixes on directory corner cases.
2579 (Jan Midtgaard, review by Anil Madhavapeddy)
2580
2581 * #11565: Enable -strict-formats by default. Some incorrect format
2582 specifications (for `printf`) where silently ignored and now fail.
2583 Those new failures occur at compile-time, except if you use advanced
2584 format features like `%(...%)` that parse format strings dynamically.
2585 Pass -no-strict-formats to revert to the previous lenient behavior.
2586 (Nicolás Ojeda Bär, review by David Allsopp)
2587
2588 ### Installation size
2589
2590 Specific efforts have been made during this release to reduce the filesystem
2591 size of installed artifacts of the compiler distribution.
2592 The installation size of 5.1 is 272 MiB compared to 521 MiB for 5.0.
2593 Some of those changes will benefit all OCaml packages.
2594
2595 - ocaml/RFCs#23, #12006: use compressed marshaled format from #12006 for .cmi,
2596 .cmt, .cmti files, and for debug info in .cmo and .cma files, resulting in
2597 major reduction in size.
2598 (Xavier Leroy, review by Edwin Török and Gabriel Scherer,
2599 RFC by Simon Cruanes)
2600
2601 - #11981: Reduce size of OCaml installations by removing debugging information
2602 from installed bytecode executables. It is no longer possible to
2603 run ocamldebug over these installed bytecode executables, nor to get
2604 exception backtraces for them.
2605 (Xavier Leroy, review by David Allsopp, report by Fabrice Le Fessant)
2606
2607 * #11993: install only bytecode executables for the `ocamlmklib`, `ocamlcmt`,
2608 `ocamlprof`, `ocamlcp`, `ocamloptp`, and `ocamlmktop` tools, but no
2609 native-code executables. A tool like `ocamlmklib` for example is now
2610 installed directly to `$BINDIR/ocamlmklib`; `ocamlmklib.byte` and
2611 `ocamlmklib.opt` are no longer installed to `$BINDIR`.
2612 (Xavier Leroy, review by Gabriel Scherer)
2613
2614 ### Runtime system:
2615
2616 - #11589, #11903: Modify the GC pacing code to make sure the GC keeps
2617 up with allocations in the presence of idle domains.
2618 (Damien Doligez and Stephen Dolan, report by Florian Angeletti,
2619 review by KC Sivaramakrishnan and Sadiq Jaffer)
2620
2621 - #11743: Speed up weak array operations
2622 (KC Sivaramakrishnan, review by François Bobot and Sadiq Jaffer)
2623
2624 - #12131: Simplify implementation of weak hash sets, fixing a
2625 performance regression. (Nick Barnes, review by François Bobot,
2626 Alain Frisch and Damien Doligez).
2627
2628 - #11474, #11998, #12065: Add support for user-defined events in the runtime
2629 event tracing system.
2630 (Lucas Pluvinage, review by Sadiq Jaffer, Guillaume Munch-Maccagnoni,
2631 Enguerrand Decorne, Gabriel Scherer and Anil Madhavapeddy)
2632
2633 - #11827, #12249: Restore prefetching for GC marking
2634 (Fabrice Buoro and Stephen Dolan, review by Gabriel Scherer and Sadiq Jaffer)
2635
2636 - #11144: Restore frame-pointers support for amd64
2637 (Fabrice Buoro, review by Frédéric Bour and KC Sivaramakrishnan)
2638
2639 - #11935: Load frametables of dynlink'd modules in batch
2640 (Stephen Dolan, review by David Allsopp and Guillaume Munch-Maccagnoni)
2641
2642 - #11284, #12525: Use compression of entries scheme when pruning mark stack.
2643 Can decrease memory usage for some workloads, otherwise should be
2644 unobservable.
2645 (Tom Kelly, review by Sabine Schmaltz, Sadiq Jaffer and Damien Doligez)
2646
2647 * #11865, #11868, #11876: Clarify that the operations of a custom
2648 block must never access the OCaml runtime. The previous
2649 documentation only mentioned the main illicit usages. In particular,
2650 since OCaml 5.0, it is no longer safe to call
2651 `caml_remove_global_root` or `caml_remove_generational_global_root`
2652 from within the C finalizer of a custom block, or within the
2653 finalization function passed to `caml_alloc_final`. As a workaround,
2654 such a finalization operation can be registered with `Gc.finalize`
2655 instead, which guarantees to run the finalizer at a safe point.
2656 (Report by Timothy Bourke, discussion by Yotam Barnoy, Timothy
2657 Bourke, Sadiq Jaffer, Xavier Leroy, Guillaume Munch-Maccagnoni, and
2658 Gabriel Scherer)
2659
2660 - #12130: Fix multicore crashes with weak hash sets. Fixes #11934.
2661 (Nick Barnes, review by François Bobot)
2662
2663 - #12099: Add ocamlrund option, -events, to produce a trace of
2664 debug events during bytecode interpretation. Fixes #12098.
2665 (Richard L Ford, review by Gabriel Scherer)
2666
2667 - #12001: Fix book keeping for last finalisers during the minor cycle
2668 (KC Sivaramakrishnan and Enguerrand Decorne, report by Guillaume Bury
2669 and Vincent Laviron, review by Sadiq Jaffer and KC Sivaramakrishnan)
2670
2671 - #11919: New runtime events counters for major heap stats and minor heap
2672 resizing.
2673 (Sadiq Jaffer, review by Gabriel Scherer and David Allsopp)
2674
2675 - #11287, #11872, #11955: Clean up reserved header bits (once used for
2676 Spacetime profiling).
2677 (Nick Barnes, review by Gabriel Scherer and Damien Doligez)
2678
2679 - #11750: Decouple major slice from minor GC.
2680 (KC Sivaramakrishnan, review by Sadiq Jaffer, Guillaume Munch-Maccagnoni and
2681 Damien Doligez)
2682
2683 - #11796: protect lazy computation of code fragment digest by a mutex.
2684 This makes the thread sanitizer happier, and avoids duplicating
2685 the hashing work.
2686 (Gabriel Scherer, review by Xavier Leroy, report by Olivier Nicole)
2687
2688 - #11137: new `Unsafe_store_tag(val, new_tag)` macro to stop using
2689 `Tag_val(val)` as lvalue.
2690 (Gabriel Scherer, review by Xavier Leroy, Guillaume Munch-Maccagnoni
2691 and Nicolás Ojeda Bär)
2692
2693 - #11880: Restore the correct sigmask in systhreads.
2694 (Christiano Haesbaert, review by Guillaume Munch-Maccagnoni and
2695 Sébastien Hinderer)
2696
2697 - #11881: Fix thread-unsafety of registration of operations for "custom"
2698 values.
2699 (Guillaume Munch-Maccagnoni, review by Gabriel Scherer and KC
2700 Sivaramakrishnan)
2701
2702 - #11980: fix quadratic behavior in natdynlink by using a STW section
2703 for frame-descriptor updates.
2704 (Gabriel Scherer, review by Sadiq Jaffer, report by André Maroneze
2705 for Frama-C and Guillaume Melquiond for Coq)
2706
2707 - #12121: unrooted implementations of caml_callback*_exn
2708 (Gabriel Scherer, review by KC Sivaramakrishnan and Xavier Leroy)
2709
2710 - #3921, #12039, #12128: poll for signals in long-running polymorphic
2711 comparisons.
2712 (B. Szilvasy, Gabriel Scherer and Xavier Leroy, review by
2713 Stefan Muenzel, Guillaume Munch-Maccagnoni and Damien Doligez)
2714
2715 - #12231: Support MinGW-w64 11.0 winpthreads library, where the macro
2716 to set up to get flexdll working changed
2717 (David Allsopp and Samuel Hym, light review by Xavier Leroy)
2718
2719 * #12512: Add volatile casts to FFI macros to enforce memory model (technically
2720 a breaking change although no opam package seemed broken by it.)
2721 (Olivier Nicole, suggested by Guillaume Munch-Maccagnoni, review by Gabriel
2722 Scherer and Xavier Leroy)
2723
2724 ### Language features:
2725
2726 * #11694: Add short syntax for generative functor types `() -> ...`
2727 (Jeremy Yallop, review by Gabriel Scherer, Nicolás Ojeda Bär,
2728 Jacques Garrigue)
2729
2730
2731 * #11457: Remove old polymorphic variant syntax.
2732 With ``type t = [ `A | `B ]``, one could use the syntax `#t` in types,
2733 where it means the same thing as `[< t]`, and in patterns, where it means
2734 ``(`A | `B)``. The use of `#t` in types for polymorphic variants
2735 was deprecated since 2001, and is now removed. The syntax remains available
2736 in patterns, or for objects -- when `t` is a class type.
2737 (Stefan Muenzel, review by Gabriel Scherer and Jacques Garrigue)
2738
2739 * #11984: Add dedicated syntax for generative functor application.
2740 Previously, OCaml did not distinguish between `F ()` and
2741 `F (struct end)`, even though the latter looks applicative. Instead,
2742 the decision between generative and applicative functor application
2743 was made based on the type of `F`. With this patch, we now distinguish
2744 these two application forms; writing `F (struct end)` for a generative
2745 functor leads to new warning 73.
2746 (Frédéric Bour and Richard Eisenberg, review by Florian Angeletti)
2747
2748
2749 - #9975, #11365: Make empty types (`type t = |`) immediate.
2750 (Antal Spector-Zabusky, review by Gabriel Scherer)
2751
2752 ### Type system:
2753
2754 * #6941, #11187, #12483: prohibit using classes through recursive modules
2755 inheriting or including a class belonging to a mutually-recursive module
2756 would previous behave incorrectly, and now results in a clean error.
2757 (Leo White, review by Gabriel Scherer and Florian Angeletti)
2758
2759 * #12189, #12211: anonymous row variables in explicitly polymorphic type
2760 annotation, e.g. `'a. [< X of 'a ] -> 'a`, are now implicitly
2761 universally quantified (in other words, the example above is now read
2762 as `'a 'r. ([< X of 'a ] as 'r) -> 'a`).
2763 (Florian Angeletti and Gabriel Scherer, review by Jacques Garrigue)
2764
2765 ### Code generation and optimizations:
2766
2767 - #11967: Remove traces of Obj.truncate, which allows some mutable
2768 loads to become immutable.
2769 (Nick Barnes, review by Vincent Laviron and KC Sivaramakrishnan)
2770
2771 - #9945, #10883: Turn boolean-result float comparisons into primitive operations
2772 Uses the architecture's elementary operations for float comparisons,
2773 when available, rather than branching and then setting the return value.
2774 (Stefan Muenzel, review by Stephen Dolan, Alain Frisch and Vincent Laviron)
2775
2776 - #8998, #11321, #11430: change mangling of OCaml long identifiers
2777 from `camlModule__name_NNN` to `camlModule.name_NNN`. The previous
2778 mangling schema, using `__`, was ambiguous.
2779 (Xavier Leroy, report by sliquister and Michael Bacarella,
2780 review by Gabriel Scherer)
2781
2782 - #10834: The -safer-matching option disables type-based optimizations of
2783 pattern-matching compilation. This allows to produce a match failure if
2784 a pattern-matching was wrongly assumed to be exhaustive. Since the
2785 exhaustiveness check for GADTs has had bugs in the past, it may be
2786 useful if you need extra security with GADTs.
2787 (Jacques Garrigue, review by Gabriel Scherer)
2788
2789 - #11102: Speed up register allocation by permanently spilling registers
2790 (Stephen Dolan, review by Xavier Leroy)
2791
2792 - #11383: Restrict the local function optimisation to forbid moving code
2793 inside a sub-function
2794 (Vincent Laviron, review by Gabriel Scherer)
2795
2796 - #11686: Better spilling heuristic for the Linear Scan allocator for more
2797 efficient stack usage.
2798 (Nicolás Ojeda Bär, Gabriel Scherer, Alain Frisch, review by Gabriel Scherer,
2799 Alain Frisch and Nathanaëlle Courant)
2800
2801 - #11904: Remove arm, i386 native-code backends that were already
2802 disabled at configuration time.
2803 (Nicolás Ojeda Bär, review by Stephen Dolan, Anil Madhavapeddy, and Xavier
2804 Leroy)
2805
2806 - #11134: Optimise 'include struct' in more cases
2807 (Stephen Dolan, review by Leo White and Vincent Laviron)
2808
2809 ### Other libraries:
2810
2811 - #11374: Remove pointer cast to a type with stricter alignment requirements
2812 in Windows implementation of Unix.gettimeofday. Windows implementations of
2813 caml_unix_map_file, caml_unix_lseek and caml_unix_lseek_64 now release the
2814 runtime lock. Windows implementation of caml_unix_lockf modernised and
2815 simplified. Where possible, 64 bit integers are used instead of LARGE_INTEGER
2816 structs.
2817 (David Allsopp, review by Jonah Beckford and Xavier Leroy)
2818
2819 - #11475: Make Unix terminal interface bindings domain-safe
2820 (Olivier Nicole and Xavier Leroy, review by Xavier Leroy)
2821
2822 - #11775: Unix.write on a non-blocking socket under Windows will return normally
2823 if the write blocks after some data has already been written (as otherwise
2824 there is no way of knowing how much data has been written before
2825 blocking). The same behaviour was already present under Unix.
2826 (Nicolás Ojeda Bär, review by David Allsopp)
2827
2828 * #11991: Unix on Windows: map ERROR_TOO_MANY_LINKS to EMLINK.
2829 (Nicolás Ojeda Bär)
2830
2831 - #12067: Document Windows specific meanings of `Unix.process_status`
2832 type
2833 (Samuel Hym, review by David Allsopp)
2834
2835 - #12072: Document and test that Sys.rename works over directories too
2836 (Jan Midtgaard, review by Anil Madhavapeddy and Xavier Leroy)
2837
2838 ### Tools:
2839
2840 - #11889, #11978: ocamldoc: handle injectivity annotations and wildcards in type
2841 parameters.
2842 (Florian Angeletti, report by Wiktor Kuchta, review by Jules Aguillon)
2843
2844 - #11787: Fix GDB scripts to work with OCaml 5's heap layout. (Nick
2845 Barnes)
2846
2847 - #11772: fix ocamlyacc's handling of raw string literals
2848 (Demi Marie Obenour)
2849
2850 - #9290: Add a directive to switch off debugging in toplevel.
2851 This allows to see optimized bytecode with -dlambda.
2852 (Jacques Garrigue, review by Gabriel Scherer)
2853
2854 - #11166: ocamllex: the union of two character sets "cset1 | cset2" can now be
2855 used in any context where a character set is expected.
2856 (Nicolás Ojeda Bär, Martin Jambon, review by Sébastien Hinderer)
2857
2858 - #11718: ocamlyacc: OCaml-style comments are now supported, in addition to
2859 the C-style comments already supported. The syntax is the same as that used
2860 in OCaml code.
2861 (Demi Marie Obenour, review by Damien Doligez)
2862
2863 - #11728: ocamlyacc: generate line directives for %type declarations
2864 (Demi Marie Obenour, review by Damien Doligez)
2865
2866 - #11773: ocamlyacc: Do not allow quoted literals (such as 'a' or "bc")
2867 in a token name or %type declaration. Previously such literals were
2868 accepted by ocamlyacc, but produced malformed OCaml that was rejected
2869 by the compiler.
2870 (Demi Marie Obenour, review by Gabriel Scherer)
2871
2872 - #11774: ocamlyacc: fail if there is an I/O error
2873 (Demi Marie Obenour, review by Gabriel Scherer)
2874
2875 - #11973: Add support for postfixed mingw host triplets
2876 (Romain Beauxis)
2877
2878 - #12165: ocamldoc, use standard doctype to avoid quirk mode.
2879 (Florian Angeletti, review by Gabriel Scherer)
2880
2881 ### Manual and documentation:
2882
2883 - #11476: Add examples in documentation of Hashtbl, Queue, Atomic, Format
2884 (Simon Cruanes, review by Yotam Barnoy, Gabriel Scherer, Daniel Bünzli,
2885 Ulugbek Abdullaev, and Nicolás Ojeda Bär)
2886
2887 - #11883, #11884: Update documentation for In_channel and Out_channel
2888 with examples and sections to group related functions.
2889 (Kiran Gopinathan, review by Daniel Bünzli and Xavier Leroy)
2890
2891
2892 - #12095, #12097: Put the sample code of the user's manual and reference
2893 documentation of the standard library under the CC0 1.0 Universal
2894 (CC0 1.0) Public Domain Dedication license.
2895
2896 - #11892: Document the semantic differences of Unix.exec* between Unix and
2897 Windows.
2898 (Boris Yakobowski, review by Daniel Bünzli, Gabriel Scherer and Nicolás Ojeda
2899 Bär)
2900
2901 - #9430, #11291: Document the general desugaring rules for binding operators.
2902 (Gabriel Scherer, review by Nicolás Ojeda Bär)
2903
2904 - #11481: Fix the type of Unix.umask to Unix.file_perm -> Unix.file_perm
2905 (Favonia, review by Sébastien Hinderer)
2906
2907 - #11514: Document ocamltest builtin variables and actions
2908 (Olivier Nicole, review by Sébastien Hinderer)
2909
2910 - #11676: Fix missing since annotation in the `Sys` and `Format` modules
2911 (Github user Bukolab99, review by Florian Angeletti)
2912
2913 - #12028: Update format documentation to make it clearer that
2914 `pp_print_newline` flushes its newline
2915 (Florian Angeletti, review by Gabriel Scherer)
2916
2917 - #12201: in the tutorial on modules, replace priority queue example by
2918 a simpler example based on FIFO queues.
2919 (Xavier Leroy, review by Anil Madhavapeddy and Nicolás Ojeda Bär).
2920
2921 - #12352: Fix a typo in the documentation of Arg.write_arg
2922 (Christophe Raffalli, review by Florian Angeletti)
2923
2924 - #7179, #11894: correct the description of CAMLreturn and CAMLreturn0 in
2925 the Interfacing C page and memory.h file.
2926 (Dong An, review by Guillaume Munch-Maccagnoni and Olivier Nicole )
2927
2928 ### Compiler user-interface and warnings:
2929
2930 - #10647: Show hints for the "undefined global" error in the toplevel
2931 (Wiktor Kuchta, review by Gabriel Scherer)
2932
2933 - #12116: Don't suggest to insert a semicolon when the type is not unit
2934 (Jules Aguillon, review by Florian Angeletti)
2935
2936 - #11679: Improve the error message about too many arguments to a function
2937 (Jules Aguillon, review by Gabriel Scherer and Florian Angeletti)
2938
2939 - #10009: Improve the error reported by mismatched struct/sig and =/: in module
2940 and module type bindings.
2941 (Jules Aguillon, review by Gabriel Scherer)
2942
2943 - #11530: Include kinds in kind mismatch error message.
2944 "Error: This variant or record definition does not match that of type M.t
2945 The original is abstract, but this is a record".
2946 (Leonhard Markert, review by Gabriel Scherer and Florian Angeletti)
2947
2948 - #11646: Add colors to error message hints.
2949 (Christiana Anthony, review by Florian Angeletti)
2950
2951 - #11235, #11864: usage warnings for constructors and fields can now be disabled
2952 on field-by-field or constructor-by-constructor basis
2953 (Florian Angeletti, review by Gabriel Scherer)
2954
2955 - #11888: Improve the error message when type variables cannot be deduced from
2956 the type parameters:
2957 Before:
2958 "Error: In this definition, a type variable cannot be deduced
2959 from the type parameters."
2960 After:
2961 "Error: In the GADT constructor
2962 T : 'a -> 'a s t
2963 the type variable 'a cannot be deduced from the type parameters."
2964 (Stefan Muenzel, review by Florian Angeletti and Gabriel Scherer)
2965
2966
2967 - #10818: Preserve integer literal formatting in type hint.
2968 (Leonhard Markert, review by Gabriel Scherer and Florian Angeletti)
2969
2970 - #11338: Turn some partial application warnings into hints.
2971 (Leo White, review by Stephen Dolan)
2972
2973 - #10931: Improve warning 14 (illegal backslash) with a better explanation
2974 of the causes and how to fix it.
2975 (David Allsopp, Florian Angeletti, Lucas De Angelis, Gabriel Scherer,
2976 review by Nicolás Ojeda Bär, Florian Angeletti, David Allsopp and
2977 Gabriel Scherer)
2978
2979 - #10911: Improve the location reported by parenthesized assert expressions
2980 (Fabian Hemmer, review by Gabriel Scherer)
2981
2982 - #1391, #7645, #3922: Add an early error when compiling different
2983 modules with mismatching -for-pack
2984 (Pierre Chambart and Vincent Laviron, review by Mark Shinwell)
2985
2986 - #11297: Report "unclosed" error when "done" is missing in a "do .. done"
2987 construct.
2988 (Nicolás Ojeda Bär, review by Gabriel Scherer)
2989
2990 - #11635, #5461, #10564: turn warning 31 (Module_linked_twice) into a hard error
2991 for ocamlc — this was already an error with ocamlopt.
2992 (Hugo Heuzard, review by Valentin Gatien-Baron and Gabriel Scherer)
2993
2994 - #11653: Add the -no-absname option to ocamlc, ocamlopt and ocamldep.
2995 (Abiola Abdulsalam, review by Sébastien Hinderer and Florian Angeletti)
2996
2997 - #11696: Add the -no-g option to ocamlc and ocamlopt.
2998 (Abiola Abdulsalam, review by Sébastien Hinderer, Nicolás Ojeda Bär and
2999 Florian Angeletti)
3000
3001 - #11722: clearer error messages on non-well-founded type definitions
3002 (Gabriel Scherer, review by Jacques Garrigue)
3003
3004 - #11819: make the `native_compiler` and `native_dynlink` configuration
3005 variables available through ocamlc -config.
3006 (Sébastien Hinderer, review by Gabriel Scherer and David Allsopp)
3007
3008 - #8602, #11863: Add -stop-after lambda flag option
3009 (Douglas Smith and Dmitrii Kosarev, review by Gabriel Scherer)
3010
3011 - #11910: Simplify naming convention for shadowed or ephemeral identifiers in
3012 error messages (eg: `Illegal shadowing of included type t/2 by t`)
3013 (Florian Angeletti, review by Jules Aguillon)
3014
3015 - #12024: insert a blank line between separate compiler messages
3016 (Gabriel Scherer, review by Florian Angeletti, report by David Wong)
3017
3018 - #12088, #9265, #11949: ocamldebug: fix confusing repeating behavior
3019 on blank lines within source scripts
3020 (Damien Doligez, review by Gabriel Scherer, report by Gaëtan Gilbert)
3021
3022 - #12107: use aliases to mark weak row variables: `_[< ... ]`, `< _..>`, `_#ct`
3023 are now rendered as `[< ...] as '_weak1`, `< .. > as '_weak1`,
3024 and `#ct as '_weak1`.
3025 (Florian Angeletti, suggestion by Stefan Muenzel, review by Gabriel Scherer)
3026
3027 - #12051: Improve the error messages when type variables cannot be generalized
3028 (Stefan Muenzel, review by Florian Angeletti)
3029
3030 * #12094: Trigger warning 5 (ignored-partial-application) when the scrutinee of
3031 a pattern matching is of arrow type and all cases match wildcard or exception
3032 patterns.
3033 (Nicolás Ojeda Bär, review by Gabriel Scherer)
3034
3035 ### Internal/compiler-libs changes:
3036
3037 - #11018, #11869: Clean up Types.Variance, adding a description of
3038 the lattice used, and defining explicitly composition.
3039 (Jacques Garrigue, review by Gabriel Scherer and Jeremy Yallop)
3040
3041 - #11536: Introduce wrapper functions for level management
3042 ([Ctype.with_level], etc) and for type variable scoping
3043 ([Typetexp.with_local_type_variable_scope]).
3044 The older API ([Ctype.(begin_def,end_def)], [Typetexp.(narrow,widen)], etc.)
3045 is now removed.
3046 (Jacques Garrigue and Takafumi Saikawa, review by Gabriel Scherer)
3047
3048 - #11601, #11612, #11628, #11613, #11623, #12120 : Clean up some
3049 global state handling in emitcode, bytepackager, bytegen,
3050 bytesections, spill.
3051 (Hugo Heuzard, Stefan Muenzel, review by Vincent Laviron, Gabriel Scherer
3052 and Nathanaëlle Courant)
3053
3054 - #12119, #12188, #12191: mirror type constraints on value binding in the
3055 parsetree:
3056 the constraint `typ` in `let pat : typ = exp` is now directly stored
3057 in the value binding node in the parsetree.
3058 (Florian Angeletti, review by Richard Eisenberg)
3059
3060 - #11912: Refactoring handling of scoped type variables
3061 (Richard Eisenberg, review by Gabriel Scherer and Florian Angeletti)
3062
3063
3064 - #11691, #11706: use __asm__ instead of asm for strict ISO C conformance
3065 (Xavier Leroy, report by Gregg Reynolds , review by Sadiq Jaffer)
3066
3067 - #11693: Remove use of C99 Variable Length Arrays (VLAs) in the runtime.
3068 (David Allsopp, review by Xavier Leroy, Guillaume Munch-Maccagnoni,
3069 Stefan Muenzel and Gabriel Scherer)
3070
3071 - #12138: Generalise interface for BUILD_PATH_PREFIX_MAP mapping.
3072 Absolute paths are now rewritten too.
3073 (Richard L Ford, suggestions and review by Gabriel Scherer)
3074
3075 - #10512: explain the compilation strategy for switches on constructors
3076 (Gabriel Scherer, review by Vincent Laviron)
3077
3078 - #11990: Improve comments and macros around frame descriptors.
3079 (Nick Barnes, review by Gabriel Scherer)
3080
3081 - #11847, #11849, #11851, #11898: small refactorings in the type checker
3082 (Gabriel Scherer, review by Nicolás Ojeda Bär)
3083
3084 - #11027: Separate typing counter-examples from type_pat into retype_pat;
3085 type_pat is no longer in CPS.
3086 (Jacques Garrigue and Takafumi Saikawa, review by Gabriel Scherer)
3087
3088 - #11286, #11515: disambiguate identifiers by using how recently they have
3089 been bound in the current environment
3090 (Florian Angeletti, review by Gabriel Scherer)
3091
3092 - #11364: Allow `make -C testsuite promote` to take `TEST` and `LIST` variables
3093 (Antal Spector-Zabusky, review by Gabriel Scherer and David Allsopp)
3094
3095 - #11446: document switch compilation (lambda/switch.ml)
3096 (Gabriel Scherer, review by Luc Maranget and Vincent Laviron)
3097
3098 - #11568: Encode inline record types in Path.t
3099 (Leo White and Hyunggyu Jang, review by Gabriel Scherer)
3100
3101 - #11569: Remove hash type encoding
3102 (Hyunggyu Jang, review by Gabriel Scherer and Florian Angeletti)
3103
3104 - #11627: use return values instead of globals for linear scan intervals
3105 (Stefan Muenzel, review by Nicolás Ojeda Bär)
3106
3107 - #11634: Dll.open_dll now properly handles opening for execution while already
3108 opened for checking
3109 (Hugo Heuzard, review by Nicolás Ojeda Bär)
3110
3111 * #11745, #12358: Debugger and toplevels: embed printer types rather than
3112 reading their representations from topdirs.cmi at runtime.
3113 This change also removes the ocamlmktop initialization module introduced
3114 in #11382 which was no longer useful.
3115 This change breaks toplevel scripts relying on the visibility of `Topdirs`
3116 in the initial toplevel environment without loading `topfind`.
3117 Since the opam default `.ocamlinit` file loads `topfind`, it is expected
3118 that only scripts run with `ocaml -noinit` are affected.
3119 For those scripts, accessing `Topdirs` now requires the `compiler-libs`
3120 directory to be added to the toplevel search path with
3121 ```
3122 #directory "+compiler-libs";;
3123 ````
3124 as was already the case for the other modules in the toplevel interface
3125 library.
3126 (Sébastien Hinderer, review by Florian Angeletti, Nicolás Ojeda Bär and
3127 Gabriel Scherer)
3128
3129 - #11615: remove global variables form asmcomp/linearize.ml
3130 (Stefan Muenzel, review by Nicolás Ojeda Bär
3131
3132 - #10856: Add location, attribute(s) visitors to Tast_mapper/Tast_iterator
3133 (Yan Dong, review by Nicolás Ojeda Bär and Gabriel Scherer)
3134
3135 - #11933: Use the correct machtype when reading the code pointer from closures
3136 (Nathanaëlle Courant, review by Gabriel Scherer and Vincent Laviron)
3137
3138 - #11972: refactor runtime/frame_descriptors.c
3139 in preparation for quadratic-time fix
3140 (Gabriel Scherer, review by Enguerrand Decorne)
3141
3142 - #11997: translate structured constants into their Obj.t representation
3143 at compile time rather than link time. Changes the way dumpobj prints
3144 these constants because their representation becomes untyped.
3145 (Sébastien Hinderer, review by Xavier Leroy, Nicolás Ojeda Bär and
3146 Hugo Heuzard)
3147
3148 - #12011: remove Ctype.reified_var_counter
3149 (Takafumi Saikawa and Jacques Garrigue, review by Gabriel Scherer)
3150
3151 - #12012: move calls to Typetexp.TyVarEnv.reset inside with_local_level etc.
3152 (Jacques Garrigue and Takafumi Saikawa, review by Gabriel Scherer)
3153
3154 - #12034: a logarithmic algorithm to find the next free variable
3155 (Gabriel Scherer, review by Stefan Muenzel)
3156
3157 - #12092: remove Lev_module_definition from lambda
3158 (Nick Roberts, review by Gabriel Scherer)
3159
3160 - #12117: Remove arity-interrupting elaboration of module unpacks
3161 (Nick Roberts, review by Richard Eisenberg and Jacques Garrigue)
3162
3163 - #12118: stop storing names of predefined exceptions in the
3164 cu_required_globals field of compilation unit descriptors.
3165 (Sébastien Hinderer, review by Vincent Laviron)
3166
3167 - #12125: Add Misc.print_see_manual and modify [@manual_ref] to accept
3168 lists for simpler printing of manual references
3169 (Stefan Muenzel, review by Florian Angeletti)
3170
3171 ### Build system:
3172
3173 - #11844: Reduce verbosity of `make` logs by printing program invocations in
3174 shorthand (eg `OCAMLC foo.cmo`). Setting `V=1` recovers the old style (with
3175 full command-lines).
3176 (Xavier Leroy, Nicolás Ojeda Bär, review by Sébastien Hinderer)
3177
3178
3179 - #11243, #11248, #11268, #11420, #11675: merge the sub-makefiles into
3180 the root Makefile.
3181 (Sébastien Hinderer, review by David Allsopp and Florian Angeletti)
3182
3183 - #11828: Compile otherlibs/ C stubs in two version for native and bytecode
3184 (Olivier Nicole, review by Sébastien Hinderer and Xavier Leroy)
3185
3186 - #12265: Stop adding -lexecinfo to cclibs (leftover debugging code from the
3187 multicore project). Harden the feature probe for -lm in configure so -lm is
3188 only added if strictly necessary. configure.ac now correctly propagates
3189 library flags for the Windows ports, allowing Windows OCaml to be configured
3190 with ZSTD support.
3191 (David Allsopp, review by Sébastien Hinderer)
3192
3193 ### Bug fixes:
3194
3195 - #8813, #12029: In the toplevel, let the user type several phrases in one line
3196 (Damien Doligez, report by Daniel Bünzli, review by Gabriel Scherer and
3197 Wiktor Kuchta)
3198
3199 - #12062: fix runtime events consumer: when events are dropped they shouldn't be
3200 parsed. (Lucas Pluvinage)
3201
3202 - #12132: Fix overcounting of minor collections in GC stats.
3203 (Damien Doligez, review by Gabriel Scherer)
3204
3205 - #12017: Re-register finaliser only after calling user alarm in Gc.create_alarm
3206 (Fabrice Buoro, report by Sam Goldman, review by Guillaume Munch-Maccagnoni)
3207
3208 - #11887, #11893: Code duplication in pattern-matching compilation
3209 (Vincent Laviron, report par Greta Yorsh, review by Luc Maranget and
3210 Gabriel Scherer)
3211
3212 - #10664, #11600: Unsoundness in the typing of polymorphic methods
3213 involving polymorphic variants
3214 (Jacques Garrigue, report by Mike Shulman, review by Gabriel Scherer)
3215
3216 - #11302, #11412: `ocamlc` and `ocamlopt` should not remove generated files
3217 when they are not regular files.
3218 (Xavier Leroy, report by Thierry Martinez, review by
3219 Anil Madhavapeddy, Nicolás Ojeda Bär, David Allsopp)
3220
3221 - #10348, #10560, #11561: Expand GADT equations lazily during unification to
3222 avoid ambiguity
3223 (Jacques Garrigue, review by Leo White)
3224
3225 - #11436: Fix wrong stack backtrace for out-of-bound exceptions raised
3226 by leaf functions.
3227 (Tom Kelly and Xavier Leroy, review by Mark Shinwell)
3228
3229 - #11450, #12018: Fix erroneous functor error messages that were too eager to
3230 cast `struct end` functor arguments as unit modules in `F(struct end)`.
3231 (Florian Angeletti, review by Gabriel Scherer)
3232
3233 - #11643: Add missing test declaration to float_compare test, so that it will
3234 run.
3235 (Stefan Muenzel, review by David Allsopp)
3236
3237 - #11630: Use correct location when reporting record labels with non-existent
3238 paths.
3239 (Nicolás Ojeda Bär, report by Jason Gross, review by Gabriel Scherer)
3240
3241 - #11727: Ensure push_defaults can push past module patterns, fixing an
3242 currying optimisation accidentally disabled by #10340.
3243 (Stephen Dolan, review by Gabriel Scherer)
3244
3245 - #11771: Use a more relaxed mode for unification in Ctype.subst
3246 (Leo White, review by Jacques Garrigue and Gabriel Scherer)
3247
3248 - #11803, #11808: on x86, the destination of an integer comparison must be
3249 a register, it cannot be a stack slot.
3250 (Vincent Laviron, review by Xavier Leroy, report by
3251 Emilio Jesús Gallego Arias)
3252
3253 - #11809: Protect Parmatch.pats_of_type from missing cmis
3254 (Jacques Garrigue, review by Stephen Dolan and Gabriel Scherer)
3255
3256 - #11824: Fix a crash when calling `ocamlrun -b`
3257 (Florian Angeletti, review by Sébastien Hinderer)
3258
3259 - #11815: Marshalling continuations raises invalid argument exception.
3260 (Jérôme Vouillon, review by Nicolás Ojeda Bär, Stephen Dolan and
3261 Hugo Heuzard)
3262
3263 - #11846: Mark rbx as destroyed at C call for Win64 (mingw-w64 and Cygwin64).
3264 Reserve the shadow store for the ABI in the c_stack_link struct instead of
3265 explicitly when calling C functions. This simultaneously reduces the number of
3266 stack pointer manipulations and also fixes a bug when calling noalloc
3267 functions where the shadow store was not being reserved.
3268 (David Allsopp, report by Vesa Karvonen, review by Xavier Leroy and
3269 KC Sivaramakrishnan)
3270
3271 - #11850: When stopping before the `emit` phase (using `-stop-after`), an empty
3272 temporary assembly file is no longer left in the file system.
3273 (Nicolás Ojeda Bär, review by Gabriel Scherer and Xavier Leroy)
3274
3275 - #11866: Fix the result of `caml_read_directory()` on non-existent paths.
3276 (Andrei Paskevich and Charlène Gros, review by David Allsopp and
3277 Nicolás Ojeda Bär)
3278
3279 - #11879: Bugfix for Ctype.nondep_type
3280 (Stephen Dolan, review by Gabriel Scherer)
3281
3282 - #12004: Don't ignore function attributes on lambdas with locally abstract
3283 types.
3284 (Chris Casinghino, review by Gabriel Scherer)
3285
3286 - #12037: Fix some data races by using volatile when necessary
3287 (Fabrice Buoro and Olivier Nicole, review by Guillaume Munch-Maccagnoni,
3288 Gabriel Scherer and Luc Maranget)
3289
3290 - #12046: Flush stderr when tracing the parser
3291 (Hugo Heuzard, review by David Allsopp and Nicolás Ojeda Bär)
3292
3293 - #12061, #12063: don't add inconsistent equalities when computing
3294 high-level error messages for functor applications and inclusions.
3295 (Florian Angeletti, review by Gabriel Scherer)
3296
3297 - #12075: auto-detect whether `ar` support @FILE arguments at
3298 configure-time to avoid using this feature with toolchains
3299 that do not support it (eg FreeBSD/Darwin).
3300 (Nicolás Ojeda Bär, review by Xavier Leroy, David Allsopp, Javier
3301 Chávarri, Anil Madhavapeddy)
3302
3303 - #12103, 12104: fix a concurrency memory-safety bug in Buffer
3304 (Gabriel Scherer, review by Florian Angeletti, report by Samuel Hym)
3305
3306 - #12112: Fix caml_callback{2,3}_exn when used with effect handlers.
3307 (Lucas Pluvinage, review by Gabriel Scherer, David Allsopp and Xavier Leroy)
3308
3309 - #12134: Use ghost location for nodes created when handling defaults in
3310 optional arguments.
3311 (Paul-Elliot Anglès d'Auriac, review by Gabriel Scherer)
3312
3313 - #12153: Fix segfault in bytecode programs involving recursive value
3314 definitions of values of size 0
3315 (Vincent Laviron, Xavier Leroy, Gabriel Scherer,
3316 review by Xavier Leroy, report by Nick Roberts)
3317
3318 - #12162: Fix miscompilation on amd64 backends involving integer overflows
3319 (Vincent Laviron and Greta Yorsh, review by Stefan Muenzel)
3320
3321 - #12170: fix pthread_geaffinity_np configure check for android
3322 (David Allsopp, review by Sébastien Hinderer)
3323
3324 - #12178: Fix runtime events consumer poll function returning an invalid value
3325 instead of an OCaml integer value. (Lucas Pluvinage)
3326
3327 - #12252: Fix shared library build error on RISC-V.
3328 (Edwin Török, review by Nicolás Ojeda Bär and Xavier Leroy)
3329
3330 - #12255, #12256: Handle large signal numbers correctly (Nick Barnes,
3331 review by David Allsopp).
3332
3333 - #12277: ARM64, fix a potential assembler error for very large functions by
3334 emitting stack reallocation code before the body of the function.
3335 (Xavier Leroy, review by KC Sivaramakrishnan)
3336
3337 - #12253, #12342: Fix infinite loop in signal handling.
3338 (Guillaume Munch-Maccagnoni, report by Thomas Leonard, review by
3339 KC Sivaramakrishnan and Sadiq Jaffer)
3340
3341 - #12445: missing GC root registrations in runtime/io.c
3342 (Gabriel Scherer, review by Xavier Leroy and Jeremy Yallop)
3343
3344 - #12481, #12505: Fix incorrect initialization of array expressions
3345 `[|e1;...;eN|]` when `N` is large enough to require major heap allocation.
3346 (Xavier Leroy, report by Andrey Popp, analysis by KC Sivaramakrishnan
3347 and Vincent Laviron, review by Gabriel Scherer)
3348
3349 - #11150, #11207, #11936: Avoid recomputation in Typedecl.check_wellfounded
3350 (Jacques Garrigue, report by Boris Yakobowski, review by Gabriel Scherer)
3351
3352 - #11186, #11188: Fix composition of coercions with aliases
3353 (Vincent Laviron, report and review by Leo White)
3354
3355 - #12486: Fix delivery of unhandled effect exceptions on s390x
3356 (Miod Vallat, report by Jan Midtgaard, review by Vincent Laviron and Xavier
3357 Leroy)
3358
3359 OCaml 5.0.0 (15 December 2022)
3360 ------------------------------
3361
3362 - #10831: Multicore OCaml
3363 (Enguerrand Decorne, Stephen Dolan, Tom Kelly, Sadiq Jaffer,
3364 Anil Madhavapeddy, Sudha Parimala, KC Sivaramakrishnan,
3365 Leo White, the Tarides multicore team,
3366 review by Florian Angeletti, Damien Doligez, Xavier Leroy,
3367 Guillaume Munch-Maccagnoni, Olivier Nicole, Nicolás Ojeda Bär,
3368 Gabriel Scherer, the OCaml core development team, and many
3369 other valued reviewers.)
3370
3371 ### Language features:
3372
3373 ### Runtime system:
3374
3375 - #11400: Runtime events counters fixes
3376 Fixes mismatch between OCaml and C APIs, removes events from 4.x that
3377 are not present in the 5.0 GC and adds some missing probes.
3378 (Sadiq Jaffer, review by Gabriel Scherer, Florian Angeletti)
3379
3380 - #11368: Runtime events buffer size OCAMLRUNPARAMS fix
3381 The runtime events buffer size can now be set via the 'e' OCAMLRUNPARAM.
3382 This is previously mistakenly enabled/disabled tracing instead.
3383 (Sadiq Jaffer, review by KC Sivaramakrishnan, David Allsopp, Damien Doligez)
3384
3385 - #11308: Add environment variable to preserve runtime_events after exit
3386 If the environment variable OCAML_RUNTIME_EVENTS_PRESERVE exists then the
3387 runtime will not remove the runtime events ring buffers at exit. This
3388 makes tracing very short running programs more reliable.
3389 (Sadiq Jaffer, review by KC Sivaramakrishnan)
3390
3391 - #10964: Ring-buffer based runtime tracing (runtime_events)
3392 Runtime_events is a very low overhead runtime tracing system designed for
3393 continuous monitoring of OCaml applications.
3394 (Sadiq Jaffer, review by Anil Madhavapeddy, Enguerrand Decorne,
3395 Richard Warburton, Gabriel Scherer, Sabine Schmaltz, Florian Angeletti,
3396 Patrick Ferris, Tom Kelly)
3397
3398 * #10723: do not use `-flat-namespace` linking for macOS.
3399 (Carlo Cabrera, review by Damien Doligez)
3400
3401 * #10863, #10933: Remove support for old, unprefixed C runtime function names
3402 such as `alloc`. The new names prefixed with `caml_` must be used instead,
3403 such as `caml_alloc`. Consequently, it is no longer needed to define
3404 `CAML_NAME_SPACE` to avoid bringing unprefixed names into scope: this is now
3405 the default behavior.
3406 (Nicolás Ojeda Bär, review by Xavier Leroy)
3407
3408 - #10902: Do not register empty code fragments in natdynlink.
3409 (David Allsopp, review by Xavier Leroy and Damien Doligez)
3410
3411 - #10965: `caml_fatal_error_hook`, GC timing hooks, and
3412 `caml_scan_roots_hook` are now atomic variables. Restore GC timing
3413 hooks in multicore.
3414 (Guillaume Munch-Maccagnoni, review by Enguerrand Decorne, Xavier
3415 Leroy, Gabriel Scherer, and KC Sivaramakrishnan)
3416
3417 - #11209: Add a public and thread-safe timing hook running at domain
3418 termination, after this domain has stopped running any OCaml code:
3419 `caml_domain_terminated_hook`. This can be useful for implementing
3420 domain-local state in C.
3421 (Guillaume Munch-Maccagnoni, review by Xavier Leroy and Gabriel
3422 Scherer)
3423
3424 - #10875, #11731: Add option to allocate fiber stacks and sigaltstacks with
3425 mmap(MAP_STACK) instead of malloc. This is exposed via a configure
3426 --enable-mmap-map-stack option, and is enabled by default on OpenBSD where
3427 it is mandatory.
3428 (Anil Madhavapeddy, review by Gabriel Scherer, Tom Kelly,
3429 Michael Hendricks and KC Sivaramakrishnan).
3430
3431 - #10950: Do not use mmap to allocate Caml_state.
3432 In order to reduce virtual memory usage, we dynamically allocate
3433 the domain_state structure.
3434 (Enguerrand Decorne, KC Sivaramakrishnan and Tom Kelly,
3435 review by Anil Madhavapeddy and Gabriel Scherer)
3436
3437 - #11010: Use strerror_r for reentrant error string conversion.
3438 (Anil Madhavapeddy and Xavier Leroy, review by same and Edwin Török)
3439
3440 - #11002, #11066, #11086: Do not use Begin_roots/End_roots macros in
3441 the runtime system. Also fix a missing root registration in the
3442 implementation of Unix.write on Windows.
3443 (Nicolás Ojeda Bär, Daniel Bünzli and Antonin Décimo,
3444 review by Xavier Leroy and David Allsopp)
3445
3446 - #11022: Track GC work for all managed bigarray allocations
3447 (Stephen Dolan, report by Andrew Hunter, review by Damien Doligez)
3448
3449 - #10802: Use 4.12 value macros and helpers in C code
3450 (Antonin Décimo, review by Gabriel Scherer)
3451
3452 - #11105: Fix handling of fiber stack cache with multiple domains
3453 (Jon Ludlam, KC Sivaramakrishnan and Tom Kelly)
3454
3455 - #11054: Respect user provided maximum stack space
3456 Make sure the stack we initially request is sized accordingly to
3457 the user provided settings. tmc/stack_space is also updated by
3458 this PR in order to account for this change.
3459 (Enguerrand Decorne, report by Jon Ludlam,
3460 review by Tom Kelly, KC Sivaramakrishnan and Gabriel Scherer)
3461
3462 - #11238: Increase the default limit for the stack size to 128 Mi words,
3463 i.e. 1 Gib for 64-bit platforms and 512 Mib for 32-bit platforms.
3464 (Xavier Leroy, review by Sébastien Hinderer)
3465
3466 * #11295: An ISO C 2011 compliant compiler, including full support for atomic
3467 types, is now required to build the OCaml runtime system.
3468 (Xavier Leroy, review by David Allsopp and Sébastien Hinderer)
3469
3470 - #10915, #11039, #11057, #11095, #11190: Implement quality treatment for
3471 asynchronous actions in multicore. Reimplement the old behaviour of
3472 `caml_process_pending*` for multicore.
3473 (Guillaume Munch-Maccagnoni, review by Sadiq Jaffer and Gabriel Scherer)
3474
3475 - #11303: Ensure that GC is not invoked from bounds check failures
3476 (Stephen Dolan, review by Sadiq Jaffer and Xavier Leroy)
3477
3478 - #11304: Fix data race on Windows file descriptors
3479 (Olivier Nicole and Xavier Leroy, review by Xavier Leroy, David Allsopp,
3480 and Sadiq Jaffer)
3481
3482 * #11337: pass 'flags' metadata to root scanners, to optimize stack
3483 scanning in the bytecode interpreter.
3484 Changes the interface of user-provided root-scanning hooks.
3485 (Gabriel Scherer, review by Xavier Leroy,
3486 Guillaume Munch-Maccagnoni, Sadiq Jaffer and Tom Kelly)
3487
3488 * #11255: in the C interface, `&Field(v, i)` now has type `volatile value *`
3489 instead of `value *` in OCaml 4. This makes the memory model
3490 for mixed OCaml/C code better defined, but can cause warnings or type
3491 errors in user C code.
3492 (KC Sivaramakrishnan, review by Xavier Leroy, Gabriel Scherer and
3493 Guillaume Munch-Maccagnoni, additional discussions with Stephen
3494 Dolan and Luc Maranget)
3495
3496 - #5299, #4787, #11138, #11272, #11506: To help debugging, `Caml_state`
3497 now dynamically checks that the domain lock is held, and fails
3498 otherwise (with a fatal error at most entry points of the C API, or
3499 systematically in debug mode). A new variable `Caml_state_opt` is
3500 introduced, and is `NULL` when the domain lock is not held. This
3501 allows to test from C code if the current thread holds the lock of
3502 its domain.
3503 (Guillaume Munch-Maccagnoni, review by Florian Angeletti, Damien
3504 Doligez, Sadiq Jaffer, Xavier Leroy, and Gabriel Scherer)
3505
3506 - #11223: The serialization format of custom blocks changed in 4.08,
3507 but the deserializer would still support the pre-4.08 format. OCaml
3508 5.x removed support for this old format; provide a clear error message
3509 in this case.
3510 (Hugo Heuzard, review by Gabriel Scherer)
3511
3512 - #11504, #11522: Use static allocation in `caml_make_float_vect` in
3513 no-flat-float-array mode, it's more efficient and avoids a a race condition
3514 (Xavier Leroy, report by Guillaume Munch-Maccagnoni, review by David Allsopp)
3515
3516 - #11652: Fix benign off-by-one error in Windows implementation of caml_mem_map.
3517 (David Allsopp, review by Gabriel Scherer)
3518
3519 - #11669, #11704: Fix construction of Effect.Unhandled exceptions in the
3520 bytecode interpreter.
3521 (David Allsopp and Xavier Leroy, report by Samuel Hym, review by Xavier Leroy
3522 and Gabriel Scherer)
3523
3524 ### Code generation and optimizations:
3525
3526 - #10972: ARM64 multicore support: OCaml & C stack separation;
3527 dynamic stack size checks; fiber and effects support.
3528 (Tom Kelly and Xavier Leroy, review by KC Sivaramakrishnan, Xavier Leroy,
3529 Guillaume Munch-Maccagnoni, Eduardo Rafael, Stephen Dolan and
3530 Gabriel Scherer)
3531
3532 ### Standard library:
3533
3534 - #10742: Use LXM as the pseudo-random number generator for module Random.
3535 Add `Random.State.split` and `Random.split` to "split" a PRNG off
3536 another PRNG.
3537 (Xavier Leroy, review by Gabriel Scherer and Hugo Heuzard)
3538
3539 * #10867, #11345: Remove deprecated values: Array.create, Array.make_float,
3540 Array.create_matrix, Bytes.uppercase, Bytes.lowercase, Bytes.capitalize,
3541 Bytes.uncapitalize, Char.lowercase, Char.uppercase, Filename.temp_dir_name,
3542 Int32.format, Int64.format, Nativeint.format, Format.bprintf, Format.kprintf,
3543 Format.set_all_formatter_output_functions,
3544 Format.get_all_formatter_output_functions,
3545 Format.pp_set_all_formatter_output_functions,
3546 Format.pp_get_all_formatter_output_functions, Format.pp_open_tag,
3547 Format.pp_close_tag, Format.open_tag, Format.close_tag,
3548 Format.formatter_tag_functions, Format.pp_set_formatter_tag_functions,
3549 Format.pp_get_formatter_tag_functions, Format.set_formatter_tag_functions,
3550 Format.get_formatter_tag_functions, Gc (mutability of the fields of type
3551 Gc.control), Lazy.lazy_from_fun, Lazy.lazy_from_val, Lazy.lazy_is_val,
3552 Obj.set_tag, Obj.truncate, Obj.final_tag, Obj.extension_constructor,
3553 Obj.extension_name, Obj.extension_id, Scanf.stdib, Scanf.fscanf,
3554 Scanf.kfscanf, Stdlib.( & ), Stdlib.( or ), String.set, String.copy,
3555 String.fill, String.unsafe_set, String.unsafe_fill, String.uppercase,
3556 String.lowercase, String.capitalize, String.uncapitalize, Thread.kill,
3557 Thread.wait_write, Thread.wait_read, the whole ThreadUnix module, the
3558 infix operator (.[]<-).
3559 (Nicolás Ojeda Bär, review by Damien Doligez)
3560
3561 * #10896: Remove Stream, Genlex and Pervasives. Also remove legacy standalone
3562 bigarray library (the Bigarray module is now part of the standard library).
3563 (Nicolás Ojeda Bär, review by Kate Deplaix and Anil Madhavapeddy)
3564
3565 - #10921: Use getentropy, when available, to seed the generator during
3566 `Random.self_init`
3567 (Michael Hendricks, review by Gabriel Scherer, Xavier Leroy, and
3568 Anil Madhavapeddy)
3569
3570 * #10924: Add deprecated attribute to Printexc.catch, Printf.kprintf and
3571 Unix.SO_ERROR.
3572 (Nicolás Ojeda Bär, review by Damien Doligez)
3573
3574 - #10986: Add Scanf.sscanf_opt, Scanf.bscanf_opt and Scanf.scanf_opt.
3575 (Nicolás Ojeda Bär, review by Florian Angeletti and Gabriel Scherer)
3576
3577 * #11157: Rename "hash" in the "Hashtbl.SeededHashedType" signature to
3578 "seeded_hash". This allows defining both seeded and unseeded hash functions in
3579 the same module.
3580 (Nicolás Ojeda Bär, review by Gabriel Scherer and Xavier Leroy)
3581
3582 - #8878: Add String.hash and String.seeded_hash.
3583 (Tom Kelly, review by Alain Frisch and Nicolás Ojeda Bär)
3584
3585 - #11279, #11585, #11742: ensure that the unsafe Buffer code
3586 remains memory-safe in concurrent settings.
3587 Unsynchronized access to Buffer is a programming error and may
3588 result in wrong behavior, but it should preserve memory-safety.
3589 (Florian Angeletti and Gabriel Scherer, review by Gabriel Scherer
3590 and Vincent Laviron, report by David Allsopp)
3591
3592
3593 ### Other libraries:
3594
3595 * #9071, #9100, #10935: Reimplement `Thread.exit()` as raising the
3596 exception `Thread.Exit`, and mark `Thread.exit` as deprecated.
3597 The new implementation changes the behavior compared with
3598 the OCaml 4 implementation. For example, the new implementation
3599 causes `Fun.finally` finalizers to be run and catch-all exception
3600 handlers to prevent termination.
3601 (Jacques-Henri Jourdan and Xavier Leroy, review by Damien Doligez,
3602 Guillaume Munch-Maccagnoni, Gabriel Scherer, and Enguerrand Decorne)
3603
3604 - #11034: Dynlink library, add a global lock to make dynlinking
3605 thread-safe.
3606 (Florian Angeletti, review by Gabriel Scherer)
3607
3608 - #11087: deprecate Thread.wait_timed_read, Thread.wait_timed_write,
3609 Thread.select, Thread.wait_pid. The same functionality is available in the
3610 Unix module.
3611 (Nicolás Ojeda Bär, review by Anil Madhavapeddy)
3612
3613 - #11309, #11424, #11427, #11545: Add Domain.recommended_domain_count.
3614 (Christiano Haesbaert, Konstantin Belousov, review by David Allsopp,
3615 KC Sivaramakrishnan, Gabriel Scherer, Nicolás Ojeda Bär)
3616
3617 - #11461, #11466: Fix gethostbyaddr for IPv6 arguments and make it domain-safe
3618 (Olivier Nicole, Nicolás Ojeda Bär, David Allsopp and Xavier Leroy,
3619 review by the same)
3620
3621 - #11479: Make Unix.symlink domain-safe on Windows
3622 (Olivier Nicole, review by Xavier Leroy and David Allsopp)
3623
3624 ### Tools:
3625
3626 * #11004: Litmus tests for checking the implementation of the
3627 memory model.
3628 (Luc Maranget, review by Gabriel Scherer and Xavier Leroy)
3629
3630 - #11024: Handle alerts in ocamldoc.
3631 The alert `[@@alert deprecated]` is handled specifically and it's no longer
3632 needed to duplicate the deprecated annotation (the alert for the compiler and
3633 the tag for the documentation). Every other alerts also appear in the
3634 documentation.
3635 (Jules Aguillon, review by Florian Angeletti)
3636
3637 - #11065: Port the bytecode debugger to 5.0, adding support for effect handlers.
3638 (Damien Doligez and @fabbing, review by @fabbing and Xavier Leroy)
3639
3640 - #11079: Add the -nobanners option to dumpobj.
3641 (Sébastien Hinderer, review by Gabriel Scherer and Vincent Laviron)
3642
3643 - #11100: Fix ocamltest to make sure failed tests are not counted as
3644 "unexpected error".
3645 (Damien Doligez, review by Sébastien Hinderer)
3646
3647 - #11245: Merge the common code of ocamlcp and ocamloptp into a single module.
3648 (David Allsopp, review by Sébastien Hinderer)
3649
3650 - #11382: OCamlmktop use a new initialization module "OCamlmktop_init" to
3651 preserve backward-compatibility with user-module provided modules that install
3652 toplevel printers.
3653 (Florian Angeletti, review by Gabriel Scherer and David Allsopp)
3654
3655 ### Manual and documentation:
3656
3657 - #11058: runtime/HACKING.adoc tips on debugging the runtime
3658 (Gabriel Scherer, review by Enguerrand Decorne and Nicolás Ojeda Bär)
3659
3660 - #11093: Add an effect handlers tutorial
3661 (KC Sivaramakrishnan, review by François Pottier, Gabriel Scherer, François
3662 Bobot and Wiktor Kuchta)
3663
3664 - #11192: Better documentation for condition variables.
3665 (François Pottier, review by Luc Maranget, Xavier Leroy, and Wiktor Kuchta)
3666
3667 - #11093: Add tutorials on parallelism features and the relaxed memory model
3668 (KC Sivaramakrishnan, review by Damien Doligez, Anil Madhavapeddy, Gabriel
3669 Scherer, Thomas Leonard, Tom Ridge, Xavier Leroy, Luc Maranget, Fabrice
3670 Buoro, Olivier Nicole, Guillaume Munch-Maccagnoni, Jacques-Henri Jourdan)
3671
3672 - #11640, #11647: Add missing options to the man pages:
3673 flambda commonly-used options, and negative options (`-no-rectypes`, ... ).
3674 (Amandine Nangah, review by David Allsopp, Florian Angeletti,
3675 Sébastien Hinderer, and Vincent Laviron)
3676
3677 - #11676: Fix missing since annotation in the `Sys` and `Format` modules
3678 (Github user Bukolab99, review by Florian Angeletti)
3679
3680 - #11813: Make new multicore chapters easier to discover, and emphasize impact
3681 on C bindings.
3682 (Edwin Török, review by KC Sivaramakrishnan, and Florian Angeletti)
3683
3684 ### Compiler user-interface and warnings:
3685
3686 - #9140, #11131: New command-line flag -nocwd to not include implicit
3687 the current directory to the load path.
3688 (Thomas Roglin, review by Gabriel Scherer and Nicolás Ojeda Bär)
3689
3690 - #11089: Add 'since <version>' information to compiler warnings.
3691 (André Maroneze, review by Florian Angeletti and Gabriel Scherer)
3692
3693 - #10909: Disable warning 59 (assignment to immutable blocks) unless flambda
3694 invariant checks are enabled.
3695 (Vincent Laviron, review by Gabriel Scherer)
3696
3697 - #10981, #11276: Implement a -cmi-file option for ocamlc and ocamlopt.
3698 (Sébastien Hinderer, review by Damien Doligez, Daniel Bünzli and
3699 Florian Angeletti)
3700
3701 * #11049: Stop padding 1-digit compiler minor version numbers.
3702 (So for instance OCaml 5.0 rather than 5.00)
3703 (Sébastien Hinderer, review by David Allsopp, Florian Angeletti and
3704 Xavier Leroy)
3705
3706 - #11253: Deprecate `ocaml script` and `ocamlnat` script where `script` has no
3707 extension and is an implicit basename.
3708 (David Allsopp, review by Florian Angeletti and Sébastien Hinderer)
3709
3710 ### Internal/compiler-libs changes:
3711
3712 - #10878, #10909: restore flambda after the Multicore merge.
3713 (Vincent Laviron, review by Gabriel Scherer and Xavier Leroy)
3714
3715 - #10864, #10888: restore afl-fuzz mode for sequential programs.
3716 (Jan Midtgaard, review by Xavier Leroy and Gabriel Scherer)
3717
3718 - #11008, #11047: rework GC statistics in the Multicore runtime
3719 (Gabriel Scherer, review by Enguerrand Decorne)
3720
3721 - #11058: basic debugging documentation in runtime/HACKING.adoc
3722 (Gabriel Scherer, review by Enguerrand Decorne and Nicolás Ojeda Bär)
3723
3724 - #11199: Stop installing topdirs.cmi twice. The toplevel now reads topdirs.cmi
3725 from +compiler-libs, as the debugger does.
3726 (David Allsopp, review by Sébastien Hinderer)
3727
3728 - #11007, #11399: META files for the stdlib, compiler-libs and other libraries
3729 (unix, dynlink, str, runtime_events, threads, ocamldoc) are now installed
3730 along with the compiler.
3731 (David Allsopp, Florian Angeletti, Nicolás Ojeda Bär and Sébastien Hinderer,
3732 review by Daniel Bünzli, Kate Deplaix, Anil Madhavapeddy and Gabriel Scherer)
3733
3734 ### Build system:
3735
3736 * #10893: Remove configuration options --disable-force-safe-string and
3737 DEFAULT_STRING=unsafe as well as --enable-force-safe-string and
3738 DEFAULT_STRING=safe which are now the default unconditionally.
3739 (Kate Deplaix, review by Gabriel Scherer and David Allsopp)
3740
3741 - #11092: Build native-code compilers on OpenBSD/aarch64.
3742 (Christopher Zimmermann, review by Anil Madhavapeddy)
3743
3744 - #11126: Build system: make it possible to choose which ocamldep
3745 (and flags) to use when computing dependencies for the compiler.
3746 Add a -no-slash option to ocamldep to let users override -slash.
3747 (Sébastien Hinderer, review by David Allsopp)
3748
3749 - #11147: Factorize the stdlib-related compilation flags. Make it
3750 possible to control them consistently through the STDLIBFLAGS
3751 build variable. Make sure ocamldoc and ocamllex get compiled and
3752 linked with debugging information (-g).
3753 (Sébastien Hinderer, review by Gabriel Scherer)
3754
3755 - #11149: Make the bootstrap process reproducible on systems with non-big-endian
3756 floating point. If the boot/ artefacts are up-to-date, this means that running
3757 make bootstrap on any platform should not change the images in boot/ and paves
3758 the way for automated testing that the bootstrap is repeatable.
3759 (David Allsopp, review by Damien Doligez and Sébastien Hinderer)
3760
3761 - #11160: otherlibs: merge win32unix into unix.
3762 (Sébastien Hinderer, review by David Allsopp, Nicolás Ojeda Bär,
3763 Xavier Leroy, Vincent Laviron and Antonin Décimo)
3764
3765 * #11198, #11298: Install the Dynlink, Str and Unix libraries to individual
3766 subdirectories of LIBDIR. The compiler, debugger and toplevel automatically
3767 add `-I +lib` if required, but display an alert.
3768 (David Allsopp, review by Florian Angeletti, Nicolás Ojeda Bär,
3769 Valentin Gatien-Baron and Sébastien Hinderer)
3770
3771 - #11200: Install ocamlprof's Profiling runtime module to a +profiling,
3772 removing it from the default namespace.
3773 (David Allsopp, review by Sébastien Hinderer)
3774
3775 - #11294: Switch minimum required autoconf to 2.71.
3776 (David Allsopp, review by Xavier Leroy)
3777
3778 - #11097: Build native-code compilers on NetBSD/aarch64
3779 (Kate Deplaix, review by Anil Madhavapeddy)
3780
3781 ### Bug fixes:
3782
3783 - #10790: don't drop variance and injectivity annotations when pretty printing
3784 `with` constraints (for example, `with type +!'a t = ...`).
3785 (Florian Angeletti, report by Luke Maurer, review by Matthew Ryan and
3786 Gabriel Scherer)
3787
3788 - #11167: Fix memory leak from signal stack.
3789 (Antoni Żewierżejew, review by Gabriel Scherer and Enguerrand Decorne)
3790
3791 - #11112: harden -use-runtime against spaces or quotes in the provided path
3792 (Gabriel Scherer, report by Brahima Dibassi, review by David Allsopp)
3793
3794 - #11068, #11070: Fix typo in function name given in Unix_error exception for
3795 Unix.readlink on Windows.
3796 (David Allsopp, report by Xia Li-yao)
3797
3798 - #10807: Don't duplicate standard handles in the child process
3799 spawned by win32unix Unix.create_process if the handles were already
3800 inheritable. Fix broken signalling of EOF on standard handles if
3801 they were already inheritable.
3802 (Antonin Décimo, review by Xavier Leroy and Nicolás Ojeda Bär)
3803
3804 - #10868: Fix off-by-1 bug when initializing frame hashtables
3805 (Jonah Beckford, review by Tom Kelly, Nicolás Ojeda Bär and
3806 KC Sivaramakrishnan)
3807
3808 - #11077: Make dumpobj compatible with absence of naked pointer support
3809 (Olivier Nicole and Jan Midtgaard, review by Gabriel Scherer)
3810
3811 - #11111: fix fork() usage in ocamltest C code.
3812 When calling fork() from C code with the Multicore runtime active,
3813 one needs to call caml_atfork_hook() on the forked child before it
3814 can use the OCaml runtime.
3815 (Gabriel Scherer, review by Xavier Leroy, report by Brahima Dibassi)
3816
3817 - #10809: Use the WSA_FLAG_NO_HANDLE_INHERIT on Windows when creating
3818 sockets with WSASocket if the cloexec (non-inheritable) parameter is
3819 true. Fixes a race condition where a child process could inherit the
3820 socket and deadlock the parent.
3821 (Antonin Décimo, review by Xavier Leroy)
3822
3823 - #11289, #11405: fix some leaks on systhread termination
3824 (Fabrice Buoro, Enguerrand Decorne, Gabriel Scherer,
3825 review by Xavier Leroy and Florian Angeletti, report by Romain Beauxis)
3826
3827 - #11314, #11416: fix non-informative error message for module inclusion
3828 (Florian Angeletti, report by Thierry Martinez, review by Gabriel Scherer)
3829
3830 - #11358, #11379: Refactor the initialization of bytecode threading,
3831 This avoids a "dangling pointer" warning of GCC 12.1.
3832 (Xavier Leroy, report by Armaël Guéneau, review by Gabriel Scherer)
3833
3834 - #11387, module type with constraints no longer crash the compiler in presence
3835 of both shadowing warnings and the `-bin-annot` compiler flag.
3836 (Florian Angeletti, report by Christophe Raffalli, review by Gabriel Scherer)
3837
3838 - #11482, #11542: Fix random crash in large closure allocation
3839 (Damien Doligez, report by Thierry Martinez and Vincent Laviron, review by
3840 Xavier Leroy)
3841
3842 - #11508, #11509: make Bytes.escaped domain-safe
3843 (Christiano Haesbaert and Gabriel Scherer,
3844 review by Xavier Leroy,
3845 report by Jan Midtgaard and Tom Kelly)
3846
3847 - #11576: Fix bug in Bigarray.Genarray.init in the the case of zero-dimensional
3848 arrays.
3849 (Nicolás Ojeda Bär, Jeremy Yallop, report by Masayuki Takeda, review by Jeremy
3850 Yallop and Florian Angeletti)
3851
3852 - #11587: Prevent integer comparison from being used on pointers
3853 (Vincent Laviron, review by Gabriel Scherer)
3854
3855 - #11662, #11673: fix a memory leak when using Dynlink,
3856 the bug was only present in development version of OCaml 5.
3857 (Stephen Dolan, report by Andre Maroneze, review by Gabriel Scherer)
3858
3859
3860 OCaml 4.14 maintenance version
3861 ------------------------------
3862
3863 ### Runtime system:
3864
3865 - #11764, #12577: Add prototypes to old-style C function definitions
3866 and declarations.
3867 (Antonin Décimo, review by Xavier Leroy and Nick Barnes)
3868
3869 - #11763, #11759, #11861, #12509, #12577: Use strict prototypes on primitives.
3870 (Antonin Décimo, review by Xavier Leroy, David Allsopp, Sébastien
3871 Hinderer and Nick Barnes)
3872
3873 ### Build system:
3874
3875 - #11590: Allow installing to a destination path containing spaces.
3876 (Élie Brami, review by Sébastien Hinderer and David Allsopp)
3877
3878 - #12372: Pass option -no-execute-only to the linker for OpenBSD >= 7.3
3879 so that code sections remain readable, as needed for closure marshaling.
3880 (Xavier Leroy and Anil Madhavapeddy, review by Anil Madhavapeddy and
3881 Sébastien Hinderer)
3882
3883 - #12903: Disable control flow integrity on OpenBSD >= 7.4 to avoid
3884 illegal instruction errors on certain CPUs.
3885 (Michael Hendricks, review by Miod Vallat)
3886
3887 ### Bug fixes:
3888
3889 - #12878: fix incorrect treatment of injectivity for private recursive types.
3890 (Jeremy Yallop, review by Gabriel Scherer and Jacques Garrigue)
3891
3892 - #12971, #12974: fix an uncaught Ctype.Escape exception on some
3893 invalid programs forming recursive types.
3894 (Gabriel Scherer, review by Florian Angeletti, report by Neven Villani)
3895
3896 - #12264, #12289: Fix compact_allocate to avoid a pathological case
3897 that causes very slow compaction.
3898 (Damien Doligez, report by Arseniy Alekseyev, review by Sadiq Jaffer)
3899
3900 * #10845 Emit frametable size on amd64 BSD (OpenBSD, FreeBSD, NetBSD) systems
3901 (emitted for Linux in #8805)
3902 (Hannes Mehnert, review by Nicolás Ojeda Bär)
3903
3904 - #13448, #13449: fix a code-generation bug on unsafe array accesses
3905 at type int32, int64, nativeint, which has been introduced in OCaml 4.04.
3906 (Gabriel Scherer, review by Nicolás Ojeda Bär and Vincent Laviron,
3907 report by Raphaël Bocquet and Simon Cruanes)
3908
3909 OCaml 4.14.1 (20 December 2022)
3910 ------------------------------
3911
3912 ### Compiler user-interface and warnings:
3913
3914 - #11184, #11670: Stop calling ranlib on created / installed libraries
3915 (Sébastien Hinderer and Xavier Leroy, review by the same)
3916
3917 ### Build system:
3918
3919 - #11370, #11373: Don't pass CFLAGS to flexlink during configure.
3920 (David Allsopp, report by William Hu, review by Xavier Leroy and
3921 Sébastien Hinderer)
3922
3923 - #11487: Thwart FMA test optimization during configure
3924 (William Hu, review by David Allsopp and Sébastien Hinderer)
3925
3926 ### Bug fixes:
3927
3928 - #10768, #11340: Fix typechecking regression when combining first class
3929 modules and GADTs.
3930 (Jacques Garrigue, report by François Thiré, review by Matthew Ryan)
3931
3932 - #11204: Fix regression introduced in 4.14.0 that would trigger Warning 17 when
3933 calling virtual methods introduced by constraining the self type from within
3934 the class definition.
3935 (Nicolás Ojeda Bär, review by Leo White)
3936
3937 - #11263, #11267: caml/{memory,misc}.h: check whether `_MSC_VER` is defined
3938 before using it to ensure that the headers can always be used in code which
3939 turns on -Wundef (or equivalent).
3940 (David Allsopp and Nicolás Ojeda Bär, review by Nicolás Ojeda Bär and
3941 Sébastien Hinderer)
3942
3943 - #11392, #11392: assertion failure with -rectypes and external definitions
3944 (Gabriel Scherer, review by Florian Angeletti, report by Dmitrii Kosarev)
3945
3946 - #11417: Fix regression allowing virtual methods in non-virtual classes.
3947 (Leo White, review by Florian Angeletti)
3948
3949 - #11468: Fix regression from #10186 (OCaml 4.13) detecting IPv6 on Windows for
3950 mingw-w64 i686 port.
3951 (David Allsopp, review by Xavier Leroy and Sébastien Hinderer)
3952
3953 - #11489, #11496: More prudent deallocation of alternate signal stack
3954 (Xavier Leroy, report by @rajdakin, review by Florian Angeletti)
3955
3956 - #11516, #11524: Fix the `deprecated_mutable` attribute.
3957 (Chris Casinghino, review by Nicolás Ojeda Bär and Florian Angeletti)
3958
3959 - #11194, #11609: Fix inconsistent type variable names in "unbound type var"
3960 messages
3961 (Ulysse Gérard and Florian Angeletti, review Florian Angeletti and
3962 Gabriel Scherer)
3963
3964 - #11622: Prevent stack overflow when printing a constructor or record
3965 mismatch error involving recursive types.
3966 (Florian Angeletti, review by Gabriel Scherer)
3967
3968 - #11732: Ensure that types from packed modules are always generalised
3969 (Stephen Dolan and Leo White, review by Jacques Garrigue)
3970
3971 - #11737: Fix segfault condition in Unix.stat under Windows in the presence of
3972 multiple threads.
3973 (Marc Lasson, Nicolás Ojeda Bär, review by Gabriel Scherer and David Allsopp)
3974
3975 - #11776: Extend environment with functor parameters in `strengthen_lazy`.
3976 (Chris Casinghino and Luke Maurer, review by Gabriel Scherer)
3977
3978 - #11533, #11534: follow synonyms again in #show_module_type
3979 (this had stopped working in 4.14.0)
3980 (Gabriel Scherer, review by Jacques Garrigue and Florian Angeletti,
3981 report by Yaron Minsky)
3982
3983 - #11768, #11788: Fix crash at start-up of bytecode programs in
3984 no-naked-pointers mode caused by wrong initialization of caml_global_data
3985 (Xavier Leroy, report by Etienne Millon, review by Gabriel Scherer)
3986
3987 - #11803, #11808: on x86, the destination of an integer comparison must be
3988 a register, it cannot be a stack slot.
3989 (Vincent Laviron, review by Xavier Leroy, report by
3990 Emilio Jesús Gallego Arias)
3991
3992 OCaml 4.14.0 (28 March 2022)
3993 ----------------------------
3994
3995 ### Language features:
3996
3997 - #10462: Add attribute to produce a compiler error for polls.
3998 (Sadiq Jaffer, review by Mark Shinwell, Stephen Dolan
3999 and Guillaume Munch-Maccagnoni)
4000
4001 - #10437: Allow explicit binders for type variables.
4002 (Stephen Dolan, review by Leo White)
4003
4004 - #10441: Remove unnecessary parentheses surrounding immediate objects.
4005 Allow 'object ... end # f', 'f object ... end', etc.
4006 (Yan Dong, review by Nicolás Ojeda Bär, Florian Angeletti and Gabriel Scherer)
4007
4008 - #181, #9760, #10740: opt-in tail-modulo-cons (TMC) transformation
4009 let[@tail_mod_cons] rec map f li = ...
4010 (Frédéric Bour, Gabriel Scherer, Basile Clément,
4011 review by Basile Clément and Pierre Chambart,
4012 tested by Konstantin Romanov)
4013
4014 ### Runtime system:
4015
4016 * #9391, #9424: Fix failed assertion in runtime due to ephemerons *set_* and
4017 *blit_* function during Mark phase
4018 (François Bobot, reported by Stephen Dolan, reviewed by Damien Doligez)
4019
4020 - #10195, #10680: Speed up GC by prefetching during marking
4021 (Stephen Dolan, review by Xavier Leroy, Guillaume Munch-Maccagnoni,
4022 Jacques-Henri Jourdan, Damien Doligez and Leo White)
4023
4024 - #10549: Stack overflow detection and naked pointers checking for ARM64
4025 (Xavier Leroy, review by Stephen Dolan)
4026
4027 * #10675: Emit deprecation warnings when old C runtime function names
4028 are used. This will break C stub code that uses these old names and
4029 treats warnings as errors. The workaround is to use the new names.
4030 (Xavier Leroy and David Allsopp, review by Sébastien Hinderer and
4031 Damien Doligez)
4032
4033 - #10698, #10726: Free the alternate signal stack when the main OCaml
4034 code or an OCaml thread stops
4035 (Xavier Leroy, review by David Allsopp and Damien Doligez)
4036
4037 - #10730, 10731: Fix bug in `Obj.reachable_words` causing a slowdown when called
4038 multiple time (Alain Frisch, report by ygrek, review by Xavier Leroy)
4039
4040 - #10926: Rename the two internal Windows Unicode functions with `caml_` prefix
4041 instead of `win_`.
4042 (David Allsopp, review by Kate Deplaix, Damien Doligez and Xavier Leroy)
4043
4044 ### Code generation and optimizations:
4045
4046 - #10578: Increase the number of integer registers used for
4047 parameter passing on PowerPC (16 registers) and on s390x (8 registers).
4048 (Xavier Leroy, review by Mark Shinwell)
4049
4050 - #10591, #10615: Tune the heuristic for CSE of integer constants
4051 so as to avoid excessive CSE on compiler-generated constants
4052 and long register allocation times.
4053 (Xavier Leroy, report by Edwin Török, review by Nicolás Ojeda Bär)
4054
4055 - #10595: Tail calls with up to 64 arguments are guaranteed to be compiled
4056 as tail calls. To this end, memory locations in the domain state
4057 are used for passing arguments that do not fit in registers.
4058 (Xavier Leroy, review by Vincent Laviron)
4059
4060 - #10681: Enforce boolean conditions for the native backend
4061 (Vincent Laviron, review by Gabriel Scherer)
4062
4063 - #10719: Ensure that build_apply respects Lambda.max_arity
4064 (Stephen Dolan, review by Xavier Leroy)
4065
4066 - #10728: Ensure that functions are evaluated after their arguments
4067 (Stephen Dolan, review by Mark Shinwell)
4068
4069 - #10732: Ensure right-to-left evaluation of arguments in cmm_helpers
4070 (Greta Yorsh, review by Xavier Leroy)
4071
4072 ### Standard library:
4073
4074 * #10710: Add UTF tools, codecs and validations to the Uchar, Bytes and
4075 String modules.
4076 (Daniel Bünzli, review by Florian Angeletti, Nicolás Ojeda Bär, Alain
4077 Frisch and Gabriel Scherer)
4078
4079 * #10622: Annotate `Uchar.t` with immediate attribute
4080 (Hongbo Zhang, reivew by Gabriel Scherer and Nicolás Ojeda Bär)
4081
4082 * #7812, #10475: `Filename.chop_suffix name suff` now checks that `suff`
4083 is actually a suffix of `name` and raises Invalid_argument otherwise.
4084 (Xavier Leroy, report by whitequark, review by David Allsopp)
4085
4086 * #10482: mark the Stream and Genlex modules as deprecated, in preparation
4087 for a future removal. These modules (without deprecation alert)
4088 are now provided by the camlp-streams library.
4089 (Xavier Leroy, review by Nicolás Ojeda Bär)
4090
4091 - #10526: add Random.bits32, Random.bits64, Random.nativebits
4092 (Xavier Leroy, review by Gabriel Scherer and François Bobot)
4093
4094 * #10568: remove Obj.marshal and Obj.unmarshal
4095 (these functions have been deprecated for a while and are superseded
4096 by the functions from module Marshal)
4097 (François Pottier, review by Gabriel Scherer and Kate Deplaix)
4098
4099 - #10545: Add In_channel and Out_channel modules.
4100 (Nicolás Ojeda Bär, review by Daniel Bünzli, Simon Cruanes, Gabriel Scherer,
4101 Guillaume Munch-Maccagnoni, Alain Frisch and Xavier Leroy)
4102
4103 - #10538: add Out_channel.set_buffered and Out_channel.is_buffered to control
4104 the buffering mode of output channels.
4105 (Nicolás Ojeda Bär, review by John Whitington, Daniel Bünzli, David Allsopp
4106 and Xavier Leroy)
4107
4108 * #10583, #10998: Add over 40 new functions in Seq.
4109 (François Pottier and Simon Cruanes, review by Nicolás Ojeda Bär,
4110 Daniel Bünzli, Nathanaëlle Courant, Craig Ferguson, Wiktor Kuchta,
4111 Xavier Leroy, Guillaume Munch-Maccagnoni, Raphaël Proust, Gabriel Scherer
4112 and Thierry Martinez)
4113
4114 - #10596, #10978: Add with_open_bin, with_open_text and with_open_gen to
4115 In_channel and Out_channel. Also, add In_channel.input_all.
4116 (Nicolás Ojeda Bär, review by Daniel Bünzli, Jérémie Dimino, Damien Doligez
4117 and Xavier Leroy)
4118
4119 - #10658: add detailed information about the current version of OCaml
4120 to the Sys module of the standard library.
4121 (Sébastien Hinderer, review by Damien Doligez, Gabriel Scherer, David
4122 Allsopp, Nicolás Ojeda Bär, Vincent Laviron)
4123
4124 - #10642: On Windows, Sys.remove and Unix.unlink now remove symlinks
4125 to directories instead of raising EACCES. Introduce
4126 caml/winsupport.h to hold more common code between the runtime,
4127 lib-sys, and win32unix.
4128 (Antonin Décimo, review by David Allsopp and Xavier Leroy)
4129
4130 - #10737: add new ephemeron API for forward compatibility with Multicore
4131 OCaml.
4132 (Damien Doligez, review by Stephen Dolan)
4133
4134 - #10786: The implementation of Complex.norm now uses Float.hypot.
4135 (Christophe Troestler, review by David Allsopp and Xavier Leroy)
4136
4137 ### Other libraries:
4138
4139 - #10192: Add support for Unix domain sockets on Windows and use them
4140 to emulate Unix.socketpair (only available on Windows 1803+)
4141 (Antonin Décimo, review by David Allsopp)
4142
4143 - #10469: Add Thread.set_uncaught_exception_handler and
4144 Thread.default_uncaught_exception_handler.
4145 (Enguerrand Decorne, review by David Allsopp)
4146
4147 - #10697: Bindings of dup and dup2 in win32unix now correctly call
4148 WSADuplicateSocket on sockets instead of DuplicateHandle.
4149 (Antonin Décimo, review by Xavier Leroy and Nicolás Ojeda Bär)
4150
4151 * #10926, #11336: Ensure all C functions in the Unix library are prefixed with
4152 `caml_`.
4153 (David Allsopp, review by Kate Deplaix, Damien Doligez and Xavier Leroy)
4154
4155 - #10951: Introduce the Thread.Exit exception as an alternative way to
4156 terminate threads prematurely. This alternative way will become
4157 the standard way in 5.0.
4158 (Xavier Leroy, review by Florian Angeletti)
4159
4160 ### Tools:
4161
4162 - #9701: Release bytecode only after collecting backtrace information
4163 for exceptions, same for dynamic loaded code compiled from toplevel on
4164 ocamlnat.
4165 (Renato Alencar, reported by Krzysztof Leśniak, reviewed by Gabriel Scherer)
4166
4167 - #10839: Fix regression of #show when printing class type
4168 (Élie Brami, review by Florian Angeletti)
4169
4170 - #3959, #7202, #10476: ocaml, in script mode, directive errors
4171 (`#use "missing_file";;`) use stderr and exit with an error.
4172 (Florian Angeletti, review by Gabriel Scherer)
4173
4174 - #10438: add a new toplevel cli argument `-e <script>` to
4175 run script passed to the toplevel.
4176 (Pavlo Khrystenko, review by Gabriel Scherer)
4177
4178 - #10524: Directive argument type error now shows expected and received type.
4179 (Wiktor Kuchta, review by Gabriel Scherer)
4180
4181 - #10560: Disable colors if the env variable `NO_COLOR` is set. If
4182 `OCAML_COLOR` is set, its setting takes precedence over `NO_COLOR`.
4183 (Nicolás Ojeda Bär, report by Gabriel Scherer, review by Daniel Bünzli,
4184 Gabriel Scherer and David Allsopp)
4185
4186 - #10565: Toplevel value printing: truncate strings only after 8 bytes.
4187 (Wiktor Kuchta, review by Xavier Leroy)
4188
4189 - #10527: Show "#help;; for help" at toplevel startup
4190 (Wiktor Kuchta, review by David Allsopp and Florian Angeletti)
4191
4192 - #10846: add the `-shape` command-line option to ocamlobjinfo. When reading a
4193 `cmt` file, shape information will only be shown if that option is used.
4194 (Ulysse Gérard, review by Florian Angeletti)
4195
4196 ### Debugging:
4197
4198 - #10517, #10594: when running ocamldebug on a program linked with the
4199 threads library, don't fail immediately; instead, allow debugging
4200 until the program creates a thread for the first time, then fail cleanly.
4201 (Xavier Leroy, report by @anentropic, review by Gabriel Scherer)
4202
4203 - #9621: Pack the ocamldebug modules to minimize clashes
4204 (Raphael Sousa Santos, review by Vincent Laviron and Gabriel Scherer)
4205
4206 ### Manual and documentation:
4207
4208 - #7812, #10475: reworded the description of the behaviors of
4209 float->int conversions in case of overflow, and of iterators
4210 in case of concurrent modifications.
4211 (Xavier Leroy, report by whitequark, review by David Allsopp)
4212
4213 - #8697, #10666: add M, m, n options of the OCAMLRUNPARAM to manual and man page
4214 for ocamlrun command line options
4215 (Dong An and Anukriti Kumar, review by David Allsopp, Gabriel Scherer
4216 and Damien Doligez)
4217
4218 - #10281, #10685: Add description of C compiler on macOS and Windows platforms.
4219 (Dong An, review by Xavier Leroy and David Allsopp)
4220
4221 - #10397: Document exceptions raised by Unix module functions on Windows
4222 (Martin Jambon, review by Daniel Bünzli, David Allsopp, Damien Doligez,
4223 Xavier Leroy, and Florian Angeletti)
4224
4225 - #10589: Fix many typos (excess/inconsistent spaces) in the HTML manual.
4226 (Wiktor Kuchta, review by Florian Angeletti)
4227
4228 - #10605: manual, name few css classes to ease styling and maintainability.
4229 (Florian Angeletti, review by Wiktor Kuchta and Gabriel Scherer)
4230
4231 - #10668, #10669: the changelog (this file), LICENSE and README files are now
4232 installed as part of the distribution. The destination directory can be
4233 customized using the `--docdir` argument to `./configure`.
4234 (Nicolás Ojeda Bär, report by Daniel Bünzli, review by David Allsopp,
4235 Sébastien Hinderer, and Daniel Bünzli)
4236
4237 - #10671, #10672: webman: Fix misalignments in unordered lists by changing the
4238 CSS for coloring bullets
4239 (Wiktor Kuchta, review by Florian Angeletti)
4240
4241 - #11107: Lifted comments in the Parsetree module into actual documentation.
4242 (Paul-Elliot Anglès d'Auriac, review by Florian Angeletti)
4243
4244 - #11120, #11133: man pages, add missing warning entries and add mnemonic names
4245 to the list of warnings.
4246 (Florian Angeletti, report by Kate Deplaix, review by Gabriel Scherer)
4247
4248 ### Compiler user-interface and warnings:
4249
4250 - #10328, #10780: Give more precise error when disambiguation could not
4251 possibly work.
4252 (Leo White, review by Gabriel Scherer and Florian Angeletti)
4253
4254 - #10361: Improve error messages for mismatched record and variant
4255 definitions.
4256 (Florian Angeletti, review by Gabriel Radanne and Gabriel Scherer)
4257
4258 - #10407: Produce more detailed error messages that contain full error traces
4259 when module inclusion fails.
4260 (Antal Spector-Zabusky, review by Florian Angeletti)
4261
4262 - #10531: add naked_pointers to ocamlc -config exporting NAKED_POINTERS from
4263 Makefile.config.
4264 (Damien Doligez, review by Mark Shinwell and Gabriel Scherer)
4265
4266 - #9116, #9118, #10582: Fix single-line source highlighting in the
4267 presence of tabs
4268 (Armaël Guéneau, review by Gabriel Scherer,
4269 split off from #9118 by Kate Deplaix, report by Ricardo M. Correia)
4270
4271 - #10488: Improve type variable name generation and recursive type detection
4272 when printing type errors; this ensures that the names given to type variables
4273 are always reused in the following portion of the trace and also removes
4274 spurious `as 'a`s in types.
4275 (Antal Spector-Zabusky, review by Florian Angeletti)
4276
4277 - #10794: Clarify warning 57 (Ambiguous or-pattern variables under guard)
4278 (Wiktor Kuchta, review by Gabriel Scherer)
4279
4280 ### Internal/compiler-libs changes:
4281
4282 - #1599: add unset directive to ocamltest to clear environment variables before
4283 running tests.
4284 (David Allsopp, review by Damien Doligez and Sébastien Hinderer)
4285
4286 - #8516: Change representation of class signatures
4287 (Leo White, review by Thomas Refis)
4288
4289 - #9444: -dtypedtree, print more explicitly extra nodes in pattern ast.
4290 (Frédéric Bour, review by Gabriel Scherer)
4291
4292 - #10337: Normalize type_expr nodes on access
4293 One should now use accessors such as get_desc and get_level to access fields
4294 of type_expr, rather than calling manually Btype.repr (which is now hidden
4295 in Types.Transient_expr).
4296 (Jacques Garrigue and Takafumi Saikawa,
4297 review by Florian Angeletti and Gabriel Radanne)
4298
4299 - #10474: Force normalization on access to row_desc
4300 Similar to #10337. Make row_desc an abstract types, with constructor
4301 create_row and accessors defined in Types rather than Btype.
4302 A normalized view row_desc_repr is provided for convenience.
4303 (Jacques Garrigue and Takafumi Saikawa,
4304 review by Leo White and Florian Angeletti)
4305
4306 - #10541: Make field_kind and commutable abstract, enforcing correct access
4307 (Jacques Garrigue and Takafumi Saikawa,
4308 review by Thomas Refis and Florian Angeletti)
4309
4310 - #10575: add a -dump-dir flag, which redirects all debugging printer
4311 (`-dprofile`, `-dlambda`, ...) to the target directory
4312 (Florian Angeletti, review by Thomas Refis and Gabriel Scherer)
4313
4314 * #10627: Make row_field abstract
4315 Completes #10474 by making row_field abstract too.
4316 An immutable view row_field_view is provided, and one converts between it
4317 and row_field via inj_row_field and row_field_repr.
4318 (Jacques Garrigue and Takafumi Saikawa, review by Florian Angeletti)
4319
4320 - #10433: Remove the distinction between 32-bit aligned and 64-bit aligned
4321 64-bit floats in Cmm.memory_chunk.
4322 (Greta Yorsh, review by Xavier Leroy)
4323
4324 - #10434: Pun labelled arguments with type constraint in function applications.
4325 (Greta Yorsh, review by Nicolas Chataing and Nicolás Ojeda Bär)
4326
4327 - #10470: Remove unused `cstr_normal` field from the `constructor_description`
4328 type
4329 (Nicolas Chataing, review by Gabriel Scherer)
4330
4331 - #10382: Don't repeat environment entries in Typemod.check_type_decl
4332 (Leo White, review by Gabriel Scherer and Florian Angeletti)
4333
4334 - #10472: refactor caml_sys_random_seed to ease future Multicore changes
4335 (Gabriel Scherer, review by Xavier Leroy)
4336
4337 - #10487: Move logic to get the type path from a constructor return type in
4338 Types
4339 (Nicolas Chataing, review by Jacques Garrigue)
4340
4341 - #10555: Do not use ghost locations for type constraints
4342 (Nicolás Ojeda Bär, report by Anton Bachin, review by Thomas Refis)
4343
4344 - #10598, #10616: fix an exponential blow-up when typechecking nested module
4345 types
4346 (Florian Angeletti, report and review by Stephen Dolan)
4347
4348 - #10559: Evaluate signature substitutions lazily
4349 (Stephen Dolan, review by Leo White)
4350
4351 - #8776, #10624: Fix compilation time regression introduced in 4.08
4352 (Nicolás Ojeda Bär, fix by Leo White, report by Alain Frisch, review by Thomas
4353 Refis)
4354
4355 - #10618: Expose more Pprintast functions
4356 (Guillaume Petiot, review by Gabriel Scherer)
4357
4358 - #10637: Outcometree: introduce a record type for constructors
4359 (Gabriel Scherer, review by Thomas Refis)
4360
4361 - #10516: refactor the compilation of the 'switch' construct
4362 (Gabriel Scherer, review by Wiktor Kuchta and Luc Maranget)
4363
4364 - #10670: avoid global C state in the RE engine for the "str" library
4365 (Xavier Leroy, review by Gabriel Scherer)
4366
4367 - #10678: Expose descriptions in Warnings module
4368 (Leo White, review by Gabriel Scherer and Alain Frisch)
4369
4370 - #10690: Always build ocamltoplevel.cmxa
4371 (David Allsopp, review by Gabriel Scherer)
4372
4373 - #10692: Expose Parse.module_type and Parse.module_expr
4374 (Guillaume Petiot, review by Gabriel Scherer)
4375
4376 - #10714: Add X86_proc.with_internal_assembler for temporarily changing the
4377 assembler used by the backend.
4378 (David Allsopp, review by Gabriel Scherer)
4379
4380 - #10715: Allow the assembler and loader to be substituted in ocamlnat, for
4381 example to be replaced with a binary emitter.
4382 (David Allsopp and Nathan Rebours, review by Louis Gesbert,
4383 Nicolás Ojeda Bär and Gabriel Scherer)
4384
4385 - #10718, #11012: Add "Shape" information to the cmt files. Shapes are an
4386 abstraction of modules that can be used by external tooling to perform
4387 definition-aware operations.
4388 (Ulysse Gérard, Thomas Refis and Leo White, review by Florian Angeletti)
4389
4390 - #10742: strong call-by-need reduction for shapes
4391 (Gabriel Scherer and Nathanaëlle Courant,
4392 review by Florian Angeletti, Ulysse Gérard and Thomas Refis)
4393
4394 ### Build system:
4395
4396 - #10835 Disable DT_TEXTREL warnings on x86 32 bit architecture by passing
4397 -Wl,-z,notext in mksharedlib and mkmaindll. Fixes relocation issues, reported
4398 in #9800, making local patches in Debian, Alpine, and FreeBSD superfluous.
4399 (Hannes Mehnert with Kate Deplaix and Stéphane Glondu, review by Xavier Leroy)
4400
4401 - #10717: Simplify the installation of man pages
4402 (Sébastien Hinderer, review by David Allsopp)
4403
4404 - #10739: Stop installing extract_crc
4405 (Sébastien Hinderer, review by David Allsopp, Daniel Bünzli, Xavier Leroy
4406 and Gabriel Scherer)
4407
4408 - #10797: Compile with -d2VolatileMetadata- on supporting versions of Visual
4409 Studio. This suppresses the addition of .voltbl sections and eliminates
4410 linking errors in systhreads.
4411 (David Allsopp, review by Jonah Beckford and Sébastien Hinderer)
4412
4413 ### Bug fixes:
4414
4415 - #9214, #10709: Wrong unmarshaling of function pointers in debugger mode.
4416 This was causing ocamldebug to crash when running some user-defined printers.
4417 (Xavier Leroy, report by Rehan Malak, review by Gabriel Scherer and
4418 Vincent Laviron)
4419
4420 - #10364: Improve detection of ambiguity in case bodies.
4421 (Jacques Garrigue, review by Thomas Refis)
4422
4423 - #10473: Add CFI directives to RISC-V runtime and asmcomp.
4424 This allows stacktraces to work in gdb through C and OCaml calls.
4425 (Edwin Török, review by Nicolás Ojeda Bär and Xavier Leroy)
4426
4427 - #10539: Field kinds should be kept when copying types
4428 Losing the sharing meant that one could desynchronize them between several
4429 occurrences of self, allowing a method to be both public and hidden,
4430 which broke type soundness.
4431 (Jacques Garrigue, review by Leo White)
4432
4433 - #10542: Fix detection of immediate64 types through unboxed types.
4434 (Leo White, review by Stephen Dolan and Gabriel Scherer)
4435
4436 - #10590: Some typechecker optimisations
4437 (Stephen Dolan, review by Gabriel Scherer and Leo White)
4438
4439 - #10633: Stack overflow recovery in ocamlopt for AMD64/Linux and ARM/Linux
4440 was not restoring the minor heap pointer correctly
4441 (Stephen Dolan, review by Xavier Leroy)
4442
4443 - #10659: Fix freshening substitutions on imported modules
4444 (Leo White and Stephen Dolan, review by Matthew Ryan)
4445
4446 - #10677, #10679: Fix detection of CC as gcc in configure (allow for
4447 triplet-prefixed GCC) and fix all C compiler detection when CC is a path
4448 rather than a basename.
4449 (David Allsopp, report by Fabian @copy, review by Gabriel Scherer)
4450
4451 - #10690: Add --enable-native-toplevel to configure to enable installing
4452 ocamlnat as part of the main build (default is not to install it)
4453 (David Allsopp, review by Gabriel Scherer)
4454
4455 - #10693: Fix ident collision in includemod
4456 (Leo White, review by Matthew Ryan)
4457
4458 - #10702: Fix cast of more strictly aligned pointer in win32unix
4459 implementation of stat
4460 (Antonin Décimo, review by David Allsopp)
4461
4462 - #10712: Type-check toplevel terms in the native toplevel in the same way as
4463 the bytecode toplevel. In particular, this fixes the loss of type variable
4464 names in the native toplevel.
4465 (Leo White, review by David Allsopp and Gabriel Scherer)
4466
4467 - #10735: Uncaught unify exception from `build_as_type`
4468 (Jacques Garrigue, report and review by Leo White)
4469
4470 - #10763, #10764: fix miscompilation of method delegation
4471 (Alain Frisch, review by Vincent Laviron and Jacques Garrigue)
4472
4473 - #10822, #10823: Bad interaction between ambivalent types and subtyping
4474 coercions (Jacques Garrigue, report and review by Frédéric Bour)
4475
4476 - #10836, #10952: avoid internal typechecker errors when checking signature
4477 inclusion in presence of incompatible types.
4478 (Florian Angeletti, report by Craig Ferguson, review by Gabriel Scherer)
4479
4480 - #10849: Display the result of `let _ : <type> = <expr>` in the native
4481 toplevel, as in the bytecode toplevel.
4482 (David Allsopp, report by Nathan Rebours, review by Gabriel Scherer)
4483
4484 - #10853: `Obj.reachable_words` could crash if called after a marshaling
4485 operation in `NO_SHARING` mode.
4486 (Xavier Leroy, report by Anil Madhavapeddy, review by Alain Frisch)
4487
4488 - #10907, #10959: Wrong type inferred from existential types
4489 (Jacques Garrigue and Gabriel Scherer, report by @dyzsr, review by Leo White)
4490
4491 - #10688: Move frame descriptor table from `rodata` to `data` section on
4492 RISC-V. Improves support for building DLLs and PIEs. In particular, this
4493 applies to all binaries in distributions that build PIEs by default (eg
4494 Gentoo and Alpine).
4495 (Alex Fan, review by Gabriel Scherer)
4496
4497 - #11031: Exception handlers restore the rbp register when using frame-pointers
4498 on amd64.
4499 (Fabrice Buoro, with help from Stephen Dolan, Tom Kelly and Mark Shinwell,
4500 review by Xavier Leroy)
4501
4502 - #11025, #11036: Do not pass -no-pie to the C compiler on musl/arm64
4503 (omni, Kate Deplaix and Antonio Nuno Monteiro, review by Xavier Leroy)
4504
4505 - #11101, #11109: A recursive type constraint fails on 4.14
4506 (Jacques Garrigue, report and review by Florian Angeletti)
4507
4508 - #11118: Fix integer overflow on 64-bit Windows when indexing bigarrays (which
4509 could lead to a segmentation fault).
4510 (Roven Gabriel, review by Nicolás Ojeda Bär and Xavier Leroy)
4511
4512 OCaml 4.13 maintenance branch
4513 -----------------------------
4514
4515 ### Bug fixes
4516
4517 - #10661, #10662: fix a bug with classes named "row"
4518 (Gabriel Scherer, report by Nicolás Ojeda Bär)
4519
4520
4521 OCaml 4.13.0 (24 September 2021)
4522 --------------------------------
4523
4524 ### Progress towards Multicore:
4525
4526 - #10039: Safepoints
4527 Add poll points to native generated code. These are effectively
4528 zero-sized allocations and fix some signal and remembered set
4529 issues. Also multicore prerequisite.
4530 (Sadiq Jaffer, Stephen Dolan, Damien Doligez, Xavier Leroy,
4531 Anmol Sahoo, Mark Shinwell, review by Damien Doligez, Xavier Leroy,
4532 and Mark Shinwell)
4533
4534 - #9876: do not cache the young_limit GC variable in a processor register.
4535 This affects the ARM64, PowerPC and RISC-V ports, making signal handling
4536 and minor GC triggers more reliable, at the cost of a small slowdown.
4537 (Xavier Leroy, review by Nicolás Ojeda Bär)
4538
4539 ### Language features (highlights):
4540
4541 - #9584, #7074: Allow to name existentials in pattern-matching
4542 One can now write '(Cstr (type a) (x, y : int * a))' to give a name to
4543 existentials freshly introduced by GADT constructors.
4544 (Jacques Garrigue, review by Leo White and Gabriel Scherer)
4545
4546 ### Compiler user-interface and warnings (highlights):
4547
4548 - #9331: Improve error messages for functor application and functor types.
4549 (Florian Angeletti and Gabriel Radanne, review by Leo White)
4550
4551 * #10118, #10140: enable warning 6 [labels-omitted] by default.
4552 The following now warns:
4553 let f ~x y = ... in f 3 5
4554 the callsite (f 3 5) has to be turned into (f ~x:3 5).
4555 This prevents mistakes where two arguments of the same types are swapped.
4556 (Note: Dune already enables this warning by default.)
4557 (Gabriel Scherer, review by Xavier Leroy and Florian Angeletti,
4558 report by ygrek)
4559
4560 ### Manual and documentation (highlights):
4561
4562 - #10247: Add initial tranche of examples to reference manual.
4563 Adds some eighty examples to the reference manual, principally to the
4564 expressions and patterns sections.
4565 https://ocaml.org/releases/4.13/manual/patterns.html
4566 (John Whitington, review by Xavier Leroy, Gabriel Scherer, @Fourchaux, and
4567 Florian Angeletti)
4568
4569 - #9987, #9988, #9996, #9997: add an odoc mode for the documentation
4570 of the standard library and compiler library
4571 (Florian Angeletti, review by David Allsopp, Sébastien Hinderer,
4572 and Gabriel Scherer)
4573
4574 ### Standard library (highlights):
4575
4576 - #944: Add some missing C99 float operations. `Stdlib` now contains
4577 the inverse hyperbolic functions
4578 `acosh`, `asinh`, and `atanh`.
4579 These functions were also added to module `Stdlib.Float` together with
4580 `exp2`, `log2`, `cbrt`, `erf`, and `erfc`.
4581 Full support on MSVC requires VS2013+ but emulated versions are
4582 still available (for now) for older compilers.
4583 (Markus Mottl, review by David Allsopp, Olivier Andrieu, Florian Angeletti,
4584 Nicolás Ojeda Bär, Daniel Bünzli, Fabian @copy, Pascal Cuoq, Damien
4585 Doligez, Sébastien Hinderer, Jacques-Henri Jourdan, Xavier Leroy, Guillaume
4586 Melquiond, Perry E. Metzger, Runhang Li, Gabriel Scherer, Mark Shinwell,
4587 Bernhard Schommer and Christophe Troestler)
4588
4589 - #9582: Add Array.{find_opt,find_map,split,combine}.
4590 (Nicolás Ojeda Bär, review by Daniel Bünzli and Gabriel Scherer)
4591
4592 - #9533: Added String.starts_with and String.ends_with.
4593 (Bernhard Schommer, review by Daniel Bünzli, Gabriel Scherer and
4594 Alain Frisch)
4595
4596 ### Code generation and optimizations (highlights):
4597
4598 - #10404: Add a generic backward dataflow analyzer and use it to speed up
4599 liveness analysis
4600 (Xavier Leroy, review by Gabriel Scherer, Greta Yorsh, Mark Shinwell)
4601
4602 - #10414: Avoid compilation times exponential in the nesting of loops
4603 in the spilling and reloading passes
4604 (Xavier Leroy, review by Vincent Laviron)
4605
4606 ### Internal typechecker changes (highlights):
4607
4608 - #10170: Maintain more structural information in type-checking errors
4609 A mostly-internal change that preserves more information in errors
4610 during type checking; most significantly, it split the errors from
4611 unification, moregen, and type equality into three different types.
4612 (Antal Spector-Zabusky and Mekhrubon Turaev, review by Leo White,
4613 Florian Angeletti, and Jacques Garrigue)
4614
4615 - #9994: Make Types.type_expr a private type, and abstract marking mechanism
4616 (Jacques Garrigue and Takafumi Saikawa,
4617 review by Gabriel Scherer and Leo White)
4618
4619 ### Runtime system (highlights):
4620
4621 - #10188, #10213: Switch the default allocation policy to best-fit and adjust
4622 the default overhead parameter accordingly.
4623 (Damien Doligez, review by Josh Berdine and Xavier Leroy)
4624
4625 - #10549: Stack overflow detection and naked pointers checking for ARM64
4626 (Xavier Leroy, review by Stephen Dolan)
4627
4628 - #9934: Optimise sweeping using prefetching.
4629 (Stephen Dolan and Will Hasenplaugh, review by David Allsopp, Xavier
4630 Leroy and Damien Doligez, benchmarking by Shubham Kumar and KC
4631 Sivaramakrishnan)
4632
4633 - #10194: Change compaction-triggering heuristic: use the overhead measured
4634 by the previous GC cycle instead of an indirect (and noisy) computation
4635 of the current overhead.
4636 (Damien Doligez, review by Stephen Dolan)
4637
4638 - #10449: Fix major GC work accounting (the GC was running too fast).
4639 (Damien Doligez, report by Stephen Dolan, review by Nicolás Ojeda Bär and
4640 Sadiq Jaffer)
4641
4642
4643 ### Language features:
4644
4645 - #10013: Let-punning
4646 Allow 'let* x in ...' and 'let%ext x in ...' as shorthand for
4647 'let* x = x in ...' and 'let%ext x = x in ...' respectively.
4648 (Stephen Dolan, review by Gabriel Scherer)
4649
4650 - #10133: module type substitutions
4651 Allow 'SIG with module type T = F(X).S', 'SIG with module type T := sig end'
4652 and their local equivalent `module type T := sig type u end`
4653 (Florian Angeletti, review by Gabriel Radanne and Leo White)
4654
4655 ### Type system:
4656
4657 * #10081: Typecheck `x |> f` and `f @@ x` as `(f x)`
4658 (Alain Frisch, review by Jacques Garrigue, Josh Berdine and Thomas Refis)
4659
4660 ### Runtime system:
4661
4662 - #10318: Windows Unicode runtime functions are no longer marked as
4663 experimental.
4664 (Nicolás Ojeda Bär, review by David Allsopp)
4665
4666 - #9284: Add -config option to display the configuration of ocamlrun on stdout,
4667 including the search path for shared stub libraries.
4668 (David Allsopp, review by Xavier Leroy)
4669
4670 - #9919: Introduce caml_record_backtraces and update Interfacing with C to
4671 refer to it (previous instruction to use caml_record_backtrace primitive was
4672 not possible without defining CAML_INTERNALS)
4673 (David Allsopp, review by Xavier Leroy)
4674
4675 - #10102: Ignore PROFINFO_WIDTH if WITH_PROFINFO is not defined (technically
4676 a breaking change if the configuration system was being abused before).
4677 (David Allsopp, review by Xavier Leroy)
4678
4679 - #10107: Ensure modules compiled with -afl-instrument can still link on
4680 platforms without AFL support.
4681 (David Allsopp, review by Xavier Leroy)
4682
4683 * #10098: Improve command-line parsing in ocamlrun: strictly recognise options,
4684 be more informative for `ocamlrun -I` and support `--` for terminating options
4685 parsing.
4686 (David Allsopp, review by Xavier Leroy)
4687
4688 - #10101: Add -help/--help option to ocamlrun.
4689 (David Allsopp, review by Xavier Leroy)
4690
4691 - #10136: Minor clean-ups in runtime/io.c and runtime/caml/io.h
4692 (Xavier Leroy, review by David Allsopp and Guillaume Munch-Maccagnoni)
4693
4694 - #10171: Tweak the naked pointers checker so that processes which trigger the
4695 alarm always exit with non-zero status (i.e. exit(0) becomes exit(70)).
4696 (David Allsopp, review by Xavier Leroy)
4697
4698 - #10212: Simplify and improve the Windows-specific code that connects
4699 to the debugger via a socket.
4700 (Antonin Décimo, review by Xavier Leroy)
4701
4702 - #10217: Fix a segfault in a corner case of compaction (reported in #9853)
4703 (Damien Doligez, report by Sadiq Jaffer, review by Stephen Dolan)
4704
4705 - #10250, #10266: Dynamically allocate alternate signal stacks to
4706 accommodate changes in Glibc 2.34.
4707 (Xavier Leroy, reports by Tomasz Kłoczko and Richard Jones, review by Anil
4708 Madhavapeddy, Stephen Dolan, and Florian Angeletti)
4709
4710 ### Code generation and optimizations:
4711
4712 - #1400: Add an optional invariants check on Cmm, which can be activated
4713 with the -dcmm-invariants flag
4714 (Vincent Laviron, with help from Sébastien Hinderer, review by Stephen Dolan
4715 and David Allsopp)
4716
4717 - #9562, #367: Allow CSE of immutable loads across stores
4718 (Stephen Dolan, review by Mark Shinwell)
4719
4720 - #9937: improvements in ARM64 code generation (constants, sign extensions)
4721 (Xavier Leroy, review by Stephen Dolan)
4722
4723 - #10228: Better code-generation for inlined comparisons
4724 (Stephen Dolan, review by Alain Frisch and Xavier Leroy)
4725
4726 - #10244: Optimise Int32.unsigned_to_int
4727 (Fabian Hemmer, review by Stephen Dolan and Xavier Leroy)
4728
4729 - #10302, #10303: Fix incorrect instruction selection for string constant loads
4730 on ppc.
4731 (David Allsopp, review by Stephen Dolan)
4732
4733 - #10349: Fix destroyed_at_c_call on RISC-V
4734 (Mark Shinwell, review by Nicolás Ojeda Bär)
4735
4736 - #10419: Add %frame_pointers primitive which is true only in native code with
4737 frame pointers mode enabled.
4738 (David Allsopp, review by Vincent Laviron and Mark Shinwell)
4739
4740 ### Standard library:
4741
4742 - #9448: Add String.{empty,cat} as dual of Bytes.{empty,cat},
4743 String.{of,to}_bytes as aliases of Bytes.{to,of}_string,
4744 Bytes.split_on_char as dual of String.split_on_char, and binary decoding
4745 functions in String to match those in Bytes.
4746 (David Allsopp, review by Damien Doligez, Gabriel Scherer and others)
4747
4748 - #9487, #9489: Add Random.full_int which allows 62-bit bounds on 64-bit
4749 systems.
4750 (David Allsopp, request by François Berenger, review by Xavier Leroy and
4751 Damien Doligez)
4752
4753 - #9961: Add Array.fold_left_map.
4754 (Craig Ferguson, review by Damien Doligez)
4755
4756 - #10097: Lazy.map, Lazy.map_val: ('a -> 'b) -> 'a Lazy.t -> 'b Lazy.t
4757 (map f x) is always (lazy (f (force x))), whereas (map_val f x)
4758 applies f directly if x is already forced.
4759 (Gabriel Scherer, review by Nicolás Ojeda Bär, Alain Frisch, Xavier Leroy,
4760 Daniel Bünzli and Stephen Dolan)
4761
4762 - #10242: Added convenience pretty printer for Either.t in the Format module.
4763 (Oghenevwogaga Ebresafe, review by Nicolás Ojeda Bär,
4764 Gabriel Scherer and Xavier Van de Woestyne)
4765
4766 - #10352: Seq.(concat : 'a t t -> 'a t)
4767 Seq.concat_map as an alias to Seq.flat_map,
4768 (Gabriel Scherer, review by Ulugbek Abdullaev and Daniel Bünzli
4769 and Nicolás Ojeda Bär and Florian Angeletti)
4770
4771 - #882: Add fold_left, fold_right, exists and for_all to String/Bytes
4772 (Yotam Barnoy, review by Alain Frisch and Jeremy Yallop)
4773
4774 - #4070, #10398: small optimization of Stdlib.{frexp,modf}.
4775 (Markus Mottl, Nicolás Ojeda Bär, review by Gabriel Scherer)
4776
4777 - #10389, #10391, #10392: Add {Int,Int32,Int64,Nativeint}.{min,max}.
4778 (Nicolás Ojeda Bär and Alain Frisch, review by Xavier Leroy)
4779
4780 - #10430: Add Format.print_bytes and Format.pp_print_bytes.
4781 (Gabriel Radanne, review by Gabriel Scherer and David Allsopp)
4782
4783 ### Other libraries:
4784
4785 * #10084: Unix.open_process_args* functions now look up the program in the PATH.
4786 This was already the case under Windows, but this is now also done under
4787 Unix. Note that previously the program was interpreted relative to the current
4788 directory.
4789 (Nicolás Ojeda Bär, review by Gabriel Scherer and Xavier Leroy)
4790
4791 - #10047: Add `Unix.realpath`
4792 (Daniel Bünzli, review by David Allsopp, Josh Berdine and Gabriel Scherer)
4793
4794 - #10184: Remove expensive debug assertion from dynlink.
4795 (Leo White, review by David Allsopp and Xavier Leroy)
4796
4797 - #10185: Consider that IPv6 is always enabled on Windows.
4798 (Antonin Décimo, review by David Allsopp and Xavier Leroy)
4799
4800 - #10306: Map WSA error code to Unix errno for sockopt and getsockname
4801 functions (Antonin Décimo, review by David Allsopp)
4802
4803 - #10309: Properly return EBADF on error in Unix.descr_of_{in,out}_channel on
4804 Win32 and map Windows error correctly in Unix.truncate and Unix.ftruncate on
4805 Win32.
4806 (David Allsopp, review by Nicolás Ojeda Bär)
4807
4808 ### Tools:
4809
4810 - #10139: Adds a -nonavbar option to ocamldoc, to remove confusing
4811 'Up', 'Previous' and 'Next' links
4812 (John Whitington, review by David Allsopp)
4813
4814 - #8645, #10363: ocamldoc: escape `<`, `>`, and `&` in html backend.
4815 (Florian Angeletti, report by Wim Lewis, review by Gabriel Scherer)
4816
4817 ### Manual and documentation:
4818
4819 - #9525, #10402: document that ocamldoc only creates paragraphs
4820 at the toplevel of documentation comments
4821 (Florian Angeletti, report by Hendrik Tews, review by Gabriel Scherer)
4822
4823 - #10206: Split labels and polymorphic variants tutorials in two.
4824 Moves the GADTs tutorial from the Language Extensions chapter
4825 to the tutorials.
4826 (John Whitington, review by Florian Angeletti and Xavier Leroy)
4827
4828 - #9786, #10181: improved documentation of Unix.{in,out}_channel_of_descr
4829 with respect to closing.
4830 (Xavier Leroy, report by Jacques-Henri Jourdan, review by Guillaume
4831 Munch-Maccagnoni, Gabriel Scherer, Jacques-Henri Jourdan)
4832
4833 - #10139: Use the new -nonavbar option to improve navigation within
4834 the reference manual stdlib documentation.
4835 (John Whitington, review by David Allsopp)
4836
4837 - #1351: Document `-output-complete-obj` option in the manual.
4838 (François Bobot, Nicolás Ojeda Bär, review by Daniel Bünzli and Damien
4839 Doligez)
4840
4841 - #9632: Document incremental build solutions with opam
4842 (Vincent Laviron, review by Daniel Bünzli and Gabriel Scherer)
4843
4844 - #10497: Styling changes in the post-processed HTML manual (webman)
4845 (Wiktor Kuchta, review by Florian Angeletti)
4846
4847 - #10605: manual, name few css classes to ease styling and maintainability.
4848 (Florian Angeletti, review by Wiktor Kuchta and Gabriel Scherer)
4849
4850 ### Compiler user-interface and warnings:
4851
4852 - #1737, #2092, #7852, #7859, #10405, #10417: Update locations during
4853 destructive substitutions
4854 (Thomas Refis, review by Gabriel Radanne, report by Hugo Heuzard)
4855
4856 - #2245: Improve error message for link order error in bytecode
4857 (Pierre Chambart, review by Jérémie Dimino and Gabriel Scherer)
4858
4859 - #8732, improved error messages for invalid private row type definitions.
4860 For instance, [ type t = private [< `A > `A ] ] .
4861 (Florian Angeletti, review by Jacques Garrigue, Thomas Refis,
4862 and Gabriel Scherer)
4863
4864 - #9407: optional warning for missing mli interface file
4865 (Anukriti Kumar, review by Florian Angeletti)
4866
4867 - #9960, #10619: extend ocamlc/ocamlopt's -o option to work when
4868 compiling C files
4869 (Sébastien Hinderer, reported by Daniel Bünzli, review by
4870 Florian Angeletti and Gabriel Scherer)
4871
4872 - #10095: minor simplifications to some syntax error messages.
4873 (François Pottier, review by Gabriel Scherer and Frédéric Bour.)
4874
4875 - #10196, #10197: better error message on empty character literals ''.
4876 (Gabriel Scherer, review by David Allsopp and Florian Angeletti
4877 and Daniel Bünzli, report by Robin Björklin)
4878
4879 - #8877: Call the linker when ocamlopt is invoked with .o and .a files only.
4880 (Greta Yorsh, review by Leo White)
4881
4882 - #10207, #10312: deprecate consecutive letters in warning
4883 specifications.
4884 The form `-w aBcD` was equivalent to `-w -a+b-c+d`.
4885 It is now deprecated to improve the coexistence with warning mnemonics.
4886 However, using isolated single letter is not deprecated to allow the form
4887 `-w "A-32..50-45"`.
4888 (Florian Angeletti, review by Damien Doligez and Gabriel Scherer)
4889
4890 - #10232: Warning for unused record fields.
4891 (Leo White, review by Florian Angeletti)
4892
4893 ### Internal/compiler-libs changes:
4894
4895 - #9243, simplify parser rules for array indexing operations
4896 (Florian Angeletti, review by Damien Doligez and Gabriel Scherer)
4897
4898 - #9650, #9651: keep refactoring the pattern-matching compiler
4899 (Gabriel Scherer, review by Thomas Refis and Florian Angeletti)
4900
4901 - #9827: Replace references with functions arguments in Simplif
4902 (Anukriti Kumar, review by Vincent Laviron and David Allsopp)
4903
4904 - #10007: Driver.compile_common: when typing a .ml file, return the
4905 compilation unit signature (inferred or from the .cmi) in addition
4906 to the implementation and the coercion.
4907 (Leandro Ostera, review by Gabriel Scherer and Thomas Refis)
4908
4909 - #10045: Add libext variable to ocamltest and enable C# tests on on mingw
4910 (David Allsopp, review by Gabriel Scherer)
4911
4912 * #10061, #10078, #10187: remove library `ocamlopttoplevel`, remove modules
4913 `Opttoploop`, `Opttopstart`, which are replaced by `Toploop` and `Topstart` in
4914 library `ocamltoplevel`, made available in native code.
4915 (Louis Gesbert, review by Jeremie Dimino, Mark Shinwell and Gabriel Radanne)
4916
4917 - #10124: remove duplicated code from the native toplevel, split toplevel
4918 implementation into the shared part (`Topcommon`, etc.) and specific ones
4919 (`Topeval`, `Trace`, `Topmain`).
4920 (Louis Gesbert, review by Jeremie Dimino and Gabriel Radanne)
4921
4922 - #10086: add the commands `make list-parse-errors` and `make
4923 generate-parse-errors` to generate a set of syntactically incorrect
4924 sentences that covers all error states of the LR automaton. Add these
4925 sentences to the test suite. This can be used to evaluate the quality of the
4926 parser's syntax error messages and (in the future) to evaluate the impact of
4927 changes in the parser.
4928 (François Pottier, review by Gabriel Scherer and Xavier Leroy.)
4929
4930 - #10090: Distinguished constructors for ref variables at lambda level
4931 (Keryan Didier, review by Gabriel Scherer and Vincent Laviron)
4932
4933 - #10113: add a `-timeout` option to ocamltest and use it in the test suite.
4934 (Xavier Leroy and Gabriel Scherer, review by Sébastien Hinderer
4935 and David Allsopp)
4936
4937 * #10169, #10270, #10301, #10451: Use capitalized module names in the Standard
4938 Library prefixing scheme to match Dune, e.g. Stdlib__String instead of
4939 Stdlib__string. This is a breaking change only to code which attempted to use
4940 the internal names before. The Standard Library generated by the Dune rules is
4941 now equivalent to the main build (the Dune rules still do not generate a
4942 distributable compiler).
4943 (David Allsopp and Mark Shinwell, review by Gabriel Scherer)
4944
4945 - #10327: Add a subdirectories variable and a copy action to ocamltest
4946 (Sébastien Hinderer, review by David Allsopp)
4947
4948 * #10337: Normalize type_expr nodes on access
4949 One should now use accessors such as get_desc and get_level to access fields
4950 of type_expr, rather than calling manually Btype.repr (which is now hidden
4951 in Types.Transient_expr).
4952 (Jacques Garrigue and Takafumi Saikawa,
4953 review by Florian Angeletti and Gabriel Radanne)
4954
4955 - #10358: Use a hash table for the load path.
4956 (Leo White, review by Gabriel Scherer)
4957
4958 - #8936: Per-function environment for Emit
4959 (Greta Yorsh, review by Vincent Laviron and Florian Angeletti)
4960
4961 - #10543: Fix Ast_mapper to apply the mapping function to the constants in
4962 "interval" patterns `c1..c2`.
4963 (Guillaume Petiot, review by Gabriel Scherer and Nicolás Ojeda Bär)
4964
4965 ### Internal typechecker changes:
4966
4967 - #10174: Make Tsubst more robust by avoiding strange workarounds
4968 (Takafumi Saikawa and Jacques Garrigue, review by Gabriel Scherer and
4969 Florian Angeletti)
4970
4971 - #10265: Move type_unboxed.unboxed into type_kind
4972 (Stephen Dolan, review by Gabriel Scherer)
4973
4974 - #10307: Refactor type_description in the typing env
4975 (Nicolas Chataing, review by Takafumi Saikawa, Florian Angeletti and Thomas
4976 Refis)
4977
4978 - #10311: Separate the constraint-solving part of Typecore.type_pat into
4979 specific solver functions.
4980 (Jacques Garrigue and Takafumi Saikawa, review by Gabriel Scherer)
4981
4982 - #10428: Make build_other_constrs work with names instead of tags.
4983 (Nicolas Chataing, review by Florian Angeletti)
4984
4985 ### Build system:
4986
4987 - #10332, #10333: Generate lambda/runtimedef.ml correctly in Swedish locale.
4988 (the letter 'w' is not included in '[a-z]' in sv_SE.UTF-8)
4989 (David Allsopp, report by Anders Jackson, review by Florian Angeletti and
4990 Gabriel Scherer)
4991
4992 - #10289, #10406: Do not print option documentation in usage messages.
4993 (Pavlo Khrystenko, review by Gabriel Scherer, fix by Kate Deplaix)
4994
4995 - #9191, #10091, #10182: take the LDFLAGS variable into account, except on
4996 flexlink-using systems.
4997 (Gabriel Scherer, review by Sébastien Hinderer and David Allsopp,
4998 report by Ralph Seichter)
4999
5000 - #10135: Overhaul the FlexDLL bootstrap process. It's now fully integrated
5001 with the default build target and controlled by --with-flexdll which allows
5002 externally downloaded sources for FlexDLL to be specified. A separate
5003 non-shared version of the runtime is built, and shared artefacts are no longer
5004 built twice. When bootstrapping, any flexlink in PATH is now ignored and the
5005 Cygwin port also supports bootstrapping FlexDLL. flexlink.opt is automatically
5006 built and installed as part of opt.opt/world.opt.
5007 (David Allsopp, review by Sébastien Hinderer)
5008
5009 - #10156: configure script: fix sockets feature detection.
5010 (Lucas Pluvinage, review by David Allsopp and Damien Doligez)
5011
5012 - #10176, #10632: By default, call the assembler through the C compiler driver
5013 (Sébastien Hinderer, review by Gabriel Scherer, David Allsopp and Xavier
5014 Leroy)
5015
5016 - #10186: configure wasn't using library link flags when searching for
5017 network functions on systems where they're not in libc. Fix IPv6 and
5018 socklen_t detection on Windows.
5019 (Antonin Décimo, review by David Allsopp and Sébastien Hinderer)
5020
5021 - #10366: Make it possible to use the OCAMLRUN variable to specify
5022 which runtime to use while building the compilers (Sébastien Hinderer,
5023 review by David Allsopp)
5024
5025 - #10451, #10635: Replace the use of iconv with a C utility to convert $(LIBDIR)
5026 to a C string constant on Windows when building the runtime. Hardens the
5027 generation of the constant on Unix for paths with backslashes, double-quotes
5028 and newlines.
5029 (David Allsopp, review by Florian Angeletti and Sébastien Hinderer)
5030
5031 - #10471: Fix detection of arm32 architectures with musl in configure.
5032 (Louis Gesbert, review by David Allsopp)
5033
5034 ### Bug fixes:
5035
5036 - #6654, #9774, #10401: make `include` and with `constraints` handle correctly
5037 the ghost components of signatures. For instance, in
5038
5039 include struct class c = object end end type c
5040
5041 the type `c` shadows the `class c` to avoid shadowing only the ghost type
5042 c introduced by the class.
5043 (Florian Angeletti, report by Eduardo Rafael, review by Gabriel Scherer)
5044
5045 - #6985, #10385: remove all ghost row types from included modules
5046 (Florian Angeletti, review by Gabriel Scherer)
5047
5048 - #7453, #9828, #10416: fix #show for recursive types and modules
5049 (Florian Angeletti, review by Gabriel Scherer)
5050
5051 * #7469, #10408: Sys.time now returns processor time on Windows (previously
5052 returned wall-clock time)
5053 (David Allsopp, review by Nicolás Ojeda Bär)
5054
5055 * #8857, #10220: Don't clobber GetLastError() in caml_leave_blocking_section
5056 when the systhreads library is loaded.
5057 (David Allsopp, report by Anton Bachin, review by Xavier Leroy)
5058
5059 - #8575, #10362: Surprising interaction between polymorphic variants
5060 and constructor disambiguation.
5061 (Jacques Garrigue, report and review by Thomas Refis)
5062
5063 - #8917, #8929, #9889, #10219: fix printing of nested recursive definitions
5064 in presence of a name collision.
5065 (Florian Angeletti, report by Thomas Refis, review by Gabriel Scherer)
5066
5067 - #10005: Try expanding aliases in Ctype.nondep_type_rec
5068 (Stephen Dolan, review by Gabriel Scherer, Leo White and Xavier Leroy)
5069
5070 - #10072, #10085: Check that sizes and offsets in stack frame descriptors
5071 do not overflow the 16-bit fields where they are stored.
5072 (Xavier Leroy, report by Github user pveber, review by Gabriel Scherer)
5073
5074 - #10087, #10138: In the toplevel REPL, don't use the cache
5075 of included directories, so that files created or deleted while
5076 the REPL is running are correctly handled.
5077 (Xavier Leroy, report by Github user quakerquickoats, review by
5078 Jeremie Dimino)
5079
5080 - #10294, #10295: fix an assert-failure in pattern-matching compilation
5081 (Gabriel Scherer, review by Thomas Refis and Luc Maranget,
5082 report by Nicolás Ojeda Bär)
5083
5084 - #10147, #10148: Fix building runtime with GCC on macOS.
5085 (David Allsopp, report by John Skaller)
5086
5087 - #10166: Fix illegal permutation error reporting in module aliases.
5088 (Matthew Ryan, review by Florian Angeletti)
5089
5090 - #10189, #10190, #10347: Universal variables leaking through GADT equations
5091 (Jacques Garrigue, report and review by Leo White)
5092
5093 - #10205: Avoid overwriting closures while initialising recursive modules
5094 (Stephen Dolan, review by Xavier Leroy, Hugo Heuzard and Vincent Laviron)
5095
5096 - #10253, #10373: tweak error message for unknown variant constructors
5097 or record fields in type-directed disambiguation
5098 (Florian Angeletti, report by Hongbo Zhang, review by Gabriel Scherer)
5099
5100 * #10277, #10383: Need to detect ambiguity recursively inside types to
5101 guarantee principality (affects only principal mode)
5102 (Jacques Garrigue, review by Thomas Refis, Leo White and Kate Deplaix)
5103
5104 - #10283, #10284: Enforce right-to-left evaluation order for Lstaticraise
5105 (Vincent Laviron, report by Github user Ngoguey42, review by Gabriel Scherer)
5106
5107 - #10298, #10305: Incorrect propagation of type equalities in functor
5108 application
5109 (Jacques Garrigue, report and review by Didier Remy)
5110
5111 - #10324, #10325: Prevent generation of Lsend(Cached, _) in bytecode
5112 (Vincent Laviron, report by Yawar Amin and Nicolás Ojeda Bär, review by
5113 Jacques Garrigue)
5114
5115 - #10338, #10340: Translcore.push_defaults does not respect scoping
5116 (Jacques Garrigue, report and review by Stephen Dolan)
5117
5118 - #10351: Fix DLL loading with binutils 2.36+ on mingw-w64
5119 (David Allsopp, review by Nicolás Ojeda Bär)
5120
5121 - #10339, #10354, #10387: Fix handling of exception-raising specific
5122 operations during spilling and liveness analysis.
5123 (This bug affects ARM and ARM64.)
5124 In passing, refactor Proc.op_is_pure and Mach.operation_can_raise.
5125 (Xavier Leroy, report by Richard Bornat, review by Stephen Dolan
5126 and Mark Shinwell)
5127
5128 - #10371: Stop generating useless `.cds` file when using
5129 `-output-complete-exe`.
5130 (Nicolás Ojeda Bär, review by David Allsopp)
5131
5132 - #10376: Link runtime libraries correctly on msvc64 in -output-complete-obj
5133 (David Allsopp, review by Gabriel Scherer)
5134
5135 - #10380: Correct handling of UTF-8 paths in configure on Windows
5136 (David Allsopp, review by Sébastien Hinderer)
5137
5138 - #10450, #10558: keep %apply and %revapply primitives working with abstract
5139 types. This breach of backward compatibility was only present in the alpha
5140 releases of OCaml 4.13.0 .
5141 (Florian Angeletti, review by Thomas Refis and Leo White)
5142
5143 - #10454: Check row_more in nondep_type_rec.
5144 (Leo White, review by Thomas Refis)
5145
5146 - #10468: Correctly pretty print local type substitution, e.g. type t := ...,
5147 with -dsource
5148 (Matt Else, review by Florian Angeletti)
5149
5150 - #10461, #10498: `caml_send*` helper functions take derived pointers
5151 as arguments. Those must be declared with type Addr instead of Val.
5152 Moreover, poll point insertion must be disabled for `caml_send*`,
5153 otherwise the derived pointer is live across a poll point.
5154 (Vincent Laviron and Xavier Leroy, review by Xavier Leroy and Sadiq Jaffer)
5155
5156 - #10511: Cygwin ports now correctly configure when flexdll is not available.
5157 (David Allsopp, review by Florian Angeletti)
5158
5159 - #10550, #10551: fix pretty-print of gadt-pattern-with-type-vars
5160 (Chet Murthy, review by Gabriel Scherer)
5161
5162 - #10584, #10856: Standard Library documentation build no longer fails if
5163 optional libraries have been disabled.
5164 (David Allsopp, report by Yuri Victorovich, review by Florian Angeletti)
5165
5166 - #10593: Fix untyping of patterns without named existential quantifiers. This
5167 bug was only present in the beta version of OCaml 4.13.0.
5168 (Ulysse Gérard, review by Florian Angeletti)
5169
5170 - #10603, #10611: Fix if condition marked as inconstant in flambda
5171 (Vincent Laviron and Pierre Chambart, report by Marcello Seri)
5172
5173
5174 OCaml 4.12, maintenance version
5175 -------------------------------
5176
5177 ### Bug fixes:
5178
5179 - #10442, #10446: Fix regression in the toplevel to #directory caused by
5180 corrections and improvements to the Load_path in #9611. #directory now
5181 adds the path to the start of the load path again (so files in the newly
5182 added directory take priority).
5183 (David Allsopp, report by Vasile Rotaru, review by Florian Angeletti
5184 and Nicolás Ojeda Bär)
5185
5186 - #10478: Fix segfault under Windows due to a mistaken initialization of thread
5187 ID when a thread starts.
5188 (David Allsopp, Nicolás Ojeda Bär, review by Xavier Leroy)
5189
5190 - #10626, #10628: Wrong reloading of the x86-64 instruction for
5191 integer multiplication by a constant, causing the assembler to
5192 reject the ocamlopt-generated code.
5193 (Xavier Leroy, report by Dave Aitken, review by Vincent Laviron)
5194
5195 OCaml 4.12.0 (24 February 2021)
5196 -------------------------------
5197
5198 ### Supported platforms (highlights):
5199
5200 - #9699: add support for iOS and macOS on ARM 64 bits
5201 (Eduardo Rafael, review by Xavier Leroy, Nicolás Ojeda Bär
5202 and Anil Madhavapeddy, additional testing by Michael Schmidt)
5203
5204 ### Standard library (highlights):
5205
5206 - #9797: Add Sys.mkdir and Sys.rmdir.
5207 (David Allsopp, review by Nicolás Ojeda Bär, Sébastien Hinderer and
5208 Xavier Leroy)
5209
5210 * #9765: add init functions to Bigarray.
5211 (Jeremy Yallop, review by Gabriel Scherer, Nicolás Ojeda Bär, and
5212 Xavier Leroy)
5213
5214 * #9668: List.equal, List.compare
5215 (This could break code using "open List" by shadowing
5216 Stdlib.{equal,compare}.)
5217 (Gabriel Scherer, review by Nicolás Ojeda Bär, Daniel Bünzli and Alain Frisch)
5218
5219 - #9066: a new Either module with
5220 type 'a Either.t = Left of 'a | Right of 'b
5221 (Gabriel Scherer, review by Daniel Bünzli, Thomas Refis, Jeremy Yallop)
5222
5223 - #9066: List.partition_map :
5224 ('a -> ('b, 'c) Either.t) -> 'a list -> 'b list * 'c list
5225 (Gabriel Scherer, review by Jeremy Yallop)
5226
5227 - #9865: add Format.pp_print_seq
5228 (Raphaël Proust, review by Nicolás Ojeda Bär)
5229
5230 ### Compiler user-interface and warnings (highlights):
5231
5232 - #9657: Warnings can now be referred to by their mnemonic name. The names are
5233 displayed using `-warn-help` and can be utilized anywhere where a warning list
5234 specification is expected.
5235 ocamlc -w +fragile-match
5236 ...[@@ocaml.warning "-fragile-match"]
5237 Note that only a single warning name at a time is supported for now:
5238 "-w +foo-bar" does not work, you must use "-w +foo -w -bar".
5239 (Nicolás Ojeda Bär, review by Gabriel Scherer, Florian Angeletti and
5240 Leo White)
5241
5242 - #8939: Command-line option to save Linear IR before emit.
5243 (Greta Yorsh, review by Mark Shinwell, Sébastien Hinderer and Frédéric Bour)
5244
5245 - #9003: Start compilation from Emit when the input file is in Linear IR format.
5246 (Greta Yorsh, review by Jérémie Dimino, Gabriel Scherer and Frédéric Bour)
5247
5248 ### Language features (highlights):
5249
5250 * #9500, #9727, #9866, #9870, #9873: Injectivity annotations
5251 One can now mark type parameters as injective, which is useful for
5252 abstract types:
5253 module Vec : sig type !'a t end = struct type 'a t = 'a array end
5254 On non-abstract types, this can be used to check the injectivity of
5255 parameters. Since all parameters of record and sum types are by definition
5256 injective, this only makes sense for type abbreviations:
5257 type !'a t = 'a list
5258 Note that this change required making the regularity check stricter.
5259 (Jacques Garrigue, review by Jeremy Yallop and Leo White)
5260
5261 ### Runtime system (highlights):
5262
5263 - #9534, #9947: Introduce a naked pointers checker mode to the runtime
5264 (configure option --enable-naked-pointers-checker). Alarms are printed
5265 when the garbage collector finds out-of-heap pointers that could
5266 cause a crash in no-naked-pointers mode.
5267 (Enguerrand Decorne, KC Sivaramakrishnan, Xavier Leroy, Stephen Dolan,
5268 David Allsopp, Nicolás Ojeda Bär review by Xavier Leroy, Nicolás Ojeda Bär)
5269
5270 * #1128, #7503, #9036, #9722, #10069: EINTR-based signal handling.
5271 When a signal arrives, avoid running its OCaml handler in the middle
5272 of a blocking section. Instead, allow control to return quickly to
5273 a polling point where the signal handler can safely run, ensuring that
5274 I/O locks are not held while it runs. A polling point was removed from
5275 caml_leave_blocking_section, and one added to caml_raise.
5276 (Stephen Dolan, review by Goswin von Brederlow, Xavier Leroy, Damien
5277 Doligez, Anil Madhavapeddy, Guillaume Munch-Maccagnoni
5278 and Jacques-Henri Jourdan)
5279
5280 * #5154, #9569, #9734: Add `Val_none`, `Some_val`, `Is_none`, `Is_some`,
5281 `caml_alloc_some`, and `Tag_some`. As these macros are sometimes defined by
5282 authors of C bindings, this change may cause warnings/errors in case of
5283 redefinition.
5284 (Nicolás Ojeda Bär, review by Stephen Dolan, Gabriel Scherer, Mark Shinwell,
5285 and Xavier Leroy)
5286
5287 * #9674: Memprof: guarantee that an allocation callback is always run
5288 in the same thread the allocation takes place
5289 (Jacques-Henri Jourdan, review by Stephen Dolan)
5290
5291 - #10025: Track custom blocks (e.g. Bigarray) with Memprof
5292 (Stephen Dolan, review by Leo White, Gabriel Scherer and Jacques-Henri
5293 Jourdan)
5294
5295 - #9619: Change representation of function closures so that code pointers
5296 can be easily distinguished from environment variables
5297 (Xavier Leroy, review by Mark Shinwell and Damien Doligez)
5298
5299 - #9654: More efficient management of code fragments.
5300 (Xavier Leroy, review by Jacques-Henri Jourdan, Damien Doligez, and
5301 Stephen Dolan)
5302
5303 ### Other libraries (highlights):
5304
5305 - #9573: reimplement Unix.create_process and related functions without
5306 Unix.fork, for better efficiency and compatibility with threads.
5307 (Xavier Leroy, review by Gabriel Scherer and Anil Madhavapeddy)
5308
5309 - #9575: Add Unix.is_inet6_addr
5310 (Nicolás Ojeda Bär, review by Xavier Leroy)
5311
5312 - #9930: new module Semaphore in the thread library, implementing
5313 counting semaphores and binary semaphores
5314 (Xavier Leroy, review by Daniel Bünzli and Damien Doligez,
5315 additional suggestions by Stephen Dolan and Craig Ferguson)
5316
5317 * #9206, #9419: update documentation of the threads library;
5318 deprecate Thread.kill, Thread.wait_read, Thread.wait_write,
5319 and the whole ThreadUnix module.
5320 (Xavier Leroy, review by Florian Angeletti, Guillaume Munch-Maccagnoni,
5321 and Gabriel Scherer)
5322
5323 ### Manual and documentation (highlights):
5324
5325 - #9755: Manual: post-processing the html generated by ocamldoc and
5326 hevea. Improvements on design and navigation, including a mobile
5327 version, and a quick-search functionality for the API.
5328 (San Vũ Ngọc, review by David Allsopp and Florian Angeletti)
5329
5330 - #9468: HACKING.adoc: using dune to get merlin support
5331 (Thomas Refis, review by Gabriel Scherer)
5332
5333 - #9684: document in address_class.h the runtime value model in
5334 naked-pointers and no-naked-pointers mode
5335 (Xavier Leroy and Gabriel Scherer)
5336
5337 ### Internal/compiler-libs changes (highlights):
5338
5339 - #9464, #9493, #9520, #9563, #9599, #9608, #9647: refactor
5340 the pattern-matching compiler
5341 (Thomas Refis and Gabriel Scherer, review by Florian Angeletti)
5342
5343 - #9696: ocamltest now shows its log when a test fails. In addition, the log
5344 contains the output of executed programs.
5345 (Nicolás Ojeda Bär, review by David Allsopp, Sébastien Hinderer and Gabriel
5346 Scherer)
5347
5348 ### Build system (highlights):
5349
5350 - #9824, #9837: Honour the CFLAGS and CPPFLAGS variables.
5351 (Sébastien Hinderer, review by David Allsopp)
5352
5353 - #10063: (Re-)enable building on illumos (SmartOS, OmniOS, ...) and
5354 Oracle Solaris; x86_64/GCC and 64-bit SPARC/Sun PRO C compilers.
5355 (partially revert #2024).
5356 (Tõivo Leedjärv and Konstantin Romanov,
5357 review by Gabriel Scherer, Sébastien Hinderer and Xavier Leroy)
5358
5359
5360 ### Language features:
5361
5362 - #1655: pattern aliases do not ignore type constraints
5363 (Thomas Refis, review by Jacques Garrigue and Gabriel Scherer)
5364
5365 - #9429: Add unary operators containing `#` to the parser for use in ppx
5366 rewriters
5367 (Leo White, review by Damien Doligez)
5368
5369 ### Runtime system:
5370
5371 * #9697: Remove the Is_in_code_area macro and the registration of DLL code
5372 areas in the page table, subsumed by the new code fragment management API
5373 (Xavier Leroy, review by Jacques-Henri Jourdan)
5374
5375 - #9756: garbage collector colors change
5376 removes the gray color from the major gc
5377 (Sadiq Jaffer and Stephen Dolan reviewed by Xavier Leroy,
5378 KC Sivaramakrishnan, Damien Doligez and Jacques-Henri Jourdan)
5379
5380 * #9513: Selectively initialise blocks in `Obj.new_block`. Reject `Custom_tag`
5381 objects and zero-length `String_tag` objects.
5382 (KC Sivaramakrishnan, review by David Allsopp, Xavier Leroy, Mark Shinwell
5383 and Leo White)
5384
5385 - #9564: Add a macro to construct out-of-heap block header.
5386 (KC Sivaramakrishnan, review by Stephen Dolan, Gabriel Scherer,
5387 and Xavier Leroy)
5388
5389 - #9951: Ensure that the mark stack push optimisation handles naked pointers
5390 (KC Sivaramakrishnan, reported by Enguerrand Decorne, review by Gabriel
5391 Scherer, and Xavier Leroy)
5392
5393 - #9678: Reimplement `Obj.reachable_words` using a hash table to
5394 detect sharing, instead of temporary in-place modifications. This
5395 is a prerequisite for Multicore OCaml.
5396 (Xavier Leroy, review by Jacques-Henri Jourdan and Sébastien Hinderer)
5397
5398 - #1795, #9543: modernize signal handling on Linux i386, PowerPC, and s390x,
5399 adding support for Musl ppc64le along the way.
5400 (Xavier Leroy and Anil Madhavapeddy, review by Stephen Dolan)
5401
5402 - #9648, #9689: Update the generic hash function to take advantage
5403 of the new representation for function closures
5404 (Xavier Leroy, review by Stephen Dolan)
5405
5406 - #9649: Update the marshaler (output_value) to take advantage
5407 of the new representation for function closures
5408 (Xavier Leroy, review by Damien Doligez)
5409
5410 - #10050: update {PUSH,}OFFSETCLOSURE* bytecode instructions to match new
5411 representation for closures
5412 (Nathanaëlle Courant, review by Xavier Leroy)
5413
5414 - #9728: Take advantage of the new closure representation to simplify the
5415 compaction algorithm and remove its dependence on the page table
5416 (Damien Doligez, review by Jacques-Henri Jourdan and Xavier Leroy)
5417
5418 - #2195: Improve error message in bytecode stack trace printing and load
5419 debug information during bytecode startup if OCAMLRUNPARAM=b=2.
5420 (David Allsopp, review by Gabriel Scherer and Xavier Leroy)
5421
5422 - #9466: Memprof: optimize random samples generation.
5423 (Jacques-Henri Jourdan, review by Xavier Leroy and Stephen Dolan)
5424
5425 - #9628: Memprof: disable sampling when memprof is suspended.
5426 (Jacques-Henri Jourdan, review by Gabriel Scherer and Stephen Dolan)
5427
5428 - #10056: Memprof: ensure young_trigger is within the bounds of the minor
5429 heap in caml_memprof_renew_minor_sample (regression from #8684)
5430 (David Allsopp, review by Guillaume Munch-Maccagnoni and
5431 Jacques-Henri Jourdan)
5432
5433 - #9506: Remove support for FreeBSD prior to 4.0R, that required explicit
5434 floating-point initialization to behave like IEEE standard
5435 (Hannes Mehnert, review by David Allsopp)
5436
5437 - #8807, #9503: Use different symbols for do_local_roots on bytecode and native
5438 (Stephen Dolan, review by David Allsopp and Xavier Leroy)
5439
5440 - #9670: Report full major collections in Gc stats.
5441 (Leo White, review by Gabriel Scherer)
5442
5443 - #9675: Remove the caml_static_{alloc,free,resize} primitives, now unused.
5444 (Xavier Leroy, review by Gabriel Scherer)
5445
5446 - #9710: Drop "support" for an hypothetical JIT for OCaml bytecode
5447 which has never existed.
5448 (Jacques-Henri Jourdan, review by Xavier Leroy)
5449
5450 - #9742, #9989: Ephemerons are now compatible with infix pointers occurring
5451 when using mutually recursive functions.
5452 (Jacques-Henri Jourdan, review by François Bobot)
5453
5454 - #9888, #9890: Fixes a bug in the `riscv` backend where register t0 was not
5455 saved/restored when performing a GC. This could potentially lead to a
5456 segfault.
5457 (Nicolás Ojeda Bär, report by Xavier Leroy, review by Xavier Leroy)
5458
5459 - #9907: Fix native toplevel on native Windows.
5460 (David Allsopp, review by Florian Angeletti)
5461
5462 - #9909: Remove caml_code_area_start and caml_code_area_end globals (no longer
5463 needed as the pagetable heads towards retirement).
5464 (David Allsopp, review by Xavier Leroy)
5465
5466 - #9949: Clarify documentation of GC message 0x1 and make sure it is
5467 displayed every time a major cycle is forcibly finished.
5468 (Damien Doligez, review by Xavier Leroy)
5469
5470 - #10062: set ARCH_INT64_PRINTF_FORMAT correctly for both modes of mingw-w64
5471 (David Allsopp, review by Xavier Leroy)
5472
5473 ### Code generation and optimizations:
5474
5475 - #9551: ocamlc no longer loads DLLs at link time to check that
5476 external functions referenced from OCaml code are defined.
5477 Instead, .so/.dll files are parsed directly by pure OCaml code.
5478 (Nicolás Ojeda Bär, review by Daniel Bünzli, Gabriel Scherer,
5479 Anil Madhavapeddy, and Xavier Leroy)
5480
5481 - #9620: Limit the number of parameters for an uncurried or untupled
5482 function. Functions with more parameters than that are left
5483 partially curried or tupled.
5484 (Xavier Leroy, review by Mark Shinwell)
5485
5486 - #9752: Revised handling of calling conventions for external C functions.
5487 Provide a more precise description of the types of unboxed arguments,
5488 so that the ARM64 iOS/macOS calling conventions can be honored.
5489 (Xavier Leroy, review by Mark Shinwell and Eduardo Rafael)
5490
5491 - #9838: Ensure that Cmm immediates are generated as Cconst_int where
5492 possible, improving instruction selection.
5493 (Stephen Dolan, review by Leo White and Xavier Leroy)
5494
5495 - #9864: Revised recognition of immediate arguments to integer operations.
5496 Fixes several issues that could have led to producing assembly code
5497 that is rejected by the assembler.
5498 (Xavier Leroy, review by Stephen Dolan)
5499
5500 - #9969, #9981: Added mergeable flag to ELF sections containing mergeable
5501 constants. Fixes compatibility with the integrated assembler in clang 11.0.0.
5502 (Jacob Young, review by Nicolás Ojeda Bär)
5503
5504 ### Standard library:
5505
5506 - #9781: add injectivity annotations to parameterized abstract types
5507 (Jeremy Yallop, review by Nicolás Ojeda Bär)
5508
5509 * #9554: add primitive __FUNCTION__ that returns the name of the current method
5510 or function, including any enclosing module or class.
5511 (Nicolás Ojeda Bär, Stephen Dolan, review by Stephen Dolan)
5512
5513 - #9075: define to_rev_seq in Set and Map modules.
5514 (Sébastien Briais, review by Gabriel Scherer and Nicolás Ojeda Bär)
5515
5516 - #9561: Unbox Unix.gettimeofday and Unix.time
5517 (Stephen Dolan, review by David Allsopp)
5518
5519 - #9570: Provide an Atomic module with a trivial purely-sequential
5520 implementation, to help write code that is compatible with Multicore
5521 OCaml.
5522 (Gabriel Scherer, review by Xavier Leroy)
5523
5524 - #10035: Make sure that flambda respects atomicity in the Atomic module.
5525 (Guillaume Munch-Maccagnoni, review by Gabriel Scherer)
5526
5527 - #9571: Make at_exit and Printexc.register_printer thread-safe.
5528 (Guillaume Munch-Maccagnoni, review by Gabriel Scherer and Xavier Leroy)
5529
5530 - #9587: Arg: new Rest_all spec to get all rest arguments in a list
5531 (this is similar to Rest, but makes it possible to detect when there
5532 are no arguments (an empty list) after the rest marker)
5533 (Gabriel Scherer, review by Nicolás Ojeda Bär and David Allsopp)
5534
5535 - #9655: Obj: introduce type raw_data and functions raw_field, set_raw_field
5536 to manipulate out-of-heap pointers in no-naked-pointer mode,
5537 and more generally all other data that is not a well-formed OCaml value
5538 (Xavier Leroy, review by Damien Doligez and Gabriel Scherer)
5539
5540 - #9663: Extend Printexc API for raw backtrace entries.
5541 (Stephen Dolan, review by Nicolás Ojeda Bär and Gabriel Scherer)
5542
5543 - #9763: Add function Hashtbl.rebuild to convert from old hash table
5544 formats (that may have been saved to persistent storage) to the
5545 current hash table format. Remove leftover support for the hash
5546 table format and generic hash function that were in use before OCaml 4.00.
5547 (Xavier Leroy, review by Nicolás Ojeda Bär)
5548
5549 - #10070: Fix Float.Array.blit when source and destination arrays coincide.
5550 (Nicolás Ojeda Bär, review by Alain Frisch and Xavier Leroy)
5551
5552 ### Other libraries:
5553
5554 - #8796: On Windows, make Unix.utimes use FILE_FLAG_BACKUP_SEMANTICS flag
5555 to allow it to work with directories.
5556 (Daniil Baturin, review by Damien Doligez)
5557
5558 - #9593: Use new flag for non-elevated symbolic links and test for Developer
5559 Mode on Windows
5560 (Manuel Hornung, review by David Allsopp and Nicolás Ojeda Bär)
5561
5562 * #9601: Return EPERM for EUNKNOWN -1314 in win32unix (principally affects
5563 error handling when Unix.symlink is unavailable)
5564 (David Allsopp, review by Xavier Leroy)
5565
5566 - #9338, #9790: Dynlink: make sure *_units () functions report accurate
5567 information before the first load.
5568 (Daniel Bünzli, review by Xavier Leroy and Nicolás Ojeda Bär)
5569
5570 * #9757, #9846, #10161: check proper ownership when operating over mutexes.
5571 Now, unlocking a mutex held by another thread or not locked at all
5572 reliably raises a Sys_error exception. Before, it was undefined
5573 behavior, but the documentation did not say so.
5574 Likewise, locking a mutex already locked by the current thread
5575 reliably raises a Sys_error exception. Before, it could
5576 deadlock or succeed (and do recursive locking), depending on the OS.
5577 (Xavier Leroy, report by Guillaume Munch-Maccagnoni, review by
5578 Guillaume Munch-Maccagnoni, David Allsopp, and Stephen Dolan)
5579
5580 - #9802: Ensure signals are handled before Unix.kill returns
5581 (Stephen Dolan, review by Jacques-Henri Jourdan)
5582
5583 - #9869, #10073: Add Unix.SO_REUSEPORT
5584 (Yishuai Li, review by Xavier Leroy, amended by David Allsopp)
5585
5586 - #9906, #9914: Add Unix._exit as a way to exit the process immediately,
5587 skipping any finalization action
5588 (Ivan Gotovchits and Xavier Leroy, review by Sébastien Hinderer and
5589 David Allsopp)
5590
5591 - #9958: Raise exception in case of error in Unix.setsid.
5592 (Nicolás Ojeda Bär, review by Stephen Dolan)
5593
5594 - #9971, #9973: Make sure the process can terminate when the last thread
5595 calls Thread.exit.
5596 (Xavier Leroy, report by Jacques-Henri Jourdan, review by David Allsopp
5597 and Jacques-Henri Jourdan).
5598
5599 ### Tools:
5600
5601 - #9551: ocamlobjinfo is now able to display information on .cmxs shared
5602 libraries natively; it no longer requires libbfd to do so
5603 (Nicolás Ojeda Bär, review by Daniel Bünzli, Gabriel Scherer,
5604 Anil Madhavapeddy, and Xavier Leroy)
5605
5606 * #9299, #9795: ocamldep: do not process files during cli parsing. Fixes
5607 various broken cli behaviours.
5608 (Daniel Bünzli, review by Nicolás Ojeda Bär)
5609
5610 ### Debugging and profiling:
5611
5612 - #9606, #9635, #9637: fix 4.10 performance regression in the debugger
5613 (behaviors quadratic in the size of the debugged program)
5614 (Xavier Leroy, report by Jacques Garrigue and Virgile Prevosto,
5615 review by David Allsopp and Jacques-Henri Jourdan)
5616
5617 - #9948: Remove Spacetime.
5618 (Nicolás Ojeda Bär, review by Stephen Dolan and Xavier Leroy)
5619
5620 ### Manual and documentation:
5621
5622 - #10142, #10154: improved rendering and latex code for toplevel code examples.
5623 (Florian Angeletti, report by John Whitington, review by Gabriel Scherer)
5624
5625 - #9745: Manual: Standard Library labeled and unlabeled documentation unified
5626 (John Whitington, review by Nicolás Ojeda Bär, David Allsopp,
5627 Thomas Refis, and Florian Angeletti)
5628
5629 - #9877: manual, warn that multi-index indexing operators should be defined in
5630 conjunction of single-index ones.
5631 (Florian Angeletti, review by Hezekiah M. Carty, Gabriel Scherer,
5632 and Marcello Seri)
5633
5634 - #10233: Document `-save-ir-after scheduling` and update `-stop-after` options.
5635 (Greta Yorsh, review by Gabriel Scherer and Florian Angeletti)
5636
5637 ### Compiler user-interface and warnings:
5638
5639 - #1931: rely on levels to enforce principality in patterns
5640 (Thomas Refis and Leo White, review by Jacques Garrigue)
5641
5642 * #9011: Do not create .a/.lib files when creating a .cmxa with no modules.
5643 macOS ar doesn't support creating empty .a files (#1094) and MSVC doesn't
5644 permit .lib files to contain no objects. When linking with a .cmxa containing
5645 no modules, it is now not an error for there to be no .a/.lib file.
5646 (David Allsopp, review by Xavier Leroy)
5647
5648 - #9560: Report partial application warnings on type errors in applications.
5649 (Stephen Dolan, report and testcase by whitequark, review by Gabriel Scherer
5650 and Thomas Refis)
5651
5652 - #9583: when bytecode linking fails due to an unavailable module, the module
5653 that requires it is now included in the error message.
5654 (Nicolás Ojeda Bär, review by Vincent Laviron)
5655
5656 - #9615: Attach package type attributes to core_type.
5657 When parsing constraints on a first class module, attributes found after the
5658 module type were parsed but ignored. Now they are attached to the
5659 corresponding core_type.
5660 (Etienne Millon, review by Thomas Refis)
5661
5662 - #6633, #9673: Add hint when a module is used instead of a module type or
5663 when a module type is used instead of a module or when a class type is used
5664 instead of a class.
5665 (Xavier Van de Woestyne, report by whitequark, review by Florian Angeletti
5666 and Gabriel Scherer)
5667
5668 - #9754: allow [@tailcall true] (equivalent to [@tailcall]) and
5669 [@tailcall false] (warns if on a tailcall)
5670 (Gabriel Scherer, review by Nicolás Ojeda Bär)
5671
5672 - #9751: Add warning 68. Pattern-matching depending on mutable state
5673 prevents the remaining arguments from being uncurried.
5674 (Hugo Heuzard, review by Leo White)
5675
5676 - #9783: Widen warning 16 (Unerasable optional argument) to more cases.
5677 (Leo White, review by Florian Angeletti)
5678
5679 - #10008: Improve error message for aliases to the current compilation unit.
5680 (Leo White, review by Gabriel Scherer)
5681
5682 - #10046: Link all DLLs with -static-libgcc on mingw32 to prevent dependency
5683 on libgcc_s_sjlj-1.dll with mingw-w64 runtime 8.0.0 (previously this was
5684 only needed for dllunix.dll).
5685 (David Allsopp, report by Andreas Hauptmann, review by Xavier Leroy)
5686
5687 - #9634: Allow initial and repeated commas in `OCAMLRUNPARAM`.
5688 (Nicolás Ojeda Bär, review by Gabriel Scherer)
5689
5690 ### Internal/compiler-libs changes:
5691
5692 - #8987: Make some locations more accurate
5693 (Thomas Refis, review by Gabriel Scherer)
5694
5695 - #9216: add Lambda.duplicate which refreshes bound identifiers
5696 (Gabriel Scherer, review by Pierre Chambart and Vincent Laviron)
5697
5698 - #9376: Remove spurious Ptop_defs from #use
5699 (Leo White, review by Damien Doligez)
5700
5701 - #9604: refactoring of the ocamltest codebase.
5702 (Nicolás Ojeda Bär, review by Gabriel Scherer and Sébastien Hinderer)
5703
5704 - #9498, #9511: make the pattern-matching analyzer more robust to
5705 or-pattern explosion, by stopping after the first counter-example to
5706 exhaustivity
5707 (Gabriel Scherer, review by Luc Maranget, Thomas Refis and Florian Angeletti,
5708 report by Alex Fedoseev through Hongbo Zhang)
5709
5710 - #9514: optimize pattern-matching exhaustivity analysis in the single-row case
5711 (Gabriel Scherer, review by Stephen Dolan)
5712
5713 - #9442: refactor the implementation of the [@tailcall] attribute
5714 to allow for a structured attribute payload
5715 (Gabriel Scherer, review by Vladimir Keleshev and Nicolás Ojeda Bär)
5716
5717 - #9688: Expose the main entrypoint in compilerlibs
5718 (Stephen Dolan, review by Nicolás Ojeda Bär, Greta Yorsh and David Allsopp)
5719
5720 - #9715: recheck scope escapes after normalising paths
5721 (Matthew Ryan, review by Gabriel Scherer and Thomas Refis)
5722
5723 - #9778: Fix printing for bindings where polymorphic type annotations and
5724 attributes are present.
5725 (Matthew Ryan, review by Nicolás Ojeda Bär)
5726
5727 - #9797, #9849: Eliminate the routine use of external commands in ocamltest.
5728 ocamltest no longer calls the mkdir, rm and ln external commands (at present,
5729 the only external command ocamltest uses is diff).
5730 (David Allsopp, review by Nicolás Ojeda Bär, Sébastien Hinderer and
5731 Xavier Leroy)
5732
5733 - #9801: Don't ignore EOL-at-EOF differences in ocamltest.
5734 (David Allsopp, review by Damien Doligez, much input and thought from
5735 Daniel Bünzli, Damien Doligez, Sébastien Hinderer, and Xavier Leroy)
5736
5737 - #9889: more caching when printing types with -short-path.
5738 (Florian Angeletti, review by Gabriel Scherer)
5739
5740 - #9591: fix pprint of polyvariants that start with a core_type, closed,
5741 not low (Chet Murthy, review by Florian Angeletti)
5742
5743 - #9590: fix pprint of extension constructors (and exceptions) that rebind
5744 (Chet Murthy, review by Florian Angeletti)
5745
5746 - #9963: Centralized tracking of frontend's global state
5747 (Frédéric Bour and Thomas Refis, review by Gabriel Scherer)
5748
5749 - #9631: Named text sections for caml_system__code_begin/end symbols
5750 (Greta Yorsh, review by Frédéric Bour)
5751
5752 - #9896: Share the strings representing scopes, fixing some regression
5753 on .cmo/.cma sizes
5754 (Alain Frisch and Xavier Clerc, review by Gabriel Scherer)
5755
5756 ### Build system:
5757
5758 - #9332, #9518, #9529: Cease storing C dependencies in the codebase. C
5759 dependencies are generated on-the-fly in development mode. For incremental
5760 compilation, the MSVC ports require GCC to be present.
5761 (David Allsopp, review by Sébastien Hinderer, YAML-fu by Stephen Dolan)
5762
5763 - #7121, #9558: Always have the autoconf-discovered ld in PACKLD, with
5764 extra flags in new variable PACKLD_FLAGS. For
5765 cross-compilation, this means the triplet-prefixed version will always be
5766 used.
5767 (David Allsopp, report by Adrian Nader, review by Sébastien Hinderer)
5768
5769 - #9527: stop including configuration when running 'clean' rules
5770 to avoid C dependency recomputation.
5771 (Gabriel Scherer, review by David Allsopp)
5772
5773 - #9804: Build C stubs of libraries in otherlibs/ with debug info.
5774 (Stephen Dolan, review by Sébastien Hinderer and David Allsopp)
5775
5776 - #9938, #9939: Define __USE_MINGW_ANSI_STDIO=0 for the mingw-w64 ports to
5777 prevent their C99-compliant snprintf conflicting with ours.
5778 (David Allsopp, report by Michael Soegtrop, review by Xavier Leroy)
5779
5780 - #9895, #9523: Avoid conflict with C++20 by not installing VERSION to the OCaml
5781 Standard Library directory.
5782 (Bernhard Schommer, review by David Allsopp)
5783
5784 - #10044: Always report the detected ARCH, MODEL and SYSTEM, even for bytecode-
5785 only builds (fixes a "configuration regression" from 4.08 for the Windows
5786 builds)
5787 (David Allsopp, review by Xavier Leroy)
5788
5789 - #10071: Fix bug in tests/misc/weaklifetime.ml that was reported in #10055
5790 (Damien Doligez and Gabriel Scherer, report by David Allsopp)
5791
5792 ### Bug fixes:
5793
5794 - #7538, #9669: Check for misplaced attributes on module aliases
5795 (Leo White, report by Thomas Leonard, review by Florian Angeletti)
5796
5797 - #7813, #9955: make sure the major GC cycle doesn't get stuck in Idle state
5798 (Damien Doligez, report by Anders Fugmann, review by Jacques-Henri Jourdan)
5799
5800 - #7902, #9556: Type-checker infers recursive type, even though -rectypes is
5801 off.
5802 (Jacques Garrigue, report by François Pottier, review by Leo White)
5803
5804 - #8746: Hashtbl: Restore ongoing traversal status after filter_map_inplace
5805 (Mehdi Bouaziz, review by Alain Frisch)
5806
5807 - #8747, #9709: incorrect principality warning on functional updates of records
5808 (Jacques Garrigue, report and review by Thomas Refis)
5809
5810 * #8907, #9878: `Typemod.normalize_signature` uses wrong environment
5811 (Jacques Garrigue, report and review by Leo White)
5812
5813 - #9421, #9427: fix printing of (::) in ocamldoc
5814 (Florian Angeletti, report by Yawar Amin, review by Damien Doligez)
5815
5816 - #9440: for a type extension constructor with parameterised arguments,
5817 REPL displayed <poly> for each as opposed to the concrete values used.
5818 (Christian Quinn, review by Gabriel Scherer)
5819
5820 - #9433: Fix package constraints for module aliases
5821 (Leo White, review by Jacques Garrigue)
5822
5823 - #9469: Better backtraces for lazy values
5824 (Leo White, review by Nicolás Ojeda Bär)
5825
5826 - #9521, #9522: correctly fail when comparing functions
5827 with Closure and Infix tags.
5828 (Gabriel Scherer and Jeremy Yallop and Xavier Leroy,
5829 report by Twitter user @st_toHKR through Jun Furuse)
5830
5831 - #9611: maintain order of load path entries in various situations: when passing
5832 them to system linker, ppx contexts, etc.
5833 (Nicolás Ojeda Bär, review by Jérémie Dimino and Gabriel Scherer)
5834
5835 - #9633: ocamltest: fix a bug when certain variables set in test scripts would
5836 be ignored (eg `ocamlrunparam`).
5837 (Nicolás Ojeda Bär, review by Sébastien Hinderer)
5838
5839 - #9681, #9690, #9693: small runtime changes
5840 for the new closure representation (#9619)
5841 (Xavier Leroy, Sadiq Jaffer, Gabriel Scherer,
5842 review by Xavier Leroy and Jacques-Henri Jourdan)
5843
5844 - #9739, #9747: Avoid calling type variables, types that are not variables in
5845 recursive occurrence error messages
5846 (for instance, "Type variable int occurs inside int list")
5847 (Florian Angeletti, report by Stephen Dolan, review by Armaël Guéneau)
5848
5849 - #9759, #9767: Spurious GADT ambiguity without -principal
5850 (Jacques Garrigue, report by Thomas Refis,
5851 review by Thomas Refis and Gabriel Scherer)
5852
5853 - #9799, #9803: make pat_env point to the correct environment
5854 (Thomas Refis, report by Alex Fedoseev, review by Gabriel Scherer)
5855
5856 - #9825, #9830: the C global variable caml_fl_merge and the C function
5857 caml_spacetime_my_profinfo (bytecode version) were declared and
5858 defined with different types. This is undefined behavior and
5859 cancause link-time errors with link-time optimization (LTO).
5860 (Xavier Leroy, report by Richard Jones, review by Nicolás Ojeda Bär)
5861
5862 - #9753: fix build for Android
5863 (Eduardo Rafael, review by Xavier Leroy)
5864
5865 - #9848, #9855: Fix double free of bytecode in toplevel
5866 (Stephen Dolan, report by Sampsa Kiiskinen, review by Gabriel Scherer)
5867
5868 - #9858, #9861: Compiler fails with Ctype.Nondep_cannot_erase exception
5869 (Thomas Refis, report by Philippe Veber, review by Florian Angeletti)
5870
5871 - #9860: wrong range constraint for subtract immediate on zSystems / s390x
5872 (Xavier Leroy, review by Stephen Dolan)
5873
5874 - #9868, #9872, #9892: bugs in {in,out}_channel_length and seek_in
5875 for files opened in text mode under Windows
5876 (Xavier Leroy, report by Alain Frisch, review by Nicolás Ojeda Bär
5877 and Alain Frisch)
5878
5879 - #9925: Correct passing -fdebug-prefix-map to flexlink on Cygwin by prefixing
5880 it with -link.
5881 (David Allsopp, review by Xavier Leroy)
5882
5883 - #9927: Restore Cygwin64 support.
5884 (David Allsopp, review by Xavier Leroy)
5885
5886 - #9940: Fix unboxing of allocated constants from other compilation units
5887 (Vincent Laviron, report by Stephen Dolan, review by Xavier Leroy and
5888 Stephen Dolan)
5889
5890 - #9991: Fix reproducibility for `-no-alias-deps`
5891 (Leo White, review by Gabriel Scherer and Florian Angeletti)
5892
5893 - #9998: Use Sys.opaque_identity in CamlinternalLazy.force
5894 This removes extra warning 59 messages when compiling afl-instrumented
5895 code with flambda -O3.
5896 (Vincent Laviron, report by Louis Gesbert, review by Gabriel Scherer and
5897 Pierre Chambart)
5898
5899 - #9999: fix -dsource printing of the pattern (`A as x | (`B as x)).
5900 (Gabriel Scherer, report by Anton Bachin, review by Florian Angeletti)
5901
5902 - #9970, #10010: fix the declaration scope of extensible-datatype constructors.
5903 A regression that dates back to 4.08 makes extensible-datatype constructors
5904 with inline records very fragile, for example:
5905 type 'a t += X of {x : 'a}
5906 (Gabriel Scherer, review by Thomas Refis and Leo White,
5907 report by Nicolás Ojeda Bär)
5908
5909 - #10048: Fix bug with generalized local opens.
5910 (Leo White, review by Thomas Refis)
5911
5912 - #10106, #10112: some expected-type explanations where forgotten
5913 after some let-bindings
5914 (Gabriel Scherer, review by Thomas Refis and Florian Angeletti,
5915 report by Daniil Baturin)
5916
5917 OCaml 4.11 maintenance branch
5918 -----------------------------
5919
5920 ### Bug fixes:
5921
5922 - #9096, #10096: fix a 4.11.0 performance regression in classes/objects
5923 declared within a function
5924 (Gabriel Scherer, review by Leo White, report by Sacha Ayoun)
5925
5926 OCaml 4.11.1 (31 August 2020)
5927 -----------------------------
5928
5929 ### Bug fixes:
5930
5931 - #9856, #9857: Prevent polymorphic type annotations from generalizing
5932 weak polymorphic variables.
5933 (Leo White, review by Jacques Garrigue)
5934
5935 - #9859, #9862: Remove an erroneous assertion when inferred function types
5936 appear in the right hand side of an explicit :> coercion
5937 (Florian Angeletti, review by Thomas Refis)
5938
5939 OCaml 4.11.0 (19 August 2020)
5940 -----------------------------
5941
5942 (Changes that can break existing programs are marked with a "*")
5943
5944 ### Runtime system:
5945
5946 - #9096: Print function names in backtraces.
5947 Old output:
5948 > Called from file "foo.ml", line 16, characters 42-53
5949 New output:
5950 > Called from Foo.bar in file "foo.ml", line 16, characters 42-53
5951 (Stephen Dolan, review by Leo White and Mark Shinwell)
5952
5953 - #9082: The instrumented runtime now records logs in the CTF format.
5954 A new API is available in the runtime to collect runtime statistics,
5955 replacing the previous instrumented runtime macros.
5956 Gc.eventlog_pause and Gc.eventlog_resume were added to allow user to control
5957 instrumentation in a running program.
5958 See the manual for more information on how to use this instrumentation mode.
5959 (Enguerrand Decorne and Stephen Dolan, with help and review from
5960 David Allsopp, Sébastien Hinderer, review by Anil Madhavapeddy,
5961 Nicolás Ojeda Bär, Shakthi Kannan, KC Sivaramakrishnan, Gabriel Scherer,
5962 Guillaume Munch-Maccagnoni, Damien Doligez, Leo White, Daniel Bünzli
5963 and Xavier Leroy)
5964
5965 - #9230, #9362: Memprof support for native allocations.
5966 (Jacques-Henri Jourdan and Stephen Dolan, review by Gabriel Scherer)
5967
5968 - #8920, #9238, #9239, #9254, #9458: New API for statistical memory profiling
5969 in Memprof.Gc. The new version does no longer use ephemerons and allows
5970 registering callbacks for promotion and deallocation of memory
5971 blocks.
5972 The new API no longer gives the block tags to the allocation callback.
5973 (Stephen Dolan and Jacques-Henri Jourdan, review by Damien Doligez
5974 and Gabriel Scherer)
5975
5976 - #9353: Reimplement `output_value` and the `Marshal.to_*` functions
5977 using a hash table to detect sharing, instead of temporary in-place
5978 modifications. This is a prerequisite for Multicore OCaml.
5979 (Xavier Leroy and Basile Clément, review by Gabriel Scherer and
5980 Stephen Dolan)
5981
5982
5983 - #9119: Make [caml_stat_resize_noexc] compatible with the [realloc]
5984 API when the old block is NULL.
5985 (Jacques-Henri Jourdan, review by Xavier Leroy)
5986
5987 - #9233: Restore the bytecode stack after an allocation.
5988 (Stephen Dolan, review by Gabriel Scherer and Jacques-Henri Jourdan)
5989
5990 - #9249: restore definition of ARCH_ALIGN_INT64 in m.h if the architecture
5991 requires 64-bit integers to be double-word aligned (autoconf regression)
5992 (David Allsopp, review by Sébastien Hinderer)
5993
5994 - #9259: Made `Ephemeron.blit_key` and `Weak.blit` faster. They are now
5995 linear in the size of the range being copied instead of depending on the
5996 total sizes of the ephemerons or weak arrays involved.
5997 (Arseniy Alekseyev, design advice by Leo White, review by François Bobot
5998 and Damien Doligez)
5999
6000 - #9279: Memprof optimisation.
6001 (Stephen Dolan, review by Jacques-Henri Jourdan)
6002
6003 - #9280: Micro-optimise allocations on amd64 to save a register.
6004 (Stephen Dolan, review by Xavier Leroy)
6005
6006 - #9426: build the Mingw ports with higher levels of GCC optimization
6007 (Xavier Leroy, review by Sébastien Hinderer)
6008
6009 * #9483: Remove accidental inclusion of <stdio.h> in <caml/misc.h>
6010 The only release with the inclusion of stdio.h has been 4.10.0
6011 (Christopher Zimmermann, review by Xavier Leroy and David Allsopp)
6012
6013 - #9282: Make Cconst_symbol have typ_int to fix no-naked-pointers mode.
6014 (Stephen Dolan, review by Mark Shinwell, Xavier Leroy and Vincent Laviron)
6015
6016 - #9497: Harmonise behaviour between bytecode and native code for
6017 recursive module initialisation in one particular case (fixes #9494).
6018 (Mark Shinwell, David Allsopp, Vincent Laviron, Xavier Leroy,
6019 Geoff Reedy, original bug report by Arlen Cox)
6020
6021 - #8791: use a variable-length encoding when marshalling bigarray dimensions,
6022 avoiding overflow.
6023 (Jeremy Yallop, Stephen Dolan, review by Xavier Leroy)
6024
6025 ### Code generation and optimizations:
6026
6027 - #9441: Add RISC-V RV64G native-code backend.
6028 (Nicolás Ojeda Bär, review by Xavier Leroy and Gabriel Scherer)
6029
6030 - #9316, #9443, #9463, #9782: Use typing information from Clambda
6031 for mutable Cmm variables.
6032 (Stephen Dolan, review by Vincent Laviron, Guillaume Bury, Xavier Leroy,
6033 and Gabriel Scherer; temporary bug report by Richard Jones)
6034
6035 - #8637, #8805, #9247, #9296: Record debug info for each allocation.
6036 (Stephen Dolan and Jacques-Henri Jourdan, review by Damien Doligez,
6037 KC Sivaramakrishnan and Xavier Leroy)
6038
6039
6040 - #9193: Make tuple matching optimisation apply to Lswitch and Lstringswitch.
6041 (Stephen Dolan, review by Thomas Refis and Gabriel Scherer)
6042
6043 - #9392: Visit registers at most once in Coloring.iter_preferred.
6044 (Stephen Dolan, review by Pierre Chambart and Xavier Leroy)
6045
6046 - #9412: Keep Sys.opaque_identity in Cmm and Mach
6047 (Stephen Dolan, review by Mark Shinwell and Gabriel Scherer)
6048
6049 - #9549, #9557: Make -flarge-toc the default for PowerPC and introduce
6050 -fsmall-toc to enable the previous behaviour.
6051 (David Allsopp, report by Nathaniel Wesley Filardo, review by Xavier Leroy)
6052
6053 ### Language features
6054
6055 - #8820, #9166: quoted extensions: {%foo|...|} is lighter syntax for
6056 [%foo {||}], and {%foo bar|...|bar} for [%foo {bar|...|bar}].
6057 (Gabriel Radanne, Leo White, Gabriel Scherer and Pieter Goetschalckx,
6058 request by Bikal Lem)
6059
6060 - #7364, #2188, #9592, #9609: improvement of the unboxability check for types
6061 with a single constructor. Mutually-recursive type declarations can
6062 now contain unboxed types. This is based on the paper
6063 https://arxiv.org/abs/1811.02300
6064 (Gabriel Scherer and Rodolphe Lepigre,
6065 review by Jeremy Yallop, Damien Doligez and Frédéric Bour)
6066
6067 - #1154, #1706: spellchecker hints and type-directed disambiguation
6068 for extensible sum type constructors
6069 (Florian Angeletti, review by Alain Frisch, Gabriel Radanne, Gabriel Scherer
6070 and Leo White)
6071
6072
6073 - #6673, #1132, #9617: Relax the handling of explicit polymorphic types.
6074 This improves error messages in some polymorphic recursive definition,
6075 and requires less polymorphic annotations in some cases of
6076 mutually-recursive definitions involving polymorphic recursion.
6077 (Leo White, review by Jacques Garrigue and Gabriel Scherer)
6078
6079 - #9232: allow any class type paths in #-types,
6080 For instance, "val f: #F(X).t -> unit" is now allowed.
6081 (Florian Angeletti, review by Gabriel Scherer, suggestion by Leo White)
6082
6083 ### Standard library:
6084
6085 - #9077: Add Seq.cons and Seq.append
6086 (Sébastien Briais, review by Yawar Amin and Florian Angeletti)
6087
6088 - #9235: Add Array.exists2 and Array.for_all2
6089 (Bernhard Schommer, review by Armaël Guéneau)
6090
6091 - #9226: Add Seq.unfold.
6092 (Jeremy Yallop, review by Hezekiah M. Carty, Gabriel Scherer and
6093 Gabriel Radanne)
6094
6095 - #9059: Added List.filteri function, same as List.filter but
6096 with the index of the element.
6097 (Léo Andrès, review by Alain Frisch)
6098
6099 - #8894: Added List.fold_left_map function combining map and fold.
6100 (Bernhard Schommer, review by Alain Frisch and github user @cfcs)
6101
6102 - #9365: Set.filter_map and Map.filter_map
6103 (Gabriel Scherer, review by Stephen Dolan and Nicolás Ojeda Bär)
6104
6105
6106 - #9248: Add Printexc.default_uncaught_exception_handler
6107 (Raphael Sousa Santos, review by Daniel Bünzli)
6108
6109 - #8771: Lexing: add set_position and set_filename to change (fake)
6110 the initial tracking position of the lexbuf.
6111 (Konstantin Romanov, Miguel Lumapat, review by Gabriel Scherer,
6112 Sébastien Hinderer, and David Allsopp)
6113
6114 - #9237: `Format.pp_update_geometry ppf (fun geo -> {geo with ...})`
6115 for formatter geometry changes that are robust to new geometry fields.
6116 (Gabriel Scherer, review by Josh Berdine and Florian Angeletti)
6117
6118 - #7110: Added Printf.ikbprintf and Printf.ibprintf
6119 (Muskan Garg, review by Gabriel Scherer and Florian Angeletti)
6120
6121 - #9266: Install pretty-printer for the exception Fun.Finally_raised.
6122 (Guillaume Munch-Maccagnoni, review by Daniel Bünzli, Gabriel Radanne,
6123 and Gabriel Scherer)
6124
6125 ### Other libraries:
6126
6127 - #9106: Register printer for Unix_error in win32unix, as in unix.
6128 (Christopher Zimmermann, review by David Allsopp)
6129
6130 - #9183: Preserve exception backtrace of exceptions raised by top-level phrases
6131 of dynlinked modules.
6132 (Nicolás Ojeda Bär, review by Xavier Clerc and Gabriel Scherer)
6133
6134 - #9320, #9550: under Windows, make sure that the Unix.exec* functions
6135 properly quote their argument lists.
6136 (Xavier Leroy, report by André Maroneze, review by Nicolás Ojeda Bär
6137 and David Allsopp)
6138
6139 - #9490, #9505: ensure proper rounding of file times returned by
6140 Unix.stat, Unix.lstat, Unix.fstat.
6141 (Xavier Leroy and Guillaume Melquiond, report by David Brown,
6142 review by Gabriel Scherer and David Allsopp)
6143
6144 ### Tools:
6145
6146 - #9283, #9455, #9457: add a new toplevel directive `#use_output "<command>"` to
6147 run a command and evaluate its output.
6148 (Jérémie Dimino, review by David Allsopp)
6149
6150
6151 - #6969: Argument -nocwd added to ocamldep
6152 (Muskan Garg, review by Florian Angeletti)
6153
6154 - #8676, #9594: turn debugger off in programs launched by the program
6155 being debugged
6156 (Xavier Leroy, report by Michael Soegtrop, review by Gabriel Scherer)
6157
6158 - #9057: aid debugging the debugger by preserving backtraces of unhandled
6159 exceptions.
6160 (David Allsopp, review by Gabriel Scherer)
6161
6162 - #9276: objinfo: cm[x]a print extra C options, objects and dlls in
6163 the order given on the cli. Follow up to #4949.
6164 (Daniel Bünzli, review by Gabriel Scherer)
6165
6166 - #463: objinfo: better errors on object files coming
6167 from a different (older or newer), incompatible compiler version.
6168 (Gabriel Scherer, review by Gabriel Radanne and Damien Doligez)
6169
6170 * #9197: remove compatibility logic from #244 that was designed to
6171 synchronize toplevel printing margins with Format.std_formatter,
6172 but also resulted in unpredictable/fragile changes to formatter
6173 margins.
6174 Setting the margins on the desired formatters should now work.
6175 typically on `Format.std_formatter`.
6176 Note that there currently is no robust way to do this from the
6177 toplevel, as applications may redirect toplevel printing. In
6178 a compiler/toplevel driver, one should instead access
6179 `Location.formatter_for_warnings`; it is not currently exposed
6180 to the toplevel.
6181 (Gabriel Scherer, review by Armaël Guéneau)
6182
6183 - #9207, #9210: fix ocamlyacc to work correctly with up to 255 entry
6184 points to the grammar.
6185 (Andreas Abel, review by Xavier Leroy)
6186
6187 - #9482, #9492: use diversions (@file) to work around OS limitations
6188 on length of Sys.command argument.
6189 (Xavier Leroy, report by Jérémie Dimino, review by David Allsopp)
6190
6191 ### Manual and documentation:
6192
6193 - #9141: beginning of the ocamltest reference manual
6194 (Sébastien Hinderer, review by Gabriel Scherer and Thomas Refis)
6195
6196 - #9228: Various Map documentation improvements: add missing key argument in
6197 the 'merge' example; clarify the relationship between input and output keys
6198 in 'union'; note that find and find_opt return values, not bindings.
6199 (Jeremy Yallop, review by Gabriel Scherer and Florian Angeletti)
6200
6201 - #9255, #9300: reference chapter, split the expression grammar
6202 (Florian Angeletti, report by Harrison Ainsworth, review by Gabriel Scherer)
6203
6204 - #9325: documented base case for `List.for_all` and `List.exists`
6205 (Glenn Slotte, review by Florian Angeletti)
6206
6207 - #9410, #9422: replaced naive fibonacci example with gcd
6208 (Anukriti Kumar, review by San Vũ Ngọc, Florian Angeletti, Léo Andrès)
6209
6210 - #9541: Add a documentation page for the instrumented runtime;
6211 additional changes to option names in the instrumented runtime.
6212 (Enguerrand Decorne, review by Anil Madhavapeddy, Gabriel Scherer,
6213 Daniel Bünzli, David Allsopp, Florian Angeletti,
6214 and Sébastien Hinderer)
6215
6216 - #9610: manual, C FFI: naked pointers are deprecated, detail the
6217 forward-compatible options for handling out-of-heap pointers.
6218 (Xavier Leroy, review by Mark Shinwell, David Allsopp and Florian Angeletti)
6219
6220 - #9618: clarify the Format documentation on the margin and maximum indentation
6221 limit
6222 (Florian Angeletti, review by Josh Berdine)
6223
6224
6225 - #8644: fix formatting comment about @raise in stdlib's mli files
6226 (Élie Brami, review by David Allsopp)
6227
6228 - #9327, #9401: manual, fix infix attribute examples
6229 (Florian Angeletti, report by David Cadé, review by Gabriel Scherer)
6230
6231 - #9403: added a description for warning 67 and added a "." at the end of
6232 warnings for consistency.
6233 (Muskan Garg, review by Gabriel Scherer and Florian Angeletti)
6234
6235 - #7708, #9580: Ensure Stdlib documentation index refers to Stdlib.
6236 (Stephen Dolan, review by Florian Angeletti, report by Hannes Mehnert)
6237
6238 ### Compiler user-interface and warnings:
6239
6240 - #9712: Update the version format to allow "~".
6241 The new format is "major.minor[.patchlevel][(+|~)additional-info]",
6242 for instance "4.12.0~beta1+flambda".
6243 This is a documentation-only change for the 4.11 branch, the new format
6244 will be used starting with the 4.12 branch.
6245 (Florian Angeletti, review by Damien Doligez and Xavier Leroy)
6246
6247 - #1664: make -output-complete-obj link the runtime native c libraries when
6248 building shared libraries like `-output-obj`.
6249 (Florian Angeletti, review by Nicolás Ojeda Bär)
6250
6251 - #9349: Support [@inlined hint] attribute.
6252 (Leo White, review by Stephen Dolan)
6253
6254 - #2141: generate .annot files from cmt data; deprecate -annot.
6255 (Nicolás Ojeda Bär, review by Alain Frisch, Gabriel Scherer and Damien
6256 Doligez)
6257
6258
6259 * #7678, #8631: ocamlc -c and ocamlopt -c pass same switches to the C
6260 compiler when compiling .c files (in particular, this means ocamlopt
6261 passes -fPIC on systems requiring it for shared library support).
6262 (David Allsopp, report by Daniel Bünzli, review by Sébastien Hinderer)
6263
6264 - #9074: reworded error message for non-regular structural types
6265 (Florian Angeletti, review by Jacques Garrigue and Leo White,
6266 report by Chas Emerick)
6267
6268 - #8938: Extend ocamlopt option "-stop-after" to handle "scheduling" argument.
6269 (Greta Yorsh, review by Florian Angeletti and Sébastien Hinderer)
6270
6271 - #8945, #9086: Fix toplevel show directive to work with constructors
6272 (Simon Parry, review by Gabriel Scherer, Jeremy Yallop,
6273 Alain Frisch, Florian Angeletti)
6274
6275 - #9107: improved error message for exceptions in module signature errors
6276 (Gabriel Scherer, review by Florian Angeletti)
6277
6278 - #9208: -dno-locations option to hide source locations (and debug events)
6279 from intermediate-representation dumps (-dfoo).
6280 (Gabriel Scherer, review by Vincent Laviron)
6281
6282 - #9393: Improve recursive module usage warnings
6283 (Leo White, review by Thomas Refis)
6284
6285 - #9486: Fix configuration for the Haiku operating system
6286 (Sylvain Kerjean, review by David Allsopp and Sébastien Hinderer)
6287
6288 ### Internal/compiler-libs changes:
6289
6290 - #9021: expose compiler Longident.t parsers
6291 (Florian Angeletti, review by Gabriel Scherer)
6292
6293 - #9452: Add locations to docstring attributes
6294 (Leo White, review by Gabriel Scherer)
6295
6296
6297 - #463: a new Misc.Magic_number module for user-friendly parsing
6298 and validation of OCaml magic numbers.
6299 (Gabriel Scherer, review by Gabriel Radanne and Damien Doligez)
6300
6301 - #1176: encourage better compatibility with older Microsoft C compilers by
6302 using GCC's -Wdeclaration-after-statement when available. Introduce
6303 Caml_inline to stop abuse of the inline keyword on MSVC and to help ensure
6304 that only static inline is used in the codebase (erroneous instance in
6305 runtime/win32.c removed).
6306 (David Allsopp, review by Olivier Andrieu and Xavier Leroy)
6307
6308 - #8934: Stop relying on location to track usage
6309 (Thomas Refis, review by Gabriel Radanne)
6310
6311 - #8970: separate value patterns (matching on values) from computation patterns
6312 (matching on the effects of a copmutation) in the typedtree.
6313 (Gabriel Scherer, review by Jacques Garrigue and Alain Frisch)
6314
6315 - #9060: ensure that Misc.protect_refs preserves backtraces
6316 (Gabriel Scherer, review by Guillaume Munch-Maccagnoni and David Allsopp)
6317
6318 - #9078: make all compilerlibs/ available to ocamltest.
6319 (Gabriel Scherer, review by Sébastien Hinderer)
6320
6321 - #9079: typecore/parmatch: refactor ppat_of_type and refine
6322 the use of backtracking on wildcard patterns
6323 (Florian Angeletti, Jacques Garrigue, Gabriel Scherer,
6324 review by Thomas Refis)
6325
6326 - #9081: typedtree, make the pat_env field of pattern data immutable
6327 (Gabriel Scherer, review by Jacques Garrigue, report by Alain Frisch)
6328
6329 - #9178, #9182, #9196: refactor label-disambiguation (Typecore.NameChoice)
6330 (Gabriel Scherer, Thomas Refis, Florian Angeletti and Jacques Garrigue,
6331 reviewing each other without self-loops)
6332
6333 - #9321, #9322, #9359, #9361, #9417, #9447: refactor the
6334 pattern-matching compiler
6335 (Thomas Refis and Gabriel Scherer, review by Florian Angeletti)
6336
6337 - #9211, #9215, #9222: fix Makefile dependencies in
6338 compilerlibs, dynlink, ocamltest.
6339 (Gabriel Scherer, review by Vincent Laviron and David Allsopp)
6340
6341 - #9275: Short circuit simple inclusion checks
6342 (Leo White, review by Thomas Refis)
6343
6344 - #9305: Avoid polymorphic compare in Ident
6345 (Leo White, review by Xavier Leroy and Gabriel Scherer)
6346
6347 - #7927: refactor val_env met_env par_env to class_env
6348 (Muskan Garg, review by Gabriel Scherer and Florian Angeletti)
6349
6350 - #2324, #9613: Replace the caml_int_compare and caml_float_compare
6351 (C functions) with primitives.
6352 (Greta Yorsh, review by Stephen Dolan and Vincent Laviron)
6353
6354 - #9246: Avoid rechecking functor applications
6355 (Leo White, review by Jacques Garrigue)
6356
6357 - #9402: Remove `sudo:false` from .travis.yml
6358 (Hikaru Yoshimura)
6359
6360 * #9411: forbid optional arguments reordering with -nolabels
6361 (Thomas Refis, review by Frédéric Bour and Jacques Garrigue)
6362
6363 - #9414: testsuite, ocamltest: keep test artifacts only on failure.
6364 Use KEEP_TEST_DIR_ON_SUCCESS=1 to keep all artifacts.
6365 (Gabriel Scherer, review by Sébastien Hinderer)
6366
6367
6368 ### Build system:
6369
6370 - #9250: Add --disable-ocamltest to configure and disable building for
6371 non-development builds.
6372 (David Allsopp, review by Sébastien Hinderer)
6373
6374 ### Bug fixes:
6375
6376 - #7520, #9547: Odd behaviour of refutation cases with polymorphic variants
6377 (Jacques Garrigue, report by Leo White, reviews by Gabriel Scherer and Leo)
6378
6379 - #7562, #9456: ocamlopt-generated code crashed on Alpine Linux on
6380 ppc64le, arm, and i386. Fixed by turning PIE off for musl-based Linux
6381 systems except amd64 (x86_64) and s390x.
6382 (Xavier Leroy, review by Gabriel Scherer)
6383
6384 - #7683, #1499: Fixes one case where the evaluation order in native-code
6385 may not match the one in bytecode.
6386 (Nicolás Ojeda Bär, report by Pierre Chambart, review by Gabriel Scherer)
6387
6388 - #7696, #6608: Record expression deleted when all fields specified
6389 (Jacques Garrigue, report by Jeremy Yallop)
6390
6391 - #7741, #9645: Failure to report escaping type variable
6392 (Jacques Garrigue, report by Gabriel Radanne, review by Gabriel Scherer)
6393
6394 - #7817, #9546: Unsound inclusion check for polymorphic variant
6395 (Jacques Garrigue, report by Mikhail Mandrykin, review by Gabriel Scherer)
6396
6397 - #7897, #9537: Fix warning 38 for rebound extension constructors
6398 (Leo White, review by Florian Angeletti)
6399
6400 - #7917, #9426: Use GCC option -fexcess-precision=standard when available,
6401 avoiding a problem with x87 excess precision in Float.round.
6402 (Xavier Leroy, review by Sébastien Hinderer)
6403
6404 - #9011: Allow linking .cmxa files with no units on MSVC by not requiring the
6405 .lib file to be present.
6406 (David Allsopp, report by Dmitry Bely, review by Xavier Leroy)
6407
6408 - #9064: Relax the level handling when unifying row fields
6409 (Leo White, review by Jacques Garrigue)
6410
6411 - #9097: Do not emit references to dead labels introduced by #2321 (spacetime).
6412 (Greta Yorsh, review by Mark Shinwell)
6413
6414 - #9163: Treat loops properly in un_anf
6415 (Leo White, review by Mark Shinwell, Pierre Chambart and Vincent Laviron)
6416
6417 - #9189, #9281: fix a conflict with Gentoo build system
6418 by removing an one-letter Makefile variable.
6419 (Florian Angeletti, report by Ralph Seichter, review by David Allsopp
6420 and Damien Doligez)
6421
6422 - #9225: Do not drop bytecode debug info after C calls.
6423 (Stephen Dolan, review by Gabriel Scherer and Jacques-Henri Jourdan)
6424
6425 - #9231: Make sure a debug event (and the corresponding debug
6426 information) is inserted after every primitive that can appear in a
6427 collected call stack, and make sure ocamlc preserves such events
6428 even if they are at tail position.
6429 (Jacques-Henri Jourdan, review by Gabriel Scherer)
6430
6431 - #9244: Fix some missing usage warnings
6432 (Leo White, review by Florian Angeletti)
6433
6434 - #9274, avoid reading cmi file while printing types
6435 (Florian Angeletti, review by Gabriel Scherer)
6436
6437 - #9307, #9345: reproducible env summaries for reproducible compilation
6438 (Florian Angeletti, review by Leo White)
6439
6440 - #9309, #9318: Fix exhaustivity checking with empty types
6441 (Florian Angeletti, Stefan Muenzel and Thomas Refis, review by Gabriel Scherer
6442 and Thomas Refis)
6443
6444 - #9335: actually have --disable-stdlib-manpages not build the manpages
6445 (implementation conflicted with #8837 which wasn't picked up in review)
6446 (David Allsopp, review by Florian Angeletti and Sébastien Hinderer)
6447
6448 - #9343: Re-enable `-short-paths` for some error messages
6449 (Leo White, review by Florian Angeletti)
6450
6451 - #9355, #9356: ocamldebug, fix a fatal error when printing values
6452 whose type involves a functor application.
6453 (Florian Angeletti, review by Gabriel Scherer, report by Cyril Six)
6454
6455 - #9367: Make bytecode and native-code backtraces agree.
6456 (Stephen Dolan, review by Gabriel Scherer)
6457
6458 - #9375, #9477: add forgotten substitution when compiling anonymous modules
6459 (Thomas Refis, review by Frédéric Bour, report by Andreas Hauptmann)
6460
6461 - #9384, #9385: Fix copy scope bugs in substitutions
6462 (Leo White, review by Thomas Refis, report by Nick Roberts)
6463
6464 * #9388: Prohibit signature local types with constraints
6465 (Leo White, review by Jacques Garrigue)
6466
6467 - #7141, #9389: returns exit_code for better user response on linking_error
6468 (Anukriti Kumar, review by Gabriel Scherer and Valentin Gatien-Baron)
6469
6470 - #9406, #9409: fix an error with packed module types from missing
6471 cmis.
6472 (Florian Angeletti, report by Thomas Leonard, review by Gabriel Radanne
6473 and Gabriel Scherer)
6474
6475 - #9415: Treat `open struct` as `include struct` in toplevel
6476 (Leo White, review by Thomas Refis)
6477
6478 - #9416: Avoid warning 58 in flambda ocamlnat
6479 (Leo White, review by Florian Angeletti)
6480
6481 - #9420: Fix memory leak when `caml_output_value_to_block` raises an exception
6482 (Xavier Leroy, review by Guillaume Munch-Maccagnoni)
6483
6484 - #9428: Fix truncated exception backtrace for C->OCaml callbacks
6485 on Power and Z System
6486 (Xavier Leroy, review by Nicolás Ojeda Bär)
6487
6488 - #9623, #9642: fix typing environments in Typedecl.transl_with_constraint
6489 (Gabriel Scherer, review by Jacques Garrigue and Leo White,
6490 report by Hugo Heuzard)
6491
6492 - #9695, #9702: no error when opening an alias to a missing module
6493 (Jacques Garrigue, report and review by Gabriel Scherer)
6494
6495 - #9714, #9724: Add a terminator to the `caml_domain_state` structure
6496 to better ensure that members are correctly spaced.
6497 (Antonin Décimo, review by David Allsopp and Xavier Leroy)
6498
6499 OCaml 4.10 maintenance branch
6500 -----------------------------
6501
6502 ### Runtime system:
6503
6504 - #9344, #9368: Disable exception backtraces in bytecode programs
6505 built with "-output-complete-exe". At the moment, such programs do
6506 not embed debug information and exception backtraces where causing
6507 them to crash.
6508 (Jérémie Dimino, review by Nicolás Ojeda Bär)
6509
6510 ### Build system:
6511
6512 - #9531: fix support for the BFD library on FreeBSD
6513 (Hannes Mehnert, review by Gabriel Scherer and David Allsopp)
6514
6515 ### Bug fixes:
6516
6517 - #9068, #9437: ocamlopt -output-complete-obj failure on FreeBSD 12
6518 (Xavier Leroy, report by Hannes Mehnert, review by Sébastien Hinderer)
6519
6520 - #9165, #9840: Add missing -function-sections flag in Makefiles.
6521 (Greta Yorsh, review by David Allsopp)
6522
6523 - #9495: fix a bug where bytecode binaries compiled with `-output-complete-exe`
6524 would not execute `at_exit` hooks at program termination (in particular,
6525 output channels would not be flushed).
6526 (Nicolás Ojeda Bär, review by David Allsopp)
6527
6528 - #9714, #9724: Use the C++ alignas keyword when compiling in C++ in MSVC.
6529 Fixes a bug with MSVC C++ 2015 onwards.
6530 (Antonin Décimo, review by David Allsopp and Xavier Leroy)
6531
6532 - #9736, #9749: Compaction must start in a heap where all free blocks are
6533 blue, which was not the case with the best-fit allocator.
6534 (Damien Doligez, report and review by Leo White)
6535
6536 ### Tools:
6537
6538 - #9552: restore ocamloptp build and installation
6539 (Florian Angeletti, review by David Allsopp and Xavier Leroy)
6540
6541 OCaml 4.10.0 (21 February 2020)
6542 -------------------------------
6543
6544 (Changes that can break existing programs are marked with a "*")
6545
6546 ### Language features
6547
6548 - #7757, #1726: multi-indices for extended indexing operators:
6549 `a.%{0;1;2}` desugars to `( .%{ ;.. } ) a [|0;1;2|]`
6550 (Florian Angeletti, review by Gabriel Radanne)
6551
6552 * #1859, #9117: enforce safe (immutable) strings by removing
6553 the -unsafe-string option by default. This can be overridden by
6554 a configure-time option (available since 4.04 in 2016):
6555 --disable-force-safe-string since 4.08, -no-force-safe-since
6556 between 4.07 and 4.04.
6557 In the force-safe-string mode (now the default), the return type of the
6558 String_val macro in C stubs is `const char*` instead of
6559 `char*`. This change may break C FFI code.
6560 (Kate Deplaix)
6561
6562
6563 - #6662, #8908: allow writing "module _ = E" to ignore module expressions
6564 (Thomas Refis, review by Gabriel Radanne)
6565
6566 ### Runtime system:
6567
6568 - #8809, #9292: Add a best-fit allocator for the major heap; still
6569 experimental, it should be much better than current allocation
6570 policies (first-fit and next-fit) for programs with large heaps,
6571 reducing both GC cost and memory usage.
6572 This new best-fit is not (yet) the default; set it explicitly with
6573 OCAMLRUNPARAM="a=2" (or Gc.set from the program). You may also want
6574 to increase the `space_overhead` parameter of the GC (a percentage,
6575 80 by default), for example OCAMLRUNPARAM="o=85", for optimal
6576 speed.
6577 (Damien Doligez, review by Stephen Dolan, Jacques-Henri Jourdan,
6578 Xavier Leroy, Leo White)
6579
6580 * #8713, #8940, #9115, #9143, #9202, #9251:
6581 Introduce a state table in the runtime to contain the global variables.
6582 (The Multicore runtime will have one such state for each domain.)
6583
6584 This changes the status of some internal variables of the OCaml runtime;
6585 in many cases the header file originally defining the internal variable
6586 provides a compatibility macro with the old name, but programs
6587 re-defining those variables by hand need to be fixed.
6588
6589 (KC Sivaramakrishnan and Stephen Dolan,
6590 compatibility hacking by David Allsopp, Florian Angeletti, Kate Deplaix,
6591 Jacques Garrigue, Guillaume Munch-Maccagnoni and Nicolás Ojeda Bär,
6592 review by David Allsopp, Alain Frisch, Nicolás Ojeda Bär,
6593 Gabriel Scherer, Damien Doligez, and Guillaume Munch-Maccagnoni)
6594
6595 - #8993: New C functions caml_process_pending_actions{,_exn} in
6596 caml/signals.h, intended for executing all pending actions inside
6597 long-running C functions (requested minor and major collections,
6598 signal handlers, finalisers, and memprof callbacks). The function
6599 caml_process_pending_actions_exn returns any exception arising
6600 during their execution, allowing resources to be cleaned-up before
6601 re-raising.
6602 (Guillaume Munch-Maccagnoni, review by Jacques-Henri Jourdan,
6603 Stephen Dolan, and Gabriel Scherer)
6604
6605 * #8691, #8897, #9027: Allocation functions are now guaranteed not to
6606 trigger any OCaml callback when called from C. In long-running C
6607 functions, this can be replaced with calls to
6608 caml_process_pending_actions at safe points.
6609 Side effect of this change: in bytecode mode, polling for
6610 asynchronous callbacks is performed at every minor heap allocation,
6611 in addition to function calls and loops as in previous OCaml
6612 releases.
6613 (Jacques-Henri Jourdan, review by Stephen Dolan, Gabriel Scherer and
6614 Guillaume Munch-Maccagnoni)
6615
6616 * #9037: caml_check_urgent_gc is now guaranteed not to trigger any
6617 finaliser. In long-running C functions, this can be replaced
6618 with calls to caml_process_pending_actions at safe points.
6619 (Guillaume Munch-Maccagnoni, review by Jacques-Henri Jourdan and
6620 Stephen Dolan)
6621
6622
6623 - #8619: Ensure Gc.minor_words remains accurate after a GC.
6624 (Stephen Dolan, Xavier Leroy and David Allsopp,
6625 review by Xavier Leroy and Gabriel Scherer)
6626
6627 - #8667: Limit GC credit to 1.0
6628 (Leo White, review by Damien Doligez)
6629
6630 - #8670: Fix stack overflow detection with systhreads
6631 (Stephen Dolan, review by Xavier Leroy, Anil Madhavapeddy, Gabriel Scherer,
6632 Frédéric Bour and Guillaume Munch-Maccagnoni)
6633
6634 * #8711: The major GC hooks are no longer allowed to interact with the
6635 OCaml heap.
6636 (Jacques-Henri Jourdan, review by Damien Doligez)
6637
6638 - #8630: Use abort() instead of exit(2) in caml_fatal_error, and add
6639 the new hook caml_fatal_error_hook.
6640 (Jacques-Henri Jourdan, review by Xavier Leroy)
6641
6642 - #8641: Better call stacks when a C call is involved in byte code mode
6643 (Jacques-Henri Jourdan, review by Xavier Leroy)
6644
6645 - #8634, #8668, #8684, #9103 (originally #847): Statistical memory profiling.
6646 In OCaml 4.10, support for allocations in the minor heap in native
6647 mode is not available, and callbacks for promotions and
6648 deallocations are not available.
6649 Hence, there is not any public API for this feature yet.
6650 (Jacques-Henri Jourdan, review by Stephen Dolan, Gabriel Scherer
6651 and Damien Doligez)
6652
6653 - #9268, #9271: Fix bytecode backtrace generation with large integers present.
6654 (Stephen Dolan and Mark Shinwell, review by Gabriel Scherer and
6655 Jacques-Henri Jourdan)
6656
6657 ### Standard library:
6658
6659 - #8760: List.concat_map : ('a -> 'b list) -> 'a list -> 'b list
6660 (Gabriel Scherer, review by Daniel Bünzli and Thomas Refis)
6661
6662 - #8832: List.find_map : ('a -> 'b option) -> 'a list -> 'b option
6663 (Gabriel Scherer, review by Jeremy Yallop, Nicolás Ojeda Bär
6664 and Daniel Bünzli)
6665
6666 - #7672, #1492: Add `Filename.quote_command` to produce properly-quoted
6667 commands for execution by Sys.command.
6668 (Xavier Leroy, review by David Allsopp and Damien Doligez)
6669
6670 - #8971: Add `Filename.null`, the conventional name of the "null" device.
6671 (Nicolás Ojeda Bär, review by Xavier Leroy and Alain Frisch)
6672
6673 - #8651: add '%#F' modifier in printf to output OCaml float constants
6674 in hexadecimal
6675 (Pierre Roux, review by Gabriel Scherer and Xavier Leroy)
6676
6677
6678 - #8657: Optimization in [Array.make] when initializing with unboxed
6679 or young values.
6680 (Jacques-Henri Jourdan, review by Gabriel Scherer and Stephen Dolan)
6681
6682 - #8716: Optimize [Array.fill] and [Hashtbl.clear] with a new runtime primitive
6683 (Alain Frisch, review by David Allsopp, Stephen Dolan and Damien Doligez)
6684
6685 - #8530: List.sort: avoid duplicate work by chop
6686 (Guillaume Munch-Maccagnoni, review by David Allsopp, Damien Doligez and
6687 Gabriel Scherer)
6688
6689 ### Other libraries:
6690
6691 - #1939, #2023: Implement Unix.truncate and Unix.ftruncate on Windows.
6692 (Florent Monnier and Nicolás Ojeda Bär, review by David Allsopp)
6693
6694 ### Code generation and optimizations:
6695
6696 - #8806: Add an [@@immediate64] attribute for types that are known to
6697 be immediate only on 64 bit platforms
6698 (Jérémie Dimino, review by Vladimir Keleshev)
6699
6700 - #9028, #9032: Fix miscompilation by no longer assuming that
6701 untag_int (tag_int x) = x in Cmmgen; the compilation of `(n lsl 1) + 1`,
6702 for example, would be incorrect if evaluated with a large value for `n`.
6703 (Stephen Dolan, review by Vincent Laviron and Xavier Leroy)
6704
6705 - #8672: Optimise Switch code generation on booleans.
6706 (Stephen Dolan, review by Pierre Chambart)
6707
6708
6709 - #8990: amd64: Emit 32bit registers for Iconst_int when we can
6710 (Xavier Clerc, Tom Kelly and Mark Shinwell, review by Xavier Leroy)
6711
6712 - #2322: Add pseudo-instruction `Ladjust_trap_depth` to replace
6713 dummy Lpushtrap generated in linearize
6714 (Greta Yorsh and Vincent Laviron, review by Xavier Leroy)
6715
6716 - #8707: Simplif: more regular treatment of Tupled and Curried functions
6717 (Gabriel Scherer, review by Leo White and Alain Frisch)
6718
6719 - #8526: Add compile-time option -function-sections in ocamlopt to emit
6720 each function in a separate named text section on supported targets.
6721 (Greta Yorsh, review by Pierre Chambart)
6722
6723 - #2321: Eliminate dead ICatch handlers
6724 (Greta Yorsh, review by Pierre Chambart and Vincent Laviron)
6725
6726 - #8919: lift mutable lets along with immutable ones
6727 (Leo White, review by Pierre Chambart)
6728
6729 - #8909: Graph coloring register allocator: the weights put on
6730 preference edges should not be divided by 2 in branches of
6731 conditional constructs, because it is not good for performance
6732 and because it leads to ignoring preference edges with 0 weight.
6733 (Eric Stavarache, review by Xavier Leroy)
6734
6735 - #9006: int32 code generation improvements
6736 (Stephen Dolan, designed with Greta Yorsh, review by Xavier Clerc,
6737 Xavier Leroy and Alain Frisch)
6738
6739 - #9041: amd64: Avoid stall in sqrtsd by clearing destination.
6740 (Stephen Dolan, with thanks to Andrew Hunter, Will Hasenplaugh,
6741 Spiros Eliopoulos and Brian Nigito. Review by Xavier Leroy)
6742
6743 - #2165: better unboxing heuristics for let-bound identifiers
6744 (Alain Frisch, review by Vincent Laviron and Gabriel Scherer)
6745
6746 - #8735: unbox across static handlers
6747 (Alain Frisch, review by Vincent Laviron and Gabriel Scherer)
6748
6749 ### Manual and documentation:
6750
6751 - #8718, #9089: syntactic highlighting for code examples in the manual
6752 (Florian Angeletti, report by Anton Kochkov, review by Gabriel Scherer)
6753
6754 - #9101: add links to section anchor before the section title,
6755 make the name of those anchor explicit.
6756 (Florian Angeletti, review by Daniel Bünzli, Sébastien Hinderer,
6757 and Gabriel Scherer)
6758
6759 - #9257, cautionary guidelines for using the internal runtime API
6760 without too much updating pain.
6761 (Florian Angeletti, review by Daniel Bünzli, Guillaume Munch-Maccagnoni
6762 and KC Sivaramakrishnan)
6763
6764
6765 - #8950: move local opens in pattern out of the extension chapter
6766 (Florian Angeletti, review and suggestion by Gabriel Scherer)
6767
6768 - #9088, #9097: fix operator character classes
6769 (Florian Angeletti, review by Gabriel Scherer,
6770 report by Clément Busschaert)
6771
6772 - #9169: better documentation for the best-fit allocation policy
6773 (Gabriel Scherer, review by Guillaume Munch-Maccagnoni
6774 and Florian Angeletti)
6775
6776 ### Compiler user-interface and warnings:
6777
6778 - #8833: Hint for (type) redefinitions in toplevel session
6779 (Florian Angeletti, review by Gabriel Scherer)
6780
6781 - #2127, #9185: Refactor lookup functions
6782 Included observable changes:
6783 - makes the location of usage warnings and alerts for constructors more
6784 precise
6785 - don't warn about a constructor never being used to build values when it
6786 has been defined as private
6787 (Leo White, Hugo Heuzard review by Thomas Refis, Florian Angeletti)
6788
6789 - #8702, #8777: improved error messages for fixed row polymorphic variants
6790 (Florian Angeletti, report by Leo White, review by Thomas Refis)
6791
6792 - #8844: Printing faulty constructors, inline records fields and their types
6793 during type mismatches. Also slightly changed other type mismatches error
6794 output.
6795 (Mekhrubon Turaev, review by Florian Angeletti, Leo White)
6796
6797 - #8885: Warn about unused local modules
6798 (Thomas Refis, review by Alain Frisch)
6799
6800 - #8872: Add ocamlc option "-output-complete-exe" to build a self-contained
6801 binary for bytecode programs, containing the runtime and C stubs.
6802 (Stéphane Glondu, Nicolás Ojeda Bär, review by Jérémie Dimino and Daniel
6803 Bünzli)
6804
6805 - #8874: add tests for typechecking error messages and pack them into
6806 pretty-printing boxes.
6807 (Oxana Kostikova, review by Gabriel Scherer)
6808
6809 - #8891: Warn about unused functor parameters
6810 (Thomas Refis, review by Gabriel Radanne)
6811
6812 - #8903: Improve errors for first-class modules
6813 (Leo White, review by Jacques Garrigue)
6814
6815 - #8914: clarify the warning on unboxable types used in external primitives (61)
6816 (Gabriel Scherer, review by Florian Angeletti, report on the Discourse forum)
6817
6818 - #9046: disable warning 30 by default
6819 This outdated warning complained on label/constructor name conflicts
6820 within a mutually-recursive type declarations; there is now no need
6821 to complain thanks to type-based disambiguation.
6822 (Gabriel Scherer)
6823
6824 ### Tools:
6825
6826 * #6792, #8654 ocamldebug now supports programs using Dynlink. This
6827 changes ocamldebug messages, which may break compatibility
6828 with older emacs modes.
6829 (whitequark and Jacques-Henri Jourdan, review by Gabriel Scherer
6830 and Xavier Clerc)
6831
6832 - #8621: Make ocamlyacc a Windows Unicode application
6833 (David Allsopp, review by Nicolás Ojeda Bär)
6834
6835 * #8834, `ocaml`: adhere to the XDG base directory specification to
6836 locate an `.ocamlinit` file. Reads an `$XDG_CONFIG_HOME/ocaml/init.ml`
6837 file before trying to lookup `~/.ocamlinit`. On Windows the behaviour
6838 is unchanged.
6839 (Daniel Bünzli, review by David Allsopp, Armaël Guéneau and
6840 Nicolás Ojeda Bär)
6841
6842 - #9113: ocamldoc: fix the rendering of multi-line code blocks
6843 in the 'man' backend.
6844 (Gabriel Scherer, review by Florian Angeletti)
6845
6846 - #9127, #9130: ocamldoc: fix the formatting of closing brace in record types.
6847 (David Allsopp, report by San Vũ Ngọc)
6848
6849 - #9181: make objinfo work on Cygwin and look for the caml_plugin_header
6850 symbol in both the static and the dynamic symbol tables.
6851 (Sébastien Hinderer, review by Gabriel Scherer and David Allsopp)
6852
6853 ### Build system:
6854
6855 - #8840: use ocaml{c,opt}.opt when available to build internal tools
6856 On my machine this reduces parallel-build times from 3m30s to 2m50s.
6857 (Gabriel Scherer, review by Xavier Leroy and Sébastien Hinderer)
6858
6859 - #8650: ensure that "make" variables are defined before use;
6860 revise generation of config/util.ml to better quote special characters
6861 (Xavier Leroy, review by David Allsopp)
6862
6863 - #8690, #8696: avoid rebuilding the world when files containing primitives
6864 change.
6865 (Stephen Dolan, review by Gabriel Scherer, Sébastien Hinderer and
6866 Thomas Refis)
6867
6868 - #8835: new configure option --disable-stdlib-manpages to disable building
6869 and installation of the library manpages.
6870 (David Allsopp, review by Florian Angeletti and Gabriel Scherer)
6871
6872 - #8837: build manpages using ocamldoc.opt when available
6873 cuts the manpages build time from 14s to 4s
6874 (Gabriel Scherer, review by David Allsopp and Sébastien Hinderer,
6875 report by David Allsopp)
6876
6877 - #8843, #8841: fix use of off_t on 32-bit systems.
6878 (Stephen Dolan, report by Richard Jones, review by Xavier Leroy)
6879
6880 - #8947, #9134, #9302, #9311: fix/improve support for the BFD library
6881 (Sébastien Hinderer, review by Damien Doligez and David Allsopp)
6882
6883 - #8951: let make's default target build the compiler
6884 (Sébastien Hinderer, review by David Allsopp)
6885
6886 - #8995: allow developers to specify frequently-used configure options in
6887 Git (ocaml.configure option) and a directory for host-specific, shareable
6888 config.cache files (ocaml.configure-cache option). See HACKING.adoc for
6889 further details.
6890 (David Allsopp, review by Gabriel Scherer)
6891
6892 - #9136: Don't propagate Cygwin-style prefix from configure to
6893 Makefile.config on Windows ports.
6894 (David Allsopp, review by Sébastien Hinderer)
6895
6896 ### Internal/compiler-libs changes:
6897
6898 - #8828: Added abstractions for variants, records, constructors, fields and
6899 extension constructor types mismatch.
6900 (Mekhrubon Turaev, review by Florian Angeletti, Leo White and Gabriel Scherer)
6901
6902 - #7927, #8527: Replace long tuples into records in typeclass.ml
6903 (Ulugbek Abdullaev, review by David Allsopp and Gabriel Scherer)
6904
6905 - #1963: split cmmgen into generic Cmm helpers and clambda transformations
6906 (Vincent Laviron, review by Mark Shinwell)
6907
6908 - #1901: Fix lexing of character literals in comments
6909 (Pieter Goetschalckx, review by Damien Doligez)
6910
6911 - #1932: Allow octal escape sequences and identifiers containing apostrophes
6912 in ocamlyacc actions and comments.
6913 (Pieter Goetschalckx, review by Damien Doligez)
6914
6915 - #2288: Move middle end code from [Asmgen] to [Clambda_middle_end] and
6916 [Flambda_middle_end]. Run [Un_anf] from the middle end, not [Cmmgen].
6917 (Mark Shinwell, review by Pierre Chambart)
6918
6919 - #8692: Remove Misc.may_map and similar
6920 (Leo White, review by Gabriel Scherer and Thomas Refis)
6921
6922 - #8677: Use unsigned comparisons in amd64 and i386 emitter of Lcondbranch3.
6923 (Greta Yorsh, review by Xavier Leroy)
6924
6925 - #8766: Parmatch: introduce a type for simplified pattern heads
6926 (Gabriel Scherer and Thomas Refis, review by Stephen Dolan and
6927 Florian Angeletti)
6928
6929 - #8774: New implementation of Env.make_copy_of_types
6930 (Alain Frisch, review by Thomas Refis, Leo White and Jacques Garrigue)
6931
6932 - #7924: Use a variant instead of an int in Bad_variance exception
6933 (Rian Douglas, review by Gabriel Scherer)
6934
6935 - #8890: in -dtimings output, show time spent in C linker clearly
6936 (Valentin Gatien-Baron)
6937
6938 - #8910, #8911: minor improvements to the printing of module types
6939 (Gabriel Scherer, review by Florian Angeletti)
6940
6941 - #8913: ocamltest: improve 'promote' implementation to take
6942 skipped lines/bytes into account
6943 (Gabriel Scherer, review by Sébastien Hinderer)
6944
6945 - #8908: Use an option instead of a string for module names ("_" becomes None),
6946 and a dedicated type for functor parameters: "()" maps to "Unit" (instead of
6947 "*").
6948 (Thomas Refis, review by Gabriel Radanne)
6949
6950 - #8928: Move contains_calls and num_stack_slots from Proc to Mach.fundecl
6951 (Greta Yorsh, review by Florian Angeletti and Vincent Laviron)
6952
6953 - #8959, #8960, #8968, #9023: minor refactorings in the typing of patterns:
6954 + refactor the {let,pat}_bound_idents* functions
6955 + minor bugfix in type_pat
6956 + refactor the generic pattern-traversal functions
6957 in Typecore and Typedtree
6958 + restrict the use of Need_backtrack
6959 (Gabriel Scherer and Florian Angeletti,
6960 review by Thomas Refis and Gabriel Scherer)
6961
6962 - #9030: clarify and document the parameter space of type_pat
6963 (Gabriel Scherer and Florian Angeletti and Jacques Garrigue,
6964 review by Florian Angeletti and Thomas Refis)
6965
6966 - #8975: "ocamltests" files are no longer required or used by
6967 "ocamltest". Instead, any text file in the testsuite directory containing a
6968 valid "TEST" block will be automatically included in the testsuite.
6969 (Nicolás Ojeda Bär, review by Gabriel Scherer and Sébastien Hinderer)
6970
6971 - #8992: share argument implementations between executables
6972 (Florian Angeletti, review by Gabriel Scherer)
6973
6974 - #9015: fix fatal error in pprint_ast (#8789)
6975 (Damien Doligez, review by Thomas Refis)
6976
6977 ### Bug fixes:
6978
6979 - #5673, #7636: unused type variable causes generalization error
6980 (Jacques Garrigue and Leo White, review by Leo White,
6981 reports by Jean-Louis Giavitto and Christophe Raffalli)
6982
6983 - #6922, #8955: Fix regression with -principal type inference for inherited
6984 methods, allowing to compile ocamldoc with -principal
6985 (Jacques Garrigue, review by Leo White)
6986
6987 - #7925, #8611: fix error highlighting for exceptionally
6988 long toplevel phrases
6989 (Kyle Miller, reported by Armaël Guéneau, review by Armaël Guéneau
6990 and Nicolás Ojeda Bär)
6991
6992 - #8622: Don't generate #! headers over 127 characters.
6993 (David Allsopp, review by Xavier Leroy and Stephen Dolan)
6994
6995 - #8715: minor bugfixes in CamlinternalFormat; removes the unused
6996 and misleading function CamlinternalFormat.string_of_formatting_gen
6997 (Gabriel Scherer and Florian Angeletti,
6998 review by Florian Angeletti and Gabriel Radanne)
6999
7000 - #8792, #9018: Possible (latent) bug in Ctype.normalize_type
7001 removed incrimined Btype.log_type, replaced by Btype.set_type
7002 (Jacques Garrigue, report by Alain Frisch, review by Thomas Refis)
7003
7004 - #8856, #8860: avoid stackoverflow when printing cyclic type expressions
7005 in some error submessages.
7006 (Florian Angeletti, report by Mekhrubon Turaev, review by Leo White)
7007
7008 - #8875: fix missing newlines in the output from MSVC invocation.
7009 (Nicolás Ojeda Bär, review by Gabriel Scherer)
7010
7011 - #8921, #8924: Fix stack overflow with Flambda
7012 (Vincent Laviron, review by Pierre Chambart and Leo White,
7013 report by Aleksandr Kuzmenko)
7014
7015 - #8892, #8895: fix the definition of Is_young when CAML_INTERNALS is not
7016 defined.
7017 (David Allsopp, review by Xavier Leroy)
7018
7019 - #8896: deprecate addr typedef in misc.h
7020 (David Allsopp, suggestion by Xavier Leroy)
7021
7022 - #8981: Fix check for incompatible -c and -o options.
7023 (Greta Yorsh, review by Damien Doligez)
7024
7025 - #9019, #9154: Unsound exhaustivity of GADTs from incomplete unification
7026 Also fixes bug found by Thomas Refis in #9012
7027 (Jacques Garrigue, report and review by Leo White, Thomas Refis)
7028
7029 - #9031: Unregister Windows stack overflow handler while shutting
7030 the runtime down.
7031 (Dmitry Bely, review by David Allsopp)
7032
7033 - #9051: fix unregistered local root in win32unix/select.c (could result in
7034 `select` returning file_descr-like values which weren't in the original sets)
7035 and correct initialisation of some blocks allocated with caml_alloc_small.
7036 (David Allsopp, review by Xavier Leroy)
7037
7038 - #9073, #9120: fix incorrect GC ratio multiplier when allocating custom blocks
7039 with caml_alloc_custom_mem in runtime/custom.c
7040 (Markus Mottl, review by Gabriel Scherer and Damien Doligez)
7041
7042 - #9209, #9212: fix a development-version regression caused by #2288
7043 (Kate Deplaix and David Allsopp, review by Sébastien Hinderer
7044 and Gabriel Scherer )
7045
7046 - #9218, #9269: avoid a rare wrong module name error with "-annot" and
7047 inline records.
7048 (Florian Angeletti, review by Gabriel Scherer, report by Kate Deplaix)
7049
7050 - #9261: Fix a soundness bug in Rec_check, new in 4.10 (from #8908)
7051 (Vincent Laviron, review by Jeremy Yallop and Gabriel Scherer)
7052
7053 OCaml 4.09 maintenance branch
7054 -----------------------------
7055
7056 ### Build system:
7057
7058 - #9383: Don't assume that AWKPATH includes .
7059 (David Allsopp, report by Ian Zimmerman)
7060
7061 OCaml 4.09.1 (16 Mars 2020)
7062 ---------------------------
7063
7064 - #8855, #8858: Links for tools not created when installing with
7065 --disable-installing-byecode-programs (e.g. ocamldep.opt installed, but
7066 ocamldep link not created)
7067 (David Allsopp, report by Thomas Leonard)
7068
7069 - #8953, #8954: Fix error submessages in the toplevel: do not display
7070 dummy locations
7071 (Armaël Guéneau, review by Gabriel Scherer)
7072
7073 - #8965, #8979: Alpine build failure caused by check-parser-uptodate-or-warn.sh
7074 (Gabriel Scherer and David Allsopp, report by Anton Kochkov)
7075
7076 - #8985, #8986: fix generation of the primitives when the locale collation is
7077 incompatible with C.
7078 (David Allsopp, review by Nicolás Ojeda Bär, report by Sebastian Rasmussen)
7079
7080 - #9050, #9076: install missing compilerlibs/ocamlmiddleend archives
7081 (Gabriel Scherer, review by Florian Angeletti, report by Olaf Hering)
7082
7083 - #9180: pass -fno-common option to C compiler when available,
7084 so as to detect problematic multiple definitions of global variables
7085 in the C runtime
7086 (Xavier Leroy, review by Mark Shinwell)
7087
7088 - #9144, #9180: multiple definitions of global variables in the C runtime,
7089 causing problems with GCC 10.0 and possibly with other C compilers
7090 (Xavier Leroy, report by Jürgen Reuter, review by Mark Shinwell)
7091
7092 - #9128: Fix a bug in bytecode mode which could lead to a segmentation
7093 fault. The bug was caused by the fact that the atom table shared a
7094 page with some bytecode. The fix makes sure both the atom table and
7095 the minor heap have their own pages.
7096 (Jacques-Henri Jourdan, review by Stephen Dolan, Xavier Leroy and
7097 Gabriel Scherer)
7098
7099 OCaml 4.09.0 (19 September 2019)
7100 --------------------------------
7101
7102 ### Runtime system:
7103
7104 * #1725, #2279: Deprecate Obj.set_tag and Obj.truncate
7105 (Stephen Dolan, review by Gabriel Scherer, Damien Doligez and Xavier Leroy)
7106
7107 * #2240: Constify "identifier" in struct custom_operations
7108 (Cedric Cellier, review by Xavier Leroy)
7109
7110 * #2293: Constify "caml_named_value"
7111 (Stephen Dolan, review by Xavier Leroy)
7112
7113 - #8787, #8788: avoid integer overflow in caml_output_value_to_bytes
7114 (Jeremy Yallop, report by Marcello Seri)
7115
7116
7117 - #2075, #7729: rename _T macro used to support Unicode in the (Windows) runtime
7118 in order to avoid compiler warning
7119 (Nicolás Ojeda Bär, review by Gabriel Scherer and David Allsopp)
7120
7121 - #2250: Remove extra integer sign-extension in compare functions
7122 (Stefan Muenzel, review by Xavier Leroy)
7123
7124 - #8607: Remove obsolete macros for pre-2002 MSVC support
7125 (Stephen Dolan, review by Nicolás Ojeda Bär and David Allsopp)
7126
7127 - #8656: Fix a bug in [caml_modify_generational_global_root]
7128 (Jacques-Henri Jourdan, review by Gabriel Scherer)
7129
7130 ### Standard library:
7131
7132 - #2262: take precision (.<n>) and flags ('+' and ' ') into account
7133 in printf %F
7134 (Pierre Roux, review by Gabriel Scherer)
7135
7136 - #6148, #8596: optimize some buffer operations
7137 (Damien Doligez, reports by John Whitington and Alain Frisch,
7138 review by Jeremy Yallop and Gabriel Scherer)
7139
7140 ### Other libraries:
7141
7142 * #2318: Delete the graphics library. This library is now available
7143 as a separate "graphics" package in opam. Its new home is:
7144 https://github.com/ocaml/graphics
7145 (Jérémie Dimino, review by Nicolás Ojeda Bär, Xavier Leroy and
7146 Sébastien Hinderer)
7147
7148 * #2289: Delete the vmthreads library. This library was deprecated in 4.08.0.
7149 (Jérémie Dimino)
7150
7151 - #2112: Fix Thread.yield unfairness with busy threads yielding to each
7152 other.
7153 (Andrew Hunter, review by Jacques-Henri Jourdan, Spiros Eliopoulos, Stephen
7154 Weeks, Mark Shinwell)
7155
7156 - #7903, #2306: Make Thread.delay interruptible by signals again
7157 (Xavier Leroy, review by Jacques-Henri Jourdan and Edwin Török)
7158
7159 - #2248: Unix alloc_sockaddr: Fix read of uninitialized memory for an
7160 unbound Unix socket. Add support for receiving abstract (Linux) socket paths.
7161 (Tim Cuthbertson, review by Sébastien Hinderer and Jérémie Dimino)
7162
7163 ### Compiler user-interface and warnings:
7164
7165 * #2276: Remove support for compiler plugins and hooks (also adds
7166 [Dynlink.unsafe_get_global_value])
7167 (Mark Shinwell, Xavier Clerc, review by Nicolás Ojeda Bär,
7168 Florian Angeletti, David Allsopp and Xavier Leroy)
7169
7170 - #2301: Hint on type error on int literal
7171 (Jules Aguillon, review by Nicolás Ojeda Bär , Florian Angeletti,
7172 Gabriel Scherer and Armaël Guéneau)
7173
7174 * #2314: Remove support for gprof profiling.
7175 (Mark Shinwell, review by Xavier Clerc and Stephen Dolan)
7176
7177 - #2190: fix pretty printing (using Pprintast) of "lazy ..." patterns and
7178 "fun (type t) -> ..." expressions.
7179 (Nicolás Ojeda Bär, review by Gabriel Scherer)
7180
7181 - #2277: Use newtype names as type variable names
7182 The inferred type of (fun (type t) (x : t) -> x)
7183 is now printed as ('t -> 't) rather than ('a -> 'a).
7184 (Matthew Ryan)
7185
7186
7187 - #2309: New options -with-runtime and -without-runtime in ocamlopt/ocamlc
7188 that control the inclusion of the runtime system in the generated program.
7189 (Lucas Pluvinage, review by Daniel Bünzli, Damien Doligez, David Allsopp
7190 and Florian Angeletti)
7191
7192 - #3819, #8546 more explanations and tests for illegal permutation
7193 (Florian Angeletti, review by Gabriel Scherer)
7194
7195 - #8537: fix the -runtime-variant option for bytecode
7196 (Damien Doligez, review by David Allsopp)
7197
7198 - #8541: Correctly print multi-lines locations
7199 (Louis Roché, review by Gabriel Scherer)
7200
7201 - #8579: Better error message for private constructors
7202 of an extensible variant type
7203 (Guillaume Bury, review by many fine eyes)
7204
7205 ### Code generation and optimizations:
7206
7207 - #2278: Remove native code generation support for 32-bit Intel macOS,
7208 iOS and other Darwin targets.
7209 (Mark Shinwell, review by Nicolás Ojeda Bär and Xavier Leroy)
7210
7211 - #8547: Optimize matches that are an affine function of the input.
7212 (Stefan Muenzel, review by Alain Frisch, Gabriel Scherer)
7213
7214
7215 - #1904, #7931: Add FreeBSD/aarch64 support
7216 (Greg V, review by Sébastien Hinderer, Stephen Dolan, Damien Doligez
7217 and Xavier Leroy)
7218
7219 - #8507: Shorten symbol names of anonymous functions in Flambda mode
7220 (the directory portions are now hidden)
7221 (Mark Shinwell, review by Nicolás Ojeda Bär)
7222
7223 - #8681, #8699, #8712: Fix code generation with nested let rec of functions.
7224 (Stephen Dolan, Leo White, Gabriel Scherer and Pierre Chambart,
7225 review by Gabriel Scherer, reports by Alexey Solovyev and Jonathan French)
7226
7227 ### Manual and documentation:
7228
7229 - #7584, #8538: Document .cmt* files in the "overview" of ocaml{c,opt}
7230 (Oxana Kostikova, rewiew by Florian Angeletti)
7231
7232
7233 - #8757: Rename Pervasives to Stdlib in core library documentation.
7234 (Ian Zimmerman, review by David Allsopp)
7235
7236 - #8515: manual, precise constraints on reexported types
7237 (Florian Angeletti, review by Gabriel Scherer)
7238
7239 ### Tools:
7240
7241 - #2221: ocamldep will now correctly allow a .ml file in an include directory
7242 that appears first in the search order to shadow a .mli appearing in a later
7243 include directory.
7244 (Nicolás Ojeda Bär, review by Florian Angeletti)
7245
7246 ### Internal/compiler-libs changes:
7247
7248 - #1579: Add a separate types for clambda primitives
7249 (Pierre Chambart, review by Vincent Laviron and Mark Shinwell)
7250
7251 - #1965: remove loop constructors in Cmm and Mach
7252 (Vincent Laviron)
7253
7254 - #1973: fix compilation of catches with multiple handlers
7255 (Vincent Laviron)
7256
7257 - #2228, #8545: refactoring the handling of .cmi files
7258 by moving the logic from Env to a new module Persistent_env
7259 (Gabriel Scherer, review by Jérémie Dimino and Thomas Refis)
7260
7261 - #2229: Env: remove prefix_idents cache
7262 (Thomas Refis, review by Frédéric Bour and Gabriel Scherer)
7263
7264 - #2237, #8582: Reorder linearisation of Trywith to avoid a call instruction
7265 (Vincent Laviron and Greta Yorsh, additional review by Mark Shinwell;
7266 fix in #8582 by Mark Shinwell, Xavier Leroy and Anil Madhavapeddy)
7267
7268 - #2265: Add bytecomp/opcodes.mli
7269 (Mark Shinwell, review by Nicolás Ojeda Bär)
7270
7271 - #2268: Improve packing mechanism used for building compilerlibs modules
7272 into the Dynlink libraries
7273 (Mark Shinwell, Stephen Dolan, review by David Allsopp)
7274
7275 - #2280: Don't make more Clambda constants after starting Cmmgen
7276 (Mark Shinwell, review by Vincent Laviron)
7277
7278 - #2281: Move some middle-end files around
7279 (Mark Shinwell, review by Pierre Chambart and Vincent Laviron)
7280
7281 - #2283: Add [is_prefix] and [find_and_chop_longest_common_prefix] to
7282 [Misc.Stdlib.List]
7283 (Mark Shinwell, review by Alain Frisch and Stephen Dolan)
7284
7285 - #2284: Add various utility functions to [Misc] and remove functions
7286 from [Misc.Stdlib.Option] that are now in [Stdlib.Option]
7287 (Mark Shinwell, review by Thomas Refis)
7288
7289 - #2286: Functorise [Consistbl]
7290 (Mark Shinwell, review by Gabriel Radanne)
7291
7292 - #2291: Add [Compute_ranges] pass
7293 (Mark Shinwell, review by Vincent Laviron)
7294
7295 - #2292: Add [Proc.frame_required] and [Proc.prologue_required].
7296 Move tail recursion label creation to [Linearize]. Correctly position
7297 [Lprologue] relative to [Iname_for_debugger] operations.
7298 (Mark Shinwell, review by Vincent Laviron)
7299
7300 - #2308: More debugging information on [Cmm] terms
7301 (Mark Shinwell, review by Stephen Dolan)
7302
7303 - #7878, #8542: Replaced TypedtreeIter with tast_iterator
7304 (Isaac "Izzy" Avram, review by Gabriel Scherer and Nicolás Ojeda Bär)
7305
7306 - #8598: Replace "not is_nonexpansive" by "maybe_expansive".
7307 (Thomas Refis, review by David Allsopp, Florian Angeletti, Gabriel Radanne,
7308 Gabriel Scherer and Xavier Leroy)
7309
7310 ### Compiler distribution build system:
7311
7312 - #2267: merge generation of header programs, also fixing parallel build on
7313 Cygwin.
7314 (David Allsopp, review by Sébastien Hinderer)
7315
7316 - #8514: Use boot/ocamlc.opt for building, if available.
7317 (Stephen Dolan, review by Gabriel Scherer)
7318
7319 ### Bug fixes:
7320
7321 - #8864, #8865: Fix native compilation of left shift by (word_size - 1)
7322 (Vincent Laviron, report by Murilo Giacometti Rocha, review by Xavier Leroy)
7323
7324 - #2296: Fix parsing of hexadecimal floats with underscores in the exponent.
7325 (Hugo Heuzard and Xavier Leroy, review by Gabriel Scherer)
7326
7327 - #8800: Fix soundness bug in extension constructor inclusion
7328 (Leo White, review by Jacques Garrigue)
7329
7330 - #8848: Fix x86 stack probe CFI information in caml_c_call and
7331 caml_call_gc
7332 (Tom Kelly, review by Xavier Leroy)
7333
7334
7335 - #7156, #8594: make top level use custom printers if they are available
7336 (Andrew Litteken, report by Martin Jambon, review by Nicolás Ojeda Bär,
7337 Thomas Refis, Armaël Guéneau, Gabriel Scherer, David Allsopp)
7338
7339 - #3249: ocamlmklib should reject .cmxa files
7340 (Xavier Leroy)
7341
7342 - #7937, #2287: fix uncaught Unify exception when looking for type
7343 declaration
7344 (Florian Angeletti, review by Jacques Garrigue)
7345
7346 - #8610, #8613: toplevel printing, consistent deduplicated name for types
7347 (Florian Angeletti, review by Thomas Refis and Gabriel Scherer,
7348 reported by Xavier Clerc)
7349
7350 - #8635, #8636: Fix a bad side-effect of the -allow-approx option of
7351 ocamldep. It used to turn some errors into successes
7352 (Jérémie Dimino)
7353
7354 - #8701, #8725: Variance of constrained parameters causes principality issues
7355 (Jacques Garrigue, report by Leo White, review by Gabriel Scherer)
7356
7357 - #8777(partial): fix position information in some polymorphic variant
7358 error messages about missing tags
7359 (Florian Angeletti, review by Thomas Refis)
7360
7361 - #8779, more cautious variance computation to avoid missing cmis
7362 (Florian Angeletti, report by Antonio Nuno Monteiro, review by Leo White)
7363
7364 - #8810: Env.lookup_module: don't allow creating loops
7365 (Thomas Refis, report by Leo White, review by Jacques Garrigue)
7366
7367 - #8862, #8871: subst: preserve scopes
7368 (Thomas Refis, report by Leo White, review by Jacques Garrigue)
7369
7370 - #8921, #8924: Fix stack overflow with Flambda
7371 (Vincent Laviron, review by Pierre Chambart and Leo White,
7372 report by Aleksandr Kuzmenko)
7373
7374 - #8944: Fix "open struct .. end" on clambda backend
7375 (Thomas Refis, review by Leo White, report by Damon Wang and Mark Shinwell)
7376
7377 OCaml 4.08 maintenance branch
7378 -----------------------------
7379
7380 ### Bug fixes:
7381
7382 - #9326, #10125: Gc.set incorrectly handles the three `custom_*` fields,
7383 causing a performance regression
7384 (report by Emilio Jesús Gallego Arias, analysis and fix by Stephen Dolan,
7385 code by Xavier Leroy, review by Hugo Heuzard and Gabriel Scherer)
7386
7387 OCaml 4.08.1 (5 August 2019)
7388 ----------------------------
7389
7390 ### Bug fixes:
7391
7392 - #7887: ensure frame table is 8-aligned on ARM64 and PPC64
7393 (Xavier Leroy, report by Mark Hayden, review by Mark Shinwell
7394 and Gabriel Scherer)
7395
7396 - #8751: fix bug that could result in misaligned data section when compiling to
7397 native-code on amd64. (observed with the mingw64 compiler)
7398 (Nicolás Ojeda Bär, review by David Allsopp)
7399
7400 - #8769, #8770: Fix assertion failure with -pack
7401 (Leo White, review by Gabriel Scherer, report by Fabian @copy)
7402
7403 - #8816, #8818: fix loading of packed modules with Dynlink (regression in
7404 #2176).
7405 (Leo White, report by Andre Maroneze, review by Gabriel Scherer)
7406
7407 - #8830: configure script: fix tool prefix detection and Debian's armhf
7408 detection
7409 (Stéphane Glondu, review by David Allsopp)
7410
7411 - #8843, #8841: fix use of off_t on 32-bit systems.
7412 (Stephen Dolan, report by Richard Jones, review by Xavier Leroy)
7413
7414 OCaml 4.08.0 (13 June 2019)
7415 ---------------------------
7416
7417 ### Language features:
7418
7419 - #1947: Introduce binding operators (let*, let+, and* etc.)
7420 (Leo White, review by Thomas Refis)
7421
7422 - #1892: Allow shadowing of items coming from an include
7423 (Thomas Refis, review by Gabriel Radanne)
7424
7425 - #2122: Introduce local substitutions in signatures: "type t := type_expr"
7426 and "module M := Extended(Module).Path"
7427 (Thomas Refis, with help and review from Leo White, and Alain Frisch)
7428
7429 - #1804: New notion of "alerts" that generalizes the deprecated warning
7430 [@@ocaml.alert deprecated "Please use bar instead!"]
7431 [@@ocaml.alert unsafe "Please use safe_foo instead!"]
7432 (Alain Frisch, review by Leo White and Damien Doligez)
7433
7434 - #6422, #7083, #305, #1568: Allow `exception` under or-patterns
7435 (Thomas Refis, with help and review from Alain Frisch, Gabriel Scherer, Jeremy
7436 Yallop, Leo White and Luc Maranget)
7437
7438
7439 - #1705: Allow @@attributes on exception declarations.
7440 (Hugo Heuzard, review by Gabriel Radanne and Thomas Refis)
7441
7442 - #1506, #2147, #2166, #2167: Extended `open` to arbitrary module
7443 expression in structures and to applicative paths in signatures
7444 (Runhang Li, review by Alain Frisch, Florian Angeletti, Jeremy Yallop,
7445 Leo White and Thomas Refis)
7446
7447 * #2106: .~ is now a reserved keyword, and is no longer available
7448 for use in extended indexing operators
7449 (Jeremy Yallop, review by Gabriel Scherer, Florian Angeletti, and
7450 Damien Doligez)
7451
7452 * #7841, #2041, #2235: allow modules from include directories
7453 to shadow other ones, even in the toplevel; for a example, including
7454 a directory that defines its own Result module will shadow the stdlib's.
7455 (Jérémie Dimino, review by Alain Frisch and David Allsopp)
7456
7457 ### Type system:
7458
7459 - #2110: Partial support for GADTs inside or-patterns;
7460 The type equalities introduced by the GADT constructor are only
7461 available inside the or-pattern; they cannot be used in the
7462 right-hand-side of the clause, when both sides of the or-pattern
7463 agree on it.
7464 (Thomas Refis and Leo White, review by Jacques Garrigue)
7465
7466 - #1826: allow expanding a type to a private abbreviation instead of
7467 abstracting when removing references to an identifier.
7468 (Thomas Refis and Leo White, review by Jacques Garrigue)
7469
7470 - #1942, #2244: simplification of the static check
7471 for recursive definitions
7472 (Alban Reynaud and Gabriel Scherer,
7473 review by Jeremy Yallop, Armaël Guéneau and Damien Doligez)
7474
7475 ### Standard library:
7476
7477 - #2128: Add Fun module: `id, const, flip, negate, protect`
7478 (protect is a "try_finally" combinator)
7479 https://caml.inria.fr/pub/docs/manual-ocaml/libref/Fun.html
7480 (Many fine eyes)
7481
7482 - #2010: Add Bool module
7483 https://caml.inria.fr/pub/docs/manual-ocaml/libref/Bool.html
7484 (Many fine eyes)
7485
7486 - #2011: Add Int module
7487 https://caml.inria.fr/pub/docs/manual-ocaml/libref/Int.html
7488 (Many fine eyes)
7489
7490 - #1940: Add Option module and Format.pp_print_option
7491 `none, some, value, get, bind, join, map, fold, iter`, etc.
7492 https://caml.inria.fr/pub/docs/manual-ocaml/libref/Option.html
7493 (Many fine eyes)
7494
7495 - #1956: Add Result module and Format.pp_print_result
7496 `ok, error, value, get_ok, bind, join, map, map_error`, etc.
7497 https://caml.inria.fr/pub/docs/manual-ocaml/libref/Result.html
7498 (Many fine eyes)
7499
7500 - #1855, #2118: Add `Fun.protect ~finally` for enforcing local
7501 invariants whether a function raises or not, similar to
7502 `unwind-protect` in Lisp and `FINALLY` in Modula-2. It is careful
7503 about preserving backtraces and treating exceptions in finally as
7504 errors.
7505 (Marcello Seri and Guillaume Munch-Maccagnoni, review by Daniel
7506 Bünzli, Gabriel Scherer, François Bobot, Nicolás Ojeda Bär, Xavier
7507 Clerc, Boris Yakobowski, Damien Doligez, and Xavier Leroy)
7508
7509 * #1605: Deprecate Stdlib.Pervasives. Following #1010, Pervasives
7510 is no longer needed and Stdlib should be used instead.
7511 (Jérémie Dimino, review by Nicolás Ojeda Bär)
7512
7513 - #2185: Add `List.filter_map`
7514 (Thomas Refis, review by Alain Frisch and Gabriel Scherer)
7515
7516 - #1957: Add Stack.{top_opt,pop_opt} and Queue.{peek_opt,take_opt}.
7517 (Vladimir Keleshev, review by Nicolás Ojeda Bär and Gabriel Scherer)
7518
7519 - #1182: Add new Printf formats %#d %#Ld %#ld %#nd (idem for %i and %u) for
7520 alternative integer formatting -- inserts '_' between blocks of digits.
7521 (ygrek, review by Gabriel Scherer)
7522
7523 - #1959: Add Format.dprintf, a printing function which outputs a closure
7524 usable with %t.
7525 (Gabriel Radanne, request by Armaël Guéneau,
7526 review by Florian Angeletti and Gabriel Scherer)
7527
7528 - #1986, #6450: Add Set.disjoint
7529 (Nicolás Ojeda Bär, review by Gabriel Scherer)
7530
7531 - #7812, #2125: Add Filename.chop_suffix_opt
7532 (Alain Frisch, review by Nicolás Ojeda Bär, suggestion by whitequark)
7533
7534 - #1864: Extend Bytes and Buffer with functions to read/write
7535 binary representations of numbers
7536 (Alain Frisch and Daniel Bünzli)
7537
7538 - #1458: Add unsigned operations unsigned_div, unsigned_rem, unsigned_compare
7539 and unsigned_to_int to modules Int32, Int64, Nativeint.
7540 (Nicolás Ojeda Bär, review by Daniel Bünzli, Alain Frisch and Max Mouratov)
7541
7542 - #2002: Add Format.pp_print_custom_break, a new more general kind of break
7543 hint that can emit non-whitespace characters.
7544 (Vladimir Keleshev and Pierre Weis, review by Josh Berdine, Gabriel Radanne)
7545
7546 - #1966: Add Format semantic tags using extensible sum types.
7547 (Gabriel Radanne, review by Nicolás Ojeda Bär)
7548
7549 - #1794: Add constants zero, one, minus_one and functions succ,
7550 pred, is_finite, is_infinite, is_nan, is_integer, trunc, round,
7551 next_after, sign_bit, min, max, min_max, min_num, max_num,
7552 min_max_num to module Float.
7553 (Christophe Troestler, review by Alain Frisch, Xavier Clerc and Daniel Bünzli)
7554
7555 - #1354, #2177: Add fma support to Float module.
7556 (Laurent Thévenoux, review by Alain Frisch, Jacques-Henri Jourdan,
7557 Xavier Leroy)
7558
7559
7560
7561 - #5072, #6655, #1876: add aliases in Stdlib for built-in types
7562 and exceptions.
7563 (Jeremy Yallop, reports by Pierre Letouzey and David Sheets,
7564 review by Valentin Gatien-Baron, Gabriel Scherer and Alain Frisch)
7565
7566 - #1731: Format, use raise_notrace to preserve backtraces.
7567 (Frédéric Bour, report by Jules Villard, review by Gabriel Scherer)
7568
7569 - #6701, #1185, #1803: make float_of_string and string_of_float
7570 locale-independent.
7571 (ygrek, review by Xavier Leroy and Damien Doligez)
7572
7573 - #7795, #1782: Fix off-by-one error in Weak.create.
7574 (KC Sivaramakrishnan, review by Gabriel Scherer and François Bobot)
7575
7576 - #7235: Format, flush err_formatter at exit.
7577 (Pierre Weis, request by Jun Furuse)
7578
7579 - #1857, #7812: Remove Sort module, deprecated since 2000 and emitting
7580 a deprecation warning since 4.02.
7581 (whitequark)
7582
7583 - #1923: Arg module sometimes misbehaved instead of rejecting invalid
7584 -keyword=arg inputs
7585 (Valentin Gatien-Baron, review by Gabriel Scherer)
7586
7587 - #1959: Small simplification and optimization to Format.ifprintf
7588 (Gabriel Radanne, review by Gabriel Scherer)
7589
7590 - #2119: clarify the documentation of Set.diff
7591 (Gabriel Scherer, suggestion by John Skaller)
7592
7593 - #2145: Deprecate the mutability of Gc.control record fields
7594 (Damien Doligez, review by Alain Frisch)
7595
7596 - #2159, #7874: annotate {String,Bytes}.equal as being [@@noalloc].
7597 (Pierre-Marie Pédrot, review by Nicolás Ojeda Bär)
7598
7599 - #1936: Add module Float.Array
7600 (Damien Doligez, review by Xavier Clerc and Alain Frisch)
7601
7602 - #2183: Fix segfault in Array.create_float with -no-flat-float-array
7603 (Damien Doligez, review by Gabriel Scherer and Jeremy Yallop)
7604
7605 - #1525: Make function set_max_indent respect documentation
7606 (Pierre Weis, Richard Bonichon, review by Florian Angeletti)
7607
7608 - #2202: Correct Hashtbl.MakeSeeded.{add_seq,replace_seq,of_seq} to use
7609 functor hash function instead of default hash function. Hashtbl.Make.of_seq
7610 shouldn't create randomized hash tables.
7611 (David Allsopp, review by Alain Frisch)
7612
7613 ### Other libraries:
7614
7615 - #2533, #1839, #1949: added Unix.fsync
7616 (François Berenger, Nicolás Ojeda Bär, review by Daniel Bünzli, David Allsopp
7617 and ygrek)
7618
7619 - #1792, #7794: Add Unix.open_process_args{,_in,_out,_full} similar to
7620 Unix.open_process{,_in,_out,_full}, but passing an explicit argv array.
7621 (Nicolás Ojeda Bär, review by Jérémie Dimino, request by Volker Diels-Grabsch)
7622
7623 - #1999: Add Unix.process{,_in,_out,_full}_pid to retrieve opened process's
7624 pid.
7625 (Romain Beauxis, review by Nicolás Ojeda Bär)
7626
7627 - #2222: Set default status in waitpid when pid is zero. Otherwise,
7628 status value is undefined.
7629 (Romain Beauxis and Xavier Leroy, review by Stephen Dolan)
7630
7631 * #2104, #2211, #4127, #7709: Fix Thread.sigmask. When
7632 system threads are loaded, Unix.sigprocmask is now an alias for
7633 Thread.sigmask. This changes the behavior at least on MacOS, where
7634 Unix.sigprocmask used to change the masks of all threads.
7635 (Jacques-Henri Jourdan, review by Jérémie Dimino)
7636
7637 - #1061: Add ?follow parameter to Unix.link. This allows hardlinking
7638 symlinks.
7639 (Christopher Zimmermann, review by Xavier Leroy, Damien Doligez, David
7640 Allsopp, David Sheets)
7641
7642 - #2038: Deprecate vm threads.
7643 OCaml supported both "native threads", based on pthreads,
7644 and its own green-threads implementation, "vm threads". We are not
7645 aware of any recent usage of "vm threads", and removing them simplifies
7646 further maintenance.
7647 (Jérémie Dimino)
7648
7649 * #4208, #4229, #4839, #6462, #6957, #6950, #1063, #2176,
7650 #2297: Make (nat)dynlink sound by correctly failing when
7651 dynlinked module names clash with other modules or interfaces.
7652 (Mark Shinwell, Leo White, Nicolás Ojeda Bär, Pierre Chambart)
7653
7654 - #2263: Delete the deprecated Bigarray.*.map_file functions in
7655 favour of `*_of_genarray (Unix.map_file ...)` functions instead. The
7656 `Unix.map_file` function was introduced in OCaml 4.06.0 onwards.
7657 (Jérémie Dimino, reviewed by David Allsopp and Anil Madhavapeddy)
7658
7659 ### Compiler user-interface and warnings:
7660
7661 - #2096: Add source highlighting for errors & warnings in batch mode
7662 (Armaël Guéneau, review by Gabriel Scherer and Jérémie Dimino)
7663
7664 - #2133: [@ocaml.warn_on_literal_pattern]: now warn on literal patterns
7665 found anywhere in a constructor's arguments.
7666 (Jeremy Yallop, review by Gabriel Scherer)
7667
7668 - #1720: Improve error reporting for missing 'rec' in let-bindings.
7669 (Arthur Charguéraud and Armaël Guéneau, with help and advice
7670 from Gabriel Scherer, Frédéric Bour, Xavier Clerc and Leo White)
7671
7672 - #7116, #1430: new -config-var option
7673 to get the value of a single configuration variable in scripts.
7674 (Gabriel Scherer, review by Sébastien Hinderer and David Allsopp,
7675 request by Adrien Nader)
7676
7677 - #1733,1993,1998,2058,2094,2140: Typing error message improvements
7678 - #1733, change the perspective of the unexpected existential error
7679 message.
7680 - #1993, expanded error messages for universal quantification failure
7681 - #1998, more context for unbound type parameter error
7682 - #2058, full explanation for unsafe cycles in recursive module
7683 definitions (suggestion by Ivan Gotovchits)
7684 - #2094, rewording for "constructor has no type" error
7685 - #7565, #2140, more context for universal variable escape
7686 in method type
7687 (Florian Angeletti, reviews by Jacques Garrigue, Armaël Guéneau,
7688 Gabriel Radanne, Gabriel Scherer and Jeremy Yallop)
7689
7690 - #1913: new flag -dump-into-file to print debug output like -dlambda into
7691 a file named after the file being built, instead of on stderr.
7692 (Valentin Gatien-Baron, review by Thomas Refis)
7693
7694 - #1921: in the compilation context passed to ppx extensions,
7695 add more configuration options related to type-checking:
7696 -rectypes, -principal, -alias-deps, -unboxed-types, -unsafe-string
7697 (Gabriel Scherer, review by Gabriel Radanne, Xavier Clerc and Frédéric Bour)
7698
7699 - #1976: Better error messages for extension constructor type mismatches
7700 (Thomas Refis, review by Gabriel Scherer)
7701
7702 - #1841, #7808: the environment variable OCAMLTOP_INCLUDE_PATH can now
7703 specify a list of additional include directories for the ocaml toplevel.
7704 (Nicolás Ojeda Bär, request by Daniel Bünzli, review by Daniel Bünzli and
7705 Damien Doligez)
7706
7707 - #6638, #1110: introduced a dedicated warning to report
7708 unused "open!" statements
7709 (Alain Frisch, report by dwang, review by and design from Leo White)
7710
7711 - #1974: Trigger warning 5 in "let _ = e" and "ignore e" if e is of function
7712 type and syntactically an application. (For the case of "ignore e" the warning
7713 already existed, but used to be triggered even when e was not an application.)
7714 (Nicolás Ojeda Bär, review by Alain Frisch and Jacques Garrigue)
7715
7716 - #7408, #7846, #2015: Check arity of primitives.
7717 (Hugo Heuzard, review by Nicolás Ojeda Bär)
7718
7719
7720
7721 - #2091: Add a warning triggered by type declarations "type t = ()"
7722 (Armaël Guéneau, report by linse, review by Florian Angeletti and Gabriel
7723 Scherer)
7724
7725 - #2004: Use common standard library path `lib/ocaml` for Windows,
7726 for consistency with OSX & Linux. Previously was located at `lib`.
7727 (Bryan Phelps, Jordan Walke, review by David Allsopp)
7728
7729 - #6416, #1120: unique printed names for identifiers
7730 (Florian Angeletti, review by Jacques Garrigue)
7731
7732 - #1691: add shared_libraries to ocamlc -config exporting
7733 SUPPORTS_SHARED_LIBRARIES from Makefile.config.
7734 (David Allsopp, review by Gabriel Scherer and Mark Shinwell)
7735
7736 - #6913, #1786: new -match-context-rows option
7737 to control the degree of optimization in the pattern matching compiler.
7738 (Dwight Guth, review by Gabriel Scherer and Luc Maranget)
7739
7740 - #1822: keep attributes attached to pattern variables from being discarded.
7741 (Nicolás Ojeda Bär, review by Thomas Refis)
7742
7743 - #1845: new `-dcamlprimc` option to keep the generated C file containing
7744 the information about primitives; pass `-fdebug-prefix-map` to the C compiler
7745 when supported, for reproducible builds
7746 (Xavier Clerc, review by Jérémie Dimino)
7747
7748 - #1856, #1869: use `BUILD_PATH_PREFIX_MAP` when compiling primitives
7749 in order to make builds reproducible if code contains uses of
7750 `__FILE__` or `__LOC__`
7751 (Xavier Clerc, review by Gabriel Scherer and Sébastien Hinderer)
7752
7753 - #1906: the -unsafe option does not apply to marshalled ASTs passed
7754 to the compiler directly or by a -pp preprocessor; add a proper
7755 warning (64) instead of a simple stderr message
7756 (Valentin Gatien-Baron)
7757
7758 - #1925: Print error locations more consistently between batch mode, toplevel
7759 and expect tests
7760 (Armaël Guéneau, review by Thomas Refis, Gabriel Scherer and François Bobot)
7761
7762 - #1930: pass the elements from `BUILD_PATH_PREFIX_MAP` to the assembler
7763 (Xavier Clerc, review by Gabriel Scherer, Sébastien Hinderer, and
7764 Xavier Leroy)
7765
7766 - #1945, #2032: new "-stop-after [parsing|typing]" option
7767 to stop compilation after the parsing or typing pass
7768 (Gabriel Scherer, review by Jérémie Dimino)
7769
7770 - #1953: Add locations to attributes in the parsetree.
7771 (Hugo Heuzard, review by Gabriel Radanne)
7772
7773 - #1954: Add locations to toplevel directives.
7774 (Hugo Heuzard, review by Gabriel Radanne)
7775
7776 * #1979: Remove support for TERM=norepeat when displaying errors
7777 (Armaël Guéneau, review by Gabriel Scherer and Florian Angeletti)
7778
7779 - #1960: The parser keeps previous location when relocating ast node.
7780 (Hugo Heuzard, review by Jérémie Dimino)
7781
7782 - #7864, #2109: remove duplicates from spelling suggestions.
7783 (Nicolás Ojeda Bär, review by Armaël Guéneau)
7784
7785 ### Manual and documentation:
7786
7787 - #7548: printf example in the tutorial part of the manual
7788 (Kostikova Oxana, rewiew by Gabriel Scherer, Florian Angeletti,
7789 Marcello Seri and Armaël Guéneau)
7790
7791 - #7546, #2020: preambles and introduction for compiler-libs.
7792 (Florian Angeletti, review by Daniel Bünzli, Perry E. Metzger
7793 and Gabriel Scherer)
7794
7795 - #7547, #2273: Tutorial on Lazy expressions and patterns in OCaml Manual
7796 (Ulugbek Abdullaev, review by Florian Angeletti and Gabriel Scherer)
7797
7798 - #7720, #1596, precise the documentation
7799 of the maximum indentation limit in Format.
7800 (Florian Angeletti, review by Richard Bonichon and Pierre Weis)
7801
7802 - #7825: html manual split compilerlibs from stdlib in the html
7803 index of modules
7804 (Florian Angeletti, review by Perry E. Metzger and Gabriel Scherer)
7805
7806 - #1209, #2008: in the Extension section, use the caml_example environment
7807 (uses the compiler to check the example code).
7808 This change was made possible by a lot of tooling work from Florian Angeletti:
7809 #1702, #1765, #1863, and Gabriel Scherer's #1903.
7810 (Gabriel Scherer, review by Florian Angeletti)
7811
7812 - #1788, 1831, 2007, 2198, 2232, move language extensions to the core
7813 chapters:
7814 - #1788: quoted string description
7815 - #1831: local exceptions and exception cases
7816 - #2007: 32-bit, 64-bit and native integer literals
7817 - #2198: lazy patterns
7818 - #2232: short object copy notation
7819 (Florian Angeletti, review by Xavier Clerc, Perry E. Metzger, Gabriel Scherer
7820 and Jeremy Yallop)
7821
7822 - #1863: caml-tex2, move to compiler-libs
7823 (Florian Angeletti, review by Sébastien Hinderer and Gabriel Scherer)
7824
7825 - #2105: Change verbatim to caml_example in documentation
7826 (Maxime Flin, review by Florian Angeletti)
7827
7828 - #2114: ocamldoc, improved manpages for documentation inside modules
7829 (Florian Angeletti, review by Gabriel Scherer)
7830
7831 - #2117: stdlib documentation, duplicate the operator precedence table
7832 from the manual inside a separate "OCaml_operators" module.
7833 (Florian Angeletti, review by Daniel Bünzli, Perry E. Metzger
7834 and Gabriel Scherer)
7835
7836 - #2187: document "exception A | pat" patterns
7837 (Florian Angeletti, review by Perry E. Metzger and Jeremy Yallop)
7838
7839 - #8508: refresh \moduleref macro
7840 (Florian Angeletti, review by Gabriel Scherer)
7841
7842 ### Code generation and optimizations:
7843
7844 - #7725, #1754: improve AFL instrumentation for objects and lazy values.
7845 (Stephen Dolan)
7846
7847 - #1631: AMD64 code generator: emit shorter instruction sequences for the
7848 sign-extension operations.
7849 (LemonBoy, review by Alain Frisch and Xavier Leroy)
7850
7851 - #7246, #2146: make a few int64 primitives use [@@unboxed]
7852 stubs on 32bits
7853 (Jérémie Dimino)
7854
7855 - #1917: comballoc: ensure object allocation order is preserved
7856 (Stephen Dolan)
7857
7858 - #6242, #2143, #8558, #8559: Optimize some local functions.
7859 Local functions that do not escape and whose calls all have
7860 the same continuation are lowered into a static-catch handler.
7861 (Alain Frisch, review by Gabriel Scherer)
7862
7863 - #2082: New options [-insn-sched] and [-no-insn-sched] to control
7864 instruction scheduling.
7865 (Mark Shinwell, review by Damien Doligez)
7866
7867 - #2239: Fix match miscompilation with flambda
7868 (Leo White, review by Alain Frisch)
7869
7870 ### Runtime system:
7871
7872 - #7198, #7750, #1738: add a function (caml_alloc_custom_mem)
7873 and three GC parameters to give the user better control of the
7874 out-of-heap memory retained by custom values; use the function to
7875 allocate bigarrays and I/O channels.
7876 (Damien Doligez, review by Alain Frisch)
7877
7878 - #1793: add the -m and -M command-line options to ocamlrun.
7879 Option -m prints the magic number of the bytecode executable passed
7880 as argument, -M prints the magic number expected by ocamlrun.
7881 (Sébastien Hinderer, review by Xavier Clerc and Damien Doligez)
7882
7883 - #1867: Remove the C plugins mechanism.
7884 (Xavier Leroy, review by David Allsopp, Damien Doligez, Sébastien Hinderer)
7885
7886 - #8627: Require SSE2 for 32-bit mingw port to generate correct code
7887 for caml_round with GCC 7.4.
7888 (David Allsopp, review by Xavier Leroy)
7889
7890 - #7676, #2144: Remove old GC heuristic
7891 (Damien Doligez, report and review by Alain Frisch)
7892
7893 * #1683: Change Marshal format to make Custom_tag objects store their
7894 length. Old versions of OCaml will no longer be able to parse new marshalled
7895 files containing custom blocks, but old files will still parse.
7896 (Stephen Dolan)
7897
7898 - #1723: Remove internal Meta.static_{alloc,free} primitives.
7899 (Stephen Dolan, review by Gabriel Scherer)
7900
7901 - #1895: Printexc.get_callstack would return only one frame in native
7902 code in threads other then the initial one
7903 (Valentin Gatien-Baron, review by Xavier Leroy)
7904
7905 - #1900, #7814: avoid exporting non-prefixed identifiers in the debug
7906 and instrumented runtimes.
7907 (Damien Doligez, report by Gabriel Scherer)
7908
7909 - #2079: Avoid page table lookup in Pervasives.compare with
7910 no-naked-pointers
7911 (Sam Goldman, review by Gabriel Scherer, David Allsopp, Stephen Dolan)
7912
7913 - #7829, #8585: Fix pointer comparisons in freelist.c (for 32-bit platforms)
7914 (David Allsopp and Damien Doligez)
7915
7916 - #8567, #8569: on ARM64, use 32-bit loads to access caml_backtrace_active
7917 (Xavier Leroy, review by Mark Shinwell and Greta Yorsh)
7918
7919 - #8568: Fix a memory leak in mmapped bigarrays
7920 (Damien Doligez, review by Xavier Leroy and Jérémie Dimino)
7921
7922 ### Tools
7923
7924 - #2182: Split Emacs caml-mode as an independent project.
7925 (Christophe Troestler, review by Gabriel Scherer)
7926
7927 - #1865: support dark themes in Emacs, and clean up usage of
7928 deprecated Emacs APIs
7929 (Wilfred Hughes, review by Clément Pit-Claudel)
7930
7931 - #1590: ocamllex-generated lexers can be instructed not to update
7932 their lex_curr_p/lex_start_p fields, resulting in a significant
7933 performance gain when those fields are not required.
7934 (Alain Frisch, review by Jérémie Dimino)
7935
7936 - #7843, #2013: ocamldoc, better handling of {{!label}text} in the latex
7937 backend.
7938 (Florian Angeletti, review by Nicolás Ojeda Bär and Gabriel Scherer)
7939
7940 - #7844, #2040: Emacs, use built-in detection of comments,
7941 fixes an imenu crash.
7942 (Wilfred Hughes, review by Christophe Troestler)
7943
7944 - #7850: Emacs, use symbol boundaries in regular expressions,
7945 fixes an imenu crash.
7946 (Wilfred Hughes, review by Christophe Troestler)
7947
7948 - #1711: the new 'open' flag in OCAMLPARAM takes a comma-separated list of
7949 modules to open as if they had been passed via the command line -open flag.
7950 (Nicolás Ojeda Bär, review by Mark Shinwell)
7951
7952 - #2000: ocamdoc, extended support for "include module type of ..."
7953 (Florian Angeletti, review by Jérémie Dimino)
7954
7955 - #2045: ocamlmklib now supports options -args and -args0 to provide extra
7956 command-line arguments in a file.
7957 (Nicolás Ojeda Bär, review by Gabriel Scherer and Daniel Bünzli)
7958
7959 - #2189: change ocamldep Makefile-output to print each dependency
7960 on a new line, for more readable diffs of versioned dependencies.
7961 (Gabriel Scherer, review by Nicolás Ojeda Bär)
7962
7963 - #2223: ocamltest: fix the "bsd" and "not-bsd" built-in actions to
7964 recognize all BSD variants
7965 (Damien Doligez, review by Sébastien Hinderer and David Allsopp)
7966
7967 ### Compiler distribution build system:
7968
7969 - #1776: add -no-install-bytecode-programs and related configure options to
7970 control (non-)installation of ".byte" executables.
7971 (Mark Shinwell, review by Sébastien Hinderer and Gabriel Scherer)
7972
7973 - #1777: add -no-install-source-artifacts and related configure options to
7974 control installation of .cmt, .cmti, .mli and .ml files.
7975 (Mark Shinwell, review by Nicolás Ojeda Bär and Sébastien Hinderer)
7976
7977 - #1781: cleanup of the manual's build process.
7978 (steinuil, review by Marcello Seri, Gabriel Scherer and Florian Angeletti)
7979
7980 - #1797: remove the deprecated Makefile.nt files.
7981 (Sébastien Hinderer, review by Nicolás Ojeda Bär)
7982
7983 - #1805: fix the bootstrap procedure and its documentation.
7984 (Sébastien Hinderer, Xavier Leroy and Damien Doligez; review by
7985 Gabriel Scherer)
7986
7987 - #1840: build system enhancements.
7988 (Sébastien Hinderer, review by David Allsopp, Xavier Leroy and
7989 Damien Doligez)
7990
7991 - #1852: merge runtime directories
7992 (Sébastien Hinderer, review by Xavier Leroy and Damien Doligez)
7993
7994 - #1854: remove the no longer defined BYTECCCOMPOPTS build variable.
7995 (Sébastien Hinderer, review by Damien Doligez)
7996
7997 - #2024: stop supporting obsolete platforms: Rhapsody (old beta
7998 version of MacOS X, BeOS, alpha*-*-linux*, mips-*-irix6*,
7999 alpha*-*-unicos, powerpc-*-aix, *-*-solaris2*, mips*-*-irix[56]*,
8000 i[3456]86-*-darwin[89].*, i[3456]86-*-solaris*, *-*-sunos* *-*-unicos.
8001 (Sébastien Hinderer, review by Xavier Leroy, Damien Doligez, Gabriel
8002 Scherer and Armaël Guéneau)
8003
8004 - #2053: allow unix, vmthreads and str not to be built.
8005 (David Allsopp, review by Sébastien Hinderer)
8006
8007 * #2059: stop defining OCAML_STDLIB_DIR in s.h.
8008 (Sébastien Hinderer, review by David Allsopp and Damien Doligez)
8009
8010 * #2066: remove the standard_runtime configuration variable.
8011 (Sébastien Hinderer, review by Xavier Leroy, Stephen Dolan and
8012 Damien Doligez)
8013
8014 * #2139: use autoconf to generate the compiler's configuration script
8015 (Sébastien Hinderer, review by Damien Doligez and David Allsopp)
8016
8017 - #2148: fix a parallel build bug involving CamlinternalLazy.
8018 (Stephen Dolan, review by Gabriel Scherer and Nicolás Ojeda Bär)
8019
8020 - #2264, #7904: the configure script now sets the Unicode handling mode
8021 under Windows according to the value of the variable WINDOWS_UNICODE_MODE. If
8022 WINDOWS_UNICODE_MODE is "ansi" then it is assumed to be the current code page
8023 encoding. If WINDOWS_UNICODE_MODE is "compatible" or empty or not set at all,
8024 then encoding is UTF-8 with code page fallback.
8025 (Nicolás Ojeda Bär, review by Sébastien Hinderer and David Allsopp)
8026
8027 - #2266: ensure Cygwin ports configure with `EXE=.exe`, or the compiler is
8028 unable to find the camlheader files (subtle regression of #2139/2041)
8029 (David Allsopp, report and review by Sébastien Hinderer)
8030
8031 - #7919, #2311: Fix assembler detection in configure
8032 (Sébastien Hinderer, review by David Allsopp)
8033
8034 - #2295: Restore support for bytecode target XLC/AIX/Power
8035 (Konstantin Romanov, review by Sébastien Hinderer and David Allsopp)
8036
8037 - #8528: get rid of the direct call to the C preprocessor in the testsuite
8038 (Sébastien Hinderer, review by David Allsopp)
8039
8040 - #7938, #8532: Fix alignment detection for ints on 32-bits platforms
8041 (Sébastien Hinderer, review by Xavier Leroy)
8042
8043 * #8533: Remove some unused configure tests
8044 (Stephen Dolan, review by David Allsopp and Sébastien Hinderer)
8045
8046 - #2207, #8604: Add opam files to allow pinning
8047 (Leo White, Greta Yorsh, review by Gabriel Radanne)
8048
8049 - #8616: configure: use variables rather than arguments for a few options
8050 (Sébastien Hinderer, review by David Allsopp, Gabriel Scherer and
8051 Damien Doligez)
8052
8053 - #8632: Correctly propagate flags for --with-pic in configure.
8054 (David Allsopp, review by Sébastien Hinderer and Damien Doligez)
8055
8056 - #8673: restore SpaceTime and libunwind support in configure script
8057 (Sébastien Hinderer, review by Damien Doligez)
8058
8059 ### Internal/compiler-libs changes:
8060
8061 - #7918, #1703, #1944, #2213, #2257: Add the module
8062 Compile_common, which factorizes the common part in Compile and
8063 Optcompile. This also makes the pipeline more modular.
8064 (Gabriel Radanne, help from Gabriel Scherer and Valentin
8065 Gatien-Baron, review by Mark Shinwell and Gabriel Radanne,
8066 regression spotted by Clément Franchini)
8067
8068 - #292: use Menhir as the parser generator for the OCaml parser.
8069 Satellite GPRs: #1844, #1846, #1853, #1850, #1934, #2151,
8070 #2174
8071 (Gabriel Scherer, Nicolás Ojeda Bär, Frédéric Bour, Thomas Refis
8072 and François Pottier,
8073 review by Nicolás Ojeda Bär, Leo White and David Allsopp)
8074
8075 - #374: use Misc.try_finally for resource cleanup in the compiler
8076 codebase. This should fix the problem of catch-and-reraise `try .. with`
8077 blocks destroying backtrace information -- in the compiler.
8078 (François Bobot, help from Gabriel Scherer and Nicolás Ojeda Bär,
8079 review by Gabriel Scherer)
8080
8081 - #1148, #1287, #1288, #1874: significant improvements
8082 of the tools/check-typo script used over the files of the whole repository;
8083 contributors are now expected to check that check-typo passes on their
8084 pull requests; see CONTRIBUTING.md for more details.
8085 (David Allsopp, review by Damien Doligez and Sébastien Hinderer)
8086
8087 - #1610, #2252: Remove positions from paths
8088 (Leo White, review by Frédéric Bour and Thomas Refis)
8089
8090 - #1745: do not generalize the type of every sub-pattern,
8091 only of variables. (preliminary work for GADTs in or-patterns)
8092 (Thomas Refis, review by Leo White)
8093
8094 - #1909: unsharing pattern types (preliminary work for GADTs in or-patterns)
8095 (Thomas Refis, with help from Leo White, review by Jacques Garrigue)
8096
8097 - #1748: do not error when instantiating polymorphic fields in patterns.
8098 (Thomas Refis, review by Gabriel Scherer)
8099
8100 - #2317: type_let: be more careful generalizing parts of the pattern
8101 (Thomas Refis and Leo White, review by Jacques Garrigue)
8102
8103 - #1746: remove unreachable error variant: Make_seltype_nongen.
8104 (Florian Angeletti, review by Gabriel Radanne)
8105
8106 - #1747: type_cases: always propagate (preliminary work
8107 for GADTs in or-patterns)
8108 (Thomas Refis, review by Jacques Garrigue)
8109
8110 - #1811: shadow the polymorphic comparison in the middle-end
8111 (Xavier Clerc, review by Pierre Chambart)
8112
8113 - #1833: allow non-val payloads in CMM Ccatch handlers
8114 (Simon Fowler, review by Xavier Clerc)
8115
8116 - #1866: document the release process
8117 (Damien Doligez and Gabriel Scherer, review by Sébastien Hinderer,
8118 Perry E. Metzger, Xavier Leroy and David Allsopp)
8119
8120 - #1886: move the Location.absname reference to Clflags.absname
8121 (Armaël Guéneau, review by Jérémie Dimino)
8122
8123 - #1894: generalize highlight_dumb in location.ml to handle highlighting
8124 several locations
8125 (Armaël Guéneau, review by Gabriel Scherer)
8126
8127 - #1903: parsetree, add locations to all nodes with attributes
8128 (Gabriel Scherer, review by Thomas Refis)
8129
8130 - #1905: add check-typo-since to check the files changed
8131 since a given git reference
8132 (Gabriel Scherer, review by David Allsopp)
8133
8134 - #1910: improve the check-typo use of .gitattributes
8135 (Gabriel Scherer, review by David Allsopp and Damien Doligez)
8136
8137 - #1938: always check ast invariants after preprocessing
8138 (Florian Angeletti, review by Alain Frisch and Gabriel Scherer)
8139
8140 - #1941: refactor the command line parsing of ocamlcp and ocamloptp
8141 (Valentin Gatien-Baron, review by Florian Angeletti)
8142
8143 - #1948: Refactor Stdlib.Format. Notably, use Stdlib.Stack and Stdlib.Queue,
8144 and avoid exceptions for control flow.
8145 (Vladimir Keleshev, review by Nicolás Ojeda Bär and Gabriel Scherer)
8146
8147 * #1952: refactor the code responsible for displaying errors and warnings
8148 `Location.report_error` is removed, use `Location.print_report` instead
8149 (Armaël Guéneau, review by Thomas Refis)
8150
8151 - #7835, #1980, #8548, #8586: separate scope from stamp in idents and explicitly
8152 rescope idents when substituting signatures.
8153 (Thomas Refis, review by Jacques Garrigue and Leo White)
8154
8155 - #1996: expose Pprintast.longident to help compiler-libs users print
8156 Longident.t values.
8157 (Gabriel Scherer, review by Florian Angeletti and Thomas Refis)
8158
8159 - #2030: makefile targets to build AST files of sources
8160 for parser testing. See parsing/HACKING.adoc.
8161 (Gabriel Scherer, review by Nicolás Ojeda Bär)
8162
8163 * #2041: add a cache for looking up files in the load path
8164 (Jérémie Dimino, review by Alain Frisch and David Allsopp)
8165
8166 - #2047, #2269: a new type for unification traces
8167 (Florian Angeletti, report by Leo White (#2269),
8168 review by Thomas Refis and Gabriel Scherer)
8169
8170 - #2055: Add [Linearize.Lprologue].
8171 (Mark Shinwell, review by Pierre Chambart)
8172
8173 - #2056: Use [Backend_var] rather than [Ident] from [Clambda] onwards;
8174 use [Backend_var.With_provenance] for variables in binding position.
8175 (Mark Shinwell, review by Pierre Chambart)
8176
8177 - #2060: "Phantom let" support for the Clambda language.
8178 (Mark Shinwell, review by Vincent Laviron)
8179
8180 - #2065: Add [Proc.destroyed_at_reloadretaddr].
8181 (Mark Shinwell, review by Damien Doligez)
8182
8183 - #2070: "Phantom let" support for the Cmm language.
8184 (Mark Shinwell, review by Vincent Laviron)
8185
8186 - #2072: Always associate a scope to a type
8187 (Thomas Refis, review by Jacques Garrigue and Leo White)
8188
8189 - #2074: Correct naming of record field inside [Ialloc] terms.
8190 (Mark Shinwell, review by Jérémie Dimino)
8191
8192 - #2076: Add [Targetint.print].
8193 (Mark Shinwell)
8194
8195 - #2080: Add [Proc.dwarf_register_numbers] and
8196 [Proc.stack_ptr_dwarf_register_number].
8197 (Mark Shinwell, review by Bernhard Schommer)
8198
8199 - #2088: Add [Clambda.usymbol_provenance].
8200 (Mark Shinwell, review by Damien Doligez)
8201
8202 - #2152, #2517: refactorize the fixpoint to compute type-system
8203 properties of mutually-recursive type declarations.
8204 (Gabriel Scherer and Rodolphe Lepigre, review by Armaël Guéneau)
8205
8206 - #2156: propagate more type information through Lambda and Clambda
8207 intermediate language, as a preparation step for more future optimizations
8208 (Pierre Chambart and Alain Frisch, cross-reviewed by themselves)
8209
8210 - #2160: restore --disable-shared support and ensure testsuite runs correctly
8211 when compiled without shared library support.
8212 (David Allsopp, review by Damien Doligez and Sébastien Hinderer)
8213
8214 * #2173: removed TypedtreeMap
8215 (Thomas Refis, review by Gabriel Scherer)
8216
8217 - #7867: Fix #mod_use raising an exception for filenames with no
8218 extension.
8219 (Geoff Gole)
8220
8221 - #2100: Fix Unix.getaddrinfo when called on strings containing
8222 null bytes; it would crash the GC later on.
8223 (Armaël Guéneau, report and fix by Joe, review by Sébastien Hinderer)
8224
8225 - #7847, #2019: Fix an infinite loop that could occur when the
8226 (Menhir-generated) parser encountered a syntax error in a certain
8227 specific state.
8228 (François Pottier, report by Stefan Muenzel,
8229 review by Frédéric Bour, Thomas Refis, Gabriel Scherer)
8230
8231 - #1626: Do not allow recursive modules in `with module`
8232 (Leo White, review by Gabriel Radanne)
8233
8234 - #7726, #1676: Recursive modules, equi-recursive types and stack overflow
8235 (Jacques Garrigue, report by Jeremy Yallop, review by Leo White)
8236
8237 - #7723, #1698: Ensure `with module` and `with type` do not weaken
8238 module aliases.
8239 (Leo White, review by Gabriel Radanne and Jacques Garrigue)
8240
8241 - #1719: fix Pervasives.LargeFile functions under Windows.
8242 (Alain Frisch)
8243
8244 - #1739: ensure ocamltest waits for child processes to terminate on Windows.
8245 (David Allsopp, review by Sébastien Hinderer)
8246
8247 - #7554, #1751: Lambda.subst: also update debug event environments
8248 (Thomas Refis, review by Gabriel Scherer)
8249
8250 - #7238, #1825: in Unix.in_channel_of_descr and Unix.out_channel_of_descr,
8251 raise an error if the given file description is not suitable for
8252 character-oriented I/O, for example if it is a block device or a
8253 datagram socket.
8254 (Xavier Leroy, review by Jérémie Dimino and Perry E. Metzger)
8255
8256 - #7799, #1820: fix bug where Scanf.format_from_string could fail when
8257 the argument string contained characters that require escaping.
8258 (Gabriel Scherer and Nicolás Ojeda Bär, report by Guillaume Melquiond, review
8259 by Gabriel Scherer)
8260
8261 - #1843: ocamloptp was doing the wrong thing with option -inline-max-unroll.
8262 (Github user @poechsel, review by Nicolás Ojeda Bär).
8263
8264 - #1890: remove last use of Ctype.unroll_abbrev
8265 (Thomas Refis, report by Leo White, review by Jacques Garrigue)
8266
8267 - #1893: dev-branch only, warning 40(name not in scope) triggered spurious
8268 warnings 49(missing cmi) with -no-alias-deps.
8269 (Florian Angeletti, report by Valentin Gatien-Baron,
8270 review by Gabriel Scherer)
8271
8272 - #1912: Allow quoted strings, octal/unicode escape sequences and identifiers
8273 containing apostrophes in ocamllex actions and comments.
8274 (Pieter Goetschalckx, review by Damien Doligez)
8275
8276 - #7828, #1935: correct the conditions that generate warning 61,
8277 Unboxable_type_in_prim_decl
8278 (Stefan Muenzel)
8279
8280 - #1958: allow [module M(_:S) = struct end] syntax
8281 (Hugo Heuzard, review by Gabriel Scherer)
8282
8283 - #1970: fix order of floatting documentation comments in classes
8284 (Hugo Heuzard, review by Nicolás Ojeda Bär)
8285
8286 - #1977: [@@ocaml.warning "..."] attributes attached to type declarations are
8287 no longer ignored.
8288 (Nicolás Ojeda Bär, review by Gabriel Scherer)
8289
8290 - #7830, #1987: fix ocamldebug crash when printing a value in the scope of
8291 an `open` statement for which the `.cmi` is not available.
8292 (Nicolás Ojeda Bär, report by Jocelyn Sérot, review by Gabriel Scherer)
8293
8294 - #7854, #2062: fix an issue where the wrong locale may be used when using
8295 the legacy ANSI encoding under Windows.
8296 (Nicolás Ojeda Bär, report by Tiphaine Turpin)
8297
8298 - #2083: Fix excessively aggressive float unboxing and introduce similar fix
8299 as a preventative measure for boxed int unboxing.
8300 (Thomas Refis, Mark Shinwell, Leo White)
8301
8302 - #2130: fix printing of type variables with a quote in their name
8303 (Alain Frisch, review by Armaël Guéneau and Gabriel Scherer,
8304 report by Hugo Heuzard)
8305
8306 - #2131: fix wrong calls to Env.normalize_path on non-module paths
8307 (Alain Frisch, review by Jacques Garrigue)
8308
8309 - #2175: Apply substitution to all modules when packing
8310 (Leo White, review by Gabriel Scherer)
8311
8312 - #2220: Remove duplicate process management code in
8313 otherlibs/threads/unix.ml
8314 (Romain Beauxis, review by Gabriel Scherer and Alain Frisch)
8315
8316 - #2231: Env: always freshen persistent signatures before using them
8317 (Thomas Refis and Leo White, review by Gabriel Radanne)
8318
8319 - #7851, #8570: Module type of allows to transform a malformed
8320 module type into a vicious signature, breaking soundness
8321 (Jacques Garrigue, review by Leo White)
8322
8323 - #7923, #2259: fix regression in FlexDLL bootstrapped build caused by
8324 refactoring the root Makefile for Dune in #2093)
8325 (David Allsopp, report by Marc Lasson)
8326
8327 - #7929, #2261: Subst.signature: call cleanup_types exactly once
8328 (Thomas Refis, review by Gabriel Scherer and Jacques Garrigue,
8329 report by Daniel Bünzli and Jon Ludlam)
8330
8331 - #8550, #8552: Soundness issue with class generalization
8332 (Jacques Garrigue, review by Leo White and Thomas Refis,
8333 report by Jeremy Yallop)
8334
8335 OCaml 4.07.1 (4 October 2018)
8336 -----------------------------
8337
8338 ### Bug fixes:
8339
8340 - #7815, #1896: major GC crash with first-fit policy
8341 (Stephen Dolan and Damien Doligez, report by Joris Giovannangeli)
8342
8343 * #7818, #2051: Remove local aliases in functor argument types,
8344 to prevent the aliasing of their target.
8345 (Jacques Garrigue, report by mandrykin, review by Leo White)
8346
8347 - #7820, #1897: Fix Array.of_seq. This function used to apply a circular
8348 permutation of one cell to the right on the sequence.
8349 (Thierry Martinez, review by Nicolás Ojeda Bär)
8350
8351 - #7821, #1908: make sure that the compilation of extension
8352 constructors doesn't cause the compiler to load more cmi files
8353 (Jérémie Dimino, review by Gabriel Scherer)
8354
8355 - #7824, #1914: subtype_row: filter out absent fields when row is closed
8356 (Leo White and Thomas Refis, report by talex, review by Jacques Garrigue)
8357
8358 - #1915: rec_check.ml is too permissive for certain class declarations.
8359 (Alban Reynaud with Gabriel Scherer, review by Jeremy Yallop)
8360
8361 - #7833, #1946: typecore: only 1k existential per match, not 100k
8362 (Thomas Refis, report by Jerome Simeon, review by Jacques Garrigue)
8363
8364 - #7838: -principal causes assertion failure in type checker
8365 (Jacques Garrigue, report by Markus Mottl, review by Thomas Refis)
8366
8367 OCaml 4.07.0 (10 July 2018)
8368 ---------------------------
8369
8370 (Changes that can break existing programs are marked with a "*")
8371
8372 ### Language features:
8373
8374 - #6023, #1648: Allow type-based selection of GADT constructors.
8375 (Thomas Refis and Leo White, review by Jacques Garrigue and Gabriel Scherer)
8376
8377 - #1546: Allow empty variants.
8378 (Runhang Li, review by Gabriel Radanne and Jacques Garrigue)
8379
8380 ### Standard library:
8381
8382 - #4170, #1674: add the constant `Float.pi`.
8383 (Christophe Troestler, review by Damien Doligez)
8384
8385 - #6139, #1685: Move the Bigarray module to the standard library. Keep the
8386 bigarray library as on overlay adding the deprecated map_file functions.
8387 (Jérémie Dimino, review by Mark Shinwell)
8388
8389 - #7528, #1500: add a Format.pp_set_geometry function to avoid memory
8390 effects in set_margin and set_max_indent.
8391 (Florian Angeletti, review by Richard Bonichon, Gabriel Radanne,
8392 Gabriel Scherer and Pierre Weis)
8393
8394 - #7690, #1528: fix the float_of_string function for hexadecimal floats
8395 with very large values of the exponent.
8396 (Olivier Andrieu)
8397
8398 - #1002: add a new `Seq` module defining a list-of-thunks style iterator.
8399 Also add `{to,of}_seq` to several standard modules.
8400 (Simon Cruanes, review by Alain Frisch and François Bobot)
8401
8402 * #1010: pack all standard library modules into a single module Stdlib
8403 which is the default opened module (Stdlib itself includes Pervasives) to free
8404 up the global namespace for other standard libraries, while still allowing any
8405 OCaml standard library module to be referred to as Stdlib.Module). This is
8406 implemented efficiently using module aliases (prefixing all modules with
8407 Stdlib__, e.g. Stdlib__string).
8408 (Jérémie Dimino, David Allsopp and Florian Angeletti, review by David Allsopp
8409 and Gabriel Radanne)
8410
8411 - #1637: String.escaped is faster and does not allocate when called with a
8412 string that does not contain any characters needing to be escaped.
8413 (Alain Frisch, review by Xavier Leroy and Gabriel Scherer)
8414
8415 - #1638: add a Float module.
8416 (Nicolás Ojeda Bär, review by Alain Frisch and Jeremy Yallop)
8417
8418 - #1697: Tune [List.init] tailrec threshold so that it does not stack
8419 overflow when compiled with the Js_of_ocaml backend.
8420 (Hugo Heuzard, reviewed by Gabriel Scherer)
8421
8422 ### Other libraries:
8423
8424 - #7745, #1629: Graphics.open_graph displays the correct window title on
8425 Windows again (fault introduced by 4.06 Unicode changes).
8426 (David Allsopp)
8427
8428 * #1406: Unix.isatty now returns true in the native Windows ports when
8429 passed a file descriptor connected to a Cygwin PTY. In particular, compiler
8430 colors for the native Windows ports now work under Cygwin/MSYS2.
8431 (Nicolás Ojeda Bär, review by Gabriel Scherer, David Allsopp, Xavier Leroy)
8432
8433 - #1451: [getpwuid], [getgrgid], [getpwnam], [getgrnam] now raise Unix error
8434 instead of returning [Not_found] when interrupted by a signal.
8435 (Arseniy Alekseyev, review by Mark Shinwell and Xavier Leroy)
8436
8437 - #1477: raw_spacetime_lib can now be used in bytecode.
8438 (Nicolás Ojeda Bär, review by Mark Shinwell)
8439
8440 - #1533: (a) The implementation of Thread.yield for system thread
8441 now uses nanosleep(1) for enabling better preemption.
8442 (b) Thread.delay is now an alias for Unix.sleepf.
8443 (Jacques-Henri Jourdan, review by Xavier Leroy and David Allsopp)
8444
8445 ### Compiler user-interface and warnings:
8446
8447 - #7663, #1694: print the whole cycle and add a reference to the manual in
8448 the unsafe recursive module evaluation error message.
8449 (Florian Angeletti, report by Matej Košík, review by Gabriel Scherer)
8450
8451 - #1166: In OCAMLPARAM, an alternative separator can be specified as
8452 first character (instead of comma) in the set ":|; ,"
8453 (Fabrice Le Fessant)
8454
8455 - #1358: Fix usage warnings with no mli file.
8456 (Leo White, review by Alain Frisch)
8457
8458 - #1428: give a non dummy location for warning 49 (no cmi found).
8459 (Valentin Gatien-Baron)
8460
8461 - #1491: Improve error reporting for ill-typed applicative functor
8462 types, F(M).t.
8463 (Valentin Gatien-Baron, review by Florian Angeletti and Gabriel Radanne)
8464
8465 - #1496: Refactor the code printing explanation for unification type errors,
8466 in order to avoid duplicating pattern matches.
8467 (Armaël Guéneau, review by Florian Angeletti and Gabriel Scherer)
8468
8469 - #1505: Add specific error messages for unification errors involving
8470 functions of type "unit -> _".
8471 (Arthur Charguéraud and Armaël Guéneau, with help from Leo White, review by
8472 Florian Angeletti and Gabriel Radanne)
8473
8474 - #1510: Add specific explanation for unification errors caused by type
8475 constraints propagated by keywords (such as if, while, for...).
8476 (Armaël Guéneau and Gabriel Scherer, original design by Arthur Charguéraud,
8477 review by Frédéric Bour, Gabriel Radanne and Alain Frisch)
8478
8479 - #1515: honor the BUILD_PATH_PREFIX_MAP environment variable
8480 to enable reproducible builds.
8481 (Gabriel Scherer, with help from Ximin Luo, review by Damien Doligez)
8482
8483 - #1534: Extend the warning printed when (*) is used, adding a hint to
8484 suggest using ( * ) instead.
8485 (Armaël Guéneau, with help and review from Florian Angeletti and Gabriel
8486 Scherer)
8487
8488 - #1552, #1577: do not warn about ambiguous variables in guards
8489 (warning 57) when the ambiguous values have been filtered by
8490 a previous clause.
8491 (Gabriel Scherer and Thomas Refis, review by Luc Maranget)
8492
8493 - #1554: warnings 52 and 57: fix reference to manual detailed explanation.
8494 (Florian Angeletti, review by Thomas Refis and Gabriel Scherer)
8495
8496 - #1618: add the -dno-unique-ids and -dunique-ids compiler flags.
8497 (Sébastien Hinderer, review by Leo White and Damien Doligez)
8498
8499 - #1649: change compilation order of toplevel definitions, so that some
8500 warnings emitted by the bytecode compiler appear more in-order than before.
8501 (Luc Maranget, advice and review by Damien Doligez)
8502
8503 - #1806: add linscan to OCAMLPARAM options.
8504 (Raja Boujbel)
8505
8506 ### Code generation and optimizations:
8507
8508 - #7630, #1401: Faster compilation of large modules with Flambda.
8509 (Pierre Chambart, report by Emilio Jesús Gallego Arias,
8510 Pierre-Marie Pédrot and Paul Steckler, review by Gabriel Scherer
8511 and Leo White)
8512
8513 - #7630, #1455: Disable CSE for the initialization function.
8514 (Pierre Chambart, report by Emilio Jesús Gallego Arias,
8515 review by Gabriel Scherer and Xavier Leroy)
8516
8517 - #1370: Fix code duplication in Cmmgen.
8518 (Vincent Laviron, with help from Pierre Chambart,
8519 reviews by Gabriel Scherer and Luc Maranget)
8520
8521 - #1486: ARM 32-bit port: add support for ARMv8 in 32-bit mode,
8522 a.k.a. AArch32.
8523 For this platform, avoid ITE conditional instruction blocks and use
8524 simpler IT blocks instead.
8525 (Xavier Leroy, review by Mark Shinwell)
8526
8527 - #1487: Treat negated float comparisons more directly.
8528 (Leo White, review by Xavier Leroy)
8529
8530 - #1573: emitcode: merge events after instructions reordering.
8531 (Thomas Refis and Leo White, with help from David Allsopp, review by Frédéric
8532 Bour)
8533
8534 - #1606: Simplify the semantics of Lambda.free_variables and Lambda.subst,
8535 including some API changes in bytecomp/lambda.mli.
8536 (Pierre Chambart, review by Gabriel Scherer)
8537
8538 - #1613: ensure that set-of-closures are processed first so that other
8539 entries in the let-rec symbol do not get dummy approximations.
8540 (Leo White and Xavier Clerc, review by Pierre Chambart)
8541
8542 * #1617: Make string/bytes distinguishable in the bytecode.
8543 (Hugo Heuzard, reviewed by Nicolás Ojeda Bär)
8544
8545 - #1627: Reduce cmx sizes by sharing variable names (Flambda only).
8546 (Fu Yong Quah, Leo White, review by Xavier Clerc)
8547
8548 - #1665: reduce the size of cmx files in classic mode by dropping the
8549 bodies of functions that will not be inlined.
8550 (Fu Yong Quah, review by Leo White and Pierre Chambart)
8551
8552 - #1666: reduce the size of cmx files in classic mode by dropping the
8553 bodies of functions that cannot be reached from the module block.
8554 (Fu Yong Quah, review by Leo White and Pierre Chambart)
8555
8556 - #1686: Turn off by default flambda invariants checks.
8557 (Pierre Chambart)
8558
8559 - #1707: Add [Closure_origin.t] to trace inlined functions to prevent
8560 infinite loops from repeatedly inlining copies of the same function.
8561 (Fu Yong Quah)
8562
8563 - #1740: make sure startup.o is always linked in when using
8564 "-output-complete-obj". Previously, it was always linked in only on some
8565 platforms, making this option unusable on platforms where it wasn't.
8566 (Jérémie Dimino, review by Sébastien Hinderer and Xavier Leroy)
8567
8568 ### Runtime system:
8569
8570 - #515 #676 #7173: Add a public C API for weak arrays and
8571 ephemerons. Update the documentation for a 4.03 change: finalisation
8572 functions are now run before the erasure of the corresponding
8573 values.
8574 (François Bobot and Jacques-Henri Jourdan, review by Mark Shinwell,
8575 Damien Doligez and Frédéric Bour)
8576
8577 - #6411, #1535: don't compile everything with -static-libgcc on mingw32,
8578 only dllbigarray.dll and libbigarray.a. Allows the use of C++ libraries which
8579 raise exceptions.
8580 (David Allsopp)
8581
8582 - #7100, #1476: trigger a minor GC when custom blocks accumulate
8583 in minor heap.
8584 (Alain Frisch, report by talex, review by Damien Doligez, Leo White,
8585 Gabriel Scherer)
8586
8587 - #1431: remove ocamlrun dependencies on curses/terminfo/termcap C library.
8588 (Xavier Leroy, review by Daniel Bünzli)
8589
8590 - #1478: The Spacetime profiler now works under Windows (but it is not yet
8591 able to collect profiling information from C stubs).
8592 (Nicolás Ojeda Bär, review by Xavier Leroy, Mark Shinwell)
8593
8594 - #1483: fix GC freelist accounting for chunks larger than the maximum block
8595 size.
8596 (David Allsopp and Damien Doligez)
8597
8598 - #1526: install the debug and instrumented runtimes
8599 (lib{caml,asm}run{d,i}.a).
8600 (Gabriel Scherer, reminded by Julia Lawall)
8601
8602 - #1563: simplify implementation of LSRINT and ASRINT.
8603 (Max Mouratov, review by Frédéric Bour)
8604
8605 - #1644: remove caml_alloc_float_array from the bytecode primitives list
8606 (it's a native code primitive).
8607 (David Allsopp)
8608
8609 - #1701: fix missing root bug in #1476.
8610 (Mark Shinwell)
8611
8612 - #1752: do not alias function arguments to sigprocmask.
8613 (Anil Madhavapeddy)
8614
8615 - #1753: avoid potential off-by-one overflow in debugger socket path length.
8616 (Anil Madhavapeddy)
8617
8618 ### Tools:
8619
8620 - #7643, #1377: ocamldep, fix an exponential blowup in presence of nested
8621 structures and signatures, e.g. "include struct … include(struct … end) … end"
8622 (Florian Angeletti, review by Gabriel Scherer, report by Christophe Raffalli)
8623
8624 - #7687, #1653: deprecate -thread option,
8625 which is equivalent to -I +threads.
8626 (Nicolás Ojeda Bär, report by Daniel Bünzli)
8627
8628 - #7710: `ocamldep -sort` should exit with nonzero code in case of
8629 cyclic dependencies.
8630 (Xavier Leroy, report by Mantis user baileyparker)
8631
8632 - #1537: boot/ocamldep is no longer included in the source distribution;
8633 boot/ocamlc -depend can be used in its place.
8634 (Nicolás Ojeda Bär, review by Xavier Leroy and Damien Doligez)
8635
8636 - #1585: optimize output of "ocamllex -ml".
8637 (Alain Frisch, review by Frédéric Bour and Gabriel Scherer)
8638
8639 - #1667: add command-line options -no-prompt, -no-version, -no-time,
8640 -no-breakpoint-message and -topdirs-path to ocamldebug.
8641 (Sébastien Hinderer, review by Damien Doligez)
8642
8643 - #1695: add the -null-crc command-line option to ocamlobjinfo.
8644 (Sébastien Hinderer, review by David Allsopp and Gabriel Scherer)
8645
8646 - #1710: ocamldoc, improve the 'man' rendering of subscripts and
8647 superscripts.
8648 (Gabriel Scherer)
8649
8650 - #1771: ocamldebug, avoid out of bound access.
8651 (Thomas Refis)
8652
8653 ### Manual and documentation:
8654
8655 - #7613: minor rewording of the "refutation cases" paragraph.
8656 (Florian Angeletti, review by Jacques Garrigue)
8657
8658 - #7647, #1384: emphasize ocaml.org website and forum in README.
8659 (Yawar Amin, review by Gabriel Scherer)
8660
8661 - #7698, #1545: improve wording in OCaml manual in several places,
8662 mostly in Chapter 1. This addresses the easier changes suggested in the PR.
8663 (Jim Fehrle, review by Florian Angeletti and David Allsopp)
8664
8665 - #1540: manual, decouple verbatim and toplevel style in code examples.
8666 (Florian Angeletti, review by Gabriel Scherer)
8667
8668 - #1556: manual, add a consistency test for manual references inside
8669 the compiler source code.
8670 (Florian Angeletti, review by Gabriel Scherer)
8671
8672 - #1647: manual, subsection on record and variant disambiguation.
8673 (Florian Angeletti, review by Alain Frisch and Gabriel Scherer)
8674
8675 - #1702: manual, add a signature mode for code examples.
8676 (Florian Angeletti, review by Gabriel Scherer)
8677
8678 - #1741: manual, improve typesetting and legibility in HTML output.
8679 (steinuil, review by Gabriel Scherer)
8680
8681 - #1757: style the html manual, changing type and layout.
8682 (Charles Chamberlain, review by Florian Angeletti, Xavier Leroy,
8683 Gabriel Radanne, Perry E. Metzger, and Gabriel Scherer)
8684
8685 - #1765: manual, ellipsis in code examples.
8686 (Florian Angeletti, review and suggestion by Gabriel Scherer)
8687
8688 - #1767: change html manual to use relative font sizes.
8689 (Charles Chamberlain, review by Daniel Bünzli, Perry E. Metzger,
8690 Josh Berdine, and Gabriel Scherer)
8691
8692 - #1779: integrate the Bigarray documentation into the main manual.
8693 (Perry E. Metzger, review by Florian Angeletti and Xavier Clerc)
8694
8695 ### Type system:
8696
8697 - #7611, #1491: reject the use of generative functors as applicative.
8698 (Valentin Gatien-Baron)
8699
8700 - #7706, #1565: in recursive value declarations, track
8701 static size of locally-defined variables.
8702 (Gabriel Scherer, review by Jeremy Yallop and Leo White, report by Leo White)
8703
8704 - #7717, #1593: in recursive value declarations, don't treat
8705 unboxed constructor size as statically known.
8706 (Jeremy Yallop, report by Pierre Chambart, review by Gabriel Scherer)
8707
8708 - #7767, #1712: restore legacy treatment of partially-applied
8709 labeled functions in 'let rec' bindings.
8710 (Jeremy Yallop, report by Ivan Gotovchits, review by Gabriel Scherer)
8711
8712 * #7787, #1652, #1743: Don't remove module aliases in `module type of`
8713 and `with module`.
8714 The old behaviour can be obtained using the `[@remove_aliases]` attribute.
8715 (Leo White and Thomas Refis, review by Jacques Garrigue)
8716
8717 - #1468: Do not enrich type_decls with incoherent manifests.
8718 (Thomas Refis and Leo White, review by Jacques Garrigue)
8719
8720 - #1469: Use the information from [@@immediate] annotations when
8721 computing whether a type can be [@@unboxed].
8722 (Damien Doligez, report by Stephan Muenzel, review by Alain Frisch)
8723
8724 - #1513: Allow compilation units to shadow sub-modules of Pervasives.
8725 For instance users can now use a largeFile.ml file in their project.
8726 (Jérémie Dimino, review by Nicolás Ojeda Bär, Alain Frisch and Gabriel
8727 Radanne)
8728
8729 - #1516: Allow float array construction in recursive bindings
8730 when configured with -no-flat-float-array.
8731 (Jeremy Yallop, report by Gabriel Scherer)
8732
8733 - #1583: propagate refined ty_arg to Parmatch checks.
8734 (Thomas Refis, review by Jacques Garrigue)
8735
8736 - #1609: Changes to ambivalence scope tracking.
8737 (Thomas Refis and Leo White, review by Jacques Garrigue)
8738
8739 - #1628: Treat reraise and raise_notrace as nonexpansive.
8740 (Leo White, review by Alain Frisch)
8741
8742 * #1778: Fix Soundness bug with non-generalized type variable and
8743 local modules. This is the same bug as #7414, but using local
8744 modules instead of non-local ones.
8745 (Leo White, review by Jacques Garrigue)
8746
8747 ### Compiler distribution build system:
8748
8749 - #5219, #1680, #1877: use 'install' instead of 'cp'
8750 in install scripts.
8751 (Gabriel Scherer, review by Sébastien Hinderer and Valentin Gatien-Baron)
8752
8753 - #7679: make sure .a files are erased before calling ar rc, otherwise
8754 leftover .a files from an earlier compilation may contain unwanted modules.
8755 (Xavier Leroy)
8756
8757 - #1571: do not perform architecture tests on 32-bit platforms, allowing
8758 64-bit back-ends to use 64-bit specific constructs.
8759 (Xavier Clerc, review by Damien Doligez)
8760
8761 ### Internal/compiler-libs changes:
8762
8763 - #7738, #1624: Asmlink.reset also resets lib_ccobjs/ccopts.
8764 (Cedric Cellier, review by Gabriel Scherer)
8765
8766 - #1488, #1560: Refreshing parmatch.
8767 (Gabriel Scherer and Thomas Refis, review by Luc Maranget)
8768
8769 - #1502: more command line options for expect tests.
8770 (Florian Angeletti, review by Gabriel Scherer)
8771
8772 - #1511: show code at error location in expect-style tests,
8773 using new Location.show_code_at_location function.
8774 (Gabriel Scherer and Armaël Guéneau,
8775 review by Valentin Gatien-Baron and Damien Doligez)
8776
8777 - #1519, #1532, #1570: migrate tests to ocamltest.
8778 (Sébastien Hinderer, review by Gabriel Scherer, Valentin Gatien-Baron
8779 and Nicolás Ojeda Bär)
8780
8781 - #1520: more robust implementation of Misc.no_overflow_mul.
8782 (Max Mouratov, review by Xavier Leroy)
8783
8784 - #1557: Organise and simplify translation of primitives.
8785 (Leo White, review by François Bobot and Nicolás Ojeda Bär)
8786
8787 - #1567: register all idents relevant for reraise.
8788 (Thomas Refis, review by Alain Frisch and Frédéric Bour)
8789
8790 - #1586: testsuite: 'make promote' for ocamltest tests.
8791 (The new "-promote" option for ocamltest is experimental
8792 and subject to change/removal).
8793 (Gabriel Scherer)
8794
8795 - #1619: expect_test: print all the exceptions, even the unexpected ones.
8796 (Thomas Refis, review by Jérémie Dimino)
8797
8798 - #1621: expect_test: make sure to not use the installed stdlib.
8799 (Jérémie Dimino, review by Thomas Refis)
8800
8801 - #1646: add ocamldoc test to ocamltest and
8802 migrate ocamldoc tests to ocamltest.
8803 (Florian Angeletti, review by Sébastien Hinderer)
8804
8805 - #1663: refactor flambda specialise/inlining handling.
8806 (Leo White and Xavier Clerc, review by Pierre Chambart)
8807
8808 - #1679: remove Pbittest from primitives in lambda.
8809 (Hugo Heuzard, review by Mark Shinwell)
8810
8811 * #1704: Make Ident.t abstract and immutable.
8812 (Gabriel Radanne, review by Mark Shinwell)
8813
8814 - #1699: Clean up Maps and Sets throughout the compiler.
8815 Remove the Tbl module in favor of dedicated Maps.
8816 (Gabriel Radanne, review by Mark Shinwell)
8817
8818 ### Bug fixes:
8819
8820 - #4499, #1479: Use native Windows API to implement Sys.getenv,
8821 Unix.getenv and Unix.environment under Windows.
8822 (Nicolás Ojeda Bär, report by Alain Frisch, review by David Allsopp, Xavier
8823 Leroy)
8824
8825 - #5250, #1435: on Cygwin, when ocamlrun searches the path
8826 for a bytecode executable file, skip directories and other
8827 non-regular files, like other Unix variants do.
8828 (Xavier Leroy)
8829
8830 - #6394, #1425: fix fatal_error from Parmatch.get_type_path.
8831 (Virgile Prevosto, review by David Allsopp, Thomas Refis and Jacques Garrigue)
8832
8833 * #6604, #931: Only allow directives with filename and at the beginning of
8834 the line.
8835 (Tadeu Zagallo, report by Roberto Di Cosmo,
8836 review by Hongbo Zhang, David Allsopp, Gabriel Scherer, Xavier Leroy)
8837
8838 - #7138, #7701, #1693: Keep documentation comments
8839 even in empty structures and signatures.
8840 (Leo White, Florian Angeletti, report by Anton Bachin)
8841
8842 - #7178, #7253, #7796, #1790: Make sure a function
8843 registered with "at_exit" is executed only once when the program exits.
8844 (Nicolás Ojeda Bär and Xavier Leroy, review by Max Mouratov)
8845
8846 - #7391, #1620: Do not put a dummy method in object types.
8847 (Thomas Refis, review by Jacques Garrigue)
8848
8849 - #7660, #1445: Use native Windows API to implement Unix.utimes in order to
8850 avoid unintended shifts of the argument timestamp depending on DST setting.
8851 (Nicolás Ojeda Bär, review by David Allsopp, Xavier Leroy)
8852
8853 - #7668: -principal is broken with polymorphic variants.
8854 (Jacques Garrigue, report by Jun Furuse)
8855
8856 - #7680, #1497: Incorrect interaction between Matching.for_let and
8857 Simplif.simplify_exits.
8858 (Alain Frisch, report and review by Vincent Laviron)
8859
8860 - #7682, #1495: fix [@@unboxed] for records with 1 polymorphic field.
8861 (Alain Frisch, report by Stéphane Graham-Lengrand, review by Gabriel Scherer)
8862
8863 - #7695, #1541: Fatal error: exception Ctype.Unify(_) with field override
8864 (Jacques Garrigue, report by Nicolás Ojeda Bär)
8865
8866 - #7704, #1564: use proper variant tag in non-exhaustiveness warning.
8867 (Jacques Garrigue, report by Thomas Refis)
8868
8869 - #7711, #1581: Internal typechecker error triggered by a constraint on
8870 self type in a class type.
8871 (Jacques Garrigue, report and review by Florian Angeletti)
8872
8873 - #7712, #1576: assertion failure with type abbreviations.
8874 (Thomas Refis, report by Michael O'Connor, review by Jacques Garrigue)
8875
8876 - #7747: Type checker can loop infinitely and consume all computer memory.
8877 (Jacques Garrigue, report by kantian)
8878
8879 - #7751, #1657: The toplevel prints some concrete types as abstract.
8880 (Jacques Garrigue, report by Matej Košík)
8881
8882 - #7765, #1718: When unmarshaling bigarrays, protect against integer
8883 overflows in size computations.
8884 (Xavier Leroy, report by Maximilian Tschirschnitz,
8885 review by Gabriel Scherer)
8886
8887 - #7760, #1713: Exact selection of lexing engine, that is
8888 correct "Segfault in ocamllex-generated code using 'shortest'".
8889 (Luc Maranget, Frédéric Bour, report by Stephen Dolan,
8890 review by Gabriel Scherer)
8891
8892 - #7769, #1714: calls to Stream.junk could, under some conditions, be
8893 ignored when used on streams based on input channels.
8894 (Nicolás Ojeda Bär, report by Michael Perin, review by Gabriel Scherer)
8895
8896 - #7793, #1766: the toplevel #use directive now accepts sequences of ';;'
8897 tokens. This fixes a bug in which certain files accepted by the compiler were
8898 rejected by ocamldep.
8899 (Nicolás Ojeda Bär, report by Hugo Heuzard, review by Hugo Heuzard)
8900
8901 - #1517: More robust handling of type variables in mcomp.
8902 (Leo White and Thomas Refis, review by Jacques Garrigue)
8903
8904 - #1530, #1574: testsuite, fix 'make parallel' and 'make one DIR=...'
8905 to work on ocamltest-based tests.
8906 (Runhang Li and Sébastien Hinderer, review by Gabriel Scherer)
8907
8908 - #1550, #1555: Make pattern matching warnings more robust
8909 to ill-typed columns.
8910 (Thomas Refis, with help from Gabriel Scherer and Luc Maranget)
8911
8912 - #1614: consider all bound variables when inlining, fixing a compiler
8913 fatal error.
8914 (Xavier Clerc, review by Pierre Chambart, Leo White)
8915
8916 - #1622: fix bug in the expansion of command-line arguments under Windows
8917 which could result in some elements of Sys.argv being truncated in some cases.
8918 (Nicolás Ojeda Bär, review by Sébastien Hinderer)
8919
8920 - #1623: Segfault on Windows 64 bits when expanding wildcards in arguments.
8921 (Marc Lasson, review by David Allsopp, Alain Frisch, Sébastien Hinderer,
8922 Xavier Leroy, Nicolás Ojeda Bär)
8923
8924 - #1661: more precise principality warning regarding record fields
8925 disambiguation.
8926 (Thomas Refis, review by Leo White)
8927
8928 - #1687: fix bug in the printing of short functor types "(S1 -> S2) -> S3".
8929 (Pieter Goetschalckx, review by Gabriel Scherer)
8930
8931 - #1722: Scrape types in Typeopt.maybe_pointer.
8932 (Leo White, review by Thomas Refis)
8933
8934 - #1755: ensure that a bigarray is never collected while reading complex
8935 values.
8936 (Xavier Clerc, Mark Shinwell and Leo White, report by Chris Hardin,
8937 reviews by Stephen Dolan and Xavier Leroy)
8938
8939 - #1764: in byterun/memory.c, struct pool_block, use C99 flexible arrays
8940 if available.
8941 (Xavier Leroy, review by Max Mouratov)
8942
8943 - #1774: ocamlopt for ARM could generate VFP loads and stores with bad
8944 offsets, rejected by the assembler.
8945 (Xavier Leroy, review by Mark Shinwell)
8946
8947 - #1808: handle `[@inlined]` attributes under a module constraint.
8948 (Xavier Clerc, review by Leo White)
8949
8950 - #1810: use bit-pattern comparison when meeting float approximations.
8951 (Xavier Clerc, report by Christophe Troestler, review by Nicolás Ojeda Bär
8952 and Gabriel Scherer)
8953
8954 - #1835: Fix off-by-one errors in Weak.get_copy and Weak.blit.
8955 (KC Sivaramakrishnan)
8956
8957 - #1849: bug in runtime function generic_final_minor_update()
8958 that could lead to crashes when Gc.finalise_last is used.
8959 (report and fix by Yuriy Vostrikov, review by François Bobot)
8960
8961
8962 OCaml 4.06.1 (16 Feb 2018):
8963 ---------------------------
8964
8965 ### Bug fixes:
8966
8967 - #7661, #1459: fix faulty compilation of patterns
8968 using extensible variants constructors
8969 (Luc Maranget, review by Thomas Refis and Gabriel Scherer, report
8970 by Abdelraouf Ouadjaout and Thibault Suzanne)
8971
8972 - #7702, #1553: refresh raise counts when inlining a function
8973 (Vincent Laviron, Xavier Clerc, report by Cheng Sun)
8974
8975 - #7704, #1559: Soundness issue with private rows and pattern-matching
8976 (Jacques Garrigue, report by Jeremy Yallop, review by Thomas Refis)
8977
8978 - #7705, #1558: add missing bounds check in Bigarray.Genarray.nth_dim.
8979 (Nicolás Ojeda Bär, report by Jeremy Yallop, review by Gabriel Scherer)
8980
8981 - #7713, #1587: Make pattern matching warnings more robust
8982 to ill-typed columns; this is a backport of #1550 from 4.07+dev
8983 (Thomas Refis, review by Gabriel Scherer, report by Andreas Hauptmann)
8984
8985 - #1470: Don't commute negation with float comparison
8986 (Leo White, review by Xavier Leroy)
8987
8988 - #1538: Make pattern matching compilation more robust to ill-typed columns
8989 (Gabriel Scherer and Thomas Refis, review by Luc Maranget)
8990
8991 OCaml 4.06.0 (3 Nov 2017):
8992 --------------------------
8993
8994 (Changes that can break existing programs are marked with a "*")
8995
8996 ### Language features:
8997
8998 - #6271, #7529, #1249: Support "let open M in ..."
8999 in class expressions and class type expressions.
9000 (Alain Frisch, reviews by Thomas Refis and Jacques Garrigue)
9001
9002 - #792: fix limitations of destructive substitutions, by
9003 allowing "S with type t := type-expr",
9004 "S with type M.t := type-expr", "S with module M.N := path"
9005 (Valentin Gatien-Baron, review by Jacques Garrigue and Leo White)
9006
9007 * #1064, #1392: extended indexing operators, add a new class of
9008 user-defined indexing operators, obtained by adding at least
9009 one operator character after the dot symbol to the standard indexing
9010 operators: e,g ".%()", ".?[]", ".@{}<-":
9011 let ( .%() ) = List.nth in [0; 1; 2].%(1)
9012 After this change, functions or methods with an explicit polymorphic type
9013 annotation and of which the first argument is optional now requires a space
9014 between the dot and the question mark,
9015 e.g. "<f:'a.?opt:int->unit>" must now be written "<f:'a. ?opt:int->unit>".
9016 (Florian Angeletti, review by Damien Doligez and Gabriel Radanne)
9017
9018 - #1118: Support inherited field in object type expression
9019 type t = < m : int >
9020 type u = < n : int; t; k : int >
9021 (Runhang Li, review by Jeremy Yallop, Leo White, Jacques Garrigue,
9022 and Florian Angeletti)
9023
9024 * #1232: Support Unicode character escape sequences in string
9025 literals via the \u{X+} syntax. These escapes are substituted by the
9026 UTF-8 encoding of the Unicode character.
9027 (Daniel Bünzli, review by Damien Doligez, Alain Frisch, Xavier
9028 Leroy and Leo White)
9029
9030 - #1247: M.(::) construction for expressions
9031 and patterns (plus fix printing of (::) in the toplevel)
9032 (Florian Angeletti, review by Alain Frisch, Gabriel Scherer)
9033
9034 * #1252: The default mode is now safe-string, can be overridden
9035 at configure time or at compile time.
9036 (See #1386 below for the configure-time options)
9037 This breaks the code that uses the 'string' type as mutable
9038 strings (instead of Bytes.t, introduced by 4.02 in 2014).
9039 (Damien Doligez)
9040
9041 * #1253: Private extensible variants
9042 This change breaks code relying on the undocumented ability to export
9043 extension constructors for abstract type in signature. Briefly,
9044 module type S = sig
9045 type t
9046 type t += A
9047 end
9048 must now be written
9049 module type S = sig
9050 type t = private ..
9051 type t += A
9052 end
9053 (Leo White, review by Alain Frisch)
9054
9055 - #1333: turn off warning 40 by default
9056 (Constructor or label name used out of scope)
9057 (Leo White)
9058
9059 - #1348: accept anonymous type parameters in `with` constraints:
9060 S with type _ t = int
9061 (Valentin Gatien-Baron, report by Jeremy Yallop)
9062
9063 ### Type system
9064
9065 - #2642, #1225: unique names for weak type variables
9066 # ref [];;
9067 - : '_weak1 list ref = {contents = []}
9068 (Florian Angeletti, review by Frédéric Bour, Jacques Garrigue,
9069 Gabriel Radanne and Gabriel Scherer)
9070
9071 * #6738, #7215, #7231, #556: Add a new check that 'let rec'
9072 bindings are well formed.
9073 (Jeremy Yallop, reviews by Stephen Dolan, Gabriel Scherer, Leo
9074 White, and Damien Doligez)
9075
9076 - #1142: Mark assertions nonexpansive, so that 'assert false'
9077 can be used as a placeholder for a polymorphic function.
9078 (Stephen Dolan)
9079
9080 ### Standard library:
9081
9082 - #8223, #7309, #1026: Add update to maps. Allows to update a
9083 binding in a map or create a new binding if the key had no binding
9084 val update: key -> ('a option -> 'a option) -> 'a t -> 'a t
9085 (Sébastien Briais, review by Daniel Bünzli, Alain Frisch and
9086 Gabriel Scherer)
9087
9088 - #7515, #1147: Arg.align now optionally uses the tab character '\t' to
9089 separate the "unaligned" and "aligned" parts of the documentation string. If
9090 tab is not present, then space is used as a fallback. Allows to have spaces in
9091 the unaligned part, which is useful for Tuple options.
9092 (Nicolás Ojeda Bär, review by Alain Frisch and Gabriel Scherer)
9093
9094 * #615: Format, add symbolic formatters that output symbolic
9095 pretty-printing items. New fields have been added to the
9096 formatter_out_functions record, thus this change will break any code building
9097 such record from scratch.
9098 When building Format.formatter_out_functions values redefining the out_spaces
9099 field, "{ fmt_out_funs with out_spaces = f; }" should be replaced by
9100 "{ fmt_out_funs with out_spaces = f; out_indent = f; }" to maintain the old
9101 behavior.
9102 (Richard Bonichon and Pierre Weis, review by Alain Frisch, original request by
9103 Spiros Eliopoulos in #506)
9104
9105 * #943: Fixed the divergence of the Pervasives module between the stdlib
9106 and threads implementations. In rare circumstances this can change the
9107 behavior of existing applications: the implementation of Pervasives.close_out
9108 used when compiling with thread support was inconsistent with the manual.
9109 It will now not suppress exceptions escaping Pervasives.flush anymore.
9110 Developers who want the old behavior should use Pervasives.close_out_noerr
9111 instead. The stdlib implementation, used by applications not compiled
9112 with thread support, will now only suppress Sys_error exceptions in
9113 Pervasives.flush_all. This should allow exceedingly unlikely assertion
9114 exceptions to escape, which could help reveal bugs in the standard library.
9115 (Markus Mottl, review by Hezekiah M. Carty, Jérémie Dimino, Damien Doligez,
9116 Alain Frisch, Xavier Leroy, Gabriel Scherer and Mark Shinwell)
9117
9118 - #1034: List.init : int -> (int -> 'a) -> 'a list
9119 (Richard Degenne, review by David Allsopp, Thomas Braibant, Florian
9120 Angeletti, Gabriel Scherer, Nathan Moreau, Alain Frisch)
9121
9122 - #1091 Add the Uchar.{bom,rep} constants.
9123 (Daniel Bünzli, Alain Frisch)
9124
9125 - #1091: Add Buffer.add_utf_{8,16le,16be}_uchar to encode Uchar.t
9126 values to the corresponding UTF-X transformation formats in Buffer.t
9127 values.
9128 (Daniel Bünzli, review by Damien Doligez, Max Mouratov)
9129
9130 - #1175: Bigarray, add a change_layout function to each Array[N]
9131 submodules.
9132 (Florian Angeletti)
9133
9134 * #1306: In the MSVC and Mingw ports, "Sys.rename src dst" no longer fails if
9135 file "dst" exists, but replaces it with file "src", like in the other ports.
9136 (Xavier Leroy)
9137
9138 - #1314: Format, use the optional width information
9139 when formatting a boolean: "%8B", "%-8B" for example
9140 (Xavier Clerc, review by Gabriel Scherer)
9141
9142 - c9cc0f25138ce58e4f4e68c4219afe33e2a9d034: Resurrect tabulation boxes
9143 in module Format. Rewrite/extend documentation of tabulation boxes.
9144 (Pierre Weis)
9145
9146 ### Other libraries:
9147
9148 - #7564, #1211: Allow forward slashes in the target of symbolic links
9149 created by Unix.symlink under Windows.
9150 (Nicolás Ojeda Bär, review by David Allsopp)
9151
9152 * #7640, #1414: reimplementation of Unix.execvpe to fix issues
9153 with the 4.05 implementation. The main issue is that the current
9154 directory was always searched (last), even if the current directory
9155 is not listed in the PATH.
9156 (Xavier Leroy, report by Louis Gesbert and Arseniy Alekseyev,
9157 review by Ivan Gotovchits)
9158
9159 - #997, #1077: Deprecate Bigarray.*.map_file and add Unix.map_file as a
9160 first step towards moving Bigarray to the stdlib
9161 (Jérémie Dimino and Xavier Leroy)
9162
9163 * #1178: remove the Num library for arbitrary-precision arithmetic.
9164 It now lives as a separate project https://github.com/ocaml/num
9165 with an OPAM package called "num".
9166 (Xavier Leroy)
9167
9168 - #1217: Restrict Unix.environment in privileged contexts; add
9169 Unix.unsafe_environment.
9170 (Jeremy Yallop, review by Mark Shinwell, Nicolás Ojeda Bär,
9171 Damien Doligez and Hannes Mehnert)
9172
9173 - #1321: Reimplement Unix.isatty on Windows. It no longer returns true for
9174 the null device.
9175 (David Allsopp)
9176
9177 ### Compiler user-interface and warnings:
9178
9179 - #7361, #1248: support "ocaml.warning" in all attribute contexts, and
9180 arrange so that "ocaml.ppwarning" is correctly scoped by surrounding
9181 "ocaml.warning" attributes
9182 (Alain Frisch, review by Florian Angeletti and Thomas Refis)
9183
9184 - #7444, #1138: trigger deprecation warning when a "deprecated"
9185 attribute is hidden by signature coercion
9186 (Alain Frisch, report by bmillwood, review by Leo White)
9187
9188 - #7472: ensure .cmi files are created atomically,
9189 to avoid corruption of .cmi files produced simultaneously by a run
9190 of ocamlc and a run of ocamlopt.
9191 (Xavier Leroy, from a suggestion by Gerd Stolpmann)
9192
9193 * #7514, #1152: add -dprofile option, similar to -dtimings but
9194 also displays memory allocation and consumption.
9195 The corresponding addition of a new compiler-internal
9196 Profile module may affect some users of
9197 compilers-libs/ocamlcommon (by creating module conflicts).
9198 (Valentin Gatien-Baron, report by Gabriel Scherer)
9199
9200 - #7620, #1317: Typecore.force_delayed_checks does not run with -i option
9201 (Jacques Garrigue, report by Jun Furuse)
9202
9203 - #7624: handle warning attributes placed on let bindings
9204 (Xavier Clerc, report by dinosaure, review by Alain Frisch)
9205
9206 - #896: "-compat-32" is now taken into account when building .cmo/.cma
9207 (Hugo Heuzard)
9208
9209 - #948: the compiler now reports warnings-as-errors by prefixing
9210 them with "Error (warning ..):", instead of "Warning ..:" and
9211 a trailing "Error: Some fatal warnings were triggered" message.
9212 (Valentin Gatien-Baron, review by Alain Frisch)
9213
9214 - #1032: display the output of -dtimings as a hierarchy
9215 (Valentin Gatien-Baron, review by Gabriel Scherer)
9216
9217 - #1114, #1393, #1429: refine the (ocamlc -config) information
9218 on C compilers: the variables `{bytecode,native}_c_compiler` are deprecated
9219 (the distinction is now mostly meaningless) in favor of a single
9220 `c_compiler` variable combined with `ocaml{c,opt}_cflags`
9221 and `ocaml{c,opt}_cppflags`.
9222 (Sébastien Hinderer, Jeremy Yallop, Gabriel Scherer, review by
9223 Adrien Nader and David Allsopp)
9224
9225 * #1189: allow MSVC ports to use -l option in ocamlmklib
9226 (David Allsopp)
9227
9228 - #1332: fix ocamlc handling of "-output-complete-obj"
9229 (François Bobot)
9230
9231 - #1336: -thread and -vmthread option information is propagated to
9232 PPX rewriters.
9233 (Jun Furuse, review by Alain Frisch)
9234
9235 ### Code generation and optimizations:
9236
9237 - #5324, #375: An alternative Linear Scan register allocator for
9238 ocamlopt, activated with the -linscan command-line flag. This
9239 allocator represents a trade-off between worse generated code
9240 performance for higher compilation speed (especially interesting in
9241 some cases graph coloring is necessarily quadratic).
9242 (Marcell Fischbach and Benedikt Meurer, adapted by Nicolás Ojeda Bär, review
9243 by Nicolás Ojeda Bär and Alain Frisch)
9244
9245 - #6927, #988: On macOS, when compiling bytecode stubs, plugins,
9246 and shared libraries through -output-obj, generate dylibs instead of
9247 bundles.
9248 (whitequark)
9249
9250 - #7447, #995: incorrect code generation for nested recursive bindings
9251 (Leo White and Jeremy Yallop, report by Stephen Dolan)
9252
9253 - #7501, #1089: Consider arrays of length zero as constants
9254 when using Flambda.
9255 (Pierre Chambart, review by Mark Shinwell and Leo White)
9256
9257 - #7531, #1162: Erroneous code transformation at partial applications
9258 (Mark Shinwell)
9259
9260 - #7614, #1313: Ensure that inlining does not depend on the order
9261 of symbols (flambda)
9262 (Leo White, Xavier Clerc, report by Alex, review by Gabriel Scherer
9263 and Pierre Chambart)
9264
9265 - #7616, #1339: don't warn on mutation of zero size blocks.
9266 (Leo White)
9267
9268 - #7631, #1355: "-linscan" option crashes ocamlopt
9269 (Xavier Clerc, report by Paul Steckler)
9270
9271 - #7642, #1411: ARM port: wrong register allocation for integer
9272 multiply on ARMv4 and ARMv5; possible wrong register allocation for
9273 floating-point multiply and add on VFP and for floating-point
9274 negation and absolute value on soft FP emulation.
9275 (Xavier Leroy, report by Stéphane Glondu and Ximin Luo,
9276 review and additional sightings by Mark Shinwell)
9277
9278 * #659: Remove support for SPARC native code generation
9279 (Mark Shinwell)
9280
9281 - #850: Optimize away some physical equality
9282 (Pierre Chambart, review by Mark Shinwell and Leo White)
9283
9284 - #856: Register availability analysis
9285 (Mark Shinwell, Thomas Refis, review by Pierre Chambart)
9286
9287 - #1143: tweaked several allocation functions in the runtime by
9288 checking for likely conditions before unlikely ones and eliminating
9289 some redundant checks.
9290 (Markus Mottl, review by Alain Frisch, Xavier Leroy, Gabriel Scherer,
9291 Mark Shinwell and Leo White)
9292
9293 - #1183: compile curried functors to multi-argument functions
9294 earlier in the compiler pipeline; correctly propagate [@@inline]
9295 attributes on such functors; mark functor coercion veneers as
9296 stubs.
9297 (Mark Shinwell, review by Pierre Chambart and Leo White)
9298
9299 - #1195: Merge functions based on partiality rather than
9300 Parmatch.irrefutable.
9301 (Leo White, review by Thomas Refis, Alain Frisch and Gabriel Scherer)
9302
9303 - #1215: Improve compilation of short-circuit operators
9304 (Leo White, review by Frédéric Bour and Mark Shinwell)
9305
9306 - #1250: illegal ARM64 assembly code generated for large combined allocations
9307 (report and initial fix by Steve Walk, review and final fix by Xavier Leroy)
9308
9309 - #1271: Don't generate Ialloc instructions for closures that exceed
9310 Max_young_wosize; instead allocate them on the major heap. (Related
9311 to #1250.)
9312 (Mark Shinwell)
9313
9314 - #1294: Add a configure-time option to remove the dynamic float array
9315 optimization and add a floatarray type to let the user choose when to
9316 flatten float arrays. Note that float-only records are unchanged: they
9317 are still optimized by unboxing their fields.
9318 (Damien Doligez, review by Alain Frisch and Mark Shinwell)
9319
9320 - #1304: Mark registers clobbered by PLT stubs as destroyed across
9321 allocations.
9322 (Mark Shinwell, Xavier Clerc, report and initial debugging by
9323 Valentin Gatien-Baron)
9324
9325 - #1323: make sure that frame tables are generated in the data
9326 section and not in the read-only data section, as was the case
9327 before in the PPC and System-Z ports. This avoids relocations in
9328 the text segment of shared libraries and position-independent
9329 executables generated by ocamlopt.
9330 (Xavier Leroy, review by Mark Shinwell)
9331
9332 - #1330: when generating dynamically-linkable code on AArch64, always
9333 reference symbols (even locally-defined ones) through the GOT.
9334 (Mark Shinwell, review by Xavier Leroy)
9335
9336 ### Tools:
9337
9338 - #8395, #973: tools/check-symbol-names checks for globally
9339 linked names not namespaced with caml_
9340 (Stephen Dolan)
9341
9342 - #6928, #1103: ocamldoc, do not introduce an empty <h1> in index.html
9343 when no -title has been provided
9344 (Pierre Boutillier)
9345
9346 - #7048: ocamldoc, in -latex mode, don't escape Latin-1 accented letters
9347 (Xavier Leroy, report by Hugo Herbelin)
9348
9349 * #7351: ocamldoc, use semantic tags rather than <br> tags in the html
9350 backend
9351 (Florian Angeletti, request and review by Daniel Bünzli )
9352
9353 * #7352, #7353: ocamldoc, better paragraphs in html output
9354 (Florian Angeletti, request by Daniel Bünzli)
9355
9356 * #7363, #830: ocamldoc, start heading levels at {1 not {2 or {6.
9357 This change modifies the mapping between ocamldoc heading level and
9358 html heading level, breaking custom css style for ocamldoc.
9359 (Florian Angeletti, request and review by Daniel Bünzli)
9360
9361 * #7478, #1037: ocamldoc, do not use as a module preamble documentation
9362 comments that occur after the first module element. This change may break
9363 existing documentation. In particular, module preambles must now come before
9364 any `open` statement.
9365 (Florian Angeletti, review by David Allsopp and report by Daniel Bünzli)
9366
9367 - #7521, #1159: ocamldoc, end generated latex file with a new line
9368 (Florian Angeletti)
9369
9370 - #7575, #1219: Switch compilers from -no-keep-locs
9371 to -keep-locs by default: produced .cmi files will contain locations.
9372 This provides better error messages. Note that, as a consequence,
9373 .cmi digests now depend on the file path as given to the compiler.
9374 (Daniel Bünzli)
9375
9376 - #7610, #1346: caml.el (the Emacs editing mode) was cleaned up
9377 and made compatible with Emacs 25.
9378 (Stefan Monnier, Christophe Troestler)
9379
9380 - #7635, #1383: ocamldoc, add an identifier to module
9381 and module type elements
9382 (Florian Angeletti, review by Yawar Amin and Gabriel Scherer)
9383
9384 - #681, #1426: Introduce ocamltest, a new test driver for the
9385 OCaml compiler testsuite
9386 (Sébastien Hinderer, review by Damien Doligez)
9387
9388 - #1012: ocamlyacc, fix parsing of raw strings and nested comments, as well
9389 as the handling of ' characters in identifiers.
9390 (Demi Marie Obenour)
9391
9392 - #1045: ocamldep, add a "-shared" option to generate dependencies
9393 for native plugin files (i.e. .cmxs files)
9394 (Florian Angeletti, suggestion by Sébastien Hinderer)
9395
9396 - #1078: add a subcommand "-depend" to "ocamlc" and "ocamlopt",
9397 to behave as ocamldep. Should be used mostly to replace "ocamldep" in the
9398 "boot" directory to reduce its size in the future.
9399 (Fabrice Le Fessant)
9400
9401 - #1036: ocamlcmt (tools/read_cmt) is installed, converts .cmt to .annot
9402 (Fabrice Le Fessant)
9403
9404 - #1180: Add support for recording numbers of direct and indirect
9405 calls over the lifetime of a program when using Spacetime profiling
9406 (Mark Shinwell)
9407
9408 - #1457, ocamldoc: restore label for exception in the latex backend
9409 (omitted since 4.04.0)
9410 (Florian Angeletti, review by Gabriel Scherer)
9411
9412 ### Toplevel:
9413
9414 - #7570: remove unusable -plugin option from the toplevel
9415 (Florian Angeletti)
9416
9417 - #1041: -nostdlib no longer ignored by toplevel.
9418 (David Allsopp, review by Xavier Leroy)
9419
9420 - #1231: improved printing of unicode texts in the toplevel,
9421 unless OCAMLTOP_UTF_8 is set to false.
9422 (Florian Angeletti, review by Daniel Bünzli, Xavier Leroy and
9423 Gabriel Scherer)
9424
9425 - #1688: Fix printing of -0.
9426 (Nicolás Ojeda Bär, review by Jérémie Dimino)
9427
9428 ### Runtime system:
9429
9430 * #3771, #153, #1200, #1357, #1362, #1363, #1369, #1398,
9431 #1446, #1448: Unicode support for the Windows runtime.
9432 (ygrek, Nicolás Ojeda Bär, review by Alain Frisch, David Allsopp, Damien
9433 Doligez)
9434
9435 * #7594, #1274, #1368: String_val now returns 'const char*', not
9436 'char*' when -safe-string is enabled at configure time. New macro Bytes_val
9437 for accessing bytes values.
9438 (Jeremy Yallop, reviews by Mark Shinwell and Xavier Leroy)
9439
9440 - #71: The runtime can now be shut down gracefully by means of the new
9441 caml_shutdown and caml_startup_pooled functions. The new 'c' flag in
9442 OCAMLRUNPARAM enables shutting the runtime properly on process exit.
9443 (Max Mouratov, review and discussion by Damien Doligez, Gabriel Scherer,
9444 Mark Shinwell, Thomas Braibant, Stephen Dolan, Pierre Chambart,
9445 François Bobot, Jacques Garrigue, David Allsopp, and Alain Frisch)
9446
9447 - #938, #1170, #1289: Stack overflow detection on 64-bit Windows
9448 (Olivier Andrieu, tweaked by David Allsopp)
9449
9450 - #1070, #1295: enable gcc typechecking for caml_alloc_sprintf,
9451 caml_gc_message. Make caml_gc_message a variadic function. Fix many
9452 caml_gc_message format strings.
9453 (Olivier Andrieu, review and 32bit fix by David Allsopp)
9454
9455 - #1073: Remove statically allocated compare stack.
9456 (Stephen Dolan)
9457
9458 - #1086: in Sys.getcwd, just fail instead of calling getwd()
9459 if HAS_GETCWD is not set.
9460 (Report and first fix by Sebastian Markbåge, final fix by Xavier Leroy,
9461 review by Mark Shinwell)
9462
9463 - #1269: Remove 50ms delay at exit for programs using threads
9464 (Valentin Gatien-Baron, review by Stephen Dolan)
9465
9466 * #1309: open files with O_CLOEXEC (or equivalent) in caml_sys_open, thus
9467 unifying the semantics between Unix and Windows and also eliminating race
9468 condition on Unix.
9469 (David Allsopp, report by Andreas Hauptmann)
9470
9471 - #1326: Enable use of CFI directives in AArch64 and ARM runtime
9472 systems' assembly code (asmrun/arm64.S). Add CFI directives to enable
9473 unwinding through [caml_c_call] and [caml_call_gc] with correct termination
9474 of unwinding at [main].
9475 (Mark Shinwell, review by Xavier Leroy and Gabriel Scherer, with thanks
9476 to Daniel Bünzli and Fu Yong Quah for testing)
9477
9478 - #1338: Add "-g" for bytecode runtime system compilation
9479 (Mark Shinwell)
9480
9481 * #1416, #1444: switch the Windows 10 Console to UTF-8 encoding.
9482 (David Allsopp, reviews by Nicolás Ojeda Bär and Xavier Leroy)
9483
9484 ### Manual and documentation:
9485
9486 - #6548: remove obsolete limitation in the description of private
9487 type abbreviations
9488 (Florian Angeletti, suggestion by Leo White)
9489
9490 - #6676, #1110: move record notation to tutorial
9491 (Florian Angeletti, review by Gabriel Scherer)
9492
9493 - #6676, #1112: move local opens to tutorial
9494 (Florian Angeletti)
9495
9496 - #6676, #1153: move overriding class definitions to reference
9497 manual and tutorial
9498 (Florian Angeletti)
9499
9500 - #6709: document the associativity and precedence level of
9501 pervasive operators
9502 (Florian Angeletti, review by David Allsopp)
9503
9504 - #7254, #1096: Rudimentary documentation of ocamlnat
9505 (Mark Shinwell)
9506
9507 - #7281, #1259: fix .TH macros in generated manpages
9508 (Olaf Hering)
9509
9510 - #7507: Align the description of the printf conversion
9511 specification "%g" with the ISO C90 description.
9512 (Florian Angeletti, suggestion by Armaël Guéneau)
9513
9514 - #7551, #1194 : make the final ";;" potentially optional in
9515 caml_example
9516 (Florian Angeletti, review and suggestion by Gabriel Scherer)
9517
9518 - #7588, #1291: make format documentation predictable
9519 (Florian Angeletti, review by Gabriel Radanne)
9520
9521 - #7604: Minor Ephemeron documentation fixes
9522 (Miod Vallat, review by Florian Angeletti)
9523
9524 - #594: New chapter on polymorphism troubles:
9525 weakly polymorphic types, polymorphic recursion,and higher-ranked
9526 polymorphism.
9527 (Florian Angeletti, review by Damien Doligez, Gabriel Scherer,
9528 and Gerd Stolpmann)
9529
9530 - #1187: Minimal documentation for compiler plugins
9531 (Florian Angeletti)
9532
9533 - #1202: Fix Typos in comments as well as basic grammar errors.
9534 (JP Rodi, review and suggestions by David Allsopp, Max Mouratov,
9535 Florian Angeletti, Xavier Leroy, Mark Shinwell and Damien Doligez)
9536
9537 - #1220: Fix "-keep-docs" option in ocamlopt manpage
9538 (Etienne Millon)
9539
9540 ### Compiler distribution build system:
9541
9542 - #6373, #1093: Suppress trigraph warnings from macOS assembler
9543 (Mark Shinwell)
9544
9545 - #7639, #1371: fix configure script for correct detection of
9546 int64 alignment on Mac OS X 10.13 (High Sierra) and above; fix bug in
9547 configure script relating to such detection.
9548 (Mark Shinwell, report by John Whitington, review by Xavier Leroy)
9549
9550 - #558: enable shared library and natdynlink support on more Linux
9551 platforms
9552 (Felix Janda, Mark Shinwell)
9553
9554 * #1104: remove support for the NeXTStep platform
9555 (Sébastien Hinderer)
9556
9557 - #1130: enable detection of IBM XL C compiler (one need to run configure
9558 with "-cc <path to xlc compiler>"). Enable shared library support for
9559 bytecode executables on AIX/xlc (tested on AIX 7.1, XL C 12).
9560 To enable 64-bit, run both "configure" and "make world" with OBJECT_MODE=64.
9561 (Konstantin Romanov, Enrique Naudon)
9562
9563 - #1203: speed up the manual build by using ocamldoc.opt
9564 (Gabriel Scherer, review by Florian Angeletti)
9565
9566 - #1214: harden config/Makefile against '#' characters in PREFIX
9567 (Gabriel Scherer, review by David Allsopp and Damien Doligez)
9568
9569 - #1216: move Compplugin and friends from BYTECOMP to COMP
9570 (Leo White, review by Mark Shinwell)
9571
9572 * #1242: disable C plugins loading by default
9573 (Alexey Egorov)
9574
9575 - #1275: correct configure test for Spacetime availability
9576 (Mark Shinwell)
9577
9578 - #1278: discover presence of <sys/shm.h> during configure for afl runtime
9579 (Hannes Mehnert)
9580
9581 - #1386: provide configure-time options to fine-tune the safe-string
9582 options and default settings changed by #1252.
9583
9584 The previous configure option -safe-string is now
9585 renamed -force-safe-string.
9586
9587 At configure-time, -force-safe-string forces all module to use
9588 immutable strings (this disables the per-file, compile-time
9589 -unsafe-string option). The new default-(un)safe-string options
9590 let you set the default choice for the per-file compile-time
9591 option. (The new #1252 behavior corresponds to having
9592 -default-safe-string, while 4.05 and older had
9593 -default-unsafe-string).
9594
9595 (Gabriel Scherer, review by Kate Deplaix and Damien Doligez)
9596
9597 - #1409: Fix to enable NetBSD/powerpc to work.
9598 (Håvard Eidnes)
9599
9600 ### Internal/compiler-libs changes:
9601
9602 - #6826, #828, #834: improve compilation time for open
9603 (Alain Frisch, review by Frédéric Bour and Jacques Garrigue)
9604
9605 - #7127, #454, #1058: in toplevel, print bytes and strip
9606 strings longer than the size specified by the "print_length" directive
9607 (Fabrice Le Fessant, initial PR by Junsong Li)
9608
9609 - #406: remove polymorphic comparison for Types.constructor_tag in compiler
9610 (Dwight Guth, review by Gabriel Radanne, Damien Doligez, Gabriel Scherer,
9611 Pierre Chambart, Mark Shinwell)
9612
9613 - #1119: Change Set (private) type to inline records.
9614 (Albin Coquereau)
9615
9616 * #1127: move config/{m,s}.h to byterun/caml and install them.
9617 User code should not have to include them directly since they are
9618 included by other header files.
9619 Previously {m,s}.h were not installed but they were substituted into
9620 caml/config.h; they are now just #include-d by this file. This may
9621 break some scripts relying on the (unspecified) presence of certain
9622 #define in config.h instead of m.h and s.h -- they can be rewritten
9623 to try to grep those files if they exist.
9624 (Sébastien Hinderer)
9625
9626 - #1281: avoid formatter flushes inside exported printers in Location
9627 (Florian Angeletti, review by Gabriel Scherer)
9628
9629 ### Bug fixes:
9630
9631 - #5927: Type equality broken for conjunctive polymorphic variant tags
9632 (Jacques Garrigue, report by Leo White)
9633
9634 - #6329, #1437: Introduce padding word before "data_end" symbols
9635 to ensure page table tests work correctly on an immediately preceding
9636 block of zero size.
9637 (Mark Shinwell, review by Xavier Leroy)
9638
9639 - #6587: only elide Pervasives from printed type paths in unambiguous context
9640 (Florian Angeletti and Jacques Garrigue)
9641
9642 - #6934: nonrec misbehaves with GADTs
9643 (Jacques Garrigue, report by Markus Mottl)
9644
9645 - #7070, #1139: Unexported values can cause non-generalisable variables
9646 error
9647 (Leo White)
9648
9649 - #7261: Warn on type constraints in GADT declarations
9650 (Jacques Garrigue, report by Didier Le Botlan)
9651
9652 - #7321: Private type in signature clashes with type definition via
9653 functor instantiation
9654 (Jacques Garrigue, report by Markus Mottl)
9655
9656 - #7372, #834: fix type-checker bug with GADT and inline records
9657 (Alain Frisch, review by Frédéric Bour and Jacques Garrigue)
9658
9659 - #7344: Inconsistent behavior with type annotations on let
9660 (Jacques Garrigue, report by Leo White)
9661
9662 - #7468: possible GC problem in caml_alloc_sprintf
9663 (Xavier Leroy, discovery by Olivier Andrieu)
9664
9665 - #7496: Fixed conjunctive polymorphic variant tags do not unify
9666 with themselves
9667 (Jacques Garrigue, report by Leo White)
9668
9669 - #7506: pprintast ignores attributes in tails of a list
9670 (Alain Frisch, report by Kenichi Asai and Gabriel Scherer)
9671
9672 - #7513: List.compare_length_with mishandles negative numbers / overflow
9673 (Fabrice Le Fessant, report by Jeremy Yallop)
9674
9675 - #7519: Incorrect rejection of program due to faux scope escape
9676 (Jacques Garrigue, report by Markus Mottl)
9677
9678 - #7540, #1179: Fixed setting of breakpoints within packed modules
9679 for ocamldebug
9680 (Hugo Herbelin, review by Gabriel Scherer, Damien Doligez)
9681
9682 - #7543: short-paths printtyp can fail on packed type error messages
9683 (Florian Angeletti)
9684
9685 - #7553, #1191: Prevent repeated warnings with recursive modules.
9686 (Leo White, review by Josh Berdine and Alain Frisch)
9687
9688 - #7563, #1210: code generation bug when a module alias and
9689 an extension constructor have the same name in the same module
9690 (Gabriel Scherer, report by Manuel Fähndrich,
9691 review by Jacques Garrigue and Leo White)
9692
9693 - #7591, #1257: on x86-64, frame table is not 8-aligned
9694 (Xavier Leroy, report by Mantis user "voglerr", review by Gabriel Scherer)
9695
9696 - #7601, #1320: It seems like a hidden non-generalized type variable
9697 remains in some inferred signatures, which leads to strange errors
9698 (Jacques Garrigue, report by Mandrikin)
9699
9700 - #7609: use-after-free memory corruption if a program debugged
9701 under ocamldebug calls Pervasives.flush_all
9702 (Xavier Leroy, report by Paul Steckler, review by Gabriel Scherer)
9703
9704 - #7612, #1345: afl-instrumentation bugfix for classes.
9705 (Stephen Dolan, review by Gabriel Scherer and David Allsopp)
9706
9707 - #7617, #7618, #1318: Ambiguous (mistakenly) type escaping the
9708 scope of its equation
9709 (Jacques Garrigue, report by Thomas Refis)
9710
9711 - #7619, #1387: position of the optional last semi-column not included
9712 in the position of the expression (same behavior as for lists)
9713 (Christophe Raffalli, review by Gabriel Scherer)
9714
9715 - #7638: in the Windows Mingw64 port, multithreaded programs compiled
9716 to bytecode could crash when raising an exception from C code.
9717 This looks like a Mingw64 issue, which we work around with GCC builtins.
9718 (Xavier Leroy)
9719
9720 - #7656, #1423: false 'unused type/constructor/value' alarms
9721 in the 4.06 development version
9722 (Alain Frisch, review by Jacques Garrigue, report by Kate Deplaix)
9723
9724 - #7657, #1424: ensures correct call-by-value semantics when
9725 eta-expanding functions to eliminate optional arguments
9726 (Alain Frisch, report by sliquister, review by Leo White and Jacques
9727 Garrigue)
9728
9729 - #7658, #1439: Fix Spacetime runtime system compilation with
9730 -force-safe-string
9731 (Mark Shinwell, report by Christoph Spiel, review by Gabriel Scherer)
9732
9733 - #1155: Fix a race condition with WAIT_NOHANG on Windows
9734 (Jérémie Dimino and David Allsopp)
9735
9736 - #1199: Pretty-printing formatting cleanup in pprintast
9737 (Ethan Aubin, suggestion by Gabriel Scherer, review by David Allsopp,
9738 Florian Angeletti, and Gabriel Scherer)
9739
9740 - #1223: Fix corruption of the environment when using -short-paths
9741 with the toplevel.
9742 (Leo White, review by Alain Frisch)
9743
9744 - #1243: Fix pprintast for #... infix operators
9745 (Alain Frisch, report by Omar Chebib)
9746
9747 - #1324: ensure that flambda warning are printed only once
9748 (Xavier Clerc)
9749
9750 - #1329: Prevent recursive polymorphic variant names
9751 (Jacques Garrigue, fix suggested by Leo White)
9752
9753 - #1308: Only treat pure patterns as inactive
9754 (Leo White, review by Alain Frisch and Gabriel Scherer)
9755
9756 - #1390: fix the [@@unboxed] type check to accept parametrized types
9757 (Leo White, review by Damien Doligez)
9758
9759 - #1407: Fix raw_spacetime_lib
9760 (Leo White, review by Gabriel Scherer and Damien Doligez)
9761
9762 OCaml 4.05.0 (13 Jul 2017):
9763 ---------------------------
9764
9765 (Changes that can break existing programs are marked with a "*")
9766
9767 ### Language features:
9768
9769 ### Code generation and optimizations:
9770
9771 - #7201, #954: Correct wrong optimisation of "0 / <expr>"
9772 and "0 mod <expr>" in the case when <expr> was a non-constant
9773 evaluating to zero
9774 (Mark Shinwell, review by Gabriel Scherer, Leo White and Xavier Leroy)
9775
9776 - #7357, #832: Improve compilation time for toplevel
9777 include(struct ... end : sig ... end)
9778 (Alain Frisch, report by Hongbo Zhang, review by Jacques Garrigue)
9779
9780 - #7533, #1173: Correctly perform side effects for certain
9781 cases of "/" and "mod"
9782 (Mark Shinwell, report by Jan Mitgaard)
9783
9784 - #504: Instrumentation support for fuzzing with afl-fuzz.
9785 (Stephen Dolan, review by Alain Frisch, Pierre Chambart, Mark
9786 Shinwell, Gabriel Scherer and Damien Doligez)
9787
9788 - #863, #1068, #1069: Optimise matches with constant
9789 results to lookup tables.
9790 (Stephen Dolan, review by Gabriel Scherer, Pierre Chambart,
9791 Mark Shinwell, and bug report by Gabriel Scherer)
9792
9793 - #1150: Fix typo in arm64 assembler directives
9794 (KC Sivaramakrishnan)
9795
9796 ### Runtime system:
9797
9798 - #2784, #953: Add caml_startup_exn
9799 (Mark Shinwell)
9800
9801 - #7423, #946: expose new exception-raising functions
9802 `void caml_{failwith,invalid_argument}_value(value msg)`
9803 in addition to
9804 `void caml_{failwith,invalid_argument}(char const *msg)`.
9805 The previous functions would not free their message argument, so
9806 were inconvient for dynamically-allocated messages; the messages
9807 passed to the new functions are handled by the garbage collector.
9808 (Gabriel Scherer, review by Mark Shinwell, request by Immanuel Litzroth)
9809
9810 - #7557, #1213: More security for getenv
9811 (Damien Doligez, reports by Seth Arnold and Eric Milliken, review by
9812 Xavier Leroy, David Allsopp, Stephen Dolan, Hannes Mehnert)
9813
9814 - #795: remove 256-character limitation on Sys.executable_name
9815 (Xavier Leroy)
9816
9817 - #891: Use -fno-builtin-memcmp when building runtime with gcc.
9818 (Leo White)
9819
9820 ### Type system:
9821
9822 - #6608, #901: unify record types when overriding all fields
9823 (Tadeu Zagallo and Gabriel Scherer, report by Jeremy Yallop,
9824 review by David Allsopp, Jacques Garrigue)
9825
9826 * #7414, #929: Soundness bug with non-generalized type variables and
9827 functors.
9828 (compatibility: some code using module-global mutable state will
9829 fail at compile-time and is fixed by adding extra annotations;
9830 see the Mantis and Github discussions.)
9831 (Jacques Garrigue, report by Leo White)
9832
9833 ### Compiler user-interface and warnings:
9834
9835 - #7050, #748 #843 #864: new `-args/-args0 <file>` parameters to
9836 provide extra command-line arguments in a file -- see documentation.
9837 User programs may implement similar options using the new `Expand`
9838 constructor of the `Arg` module.
9839 (Bernhard Schommer, review by Jérémie Dimino, Gabriel Scherer
9840 and Damien Doligez, discussion with Alain Frisch and Xavier Leroy,
9841 feature request from the Coq team)
9842
9843 - #7137, #960: "-open" command line flag now accepts
9844 a module path (not a module name)
9845 (Arseniy Alekseyev and Leo White)
9846
9847 - #7172, #970: add extra (ocamlc -config) options
9848 int_size, word_size, ext_exe
9849 (Gabriel Scherer, request by Daniel Bünzli)
9850
9851 - #7315, #736: refine some error locations
9852 (Gabriel Scherer and Alain Frisch, report by Matej Košík)
9853
9854 - #7473, #1025: perform proper globbing for command-line arguments on
9855 Windows
9856 (Jonathan Protzenko)
9857
9858 - #7479: make sure "ocamlc -pack" is only given .cmo and .cmi files,
9859 and that "ocamlopt -pack" is only given .cmx and .cmi files.
9860 (Xavier Leroy)
9861
9862 - #796: allow compiler plugins to declare their own arguments.
9863 (Fabrice Le Fessant)
9864
9865 - #829: better error when opening a module aliased to a functor
9866 (Alain Frisch)
9867
9868 - #911: ocamlc/ocamlopt do not pass warnings-related options to C
9869 compiler when called to compile third-party C source files
9870 (Sébastien Hinderer, review by Adrien Nader and David Allsopp)
9871
9872 - #915: fix -dsource (pprintast.ml) bugs
9873 (Runhang Li, review by Alain Frisch)
9874
9875 * #933: ocamlopt -p now reports an error on platforms that do not
9876 support profiling with gprof; dummy profiling libraries are no longer
9877 installed on such platforms.
9878 This can be tested with ocamlopt -config
9879 (Sébastien Hinderer)
9880
9881 - #1009: "ocamlc -c -linkall" and "ocamlopt -c -linkall" can now be used
9882 to set the "always link" flag on individual compilation units. This
9883 controls linking with finer granularity than "-a -linkall", which sets
9884 the "always link" flag on all units of the given library.
9885 (Xavier Leroy)
9886
9887 - #1015: add option "-plugin PLUGIN" to ocamldep too. Use compilerlibs
9888 to build ocamldep. Add option "-depend" to ocamlc/ocamlopt to behave
9889 as ocamldep. Remove any use of ocamldep to build the distribution.
9890 (Fabrice Le Fessant)
9891
9892 - #1027: various improvements to -dtimings, mostly including time
9893 spent in subprocesses like preprocessors
9894 (Valentin Gatien-Baron, review by Gabriel Scherer)
9895
9896 - #1098: the compiler now takes the boolean "OCAML_COLOR" environment
9897 variable into account if "-color" is not provided. This allows users
9898 to override the default behaviour without modifying invocations of ocaml
9899 manually.
9900 (Hannes Mehnert, Guillaume Bury,
9901 review by Daniel Bünzli, Gabriel Scherer, Damien Doligez)
9902
9903 ### Standard library:
9904
9905 - #6975, #902: Truncate function added to stdlib Buffer module
9906 (Dhruv Makwana, review by Alain Frisch and Gabriel Scherer)
9907
9908 - #7279, #710: `Weak.get_copy` `Ephemeron.*_copy` doesn't copy
9909 custom blocks anymore
9910 (François Bobot, Alain Frisch, report by Martin R. Neuhäußer,
9911 review by Thomas Braibant and Damien Doligez)
9912
9913 * #7500, #1081: Remove Uchar.dump
9914 (Daniel Bünzli)
9915
9916 - #760: Add a functions List.compare_lengths and
9917 List.compare_length_with to avoid full list length computations
9918 (Fabrice Le Fessant, review by Leo White, Josh Berdine and Gabriel Scherer)
9919
9920 - #778: Arg: added option Expand that allows to expand a string
9921 argument to a string array of new arguments
9922 (Bernhard Schommer, review by Gabriel Scherer and Jérémie Dimino)
9923
9924 - #849: Expose a Spacetime.enabled value
9925 (Leo White)
9926
9927 - #885: Option-returning variants of stdlib functions
9928 (Alain Frisch, review by David Allsopp and Bart Jacobs)
9929
9930 - #869: Add find_first, find_first_opt, find_last, find_last_opt to
9931 maps and sets. Find the first or last binding or element
9932 satisfying a monotonic predicate.
9933 (Gabriel de Perthuis, with contributions from Alain Frisch, review by
9934 Hezekiah M. Carty and Simon Cruanes, initial report by Gerd Stolpmann)
9935
9936 - #875: Add missing functions to ArrayLabels, BytesLabels,
9937 ListLabels, MoreLabels, StringLabels so they are compatible with
9938 non-labeled counterparts. Also add missing @@ocaml.deprecated attributes
9939 in StringLabels and BytesLabels.
9940 (Roma Sokolov, review by Gabriel Scherer, Jacques Garrigue,
9941 Gabriel Radanne, Alain Frisch)
9942
9943 - #999: Arg, do not repeat the usage message thrice when reporting an error
9944 (this was a regression in 4.03)
9945 (Florian Angeletti, review by Gabriel Scherer)
9946
9947 - #1042: Fix escaping of command-line arguments in
9948 Unix.create_process{,_env} under Windows. Arguments with tabs should now
9949 be received verbatim by the child process.
9950 (Nicolás Ojeda Bär, Andreas Hauptmann review by Xavier Leroy)
9951
9952 ### Debugging and profiling:
9953
9954 - #7258: ocamldebug's "install_printer" command had problems with
9955 module aliases
9956 (Xavier Leroy)
9957
9958 - #378: Add [Printexc.raise_with_backtrace] to raise an exception using
9959 an explicit backtrace
9960 (François Bobot, review by Gabriel Scherer, Xavier Leroy, Damien Doligez,
9961 Frédéric Bour)
9962
9963 ### Manual and documentation:
9964
9965 - #6597, #1030: add forward references to language extensions
9966 that extend non-terminal symbols in the language reference section.
9967 (Florian Angeletti, review by Gabriel Scherer)
9968
9969 - #7497, #1095: manual, enable numbering for table of contents
9970 (Florian Angeletti, request by Daniel Bünzli)
9971
9972 - #7539, #1181: manual, update dead links in ocamldoc chapter
9973 (Florian Angeletti)
9974
9975 - #633: manpage and manual documentation for the `-opaque` option
9976 (Konstantin Romanov, Gabriel Scherer, review by Mark Shinwell)
9977
9978 - #751, #925: add a HACKING.adoc file to contain various
9979 tips and tricks for people hacking on the repository. See also
9980 CONTRIBUTING.md for advice on sending contributions upstream.
9981 (Gabriel Scherer and Gabriel Radanne, review by David Allsopp,
9982 inspired by John Whitington)
9983
9984 - #916: new tool lintapidiff, use it to update the manual with
9985 @since annotations for API changes introduced between 4.00-4.05.
9986 (Edwin Török, review by Gabriel Scherer, discussion with Alain Frisch,
9987 David Allsopp, Sébastien Hinderer, Damien Doligez and Xavier Leroy)
9988
9989 - #939: activate the caml_example environment in the language
9990 extensions section of the manual. Convert some existing code
9991 examples to this format.
9992 (Florian Angeletti)
9993
9994 - #1082: clarify that the use of quoted string for preprocessed
9995 foreign quotations still requires the use of an extension node
9996 [%foo ...] to mark non-standard interpretation.
9997 (Gabriel Scherer, request by Matthew Wahab in #1066,
9998 review by Florian Angeletti)
9999
10000 ### Other libraries:
10001
10002 - #7158: Event.sync, Mutex.create, Condition.create cause too many GCs.
10003 The fix is to no longer consider mutexes and condition variables
10004 as rare kernel resources.
10005 (Xavier Leroy)
10006
10007 - #7264: document the different behaviors of Unix.lockf under POSIX
10008 and under Win32.
10009 (Xavier Leroy, report by David Allsopp)
10010
10011 - #7339, #787: Support the '0 dimension' case for bigarrays
10012 (see Bigarray documentation)
10013 (Laurent Mazare,
10014 review by Gabriel Scherer, Alain Frisch and Hezekiah M. Carty)
10015
10016 * #7342, #797: fix Unix.read on pipes with no data left on Windows
10017 it previously raised an EPIPE error, it now returns 0 like other OSes
10018 (Jonathan Protzenko, review by Andreas Hauptmann and Damien Doligez)
10019
10020 - #650: in the Unix library, add `?cloexec:bool` optional arguments to
10021 functions that create file descriptors (`dup`, `dup2`, `pipe`, `socket`,
10022 `socketpair`, `accept`). Implement these optional arguments in the
10023 most atomic manner provided by the operating system to set (or clear)
10024 the close-on-exec flag at the same time the file descriptor is created,
10025 reducing the risk of race conditions with `exec` or `create_process`
10026 calls running in other threads, and improving security. Also: add a
10027 `O_KEEPEXEC` flag for `openfile` by symmetry with `O_CLOEXEC`.
10028 (Xavier Leroy, review by Mark Shinwell, David Allsopp and Alain Frisch,
10029 request by Romain Beauxis)
10030
10031 - #996: correctly update caml_top_of_stack in systhreads
10032 (Fabrice Le Fessant)
10033
10034 - #997, #1077: Deprecate Bigarray.*.map_file and add Unix.map_file as a
10035 first step towards moving Bigarray to the stdlib
10036 (Jérémie Dimino and Xavier Leroy)
10037
10038 ### Toplevel:
10039
10040 - #7060, #1035: Print exceptions in installed custom printers
10041 (Tadeu Zagallo, review by David Allsopp)
10042
10043 ### Tools:
10044
10045 - #5163: ocamlobjinfo, dump globals defined by bytecode executables
10046 (Stéphane Glondu)
10047
10048 - #7333: ocamldoc, use the first sentence of text file as
10049 a short description in overviews.
10050 (Florian Angeletti)
10051
10052 - #848: ocamldoc, escape link targets in HTML output
10053 (Etienne Millon, review by Gabriel Scherer, Florian Angeletti and
10054 Daniel Bünzli)
10055
10056 - #986: ocamldoc, use relative paths in error message
10057 to solve ocamlbuild+doc usability issue (ocaml/ocamlbuild#79)
10058 (Gabriel Scherer, review by Florian Angeletti, discussion with Daniel Bünzli)
10059
10060 - #1017: ocamldoc, add an option to detect code fragments that could be
10061 transformed into a cross-reference to a known element.
10062 (Florian Angeletti, review and suggestion by David Allsopp)
10063
10064 - clarify ocamldoc text parsing error messages
10065 (Gabriel Scherer)
10066
10067 ### Compiler distribution build system:
10068
10069 - #7377: remove -std=gnu99 for newer gcc versions
10070 (Damien Doligez, report by ygrek)
10071
10072 - #7452, #1228: tweak GCC options to try to avoid the
10073 Skylake/Kaby lake bug
10074 (Damien Doligez, review by David Allsopp, Xavier Leroy and Mark Shinwell)
10075
10076 - #693: fail on unexpected errors or warnings within caml_example
10077 environment.
10078 (Florian Angeletti)
10079
10080 - #803: new ocamllex-based tool to extract bytecode compiler
10081 opcode information from C headers.
10082 (Nicolás Ojeda Bär)
10083
10084 - #827: install missing mli and cmti files, new make target
10085 install-compiler-sources for installation of compiler-libs ml files
10086 (Hendrik Tews)
10087
10088 - #887: allow -with-frame-pointers if clang is used as compiler on Linux
10089 (Bernhard Schommer)
10090
10091 - #898: fix locale-dependence of primitive list order,
10092 detected through reproducible-builds.org.
10093 (Hannes Mehnert, review by Gabriel Scherer and Ximin Luo)
10094
10095 - #907: Remove unused variable from the build system
10096 (Sébastien Hinderer, review by whitequark, Gabriel Scherer, Adrien Nader)
10097
10098 - #911: Clarify the use of C compiler related variables in the build system.
10099 (Sébastien Hinderer, review by Adrien Nader, Alain Frisch, David Allsopp)
10100
10101 - #919: use clang as preprocessor assembler if clang is used as compiler
10102 (Bernhard Schommer)
10103
10104 - #927: improve the detection of hashbang support in the configure script
10105 (Armaël Guéneau)
10106
10107 - #932: install ocaml{c,lex}->ocaml{c,lex}.byte symlink correctly
10108 when the opt target is built but opt.opt target is not.
10109 (whitequark, review by Gabriel Scherer)
10110
10111 - #935: allow build in Android's termux
10112 (ygrek, review by Gabriel Scherer)
10113
10114 - #984: Fix compilation of compiler distribution when Spacetime
10115 enabled
10116 (Mark Shinwell)
10117
10118 - #991: On Windows, fix installation when native compiler is not
10119 built
10120 (Sébastien Hinderer, review by David Allsopp)
10121
10122 - #1033: merge Unix and Windows build systems in the root directory
10123 (Sébastien Hinderer, review by Damien Doligez and Adrien Nader)
10124
10125 - #1047: Make .depend files generated for C sources more portable
10126 (Sébastien Hinderer, review by Xavier Leroy and David Allsopp)
10127
10128 - #1076: Simplify ocamlyacc's build system
10129 (Sébastien Hinderer, review by David Allsopp)
10130
10131 ### Compiler distribution build system: Makefile factorization
10132
10133 The compiler distribution build system (the set of Makefiles used to
10134 build the compiler distribution) traditionally had separate Makefiles
10135 for Unix and Windows, which lead to some amount of duplication and
10136 subtle differences and technical debt in general -- for people working
10137 on the compiler distribution, but also cross-compilation or porting to
10138 new systems. During the 4.05 development period, Sébastien Hinderer
10139 worked on harmonizing the build rules and merging the two build
10140 systems.
10141
10142 * Some changes were made to the config/Makefile file which
10143 is exported as $(ocamlc -where)/Makefile.config, and on
10144 which some advanced users might rely. The changes are
10145 as follows:
10146 - a BYTERUN variable was added that points to the installed ocamlrun
10147 - the PARTIALLD variable was removed (PACKLD is more complete)
10148 - the always-empty DLLCCCOMPOPTS was removed
10149 - the SHARED variable was removed; its value is "shared" or "noshared",
10150 which duplicates the existing and more convenient
10151 SUPPORTS_SHARED_LIBRARIES variable whose value is "true" or "false".
10152
10153 Note that Makefile.config may change further in the future and relying
10154 on it is a bit fragile. We plan to make `ocamlc -config` easier to use
10155 for scripting purposes, and have a stable interface there. If you rely
10156 on Makefile.config, you may want to get in touch with Sébastien Hinderer
10157 or participate to #7116 (Allow easy retrieval of Makefile.config's values)
10158 or #7172 (More information in ocamlc -config).
10159
10160 The complete list of changes is listed below.
10161
10162 - #705: update Makefile.nt so that ocamlnat compiles
10163 for non-Cygwin Windows ports.
10164 (Sébastien Hinderer, review by Alain Frisch)
10165
10166 - #729: Make sure ocamlnat is built with a $(EXE) extension, merge
10167 rules between Unix and Windows Makefiles
10168 (Sébastien Hinderer, review by Alain Frisch)
10169
10170 - #762: Merge build systems in the yacc/ directory.
10171 (Sébastien Hinderer, review by David Allsopp, Alain Frisch)
10172
10173 - #764: Merge build systems in the debugger/ directory.
10174 (Sébastien Hinderer, review by Alain Frisch)
10175
10176 - #785: Merge build systems in otherlibs/systhreads/
10177 (Sébastien Hinderer, review by Alain Frisch, David Allsopp,
10178 testing and regression fix by Jérémie Dimino)
10179
10180 - #788: Merge build systems in subdirectories of otherlibs/.
10181 (Sébastien Hinderer, review by Alain Frisch)
10182
10183 - #808, #906: Merge Unix and Windows build systems
10184 in the ocamldoc/ directory
10185 (Sébastien Hinderer, review by Alain Frisch)
10186
10187 - #812: Merge build systems in the tools/ subdirectory
10188 (Sébastien Hinderer, review by Alain Frisch)
10189
10190 - #866: Merge build systems in the stdlib/ directory
10191 (Sébastien Hinderer, review by David Allsopp and Adrien Nader)
10192
10193 - #941: Merge Unix and Windows build systems in the asmrun/ directory
10194 (Sébastien Hinderer, review by Mark Shinwell, Adrien Nader,
10195 Xavier Leroy, David Allsopp, Damien Doligez)
10196
10197 - #981: Merge build systems in the byterun/ directory
10198 (Sébastien Hinderer, review by Adrien Nader)
10199
10200 - #1033, #1048: Merge build systems in the root directory
10201 (Sébastien Hinderer, review by Adrien Nader and Damien Doligez,
10202 testing and regression fix by Andreas Hauptmann)
10203
10204 ### Internal/compiler-libs changes:
10205
10206 - #673: distinguish initialization of block fields from mutation in lambda.
10207 (Frédéric Bour, review by Xavier Leroy, Stephen Dolan and Mark Shinwell)
10208
10209 - #744, #781: fix duplicate self-reference in imported cmi_crcs
10210 list in .cmti files + avoid rebuilding cmi_info record when creating
10211 .cmti files
10212 (Alain Frisch, report by Daniel Bünzli, review by Jérémie Dimino)
10213
10214 - #881: change `Outcometree.out_variant` to be more general.
10215 `Ovar_name of out_ident * out_type list` becomes `Ovar_type of out_type`.
10216 (Valentin Gatien-Baron, review by Leo White)
10217
10218 - #908: refactor PIC-handling in the s390x backend
10219 (Gabriel Scherer, review by Xavier Leroy and Mark Shinwell)
10220
10221 ### Bug fixes:
10222
10223 - #5115: protect all byterun/fail.c functions against
10224 uninitialized caml_global_data (only changes the bytecode behavior)
10225 (Gabriel Scherer, review by Xavier Leroy)
10226
10227 - #6136, #967: Fix Closure so that overapplication evaluation order
10228 matches the bytecode compiler and Flambda.
10229 (Mark Shinwell, report by Jeremy Yallop, review by Frédéric Bour)
10230
10231 - #6550, #1094: Allow creation of empty .cmxa files on macOS
10232 (Mark Shinwell)
10233
10234 - #6594, #955: Remove "Istore_symbol" specific operation on x86-64.
10235 This is more robust and in particular avoids assembly failures on Win64.
10236 (Mark Shinwell, review by Xavier Leroy, testing by David Allsopp and
10237 Olivier Andrieu)
10238
10239 - #6903: Unix.execvpe doesn't change environment on Cygwin
10240 (Xavier Leroy, report by Adrien Nader)
10241
10242 - #6987: Strange error message probably caused by
10243 universal variable escape (with polymorphic variants)
10244 (Jacques Garrigue, report by Mikhail Mandrykin and Leo White)
10245
10246 - #7216, #949: don't require double parens in Functor((val x))
10247 (Jacques Garrigue, review by Valentin Gatien-Baron)
10248
10249 - #7331: ocamldoc, avoid infinite loop in presence of self alias,
10250 i.e. module rec M:sig end = M
10251 (Florian Angeletti, review Gabriel Scherer)
10252
10253 - #7346, #966: Fix evaluation order problem whereby expressions could
10254 be incorrectly re-ordered when compiling with Flambda. This also fixes one
10255 example of evaluation order in the native code compiler not matching the
10256 bytecode compiler (even when not using Flambda)
10257 (Mark Shinwell, Leo White, code review by Pierre Chambart)
10258
10259 - #7348: Private row variables can escape their scope
10260 (Jacques Garrigue, report by Leo White)
10261
10262 - #7407: Two not-quite-standard C idioms rejected by SUNWSPro compilers
10263 (Xavier Leroy)
10264
10265 - #7421: Soundness bug with GADTs and lazy
10266 (Jacques Garrigue, report by Leo White)
10267
10268 - #7424: Typechecker diverges on unboxed type declaration
10269 (Jacques Garrigue, report by Stephen Dolan)
10270
10271 - #7426, #965: Fix fatal error during object compilation (also
10272 introduces new [Pfield_computed] and [Psetfield_computed] primitives)
10273 (Mark Shinwell, report by Ulrich Singer)
10274
10275 - #7427, #959: Don't delete let bodies in Cmmgen
10276 (Mark Shinwell, report by Valentin Gatien-Baron)
10277
10278 - #7432: Linking modules compiled with -labels and -nolabels is not safe
10279 (Jacques Garrigue, report by Jeremy Yallop)
10280
10281 - #7437: typing assert failure with nonrec priv
10282 (Jacques Garrigue, report by Anil Madhavapeddy)
10283
10284 - #7438: warning +34 exposes #row with private types
10285 (Alain Frisch, report by Anil Madhavapeddy)
10286
10287 - #7443, #990: spurious unused open warning with local open in patterns
10288 (Florian Angeletti, report by Gabriel Scherer)
10289
10290 - #7456, #1092: fix slow compilation on source files containing a lot
10291 of similar debugging information location entries
10292 (Mark Shinwell)
10293
10294 - #7504: fix warning 8 with unconstrained records
10295 (Florian Angeletti, report by John Whitington)
10296
10297 - #7511, #1133: Unboxed type with unboxed argument should not be accepted
10298 (Damien Doligez, review by Jeremy Yallop and Leo White)
10299
10300 - #805, #815, #833: check for integer overflow in String.concat
10301 (Jeremy Yallop,
10302 review by Damien Doligez, Alain Frisch, Daniel Bünzli, Fabrice Le Fessant)
10303
10304 - #881: short-paths did not apply to some polymorphic variants
10305 (Valentin Gatien-Baron, review by Leo White)
10306
10307 - #886: Fix Ctype.moregeneral's handling of row_name
10308 (Leo White, review by Jacques Garrigue)
10309
10310 - #934: check for integer overflow in Bytes.extend
10311 (Jeremy Yallop, review by Gabriel Scherer)
10312
10313 - #956: Keep possibly-effectful expressions when optimizing multiplication
10314 by zero.
10315 (Jeremy Yallop, review by Nicolás Ojeda Bär, Xavier Leroy and Mark Shinwell)
10316
10317 - #977: Catch Out_of_range in ocamldebug's "list" command
10318 (Yunxing Dai)
10319
10320 - #983: Avoid removing effectful expressions in Closure, and
10321 eliminate more non-effectful ones
10322 (Alain Frisch, review by Mark Shinwell and Gabriel Scherer)
10323
10324 - #987: alloc_sockaddr: don't assume a null terminator. It is not inserted
10325 on macOS by system calls that fill in a struct sockaddr (e.g. getsockname).
10326 (Anton Bachin)
10327
10328 - #998: Do not delete unused closures in un_anf.ml.
10329 (Leo White, review by Mark Shinwell and Pierre Chambart)
10330
10331 - #1019: Fix fatal error in Flambda mode "[functions] does not map set of
10332 closures ID"
10333 (Pierre Chambart, code review by Mark Shinwell and Leo White)
10334
10335 - #1075: Ensure that zero-sized float arrays have zero tags.
10336 (Mark Shinwell, Leo White, review by Xavier Leroy)
10337
10338 * #1088: Gc.minor_words now returns accurate numbers.
10339 (compatibility: the .mli declaration of `Gc.minor_words`
10340 and `Gc.get_minor_free` changed, which may break libraries
10341 re-exporting these values.)
10342 (Stephen Dolan, review by Pierre Chambart and Xavier Leroy)
10343
10344 OCaml 4.04.2 (23 Jun 2017):
10345 ---------------------------
10346
10347 ### Security fix:
10348
10349 - #7557: Local privilege escalation issue with ocaml binaries.
10350 (Damien Doligez, report by Eric Milliken, review by Xavier Leroy)
10351
10352 OCaml 4.04.1 (14 Apr 2017):
10353 ---------------------------
10354
10355 ### Standard library:
10356
10357 - #7403, #894: fix a bug in Set.map as introduced in 4.04.0
10358 (Gabriel Scherer, report by Thomas Leonard)
10359
10360 ### Tools:
10361
10362 - #7411: ocamldoc, avoid nested <pre> tags in module description.
10363 (Florian Angeletti, report by user 'kosik')
10364
10365 - #7488: ocamldoc, wrong Latex output for variant types
10366 with constructors without arguments.
10367 (Florian Angeletti, report by Xavier Leroy)
10368
10369 ### Build system:
10370
10371 - #7373, #1023: New flexlink target in Makefile.nt to bootstrap the
10372 flexlink binary only, rather than the flexlink binary and the FlexDLL C
10373 objects.
10374 (David Allsopp)
10375
10376 ### Bug fixes:
10377
10378 - #7369: Str.regexp raises "Invalid_argument: index out of bounds"
10379 (Damien Doligez, report by John Whitington)
10380
10381 - #7373, #1023: Fix ocamlmklib with bootstrapped FlexDLL. Bootstrapped
10382 FlexDLL objects are now installed to a subdirectory flexdll of the Standard
10383 Library which allows the compilers to pick them up explicitly and also
10384 ocamlmklib to include them without unnecessarily adding the entire Standard
10385 Library.
10386 (David Allsopp)
10387
10388 - #7385, #1057: fix incorrect timestamps returned by Unix.stat on Windows
10389 when either TZ is set or system date is in DST.
10390 (David Allsopp, report and initial fix by Nicolás Ojeda Bär, review and
10391 superior implementation suggestion by Xavier Leroy)
10392
10393 - #7405, #903: s390x: Fix address of caml_raise_exn in native dynlink
10394 modules.
10395 (Richard Jones, review by Xavier Leroy)
10396
10397 - #7417, #930: ensure 16 byte stack alignment inside caml_allocN on x86-64
10398 for ocaml build with WITH_FRAME_POINTERS defined
10399 (Christoph Cullmann)
10400
10401 - #7456, #1092: fix slow compilation on source files containing a lot
10402 of similar debugging information location entries
10403 (Mark Shinwell)
10404
10405 - #7457: a case of double free in the systhreads library (POSIX
10406 implementation).
10407 (Xavier Leroy, report by Chet Murthy)
10408
10409 - #7460, #1011: catch uncaught exception when unknown files are passed
10410 as argument (regression in 4.04.0)
10411 (Bernhard Schommer, review by Florian Angeletti and Gabriel Scherer,
10412 report by Stephen Dolan)
10413
10414 - #7505: Memory cannot be released after calling
10415 Bigarray.Genarray.change_layout.
10416 (Damien Doligez and Xavier Leroy, report by Liang Wang)
10417
10418 - #912: Fix segfault in Unix.create_process on Windows caused by wrong header
10419 configuration.
10420 (David Allsopp)
10421
10422 - #980: add dynlink options to ocamlbytecomp.cmxa to allow ocamlopt.opt
10423 to load plugins. See http://github.com/OCamlPro/ocamlc-plugins for examples.
10424 (Fabrice Le Fessant, review by David Allsopp)
10425
10426 - #992: caml-types.el: Fix missing format argument, so that it can show kind
10427 of call at point correctly.
10428 (Chunhui He)
10429
10430 - #1043: Allow Windows CRLF line-endings in ocamlyacc on Unix and Cygwin.
10431 (David Allsopp, review by Damien Doligez and Xavier Leroy)
10432
10433 - #1072: Fix segfault in Sys.runtime_parameters when exception backtraces
10434 are enabled.
10435 (Olivier Andrieu)
10436
10437 OCaml 4.04.0 (4 Nov 2016):
10438 --------------------------
10439
10440 (Changes that can break existing programs are marked with a "*")
10441
10442 ### Language features:
10443
10444 - #7233: Support GADT equations on non-local abstract types
10445 (Jacques Garrigue)
10446
10447 - #187, #578: Local opening of modules in a pattern.
10448 Syntax: "M.(p)", "M.[p]","M.[| p |]", "M.{p}"
10449 (Florian Angeletti, Jacques Garrigue, review by Alain Frisch)
10450
10451 - #301: local exception declarations "let exception ... in"
10452 (Alain Frisch)
10453
10454 - #508: Allow shortcut for extension on semicolons: ;%foo
10455 (Jérémie Dimino)
10456
10457 - #606: optimized representation for immutable records with a single
10458 field, and concrete types with a single constructor with a single argument.
10459 This is triggered with a [@@unboxed] attribute on the type definition.
10460 Currently mutually recursive datatypes are not well supported, this
10461 limitation should be lifted in the future (see #7364).
10462 (Damien Doligez)
10463
10464 ### Compiler user-interface and warnings:
10465
10466 * #6475, #464: interpret all command-line options before compiling any
10467 files, changes (improves) the semantics of repeated -o options or -o
10468 combined with -c see the super-detailed commit message at
10469 https://github.com/ocaml/ocaml/commit/da56cf6dfdc13c09905c2e07f1d4849c8346eec8
10470 (whitequark)
10471
10472 - #7139: clarify the wording of Warning 38
10473 (Unused exception or extension constructor)
10474 (Gabriel Scherer)
10475
10476 * #7147, #475: add colors when reporting errors generated by ppx rewriters.
10477 Remove the `Location.errorf_prefixed` function which is no longer relevant
10478 (Simon Cruanes, Jérémie Dimino)
10479
10480 - #7169, #501: clarify the wording of Warning 8
10481 (Non-exhaustivity warning for pattern matching)
10482 (Florian Angeletti, review and report by Gabriel Scherer)
10483
10484 * #591: Improve support for OCAMLPARAM: (i) do not use objects
10485 files with -a, -pack, -shared; (ii) use "before" objects in the toplevel
10486 (but not "after" objects); (iii) use -I dirs in the toplevel,
10487 (iv) fix bug where -I dirs were ignored when using threads
10488 (Marc Lasson, review by Damien Doligez and Alain Frisch)
10489
10490 - #648: New -plugin option for ocamlc and ocamlopt, to dynamically extend
10491 the compilers at runtime.
10492 (Fabrice Le Fessant)
10493
10494 - #684: Detect unused module declarations
10495 (Alain Frisch)
10496
10497 - #706: Add a settable Env.Persistent_signature.load function so
10498 that cmi files can be loaded from other sources. This can be used to
10499 create self-contained toplevels.
10500 (Jérémie Dimino)
10501
10502 ### Standard library:
10503
10504 - #6279, #553: implement Set.map
10505 (Gabriel Scherer)
10506
10507 - #6820, #560: Add Obj.reachable_words to compute the
10508 "transitive" heap size of a value
10509 (Alain Frisch, review by Mark Shinwell and Damien Doligez)
10510
10511 - #473: Provide `Sys.backend_type` so that user can write backend-specific
10512 code in some cases (for example, code generator).
10513 (Hongbo Zhang)
10514
10515 - #589: Add a non-allocating function to recover the number of
10516 allocated minor words.
10517 (Pierre Chambart, review by Damien Doligez and Gabriel Scherer)
10518
10519 - #626: String.split_on_char
10520 (Alain Frisch)
10521
10522 - #669: Filename.extension and Filename.remove_extension
10523 (Alain Frisch, request by Edgar Aroutiounian, review by Daniel Bünzli
10524 and Damien Doligez)
10525
10526 - #674: support unknown Sys.os_type in Filename, defaulting to Unix
10527 (Filename would previously fail at initialization time for
10528 Sys.os_type values other than "Unix", "Win32" and "Cygwin";
10529 mirage-os uses "xen")
10530 (Anil Madhavapeddy)
10531
10532 - #772 %string_safe_set and %string_unsafe_set are deprecated aliases
10533 for %bytes_safe_set and %bytes_unsafe_set.
10534 (Hongbo Zhang and Damien Doligez)
10535
10536 ### Other libraries
10537
10538 - #4834, #592: Add a Biggarray.Genarray.change_layout function
10539 to switch bigarrays between C and fortran layouts.
10540 (Guillaume Hennequin, review by Florian Angeletti)
10541
10542 ### Code generation and optimizations:
10543
10544 - #4747, #328: Optimize Hashtbl by using in-place updates of its
10545 internal bucket lists. All operations run in constant stack size
10546 and are usually faster, except Hashtbl.copy which can be much
10547 slower
10548 (Alain Frisch)
10549
10550 - #6217, #538: Optimize performance of record update:
10551 no more performance cliff when { foo with t1 = ..; t2 = ...; ... }
10552 hits 6 updated fields
10553 (Olivier Nicole, review by Thomas Braibant and Pierre Chambart)
10554
10555 - #7023, #336: Better unboxing strategy
10556 (Alain Frisch, Pierre Chambart)
10557
10558 - #7244, #840: Ocamlopt + flambda requires a lot of memory
10559 to compile large array literal expressions
10560 (Pierre Chambart, review by Mark Shinwell)
10561
10562 - #7291, #780: Handle specialisation of recursive function that does
10563 not always preserve the arguments
10564 (Pierre Chambart, Mark Shinwell, report by Simon Cruanes)
10565
10566 - #7328, #702: Do not eliminate boxed int divisions by zero and
10567 avoid checking twice if divisor is zero with flambda.
10568 (Pierre Chambart, report by Jeremy Yallop)
10569
10570 - #427: Obj.is_block is now an inlined OCaml function instead of a
10571 C external. This should be faster.
10572 (Demi Marie Obenour)
10573
10574 - #580: Optimize immutable float records
10575 (Pierre Chambart, review by Mark Shinwell)
10576
10577 - #602: Do not generate dummy code to force module linking
10578 (Pierre Chambart, reviewed by Jacques Garrigue)
10579
10580 - #703: Optimize some constant string operations when the "-safe-string"
10581 configure time option is enabled.
10582 (Pierre Chambart)
10583
10584 - #707: Load cross module information during a meet
10585 (Pierre Chambart, report by Leo White, review by Mark Shinwell)
10586
10587 - #709: Share a few more equal switch branches
10588 (Pierre Chambart, review by Gabriel Scherer)
10589
10590 - #712: Small improvements to type-based optimizations for array
10591 and lazy
10592 (Alain Frisch, review by Pierre Chambart)
10593
10594 - #714: Prevent warning 59 from triggering on Lazy of constants
10595 (Pierre Chambart, review by Leo White)
10596
10597 - #723 Sort emitted functions according to source location
10598 (Pierre Chambart, review by Mark Shinwell)
10599
10600 - Lack of type normalization lead to missing simple compilation for "lazy x"
10601 (Alain Frisch)
10602
10603 ### Runtime system:
10604
10605 - #7203, #534: Add a new primitive caml_alloc_float_array to allocate an
10606 array of floats
10607 (Thomas Braibant)
10608
10609 - #7210, #562: Allows to register finalisation function that are
10610 called only when a value will never be reachable anymore. The
10611 drawbacks compared to the existing one is that the finalisation
10612 function is not called with the value as argument. These finalisers
10613 are registered with `GC.finalise_last`
10614 (François Bobot reviewed by Damien Doligez and Leo White)
10615
10616 - #247: In previous OCaml versions, inlining caused stack frames to
10617 disappear from stacktraces. This made debugging harder in presence of
10618 optimizations, and flambda was going to make this worse. The debugging
10619 information produced by the compiler now enables the reconstruction of the
10620 original backtrace. Use `Printexc.get_raw_backtrace_next_slot` to traverse
10621 the list of inlined stack frames.
10622 (Frédéric Bour, review by Mark Shinwell and Xavier Leroy)
10623
10624 - #590: Do not perform compaction if the real overhead is less than expected
10625 (Thomas Braibant)
10626
10627 ### Tools:
10628
10629 - #7189: toplevel #show, follow chains of module aliases
10630 (Gabriel Scherer, report by Daniel Bünzli, review by Thomas Refis)
10631
10632 - #7248: have ocamldep interpret -open arguments in left-to-right order
10633 (Gabriel Scherer, report by Anton Bachin)
10634
10635 - #7272, #798: ocamldoc, missing line breaks in type_*.html files
10636 (Florian Angeletti)
10637
10638 - #7290: ocamldoc, improved support for inline records
10639 (Florian Angeletti)
10640
10641 - #7323, #750: ensure "ocamllex -ml" works with -safe-string
10642 (Hongbo Zhang)
10643
10644 - #7350, #806: ocamldoc, add viewport metadata to generated html pages
10645 (Florian Angeletti, request by Daniel Bünzli)
10646
10647 - #452: Make the output of ocamldep more stable
10648 (Alain Frisch)
10649
10650 - #548: empty documentation comments
10651 (Florian Angeletti)
10652
10653 - #575: Add the -no-version option to the toplevel
10654 (Sébastien Hinderer)
10655
10656 - #598: Add a --strict option to ocamlyacc treat conflicts as errors
10657 (this option is now used for the compiler's parser)
10658 (Jeremy Yallop)
10659
10660 - #613: make ocamldoc use -open arguments
10661 (Florian Angeletti)
10662
10663 - #718: ocamldoc, fix order of extensible variant constructors
10664 (Florian Angeletti)
10665
10666 ### Debugging and profiling:
10667
10668 - #585: Spacetime, a new memory profiler (Mark Shinwell, Leo White)
10669
10670 ### Manual and documentation:
10671
10672 - #7007, #7311: document the existence of OCAMLPARAM and
10673 ocaml_compiler_internal_params
10674 (Damien Doligez, reports by Wim Lewis and Gabriel Scherer)
10675
10676 - #7243: warn users against using WinZip to unpack the source archive
10677 (Damien Doligez, report by Shayne Fletcher)
10678
10679 - #7245, #565: clarification to the wording and documentation
10680 of Warning 52 (fragile constant pattern)
10681 (Gabriel Scherer, William, Adrien Nader, Jacques Garrigue)
10682
10683 - #PR7265, #769: Restore 4.02.3 behaviour of Unix.fstat, if the
10684 file descriptor doesn't wrap a regular file (win32unix only)
10685 (Andreas Hauptmann, review by David Allsopp)
10686
10687 - #7288: flatten : Avoid confusion
10688 (Damien Doligez, report by user 'tormen')
10689
10690 - #7355: Gc.finalise and lazy values
10691 (Jeremy Yallop)
10692
10693 - #842: Document that [Store_field] must not be used to populate
10694 arrays of values declared using [CAMLlocalN] (Mark Shinwell)
10695
10696 ### Compiler distribution build system:
10697
10698 - #324: Compiler developers: Adding new C primitives to the
10699 standard runtime doesn't require anymore to run `make bootstrap`
10700 (François Bobot)
10701
10702 - #384: Fix compilation using old Microsoft C Compilers not
10703 supporting secure CRT functions (SDK Visual Studio 2005 compiler and
10704 earlier) and standard 64-bit integer literals (Visual Studio .NET
10705 2002 and earlier)
10706 (David Allsopp)
10707
10708 - #507: More sharing between Unix and Windows makefiles
10709 (whitequark, review by Alain Frisch)
10710
10711 * #512, #587: Installed `ocamlc`, `ocamlopt`, and `ocamllex` are
10712 now the native-code versions of the tools, if those versions were
10713 built.
10714 (Demi Marie Obenour)
10715
10716 - #525: fix build on OpenIndiana
10717 (Sergey Avseyev, review by Damien Doligez)
10718
10719 - #687: "./configure -safe-string" to get a system where
10720 "-unsafe-string" is not allowed, thus giving stronger non-local
10721 guarantees about immutability of strings
10722 (Alain Frisch, review by Hezekiah M. Carty)
10723
10724 ### Bug fixes:
10725
10726 * #6505: Missed Type-error leads to a segfault upon record access.
10727 (Jacques Garrigue, extra report by Stephen Dolan)
10728 Proper fix required a more restrictive approach to recursive types:
10729 mutually recursive types are seen as abstract types (i.e. non-contractive)
10730 when checking the well-foundedness of the recursion.
10731
10732 * #6752: Nominal types and scope escaping.
10733 Revert to strict scope for non-generalizable type variables, cf. Mantis.
10734 Note that this is actually stricter than the behavior before 4.03,
10735 cf. #7313, meaning that you may sometimes need to add type annotations
10736 to explicitly instantiate non-generalizable type variables.
10737 (Jacques Garrigue, following discussion with Jeremy Yallop,
10738 Nicolás Ojeda Bär and Alain Frisch)
10739
10740 - #7112: Aliased arguments ignored for equality of module types
10741 (Jacques Garrigue, report by Leo White)
10742
10743 - #7134: compiler forcing aliases it shouldn't while reporting type errors
10744 (Jacques Garrigue, report and suggestion by sliquister)
10745
10746 - #7153: document that Unix.SOCK_SEQPACKET is not really usable.
10747
10748 - #7165, #494: uncaught exception on invalid lexer directive
10749 (Gabriel Scherer, report by KC Sivaramakrishnan using afl-fuzz)
10750
10751 - #7257, #583: revert a 4.03 change of behavior on (Unix.sleep 0.),
10752 it now calls (nano)sleep for 0 seconds as in (< 4.03) versions.
10753 (Hannes Mehnert, review by Damien Doligez)
10754
10755 - #7259 and #603: flambda does not collapse pattern matching
10756 in some cases
10757 (Pierre Chambart, report by Reed Wilson, review by Mark Shinwell)
10758
10759 - #7260: GADT + subtyping compile time crash
10760 (Jacques Garrigue, report by Nicolás Ojeda Bär)
10761
10762 - #7269: Segfault from conjunctive constraints in GADT
10763 (Jacques Garrigue, report by Stephen Dolan)
10764
10765 - #7276: Support more than FD_SETSIZE sockets in Windows' emulation
10766 of select
10767 (David Scott, review by Alain Frisch)
10768
10769 * #7278: Prevent private inline records from being mutated
10770 (Alain Frisch, report by Pierre Chambart)
10771
10772 - #7284: Bug in mcomp_fields leads to segfault
10773 (Jacques Garrigue, report by Leo White)
10774
10775 - #7285: Relaxed value restriction broken with principal
10776 (Jacques Garrigue, report by Leo White)
10777
10778 - #7297: -strict-sequence turns off Warning 21
10779 (Jacques Garrigue, report by Valentin Gatien-Baron)
10780
10781 - #7299: remove access to OCaml heap inside blocking section in win32unix
10782 (David Allsopp, report by Andreas Hauptmann)
10783
10784 - #7300: remove access to OCaml heap inside blocking in Unix.sleep on Windows
10785 (David Allsopp)
10786
10787 - #7305: -principal causes loop in type checker when compiling
10788 (Jacques Garrigue, report by Anil Madhavapeddy, analysis by Leo White)
10789
10790 - #7330: Missing exhaustivity check for extensible variant
10791 (Jacques Garrigue, report by Elarnon *)
10792
10793 - #7374: Contractiveness check unsound with constraints
10794 (Jacques Garrigue, report by Leo White)
10795
10796 - #7378: GADT constructors can be re-exposed with an incompatible type
10797 (Jacques Garrigue, report by Alain Frisch)
10798
10799 - #7389: Unsoundness in GADT exhaustiveness with existential variables
10800 (Jacques Garrigue, report by Stephen Dolan)
10801
10802 * #533: Thread library: fixed [Thread.wait_signal] so that it
10803 converts back the signal number returned by [sigwait] to an
10804 OS-independent number
10805 (Jérémie Dimino)
10806
10807 - #600: (similar to #555) ensure that register typing constraints are
10808 respected at N-way join points in the control flow graph
10809 (Mark Shinwell)
10810
10811 - #672: Fix float_of_hex parser to correctly reject some invalid forms
10812 (Bogdan Tătăroiu, review by Thomas Braibant and Alain Frisch)
10813
10814 - #700: Fix maximum weak bucket size
10815 (Nicolás Ojeda Bär, review by François Bobot)
10816
10817 - #708 Allow more module aliases in strengthening (Leo White)
10818
10819 - #713, #7301: Fix wrong code generation involving lazy values in Flambda
10820 mode
10821 (Mark Shinwell, review by Pierre Chambart and Alain Frisch)
10822
10823 - #721: Fix infinite loop in flambda due to [@@specialise] annotations
10824
10825 - #779: Building native runtime on Windows could fail when bootstrapping
10826 FlexDLL if there was also a system-installed flexlink
10827 (David Allsopp, report Michael Soegtrop)
10828
10829 - #805, #815, #833: check for integer overflow in String.concat
10830 (Jeremy Yallop,
10831 review by Damien Doligez, Alain Frisch, Daniel Bünzli, Fabrice Le Fessant)
10832
10833 - #810: check for integer overflow in Array.concat
10834 (Jeremy Yallop)
10835
10836 - #814: fix the Buffer.add_substring bounds check to handle overflow
10837 (Jeremy Yallop)
10838
10839 - #880: Fix [@@inline] with default parameters in flambda (Leo White)
10840
10841 * #1353: add labels to BytesLabels.sub_string (Jacques Garrigue)
10842
10843 ### Internal/compiler-libs changes:
10844
10845 - #7200, #539: Improve, fix, and add test for parsing/pprintast.ml
10846 (Runhang Li, David Sheets, Alain Frisch)
10847
10848 - #351: make driver/pparse.ml functions type-safe
10849 (Gabriel Scherer, Dmitrii Kosarev, review by Jérémie Dimino)
10850
10851 - #516: Improve Texp_record constructor representation, and
10852 propagate updated record type information
10853 (Pierre Chambart, review by Alain Frisch)
10854
10855 - #678: Graphics.close_graph crashes 64-bit Windows ports (re-implementation
10856 of #3963)
10857 (David Allsopp)
10858
10859 - #679: delay registration of docstring after the mapper is applied
10860 (Hugo Heuzard, review by Leo White)
10861
10862 - #872: don't attach (**/**) comments to any particular node
10863 (Thomas Refis, review by Leo White)
10864
10865 OCaml 4.03.0 (25 Apr 2016):
10866 ---------------------------
10867
10868 (Changes that can break existing programs are marked with a "*")
10869
10870 ### Language features:
10871
10872 - #5528: inline records for constructor arguments
10873 (Alain Frisch)
10874
10875 - #6220, #6403, #6437, #6801:
10876 Improved redundancy and exhaustiveness checks for GADTs.
10877 Namely, the redundancy checker now checks whether the uncovered pattern
10878 of the pattern is actually inhabited, exploding at most one wild card.
10879 This is also done for exhaustiveness when there is only one case.
10880 Additionally, one can now write unreachable cases, of the form
10881 "pat -> .", which are treated by the redundancy check.
10882 (Jacques Garrigue)
10883
10884 - #6374: allow "_ t" as a short-hand for "(_, _, ..) t" for n-ary type
10885 constructors
10886 (Alain Frisch)
10887
10888 - #6714: allow [@@ocaml.warning] on most structure and signature items:
10889 values, modules, module types
10890 (whitequark)
10891
10892 - #6806: Syntax shortcut for putting a type annotation on a record field:
10893 { f1 : typ = e } is sugar for { f1 = (e : typ) }
10894 { f1 : typ } is sugar for { f1 = (f1 : typ) }
10895 (Valentin Gatien-Baron, review by Jérémie Dimino)
10896
10897 - #6806: Allow type annotations before the "->" in "fun <args> -> <expr>"
10898 fun x y : (int * int) -> (x, y)
10899 (Valentin Gatien-Baron, review by Jérémie Dimino)
10900
10901 - #26: support for "(type a b)" as syntactic sugar for "(type a) (type b)"
10902 (Gabriel Scherer)
10903
10904 - #42: short functor type syntax: "S -> T" for "functor (_ : S) -> T"
10905 (Leo White)
10906
10907 - #88: allow field punning in object copying expressions:
10908 {< x; y; >} is sugar for {< x = x; y = y; >}
10909 (Jeremy Yallop)
10910
10911 - #112: octal escape sequences for char and string literals
10912 "Make it \o033[1mBOLD\o033[0m"
10913 (Rafaël Bocquet, request by John Whitington)
10914
10915 - #167: allow to annotate externals' arguments and result types so
10916 they can be unboxed or untagged: [@unboxed], [@untagged]. Supports
10917 untagging int and unboxing int32, int64, nativeint and float.
10918 (Jérémie Dimino, Mark Shinwell)
10919
10920 - #173: [@inline] and [@inlined] attributes (for function declarations
10921 and call sites respectively) to control inlining
10922 (Pierre Chambart, Mark Shinwell)
10923
10924 - #188: accept [@@immediate] attribute on type declarations to mark types
10925 that are represented at runtime by an integer
10926 (Will Crichton, reviewed by Leo White)
10927
10928 * #234: allow "[]" as a user-defined constructor. Demand parenthesis
10929 around "::" when using "::" as user-defined constructor:
10930 code using "| :: of ..." must change to "| (::) of ...".
10931 (Runhang Li, review by Damien Doligez)
10932
10933 - #240: replace special annotations on externals by attributes:
10934 * "float" is generalized to [@@unboxed]
10935 * "noalloc" becomes [@@noalloc]
10936 Deprecate "float" and "noalloc".
10937 (Jérémie Dimino)
10938
10939 - #254: @ocaml.warn_on_literal_pattern attribute on constructors to
10940 warn when the argument is matches against a constant pattern. This
10941 attribute is applied on predefined exception constructors which
10942 carry purely informational (with no stability guarantee) messages.
10943 (Alain Frisch)
10944
10945 - #268: hexadecimal notation for floating-point literals: -0x1.ffffp+987
10946 In OCaml source code, FP literals can be written using the hexadecimal
10947 notation 0x<mantissa in hex>p<exponent> from ISO C99.
10948 (Xavier Leroy)
10949
10950 - #273: allow to get the extension slot of an extension constructor
10951 by writing [%extension_constructor <path>]
10952 (Jérémie Dimino)
10953
10954 - #282: change short-paths penalty heuristic to assign the same cost to
10955 idents containing double underscores as to idents starting with an underscore
10956 (Thomas Refis, Leo White)
10957
10958 - #6681 #326: signature items are now accepted as payloads for
10959 extension and attributes, using the syntax [%foo: SIG ] or [@foo: SIG ].
10960 Examples: "[%%client: val foo : int]" or "val%client foo : int".
10961 (Alain Frisch and Gabriel Radanne)
10962
10963 * #342: Allow shortcuts for extension and attributes on all keywords:
10964 module%foo, class[@foo], etc.
10965 The attribute in "let[@foo] .. in .." is now attached to the value binding,
10966 not to the expression.
10967 (Gabriel Radanne)
10968
10969 ### Compilers:
10970
10971 * #4231, #5461: warning 31 is now fatal by default
10972 (Warning 31: A module is linked twice in the same executable.)
10973 This is an interim solution; double-linking of modules has dangerous
10974 semantics, eg. exception constructors end up with two distinct declarations.
10975 (Alain Frisch)
10976
10977 - #4800: better compilation of tuple assignment
10978 (Gabriel Scherer and Alain Frisch)
10979
10980 - #5995: keep -for-pack into account to name exceptions;
10981 -for-pack should now be used during bytecode compilation as well
10982 (Alain Frisch, report by Christophe Troestler)
10983
10984 - #6400: better error message for '_' used as an expression
10985 (Alain Frisch, report by whitequark)
10986
10987 - #6501: harden the native-code generator against certain uses of "%identity"
10988 (Xavier Leroy, report by Antoine Miné)
10989
10990 - #6636: add --version option
10991 (whitequark)
10992
10993 - #6679: fix pprintast printing of constraints in type declarations
10994 (Alain Frisch, report by Jun Furuse)
10995
10996 - #6737: fix Typedtree attributes on (fun x -> body) expressions
10997 (Alain Frisch, report by Oleg Kiselyov)
10998
10999 * #6865: remove special case for parsing "let _ = expr" in structures
11000 (Jérémie Dimino, Alain Frisch)
11001
11002 * #6438, #7059, #315: Pattern guard disables exhaustiveness check
11003 (function Some x when x = 0 -> ()) will now raise warning 8 (non-exhaustive)
11004 instead of warning 25 (all clauses are guarded). 25 isn't raised anymore.
11005 Projects that set warning 8 as an error may fail to compile (presumably
11006 this is the semantics they wanted).
11007 (Alain Frisch, request by Martin Jambon and John Whitington)
11008
11009 - #6920: fix debug information around uses of %apply or %revapply
11010 (Jérémie Dimino, report by Daniel Bünzli)
11011
11012 - #6939: Segfault with improper use of let-rec
11013 (Alain Frisch)
11014
11015 - #6943: native-code generator for POWER/PowerPC 64 bits, both in
11016 big-endian (ppc64) and little-endian (ppc64le) configuration,
11017 inspired from RedHat's unofficial ppc64 and ppc64le ports
11018 (Xavier Leroy)
11019
11020 - #6979: better code generation in x86-32 backend for copying floats to
11021 the stack
11022 (Marc Lasson, review by Xavier Leroy)
11023
11024 - #7018: fix missing identifier renaming during inlining
11025 (Alain Frisch, review by Xavier Leroy)
11026
11027 - #7022, #259: unbox float and boxed ints earlier, avoid second pass
11028 (Alain Frisch)
11029
11030 - #7026, #288: remove write barrier for polymorphic variants without
11031 arguments
11032 (Simon Cruanes)
11033
11034 - #7031: new warning 57, ambiguous guarded or-patterns
11035 (Luc Maranget, Gabriel Scherer, report by Martin Clochard and Claude Marché)
11036
11037 - #7064, #316: allowing to mark compilation units and sub-modules as
11038 deprecated
11039 (Alain Frisch)
11040
11041 - #7067: fix performance regression (wrt. 4.01) in the native compiler
11042 for long nested structures
11043 (Alain Frisch, report by Daniel Bünzli, review by Jacques Garrigue)
11044
11045 - #7097: fix strange syntax error message around illegal packaged module
11046 signature constraints
11047 (Alain Frisch, report by Jun Furuse)
11048
11049 - #7118, #7120, #408, #476: Bug fixed in stack unwinding
11050 metadata generation. Was a cause of crashes in GUI programs on OS X.
11051 (Bart Jacobs, review by Mark Shinwell)
11052
11053 - #7168: Exceeding stack limit in bytecode can lead to a crash.
11054 (Jacques-Henri Jourdan)
11055
11056 - #7232: Strange Pprintast output with ppx_deriving
11057 (Damien Doligez, report by Anton Bachin)
11058
11059 - #17: some cmm optimizations of integer operations with constants
11060 (Stephen Dolan, review by Pierre Chambart)
11061
11062 - #89: improve type-specialization of unapplied primitives:
11063 unapplied annotations (compare : int -> _),
11064 type propagation (List.sort compare [1;2;3])
11065 and propagation from module signatures now lead to specialization
11066 (Frédéric Bour, review by Gabriel Scherer)
11067
11068 - #107: Prevent more unnecessary float boxing, especially in `if` and `match`
11069 (Vladimir Brankov, review by Alain Frisch)
11070
11071 - #109: new (lazy) unboxing strategy for float and int references
11072 (Vladimir Brankov, review by Alain Frisch)
11073
11074 - #115: More precise typing of values at the C-- and Mach level.
11075 (Xavier Leroy, review by Pierre Chambart)
11076
11077 - #132: Flambda: new intermediate language and "middle-end" optimizers
11078 (Pierre Chambart, Mark Shinwell, Leo White)
11079
11080 - #212, #7226, #542: emit column position in gas assembly `.loc`
11081 (Frédéric Bour, Anton Bachin)
11082
11083 - #207: Colors in compiler messages (warnings, errors)
11084 configure with -color {auto|always|never} or TERM=dumb
11085 (Simon Cruanes, review by Gabriel Scherer)
11086
11087 - #258: more precise information on PowerPC instruction sizes
11088 (Pierre Chambart, Xavier Leroy)
11089
11090 - #263: improve code generation for if-equivalents of (&&) and (||)
11091 (Pierre Chambart)
11092
11093 - #270: Make [transl_exception_constructor] generate [Immutable] blocks
11094 (Mark Shinwell)
11095
11096 - #271: Fix incorrect mutability flag when records are built using "with"
11097 (Mark Shinwell)
11098
11099 - #275: native-code generator for IBM z System running Linux.
11100 In memoriam Gene Amdahl, 1922-2015.
11101 (Bill O'Farrell, Tristan Amini, Xavier Leroy)
11102
11103 - #282: relax short-paths safety check in presence of module aliases, take
11104 penalty into account while building the printing map.
11105 (Thomas Refis, Leo White)
11106
11107 - #306: Instrument the compiler to debug performance regressions
11108 (Pierre Chambart)
11109
11110 - #319: add warning 58 for missing cmx files, and
11111 extend -opaque option to mli files: a missing .cmx does not warn
11112 if the corresponding .cmi is compiled -opaque.
11113 (Leo White)
11114
11115 - #388: OCAML_FLEXLINK environment variable allows overriding flexlink
11116 command (David Allsopp)
11117
11118 - #392: put all parsetree invariants in a new module Ast_invariants
11119 (Jérémie Dimino)
11120
11121 - #407: don't display the name of compiled .c files when calling the
11122 Microsoft C Compiler (same as the assembler).
11123 (David Allsopp)
11124
11125 - #431: permit constant float arrays to be eligible for pattern match
11126 branch merging
11127 (Pierre Chambart)
11128
11129 - #455: provide more debugging information to Js_of_ocaml
11130 (Jérôme Vouillon)
11131
11132 - #514, #554: Added several command-line flags to explicitly enable
11133 settings that are currently the default:
11134 `-alias-deps`, `-app-funct`, `-no-keep-docs`, `-no-keep-locs`,
11135 `-no-principal`, `-no-rectypes`, `-no-strict-formats`
11136 (Demi Marie Obenour)
11137
11138 - #545: use reraise to preserve backtrace on
11139 `match .. with exception e -> raise e`
11140 (Nicolás Ojeda Bär, review by Gabriel Scherer)
11141
11142 ### Runtime system:
11143
11144 * #596: make string/bytes distinguishable in the underlying
11145 compiler implementation; caml_fill_string and caml_create_string are
11146 deprecated and will be removed in the future, please use
11147 caml_fill_bytes and caml_create_bytes for migration
11148 (Hongbo Zhang, review by Damien Doligez, Alain Frisch, and Hugo Heuzard)
11149
11150 - #3612, #2429: allow allocating custom block with finalizers
11151 in the minor heap.
11152 (Pierre Chambart)
11153
11154 * #6517: use ISO C99 types {,u}int{32,64}_t in preference to our homegrown
11155 types {,u}int{32,64}.
11156 C stubs may have to be updated as {,u}int{32,64}_t are not defined anymore.
11157 (Xavier Leroy)
11158
11159 - #6760: closures evaluated in the toplevel can now be marshalled
11160 (whitequark, review by Jacques-Henri Jourdan)
11161
11162 - #6902, #210: emit a runtime warning on stderr
11163 when finalizing an I/O channel which is still open:
11164 "channel opened on file '...' dies without being closed"
11165 this is controlled by OCAMLRUNPARAM=W=1 or with Sys.enable_runtime_warnings.
11166 The behavior of affected program is not changed,
11167 but they should still be fixed.
11168 (Alain Frisch, review by Damien Doligez)
11169
11170 - Signal handling: for read-and-clear, use GCC/Clang atomic builtins
11171 if available.
11172 (Xavier Leroy)
11173
11174 - #6910, #224: marshaling (output_value, input_value, et al)
11175 now support marshaled data bigger than 4 Gb.
11176 (Xavier Leroy)
11177
11178 * #22: The undocumented layout of weak arrays has been changed. Finalisation
11179 functions are now run before the erasure of the corresponding values.
11180
11181 * #226: select higher levels of optimization for GCC >= 3.4 and Clang
11182 when compiling the run-time system and C stub code.
11183 "-std=gnu99 -O2 -fno-strict-aliasing -fwrapv" is used by default.
11184 This also affects default flags for user stubs compiled with "ocamlc -c foo.c"
11185 and may uncover bugs in them.
11186 (Xavier Leroy)
11187
11188 - #262: Multiple GC roots per compilation unit
11189 (Pierre Chambart, Mark Shinwell, review by Damien Doligez)
11190
11191 * #297: Several changes to improve the worst-case GC pause time.
11192 Changes Gc.control and Gc.major_slice and adds functions to the Gc module.
11193 (Damien Doligez, with help from François Bobot, Thomas Braibant, Leo White)
11194
11195 - #325: Add v=0x400 flag to OCAMLRUNPARAM to display GC stats on exit
11196 (Louis Gesbert, review by Alain Frisch)
11197
11198 ### Standard library:
11199
11200 - #7848, #230: Array.map2, Array.iter2
11201 (John Christopher McAlpine)
11202
11203 - #5197, #63: Arg: allow flags such as --flag=arg as well as --flag arg
11204 (Richard Jones)
11205
11206 - #6017, #7034, #267: More efficient ifprintf implementation
11207 (Jeremy Yallop, review by Gabriel Scherer)
11208
11209 - #6296: Some documentation on the floating-point representations
11210 recognized by Pervasives.float_of_string
11211 (Xavier Leroy)
11212
11213 - #6316: Scanf.scanf failure on %u formats when reading big integers
11214 (Xavier Leroy, Benoît Vaugon)
11215
11216 - #6321: guarantee that "hypot infinity nan = infinity"
11217 (for conformance with ISO C99)
11218 (Xavier Leroy)
11219
11220 - #6390, #36: expose Sys.{int_size,max_wosize} for js_of_ocaml portability
11221 (Hugo Heuzard)
11222
11223 - #6449: Add Map.union
11224 (Alain Frisch)
11225
11226 * #6494: Add 'equal' functions in modules
11227 Bytes, Char, Digest, Int32, Int64, Nativeint, and String
11228 Users defining their own modules with signature 'module type of Int32'
11229 have to extend their implementation.
11230 (Romain Calascibetta)
11231
11232 * #6524, #79: Filename: Optional ?perms argument to open_temp_file
11233 May break partial applications of the function (fix by passing ?perms:None)
11234 (Daniel Bünzli, review by Kate Deplaix)
11235
11236 * #6525, #80: Add Uchar module to the standard library
11237 May introduce module name conflicts with existing projects.
11238 (Daniel Bünzli, review by Yoriyuki Yamagata and Damien Doligez)
11239
11240 - #6577: improve performance of %L, %l, %n, %S, %C format specifiers
11241 (Alain Frisch)
11242
11243 - #6585: fix memory leak in win32unix/createprocess.c
11244 (Alain Frisch, report by user 'aha')
11245
11246 - #6645, #174: Guarantee that Set.add, Set.remove, Set.filter
11247 return the original set if no change is required
11248 (Alain Frisch, Mohamed Iguernlala)
11249
11250 - #6649, #222: accept (int_of_string "+3")
11251 (John Christopher McAlpine)
11252
11253 - #6694, #6695, #124: deprecate functions using ISO-8859-1 character set
11254 in Char, Bytes, String and provide alternatives *_acii using US-ASCII.
11255 Affected functions:
11256 {Char,String,Bytes}.{uppercase,lowercase},
11257 {String,Bytes}.{capitalize,uncaptialize}
11258 (whitequark, review by Damien Doligez)
11259
11260 - #22: Add the Ephemeron module that implements ephemerons and weak
11261 hash table
11262 (François Bobot, review by Damien Doligez, Daniel Bünzli,
11263 Alain Frisch, Pierre Chambart)
11264
11265 - #164: more efficient (branchless) implementation of Pervasives.compare
11266 specialized at type 'float'.
11267 (Vladimir Brankov)
11268
11269 - #175: Guarantee that Map.add, Map.remove, Map.filter
11270 return the original map if no change is required.
11271 (Mohamed Iguernlala)
11272
11273 - #201: generalize types of Printf.{ifprintf,ikfprintf}
11274 (Maxence Guesdon)
11275
11276 - #216: add the missing POSIX.1-2001 signals in Sys
11277 (Guillaume Bury)
11278
11279 - #239: remove type-unsafe code from Stream
11280 (Pierre Chambart, review by Gabriel Scherer and Jeremy Yallop)
11281
11282 - #250: Check for negative start element in Array.sub
11283 (Jeremy Yallop)
11284
11285 - #265: new implementation of Queue avoiding Obj.magic
11286 (Jérémie Dimino)
11287
11288 - #268, #303: '%h' and '%H' modifiers for printf and scanf to
11289 support floating-point numbers in hexadecimal notation
11290 (Xavier Leroy, Benoît Vaugon)
11291
11292 - #272: Switch classify_float to [@@unboxed]
11293 (Alain Frisch)
11294
11295 - Improve speed of classify_float by not going through fpclassify()
11296 (Alain Frisch, Xavier Leroy)
11297
11298 - #277: Switch the following externals to [@@unboxed]:
11299 * {Nativeint,Int32,Int64}.{of,to}_float
11300 * Int{32,64}.float_of_bits
11301 * Int{32,64}.bits_of_float
11302 (Jérémie Dimino)
11303
11304 - #281: Switch the following externals to [@@unboxed]:
11305 * Sys.time (and [@@noalloc])
11306 * Pervasives.ldexp (and [@@noalloc])
11307 * Pervasives.compare for float, nativeint, int32, int64.
11308 (François Bobot)
11309
11310 - #3622, #195: add function Stack.fold
11311 (Simon Cruanes)
11312
11313 - #329: Add exists, for_all, mem and memq functions in Array
11314 (Bernhard Schommer)
11315
11316 - #337: Add [Hashtbl.filter_map_inplace]
11317 (Alain Frisch)
11318
11319 - #356: Add [Format.kasprintf]
11320 (Jérémie Dimino, Mark Shinwell)
11321
11322 ### Type system:
11323
11324 - #5545: Type annotations on methods cannot control the choice of abbreviation
11325 (Jacques Garrigue)
11326
11327 * #6465: allow incremental weakening of module aliases.
11328 This is done by adding equations to submodules when expanding aliases.
11329 In theory this may be incompatible is some corner cases defining a module
11330 type through inference, but no breakage known on published code.
11331 (Jacques Garrigue)
11332
11333 - #6593: Functor application in tests/basic-modules fails after commit 15405
11334 (Jacques Garrigue)
11335
11336 ### Toplevel and debugger:
11337
11338 - #6113: Add descriptions to directives, and display them via #help
11339 (Nick Giannarakis, Berke Durak, Francis Southern and Gabriel Scherer)
11340
11341 - #6396: Warnings-as-errors not properly flushed in the toplevel
11342 (Alain Frisch)
11343
11344 - #6401: use proper error reporting for toplevel environment initialization:
11345 no more Env.Error(_) at start time
11346 (Gabriel Scherer, Alain Frisch)
11347
11348 - #6468: toplevel now supports backtraces if invoked with OCAMLRUNPARAM=b
11349 (whitequark and Jake Donham,
11350 review by Gabriel Scherer and Jacques-Henri Jourdan)
11351
11352 - #6906: wrong error location for unmatched paren with #use in toplevel
11353 (Damien Doligez, report by Kenichi Asai)
11354
11355 - #6935, #298: crash in debugger when load_printer is given a directory
11356 (Junsong Li, review by Gabriel Scherer)
11357
11358 - #7081: report preprocessor warnings in the toplevel
11359 (Valentin Gatien-Baron, review by Jérémie Dimino)
11360
11361 - #7098: Loss of ppx context in toplevel after an exception
11362 (Alain Frisch, report by whitequark)
11363
11364 - #7101: The toplevel does not close in_channel for libraries specified on
11365 its command line
11366 (Alain Frisch)
11367
11368 - #7119: the toplevel does not respect [@@@warning]
11369 (Alain Frisch, report by Gabriel Radanne)
11370
11371 ### Other libraries:
11372
11373 * Unix library: channels created by Unix.in_channel_of_descr or
11374 Unix.out_channel_of_descr no longer support text mode under Windows.
11375 Calling [set_binary_mode_{in,out} chan false] on these channels
11376 now causes an error.
11377 (Xavier Leroy)
11378
11379 - #4023 and #68: add Unix.sleepf (sleep with sub-second resolution)
11380 (Evgenii Lepikhin and Xavier Leroy)
11381
11382 * Protect Unix.sleep against interruptions by handled signals.
11383 Before, a handled signal could cause Unix.sleep to return early.
11384 Now, the sleep is restarted until the given time is elapsed.
11385 (Xavier Leroy)
11386
11387 * #6120, #462: implement Unix.symlink and Unix.readlink on
11388 Windows. Unix.symlink has a new optional argument to_dir (ignored on
11389 non-native Windows platforms). stat functions reimplemented to avoid
11390 buggy Microsoft CRT implementations (native Windows only)
11391 (David Allsopp, review by Daniel Bünzli)
11392
11393 - #6263: add kind_size_in_bytes and size_in_bytes functions
11394 to Bigarray module.
11395 (Runhang Li, review by Mark Shinwell)
11396
11397 - #6289: Unix.utimes uses the current time only if both arguments
11398 are exactly 0.0. Also, use sub-second resolution if available.
11399 (Xavier Leroy, report by Christophe Troestler)
11400
11401 - #6896: serious reimplementation of Big_int.float_of_big_int and
11402 Ratio.float_of_ratio, ensuring that the result is correctly rounded.
11403 (Xavier Leroy)
11404
11405 - #6989: in Str library, make sure that all \(...\) groups are binding
11406 and can be consulted with Str.matched_group. There used to be
11407 a limitation to 32 binding groups.
11408 (Xavier Leroy)
11409
11410 - #7013: spurious wake-up in the Event module
11411 (Xavier Leroy)
11412
11413 - #7024: in documentation of Str regular expressions, clarify what
11414 "end of line" means for "^" and "$" regexps.
11415 (Xavier Leroy, question by Fredrik Lindgren)
11416
11417 - #7209: do not run at_exit handlers in [Unix.create_process] and
11418 similar functions when the [exec] call fails in the child process
11419 (Jérémie Dimino)
11420
11421 ### OCamldep:
11422
11423 - #286: add support for module aliases
11424 (Jacques Garrigue)
11425
11426 ### Manual:
11427
11428 - #302: The OCaml reference manual is now included in the manual/
11429 subdirectory of the main OCaml source repository. Contributions to
11430 the manual are warmly welcome.
11431 (François Bobot, review by Florian Angeletti)
11432
11433 - #6601: replace strcpy with caml_strdup in sample code
11434 (Christopher Zimmermann)
11435
11436 - #6676: ongoing simplification of the "Language Extensions" section
11437 (Alain Frisch, John Whitington)
11438
11439 - #6898: Update win32 support documentation of the Unix library
11440 (Damien Doligez, report by Daniel Bünzli)
11441
11442 - #7092, #379: Add missing documentation for new 4.03 features
11443 (Florian Angeletti)
11444
11445 - #7094, #468, #551: add new section 8.5 to document warnings
11446 The general idea is to document warnings that may require explanations.
11447 Currently documented warnings are:
11448 - 52: Fragile constant pattern.
11449 - 57: Ambiguous or-pattern variables under guard
11450 (Florian Angeletti and Gabriel Scherer)
11451
11452 - #7109, #380: Fix bigarray documentation layout
11453 (Florian Angeletti, Leo White)
11454
11455 ### Bug fixes:
11456
11457 - #3612: memory leak in bigarray read from file
11458 (Pierre Chambart, report by Gary Huber)
11459
11460 * #4166, #6956: force linking when calling external C primitives
11461 (Jacques Garrigue, reports by Markus Mottl and Christophe Troestler)
11462
11463 * #4466, #5325: under Windows, concurrent read and write operations
11464 on the same socket could block unexpectedly. Fixed by keeping sockets
11465 in asynchronous mode rather than creating them in synchronous mode.
11466 (Xavier Leroy)
11467
11468 * #4539: change exception string raised when comparing functional values
11469 May break programs matching on the string argument of Invalid_argument.
11470 Matching on the string argument of Invalid_argument or Failure is a
11471 programming mistake: these strings may change in future versions.
11472 (Nicolas Braud-Santoni, report by Eric Cooper)
11473
11474 - #4832: Filling bigarrays may block out runtime
11475 (Markus Mottl)
11476
11477 - #5663: program rejected due to nongeneralizable type variable that
11478 appears nowhere
11479 (Jacques Garrigue, report by Stephen Weeks)
11480
11481 - #5780: report more informative type names in GADTs error messages
11482 (Jacques Garrigue, report by Sebastien Furic)
11483
11484 - #5887: move the byterun/*.h headers to byterun/caml/*.h to avoid header
11485 name clashes
11486 (Jérôme Vouillon and Adrien Nader and whitequark)
11487
11488 * #6081: ocaml now adds script's directory to search path, not current
11489 directory
11490 (Thomas Leonard and Damien Doligez)
11491
11492 - #6108, #6802: fail cleanly if dynlink.cma or ocamltoplevel.cma
11493 are loaded inside the toplevel loop.
11494 (Xavier Leroy)
11495
11496 - #6171: Confusing error message when a type escapes its scope.
11497 (Jacques Garrigue and Leo White, report by John Whitington)
11498
11499 - #6340: Incorrect handling of \r when processing "Windows" source files
11500 (Damien Doligez, report by David Allsopp)
11501
11502 - #6342: Incorrect error message when type constraints differ
11503 (Alain Frisch, report by Philippe Wang)
11504
11505 * #6521: {Bytes,Char,String}.escaped were locale-dependent
11506 we now escape all non-ASCII-printable instead of a locale-dependent subset.
11507 (Damien Doligez, report by Jun Furuse)
11508
11509 - #6526: ocamllex should not warn on unescaped newline inside comments
11510 (Damien Doligez, report by user 'dhekir')
11511
11512 - #6341: ocamldoc -colorize-code adds spurious <br> tags to <pre> blocks
11513 (Maxence Guesdon, report by Damien Doligez)
11514
11515 - #6560: Wrong failure message for {Int32,Int64,NativeInt}.of_string
11516 It reported (Failure "int_of_string"), now "Int32.of_string" etc.
11517 (Maxime Dénès and Gabriel Scherer)
11518
11519 - #6648: show_module should indicate its elision
11520 (Jacques Garrigue, report by Leo White)
11521
11522 - #6650: Cty_constr not handled correctly by Subst
11523 (Jacques Garrigue, report by Leo White)
11524
11525 - #6651: Failing component lookup
11526 (Jacques Garrigue, report by Leo White)
11527
11528 * #6664: Crash when finalising lazy values of the wrong type.
11529 (Damien Doligez)
11530
11531 - #6672: Unused variance specification allowed in with constraint
11532 (Jacques Garrigue, report by Leo White)
11533
11534 - #6677: Allow to disable warning 39 (useless "rec") with [@ocaml.warning]
11535 applied to the first value binding of the would-be "rec" declaration
11536 (Alain Frisch, report by Jun Furuse)
11537
11538 - #6744: Univars can escape through polymorphic variants (partial fix)
11539 (Jacques Garrigue, report by Leo White)
11540
11541 - #6752: Extensible variant types and scope escaping
11542 A side-effect of the fix is that (ocamlc -i) sometimes reports
11543 (type-sound) invalid signature, with a type used before its declaration.
11544 (Jacques Garrigue, report by Maxence Guesdon)
11545
11546 - #6762: improve warning 45 in presence of re-exported type definitions
11547 (Warning 45: open statement shadows the constructor)
11548 (Alain Frisch, report by Olivier Andrieu)
11549
11550 - #6776: Failure to kill the "tick" thread, segfault when exiting the runtime
11551 (Damien Doligez, report by Thomas Braibant)
11552
11553 - #6780: Poor error message for wrong -farch and -ffpu options (ocamlopt, ARM)
11554 (Xavier Leroy, report by whitequark)
11555
11556 - #6805: Duplicated expression in case of hole in a non-failing switch.
11557 (Luc Maranget)
11558
11559 * #6808: the parsing of OCAMLRUNPARAM is too lax
11560 (Damien Doligez)
11561
11562 - #6874: Inefficient code generated for module function arguments
11563 (Jacques Garrigue, report by Markus Mottl)
11564
11565 - #6888: The list command of ocamldebug uses the wrong file
11566 (Damien Doligez, report by Pierre-Marie Pédrot)
11567
11568 - #6897: Bad error message for some pattern matching on extensible variants
11569 (Alain Frisch, report by Gabriel Radanne)
11570
11571 - #6899: Optional parameters and non generalizable type variables
11572 (Thomas Refis and Leo White)
11573
11574 - #6907: Stack overflow printing error in class declaration
11575 (Jacques Garrigue, report by Ivan Gotovchits)
11576
11577 - #6931: Incorrect error message on type error inside record construction
11578 (Damien Doligez, report by Leo White)
11579
11580 - #6938: fix regression on "%047.27{l,L,n}{d,i,x,X,o,u}"
11581 (Benoît Vaugon, report by Arduino Cascella)
11582
11583 - #6944: let module X = Path in … is not typed as a module alias
11584 (Jacques Garrigue, report by Frédéric Bour)
11585
11586 - #6945 and #227: protect Sys and Unix functions against string
11587 arguments containing the null character '\000'
11588 (Simon Cruanes and Xavier Leroy, report by Daniel Bünzli)
11589
11590 - #6946: Uncaught exception with wrong type for "%ignore"
11591 (Jacques Garrigue, report by Leo White)
11592
11593 - #6954: Infinite loop in type checker with module aliases
11594 (Jacques Garrigue, report by Markus Mottl)
11595
11596 - #6972, #276: 4.02.3 regression on documentation comments in .cmt files
11597 (Leo White, report by Olivier Andrieu)
11598
11599 - #6977: String literals in comments interpret escape sequences
11600 (Damien Doligez, report by Daniel Bünzli and David Sheets)
11601
11602 - #6980: Assert failure from polymorphic variants and existentials
11603 (Jacques Garrigue, report by Leo White)
11604
11605 - #6981: Ctype.Unify(_) with associated functor arg referring to previous one
11606 (Jacques Garrigue, report by Nicholas Labich)
11607
11608 - #6982: unexpected type error when packing a module alias
11609 (Jacques Garrigue, report by Valentin Gatien-Baron)
11610
11611 - #6985: `module type of struct include Bar end exposes
11612 %s#row when Bar contains private row types
11613 (Jacques Garrigue, report by Nicholas Labich)
11614
11615 - #6992: Segfault from bug in GADT/module typing
11616 (Jacques Garrigue, report by Stephen Dolan)
11617
11618 - #6993: Segfault from recursive modules violating exhaustiveness assumptions
11619 (Jacques Garrigue, report by Stephen Dolan)
11620
11621 - #6998: Typer fails reading unnecessary cmis with -no-alias-deps and -w -49
11622 (Leo White, report by Valentin Gatien-Baron)
11623
11624 - #7003: String.sub may cause segmentation fault on sizes above 2^31
11625 (Damien Doligez, report by Radek Micek)
11626
11627 - #7008: Fatal error in ocamlc with empty compilation unit name
11628 (Damien Doligez, report by Cesar Kunz)
11629
11630 - #7012: Variable name forgotten when it starts with a capital letter
11631 (Jacques Garrigue, Gabriel Scherer,
11632 report by Thomas Leonard and Florian Angeletti)
11633
11634 - #7016: fix Stack overflow in GADT typing
11635 Note: Equi-recursive types are considered when checking GADT pattern
11636 exhaustiveness, even when -rectypes is not used.
11637 (Jacques Garrigue, report by Mikhail Mandrykin)
11638
11639 - #7030: libasmrun_shared.so fails to build on SPARC Solaris
11640 (report and fix by Patrick Star)
11641
11642 - #7036: Module alias is not taken into account when checking module
11643 type compatibility (in a class type)
11644 (Jacques Garrigue)
11645
11646 - #7037: more reproducible builds, don't put temp file names into objects
11647 (Xavier Leroy)
11648
11649 - #7038: out of memory condition in caml_io_mutex_lock
11650 (Xavier Leroy, report by Marc Lasson)
11651
11652 - #7039: Unix.getsockname returns garbage for unnamed PF_UNIX sockets
11653 (Xavier Leroy)
11654
11655 - #7042 and #295: CSE optimization confuses the FP literals +0.0 and -0.0
11656 (Xavier Leroy)
11657
11658 - #7075: Fix repetitions in ocamldoc generated documentation
11659 (Florian Angeletti)
11660
11661 - #7082: Object type in recursive module's `with` annotation
11662 (Jacques Garrigue and Alain Frisch, report by Nicholas Labich)
11663
11664 - #7096: ocamldoc uses an incorrect subscript/superscript style
11665 (Gabriel Scherer, report by user 'pierpa')
11666
11667 - #7108: ocamldoc, have -html preserve custom/extended html generators
11668 (Armaël Guéneau)
11669
11670 - #7111: reject empty let bindings instead of printing incorrect syntax
11671 (Jérémie Dimino)
11672
11673 * #7113: -safe-string can break GADT compatibility check
11674 bytes and string are now considered compatible even with -safe-string,
11675 which may break exhaustivity for code assuming they were disjoint
11676 (Jacques Garrigue, report by Jeremy Yallop)
11677
11678 - #7115: shadowing in a branch of a GADT match breaks unused variable warning
11679 (Alain Frisch, report by Valentin Gatien-Baron)
11680
11681 - #7133, #450: generate local jump labels on OS X
11682 (Bart Jacobs)
11683
11684 - #7135: only warn about ground coercions in -principal mode
11685 (Jacques Garrigue, report by Jeremy Yallop)
11686
11687 * #7152: Typing equality involving non-generalizable type variable
11688 A side-effect of the fix is that, for deeply nested non generalizable
11689 type variables, having an interface file may no longer be sufficient,
11690 and you may have to add a local type annotation (cf #7313)
11691 (Jacques Garrigue, report by François Bobot)
11692
11693 - #7160: Type synonym definitions can weaken gadt constructor types
11694 (Jacques Garrigue, report by Mikhail Mandrykin)
11695
11696 - #7181: Misleading error message with GADTs and polymorphic variants
11697 (Jacques Garrigue, report by Pierre Chambart)
11698
11699 - #7182: Assertion failure with recursive modules and externals
11700 (Jacques Garrigue, report by Jeremy Yallop)
11701
11702 - #7196: "let open" is not correctly pretty-printed to the left of a ';'
11703 (Gabriel Scherer, report by Christophe Raffalli)
11704
11705 - #7214: Assertion failure in Env.add_gadt_instances
11706 (Jacques Garrigue, report by Stephen Dolan)
11707
11708 - #7220: fix a memory leak when using both threads and exception backtraces
11709 (Gabriel Scherer, review by François Bobot, report by Rob Hoes)
11710
11711 - #7222: Escaped existential type
11712 (Jacques Garrigue, report by Florian Angeletti)
11713
11714 - #7230: Scrutinee discarded in match with only refutation cases
11715 (Jacques Garrigue, report by Jeremy Yallop)
11716
11717 - #7234: Compatibility check wrong for abstract type constructors
11718 (Jacques Garrigue, report by Stephen Dolan)
11719
11720 - #7324: OCaml 4.03.0 type checker dies with an assert failure when
11721 given some cyclic recursive module expression
11722 (Jacques Garrigue, report by jmcarthur)
11723
11724 - #7368: Manual major GC fails to compact the heap
11725 (Krzysztof Pszeniczny)
11726
11727 - #205: Clear caml_backtrace_last_exn before registering as root
11728 (report and fix by Frédéric Bour)
11729
11730 - #220: minor -dsource error on recursive modules
11731 (Hongbo Zhang)
11732
11733 - #228: fix a dangling internal pointer in (bytecode) debug_info
11734 (Gabriel Scherer and Mark Shinwell and Xavier Leroy)
11735
11736 - #233: Make CamlinternalMod.init_mod robust to optimization
11737 (Pierre Chambart, Mark Shinwell)
11738
11739 - #249: fix a few hardcoded ar commands
11740 (Daniel Bünzli)
11741
11742 - #251: fix cross-compilation with ocamldoc enabled
11743 (whitequark)
11744
11745 - #280: Fix stdlib dependencies for .p.cmx
11746 (Pierre Chambart, Mark Shinwell)
11747
11748 - #283: Fix memory leaks in intern.c when OOM is raised
11749 (Marc Lasson, review by Alain Frisch)
11750
11751 - #22: Fix the cleaning of weak pointers. In very rare cases
11752 accessing a value during the cleaning of the weak pointers could
11753 result in the value being removed from one weak arrays and kept in
11754 another one. That breaks the property that a value is removed from a
11755 weak pointer only when it is dead and garbage collected.
11756 (François Bobot, review by Damien Doligez)
11757
11758 - #313: Prevent quadratic cases in CSE
11759 (Pierre Chambart, review by Xavier Leroy)
11760
11761 - #6795, #6996: Make ocamldep report errors passed in
11762 [%ocaml.error] extension points
11763 (Jérémie Dimino)
11764
11765 - #355: make ocamlnat build again
11766 (Jérémie Dimino, Thomas Refis)
11767
11768 - #405: fix compilation under Visual Studio 2015
11769 (David Allsopp)
11770
11771 - #441: better type error location in presence of type constraints
11772 (Thomas Refis, report by Arseniy Alekseyev)
11773
11774 - #477: reallow docstrings inside object types, and inside polymorphic
11775 variant and arrow types
11776 (Thomas Refis)
11777
11778 ### Features wishes:
11779
11780 - #4518, #29: change location format for reporting errors in ocamldoc
11781 (Sergei Lebedev)
11782
11783 - #4714: List.cons
11784
11785 - #5418 (comments) : generate dependencies with $(CC) instead of gcc
11786 (Damien Doligez, report by Michael Grünewald)
11787
11788 - #6167: OCAMLPARAM support for disabling PIC generation ("pic=0")
11789 (Gabor Pali)
11790
11791 - #6367, #25: introduce Asttypes.arg_label to encode labelled arguments
11792 (Frédéric Bour and Jacques Garrigue)
11793
11794 - #6452, #140: add internal support for custom printing formats
11795 (Jérémie Dimino)
11796
11797 - #6611: remove the option wrapper on optional arguments in the syntax tree
11798 (Alain Frisch, review by Damien Doligez, request by whitequark)
11799
11800 - #6635: support M.[], M.(), M.{< >} and M.[| |]
11801 (Jeremy Yallop, review by Gabriel Radanne)
11802
11803 - #6691: install .cmt[i] files for stdlib and compiler-libs
11804 (David Sheets, request by Gabriel Radanne)
11805
11806 - #6722: compatibility with x32 architecture (x86-64 in ILP32 mode).
11807 ocamlopt is not supported, but bytecode compiles cleanly.
11808 (Adam Borowski and Xavier Leroy)
11809
11810 - #6742: remove duplicate virtual_flag information from Tstr_class
11811 (Gabriel Radanne and Jacques Garrigue)
11812
11813 - #6719: improve Buffer.add_channel when not enough input is available
11814 (Simon Cruanes)
11815
11816 * #6816: reject integer and float literals directly followed by an identifier.
11817 This was previously read as two separate tokens.
11818 [let abc = 1 in (+) 123abc] was accepted and is now rejected.
11819 (Hugo Heuzard)
11820
11821 - #6876: improve warning 6 by listing the omitted labels.
11822 (Warning 6: Label omitted in function application)
11823 (Eyyüb Sari)
11824
11825 - #6924: tiny optim to avoid some spilling of floats in x87
11826 (Alain Frisch)
11827
11828 - #111: `(f [@taillcall]) x y` warns if `f x y` is not a tail-call
11829 (Simon Cruanes)
11830
11831 - #118: ocamldep -allow-approx: fallback to a lexer-based approximation
11832 (Frédéric Bour)
11833
11834 - #137: add untypeast.ml (in open recursion style) to compiler-libs
11835 (Gabriel Radanne)
11836
11837 - #142: add a CAMLdrop macro for undoing CAMLparam*/CAMLlocal*
11838 (Thomas Braibant and Damien Doligez)
11839
11840 - #145: speeedup bigarray access by optimizing Cmmgen.bigarray_indexing
11841 (Vladimir Brankov, review by Gabriel Scherer)
11842
11843 - #147: [type 'a result = Ok of 'a | Error of 'b] in Pervasives
11844 (Yaron Minsky)
11845
11846 - #156, #279: optimize caml_frame_descriptors realloc (dynlink speedup)
11847 (Pierre Chambart, Alain Frisch,
11848 review by François Bobot, Xavier Leroy and Damien Doligez)
11849
11850 - #165, #221: fix windows compilation warnings
11851 (Bernhard Schommer, Gabriel Scherer, report by Alain Frisch)
11852
11853 * #170: Parse arbitrary precision integers.
11854 Accept a single [A-Za-z] as modifier for integers (generalizing 'l','L','n')
11855 and floats.
11856 May cause breakage (ie. ppx preprocessor) because of changes in the parsetree.
11857 This changes #6816 a little bit by reading the literal [123a] as a single
11858 token that can later be rewritten by a ppx preprocessor.
11859 (Hugo Heuzard)
11860
11861 - #189: Added .dylib and .so as extensions for ocamlmklib
11862 (Edgar Aroutiounian, whitequark)
11863
11864 - #191: Making gc.h and some part of memory.h public
11865 (Thomas Refis)
11866
11867 - #196: Make [Thread.id] and [Thread.self] [noalloc]
11868 (Clark Gaebel)
11869
11870 - #237: a CONTRIBUTING document
11871 (François Bobot, Gabriel Scherer, review by Xavier Leroy)
11872
11873 - #245: remove a few remaining French comments
11874 (Florian Angeletti)
11875
11876 - #252: improve build instructions in MSVC Windows README
11877 (Philip Daian)
11878
11879 - #308: add experimental support for NetBSD/arm (verified on RaspberryPi)
11880 (Rich Neswold)
11881
11882 - #335: Type error messages specifies if a type is abstract
11883 because no corresponding cmi could be found.
11884 (Hugo Heuzard)
11885
11886 - #365: prevent printing just a single type variable on one side
11887 of a type error clash.
11888 (Hugo Heuzard)
11889
11890 - #383: configure: define _ALL_SOURCE for build on AIX7.1
11891 (tkob)
11892
11893 - #401: automatically retry failed test directories in the testsuite
11894 (David Allsopp)
11895
11896 - #451: an optional 'parallel' target in testsuite/Makefile using the
11897 GNU parallel tool to run tests in parallel.
11898 (Gabriel Scherer)
11899
11900 - #555: ensure that register typing constraints are respected at
11901 join points in the control flow graph
11902 (Mark Shinwell, debugging & test case by Arseniy Alekseyev and Leo White,
11903 code review by Xavier Leroy)
11904
11905 ### Build system:
11906
11907 - #388: FlexDLL added as a Git submodule and bootstrappable with the compiler
11908 (David Allsopp)
11909
11910 OCaml 4.02.3 (27 Jul 2015):
11911 ---------------------------
11912
11913 Bug fixes:
11914 - #6908: Top-level custom printing for GADTs: interface change in 4.02.2
11915 (Grégoire Henry, report by Jeremy Yallop)
11916 - #6919: corrupted final_table
11917 (ygrek)
11918 - #6926: Regression: ocamldoc lost unattached comment
11919 (Damien Doligez, report by François Bobot)
11920 - #6930: Aliased result type of GADT constructor results in assertion failure
11921 (Jacques Garrigue)
11922
11923 Feature wishes:
11924 - #6691: install .cmt[i] files for stdlib and compiler-libs
11925 (David Sheets, request by Gabriel Radanne)
11926 - #37: New primitive: caml_alloc_dummy_function
11927 (Hugo Heuzard)
11928
11929 OCaml 4.02.2 (17 Jun 2015):
11930 ---------------------------
11931
11932 (Changes that can break existing programs are marked with a "*")
11933
11934 Language features:
11935 - #6583: add a new class of binary operators with the same syntactic
11936 precedence as method calls; these operators start with # followed
11937 by a non-empty sequence of operator symbols (for instance #+, #!?).
11938 It is also possible to use '#' as part of these extra symbols
11939 (for instance ##, or #+#); this is rejected by the type-checker,
11940 but can be used e.g. by ppx rewriters.
11941 (Alain Frisch, request by Gabriel Radanne)
11942 * #6016: add a "nonrec" keyword for type declarations
11943 (Jérémie Dimino)
11944 * #6612, #152: change the precedence of attributes in type declarations
11945 (Jérémie Dimino)
11946
11947 Compilers:
11948 - #6600: make -short-paths faster by building the printing map
11949 incrementally
11950 (Jacques Garrigue)
11951 - #6642: replace $CAMLORIGIN in -ccopt with the path to cma or cmxa
11952 (whitequark, Gabriel Scherer, review by Damien Doligez)
11953 - #6797: new option -output-complete-obj
11954 to output an object file with included runtime and autolink libraries
11955 (whitequark)
11956 - #6845: -no-check-prims to tell ocamlc not to check primitives in runtime
11957 (Alain Frisch)
11958 - #149: Attach documentation comments to parse tree
11959 (Leo White)
11960 - #159: Better locations for structure/signature items
11961 (Leo White)
11962
11963 Toplevel and debugger:
11964 - #5958: generalized polymorphic #install_printer
11965 (Pierre Chambart and Grégoire Henry)
11966
11967 OCamlbuild:
11968 - #6237: explicit "infer" tag to control or disable menhir --infer
11969 (Hugo Heuzard)
11970 - #6625: pass -linkpkg to files built with -output-obj.
11971 (whitequark)
11972 - #6702: explicit "linkpkg" and "dontlink(foo)" flags
11973 (whitequark, Gabriel Scherer)
11974 - #6712: Ignore common VCS directories
11975 (whitequark)
11976 - #6720: pass -g to C compilers when tag 'debug' is set
11977 (whitequark, Gabriel Scherer)
11978 - #6733: add .byte.so and .native.so targets to pass
11979 -output-obj -cclib -shared.
11980 (whitequark)
11981 - #6733: "runtime_variant(X)" to pass -runtime-variant X option.
11982 (whitequark)
11983 - #6774: new menhir-specific flags "only_tokens" and "external_tokens(Foo)"
11984 (François Pottier)
11985
11986 Libraries:
11987 - #6285: Add support for nanosecond precision in Unix.stat()
11988 (Jérémie Dimino, report by user 'gfxmonk')
11989 - #6781: Add higher baud rates to Unix termios
11990 (Damien Doligez, report by Berke Durak)
11991 - #6834: Add Obj.{first,last}_non_constant_constructor_tag
11992 (Mark Shinwell, request by Gabriel Scherer)
11993
11994 Runtime:
11995 - #6078: Release the runtime system when calling caml_dlopen
11996 (Jérémie Dimino)
11997 - #6675: GC hooks
11998 (Damien Doligez and Roshan James)
11999
12000 Build system:
12001 - #5418 (comments) : generate dependencies with $(CC) instead of gcc
12002 (Damien Doligez and Michael Grünewald)
12003 - #6266: Cross compilation for iOs, Android etc
12004 (whitequark, review by Damien Doligez and Mark Shinwell)
12005
12006 Installation procedure:
12007 - Update instructions for x86-64 PIC mode and POWER architecture builds
12008 (Mark Shinwell)
12009
12010 Bug fixes:
12011 - #5271: Location.prerr_warning is hard-coded to use Format.err_formatter
12012 (Damien Doligez, report by Rolf Rolles)
12013 - #5395: OCamlbuild mishandles relative symlinks and include paths
12014 (Damien Doligez, report by Didier Le Botlan)
12015 - #5822: wrong value of Options.ext_dll on windows
12016 (Damien Doligez and Daniel Weil)
12017 - #5836, #6684: printing lazy values in ocamldebug may segfault
12018 (Gabriel Scherer, request by the Coq team)
12019 - #5887: move the byterun/*.h headers to byterun/caml/*.h to avoid
12020 header name clashes
12021 (Jérôme Vouillon and Adrien Nader and whitequark)
12022 - #6281: Graphics window does not acknowledge second click (double click)
12023 (Kyle Headley)
12024 - #6490: incorrect backtraces in gdb on AArch64. Also fixes incorrect
12025 backtraces on 32-bit ARM.
12026 (Mark Shinwell)
12027 - #6573: extern "C" for systhreads/threads.h
12028 (Mickaël Delahaye)
12029 - #6575: Array.init evaluates callback although it should not do so
12030 (Alain Frisch, report by Gerd Stolpmann)
12031 - #6607: The manual doesn't mention 0x200 flag for OCAMLRUNPARAM=v
12032 (Alain Frisch)
12033 - #6616: allow meaningful use of -use-runtime without -custom.
12034 (whitequark)
12035 - #6617: allow android build with pthreads support (since SDK r10c)
12036 (whitequark)
12037 - #6626: ocamlbuild on cygwin cannot find ocamlfind
12038 (Gergely Szilvasy)
12039 - #6628: Configure script rejects legitimate arguments
12040 (Michael Grünewald, Damien Doligez)
12041 - #6630: Failure of tests/prim-bigstring/{big,}string.ml on big-endian
12042 architectures
12043 (Pierre Chambart, testing by Mark Shinwell)
12044 - #6640: ocamlbuild: wrong "unused tag" warning on "precious"
12045 (report by user 'william')
12046 - #6652: ocamlbuild -clean does not print a newline after output
12047 (Damien Doligez, report by Andi McClure)
12048 - #6658: cross-compiler: version check not working on OS X
12049 (Gerd Stolpmann)
12050 - #6665: Failure of tests/asmcomp on sparc
12051 (Stéphane Glondu)
12052 - #6667: wrong implementation of %bswap16 on ARM64
12053 (Xavier Leroy)
12054 - #6669: fix 4.02 regression in toplevel printing of lazy values
12055 (Leo White, review by Gabriel Scherer)
12056 - #6671: Windows: environment variable 'TZ' affects Unix.gettimeofday
12057 (Mickaël Delahaye and Damien Doligez)
12058 - #6680: Missing parentheses in warning about polymorphic variant value
12059 (Jacques Garrigue and Gabriel Scherer, report by Philippe Veber)
12060 - #6686: Bug in [subst_boxed_number]
12061 (Jérémie Dimino, Mark Shinwell)
12062 - #6690: Uncaught exception (Not_found) with (wrong) wildcard or unification
12063 type variable in place of a local abstract type
12064 (Jacques Garrigue, report by Mikhail Mandrykin)
12065 - #6693 (part two): Incorrect relocation types in x86-64 runtime system
12066 (whitequark, review by Jacques-Henri Jourdan, Xavier Leroy and Mark Shinwell)
12067 - #6717: Pprintast does not print let-pattern attributes
12068 (Gabriel Scherer, report by whitequark)
12069 - #6727: Printf.sprintf "%F" misbehavior
12070 (Benoît Vaugon, report by Vassili Karpov)
12071 - #6747: ocamlobjinfo: missing symbol caml_plugin_header due to underscore
12072 (Damien Doligez, Maverick Woo)
12073 - #6749: ocamlopt returns n for (n mod 1) instead of 0
12074 (Mark Shinwell and Jérémie Dimino)
12075 - #6753: Num.quo_num and Num.mod_num incorrect for some negative arguments
12076 (Xavier Leroy)
12077 - #6758: Ocamldoc "analyse_module: parsetree and typedtree don't match"
12078 (Damien Doligez, report by user 'maro')
12079 - #6759: big_int_of_string incorrectly parses some hexa literals
12080 (Damien Doligez, report by Pierre-yves Strub)
12081 - #6763: #show with -short-paths doesn't select shortest type paths
12082 (Jacques Garrigue, report by David Sheets)
12083 - #6768: Typechecker overflow the stack on cyclic type
12084 (Jacques Garrigue, report by user 'darktenaibre')
12085 - #6770: duplicate of #6686
12086 - #6772: asmrun/signals_asm.c doesn't compile on NetBSD/i386
12087 (Kenji Tokudome)
12088 - #6775: Digest.file leaks file descriptor on error
12089 (Valentin Gatien-Baron)
12090 - #6779: Cross-compilers cannot link bytecode using custom primitives
12091 (Damien Doligez, request by whitequark)
12092 - #6787: Soundness bug with polymorphic variants
12093 (Jacques Garrigue, with help from Leo White and Grégoire Henry,
12094 report by Michael O'Connor)
12095 - #6790: otherlibs should be built with -g
12096 (Damien Doligez, report by whitequark)
12097 - #6791: "%s@[", "%s@{" regression in Scanf
12098 (Benoît Vaugon)
12099 - #6793: ocamlbuild passes nonsensical "-ocamlc ..." commands to menhir
12100 (Gabriel Scherer, report by Damien Doligez)
12101 - #6799: include guards missing for unixsupport.h and other files
12102 (Andreas Hauptmann)
12103 - #6810: Improve documentation of Bigarray.Genarray.map_file
12104 (Mark Shinwell and Daniel Bünzli)
12105 - #6812: -short-paths and -no-alias-deps can create inconsistent assumptions
12106 (Jacques Garrigue, report by Valentin Gatien-Baron)
12107 - #6817: GADT exhaustiveness breakage with modules
12108 (Leo White, report by Pierre Chambart)
12109 - #6824: fix buffer sharing on partial application of Format.asprintf
12110 (Gabriel Scherer, report by Alain Frisch)
12111 - #6831: Build breaks for -aspp gcc on solaris-like OSs
12112 (John Tibble)
12113 - #6836: Assertion failure using -short-paths
12114 (Jacques Garrigue, report by David Sheets)
12115 - #6837: Build profiling libraries on FreeBSD and NetBSD x86-64
12116 (Mark Shinwell, report by Michael Grünewald)
12117 - #6841: Changing compilation unit name with -o breaks ocamldebug
12118 (Jacques Garrigue, report by Jordan Walke)
12119 - #6842: export Typemod.modtype_of_package
12120 - #6843: record weak dependencies even when the .cmi is missing
12121 (Leo White, Gabriel Scherer)
12122 - #6849: Inverted pattern unification error
12123 (Jacques Garrigue, report by Leo White)
12124 - #6857: __MODULE__ doesn't give the current module with -o
12125 (Jacques Garrigue, report by Valentin Gatien-Baron)
12126 - #6862: Exhaustiveness check wrong for class constructor arguments
12127 (Jacques Garrigue)
12128 - #6869: Improve comment on [Hashtbl.hash_param]
12129 (Mark Shinwell, report by Jun Furuse)
12130 - #6870: Unsoundness when -rectypes fails to detect non-contractive type
12131 (Jacques Garrigue, report by Stephen Dolan)
12132 - #6872: Type-directed propagation fails to disambiguate variants
12133 that are also exception constructors
12134 (Jacques Garrigue, report by Romain Beauxis)
12135 - #6878: AArch64 backend generates invalid asm: conditional branch
12136 out of range (Mark Shinwell, report by Richard Jones, testing by Richard
12137 Jones and Xavier Leroy, code review by Xavier Leroy and Thomas Refis)
12138 - #6879: Wrong optimization of 1 mod n
12139 (Mark Shinwell, report by Jean-Christophe Filliâtre)
12140 - #6884: The __CYGWIN32__ #define should be replaced with __CYGWIN__
12141 (Adrien Nader)
12142 - #6886: -no-alias-deps allows to build self-referential compilation units
12143 (Jacques Garrigue, report by Valentin Gatien-Baron)
12144 - #6889: ast_mapper fails to rewrite class attributes
12145 (Sébastien Briais)
12146 - #6893: ocamlbuild: "tag not used" warning when using (p)dep
12147 (Gabriel Scherer, report by Christiano Haesbaert)
12148 - #143: fix getsockopt behaviour for boolean socket options
12149 (Anil Madhavapeddy and Andrew Ray)
12150 - #190: typo in pervasives
12151 (Guillaume Bury)
12152 - Misplaced assertion in major_gc.c for no-naked-pointers mode
12153 (Stephen Dolan, Mark Shinwell)
12154
12155 Feature wishes:
12156 - #6452, #140: add internal support for custom printing formats
12157 (Jérémie Dimino)
12158 - #6641: add -g, -ocamlcflags, -ocamloptflags options to ocamlmklib
12159 (whitequark)
12160 - #6693: also build libasmrun_shared.so and lib{asm,caml}run_pic.a
12161 (whitequark, review by Mark Shinwell)
12162 - #6842: export Typemod.modtype_of_package
12163 (Jacques Garrigue, request by Jun Furuse)
12164 - #139: more versatile specification of locations of .annot
12165 (Christophe Troestler, review by Damien Doligez)
12166 - #171: allow custom warning printers / catchers
12167 (Benjamin Canou, review by Damien Doligez)
12168 - #191: Making gc.h and some part of memory.h public
12169 (Thomas Refis)
12170
12171 OCaml 4.02.1 (14 Oct 2014):
12172 ---------------------------
12173
12174 (Changes that can break existing programs are marked with a "*")
12175
12176 Standard library:
12177 * Add optional argument ?limit to Arg.align.
12178
12179 Bug Fixes:
12180 - #4099: Bug in Makefile.nt: won't stop on error
12181 (George Necula)
12182 - #6181: Improve MSVC build
12183 (Chen Gang)
12184 - #6207: Configure doesn't detect features correctly on Haiku
12185 (Jessica Hamilton)
12186 - #6466: Non-exhaustive matching warning message for open types is confusing
12187 (whitequark)
12188 - #6529: fix quadratic-time algorithm in Consistbl.extract.
12189 (Xavier Leroy, Alain Frisch, relase-worthy report by Kate Deplaix)
12190 - #6530: Add stack overflow handling for native code (OpenBSD i386 and amd64)
12191 (Cristopher Zimmermann)
12192 - #6533: broken semantics of %(%) when substituted by a box
12193 (Benoît Vaugon, report by Boris Yakobowski)
12194 - #6534: legacy support for %.10s
12195 (Benoît Vaugon, Gabriel Scherer, report by Nick Chapman)
12196 - #6536: better documentation of flag # in format strings
12197 (Damien Doligez, report by Nick Chapman)
12198 - #6544: Bytes and CamlinternalFormat missing from threads stdlib.cma
12199 (Christopher Zimmermann)
12200 - #6546: -dsource omits parens for `List ((`String "A")::[]) in patterns
12201 (Gabriel Scherer, report by whitequark)
12202 - #6547: __MODULE__ aborts the compiler if the module name cannot be inferred
12203 (Jacques Garrigue, report by Kaustuv Chaudhuri)
12204 - #6549: Debug section is sometimes not readable when using -pack
12205 (Hugo Heuzard, review by Gabriel Scherer)
12206 - #6553: Missing command line options for ocamldoc
12207 (Maxence Guesdon)
12208 - #6554: fix race condition when retrieving backtraces
12209 (Jérémie Dimino, Mark Shinwell).
12210 - #6557: String.sub throws Invalid_argument("Bytes.sub")
12211 (Damien Doligez, report by Oliver Bandel)
12212 - #6562: Fix ocamldebug module source lookup
12213 (Leo White)
12214 - #6563: Inclusion of packs failing to run module initializers
12215 (Jacques Garrigue, report by Mark Shinwell)
12216 - #6564: infinite loop in Mtype.remove_aliases
12217 (Jacques Garrigue, report by Mark Shinwell)
12218 - #6565: compilation fails with Env.Error(_)
12219 (Jacques Garrigue and Mark Shinwell)
12220 - #6566: -short-paths and signature inclusion errors
12221 (Jacques Garrigue, report by Mark Shinwell)
12222 - #6572: Fatal error with recursive modules
12223 (Jacques Garrigue, report by Quentin Stievenart)
12224 - #6575: Array.init evaluates callback although it should not do so
12225 (Alain Frisch, report by Gerd Stolpmann)
12226 - #6578: Recursive module containing alias causes Segmentation fault
12227 (Jacques Garrigue)
12228 - #6581: Some bugs in generative functors
12229 (Jacques Garrigue, report by Mark Shinwell)
12230 - #6584: ocamldep support for "-open M"
12231 (Gabriel Scherer, review by Damien Doligez, report by Hezekiah M. Carty)
12232 - #6588: Code generation errors for ARM
12233 (Mark Shinwell, Xavier Leroy)
12234 - #6590: Improve Windows (MSVC and mingw) build
12235 (Chen Gang)
12236 - #6599: ocamlbuild: add -bin-annot when using -pack
12237 (Christopher Zimmermann)
12238 - #6602: Fatal error when tracing a function with abstract type
12239 (Jacques Garrigue, report by Hugo Herbelin)
12240 - ocamlbuild: add an -ocamlmklib option to change the ocamlmklib command
12241 (Jérôme Vouillon)
12242
12243 OCaml 4.02.0 (29 Aug 2014):
12244 ---------------------------
12245
12246 (Changes that can break existing programs are marked with a "*")
12247
12248 Language features:
12249 - Attributes and extension nodes
12250 (Alain Frisch)
12251 - Generative functors (#5905)
12252 (Jacques Garrigue)
12253 * Module aliases
12254 (Jacques Garrigue)
12255 * Alternative syntax for string literals {id|...|id} (can break comments)
12256 (Alain Frisch)
12257 - Separation between read-only strings (type string) and read-write byte
12258 sequences (type bytes). Activated by command-line option -safe-string.
12259 (Damien Doligez)
12260 - #6318: Exception cases in pattern matching
12261 (Jeremy Yallop, backend by Alain Frisch)
12262 - #5584: Extensible open datatypes
12263 (Leo White)
12264
12265 Build system for the OCaml distribution:
12266 - Use -bin-annot when building.
12267 - Use GNU make instead of portable makefiles.
12268 - Updated build instructions for 32-bit Mac OS X on Intel hardware.
12269
12270 Shedding weight:
12271 * Removed Camlp4 from the distribution, now available as third-party software.
12272 * Removed Labltk from the distribution, now available as a third-party library.
12273
12274 Type system:
12275 * #6235: Keep typing of pattern cases independent in principal mode
12276 (i.e. information from previous cases is no longer used when typing
12277 patterns; cf. '#6235' in testsuite/test/typing-warnings/records.ml)
12278 (Jacques Garrigue)
12279 - Allow opening a first-class module or applying a generative functor
12280 in the body of a generative functor. Allow it also in the body of
12281 an applicative functor if no types are created
12282 (Jacques Garrigue, suggestion by Leo White)
12283 * Module aliases are now typed in a specific way, which remembers their
12284 identity. Compiled interfaces become smaller, but may depend on the
12285 original modules. This also changes the signature inferred by
12286 "module type of".
12287 (Jacques Garrigue, feedback from Leo White, Mark Shinwell and Nick Chapman)
12288 - #6331: Slight change in the criterion to distinguish private
12289 abbreviations and private row types: create a private abbreviation for
12290 closed objects and fixed polymorphic variants.
12291 (Jacques Garrigue)
12292 * #6333: Compare first class module types structurally rather than
12293 nominally. Value subtyping allows module subtyping as long as the internal
12294 representation is unchanged.
12295 (Jacques Garrigue)
12296
12297 Compilers:
12298 - More aggressive constant propagation, including float and
12299 int32/int64/nativeint arithmetic. Constant propagation for floats
12300 can be turned off with option -no-float-const-prop, for codes that
12301 change FP rounding modes at run-time.
12302 (Xavier Leroy)
12303 - New back-end optimization pass: common subexpression elimination (CSE).
12304 (Reuses results of previous computations instead of recomputing them.)
12305 (Xavier Leroy)
12306 - New back-end optimization pass: dead code elimination.
12307 (Removes arithmetic and load instructions whose results are unused.)
12308 (Xavier Leroy)
12309 - #6269: Optimization of sequences of string patterns
12310 (Benoît Vaugon and Luc Maranget)
12311 - Experimental native code generator for AArch64 (ARM 64 bits)
12312 (Xavier Leroy)
12313 - #6042: Optimization of integer division and modulus by constant divisors
12314 (Xavier Leroy and Phil Denys)
12315 - Add "-open" command line flag for opening a single module before typing
12316 (Leo White, Mark Shinwell and Nick Chapman)
12317 * "-o" now sets module name to the output file name up to the first "."
12318 (it also applies when "-o" is not given, i.e. the module name is then
12319 the input file name up to the first ".")
12320 (Leo White, Mark Shinwell and Nick Chapman)
12321 * #5779: better sharing of structured constants
12322 (Alain Frisch)
12323 - #5817: new flag to keep locations in cmi files
12324 (Alain Frisch)
12325 - #5854: issue warning 3 when referring to a value marked with
12326 the [@@ocaml.deprecated] attribute
12327 (Alain Frisch, suggestion by Pierre-Marie Pédrot)
12328 - #6017: a new format implementation based on GADTs
12329 (Benoît Vaugon and Gabriel Scherer)
12330 * #6203: Constant exception constructors no longer allocate
12331 (Alain Frisch)
12332 - #6260: avoid unnecessary boxing in let
12333 (Vladimir Brankov)
12334 - #6345: Better compilation of optional arguments with default values
12335 (Alain Frisch, review by Jacques Garrigue)
12336 - #6389: ocamlopt -opaque option for incremental native compilation
12337 (Pierre Chambart, Gabriel Scherer)
12338
12339 Toplevel interactive system:
12340 - #5377: New "#show_*" directives
12341 (ygrek, Jacques Garrigue and Alain Frisch)
12342
12343 Runtime system:
12344 - New configure option "-no-naked-pointers" to improve performance by
12345 avoiding page table tests during block darkening and the marking phase
12346 of the major GC. In this mode, all out-of-heap pointers must point at
12347 things that look like OCaml values: in particular they must have a valid
12348 header. The colour of said headers should be black.
12349 (Mark Shinwell, reviews by Damien Doligez and Xavier Leroy)
12350 - Fixed bug in native code version of [caml_raise_with_string] that could
12351 potentially lead to heap corruption.
12352 (Mark Shinwell)
12353 * Blocks initialized by [CAMLlocal*] and [caml_alloc] are now filled with
12354 [Val_unit] rather than zero.
12355 (Mark Shinwell)
12356 - Fixed a major performance problem on large heaps (~1GB) by making heap
12357 increments proportional to heap size by default
12358 (Damien Doligez)
12359 - #4765: Structural equality treats exception specifically
12360 (Alain Frisch)
12361 - #5009: efficient comparison/indexing of exceptions
12362 (Alain Frisch, request by Markus Mottl)
12363 - #6075: avoid using unsafe C library functions (strcpy, strcat, sprintf)
12364 (Xavier Leroy, reports from user 'jfc' and Anil Madhavapeddy)
12365 - An ISO C99-compliant C compiler and standard library is now assumed.
12366 (Plus special exceptions for MSVC.) In particular, emulation code for
12367 64-bit integer arithmetic was removed, the C compiler must support a
12368 64-bit integer type.
12369 (Xavier Leroy)
12370
12371 Standard library:
12372 * Add new modules Bytes and BytesLabels for mutable byte sequences.
12373 (Damien Doligez)
12374 - #4986: add List.sort_uniq and Set.of_list
12375 (Alain Frisch)
12376 - #5935: a faster version of "raise" which does not maintain the backtrace
12377 (Alain Frisch)
12378 - #6146: support "Unix.kill pid Sys.sigkill" under Windows
12379 (Romain Bardou and Alain Frisch)
12380 - #6148: speed improvement for Buffer
12381 (John Whitington)
12382 - #6180: efficient creation of uninitialized float arrays
12383 (Alain Frisch, request by Markus Mottl)
12384 - #6355: Improve documentation regarding finalisers and multithreading
12385 (Daniel Bünzli, Mark Shinwell)
12386 - Trigger warning 3 for all values marked as deprecated in the documentation.
12387 (Damien Doligez)
12388
12389 OCamldoc:
12390 - #6257: handle full doc comments for variant constructors and
12391 record fields
12392 (Maxence Guesdon, request by ygrek)
12393 - #6274: allow doc comments on object types
12394 (Thomas Refis)
12395 - #6310: fix ocamldoc's subscript/superscript CSS font size
12396 (Anil Madhavapeddy)
12397 - #6425: fix generation of man pages
12398 (Maxence Guesdon, report by Anil Madhavapeddy)
12399
12400 Bug fixes:
12401 - #2719: wrong scheduling of bound checks within a
12402 try...with Invalid_argument -> _ ... (Xavier Leroy)
12403 - #4719: Sys.executable_name wrong if executable name contains dots (Windows)
12404 (Alain Frisch, report by Bart Jacobs)
12405 - #5406 ocamlbuild: "tag 'package' does not expect a parameter"
12406 (Gabriel Scherer)
12407 - #5598, #6165: Alterations to handling of \013 in source files
12408 breaking other tools
12409 (David Allsopp and Damien Doligez)
12410 - #5820: Fix camlp4 lexer roll back problem
12411 (Hongbo Zhang)
12412 - #5946: CAMLprim taking (void) as argument
12413 (Benoît Vaugon)
12414 - #6038: on x86-32, enforce 16-byte stack alignment for compatibility
12415 with recent GCC and Clang. Win32/MSVC keeps 4-byte stack alignment.
12416 (Xavier Leroy)
12417 - #6062: Fix a 4.01 camlp4 DELETE_RULE regression caused by commit 13047
12418 (Hongbo Zhang, report by Christophe Troestler)
12419 - #6173: Typing error message is worse than before
12420 (Jacques Garrigue and John Whitington)
12421 - #6174: OCaml compiler loops on an example using GADTs (-rectypes case)
12422 (Jacques Garrigue and Grégoire Henry, report by Chantal Keller)
12423 - #6175: open! was not supported by camlp4
12424 (Hongbo Zhang)
12425 - #6184: ocamlbuild: `ocamlfind ocamldep` does not support -predicate
12426 (Kate Deplaix)
12427 - #6194: Incorrect unused warning with first-class modules in patterns
12428 (Jacques Garrigue, report by Markus Mottl and Leo White)
12429 - #6211: in toplevel interactive use, bad interaction between uncaught
12430 exceptions and multiple bindings of the form "let x = a let y = b;;".
12431 (Xavier Leroy)
12432 - #6216: inlining of GADT matches generates invalid assembly
12433 (Xavier Leroy and Alain Frisch, report by Mark Shinwell)
12434 - #6232: Don't use [mktemp] on platforms where [mkstemp] is available
12435 (Stéphane Glondu, Mark Shinwell)
12436 - #6233: out-of-bounds exceptions lose their locations on ARM, PowerPC
12437 (Jacques-Henri Jourdan and Xavier Leroy,
12438 report and testing by Stéphane Glondu)
12439 - #6235: Issue with type information flowing through a variant pattern
12440 (Jacques Garrigue, report by Hongbo Zhang)
12441 - #6239: sometimes wrong stack alignment when raising exceptions
12442 in -g mode with backtraces active
12443 (Xavier Leroy, report by Yaron Minsky)
12444 - #6240: Fail to expand module type abbreviation during substyping
12445 (Jacques Garrigue, report by Leo White)
12446 - #6241: Assumed inequality between paths involving functor arguments
12447 (Jacques Garrigue, report by Jeremy Yallop)
12448 - #6243: Make "ocamlopt -g" more resistant to ill-formed locations
12449 (Xavier Leroy, report by Pierre-Marie Pédrot)
12450 - #6262: equality of first-class modules take module aliases into account
12451 (Alain Frisch and Leo White)
12452 - #6268: -DMODEL_$(MODEL) not passed when building asmrun/arm.p.o
12453 (Peter Michael Green)
12454 - #6273: fix Sys.file_exists on large files (Win32)
12455 (Christoph Bauer)
12456 - #6275: Soundness bug related to type constraints
12457 (Jacques Garrigue, report by Leo White)
12458 - #6293: Assert_failure with invalid package type
12459 (Jacques Garrigue, report by Elnatan Reisner)
12460 - #6300: ocamlbuild -use-ocamlfind conflicts with -ocamlc
12461 (Gabriel Scherer)
12462 - #6302: bytecode debug information re-read from filesystem every time
12463 (Jacques-Henri Jourdan)
12464 - #6307: Behavior of 'module type of' w.r.t. module aliases
12465 (Jacques Garrigue, report by Alain Frisch)
12466 - #6332: Unix.open_process fails to pass empty arguments under Windows
12467 (Damien Doligez, report Virgile Prevosto)
12468 - #6346: Build failure with latest version of xcode on OSX
12469 (Jérémie Dimino)
12470 - #6348: Unification failure for GADT when original definition is hidden
12471 (Leo White and Jacques Garrigue, report by Jeremy Yallop)
12472 - #6352: Automatic removal of optional arguments and sequencing
12473 (Jacques Garrigue and Alain Frisch)
12474 - #6361: Hashtbl.hash not terminating on some lazy values w/ recursive types
12475 (Xavier Leroy, report by Leo White)
12476 - #6383: Exception Not_found when using object type in absent module
12477 (Jacques Garrigue, report by Sébastien Briais)
12478 - #6384: Uncaught Not_found exception with a hidden .cmi file
12479 (Leo White)
12480 - #6385: wrong allocation of large closures by the bytecode interpreter
12481 (Xavier Leroy, report by Stephen Dolan)
12482 - #6394: Assertion failed in Typecore.expand_path
12483 (Alain Frisch and Jacques Garrigue)
12484 - #6405: unsound interaction of -rectypes and GADTs
12485 (Jacques Garrigue, report by Gabriel Scherer and Benoît Vaugon)
12486 - #6408: Optional arguments given as ~?arg instead of ?arg in message
12487 (Michael O'Connor)
12488 - #6411: missing libgcc_s_sjlj-1.dll in mingw (add -static-libgcc)
12489 (Jun Furuse and Alain Frisch, Jonathan Protzenko and Adrien Nader)
12490 - #6436: Typos in @deprecated text in stdlib/arrayLabels.mli
12491 (John Whitington)
12492 - #6439: Don't use the deprecated [getpagesize] function
12493 (John Whitington, Mark Shinwell)
12494 - #6441: undetected tail-call in some mutually-recursive functions
12495 (many arguments, and mutual block mixes functions and non-functions)
12496 (Stefan Holdermans, review by Xavier Leroy)
12497 - #6443: ocaml segfault when List.fold_left is traced then executed
12498 (Jacques Garrigue, report by user 'Reventlov')
12499 - #6451: some bugs in untypeast.ml
12500 (Jun Furuse, review by Alain Frisch)
12501 - #6460: runtime assertion failure with large [| e1;...eN |]
12502 float array expressions
12503 (Leo White)
12504 - #6463: -dtypedtree fails on class fields
12505 (Leo White)
12506 - #6469: invalid -dsource printing of "external _pipe = ...", "Pervasives.(!)"
12507 (Gabriel Scherer and Damien Doligez, user 'ngunn')
12508 - #6482: ocamlbuild fails when _tags file in unhygienic directory
12509 (Gabriel Scherer)
12510 - #6502: ocamlbuild spurious warning on "use_menhir" tag
12511 (Xavier Leroy)
12512 - #6505: Missed Type-error leads to a segfault upon record access
12513 (Jacques Garrigue, Jeremy Yallop, report by Christoph Höger)
12514 - #6507: crash on AArch64 resulting from incorrect setting of
12515 [caml_bottom_of_stack]. (Richard Jones, Mark Shinwell)
12516 - #6509: add -linkall flag to ocamlcommon.cma
12517 (Frédéric Bour)
12518 - #6513: Fatal error Ctype.Unify(_) in functor type
12519 - #6523: failure upon character bigarray access, and unnecessary change
12520 in comparison ordering (Jeremy Yallop, Mark Shinwell)
12521 - bound-checking bug in caml_string_{get,set}{16,32,64}
12522 (Pierre Chambart and Gabriel Scherer, report by Nicolas Trangez)
12523 - sometimes wrong stack alignment at out-of-bounds array access
12524 (Gabriel Scherer and Xavier Leroy, report by Pierre Chambart)
12525
12526 Features wishes:
12527 - #4243: make the Makefiles parallelizable
12528 (Grégoire Henry and Damien Doligez)
12529 - #4323: have "of_string" in Num and Big_int work with binary and
12530 hex representations
12531 (Zoe Paraskevopoulou, review by Gabriel Scherer)
12532 - #4771: Clarify documentation of Dynlink.allow_only
12533 (Damien Doligez, report by David Allsopp)
12534 - #4855: 'camlp4 -I +dir' accepted, dir is relative to 'camlp4 -where'
12535 (Jun Furuse and Hongbo Zhang, report by Dmitry Grebeniuk)
12536 - #5201: ocamlbuild: add --norc to the bash invocation to help performances
12537 (Daniel Weil)
12538 - #5650: Camlp4FoldGenerator doesn't handle well "abstract" types
12539 (Hongbo Zhang)
12540 - #5808: allow simple patterns, not just identifiers, in "let p : t = ..."
12541 (Alain Frisch)
12542 - #5851: warn when -r is disabled because no _tags file is present
12543 (Gabriel Scherer)
12544 - #5899: a programmer-friendly access to backtrace information
12545 (Jacques-Henri Jourdan and Gabriel Scherer)
12546 - #6000 comment 9644: add a warning for non-principal coercions to format
12547 (Jacques Garrigue, report by Damien Doligez)
12548 - #6054: add support for M.[ foo ], M.[| foo |] etc.
12549 (Kaustuv Chaudhuri)
12550 - #6064: GADT representation for Bigarray.kind + CAML_BA_CHAR runtime kind
12551 (Jeremy Yallop, review by Gabriel Scherer)
12552 - #6071: Add a -noinit option to the toplevel
12553 (David Sheets)
12554 - #6087: ocamlbuild, improve _tags parsing of escaped newlines
12555 (Gabriel Scherer, request by Daniel Bünzli)
12556 - #6109: Typos in ocamlbuild error messages
12557 (Gabriel Kerneis)
12558 - #6116: more efficient implementation of Digest.to_hex
12559 (ygrek)
12560 - #6142: add cmt file support to ocamlobjinfo
12561 (Anil Madhavapeddy)
12562 - #6166: document -ocamldoc option of ocamlbuild
12563 (Xavier Clerc)
12564 - #6182: better message for virtual objects and class types
12565 (Leo White, Stephen Dolan)
12566 - #6183: enhanced documentation for 'Unix.shutdown_connection'
12567 (Anil Madhavapeddy, report by Jun Furuse)
12568 - #6187: ocamlbuild: warn when using -plugin-tag(s) without myocamlbuild.ml
12569 (Kate Deplaix)
12570 - #6246: allow wildcard _ as for-loop index
12571 (Alain Frisch, request by ygrek)
12572 - #6267: more information printed by "bt" command of ocamldebug
12573 (Josh Watzman)
12574 - #6270: remove need for -I directives to ocamldebug in common case
12575 (Josh Watzman, review by Xavier Clerc and Alain Frisch)
12576 - #6311: Improve signature mismatch error messages
12577 (Alain Frisch, suggestion by Daniel Bünzli)
12578 - #6358: obey DESTDIR in install targets
12579 (Gabriel Scherer, request by François Berenger)
12580 - #6388, #6424: more parsetree correctness checks for -ppx users
12581 (Alain Frisch, request by whitequark and Jun Furuse)
12582 - #6406: Expose OCaml version in C headers
12583 (whitequark and Romain Calascibetta)
12584 - #6446: improve "unused declaration" warnings wrt. name shadowing
12585 (Alain Frisch)
12586 - #6495: ocamlbuild tags 'safe_string', 'unsafe_string'
12587 (Anil Madhavapeddy)
12588 - #6497: pass context information to -ppx preprocessors
12589 (whitequark, Alain Frisch)
12590 - ocamllex: user-definable refill action
12591 (Frédéric Bour, review by Gabriel Scherer and Luc Maranget)
12592 - shorten syntax for functor signatures: "functor (M1:S1) (M2:S2) .. -> .."
12593 (Thomas Gazagnaire and Jeremy Yallop, review by Gabriel Scherer)
12594 - make ocamldebug -I auto-detection work with ocamlbuild
12595 (Josh Watzman)
12596
12597 OCaml 4.01.0 (12 Sep 2013):
12598 ---------------------------
12599
12600 (Changes that can break existing programs are marked with a "*")
12601
12602 Other libraries:
12603 - Labltk: updated to Tcl/Tk 8.6.
12604
12605 Type system:
12606 - #5759: use well-disciplined type information propagation to
12607 disambiguate label and constructor names
12608 (Jacques Garrigue, Alain Frisch and Leo White)
12609 * Propagate type information towards pattern-matching, even in the presence of
12610 polymorphic variants (discarding only information about possibly-present
12611 constructors). As a result, matching against absent constructors is no longer
12612 allowed for exact and fixed polymorphic variant types.
12613 (Jacques Garrigue)
12614 * #6035: Reject multiple declarations of the same method or instance variable
12615 in an object
12616 (Alain Frisch)
12617
12618 Compilers:
12619 - #5861: raise an error when multiple private keywords are used in type
12620 declarations
12621 (Hongbo Zhang)
12622 - #5634: parsetree rewriter (-ppx flag)
12623 (Alain Frisch)
12624 - ocamldep now supports -absname
12625 (Alain Frisch)
12626 - #5768: On "unbound identifier" errors, use spell-checking to suggest names
12627 present in the environment
12628 (Gabriel Scherer)
12629 - ocamlc has a new option -dsource to visualize the parsetree
12630 (Alain Frisch, Hongbo Zhang)
12631 - tools/eqparsetree compares two parsetree ignoring location
12632 (Hongbo Zhang)
12633 - ocamlopt now uses clang as assembler on OS X if available, which enables
12634 CFI support for OS X.
12635 (Benedikt Meurer)
12636 - Added a new -short-paths option, which attempts to use the shortest
12637 representation for type constructors inside types, taking open modules
12638 into account. This can make types much more readable if your code
12639 uses lots of functors.
12640 (Jacques Garrigue)
12641 - #5986: added flag -compat-32 to ocamlc, ensuring that the generated
12642 bytecode executable can be loaded on 32-bit hosts.
12643 (Xavier Leroy)
12644 - #5980: warning on open statements which shadow an existing
12645 identifier (if it is actually used in the scope of the open); new
12646 open! syntax to silence it locally
12647 (Alain Frisch, thanks to a report of Daniel Bünzli)
12648 * warning 3 is extended to warn about other deprecated features:
12649 - ISO-latin1 characters in identifiers
12650 - uses of the (&) and (or) operators instead of (&&) and (||)
12651 (Damien Doligez)
12652 - Experimental OCAMLPARAM for ocamlc and ocamlopt
12653 (Fabrice Le Fessant)
12654 - #5571: incorrect ordinal number in error message
12655 (Alain Frisch, report by John Carr)
12656 - #6073: add signature to Tstr_include
12657 (patch by Leo White)
12658
12659 Standard library:
12660 - #5899: expose a way to inspect the current call stack,
12661 Printexc.get_callstack
12662 (Gabriel Scherer, Jacques-Henri Jourdan, Alain Frisch)
12663 - #5986: new flag Marshal.Compat_32 for the serialization functions
12664 (Marshal.to_*), forcing the output to be readable on 32-bit hosts.
12665 (Xavier Leroy)
12666 - infix application operators |> and @@ in Pervasives
12667 (Fabrice Le Fessant)
12668 - #6176: new Format.asprintf function with a %a formatter
12669 compatible with Format.fprintf (unlike Format.sprintf)
12670 (Pierre Weis)
12671
12672 Other libraries:
12673 - #5568: add O_CLOEXEC flag to Unix.openfile, so that the returned
12674 file descriptor is created in close-on-exec mode
12675 (Xavier Leroy)
12676
12677 Runtime system:
12678 * #6019: more efficient implementation of caml_modify() and caml_initialize().
12679 The new implementations are less lenient than the old ones: now,
12680 the destination pointer of caml_modify() must point within the minor or
12681 major heaps, and the destination pointer of caml_initialize() must
12682 point within the major heap.
12683 (Xavier Leroy, from an experiment by Brian Nigito, with feedback
12684 from Yaron Minsky and Gerd Stolpmann)
12685
12686 Internals:
12687 - Moved debugger/envaux.ml to typing/envaux.ml to publish env_of_only_summary
12688 as part of compilerlibs, to be used on bin-annot files.
12689 (Fabrice Le Fessant)
12690 - The test suite can now be run without installing OCaml first.
12691 (Damien Doligez)
12692
12693 Bug fixes:
12694 - #3236: Document the fact that queues are not thread-safe
12695 (Damien Doligez)
12696 - #3468: (part 1) Sys_error documentation
12697 (Damien Doligez)
12698 - #3679: Warning display problems
12699 (Fabrice Le Fessant)
12700 - #3963: Graphics.wait_next_event in Win32 hangs if window closed
12701 (Damien Doligez)
12702 - #4079: Queue.copy is now tail-recursive
12703 (patch by Christophe Papazian)
12704 - #4138: Documentation for Unix.mkdir
12705 (Damien Doligez)
12706 - #4469: emacs mode: caml-set-compile-command is annoying with ocamlbuild
12707 (Daniel Bünzli)
12708 - #4485: Graphics: Keyboard events incorrectly delivered in native code
12709 (Damien Doligez, report by Sharvil Nanavati)
12710 - #4502: ocamlbuild now reliably excludes the build-dir from hygiene check
12711 (Gabriel Scherer, report by Romain Bardou)
12712 - #4762: ?? is not used at all, but registered as a lexer token
12713 (Alain Frisch)
12714 - #4788: wrong error message when executable file is not found for backtrace
12715 (Damien Doligez, report by Claudio Sacerdoti Coen)
12716 - #4812: otherlibs/unix: add extern int code_of_unix_error (value error);
12717 (Goswin von Brederlow)
12718 - #4887: input_char after close_in crashes ocaml (msvc runtime)
12719 (Alain Frisch and Christoph Bauer, report by ygrek)
12720 - #4994: ocaml-mode doesn't work with xemacs21
12721 (Damien Doligez, report by Stéphane Glondu)
12722 - #5098: creating module values may lead to memory leaks
12723 (Alain Frisch, report by Milan Stanojević)
12724 - #5102: ocamlbuild fails when using an unbound variable in rule dependency
12725 (Xavier Clerc, report by Daniel Bünzli)
12726 * #5119: camlp4 now raises a specific exception when 'DELETE_RULE' fails,
12727 rather than raising 'Not_found'
12728 (ygrek)
12729 - #5121: %( %) in Format module seems to be broken
12730 (Pierre Weis, first patch by Valentin Gatien-Baron, report by Khoo Yit Phang)
12731 - #5178: document in INSTALL how to build a 32-bit version under Linux x86-64
12732 (Benjamin Monate)
12733 - #5212: Improve ocamlbuild error messages of _tags parser
12734 (ygrek)
12735 - #5240: register exception printers for Unix.Unix_error and Dynlink.Error
12736 (Jérémie Dimino)
12737 - #5300: ocamlbuild: verbose parameter should implicitly set classic display
12738 (Xavier Clerc, report by Robert Jakob)
12739 - #5327: (Windows) Unix.select blocks if same socket listed in first and
12740 third arguments
12741 (David Allsopp, displaying impressive MSDN skills)
12742 - #5343: ocaml -rectypes is unsound wrt module subtyping (was still unsound)
12743 (Jacques Garrigue)
12744 - #5350: missing return code checks in the runtime system
12745 (Xavier Leroy)
12746 - #5468: ocamlbuild should preserve order of parametric tags
12747 (Wojciech Meyer, report by Dario Teixeira)
12748 - #5551: Avoid repeated lookups for missing cmi files
12749 (Alain Frisch)
12750 - #5552: unrecognized gcc option -no-cpp-precomp
12751 (Damien Doligez, report by Markus Mottl)
12752 * #5580: missed opportunities for constant propagation
12753 (Xavier Leroy and John Carr)
12754 - #5611: avoid clashes between .cmo files and output files during linking
12755 (Wojciech Meyer)
12756 - #5662: typo in md5.c
12757 (Olivier Andrieu)
12758 - #5673: type equality in a polymorphic field
12759 (Jacques Garrigue, report by Jean-Louis Giavitto)
12760 - #5674: Methods call are 2 times slower with 4.00 than with 3.12
12761 (Jacques Garrigue, Gabriel Scherer, report by Jean-Louis Giavitto)
12762 - #5694: Exception raised by type checker
12763 (Jacques Garrigue, report by Markus Mottl)
12764 - #5695: remove warnings on sparc code emitter
12765 (Fabrice Le Fessant)
12766 - #5697: better location for warnings on statement expressions
12767 (Dan Bensen)
12768 - #5698: remove hardcoded limit of 200000 labels in emitaux.ml
12769 (Fabrice Le Fessant, report by Marcin Sawicki)
12770 - #5702: bytecomp/bytelibrarian lib_sharedobjs was defined but never used
12771 (Hongbo Zhang, Fabrice Le Fessant)
12772 - #5708: catch Failure"int_of_string" in ocamldebug
12773 (Fabrice Le Fessant, report by user 'schommer')
12774 - #5712: (9) new option -bin-annot is not documented
12775 (Damien Doligez, report by Hendrik Tews)
12776 - #5731: instruction scheduling forgot to account for destroyed registers
12777 (Xavier Leroy, Benedikt Meurer, reported by Jeffrey Scofield)
12778 - #5734: improved Win32 implementation of Unix.gettimeofday
12779 (David Allsopp)
12780 - #5735: %apply and %revapply not first class citizens
12781 (Fabrice Le Fessant, reported by Jun Furuse)
12782 - #5738: first class module patterns not handled by ocamldep
12783 (Fabrice Le Fessant, Jacques Garrigue, reported by Hongbo Zhang)
12784 - #5739: Printf.printf "%F" (-.nan) returns -nan
12785 (Xavier Leroy, David Allsopp, reported by Samuel Mimram)
12786 - #5741: make pprintast.ml in compiler_libs
12787 (Alain Frisch, Hongbo Zhang)
12788 - #5747: 'unused open' warning not given when compiling with -annot
12789 (Alain Frisch, reported by Valentin Gatien-Baron)
12790 - #5752: missing dependencies at byte-code link with mlpack
12791 (Wojciech Meyer, Nicholas Lucaroni)
12792 - #5763: ocamlbuild does not give correct flags when running menhir
12793 (Gabriel Scherer, reported by Philippe Veber)
12794 - #5765: ocamllex doesn't preserve line directives
12795 (Damien Doligez, reported by Martin Jambon)
12796 - #5770: Syntax error messages involving unclosed parens are sometimes
12797 incorrect
12798 (Michel Mauny)
12799 - #5772: problem with marshaling of mutually-recursive functions
12800 (Jacques-Henri Jourdan, reported by Cédric Pasteur)
12801 - #5775: several bug fixes for tools/pprintast.ml
12802 (Hongbo Zhang)
12803 - #5784: -dclambda option is ignored
12804 (Pierre Chambart)
12805 - #5785: misbehaviour with abstracted structural type used as GADT index
12806 (Jacques Garrigue, report by Jeremy Yallop)
12807 - #5787: Bad behavior of 'Unused ...' warnings in the toplevel
12808 (Alain Frisch)
12809 - #5793: integer marshalling is inconsistent between architectures
12810 (Xavier Clerc, report by Pierre-Marie Pédrot)
12811 - #5798: add ARM VFPv2 support for Raspbian (ocamlopt)
12812 (Jeffrey Scofield and Anil Madhavapeddy, patch review by Benedikt Meurer)
12813 - #5802: Avoiding "let" as a value name
12814 (Jacques Garrigue, report by Tiphaine Turpin)
12815 - #5805: Assert failure with warning 34 on pre-processed file
12816 (Alain Frisch, report by Tiphaine Turpin)
12817 - #5806: ensure that backtrace tests are always run (testsuite)
12818 (Xavier Clerc, report by user 'michi')
12819 - #5809: Generating .cmt files takes a long time, in case of type error
12820 (Alain Frisch)
12821 - #5810: error in switch printing when using -dclambda
12822 (Pierre Chambart)
12823 - #5811: Untypeast produces singleton tuples for constructor patterns
12824 with only one argument
12825 (Tiphaine Turpin)
12826 - #5813: GC not called when unmarshaling repeatedly in a tight loop (ocamlopt)
12827 (Xavier Leroy, report by David Waern)
12828 - #5814: read_cmt -annot does not report internal references
12829 (Alain Frisch)
12830 - #5815: Multiple exceptions in signatures gives an error
12831 (Leo White)
12832 - #5816: read_cmt -annot does not work for partial .cmt files
12833 (Alain Frisch)
12834 - #5819: segfault when using [with] on large recursive record (ocamlopt)
12835 (Xavier Leroy, Damien Doligez)
12836 - #5821: Wrong record field is reported as duplicate
12837 (Alain Frisch, report by Martin Jambon)
12838 - #5824: Generate more efficient code for immediate right shifts.
12839 (Pierre Chambart, review by Xavier Leroy)
12840 - #5825: Add a toplevel primitive to use source file wrapped with the
12841 corresponding module
12842 (Grégoire Henry, Wojciech Meyer, caml-list discussion)
12843 - #5833: README.win32 can leave the wrong flexlink in the path
12844 (Damien Doligez, report by William Smith)
12845 - #5835: nonoptional labeled arguments can be passed with '?'
12846 (Jacques Garrigue, report by Elnatan Reisner)
12847 - #5840: improved documentation for 'Unix.lseek'
12848 (Xavier Clerc, report by Matej Košík)
12849 - #5848: Assertion failure in type checker
12850 (Jacques Garrigue, Alain Frisch, report by David Waern)
12851 - #5858: Assert failure during typing of class
12852 (Jacques Garrigue, report by Julien Signoles)
12853 - #5865: assert failure when reporting undefined field label
12854 (Jacques Garrigue, report by Anil Madhavapeddy)
12855 - #5872: Performance: Buffer.add_char is not inlined
12856 (Gerd Stolpmann, Damien Doligez)
12857 - #5876: Uncaught exception with a typing error
12858 (Alain Frisch, Gabriel Scherer, report by Julien Moutinho)
12859 - #5877: multiple "open" can become expensive in memory
12860 (Fabrice Le Fessant and Alain Frisch)
12861 - #5880: 'Genlex.make_lexer' documentation mentions the wrong exception
12862 (Xavier Clerc, report by Virgile Prevosto)
12863 - #5885: Incorrect rule for compiling C stubs when shared libraries are not
12864 supported.
12865 (Jérôme Vouillon)
12866 - #5891: ocamlbuild: support rectypes tag for mlpack
12867 (Khoo Yit Phang)
12868 - #5892: GADT exhaustiveness check is broken
12869 (Jacques Garrigue and Leo White)
12870 - #5906: GADT exhaustiveness check is still broken
12871 (Jacques Garrigue, report by Sébastien Briais)
12872 - #5907: Undetected cycle during typecheck causes exceptions
12873 (Jacques Garrigue, report by Pascal Zimmer)
12874 - #5910: Fix code generation bug for "mod 1" on ARM.
12875 (Benedikt Meurer, report by user 'jteg68')
12876 - #5911: Signature substitutions fail in submodules
12877 (Jacques Garrigue, report by Markus Mottl)
12878 - #5912: add configure option -no-cfi (for OSX 10.6.x with XCode 4.0.2)
12879 (Damien Doligez against XCode versions, report by Thomas Gazagnaire)
12880 - #5914: Functor breaks with an equivalent argument signature
12881 (Jacques Garrigue, report by Markus Mottl and Grégoire Henry)
12882 - #5920, #5957: linking failure for big bytecodes on 32bit architectures
12883 (Benoît Vaugon and Chet Murthy, report by Jun Furuse and Sebastien Mondet)
12884 - #5928: Missing space between words in manual page for ocamlmktop
12885 (Damien Doligez, report by Matej Košík)
12886 - #5930: ocamldep leaks temporary preprocessing files
12887 (Gabriel Scherer, report by Valentin Gatien-Baron)
12888 - #5933: Linking is slow when there are functions with large arities
12889 (Valentin Gatien-Baron, review by Gabriel Scherer)
12890 - #5934: integer shift by negative amount (in otherlibs/num)
12891 (Xavier Leroy, report by John Regehr)
12892 - #5944: Bad typing performances of big variant type declaration
12893 (Benoît Vaugon)
12894 - #5945: Mix-up of Minor_heap_min and Minor_heap_max units
12895 (Benoît Vaugon)
12896 - #5948: GADT with polymorphic variants bug
12897 (Jacques Garrigue, report by Leo White)
12898 - #5953: Unix.system does not handle EINTR
12899 (Jérémie Dimino)
12900 - #5965: disallow auto-reference to a recursive module in its definition
12901 (Alain Frisch, report by Arthur Windler via Gabriel Scherer)
12902 - #5973: Format module incorrectly parses format string
12903 (Pierre Weis, report by Frédéric Bour)
12904 - #5974: better documentation for Str.regexp
12905 (Damien Doligez, report by william)
12906 - #5976: crash after recovering from two stack overflows (ocamlopt on MacOS X)
12907 (Xavier Leroy, report by Pierre Boutillier)
12908 - #5977: Build failure on raspberry pi: "input_value: integer too large"
12909 (Alain Frisch, report by Sylvain Le Gall)
12910 - #5981: Incompatibility check assumes abstracted types are injective
12911 (Jacques Garrigue, report by Jeremy Yallop)
12912 - #5982: caml_leave_blocking section and errno corruption
12913 (Jérémie Dimino)
12914 - #5985: Unexpected interaction between variance and GADTs
12915 (Jacques Garrigue, Jeremy Yallop and Leo White and Gabriel Scherer)
12916 - #5988: missing from the documentation: -impl is a valid flag for ocamlopt
12917 (Damien Doligez, report by Vincent Bernardoff)
12918 - #5989: Assumed inequalities involving private rows
12919 (Jacques Garrigue, report by Jeremy Yallop)
12920 - #5992: Crash when pattern-matching lazy values modifies the scrutinee
12921 (Luc Maranget, Leo White)
12922 - #5993: Variance of private type abbreviations not checked for modules
12923 (Jacques Garrigue)
12924 - #5997: Non-compatibility assumed for concrete types with same constructor
12925 (Jacques Garrigue, report by Gabriel Scherer)
12926 - #6004: Type information does not flow to "inherit" parameters
12927 (Jacques Garrigue, report by Alain Frisch)
12928 - #6005: Type unsoundness with recursive modules
12929 (Jacques Garrigue, report by Jérémie Dimino and Josh Berdine)
12930 - #6010: Big_int.extract_big_int gives wrong results on negative arguments
12931 (Xavier Leroy, report by Drake Wilson via Stéphane Glondu)
12932 - #6024: Format syntax for printing @ is incompatible with 3.12.1
12933 (Damien Doligez, report by Boris Yakobowski)
12934 - #6001: Reduce the memory used by compiling Camlp4
12935 (Hongbo Zhang and Gabriel Scherer, report by Henri Gouraud)
12936 - #6031: Camomile problem with -with-frame-pointers
12937 (Fabrice Le Fessant, report by Anil Madhavapeddy)
12938 - #6032: better Random.self_init under Windows
12939 (Alain Frisch, Xavier Leroy)
12940 - #6033: Matching.inline_lazy_force needs eta-expansion (command-line flags)
12941 (Pierre Chambart, Xavier Leroy and Luc Maranget,
12942 regression report by Gabriel Scherer)
12943 - #6046: testsuite picks up the wrong ocamlrun dlls
12944 (Anil Madhavapeddy)
12945 - #6056: Using 'match' prevents generalization of values
12946 (Jacques Garrigue, report by Elnatan Reisner)
12947 - #6058: 'ocamlbuild -use-ocamlfind -tag thread -package threads t.cma' fails
12948 (Gabriel Scherer, report by Hezekiah M. Carty)
12949 - #6069: ocamldoc: lexing: empty token
12950 (Maxence Guesdon, Grégoire Henry, report by ygrek)
12951 - #6072: configure does not handle FreeBSD current (i.e. 10) correctly
12952 (Damien Doligez, report by Prashanth Mundkur)
12953 - #6074: Wrong error message for failing Condition.broadcast
12954 (Markus Mottl)
12955 - #6084: Define caml_modify and caml_initialize as weak symbols to help
12956 with Netmulticore
12957 (Xavier Leroy, Gerd Stolpmann)
12958 - #6090: Module constraint + private type seems broken in ocaml 4.01.0
12959 (Jacques Garrigue, report by Kate Deplaix)
12960 - #6109: Typos in ocamlbuild error messages
12961 (Gabriel Kerneis)
12962 - #6123: Assert failure when self escapes its class
12963 (Jacques Garrigue, report by whitequark)
12964 - #6158: Fatal error using GADTs
12965 (Jacques Garrigue, report by Jeremy Yallop)
12966 - #6163: Assert_failure using polymorphic variants in GADTs
12967 (Jacques Garrigue, report by Leo White)
12968 - #6164: segmentation fault on Num.power_num of 0/1
12969 (Fabrice Le Fessant, report by Johannes Kanig)
12970 - #6210: Camlp4 location error
12971 (Hongbo Zhang, report by Jun Furuse)
12972
12973 Feature wishes:
12974 - #5181: Merge common floating point constants in ocamlopt
12975 (Benedikt Meurer)
12976 - #5243: improve the ocamlbuild API documentation in signatures.mli
12977 (Christophe Troestler)
12978 - #5546: moving a function into an internal module slows down its use
12979 (Alain Frisch, report by Fabrice Le Fessant)
12980 - #5597: add instruction trace option 't' to OCAMLRUNPARAM
12981 (Anil Madhavapeddy, Wojciech Meyer)
12982 - #5676: IPv6 support under Windows
12983 (Jérôme Vouillon, review by Jonathan Protzenko)
12984 - #5721: configure -with-frame-pointers for Linux perf profiling
12985 (Fabrice Le Fessant, test by Jérémie Dimino)
12986 - #5722: toplevel: print full module path only for first record field
12987 (Jacques Garrigue, report by ygrek)
12988 - #5762: Add primitives for fast access to bigarray dimensions
12989 (Pierre Chambart)
12990 - #5769: Allow propagation of Sys.big_endian in native code
12991 (Pierre Chambart, stealth commit by Fabrice Le Fessant)
12992 - #5771: Add primitives for reading 2, 4, 8 bytes in strings and bigarrays
12993 (Pierre Chambart)
12994 - #5774: Add bswap primitives for amd64 and arm
12995 (Pierre Chambart, test by Alain Frisch)
12996 - #5795: Generate sqrtsd opcode instead of external call to sqrt on amd64
12997 (Pierre Chambart)
12998 - #5827: provide a dynamic command line parsing mechanism
12999 (Hongbo Zhang)
13000 - #5832: patch to improve "wrong file naming" error messages
13001 (William Smith)
13002 - #5864: Add a find operation to Set
13003 (François Berenger)
13004 - #5886: Small changes to compile for Android
13005 (Jérôme Vouillon, review by Benedikt Meurer)
13006 - #5902: -ppx based pre-processor executables accept arguments
13007 (Alain Frisch, report by Wojciech Meyer)
13008 - #5986: Protect against marshaling 64-bit integers in bytecode
13009 (Xavier Leroy, report by Alain Frisch)
13010 - #6049: support for OpenBSD/macppc platform
13011 (Anil Madhavapeddy, review by Benedikt Meurer)
13012 - #6059: add -output-obj rules for ocamlbuild
13013 (Anil Madhavapeddy)
13014 - #6060: ocamlbuild tags 'principal', 'strict_sequence' and 'short_paths'
13015 (Anil Madhavapeddy)
13016 - ocamlbuild tag 'no_alias_deps'
13017 (Daniel Bünzli)
13018
13019 Tools:
13020 - OCamlbuild now features a bin_annot tag to generate .cmt files.
13021 (Jonathan Protzenko)
13022 - OCamlbuild now features a strict_sequence tag to trigger the
13023 strict-sequence option.
13024 (Jonathan Protzenko)
13025 - OCamlbuild now picks the non-core tools like ocamlfind and menhir from PATH
13026 (Wojciech Meyer)
13027 - #5884: Misc minor fixes and cleanup for emacs mode
13028 (Stefan Monnier)
13029 - #6030: Improve performance of -annot
13030 (Guillaume Melquiond, Alain Frisch)
13031
13032 OCaml 4.00.1 (5 Oct 2012):
13033 --------------------------
13034
13035 Bug fixes:
13036 - #4019: better documentation of Str.matched_string
13037 - #5111: ocamldoc, heading tags inside spans tags is illegal in html
13038 - #5278: better error message when typing "make"
13039 - #5468: ocamlbuild should preserve order of parametric tags
13040 - #5563: harden Unix.select against file descriptors above FD_SETSIZE
13041 - #5690: "ocamldoc ... -text README" raises exception
13042 - #5700: crash with native-code stack backtraces under MacOS 10.8 x86-64
13043 - #5707: AMD64 code generator: do not use r10 and r11 for parameter passing,
13044 as these registers can be destroyed by the dynamic loader
13045 - #5712: some documentation problems
13046 - #5715: configuring with -no-shared-libs breaks under cygwin
13047 - #5718: false positive on 'unused constructor' warning
13048 - #5719: ocamlyacc generates code that is not warning 33-compliant
13049 - #5725: ocamldoc output of preformatted code
13050 - #5727: emacs caml-mode indents shebang line in toplevel scripts
13051 - #5729: tools/untypeast.ml creates unary Pexp_tuple
13052 - #5731: instruction scheduling forgot to account for destroyed registers
13053 - #5735: %apply and %revapply not first class citizens
13054 - #5738: first class module patterns not handled by ocamldep
13055 - #5742: missing bound checks in Array.sub
13056 - #5744: ocamldoc error on "val virtual"
13057 - #5757: GC compaction bug (crash)
13058 - #5758: Compiler bug when matching on floats
13059 - #5761: Incorrect bigarray custom block size
13060
13061
13062 OCaml 4.00.0 (26 Jul 2012):
13063 ---------------------------
13064
13065 (Changes that can break existing programs are marked with a "*")
13066
13067 - The official name of the language is now OCaml.
13068
13069 Language features:
13070 - Added Generalized Algebraic Data Types (GADTs) to the language.
13071 See chapter "Language extensions" of the reference manual for documentation.
13072 - It is now possible to omit type annotations when packing and unpacking
13073 first-class modules. The type-checker attempts to infer it from the context.
13074 Using the -principal option guarantees forward compatibility.
13075 - New (module M) and (module M : S) syntax in patterns, for immediate
13076 unpacking of a first-class module.
13077
13078 Compilers:
13079 - Revised simplification of let-alias (#5205, #5288)
13080 - Better reporting of compiler version mismatch in .cmi files
13081 * Warning 28 is now enabled by default.
13082 - New option -absname to use absolute paths in error messages
13083 - Optimize away compile-time beta-redexes, e.g. (fun x y -> e) a b.
13084 - Added option -bin-annot to dump the AST with type annotations.
13085 - Added lots of new warnings about unused variables, opens, fields,
13086 constructors, etc.
13087 * New meaning for warning 7: it is now triggered when a method is overridden
13088 with the "method" keyword. Use "method!" to avoid the warning.
13089
13090 Native-code compiler:
13091 - Optimized handling of partially-applied functions (#5287)
13092 - Small improvements in code generated for array bounds checks (#5345,
13093 #5360).
13094 * New ARM backend (#5433):
13095 . Supports both Linux/EABI (armel) and Linux/EABI+VFPv3 (armhf).
13096 . Added support for the Thumb-2 instruction set with average code size
13097 savings of 28%.
13098 . Added support for position-independent code, natdynlink, profiling and
13099 exception backtraces.
13100 - Generation of CFI information, and filename/line number debugging (with -g)
13101 annotations, enabling in particular precise stack backtraces with
13102 the gdb debugger. Currently supported for x86 32-bits and 64-bits only.
13103 (#5487)
13104 - New tool: ocamloptp, the equivalent of ocamlcp for the native-code compiler.
13105
13106 OCamldoc:
13107 - #5645: ocamldoc doesn't handle module/type substitution in signatures
13108 - #5544: improve HTML output (less formatting in html code)
13109 - #5522: allow referring to record fields and variant constructors
13110 - fix #5419 (error message in french)
13111 - fix #5535 (no cross ref to class after dump+load)
13112 * Use first class modules for custom generators, to be able to
13113 load various plugins incrementally adding features to the current
13114 generator
13115 * #5507: Use Location.t structures for locations.
13116 - fix: do not keep code when not told to keep code.
13117
13118 Standard library:
13119 - Added float functions "hypot" and "copysign" (#3806, #4752, #5246)
13120 * Arg: options with empty doc strings are no longer included in the usage string
13121 (#5437)
13122 - Array: faster implementations of "blit", "copy", "sub", "append" and "concat"
13123 (#2395, #2787, #4591)
13124 * Hashtbl:
13125 . Statistically-better generic hash function based on Murmur 3 (#5225)
13126 . Fixed behavior of generic hash function w.r.t. -0.0 and NaN (#5222)
13127 . Added optional "random" parameter to Hashtbl.create to randomize
13128 collision patterns and improve security (#5572, CVE-2012-0839)
13129 . Added "randomize" function and "R" parameter to OCAMLRUNPARAM
13130 to turn randomization on by default (#5572, CVE-2012-0839)
13131 . Added new functorial interface "MakeSeeded" to support randomization
13132 with user-provided seeded hash functions.
13133 . Install new header <caml/hash.h> for C code.
13134 - Filename: on-demand (lazy) initialization of the PRNG used by "temp_file".
13135 - Marshal: marshalling of function values (flag Marshal.Closures) now
13136 also works for functions that come from dynamically-loaded modules (#5215)
13137 - Random:
13138 . More random initialization (Random.self_init()), using /dev/urandom
13139 when available (e.g. Linux, FreeBSD, MacOS X, Solaris)
13140 * Faster implementation of Random.float (changes the generated sequences)
13141 - Format strings for formatted input/output revised to correct #5380
13142 . Consistently treat %@ as a plain @ character
13143 . Consistently treat %% as a plain % character
13144 - Scanf: width and precision for floating point numbers are now handled
13145 - Scanf: new function "unescaped" (#3888)
13146 - Set and Map: more efficient implementation of "filter" and "partition"
13147 - String: new function "map" (#3888)
13148
13149 Installation procedure:
13150 - Compiler internals are now installed in `ocamlc -where`/compiler-libs.
13151 The files available there include the .cmi interfaces for all compiler
13152 modules, plus the following libraries:
13153 ocamlcommon.cma/.cmxa modules common to ocamlc, ocamlopt, ocaml
13154 ocamlbytecomp.cma/.cmxa modules for ocamlc and ocaml
13155 ocamloptcomp.cma/.cmxa modules specific to ocamlopt
13156 ocamltoplevel.cma modules specific to ocaml
13157 (#8255, #4653, frequently-asked feature).
13158 * Some .cmi for toplevel internals that used to be installed in
13159 `ocamlc -where` are now to be found in `ocamlc -where`/compiler-libs.
13160 Add "-I +compiler-libs" where needed.
13161 * toplevellib.cma is no longer installed because subsumed by
13162 ocamlcommon.cma ocamlbytecomp.cma ocamltoplevel.cma
13163 - Added a configuration option (-with-debug-runtime) to compile and install
13164 a debug version of the runtime system, and a compiler option
13165 (-runtime-variant) to select the debug runtime.
13166
13167 Bug Fixes:
13168
13169 - #8109: functions of the Lazy module whose named started with 'lazy_' have
13170 been deprecated, and new ones without the prefix added
13171 - #3571: in Bigarrays, call msync() before unmapping to commit changes
13172 - #4292: various documentation problems
13173 - #4511, #4838: local modules remove polymorphism
13174 * #4549: Filename.dirname is not handling multiple / on Unix
13175 - #4688: (Windows) special floating-point values aren't converted to strings
13176 correctly
13177 - #4697: Unix.putenv leaks memory on failure
13178 - #4705: camlp4 does not allow to define types with `True or `False
13179 - #4746: wrong detection of stack overflows in native code under Linux
13180 - #4869: rare collisions between assembly labels for code and data
13181 - #4880: "assert" constructs now show up in the exception stack backtrace
13182 - #4892: Array.set could raise "out of bounds" before evaluating 3rd arg
13183 - #4937: camlp4 incorrectly handles optional arguments if 'option' is
13184 redefined
13185 - #5024: camlp4r now handles underscores in irrefutable pattern matching of
13186 records
13187 - #5064, #5485: try to ensure that 4K words of stack are available
13188 before calling into C functions, raising a Stack_overflow exception
13189 otherwise. This reduces (but does not eliminate) the risk of
13190 segmentation faults due to stack overflow in C code
13191 - #5073: wrong location for 'Unbound record field label' error
13192 - #5084: sub-sub-module building fails for native code compilation
13193 - #5120: fix the output function of Camlp4.Debug.formatter
13194 - #5131: compilation of custom runtime with g++ generates lots of warnings
13195 - #5137: caml-types-explore does not work
13196 - #5159: better documentation of type Lexing.position
13197 - #5171: Map.join does more comparisons than needed
13198 - #5176: emacs mode: stack overflow in regexp matcher
13199 - #5179: port OCaml to mingw-w64
13200 - #5211: updated Genlex documentation to state that camlp4 is mandatory for
13201 'parser' keyword and associated notation
13202 - #5214: ocamlfind plugin invokes 'cut' utility
13203 - #5218: use $(MAKE) instead of "make" in Makefiles
13204 - #5224: confusing error message in non-regular type definition
13205 - #5231: camlp4: fix parsing of <:str_item< type t = $x$ >>
13206 - #5233: finaliser on weak array gives dangling pointers (crash)
13207 - #5238, #5277: Sys_error when getting error location
13208 - #5261, #5497: Ocaml source-code examples are not "copy-paste-able"
13209 * #5279: executable name is not initialized properly in caml_startup_code
13210 - #5290: added hash functions for channels, nats, mutexes, conditions
13211 - #5291: undetected loop in class initialization
13212 - #5295: OS threads: problem with caml_c_thread_unregister()
13213 - #5301: camlp4r and exception equal to another one with parameters
13214 - #5305: prevent ocamlbuild from complaining about links to _build/
13215 - #5306: comparing to Thread.self() raises exception at runtime
13216 - #5309: Queue.add is not thread/signal safe
13217 - #5310: Ratio.create_ratio/create_normalized_ratio have misleading names
13218 - #5311: better message for warning 23
13219 * #5312: command-line arguments @reponsefile auto-expansion feature
13220 removed from the Windows OCaml runtime, to avoid conflicts with "-w @..."
13221 - #5313: ocamlopt -g misses optimizations
13222 - #5214: ocamlfind plugin invokes 'cut' utility
13223 - #5316: objinfo now shows ccopts/ccobjs/force_link when applicable
13224 - #5318: segfault on stack overflow when reading marshaled data
13225 - #5319: %r11 clobbered by Lswitch in Windows AMD64 native-code compilation
13226 - #5322: type abbreviations expanding to a universal type variable
13227 - #5328: under Windows, Unix.select leaves sockets in non-blocking mode
13228 - #5330: thread tag with '.top' and '.inferred.mli' targets
13229 - #5331: ocamlmktop is not always a shell script
13230 - #5335: Unix.environment segfaults after a call to clearenv
13231 - #5338: sanitize.sh has windows style end-of-lines (mingw)
13232 - #5344: some predefined exceptions need special printing
13233 - #5349: Hashtbl.replace uses new key instead of reusing old key
13234 - #5356: ocamlbuild handling of 'predicates' for ocamlfind
13235 - #5364: wrong compilation of "((val m : SIG1) : SIG2)"
13236 - #5370: ocamldep omits filename in syntax error message
13237 - #5374: camlp4 creates wrong location for type definitions
13238 - #5380: strange sscanf input segfault
13239 - #5382: EOPNOTSUPP and ENOTSUPP different on exotic platforms
13240 - #5383: build failure in Win32/MSVC
13241 - #5387: camlp4: str_item and other syntactic elements with Nils are
13242 not very usable
13243 - #5389: compaction sometimes leaves a very large heap
13244 - #5393: fails to build from source on GNU/kFreeBSD because of -R link option
13245 - #5394: documentation for -dtypes is missing in manpage
13246 - #5397: Filename.temp_dir_name should be mutable
13247 - #5410: fix printing of class application with Camlp4
13248 - #5416: (Windows) Unix.(set|clear)_close_on_exec now preserves blocking mode
13249 - #5435: ocamlbuild does not find .opt executables on Windows
13250 - #5436: update object ids on unmarshaling
13251 - #5442: camlp4: quotation issue with strings
13252 - #5453: configure doesn't find X11 under Ubuntu/MultiarchSpec
13253 - #5461: Double linking of bytecode modules
13254 - #5463: Bigarray.*.map_file fail if empty array is requested
13255 - #5465: increase stack size of ocamlopt.opt for windows
13256 - #5469: private record type generated by functor loses abbreviation
13257 - #5475: Wrapper script for interpreted LablTk wrongly handles command line
13258 parameters
13259 - #5476: bug in native code compilation of let rec on float arrays
13260 - #5477: use pkg-config to configure graphics on linux
13261 - #5481: update camlp4 magic numbers
13262 - #5482: remove bashism in test suite scripts
13263 - #5495: camlp4o dies on infix definition (or)
13264 - #5498: Unification with an empty object only checks the absence of
13265 the first method
13266 - #5503: error when ocamlbuild is passed an absolute path as build directory
13267 - #5509: misclassification of statically-allocated empty array that
13268 falls exactly at beginning of an otherwise unused data page.
13269 - #5510: ocamldep has duplicate -ml{,i}-synonym options
13270 - #5511: in Bigarray.reshape, unwarranted limitation on new array dimensions.
13271 - #5513: Int64.div causes floating point exception (ocamlopt, x86)
13272 - #5516: in Bigarray C stubs, use C99 flexible array types if possible
13273 - #5518: segfault with lazy empty array
13274 - #5531: Allow ocamlbuild to add ocamldoc flags through -docflag
13275 and -docflags switches
13276 - #5538: combining -i and -annot in ocamlc
13277 - #5543: in Bigarray.map_file, try to avoid using lseek() when growing file
13278 - #5648: (probably fixed) test failures in tests/lib-threads
13279 - #5551: repeated calls to find_in_path degrade performance
13280 - #5552: Mac OS X: unrecognized gcc option "-no-cpp-precomp"
13281 - #5555: add Hashtbl.reset to resize the bucket table to its initial size
13282 - #5560: incompatible type for tuple pattern with -principal
13283 - #5575: Random states are not marshallable across architectures
13284 - #5579: camlp4: when a plugin is loaded in the toplevel,
13285 Token.Filter.define_filter has no effect before the first syntax error
13286 - #5585: typo: "explicitely"
13287 - #5587: documentation: "allows to" is not correct English
13288 - #5593: remove C file when -output-obj fails
13289 - #5597: register names for instrtrace primitives in embedded bytecode
13290 - #5598: add backslash-space support in strings in ocamllex
13291 - #5603: wrong .file debug info generated by ocamlopt -g
13292 - #5604: fix permissions of files created by ocamlbuild itself
13293 - #5610: new unmarshaler (from #5318) fails to freshen object identifiers
13294 - #5614: add missing -linkall flag when compiling ocamldoc.opt
13295 - #5616: move ocamlbuild documentation to the reference manual
13296 - #5619: Uncaught CType.Unify exception in the compiler
13297 - #5620: invalid printing of type manifest (camlp4 revised syntax)
13298 - #5637: invalid printing of anonymous type parameters (camlp4 revised syntax)
13299 - #5643: issues with .cfi and .loc directives generated by ocamlopt -g
13300 - #5644: Stream.count broken when used with Sapp or Slazy nodes
13301 - #5647: Cannot use install_printer in debugger
13302 - #5651: printer for abstract data type (camlp4 revised syntax)
13303 - #5654: self pattern variable location tweak
13304 - #5655: ocamlbuild doesn't pass cflags when building C stubs
13305 - #5657: wrong error location for abbreviated record fields
13306 - #5659: ocamlmklib -L option breaks with MSVC
13307 - #5661: fixes for the test suite
13308 - #5668: Camlp4 produces invalid syntax for "let _ = ..."
13309 - #5671: initialization of compare_ext field in caml_final_custom_operations()
13310 - #5677: do not use "value" as identifier (genprintval.ml)
13311 - #5687: dynlink broken when used from "output-obj" main program (bytecode)
13312 - problem with printing of string literals in camlp4 (reported on caml-list)
13313 - emacs mode: colorization of comments and strings now works correctly
13314 - problem with forall and method (reported on caml-list on 2011-07-26)
13315 - crash when using OCAMLRUNPARAM=a=X with invalid X (reported in private)
13316
13317 Feature wishes:
13318 - #2757: new option "-stdin" to make ocaml read stdin as a script
13319 - #3358: better error message when mixing -a and .cmxa
13320 - #3492: documentation: remove restriction on mixed streams
13321 - #7971: allow configuring LIBDIR, BINDIR, and MANDIR relative to $(PREFIX)
13322 - #8285: add Digest.from_hex
13323 - #8341: toplevel: add option to suppress continuation prompts
13324 - #4278: configure: option to disable "graph" library
13325 - #4444: new String.trim function, removing leading and trailing whistespace
13326 - #4549: make Filename.dirname/basename POSIX compliant
13327 - #4830: add option -v to expunge.ml
13328 - #4898: new Sys.big_endian boolean for machine endianness
13329 - #4963, #5467: no extern "C" into ocaml C-stub headers
13330 - #5199: tests are run only for bytecode if either native support is missing,
13331 or a non-empty value is set to "BYTECODE_ONLY" Makefile variable
13332 - #5215: marshalling of dynlinked closure
13333 - #5236: new '%revapply' primitive with the semantics 'revapply x f = f x',
13334 and '%apply' with semantics 'apply f x = f x'.
13335 - #5255: natdynlink detection on powerpc, hurd, sparc
13336 - #5295: OS threads: problem with caml_c_thread_unregister()
13337 - #5297: compiler now checks existence of builtin primitives
13338 - #5329: (Windows) more efficient Unix.select if all fd's are sockets
13339 - #5357: warning for useless open statements
13340 - #5358: first class modules don't allow "with type" declarations for types
13341 in sub-modules
13342 - #5385: configure: emit a warning when MACOSX_DEPLOYMENT_TARGET is set
13343 - #5396: ocamldep: add options -sort, -all, and -one-line
13344 - #5397: Filename.temp_dir_name should be mutable
13345 - #5403: give better error message when emacs is not found in PATH
13346 - #5411: new directive for the toplevel: #load_rec
13347 - #5420: Unix.openfile share mode (Windows)
13348 - #5421: Unix: do not leak fds in various open_proc* functions
13349 - #5434: implement Unix.times in win32unix (partially)
13350 - #5438: new warnings for unused declarations
13351 - #5439: upgrade config.guess and config.sub
13352 - #5445 and others: better printing of types with user-provided names
13353 - #5454: Digest.compare is missing and md5 doc update
13354 - #5455: .emacs instructions, add lines to recognize ocaml scripts
13355 - #5456: pa_macro: replace __LOCATION__ after macro expansion; add LOCATION_OF
13356 - #5461: bytecode: emit warning when linking two modules with the same name
13357 - #5478: ocamlopt assumes ar command exists
13358 - #5479: Num.num_of_string may raise an exception, not reflected in the
13359 documentation.
13360 - #5501: increase IO_BUFFER_SIZE to 64KiB
13361 - #5532: improve error message when bytecode file is wrong
13362 - #5555: add function Hashtbl.reset to resize the bucket table to
13363 its initial size.
13364 - #5586: increase UNIX_BUFFER_SIZE to 64KiB
13365 - #5597: register names for instrtrace primitives in embedded bytecode
13366 - #5599: Add warn() tag in ocamlbuild to control -w compiler switch
13367 - #5628: add #remove_directory and Topdirs.remove_directory to remove
13368 a directory from the load path
13369 - #5636: in system threads library, issue with linking of pthread_atfork
13370 - #5666: C includes don't provide a revision number
13371 - ocamldebug: ability to inspect values that contain code pointers
13372 - ocamldebug: new 'environment' directive to set environment variables
13373 for debuggee
13374 - configure: add -no-camlp4 option
13375
13376 Shedding weight:
13377 * Removed the obsolete native-code generators for Alpha, HPPA, IA64 and MIPS.
13378 * The "DBM" library (interface with Unix DBM key-value stores) is no
13379 longer part of this distribution. It now lives its own life at
13380 https://forge.ocamlcore.org/projects/camldbm/
13381 * The "OCamlWin" toplevel user interface for MS Windows is no longer
13382 part of this distribution. It now lives its own life at
13383 https://forge.ocamlcore.org/projects/ocamltopwin/
13384
13385 Other changes:
13386 - Copy VERSION file to library directory when installing.
13387
13388
13389 OCaml 3.12.1 (4 Jul 2011):
13390 --------------------------
13391
13392 Bug fixes:
13393 - #4345, #4767: problems with camlp4 printing of float values
13394 - #4380: ocamlbuild should not use tput on windows
13395 - #4487, #5164: multiple 'module type of' are incompatible
13396 - #4552: ocamlbuild does not create symlinks when using '.itarget' file
13397 - #4673, #5144: camlp4 fails on object copy syntax
13398 - #4702: system threads: cleanup tick thread at exit
13399 - #4732: camlp4 rejects polymorphic variants using keywords from macros
13400 - #4778: Win32/MSVC port: rare syntax error in generated MASM assembly file
13401 - #4794, #4959: call annotations not generated by ocamlopt
13402 - #4820: revised syntax pretty printer crashes with 'Stack_overflow'
13403 - #4928: wrong printing of classes and class types by camlp4
13404 - #4939: camlp4 rejects patterns of the '?x:_' form
13405 - #4967: ocamlbuild passes wrong switches to ocamldep through menhir
13406 - #4972: mkcamlp4 does not include 'dynlink.cma'
13407 - #5039: ocamlbuild should use '-linkpkg' only when linking programs
13408 - #5066: ocamldoc: add -charset option used in html generator
13409 - #5069: fcntl() in caml_sys_open may block, do it within blocking section
13410 - #5071, #5129, #5134: inconsistencies between camlp4 and camlp4* binaries
13411 - #5080, #5104: regression in type constructor handling by camlp4
13412 - #5090: bad interaction between toplevel and camlp4
13413 - #5095: ocamlbuild ignores some tags when building bytecode objects
13414 - #5100: ocamlbuild always rebuilds a 'cmxs' file
13415 - #5103: build and install objinfo when building with ocamlbuild
13416 - #5109: crash when a parser calls a lexer that calls another parser
13417 - #5110: invalid module name when using optional argument
13418 - #5115: bytecode executables produced by msvc64 port crash on 32-bit versions
13419 - #5117: bigarray: wrong function name without HAS_MMAP; missing include
13420 - #5118: Camlp4o and integer literals
13421 - #5122: camlp4 rejects lowercase identifiers for module types
13422 - #5123: shift_right_big_int returns a wrong zero
13423 - #5124: substitution inside a signature leads to odd printing
13424 - #5128: typo in 'Camlp4ListComprehension' syntax extension
13425 - #5136: obsolete function used in emacs mode
13426 - #5145: ocamldoc: missing html escapes
13427 - #5146: problem with spaces in multi-line string constants
13428 - #5149: (partial) various documentation problems
13429 - #5156: rare compiler crash with objects
13430 - #5165: ocamlbuild does not pass '-thread' option to ocamlfind
13431 - #5167: camlp4r loops when printing package type
13432 - #5172: camlp4 support for 'module type of' construct
13433 - #5175: in bigarray accesses, make sure bigarray expr is evaluated only once
13434 - #5177: Gc.compact implies Gc.full_major
13435 - #5182: use bytecode version of ocamldoc to generate man pages
13436 - #5184: under Windows, alignment issue with bigarrays mapped from files
13437 - #5188: double-free corruption in bytecode system threads
13438 - #5192: mismatch between words and bytes in interpreting max_young_wosize
13439 - #5202: error in documentation of atan2
13440 - #5209: natdynlink incorrectly detected on BSD systems
13441 - #5213: ocamlbuild should pass '-rectypes' to ocamldoc when needed
13442 - #5217: ocamlfind plugin should add '-linkpkg' for toplevel
13443 - #5228: document the exceptions raised by functions in 'Filename'
13444 - #5229: typo in build script ('TAG_LINE' vs 'TAGLINE')
13445 - #5230: error in documentation of Scanf.Scanning.open_in
13446 - #5234: option -shared reverses order of -cclib options
13447 - #5237: incorrect .size directives generated for x86-32 and x86-64
13448 - #5244: String.compare uses polymorphic compare_val (regression of #4194)
13449 - #5248: regression introduced while fixing #5118
13450 - #5252: typo in docs
13451 - #5258: win32unix: unix fd leak under windows
13452 - #5269: (tentative fix) Wrong ext_ref entries in .annot files
13453 - #5272: caml.el doesn't recognize downto as a keyword
13454 - #5276: issue with ocamlc -pack and recursively-packed modules
13455 - #5280: alignment constraints incorrectly autodetected on MIPS 32
13456 - #5281: typo in error message
13457 - #5308: unused variables not detected in "include (struct .. end)"
13458 - camlp4 revised syntax printing bug in the toplevel (reported on caml-list)
13459 - configure: do not define _WIN32 under cygwin
13460 - Hardened generic comparison in the case where two custom blocks
13461 are compared and have different sets of custom operations.
13462 - Hardened comparison between bigarrays in the case where the two
13463 bigarrays have different kinds.
13464 - Fixed wrong autodetection of expm1() and log1p().
13465 - don't add .exe suffix when installing the ocamlmktop shell script
13466 - ocamldoc: minor fixes related to the display of ocamldoc options
13467 - fixed bug with huge values in OCAMLRUNPARAM
13468 - mismatch between declaration and definition of caml_major_collection_slice
13469
13470 Feature wishes:
13471 - #4992: added '-ml-synonym' and '-mli-synonym' options to ocamldep
13472 - #5065: added '-ocamldoc' option to ocamlbuild
13473 - #5139: added possibility to add options to ocamlbuild
13474 - #5158: added access to current camlp4 parsers and printers
13475 - #5180: improved instruction selection for float operations on amd64
13476 - stdlib: added a 'usage_string' function to Arg
13477 - allow with constraints to add a type equation to a datatype definition
13478 - ocamldoc: allow to merge '@before' tags like other ones
13479 - ocamlbuild: allow dependency on file "_oasis"
13480
13481 Other changes:
13482 - Changed default minor heap size from 32k to 256k words.
13483 - Added new operation 'compare_ext' to custom blocks, called when
13484 comparing a custom block value with an unboxed integer.
13485
13486
13487 Objective Caml 3.12.0 (2 Aug 2010):
13488 -----------------------------------
13489
13490 (Changes that can break existing programs are marked with a "*" )
13491
13492 Language features:
13493 - Shorthand notation for records: in expressions and patterns,
13494 { lbl } stands for { lbl = lbl } and { M.lbl } for { M.lbl = lbl }
13495 - Record patterns of the form { lbl = pat; _ } to mark that not all
13496 labels are listed, purposefully. (See new warning below.)
13497 - Explicit naming of a generic type; in an expression
13498 "fun ... (type t) ... -> e", the type t is considered abstract in its
13499 scope (the arguments that follow it and the body of the function),
13500 and then replaced by a fresh type variable. In particular, the type
13501 t can be used in contexts where a type variable is not allowed
13502 (e.g. for defining an exception in a local module).
13503 - Explicit polymorphic types and polymorphic recursion. In let
13504 definitions, one can write an explicit polymorphic type just
13505 immediately the function name; the polymorphism will be enforced,
13506 and recursive calls may use the polymorphism.
13507 The syntax is the same as for polymorphic methods:
13508 "let [rec] <ident> : 'a1 ... 'an. <typexp> = ..."
13509 - First-class packages modules.
13510 New kind of type expression, for packaged modules: (module PT).
13511 New kind of expression, to pack a module as a first-class value:
13512 (module MODEXPR : PT).
13513 New kind of module expression, to unpack a first-class value as a module:
13514 (val EXPR : PT).
13515 PT is a package type of the form "S" or
13516 "S with type t1 = ... and ... and type tn = ..." (S refers to a module type).
13517 - Local opening of modules in a subexpression.
13518 Syntax: "let open M in e", or "M.(e)"
13519 - In class definitions, method and instance variable override can now
13520 be made explicit, by writing "method!", "val!" or "inherit!" in place of
13521 "method", "val" and "inherit". It is an error to override an
13522 undefined member (or to use overriding inheritance when nothing get
13523 overridden). Additionally, these constructs disactivate respectively
13524 warnings 7 (method override, code 'M') and 13 (instance variable
13525 override, code 'V'). Note that, by default, warning 7 is inactive
13526 and warning 13 is active.
13527 - "Destructive" substitution in signatures.
13528 By writing "<signature> with type t := <typeconstr>" and
13529 "<signature> with module M := <module-path>" one replaces "t" and "M"
13530 inside the signature, removing their respective fields. Among other
13531 uses, this allows to merge two signatures containing identically
13532 named fields.
13533 * While fixing #4824, also corrected a gaping hole in the type checker,
13534 which allowed instantiating separately object parameters and instance
13535 variables in an interface. This hole was here since the beginning of
13536 ocaml, and as a result many programs using object inheritance in a non
13537 trivial way will need to be corrected. You can look at lablgtk2 for an
13538 example.
13539
13540 Compilers and toplevel:
13541 - Warnings are now numbered and can be switched on and off individually.
13542 The old system with letters referring to sets of warnings is still
13543 supported.
13544 - New warnings:
13545 + 9 (code 'R') to signal record patterns without "; _" where
13546 some labels of the record type are not listed in the pattern.
13547 + 28 when giving a wildcard argument to a constant constructor in
13548 a pattern-matching.
13549 + 29 when an end-of-line appears unescaped in a string constant.
13550 + 30 when the same constructor or record field is defined twice in
13551 mutually-recursive type definitions.
13552 * The semantics of warning 7 (code 'M', method override) have changed
13553 (it now detects all overrides, not just repeated definitions inside
13554 the same class body), and it is now inactive by default.
13555 - Better error report in case of unbound qualified identifier: if the module
13556 is unbound this error is reported in the first place.
13557 - Added option '-strict-sequence' to force left hand part of sequence to have
13558 type unit.
13559 - Added option '-no-app-funct' to turn applicative functors off.
13560 This option can help working around mysterious type incompatibilities
13561 caused by the incomplete comparison of applicative paths F(X).t.
13562
13563 Native-code compiler:
13564 - AMD64: shorter and slightly more efficient code generated for
13565 float comparisons.
13566
13567 Standard library:
13568 - Format: new function ikfprintf analogous to ifprintf with a continuation
13569 argument.
13570 * #4210, #4245: stricter range checking in string->integer conversion
13571 functions (int_of_string, Int32.of_string, Int64.of_string,
13572 Nativeint.of_string). The decimal string corresponding to
13573 max_int + 1 is no longer accepted.
13574 - Scanf: to prevent confusion when mixing Scanf scanning functions and direct
13575 low level input, value Scanf.stdin has been added.
13576 * Random: changed the algorithm to produce better randomness. Now passes the
13577 DieHard tests.
13578 - Map: implement functions from Set that make sense for Map.
13579
13580 Other libraries:
13581 * Str: letters that constitute a word now include digits 0-9 and
13582 underscore _. This changes the interpretation of '\b' (word boundary)
13583 in regexps, but is more consistent with other regexp libraries. (#4874).
13584
13585 Ocamlbuild:
13586 - Add support for native dynlink.
13587
13588 New tool:
13589 - ocamlobjinfo: displays various information, esp. dependencies, for
13590 compiled OCaml files (.cmi, .cmo, .cma, .cmx, .cmxa, .cmxs, and bytecode
13591 executables). Extends and makes more official the old objinfo tool
13592 that was installed by some OCaml packages.
13593
13594 All tools:
13595 - #4857: add a -vnum option to display the version number and nothing else
13596
13597 Bug Fixes:
13598 - #4012: Map.map and Map.mapi do not conform to specification
13599 - #4478: better error messages for type definition mismatches
13600 - #4683: labltk script uses fixed path on windows
13601 - #4742: finalisation function raising an exception blocks other finalisations
13602 - #4775: compiler crash on crazy types (temporary fix)
13603 - #4824: narrowing the type of class parameters with a module specification
13604 - #4862: relaxed value restriction and records
13605 - #4884: optional arguments do not work when Some is redefined
13606 - #4964: parenthesized names for infix functions in annot files
13607 - #4970: better error message for instance variables
13608 - #4975: spelling mistakes
13609 - #4988: contravariance lost with ocamlc -i
13610 - #5004: problem in Buffer.add_channel with very large lengths.
13611 - #5008: on AMD64/MSVC port, rare float corruption during GC.
13612 - #5018: wrong exception raised by Dynlink.loadfile.
13613 - #5057: fatal typing error with local module + functor + polymorphic variant
13614 - Wrong type for Obj.add_offset.
13615 - Small problem with representation of Int32, Int64, and Nativeint constants.
13616 - Use RTLD_LOCAL for native dynlink in private mode.
13617
13618 Objective Caml 3.11.2 (20 Jan 2010):
13619 ------------------------------------
13620
13621 Bug fixes:
13622 - #4151: better documentation for min and max w.r.t. NaN
13623 - #4421: ocamlbuild uses wrong compiler for C files
13624 - #4710, #4720: ocamlbuild does not use properly configuration information
13625 - #4750: under some Windows installations, high start-up times for Unix lib
13626 - #4777: problem with scanf and CRLF
13627 - #4783: ocamlmklib problem under Windows
13628 - #4810: BSD problem with socket addresses, e.g. in Unix.getnameinfo
13629 - #4813: issue with parsing of float literals by the GNU assembler
13630 - #4816: problem with modules and private types
13631 - #4818: missed opportunity for type-based optimization of bigarray accesses
13632 - #4821: check for duplicate method names in classes
13633 - #4823: build problem on Mac OS X
13634 - #4836: spurious errors raised by Unix.single_write under Windows
13635 - #4841, #4860, #4930: problem with ocamlopt -output-obj under Mac OS X
13636 - #4847: C compiler error with ocamlc -output-obj under Win64
13637 - #4856: ocamlbuild uses ocamlrun to execute a native plugin
13638 - #4867, #4760: ocamlopt -shared fails on Mac OS X 64bit
13639 - #4873: ocamlbuild ignores "thread" tag when building a custom toplevel
13640 - #4890: ocamlbuild tries to use native plugin on bytecode-only arch
13641 - #4896: ocamlbuild should always pass -I to tools for external libraries
13642 - #4900: small bug triggering automatic compaction even if max_overhead = 1M
13643 - #4902: bug in %.0F printf format
13644 - #4910: problem with format concatenation
13645 - #4922: ocamlbuild recompiles too many files
13646 - #4923: missing \xff for scanf %S
13647 - #4933: functors not handling private types correctly
13648 - #4940: problem with end-of-line in DOS text mode, tentative fix
13649 - #4953: problem compiling bytecode interpreter on ARM in Thumb mode.
13650 - #4955: compiler crash when typing recursive type expression with constraint
13651 - Module Printf: the simple conversion %F (without width indication) was not
13652 treated properly.
13653 - Makefile: problem with cygwin, flexdll, and symbolic links
13654 - Various build problems with ocamlbuild under Windows with msvc
13655
13656 Feature wishes:
13657 - #2337: (tentative implementation) make ocamldebug use #linenum annotations
13658 - #2464, #4477: custom exception printers
13659 - #3456: Obj.double_field and Obj.set_double_field functions
13660 - #4003: destination directory can be given to Filename.[open_]temp_file
13661 - #4647: Buffer.blit function
13662 - #4685: access to Filename.dir_sep
13663 - #4703: support for debugging embedded applications
13664 - #4723: "clear_rules" function to empty the set of ocamlbuild rules
13665 - #4921: configure option to help cross-compilers
13666
13667 Objective Caml 3.11.1 (12 Jun 2009):
13668 ------------------------------------
13669
13670 Bug fixes:
13671 - #4095: ocamldebug: strange behaviour of control-C
13672 - #4403: ocamldebug: improved handling of packed modules
13673 - #4650: Str.regexp_case_fold mis-handling complemented character sets [^a]
13674 - #4660: Scanf.format_from_string: handling of double quote
13675 - #4666: Unix.exec* failure in multithread programs under MacOS X and FreeBSD
13676 - #4667: debugger out of sync with dynlink changes
13677 - #4678: random "out of memory" error with systhreads
13678 - #4690: issue with dynamic loading under MacOS 10.5
13679 - #4692: wrong error message with options -i and -pack passed to ocamlc
13680 - #4699: in otherlibs/dbm, fixed construction of dlldbm.so.
13681 - #4704: error in caml_modify_generational_global_root()
13682 - #4708: (ocamldoc) improved printing of infix identifiers such as "lor".
13683 - #4722: typo in configure script
13684 - #4729: documented the fact that PF_INET6 is not available on all platforms
13685 - #4730: incorrect typing involving abbreviation "type 'a t = 'a"
13686 - #4731: incorrect quoting of arguments passed to the assembler on x86-64
13687 - #4735: Unix.LargeFile.fstat cannot report size over 32bits on Win32
13688 - #4740: guard against possible processor error in
13689 {Int32,Int64,Nativeint}.{div,rem}
13690 - #4745: type inference wrongly produced non-generalizable type variables.
13691 - #4749: better pipe size for win32unix
13692 - #4756: printf: no error reported for wrong format '%_s'
13693 - #4758: scanf: handling of \<newline> by format '%S'
13694 - #4766: incorrect simplification of some type abbreviations.
13695 - #4768: printf: %F does not respect width and precision specifications
13696 - #4769: Format.bprintf fails to flush
13697 - #4775: fatal error Ctype.Unify during module type-checking (temporary fix)
13698 - #4776: bad interaction between exceptions and classes
13699 - #4780: labltk build problem under Windows.
13700 - #4790: under Windows, map ERROR_NO_DATA Win32 error to EPIPE Unix error.
13701 - #4792: bug in Big_int.big_int_of_int64 on 32-bit platforms.
13702 - #4796: ocamlyacc: missing NUL termination of string
13703 - #4804: bug in Big_int.int64_of_big_int on 32-bit platforms.
13704 - #4805: improving compatibility with the clang C compiler
13705 - #4809: issue with Unix.create_process under Win32
13706 - #4814: ocamlbrowser: crash when editing comments
13707 - #4816: module abbreviations remove 'private' type restrictions
13708 - #4817: Object type gives error "Unbound type parameter .."
13709 - Module Parsing: improved computation of locations when an ocamlyacc rule
13710 starts with an empty nonterminal
13711 - Type-checker: fixed wrong variance computation for private types
13712 - x86-32 code generator, MSVC port: wrong "fld" instruction generated.
13713 - ocamlbuild: incorrectly using the compile-time value of $OCAMLLIB
13714 - Makefile problem when configured with -no-shared-libs
13715 - ocamldoc: use dynamic loading in native code
13716
13717 Other changes:
13718 - Improved wording of various error messages
13719 (contributed by Jonathan Davies, Citrix).
13720 - Support for 64-bit mode in Solaris/x86 (#4670).
13721
13722
13723 Objective Caml 3.11.0 (03 Dec 2008):
13724 ------------------------------------
13725
13726 (Changes that can break existing programs are marked with a "*" )
13727
13728 Language features:
13729 - Addition of lazy patterns: "lazy <pat>" matches suspensions whose values,
13730 after forcing, match the pattern <pat>.
13731 - Introduction of private abbreviation types "type t = private <type-expr>",
13732 for abstracting the actual manifest type in type abbreviations.
13733 - Subtyping is now allowed between a private abbreviation and its definition,
13734 and between a polymorphic method and its monomorphic instance.
13735
13736 Compilers:
13737 - The file name for a compilation unit should correspond to a valid
13738 identifier (Otherwise dynamic linking and other things can fail, and
13739 a warning is emitted.)
13740 * Revised -output-obj: the output name must now be provided; its
13741 extension must be one of .o/.obj, .so/.dll, or .c for the
13742 bytecode compiler. The compilers can now produce a shared library
13743 (with all the needed -ccopts/-ccobjs options) directly.
13744 - -dtypes renamed to -annot, records (in .annot files) which function calls
13745 are tail calls.
13746 - All compiler error messages now include a file name and location, for
13747 better interaction with Emacs' compilation mode.
13748 - Optimized compilation of "lazy e" when the argument "e" is
13749 already evaluated.
13750 - Optimized compilation of equality tests with a variant constant constructor.
13751 - The -dllib options recorded in libraries are no longer ignored when
13752 -use_runtime or -use_prims is used (unless -no_auto_link is
13753 explicitly used).
13754 - Check that at most one of -pack, -a, -shared, -c, -output-obj is
13755 given on the command line.
13756 - Optimized compilation of private types as regular manifest types
13757 (e.g. abbreviation to float, float array or record types with only
13758 float fields).
13759
13760 Native-code compiler:
13761 - New port: Mac OS X / Intel in 64-bit mode (configure with -cc "gcc -m64").
13762 - A new option "-shared" to produce a plugin that can be dynamically
13763 loaded with the native version of Dynlink.
13764 - A new option "-nodynlink" to enable optimizations valid only for code
13765 that is never dynlinked (no-op except for AMD64).
13766 - More aggressive unboxing of floats and boxed integers.
13767 - Can select which assembler and asm options to use at configuration time.
13768
13769 Run-time system:
13770 - New implementation of the page table describing the heap (two-level
13771 array in 32 bits, sparse hashtable in 64 bits), fixes issues with address
13772 space randomization on 64-bit OS (#4448).
13773 - New "generational" API for registering global memory roots with the GC,
13774 enables faster scanning of global roots.
13775 (The functions are caml_*_generational_global_root in <caml/memory.h>.)
13776 - New function "caml_raise_with_args" to raise an exception with several
13777 arguments from C.
13778 - Changes in implementation of dynamic linking of C code:
13779 under Win32, use Alain Frisch's flexdll implementation of the dlopen
13780 API; under MacOSX, use dlopen API instead of MacOSX bundle API.
13781 - Programs may now choose a first-fit allocation policy instead of
13782 the default next-fit. First-fit reduces fragmentation but is
13783 slightly slower in some cases.
13784
13785 Standard library:
13786 - Parsing library: new function "set_trace" to programmatically turn
13787 on or off the printing of a trace during parsing.
13788 - Printexc library: new functions "print_backtrace" and "get_backtrace"
13789 to obtain a stack backtrace of the most recently raised exception.
13790 New function "record_backtrace" to turn the exception backtrace mechanism
13791 on or off from within a program.
13792 - Scanf library: fine-tuning of meta format implementation;
13793 fscanf behaviour revisited: only one input buffer is allocated for any
13794 given input channel;
13795 the %n conversion does not count a lookahead character as read.
13796
13797 Other libraries:
13798 - Dynlink: on some platforms, the Dynlink library is now available in
13799 native code. The boolean Dynlink.is_native allows the program to
13800 know whether it has been compiled in bytecode or in native code.
13801 - Bigarrays: added "unsafe_get" and "unsafe_set"
13802 (non-bound-checking versions of "get" and "set").
13803 - Bigarrays: removed limitation "array dimension < 2^31".
13804 - Labltk: added support for TK 8.5.
13805 - Num: added conversions between big_int and int32, nativeint, int64.
13806 More efficient implementation of Num.quo_num and Num.mod_num.
13807 - Threads: improved efficiency of mutex and condition variable operations;
13808 improved interaction with Unix.fork (#4577).
13809 - Unix: added getsockopt_error returning type Unix.error.
13810 Added support for TCP_NODELAY and IPV6_ONLY socket options.
13811 - Win32 Unix: "select" now supports all kinds of file descriptors.
13812 Improved emulation of "lockf" (#4609).
13813
13814 Tools:
13815 - ocamldebug now supported under Windows (MSVC and Mingw ports),
13816 but without the replay feature. (Contributed by Dmitry Bely
13817 and Sylvain Le Gall at OCamlCore with support from Lexifi.)
13818 - ocamldoc: new option -no-module-constraint-filter to include functions
13819 hidden by signature constraint in documentation.
13820 - ocamlmklib and ocamldep.opt now available under Windows ports.
13821 - ocamlmklib no longer supports the -implib option.
13822 - ocamlnat: an experimental native toplevel (not built by default).
13823
13824 Camlp4:
13825 * programs linked with camlp4lib.cma now also need dynlink.cma.
13826
13827 Bug fixes:
13828 - Major GC and heap compaction: fixed bug involving lazy values and
13829 out-of-heap pointers.
13830 - #3915: updated most man pages.
13831 - #4261: type-checking of recursive modules
13832 - #4308: better stack backtraces for "spontaneous" exceptions such as
13833 Stack_overflow, Out_of_memory, etc.
13834 - #4338: Str.global_substitute, Str.global_replace and the Str.*split*
13835 functions are now tail-recursive.
13836 - #4503: fixed bug in classify_float on ARM.
13837 - #4512: type-checking of recursive modules
13838 - #4517: crash in ocamllex-generated lexers.
13839 - #4542: problem with return value of Unix.nice.
13840 - #4557: type-checking of recursive modules.
13841 - #4562: strange %n semantics in scanf.
13842 - #4564: add note "stack is not executable" to object files generated by
13843 ocamlopt (Linux/x86, Linux/AMD64).
13844 - #4566: bug in Ratio.approx_ratio_fix and Num.approx_num_fix.
13845 - #4582: clarified the documentation of functions in the String module.
13846 - #4583: stack overflow in "ocamlopt -g" during closure conversion pass.
13847 - #4585: ocamldoc and "val virtual" declarations.
13848 - #4587: ocamldoc and escaped @ characters.
13849 - #4605: Buffer.add_substitute was sometime wrong when target string had
13850 backslashes.
13851 - #4614: Inconsistent declaration of CamlCBCmd in LablTk library.
13852
13853
13854 Objective Caml 3.10.2 (29 Feb 2008):
13855 ------------------------------------
13856
13857 Bug fixes:
13858 - #3410 (partial) Typo in ocamldep man page
13859 - #3952 (partial) ocamlopt: allocation problems on ARM
13860 - #4339 (continued) ocamlopt: problems on HPPA
13861 - #4455 str.mli not installed under Windows
13862 - #4473 crash when accessing float array with polymorphic method
13863 - #4480 runtime would not compile without gcc extensions
13864 - #4481 wrong typing of exceptions with object arguments
13865 - #4490 typo in error message
13866 - Random crash on 32-bit when major_heap_increment >= 2^22
13867 - Big performance bug in Weak hashtables
13868 - Small bugs in the make-package-macosx script
13869 - Bug in typing of polymorphic variants (reported on caml-list)
13870
13871
13872 Objective Caml 3.10.1 (11 Jan 2008):
13873 ------------------------------------
13874
13875 Bug fixes:
13876 - #3830 small bugs in docs
13877 - #4053 compilers: improved compilation time for large variant types
13878 - #4174 ocamlopt: fixed ocamlopt -nopervasives
13879 - #4199 otherlibs: documented a small problem in Unix.utimes
13880 - #4280 camlp4: parsing of identifier (^)
13881 - #4281 camlp4: parsing of type constraint
13882 - #4285 runtime: cannot compile under AIX
13883 - #4286 ocamlbuild: cannot compile under AIX and SunOS
13884 - #4288 compilers: including a functor application with side effects
13885 - #4295 camlp4 toplevel: synchronization after an error
13886 - #4300 ocamlopt: crash with backtrace and illegal array access
13887 - #4302 camlp4: list comprehension parsing problem
13888 - #4304 ocamlbuild: handle -I correctly
13889 - #4305 stdlib: alignment of Arg.Symbol
13890 - #4307 camlp4: assertion failure
13891 - #4312 camlp4: accept "let _ : int = 1"
13892 - #4313 ocamlbuild: -log and missing directories
13893 - #4315 camlp4: constraints in classes
13894 - #4316 compilers: crash with recursive modules and Lazy
13895 - #4318 ocamldoc: installation problem with Cygwin (tentative fix)
13896 - #4322 ocamlopt: stack overflow under Windows
13897 - #4325 compilers: wrong error message for unused var
13898 - #4326 otherlibs: marshal Big_int on win64
13899 - #4327 ocamlbuild: make emacs look for .annot in _build directory
13900 - #4328 camlp4: stack overflow with nil nodes
13901 - #4331 camlp4: guards on fun expressions
13902 - #4332 camlp4: parsing of negative 32/64 bit numbers
13903 - #4336 compilers: unsafe recursive modules
13904 - #4337 (note) camlp4: invalid character escapes
13905 - #4339 ocamlopt: problems on HP-UX (tentative fix)
13906 - #4340 camlp4: wrong pretty-printing of optional arguments
13907 - #4348 ocamlopt: crash on Mac Intel
13908 - #4349 camlp4: bug in private type definitions
13909 - #4350 compilers: type errors with records and polymorphic variants
13910 - #4352 compilers: terminal recursion under Windows (tentative fix)
13911 - #4354 ocamlcp: mismatch with ocaml on polymorphic let
13912 - #4358 ocamlopt: float constants wrong on ARM
13913 - #4360 ocamldoc: string inside comment
13914 - #4365 toplevel: wrong pretty-printing of polymorphic variants
13915 - #4373 otherlibs: leaks in win32unix
13916 - #4374 otherlibs: threads module not initialized
13917 - #4375 configure: fails to build on bytecode-only architectures
13918 - #4377 runtime: finalisation of infix pointers
13919 - #4378 ocamlbuild: typo in plugin.ml
13920 - #4379 ocamlbuild: problem with plugins under Windows
13921 - #4382 compilers: typing of polymorphic record fields
13922 - #4383 compilers: including module with private type
13923 - #4385 stdlib: Int32/Int64.format are unsafe
13924 - #4386 otherlibs: wrong signal numbers with Unix.sigprocmask etc.
13925 - #4387 ocamlbuild: build directory not used properly
13926 - #4392 ocamldep: optional argument of class
13927 - #4394 otherlibs: infinite loops in Str
13928 - #4397 otherlibs: wrong size for flag arrays in win32unix
13929 - #4402 ocamldebug: doesn't work with -rectypes
13930 - #4410 ocamlbuild: problem with plugin and -build
13931 - #4411 otherlibs: crash with Unix.access under Windows
13932 - #4412 stdlib: marshalling broken on 64 bit architectures
13933 - #4413 ocamlopt: crash on AMD64 with out-of-bound access and reraise
13934 - #4417 camlp4: pretty-printing of unary minus
13935 - #4419 camlp4: problem with constraint in type class
13936 - #4426 compilers: problem with optional labels
13937 - #4427 camlp4: wrong pretty-printing of lists of functions
13938 - #4433 ocamlopt: fails to build on MacOSX 10.5
13939 - #4435 compilers: crash with objects
13940 - #4439 fails to build on MacOSX 10.5
13941 - #4441 crash when build on sparc64 linux
13942 - #4442 stdlib: crash with weak pointers
13943 - #4446 configure: fails to detect X11 on MacOSX 10.5
13944 - #4448 runtime: huge page table on 64-bit architectures
13945 - #4450 compilers: stack overflow with recursive modules
13946 - #4470 compilers: type-checking of recursive modules too restrictive
13947 - #4472 configure: autodetection of libX11.so on Fedora x86_64
13948 - printf: removed (partially implemented) positional specifications
13949 - polymorphic < and <= comparisons: some C compiler optimizations
13950 were causing incorrect results when arguments are incomparable
13951
13952 New features:
13953 - made configure script work on PlayStation 3
13954 - ARM port: brought up-to-date for Debian 4.0 (Etch)
13955 - many other small changes and bugfixes in camlp4, ocamlbuild, labltk,
13956 emacs files
13957
13958
13959 Objective Caml 3.10.0 (18 May 2007):
13960 ------------------------------------
13961
13962 (Changes that can break existing programs are marked with a "*" )
13963
13964 Language features:
13965 - Added virtual instance variables in classes "val virtual v : t"
13966 * Changed the behaviour of instance variable overriding; the new
13967 definition replaces the old one, rather than creating a new
13968 variable.
13969
13970 New tools:
13971 - ocamlbuild: compilation manager for OCaml applications and libraries.
13972 See draft documentation at http://gallium.inria.fr/~pouillar/
13973 * Camlp4: heavily revised implementation, new API.
13974
13975 New ports:
13976 - MacOS X PowerPC 64 bits.
13977 - MS Windows 64 bits (x64) using the Microsoft PSDK toolchain.
13978 - MS Windows 32 bits using the Visual Studio 2005 toolchain.
13979
13980 Compilers:
13981 - Faster type-checking of functor applications.
13982 - Referencing an interface compiled with -rectypes from a module
13983 not compiled with -rectypes is now an error.
13984 - Revised the "fragile matching" warning.
13985
13986 Native-code compiler:
13987 - Print a stack backtrace on an uncaught exception.
13988 (Compile and link with ocamlopt -g; execute with OCAMLRUNPARAM=b.)
13989 Supported on Intel/AMD in 32 and 64 bits, PPC in 32 and 64 bits.
13990 - Stack overflow detection on MS Windows 32 bits (courtesy O. Andrieu).
13991 - Stack overflow detection on MacOS X PPC and Intel.
13992 - Intel/AMD 64 bits: generate position-independent code by default.
13993 - Fixed bug involving -for-pack and missing .cmx files (#4124).
13994 - Fixed bug causing duplication of literals (#4152).
13995
13996 Run-time system:
13997 - C/Caml interface functions take "char const *" arguments
13998 instead of "char *" when appropriate.
13999 - Faster string comparisons (fast case if strings are ==).
14000
14001 Standard library:
14002 - Refined typing of format strings (type format6).
14003 - Printf, Format: new function ifprintf that consumes its arguments
14004 and prints nothing (useful to print conditionally).
14005 - Scanf:
14006 new function format_from_string to convert a string to a format string;
14007 new %r conversion to accommodate user defined scanners.
14008 - Filename: improved Win32 implementation of Filename.quote.
14009 - List: List.nth now tail-recursive.
14010 - Sys: added Sys.is_directory. Some functions (e.g. Sys.command) that
14011 could incorrectly raise Sys_io_blocked now raise Sys_error as intended.
14012 - String and Char: the function ``escaped'' now escapes all the characters
14013 especially handled by the compiler's lexer (#4220).
14014
14015 Other libraries:
14016 - Bigarray: mmap_file takes an optional argument specifying
14017 the start position of the data in the mapped file.
14018 - Dynlink: now defines only two modules, Dynlink and Dynlinkaux (internal),
14019 reducing risks of name conflicts with user modules.
14020 - Labltk under Win32: now uses Tcl/Tk 8.4 instead of 8.3 by default.
14021 - VM threads: improved performance of I/O operations (less polling).
14022 - Unix: new function Unix.isatty.
14023 - Unix emulation under Win32:
14024 fixed incorrect error reporting in several functions (#4097);
14025 better handling of channels opened on sockets (#4098);
14026 fixed GC bug in Unix.system (#4112).
14027
14028 Documentation generator (OCamldoc):
14029 - correctly handle '?' in value names (#4215)
14030 - new option -hide-warnings not to print ocamldoc warnings
14031
14032 Lexer generator (ocamllex): improved error reporting.
14033
14034 License: fixed a typo in the "special exception" to the LGPL.
14035
14036
14037 Objective Caml 3.09.3 (15 Sep 2006):
14038 ------------------------------------
14039
14040 Bug fixes:
14041 - ocamldoc: -using modtype constraint to filter module elements displayed
14042 in doc #4016
14043 - ocamldoc: error in merging of top dependencies of modules #4007
14044 - ocamldoc: -dot-colors has no effect #3981
14045 - ocamdloc: missing crossref in text from intro files #4066
14046 - compilers: segfault with recursive modules #4008
14047 - compilers: infinite loop when compiling objects #4018
14048 - compilers: bad error message when signature mismatch #4001
14049 - compilers: infinite loop with -rectypes #3999
14050 - compilers: contravariance bug in private rows
14051 - compilers: unsafe cast with polymorphic exception #4002
14052 - native compiler: bad assembly code generated for AMD64 #4067
14053 - native compiler: stack alignment problems on MacOSX/i386 #4036
14054 - stdlib: crash in marshalling #4030
14055 - stdlib: crash when closing a channel twice #4039
14056 - stdlib: memory leak in Sys.readdir #4093
14057 - C interface: better definition of CAMLreturn #4068
14058 - otherlibs/unix: crash in gethostbyname #3043
14059 - tools: subtle problem with unset in makefile #4048
14060 - camlp4: install pa_o_fast.o #3812
14061 - camlp4: install more modules #3689
14062
14063 New features:
14064 - ocamldoc: name resolution in cross-referencing {!name}: if name is not
14065 found, then it is searched in the parent module/class, and in the parent
14066 of the parent, and so on until it is found.
14067 - ocamldoc: new option -short-functors to use a short form to display
14068 functors in html generator #4017
14069 - ocamlprof: added "-version" option
14070
14071
14072
14073 Objective Caml 3.09.2 (14 Apr 2006):
14074 ------------------------------------
14075
14076 Bug fixes:
14077 - Makefile: problem with "make world.opt" #3954
14078 - compilers: problem compiling several modules with one command line #3979
14079 - compilers,ocamldoc: error message that Emacs cannot parse
14080 - compilers: crash when printing type error #3968
14081 - compilers: -dtypes wrong for monomorphic type variables #3894
14082 - compilers: wrong warning on optional arguments #3980
14083 - compilers: crash when wrong use of type constructor in let rec #3976
14084 - compilers: better wording of "statement never returns" warning #3889
14085 - runtime: inefficiency of signal handling #3990
14086 - runtime: crashes with I/O in multithread programs #3906
14087 - camlp4: empty file name in error messages #3886
14088 - camlp4: stack overflow #3948
14089 - otherlibs/labltk: ocamlbrowser ignores its command line options #3961
14090 - otherlibs/unix: Unix.times wrong under Mac OS X #3960
14091 - otherlibs/unix: wrong doc for execvp and execvpe #3973
14092 - otherlibs/win32unix: random crash in Unix.stat #3998
14093 - stdlib: update_mod not found under Windows #3847
14094 - stdlib: Filename.dirname/basename wrong on Win32 #3933
14095 - stdlib: incomplete documentation of Pervasives.abs #3967
14096 - stdlib: Printf bugs #3902, #3955
14097 - tools/checkstack.c: missing include
14098 - yacc: crash when given argument "-" #3956
14099
14100 New features:
14101 - ported to MacOS X on Intel #3985
14102 - configure: added support for GNU Hurd #3991
14103
14104 Objective Caml 3.09.1 (4 Jan 2006):
14105 -----------------------------------
14106
14107 Bug fixes:
14108 - compilers: raise not_found with -principal #3855
14109 - compilers: assert failure in typeclass.cml #3856
14110 - compilers: assert failure in typing/ctype.ml #3909
14111 - compilers: fatal error exception Ctype.Unify #3918
14112 - compilers: spurious warning Y in objects #3868
14113 - compilers: spurious warning Z on loop index #3907
14114 - compilers: error message that emacs cannot parse
14115 - ocamlopt: problems with -for-pack/-pack #3825, #3826, #3919
14116 - ocamlopt: can't produce shared libraries on x86_64 #3869, #3924
14117 - ocamlopt: float alignment problem on SPARC #3944
14118 - ocamlopt: can't compile on MIPS #3936
14119 - runtime: missing dependence for ld.conf
14120 - runtime: missing dependence for .depend.nt #3880
14121 - runtime: memory leak in caml_register_named_value #3940
14122 - runtime: crash in Marshal.to_buffer #3879
14123 - stdlib: Sys.time giving wrong results on Mac OS X #3850
14124 - stdlib: Weak.get_copy causing random crashes in rare cases
14125 - stdlib, debugger, labltk: use TMPDIR if set #3895
14126 - stdlib: scanf bug on int32 and nativeint #3932
14127 - camlp4: mkcamlp4 option parsing problem #3941
14128 - camlp4: bug in pretty-printing of lazy/assert/new
14129 - camlp4: update the unmaintained makefile for _loc name
14130 - ocamldoc: several fixes see ocamldoc/Changes.txt
14131 - otherlibs/str: bug in long sequences of alternatives #3783
14132 - otherlibs/systhreads: deadlock in Windows #3910
14133 - tools: update dumpobj to handle new event format #3873
14134 - toplevel: activate warning Y in toplevel #3832
14135
14136 New features:
14137 - otherlibs/labltk: browser uses menu bars instead of menu buttons
14138
14139 Objective Caml 3.09.0 (27 Oct 2006):
14140 ------------------------------------
14141
14142 (Changes that can break existing programs are marked with a "*" )
14143
14144 Language features:
14145 - Introduction of private row types, for abstracting the row in object
14146 and variant types.
14147
14148 Type checking:
14149 - Polymorphic variants with at most one constructor [< `A of t] are no
14150 longer systematically promoted to the exact type [`A of t]. This was
14151 more confusing than useful, and created problems with private row
14152 types.
14153
14154 Both compilers:
14155 - Added warnings 'Y' and 'Z' for local variables that are bound but
14156 never used.
14157 - Added warning for some uses non-returning functions (e.g. raise), when they
14158 are passed extra arguments, or followed by extra statements.
14159 - Pattern matching: more prudent compilation in case of guards; fixed #3780.
14160 - Compilation of classes: reduction in size of generated code.
14161 - Compilation of "module rec" definitions: fixed a bad interaction with
14162 structure coercion (to a more restrictive signature).
14163
14164 Native-code compiler (ocamlopt):
14165 * Revised implementation of the -pack option (packing of several compilation
14166 units into one). The .cmx files that are to be packed with
14167 "ocamlopt -pack -o P.cmx" must be compiled with "ocamlopt -for-pack P".
14168 In exchange for this additional constraint, ocamlopt -pack is now
14169 available on all platforms (no need for binutils).
14170 * Fixed wrong evaluation order for arguments to certain inlined functions.
14171 - Modified code generation for "let rec ... and ..." to reduce compilation
14172 time (which was quadratic in the number of mutually-recursive functions).
14173 - x86 port: support tail-calls for functions with up to 21 arguments.
14174 - AMD64 port, Linux: recover from system stack overflow.
14175 - Sparc port: more portable handling of out-of-bound conditions
14176 on systems other than Solaris.
14177
14178 Standard library:
14179 - Pervasives: faster implementation of close_in, close_out.
14180 set_binary_mode_{out,in} now working correctly under Cygwin.
14181 - Printf: better handling of partial applications of the printf functions.
14182 - Scanf: new function sscanf_format to read a format from a
14183 string. The type of the resulting format is dynamically checked and
14184 should be the type of the template format which is the second argument.
14185 - Scanf: no more spurious lookahead attempt when the end of file condition
14186 is set and a correct token has already been read and could be returned.
14187
14188 Other libraries:
14189 - System threads library: added Thread.sigmask; fixed race condition
14190 in signal handling.
14191 - Bigarray library: fixed bug in Array3.of_array.
14192 - Unix library: use canonical signal numbers in results of Unix.wait*;
14193 hardened Unix.establish_server against EINTR errors.
14194
14195 Run-time system:
14196 - Support platforms where sizeof(void *) = 8 and sizeof(long) = 4.
14197 - Improved and cleaned up implementation of signal handling.
14198
14199 Replay debugger:
14200 - Improved handling of locations in source code.
14201
14202 OCamldoc:
14203 - extensible {foo } syntax
14204 - user can give .txt files on the command line, containing ocamldoc formatted
14205 text, to be able to include bigger texts out of source files
14206 - -o option is now used by the html generator to indicate the prefix
14207 of generated index files (to avoid conflict when a Index module exists
14208 on case-insensitive file systems).
14209
14210 Miscellaneous:
14211 - Configuration information is installed in `ocamlc -where`/Makefile.config
14212 and can be used by client Makefiles or shell scripts.
14213
14214 Objective Caml 3.08.4 (11 Aug 2005):
14215 ------------------------------------
14216
14217 New features:
14218 - configure: find X11 config in some 64-bit Linux distribs
14219 - ocamldoc: (**/**) can be canceled with another (**/**) #3665
14220 - graphics: added resize_window
14221 - graphics: check for invalid arguments to drawing primitives #3595
14222 - ocamlbrowser: use windows subsystem on mingw
14223
14224 Bug fixes:
14225 - ocamlopt: code generation problem on AMD64 #3640
14226 - wrong code generated for some classes #3576
14227 - fatal error when compiling some OO code #3745
14228 - problem with comparison on constant constructors #3608
14229 - camlp4: cryptic error message #3592
14230 - camlp4: line numbers in multi-line antiquotations #3549
14231 - camlp4: problem with make depend
14232 - camlp4: parse error with :> #3561
14233 - camlp4: ident conversion problem with val/contents/contents__
14234 - camlp4: several small parsing problems #3688
14235 - ocamldebug: handling of spaces in executable file name #3736
14236 - emacs-mode: problem when caml-types-buffer is deleted by user #3704
14237 - ocamldoc: extra backslash in ocamldoc man page #3687
14238 - ocamldoc: improvements to HTML display #3698
14239 - ocamldoc: escaping of @ in info files
14240 - ocamldoc: escaping of . and \ in man pages #3686
14241 - ocamldoc: better error reporting of misplaced comments
14242 - graphics: fixed .depend file #3558
14243 - graphics: segfault with threads and graphics #3651
14244 - nums: several bugs: #3718, #3719, others
14245 - nums: inline asm problems with gcc 4.0 #3604, #3637
14246 - threads: problem with backtrace
14247 - unix: problem with getaddrinfo #3565
14248 - stdlib: documentation of Int32.rem and Int64.rem #3573
14249 - stdlib: documentation of List.rev_map2 #3685
14250 - stdlib: wrong order in Map.fold #3607
14251 - stdlib: documentation of maximum float array length #3714
14252 - better detection of cycles when using -rectypes
14253 - missing case of module equality #3738
14254 - better error messages for unbound type variables
14255 - stack overflow while printing type error message #3705
14256 - assert failure when typing some classes #3638
14257 - bug in type_approx
14258 - better error messages related to type variance checking
14259 - yacc: avoid name capture for idents of the Parsing module
14260
14261
14262 Objective Caml 3.08.3 (24 Mar 2005):
14263 ------------------------------------
14264
14265 New features:
14266 - support for ocamlopt -pack under Mac OS X (#2634, #3320)
14267 - ignore unknown warning options for forward and backward compatibility
14268 - runtime: export caml_compare_unordered (#3479)
14269 - camlp4: install argl.* files (#3439)
14270 - ocamldoc: add -man-section option
14271 - labltk: add the "solid" relief option (#3343)
14272
14273 Bug fixes:
14274 - typing: fix unsoundness in type declaration variance inference.
14275 Type parameters which are constrained must now have an explicit variant
14276 annotation, otherwise they are invariant. This is not backward
14277 compatible, so this might break code which either uses subtyping or
14278 uses the relaxed value restriction (i.e. was not typable before 3.07)
14279 - typing: erroneous partial match warning for polymorphic variants (#3424)
14280 - runtime: handle the case of an empty command line (#3409, #3444)
14281 - stdlib: make Sys.executable_name an absolute path in native code (#3303)
14282 - runtime: fix memory leak in finalise.c
14283 - runtime: auto-trigger compaction even if gc is called manually (#3392)
14284 - stdlib: fix segfault in Obj.dup on zero-sized values (#3406)
14285 - camlp4: correct parsing of the $ identifier (#3310, #3469)
14286 - windows (MS tools): use link /lib instead of lib (#3333)
14287 - windows (MS tools): change default install destination
14288 - autoconf: better checking of SSE2 instructions (#3329, #3330)
14289 - graphics: make close_graph close the X display as well as the window (#3312)
14290 - num: fix big_int_of_string (empty string) (#3483)
14291 - num: fix big bug on 64-bit architecture (#3299)
14292 - str: better documentation of string_match and string_partial_match (#3395)
14293 - unix: fix file descriptor leak in Unix.accept (#3423)
14294 - unix: miscellaneous clean-ups
14295 - unix: fix documentation of Unix.tm (#3341)
14296 - graphics: fix problem when allocating lots of images under Windows (#3433)
14297 - compiler: fix error message with -pack when .cmi is missing (#3028)
14298 - cygwin: fix problem with compilation of camlheader (#3485)
14299 - stdlib: Filename.basename doesn't return an empty string any more (#3451)
14300 - stdlib: better documentation of Open_excl flag (#3450)
14301 - ocamlcp: accept -thread option (#3511)
14302 - ocamldep: handle spaces in file names (#3370)
14303 - compiler: remove spurious warning in pattern-matching on variants (#3424)
14304 - windows: better handling of InterpreterPath registry entry (#3334, #3432)
14305
14306
14307 Objective Caml 3.08.2 (22 Nov 2004):
14308 ------------------------------------
14309
14310 Bug fixes:
14311 - runtime: memory leak when unmarshalling big data structures (#3247)
14312 - camlp4: incorrect line numbers in errors (#3188)
14313 - emacs: xemacs-specific code, wrong call to "sit-for"
14314 - ocamldoc: "Lexing: empty token" (#3173)
14315 - unix: problem with close_process_* (#3191)
14316 - unix: possible coredumps (#3252)
14317 - stdlib: wrong order in Set.fold (#3161)
14318 - ocamlcp: array out of bounds in profiled programs (#3267)
14319 - yacc: problem with polymorphic variant types for grammar entries (#3033)
14320
14321 Misc:
14322 - export <caml/printexc.h> for caml_format_exception (#3080)
14323 - clean up caml_search_exe_in_path (maybe #3079)
14324 - camlp4: new function "make_lexer" for new-style locations
14325 - unix: added missing #includes (#3088)
14326
14327
14328 Objective Caml 3.08.1 (19 Aug 2004):
14329 ------------------------------------
14330
14331 Licence:
14332 - The emacs files are now under GPL
14333 - Slightly relaxed some conditions of the QPL
14334
14335 Bug fixes:
14336 - ld.conf now generated at compile-time instead of install-time
14337 - fixed -pack on Windows XP (#2935)
14338 - fixed Obj.tag (#2946)
14339 - added support for multiple dlopen in Darwin
14340 - run ranlib when installing camlp4 libraries (#2944)
14341 - link camlp4opt with -linkall (#2949)
14342 - camlp4 parsing of patterns now conforms to normal parsing (#3015)
14343 - install camlp4 *.cmx files (#2955)
14344 - fixed handling of linefeed in string constants in camlp4 (#3074)
14345 - ocamldoc: fixed display of class parameters in HTML and LaTeX (#2994)
14346 - ocamldoc: fixed display of link to class page in html (#2994)
14347 - Windows toplevel GUI: assorted fixes (including #2932)
14348
14349 Misc:
14350 - added -v option to ocamllex
14351 - ocamldoc: new -intf and -impl options supported (#3036)
14352
14353 Objective Caml 3.08.0 (13 Jul 2004):
14354 ------------------------------------
14355
14356 (Changes that can break existing programs are marked with a "*" )
14357
14358 Language features:
14359 - Support for immediate objects, i.e. objects defined without going
14360 through a class. (Syntax is "object <fields and methods> end".)
14361
14362 Type-checking:
14363 - When typing record construction and record patterns, can omit
14364 the module qualification on all labels except one. I.e.
14365 { M.l1 = ...; l2 = ... } is interpreted as { M.l1 = ...; M.l2 = ... }
14366
14367 Both compilers:
14368 - More compact compilation of classes.
14369 - Much more efficient handling of class definitions inside functors
14370 or local modules.
14371 - Simpler representation for method tables. Objects can now be marshaled
14372 between identical programs with the flag Marshal.Closures.
14373 - Improved error messages for objects and variants.
14374 - Improved printing of inferred module signatures (toplevel and ocamlc -i).
14375 Recursion between type, class, class type and module definitions is now
14376 correctly printed.
14377 - The -pack option now accepts compiled interfaces (.cmi files) in addition
14378 to compiled implementations (.cmo or .cmx).
14379 * A compile-time error is signaled if an integer literal exceeds the
14380 range of representable integers.
14381 - Fixed code generation error for "module rec" definitions.
14382 - The combination of options -c -o sets the name of the generated
14383 .cmi / .cmo / .cmx files.
14384
14385 Bytecode compiler:
14386 - Option -output-obj is now compatible with Dynlink and
14387 with embedded toplevels.
14388
14389 Native-code compiler:
14390 - Division and modulus by zero correctly raise exception Division_by_zero
14391 (instead of causing a hardware trap).
14392 - Improved compilation time for the register allocation phase.
14393 - The float constant -0.0 was incorrectly treated as +0.0 on some processors.
14394 - AMD64: fixed bugs in asm glue code for GC invocation and exception raising
14395 from C.
14396 - IA64: fixed incorrect code generated for "expr mod 1".
14397 - PowerPC: minor performance tweaks for the G4 and G5 processors.
14398
14399 Standard library:
14400 * Revised handling of NaN floats in polymorphic comparisons.
14401 The polymorphic boolean-valued comparisons (=, <, >, etc) now treat
14402 NaN as uncomparable, as specified by the IEEE standard.
14403 The 3-valued comparison (compare) treats NaN as equal to itself
14404 and smaller than all other floats. As a consequence, x == y
14405 no longer implies x = y but still implies compare x y = 0.
14406 * String-to-integer conversions now fail if the result overflows
14407 the range of integers representable in the result type.
14408 * All array and string access functions now raise
14409 Invalid_argument("index out of bounds") when a bounds check fails.
14410 In earlier releases, different exceptions were raised
14411 in bytecode and native-code.
14412 - Module Buffer: new functions Buffer.sub, Buffer.nth
14413 - Module Int32: new functions Int32.bits_of_float, Int32.float_of_bits.
14414 - Module Map: new functions is_empty, compare, equal.
14415 - Module Set: new function split.
14416 * Module Gc: in-order finalisation, new function finalise_release.
14417
14418 Other libraries:
14419 - The Num library: complete reimplementation of the C/asm lowest
14420 layer to work around potential licensing problems.
14421 Improved speed on the PowerPC and AMD64 architectures.
14422 - The Graphics library: improved event handling under MS Windows.
14423 - The Str library: fixed bug in "split" functions with nullable regexps.
14424 - The Unix library:
14425 . Added Unix.single_write.
14426 . Added support for IPv6.
14427 . Bug fixes in Unix.closedir.
14428 . Allow thread switching on Unix.lockf.
14429
14430 Runtime System:
14431 * Name space depollution: all global C identifiers are now prefixed
14432 with "caml" to avoid name clashes with other libraries. This
14433 includes the "external" primitives of the standard runtime.
14434
14435 Ports:
14436 - Windows ports: many improvements in the OCamlWin toplevel application
14437 (history, save inputs to file, etc). Contributed by Christopher A. Watford.
14438 - Native-code compilation supported for HPPA/Linux. Contributed by Guy Martin.
14439 - Removed support for MacOS9. Mac OS 9 is obsolete and the port was not
14440 updated since 3.05.
14441 - Removed ocamlopt support for HPPA/Nextstep and Power/AIX.
14442
14443 Ocamllex:
14444 - #line directives in the input file are now accepted.
14445 - Added character set concatenation operator "cset1 # cset2".
14446
14447 Ocamlyacc:
14448 - #line directives in the input file are now accepted.
14449
14450 Camlp4:
14451 * Support for new-style locations (line numbers, not just character numbers).
14452 - See camlp4/CHANGES and camlp4/ICHANGES for more info.
14453
14454
14455 Objective Caml 3.07 (29 Sep 2003):
14456 ----------------------------------
14457
14458 Language features:
14459 - Experimental support for recursive module definitions
14460 module rec A : SIGA = StructA and B : SIGB = StructB and ...
14461 - Support for "private types", or more exactly concrete data types
14462 with private constructors or labels. These data types can be
14463 de-structured normally in pattern matchings, but values of these
14464 types cannot be constructed directly outside of their defining module.
14465 - Added integer literals of types int32, nativeint, int64
14466 (written with an 'l', 'n' or 'L' suffix respectively).
14467
14468 Type-checking:
14469 - Allow polymorphic generalization of covariant parts of expansive
14470 expressions. For instance, if f: unit -> 'a list, "let x = f ()"
14471 gives "x" the generalized type forall 'a. 'a list, instead of '_a list
14472 as before.
14473 - The typing of polymorphic variants in pattern matching has changed.
14474 It is intended to be more regular, sticking to the principle of "closing
14475 only the variants which would be otherwise incomplete". Two potential
14476 consequences: (1) some types may be left open which were closed before,
14477 and the resulting type might not match the interface anymore (expected to
14478 be rare); (2) in some cases an incomplete match may be generated.
14479 - Lots of bug fixes in the handling of polymorphism and recursion inside
14480 types.
14481 - Added a new "-dtypes" option to ocamlc/ocamlopt, and an emacs extension
14482 "emacs/caml-types.el". The compiler option saves inferred type information
14483 to file *.annot, and the emacs extension allows the user to look at the
14484 type of any subexpression in the source file. Works even in the case
14485 of a type error (all the types computed up to the error are available).
14486 This new feature is also supported by ocamlbrowser.
14487 - Disable "method is overridden" warning when the method was explicitly
14488 redefined as virtual beforehand (i.e. not through inheritance). Typing
14489 and semantics are unchanged.
14490
14491 Both compilers:
14492 - Added option "-dtypes" to dump detailed type information to a file.
14493 - The "-i" option no longer generates compiled files, it only prints
14494 the inferred types.
14495 - The sources for the module named "Mod" can be placed either in Mod.ml or
14496 in mod.ml.
14497 - Compilation of "let rec" on non-functional values: tightened some checks,
14498 relaxed some other checks.
14499 - Fixed wrong code that was generated for "for i = a to max_int"
14500 or "for i = a downto min_int".
14501 - An explicit interface Mod.mli can now be provided for the module obtained
14502 by ocamlc -pack -o Mod.cmo ... or ocamlopt -pack -o Mod.cmx ...
14503 - Revised internal handling of source code locations, now handles
14504 preprocessed code better.
14505 - Pattern-matching bug on float literals fixed.
14506 - Minor improvements on pattern-matching over variants.
14507 - More efficient compilation of string comparisons and the "compare" function.
14508 - More compact code generated for arrays of constants.
14509 - Fixed GC bug with mutable record fields of type "exn".
14510 - Added warning "E" for "fragile patterns": pattern matchings that would
14511 not be flagged as partial if new constructors were added to the data type.
14512
14513 Bytecode compiler:
14514 - Added option -vmthread to select the threads library with VM-level
14515 scheduling. The -thread option now selects the system threads library.
14516
14517 Native-code compiler:
14518 - New port: AMD64 (Opteron).
14519 - Fixed instruction selection bug on expressions of the kind (raise Exn)(arg).
14520 - Several bug fixes in ocamlopt -pack (tracking of imported modules,
14521 command line too long).
14522 - Signal handling bug fixed.
14523 - x86 port:
14524 Added -ffast-math option to use inline trigo and log functions.
14525 Small performance tweaks for the Pentium 4.
14526 Fixed illegal "imul" instruction generated by reloading phase.
14527 - Sparc port:
14528 Enhanced code generation for Sparc V8 (option -march=v8) and
14529 Sparc V9 (option -march=v9).
14530 Profiling support added for Solaris.
14531 - PowerPC port:
14532 Keep stack 16-aligned for compatibility with C calling conventions.
14533
14534 Toplevel interactive system:
14535 - Tightened interface consistency checks between .cmi files, .cm[oa] files
14536 loaded by #load, and the running toplevel.
14537 - #trace on mutually-recursive functions was broken, works again.
14538 - Look for .ocamlinit file in home directory in addition to the current dir.
14539
14540 Standard library:
14541 - Match_failure and Assert_failure exceptions now report
14542 (file, line, column), instead of (file, starting char, ending char).
14543 - float_of_string, int_of_string: some ill-formed input strings were not
14544 rejected.
14545 - Added format concatenation, string_of_format, format_of_string.
14546 - Module Arg: added new option handlers Set_string, Set_int, Set_float,
14547 Symbol, Tuple.
14548 - Module Format: tag handling is now turned off by default,
14549 use [Format.set_tags true] to activate.
14550 - Modules Lexing and Parsing: added better handling of positions
14551 in source file. Added function Lexing.flush_input.
14552 - Module Scanf: %n and %N formats to count characters / items read so far;
14553 assorted bug fixes, %! to match end of input. New ``_'' special
14554 flag to skip reresulting value.
14555 - Module Format: tags are not activated by default.
14556 - Modules Set and Map: fixed bugs causing trees to become unbalanced.
14557 - Module Printf: less restrictive typing of kprintf.
14558 - Module Random: better seeding; functions to generate random int32, int64,
14559 nativeint; added support for explicit state management.
14560 - Module Sys: added Sys.readdir for reading the contents of a directory.
14561
14562 Runtime system:
14563 - output_value/input_value: fixed bug with large blocks (>= 4 Mwords)
14564 produced on a 64-bit platform and incorrectly read back on a 32-bit
14565 platform.
14566 - Fixed memory compaction bug involving input_value.
14567 - Added MacOS X support for dynamic linking of C libraries.
14568 - Improved stack backtraces on uncaught exceptions.
14569 - Fixed float alignment problem on Sparc V9 with gcc 3.2.
14570
14571 Other libraries:
14572 - Dynlink:
14573 By default, dynamically-loaded code now has access to all
14574 modules defined by the program; new functions Dynlink.allow_only
14575 and Dynlink.prohibit implement access control.
14576 Fixed Dynlink problem with files generated with ocamlc -pack.
14577 Protect against references to modules not yet fully initialized.
14578 - LablTK/CamlTK: added support for TCL/TK 8.4.
14579 - Str: reimplemented regexp matching engine, now less buggy, faster,
14580 and LGPL instead of GPL.
14581 - Graphics: fixed draw_rect and fill_rect bug under X11.
14582 - System threads and bytecode threads libraries can be both installed.
14583 - System threads: better implementation of Thread.exit.
14584 - Bytecode threads: fixed two library initialization bugs.
14585 - Unix: make Unix.openfile blocking to account for named pipes;
14586 GC bug in Unix.*stat fixed; fixed problem with Unix.dup2 on Windows.
14587
14588 Ocamllex:
14589 - Can name parts of the matched input text, e.g.
14590 "0" (['0'-'7']+ as s) { ... s ... }
14591
14592 Ocamldebug:
14593 - Handle programs that run for more than 2^30 steps.
14594
14595 Emacs mode:
14596 - Added file caml-types.el to interactively display the type information
14597 saved by option -dtypes.
14598
14599 Win32 ports:
14600 - Cygwin port: recognize \ as directory separator in addition to /
14601 - MSVC port: ocamlopt -pack works provided GNU binutils are installed.
14602 - Graphics library: fixed bug in Graphics.blit_image; improved event handling.
14603
14604 OCamldoc:
14605 - new ty_code field for types, to keep code of a type (with option -keep-code)
14606 - new ex_code field for types, to keep code of an exception
14607 (with option -keep-code)
14608 - some fixes in html generation
14609 - don't overwrite existing style.css file when generating HTML
14610 - create the ocamldoc.sty file when generating LaTeX (if nonexistent)
14611 - man pages are now installed in man/man3 rather than man/mano
14612 - fix: empty [] in generated HTML indexes
14613
14614
14615 Objective Caml 3.06 (20 Aug 2002):
14616 ----------------------------------
14617
14618 Type-checking:
14619 - Apply value restriction to polymorphic record fields.
14620
14621 Run-time system:
14622 - Fixed GC bug affecting lazy values.
14623
14624 Both compilers:
14625 - Added option "-version" to print just the version number.
14626 - Fixed wrong dependencies in .cmi generated with the -pack option.
14627
14628 Native-code compiler:
14629 - Fixed wrong return value for inline bigarray assignments.
14630
14631 Libraries:
14632 - Unix.getsockopt: make sure result is a valid boolean.
14633
14634 Tools:
14635 - ocamlbrowser: improved error reporting; small Win32 fixes.
14636
14637 Windows ports:
14638 - Fixed two problems with the Mingw port under Cygwin 1.3.
14639
14640
14641 Objective Caml 3.05 (29 Jul 2002):
14642 ----------------------------------
14643
14644 Language features:
14645 - Support for polymorphic methods and record fields.
14646 - Allows _ separators in integer and float literals, e.g. 1_000_000.
14647
14648 Type-checker:
14649 - New flag -principal to enforce principality of type inference.
14650 - Fixed subtle typing bug with higher-order functors.
14651 - Fixed several complexity problems; changed (again) the behaviour of
14652 simple coercions.
14653 - Fixed various bugs with objects and polymorphic variants.
14654 - Improved some error messages.
14655
14656 Both compilers:
14657 - Added option "-pack" to assemble several compilation units as one unit
14658 having the given units as sub-modules.
14659 - More precise detection of unused sub-patterns in "or" patterns.
14660 - Warnings for ill-formed \ escapes in string and character literals.
14661 - Protect against spaces and other special characters in directory names.
14662 - Added interface consistency check when building a .cma or .cmxa library.
14663 - Minor reduction in code size for class initialization code.
14664 - Added option "-nostdlib" to ignore standard library entirely.
14665
14666 Bytecode compiler:
14667 - Fixed issue with ocamlc.opt and dynamic linking.
14668
14669 Native-code compiler:
14670 - Added link-time check for multiply-defined module names.
14671 - Fixed GC bug related to constant constructors of polymorphic variant types.
14672 - Fixed compilation bug for top-level "include" statements.
14673 - PowerPC port: work around limited range for relative branches,
14674 thus removing assembler failures on large functions.
14675 - IA64 port: fixed code generation bug for 3-way constructor matching.
14676
14677 Toplevel interactive system:
14678 - Can load object files given on command line before starting up.
14679 - ocamlmktop: minimized possibility of name clashes with user-provided modules.
14680
14681 Run-time system:
14682 - Minor garbage collector no longer recursive.
14683 - Better support for lazy data in the garbage collector.
14684 - Fixed issues with the heap compactor.
14685 - Fixed issues with finalized Caml values.
14686 - The type "int64" is now supported on all platforms: we use software
14687 emulation if the C compiler doesn't support 64-bit integers.
14688 - Support for float formats that are neither big-endian nor little-endian
14689 (one known example: the ARM).
14690 - Fixed bug in callback*_exn functions in the exception-catching case.
14691 - Work around gcc 2.96 bug on RedHat 7.2 and Mandrake 8.0, 8.1 among others.
14692 - Stub DLLs now installed in subdir stublibs/ of standard library dir.
14693
14694 Standard library:
14695 - Protect against integer overflow in sub-string and sub-array bound checks.
14696 - New module Complex implementing arithmetic over complex numbers.
14697 - New module Scanf implementing format-based scanning a la scanf() in C.
14698 - Module Arg: added alternate entry point Arg.parse_argv.
14699 - Modules Char, Int32, Int64, Nativeint, String: added type "t" and function
14700 "compare" so that these modules can be used directly with e.g. Set.Make.
14701 - Module Digest: fixed issue with Digest.file on large files (>= 1Gb);
14702 added Digest.to_hex.
14703 - Module Filename: added Filename.open_temp_file to atomically create and
14704 open the temp file; improved security of Filename.temp_file.
14705 - Module Genlex: allow _ as first character of an identifier.
14706 - Module Lazy: more efficient implementation.
14707 - Module Lexing: improved performances for very large tokens.
14708 - Module List: faster implementation of sorting functions.
14709 - Module Printf:
14710 added %S and %C formats (quoted, escaped strings and characters);
14711 added kprintf (calls user-specified continuation on formatted string).
14712 - Module Queue: faster implementation (courtesy of François Pottier).
14713 - Module Random: added Random.bool.
14714 - Module Stack: added Stack.is_empty.
14715 - Module Pervasives:
14716 added sub-module LargeFile to support files larger than 1Gb
14717 (file offsets are int64 rather than int);
14718 opening in "append" mode automatically sets "write" mode;
14719 files are now opened in close-on-exec mode;
14720 string_of_float distinguishes its output from a plain integer;
14721 faster implementation of input_line for long lines.
14722 - Module Sys:
14723 added Sys.ocaml_version containing the OCaml version number;
14724 added Sys.executable_name containing the (exact) path of the
14725 file being executable;
14726 Sys.argv.(0) is now unchanged w.r.t. what was provided as 0-th argument
14727 by the shell.
14728 - Module Weak: added weak hash tables.
14729
14730 Other libraries:
14731 - Bigarray:
14732 support for bigarrays of complex numbers;
14733 added functions Genarray.dims,
14734 {Genarray,Array1,Array2,Array3}.{kind,layout}.
14735 - Dynlink: fixed bug with loading of mixed-mode Caml/C libraries.
14736 - LablTK:
14737 now supports also the CamlTK API (no labels);
14738 support for Activate and Deactivate events;
14739 support for virtual events;
14740 added UTF conversion;
14741 export the tcl interpreter as caml value, to avoid DLL dependencies.
14742 - Unix:
14743 added sub-module LargeFile to support files larger than 1Gb
14744 (file offsets are int64 rather than int);
14745 added POSIX opening flags (O_NOCTTY, O_*SYNC);
14746 use reentrant functions for gethostbyname and gethostbyaddr when available;
14747 fixed bug in Unix.close_process and Unix.close_process_full;
14748 removed some overhead in Unix.select.
14749
14750 Tools:
14751 - ocamldoc (the documentation generator) is now part of the distribution.
14752 - Debugger: now supports the option -I +dir.
14753 - ocamllex: supports the same identifiers as ocamlc; warns for
14754 bad \ escapes in strings and characters.
14755 - ocamlbrowser:
14756 recenter the module boxes when showing a cross-reference;
14757 include the current directory in the ocaml path.
14758
14759 Windows port:
14760 - Can now compile with Mingw (the GNU compilers without the Cygwin
14761 runtime library) in addition to MSVC.
14762 - Toplevel GUI: wrong filenames were given to #use and #load commands;
14763 read_line() was buggy for short lines (2 characters or less).
14764 - OCamlBrowser: now fully functional.
14765 - Graphics library: fixed several bugs in event handling.
14766 - Threads library: fixed preemption bug.
14767 - Unix library: better handling of the underlying differences between
14768 sockets and regular file descriptors;
14769 added Unix.lockf and a better Unix.rename (thanks to Tracy Camp).
14770 - LablTk library: fixed a bug in Fileinput
14771
14772
14773 Objective Caml 3.04 (13 Dec 2001):
14774 ----------------------------------
14775
14776 Type-checker:
14777 - Allowed coercing self to the type of the current class, avoiding
14778 an obscure error message about "Self type cannot be unified..."
14779
14780 Both compilers:
14781 - Use OCAMLLIB environment variable to find standard library, falls
14782 back on CAMLLIB if not defined.
14783 - Report out-of-range ASCII escapes in character or string literals
14784 such as "\256".
14785
14786 Byte-code compiler:
14787 - The -use-runtime and -make-runtime flags are back by popular demand
14788 (same behavior as in 3.02).
14789 - Dynamic loading (of the C part of mixed Caml/C libraries): arrange that
14790 linking in -custom mode uses the static libraries for the C parts,
14791 not the shared libraries, for maximal robustness and compatibility with
14792 3.02.
14793
14794 Native-code compiler:
14795 - Fixed bug in link-time consistency checking.
14796
14797 Tools:
14798 - ocamlyacc: added parser debugging support (set OCAMLRUNPARAM=p to get
14799 a trace of the pushdown automaton actions).
14800 - ocamlcp: was broken in 3.03 (Sys_error), fixed.
14801
14802 Run-time system:
14803 - More work on dynamic loading of the C part of mixed Caml/C libraries.
14804 - On uncaught exception, flush output channels before printing exception
14805 message and backtrace.
14806 - Corrected several errors in exception backtraces.
14807
14808 Standard library:
14809 - Pervasives: integer division and modulus are now fully specified
14810 on negative arguments (with round-towards-zero semantics).
14811 - Pervasives.float_of_string: now raises Failure on ill-formed input.
14812 - Pervasives: added useful float constants max_float, min_float, epsilon_float.
14813 - printf functions in Printf and Format: added % formats for int32, nativeint,
14814 int64; "*" in width and precision specifications now supported
14815 (contributed by Thorsten Ohl).
14816 - Added Hashtbl.copy, Stack.copy.
14817 - Hashtbl: revised resizing strategy to avoid quadratic behavior
14818 on Hashtbl.add.
14819 - New module MoreLabels providing labelized versions of modules
14820 Hashtbl, Map and Set.
14821 - Pervasives.output_value and Marshal.to_* : improved hashing strategy
14822 for internal data structures, avoid excessive slowness on
14823 quasi-linearly-allocated inputs.
14824
14825 Other libraries:
14826 - Num: fixed bug in big integer exponentiation (Big_int.power_*).
14827
14828 Windows port:
14829 - New GUI for interactive toplevel (Jacob Navia).
14830 - The Graphics library is now available for stand-alone executables
14831 (Jacob Navia).
14832 - Unix library: improved reporting of system error codes.
14833 - Fixed error in "globbing" of * and ? patterns on command line.
14834
14835 Emacs mode: small fixes; special color highlighting for ocamldoc comments.
14836
14837 License: added special exception to the LGPL'ed code (libraries and
14838 runtime system) allowing unrestricted linking, whether static or dynamic.
14839
14840
14841 Objective Caml 3.03 ALPHA (12 Oct 2001):
14842 ----------------------------------------
14843
14844 Language:
14845 - Removed built-in syntactic sugar for streams and stream patterns
14846 [< ... >], now supported via CamlP4, which is now included in the
14847 distribution.
14848 - Switched the default behaviour to labels mode (labels are compulsory),
14849 but allows omitting labels when a function application is complete.
14850 -nolabels mode is available but deprecated for programming.
14851 (See also scrapelabels and addlabels tools below.)
14852 - Removed all labels in the standard libraries, except labltk.
14853 Labelized versions are kept for ArrayLabels, ListLabels, StringLabels
14854 and UnixLabels. "open StdLabels" gives access to the first three.
14855 - Extended polymorphic variant type syntax, allowing union types and
14856 row abbreviations for both sub- and super-types. #t deprecated in types.
14857 - See the Upgrading file for how to adapt to all the changes above.
14858
14859 Type-checker:
14860 - Fixed obscure bug in module typing causing the type-checker to loop
14861 on signatures of the form
14862 module type M
14863 module A: sig module type T = sig module T: M end end
14864 module B: A.T
14865 - Improved efficiency of module type-checking via lazy computation of
14866 certain signature summary information.
14867 - An empty polymorphic variant type is now an error.
14868
14869 Both compilers:
14870 - Fixed wrong code generated for "struct include M ... end" when M
14871 contains one or several "external" declarations.
14872
14873 Byte-code compiler:
14874 - Protect against VM stack overflow caused by module initialization code
14875 with many local variables.
14876 - Support for dynamic loading of the C part of mixed Caml/C libraries.
14877 - Removed the -use-runtime and -make-runtime flags, obsoleted by dynamic
14878 loading of C libraries.
14879
14880 Native-code compiler:
14881 - Attempt to recover gracefully from system stack overflow. Currently
14882 works on x86 under Linux and BSD.
14883 - Alpha: work around "as" bug in Tru64 5.1.
14884
14885 Toplevel environment:
14886 - Revised printing of inferred types and evaluation results
14887 so that an external printer (e.g. Camlp4's) can be hooked in.
14888
14889 Tools:
14890 - The CamlP4 pre-processor-pretty-printer is now included in the standard
14891 distribution.
14892 - New tool ocamlmklib to help build mixed Caml/C libraries.
14893 - New tool scrapelabels and addlabels, to either remove (non-optional)
14894 labels in interfaces, or automatically add them in the definitions.
14895 They provide easy transition from classic mode ocaml 3.02 sources,
14896 depending on whether you want to keep labels or not.
14897 - ocamldep: added -pp option to handle preprocessed source files.
14898
14899 Run-time system:
14900 - Support for dynamic loading of the C part of mixed Caml/C libraries.
14901 Currently works under Linux, FreeBSD, Windows, Tru64, Solaris and Irix.
14902 - Implemented registration of global C roots with a skip list,
14903 runs much faster when there are many global C roots.
14904 - Autoconfiguration script: fixed wrong detection of Mac OS X; problem
14905 with the Sparc, gcc 3.0, and float alignment fixed.
14906
14907 Standard library:
14908 - Added Pervasives.flush_all to flush all opened output channels.
14909
14910 Other libraries:
14911 - All libraries revised to allow dynamic loading of the C part.
14912 - Graphics under X Windows: revised event handling, should no longer lose
14913 mouse events between two calls to wait_next_event(); wait_next_event()
14914 now interruptible by signals.
14915 - Bigarrays: fixed bug in marshaling of big arrays.
14916
14917 Windows port:
14918 - Fixed broken Unix.{get,set}sockopt*
14919
14920
14921
14922 Objective Caml 3.02 (30 Jul 2001):
14923 ----------------------------------
14924
14925 Both compilers:
14926 - Fixed embarrassing bug in pattern-matching compilation
14927 (affected or-patterns containing variable bindings).
14928 - More optimizations in pattern-matching compilation.
14929
14930 Byte-code compiler:
14931 - Protect against VM stack overflow caused by functions with many local
14932 variables.
14933
14934 Native-code compiler:
14935 - Removed re-sharing of string literals, causes too many surprises with
14936 in-place string modifications.
14937 - Corrected wrong compilation of toplevel "include" statements.
14938 - Fixed bug in runtime function "callbackN_exn".
14939 - Signal handlers receive the conventional signal number as argument
14940 instead of the system signal number (same behavior as with the
14941 bytecode compiler).
14942 - ARM port: fixed issue with immediate operand overflow in large functions.
14943
14944 Toplevel environment:
14945 - User-definer printers (for #install_printer) now receive as first argument
14946 the pretty-printer formatter where to print their second argument.
14947 Old printers (with only one argument) still supported for backward
14948 compatibility.
14949
14950 Standard library:
14951 - Module Hashtbl: added Hashtbl.fold.
14952
14953 Other libraries:
14954 - Dynlink: better error reporting in add_interfaces for missing .cmi files.
14955 - Graphics: added more drawing functions (multiple points, polygons,
14956 multiple lines, splines).
14957 - Bytecode threads: the module Unix is now thread-safe, ThreadUnix is
14958 deprecated. Unix.exec* now resets standard descriptors to blocking mode.
14959 - Native threads: fixed a context-switch-during-GC problem causing
14960 certain C runtime functions to fail, most notably input_value.
14961 - Unix.inet_addr_of_string: call inet_aton() when available so as to
14962 handle correctly the address 255.255.255.255.
14963 - Unix: added more getsockopt and setsockopt functions to get/set
14964 options that have values other than booleans.
14965 - Num: added documentation for the Big_int module.
14966
14967 Tools:
14968 - ocamldep: fixed wrong dependency issue with nested modules.
14969
14970 Run-time system:
14971 - Removed floating-point error at start-up on some non-IEEE platforms
14972 (e.g. FreeBSD prior to 4.0R).
14973 - Stack backtrace mechanism now works for threads that terminate on
14974 an uncaught exception.
14975
14976 Auto-configuration:
14977 - Updated config.guess and config.sub scripts, should recognize a greater
14978 number of recent platform.
14979
14980 Windows port:
14981 - Fixed broken Unix.waitpid. Unix.file_descr can now be compared or hashed.
14982 - Toplevel application: issue with spaces in name of stdlib directory fixed.
14983
14984 MacOS 9 port:
14985 - Removed the last traces of support for 68k
14986
14987
14988 Objective Caml 3.01 (09 Mar 2001):
14989 ----------------------------------
14990
14991 New language features:
14992 - Variables are allowed in "or" patterns, e.g.
14993 match l with [t] | [_;t] -> ... t ...
14994 - "include <structure expression>" to re-export all components of a
14995 structure inside another structure.
14996 - Variance annotation on parameters of type declarations, e.g.
14997 type (+'a,-'b,'c) t (covariant in 'a, contravariant in 'b, invariant in 'c)
14998
14999 New ports:
15000 - Intel IA64/Itanium under Linux (including the native-code compiler).
15001 - Cygwin under MS Windows. This port is an alternative to the earlier
15002 Windows port of OCaml, which relied on MS compilers; the Cygwin
15003 Windows port does not need MS Visual C++ nor MASM, runs faster
15004 in bytecode, and has a better implementation of the Unix library,
15005 but currently lacks threads and COM component support.
15006
15007 Type-checking:
15008 - Relaxed "monomorphic restriction" on type constructors in a
15009 mutually-recursive type definition, e.g. the following is again allowed
15010 type u = C of int t | D of string t and 'a t = ...
15011 - Fixed name-capture bug in "include SIG" and "SIG with ..." constructs.
15012 - Improved implicit subtypes built by (... :> ty), closer to intuition.
15013 - Several bug fixes in type-checking of variants.
15014 - Typing of polymorphic variants is more restrictive:
15015 do not allow conjunctive types inside the same pattern matching.
15016 a type has either an upper bound, or all its tags are in the lower bound.
15017 This may break some programs (this breaks lablgl-0.94).
15018
15019 Both compilers:
15020 - Revised compilation of pattern matching.
15021 - Option -I +<subdir> to search a subdirectory <subdir> of the standard
15022 library directory (i.e. write "ocamlc -I +labltk" instead of
15023 "ocamlc -I /usr/local/lib/ocaml/labltk").
15024 - Option -warn-error to turn warnings into errors.
15025 - Option -where to print the location of the standard library directory.
15026 - Assertions are now type-checked even if the -noassert option is given,
15027 thus -noassert can no longer change the types of modules.
15028
15029 Bytecode compiler and bytecode interpreter:
15030 - Print stack backtrace when a program aborts due to an uncaught exception
15031 (requires compilation with -g and running with ocamlrun -b or
15032 OCAMLRUNPARAM="b=1").
15033
15034 Native-code compiler:
15035 - Better unboxing optimizations on the int32, int64, and nativeint types.
15036 - Tail recursion preserved for functions having more parameters than
15037 available registers (but tail calls to other functions are still
15038 turned off if parameters do not fit entirely in registers).
15039 - Fixed name-capture bug in function inlining.
15040 - Improved spilling/reloading strategy for conditionals.
15041 - IA32, Alpha: better alignment of branch targets.
15042 - Removed spurious dependency on the -lcurses library.
15043
15044 Toplevel environment:
15045 - Revised handling of top-level value definitions, allows reclamation
15046 of definitions that are shadowed by later definitions with the same names.
15047 (E.g. "let x = <big list>;; let x = 1;;" allows <big list> to be reclaimed.)
15048 - Revised the tracing facility so that for standard library functions,
15049 only calls from user code are traced, not calls from the system.
15050 - Added a "*" prompt when within a comment.
15051
15052 Runtime system:
15053 - Fixed portability issue on bcopy() vs memmove(), affecting Linux RedHat 7.0
15054 in particular.
15055 - Structural comparisons (=, <>, <, <=, >, >=, compare) reimplemented
15056 so as to avoid overflowing the C stack.
15057 - Input/output functions: arrange so that reads and writes on closed
15058 in_channel or out_channel raise Sys_error immediately.
15059
15060 Standard library:
15061 - Module Gc: changed some counters to float in order to avoid overflow;
15062 added alarms
15063 - Module Hashtbl: added Hashtbl.replace.
15064 - Module Int64: added bits_of_float, float_of_bits (access to IEEE 754
15065 representation of floats).
15066 - Module List: List.partition now tail-rec;
15067 improved memory behavior of List.stable_sort.
15068 - Module Nativeint: added Nativeint.size (number of bits in a nativeint).
15069 - Module Obj: fixed incorrect resizing of float arrays in Obj.resize.
15070 - Module Pervasives: added float constants "infinity", "neg_infinity", "nan";
15071 added a "classify_float" function to test a float for NaN, infinity, etc.
15072 - Pervasives.input_value: fixed bug affecting shared custom objects.
15073 - Pervasives.output_value: fixed size bug affecting "int64" values.
15074 - Pervasives.int_of_string, {Int32,Int64,Nativeint}.of_string:
15075 fixed bug causing bad digits to be accepted without error.
15076 - Module Random: added get_state and set_state to checkpoint the generator.
15077 - Module Sys: signal handling functions are passed the system-independent
15078 signal number rather than the raw system signal number whenever possible.
15079 - Module Weak: added Weak.get_copy.
15080
15081 Other libraries:
15082 - Bigarray: added Bigarray.reshape to take a view of the elements of a
15083 bigarray with different dimensions or number of dimensions;
15084 fixed bug causing "get" operations to be unavailable in custom
15085 toplevels including Bigarray.
15086 - Dynlink: raise an error instead of crashing when the loaded module
15087 refers to the not-yet-initialized module performing a dynlink operation.
15088 - Bytecode threads: added a thread-safe version of the Marshal module;
15089 fixed a rare GC bug in the thread scheduler.
15090 - POSIX threads: fixed compilation problem with threads.cmxa.
15091 - Both thread libraries: better tail-recursion in Event.sync.
15092 - Num library: fixed bug in square roots (Nat.sqrt_nat, Big_int.sqrt_big_int).
15093
15094 Tools:
15095 - ocamldep: fixed missing dependencies on labels of record patterns and
15096 record construction operations
15097
15098 Win32 port:
15099 - Unix.waitpid now implements the WNOHANG option.
15100
15101 Mac OS ports:
15102 - Mac OS X public beta is supported.
15103 - Int64.format works on Mac OS 8/9.
15104
15105
15106 Objective Caml 3.00 (25 Apr 2000):
15107 ----------------------------------
15108
15109 Language:
15110 - OCaml/OLabl merger:
15111 * Support for labeled and optional arguments for functions and classes.
15112 * Support for variant types (sum types compared by structure).
15113 See tutorial (chapter 2 of the OCaml manual) for more information.
15114 - Syntactic change: "?" in stream error handlers changed to "??".
15115 - Added exception renaming in structures (exception E = F).
15116 - (OCaml 2.99/OLabl users only) Label syntax changed to preserve
15117 backward compatibility with 2.0x (labeled function application
15118 is f ~lbl:arg instead of f lbl:arg). A tool is provided to help
15119 convert labelized programs to OCaml 3.00.
15120
15121 Both compilers:
15122 - Option -labels to select commuting label mode (labels are mandatory,
15123 but labeled arguments can be passed in a different order than in
15124 the definition of the function; in default mode, labels may be omitted,
15125 but argument reordering is only allowed for optional arguments).
15126 - Libraries (.cma and .cmxa files) now "remember" C libraries given
15127 at library construction time, and add them back at link time.
15128 Allows linking with e.g. just unix.cma instead of
15129 unix.cma -custom -cclib -lunix
15130 - Revised printing of error messages, now use Format.fprintf; no visible
15131 difference for users, but could facilitate internationalization later.
15132 - Fixed bug in unboxing of records containing only floats.
15133 - Fixed typing bug involving applicative functors as components of modules.
15134 - Better error message for inconsistencies between compiled interfaces.
15135
15136 Bytecode compiler:
15137 - New "modular" format for bytecode executables; no visible differences
15138 for users, but will facilitate further extensions later.
15139 - Fixed problems in signal handling.
15140
15141 Native-code compiler:
15142 - Profiling support on x86 under FreeBSD
15143 - Open-coding and unboxing optimizations for the new integer types
15144 int32, int64, nativeint, and for bigarrays.
15145 - Fixed instruction selection bug with "raise" appearing in arguments
15146 of strict operators, e.g. "1 + raise E".
15147 - Better error message when linking incomplete/incorrectly ordered set
15148 of .cmx files.
15149 - Optimized scanning of global roots during GC, can reduce total running
15150 time by up to 8% on GC-intensive programs.
15151
15152 Interactive toplevel:
15153 - Better printing of exceptions, including arguments, when possible.
15154 - Fixed rare GC bug occurring during interpretation of scripts.
15155 - Added consistency checks between interfaces and implementations
15156 during #load.
15157
15158 Run-time system:
15159 - Added support for "custom" heap blocks (heap blocks carrying
15160 C functions for finalization, comparison, hashing, serialization
15161 and deserialization).
15162 - Support for finalisation functions written in Caml.
15163
15164 Standard library:
15165 - New modules Int32, Int64, Nativeint for 32-bit, 64-bit and
15166 platform-native integers
15167 - Module Array: added Array.sort, Array.stable_sort.
15168 - Module Gc: added Gc.finalise to attach Caml finalisation functions to
15169 arbitrary heap-allocated data.
15170 - Module Hashtbl: do not bomb when resizing very large table.
15171 - Module Lazy: raise Lazy.Undefined when a lazy evaluation needs itself.
15172 - Module List: added List.sort, List.stable_sort; fixed bug in List.rev_map2.
15173 - Module Map: added mapi (iteration with key and data).
15174 - Module Set: added iterators for_all, exists, filter, partition.
15175 - Module Sort: still here but deprecated in favor of new sorting functions
15176 in Array and List.
15177 - Module Stack: added Stack.top
15178 - Module String: fixed boundary condition on String.rindex_from
15179 - Added labels on function arguments where appropriate.
15180
15181 New libraries and tools:
15182 - ocamlbrowser: graphical browser for OCaml sources and compiled interfaces,
15183 supports cross-referencing, editing, running the toplevel.
15184 - LablTK: GUI toolkit based on TK, using labeled and optional arguments,
15185 easier to use than CamlTK.
15186 - Bigarray: large, multi-dimensional numerical arrays, facilitate
15187 interfacing with C/Fortran numerical code, efficient support for
15188 advanced array operations such as slicing and memory-mapping of files.
15189
15190 Other libraries:
15191 - Bytecode threads: timer-based preemption was broken, works back again;
15192 fixed bug in Pervasives.input_line; exported Thread.yield.
15193 - System threads: several GC / reentrancy bugs fixed in buffered I/O
15194 and Unix I/O; revised Thread.join implementation for strict POSIX
15195 conformance; exported Thread.yield.
15196 - Graphics: added support for double buffering; added, current_x, current_y,
15197 rmoveto, rlineto, and draw_rect.
15198 - Num: fixed bug in Num.float_of_num.
15199 - Str: worked around potential symbol conflicts with C standard library.
15200 - Dbm: fixed bug with Dbm.iter on empty database.
15201
15202 New or updated ports:
15203 - Alpha/Digital Unix: lifted 256M limitation on total memory space
15204 induced by -taso
15205 - Port to AIX 4.3 on PowerPC
15206 - Port to HPUX 10 on HPPA
15207 - Deprecated 680x0 / SunOS port
15208
15209 Macintosh port:
15210 - Implemented the Unix and Thread libraries.
15211 - The toplevel application does not work on 68k Macintoshes; maybe
15212 later if there's a demand.
15213 - Added a new tool, ocamlmkappli, to build an application from a
15214 program written in O'Caml.
15215
15216
15217 Objective Caml 2.04 (26 Nov 1999):
15218 ----------------------------------
15219
15220 - C interface: corrected inconsistent change in the CAMLparam* macros.
15221 - Fixed internal error in ocamlc -g.
15222 - Fixed type-checking of "S with ...", where S is a module type name
15223 abbreviating another module type name.
15224 - ocamldep: fixed stdout/stderr mismatch after failing on one file.
15225 - Random.self_init more random.
15226 - Windows port:
15227 - Toplevel application: fixed spurious crash on exit.
15228 - Native-code compiler: fixed bug in assembling certain
15229 floating-point constants (masm doesn't grok 2e5, wants 2.0e5).
15230
15231 Objective Caml 2.03 (19 Nov 1999):
15232 ----------------------------------
15233
15234 New ports:
15235 - Ported to BeOS / Intel x86 (bytecode and native-code).
15236 - BSD / Intel x86 port now supports both a.out and ELF binary formats.
15237 - Added support for {Net,Open}BSD / Alpha.
15238 - Revamped Rhapsody port, now works on MacOS X server.
15239
15240 Syntax:
15241 - Warning for "(*)" and "*)" outside comment.
15242 - Removed "#line LINENO", too ambiguous with a method invocation;
15243 the equivalent "# LINENO" is still supported.
15244
15245 Typing:
15246 - When an incomplete pattern-matching is detected, report also a
15247 value or value template that is not covered by the cases of
15248 the pattern-matching.
15249 - Several bugs in class type matching and in type error reporting fixed.
15250 - Added an option -rectypes to support general recursive types,
15251 not just those involving object types.
15252
15253 Bytecode compiler:
15254 - Minor cleanups in the bytecode emitter.
15255 - Do not remove "let x = y" bindings in -g mode; makes it easier to
15256 debug the code.
15257
15258 Native-code compiler:
15259 - Fixed bug in grouping of allocations performed in the same basic block.
15260 - Fixed bug in constant propagation involving expressions containing
15261 side-effects.
15262 - Fixed incorrect code generation for "for" loops whose upper bound is
15263 a reference assigned inside the loop.
15264 - MIPS code generator: work around a bug in the IRIX 6 assembler.
15265
15266 Toplevel:
15267 - Fixed incorrect redirection of standard formatter to stderr
15268 while executing toplevel scripts.
15269
15270 Standard library:
15271 - Added List.rev_map, List.rev_map2.
15272 - Documentation of List functions now says which functions are
15273 tail-rec, and how much stack space is needed for non-tailrec functions.
15274 - Wrong type for Printf.bprintf fixed.
15275 - Fixed weird behavior of Printf.sprintf and Printf.bprintf in case of
15276 partial applications.
15277 - Added Random.self_init, which initializes the PRNG from the system date.
15278 - Sort.array: serious bugs fixed.
15279 - Stream.count: fixed incorrect behavior with ocamlopt.
15280
15281 Run-time system and external interface:
15282 - Fixed weird behavior of signal handlers w.r.t. signal masks and exceptions
15283 raised from the signal handler.
15284 - Fixed bug in the callback*_exn() functions.
15285
15286 Debugger:
15287 - Fixed wrong printing of float record fields and elements of float arrays.
15288 - Supports identifiers starting with '_'.
15289
15290 Profiler:
15291 - Handles .mli files, so ocamlcp can be used to replace ocamlc (e.g. in a
15292 makefile).
15293 - Now works on programs that use stream expressions and stream parsers.
15294
15295 Other libraries:
15296 - Graphics: under X11, treat all mouse buttons equally; fixed problem
15297 with current font reverting to the default font when the graphics
15298 window is resized.
15299 - Str: fixed reentrancy bugs in Str.replace and Str.full_split.
15300 - Bytecode threads: set standard I/O descriptors to non-blocking mode.
15301 - OS threads: revised implementation of Thread.wait_signal.
15302 - All threads: added Event.wrap_abort, Event.choose [].
15303 - Unix.localtime, Unix.gmtime: check for errors.
15304 - Unix.create_process: now supports arbitrary redirections of std descriptors.
15305 - Added Unix.open_process_full.
15306 - Implemented Unix.chmod under Windows.
15307 - Big_int.square_big_int now gives the proper sign to its result.
15308
15309 Others:
15310 - ocamldep: don't stop at first error, skip to next file.
15311 - Emacs mode: updated with Garrigue and Zimmerman's snapshot of 1999/10/18.
15312 - configure script: added -prefix option.
15313 - Windows toplevel application: fixed problem with graphics library
15314 not loading properly.
15315
15316
15317 Objective Caml 2.02 (04 Mar 1999):
15318 ----------------------------------
15319
15320 * Type system:
15321 - Check that all components of a signature have unique names.
15322 - Fixed bug in signature matching involving a type component and
15323 a module component, both sharing an abstract type.
15324 - Bug involving recursive classes constrained by a class type fixed.
15325 - Fixed bugs in printing class types and in printing unification errors.
15326
15327 * Compilation:
15328 - Changed compilation scheme for "{r with lbl = e}" when r has many fields
15329 so as to avoid code size explosion.
15330
15331 * Native-code compiler:
15332 - Better constant propagation in boolean expressions and in conditionals.
15333 - Removal of unused arguments during function inlining.
15334 - Eliminated redundant tagging/untagging in bit shifts.
15335 - Static allocation of closures for functions without free variables,
15336 reduces the size of initialization code.
15337 - Revised compilation scheme for definitions at top level of compilation
15338 units, so that top level functions have no free variables.
15339 - Coalesced multiple allocations of heap blocks inside one expression
15340 (e.g. x :: y :: z allocates the two conses in one step).
15341 - Ix86: better handling of large integer constants in instruction selection.
15342 - MIPS: fixed wrong asm generated for String.length "literal".
15343
15344 * Standard library:
15345 - Added the "ignore" primitive function, which just throws away its
15346 argument and returns "()". It allows to write
15347 "ignore(f x); y" if "f x" doesn't have type unit and you don't
15348 want the warning caused by "f x; y".
15349 - Added the "Buffer" module (extensible string buffers).
15350 - Module Format: added formatting to buffers and to strings.
15351 - Added "mem" functions (membership test) to Hashtbl and Map.
15352 - Module List: added find, filter, partition.
15353 Renamed remove and removeq to remove_assoc and remove_assq.
15354 - Module Marshal: fixed bug in marshaling functions when passed functional
15355 values defined by mutual recursion with other functions.
15356 - Module Printf: added Printf.bprintf (print to extensible buffer);
15357 added %i format as synonymous for %d (as per the docs).
15358 - Module Sort: added Sort.array (Quicksort).
15359
15360 * Runtime system:
15361 - New callback functions for callbacks with arbitrary many arguments
15362 and for catching Caml exceptions escaping from a callback.
15363
15364 * The ocamldep dependency generator: now performs full parsing of the
15365 sources, taking into account the scope of module bindings.
15366
15367 * The ocamlyacc parser generator: fixed sentinel error causing wrong
15368 tables to be generated in some cases.
15369
15370 * The str library:
15371 - Added split_delim, full_split as variants of split that control
15372 more precisely what happens to delimiters.
15373 - Added replace_matched for separate matching and replacement operations.
15374
15375 * The graphics library:
15376 - Bypass color lookup for 16 bpp and 32 bpp direct-color displays.
15377 - Larger color cache.
15378
15379 * The thread library:
15380 - Bytecode threads: more clever use of non-blocking I/O, makes I/O
15381 operations faster.
15382 - POSIX threads: gcc-ism removed, should now compile on any ANSI C compiler.
15383 - Both: avoid memory leak in the Event module when a communication
15384 offer is never selected.
15385
15386 * The Unix library:
15387 - Fixed inversion of ctime and mtime in Unix.stat, Unix.fstat, Unix.lstat.
15388 - Unix.establish_connection: properly reclaim socket if connect fails.
15389
15390 * The DBM library: no longer crashes when calling Dbm.close twice.
15391
15392 * Emacs mode:
15393 - Updated with Garrigue and Zimmerman's latest version.
15394 - Now include an "ocamltags" script for using etags on OCaml sources.
15395
15396 * Win32 port:
15397 - Fixed end-of-line bug in ocamlcp causing problems with generated sources.
15398
15399
15400 Objective Caml 2.01 (09 Dec 1998):
15401 ----------------------------------
15402
15403 * Typing:
15404 - Added warning for expressions of the form "a; b" where a does not have
15405 type "unit"; catches silly mistake such as
15406 "record.lbl = newval; ..." instead of "record.lbl <- newval; ...".
15407 - Typing bug in "let module" fixed.
15408
15409 * Compilation:
15410 - Fixed bug in compilation of recursive and mutually recursive classes.
15411 - Option -w to turn specific warnings on/off.
15412 - Option -cc to choose the C compiler used with ocamlc -custom and ocamlopt.
15413
15414 * Bytecode compiler and bytecode interpreter:
15415 - Intel x86: removed asm declaration causing "fixed or forbidden register
15416 spilled" error with egcs and gcc 2.8 (but not with gcc 2.7, go figure).
15417 - Revised handling of debugging information, allows faster linking with -g.
15418
15419 * Native-code compiler:
15420 - Fixed bugs in integer constant propagation.
15421 - Out-of-bound accesses in array and strings now raise an Invalid_argument
15422 exception (like the bytecode system) instead of stopping the program.
15423 - Corrected scheduling of bound checks.
15424 - Port to the StrongARM under Linux (e.g. Corel Netwinder).
15425 - I386: fixed bug in profiled code (ocamlopt -p).
15426 - Mips: switched to -n32 model under IRIX; dropped the Ultrix port.
15427 - Sparc: simplified the addressing modes, allows for better scheduling.
15428 - Fixed calling convention bug for Pervasives.modf.
15429
15430 * Toplevel:
15431 - #trace works again.
15432 - ocamlmktop: use matching ocamlc, not any ocamlc from the search path.
15433
15434 * Memory management:
15435 - Fixed bug in heap expansion that could cause the GC to loop.
15436
15437 * C interface:
15438 - New macros CAMLparam... and CAMLlocal... to simplify the handling
15439 of local roots in C code.
15440 - Simplified procedure for allocating and filling Caml blocks from C.
15441 - Declaration of string_length in <caml/mlvalues.h>.
15442
15443 * Standard library:
15444 - Module Format: added {get,set}_all_formatter_output_functions,
15445 formatter_of_out_channel, and the control sequence @<n> in printf.
15446 - Module List: added mem_assoc, mem_assq, remove, removeq.
15447 - Module Pervasives: added float_of_int (synonymous for float),
15448 int_of_float (truncate), int_of_char (Char.code), char_of_int (Char.chr),
15449 bool_of_string.
15450 - Module String: added contains, contains_from, rcontains_from.
15451
15452 * Unix library:
15453 - Unix.lockf: added F_RLOCK, F_TRLOCK; use POSIX locks whenever available.
15454 - Unix.tc{get,set}attr: added non-standard speeds 57600, 115200, 230400.
15455 - Unix.chroot: added.
15456
15457 * Threads:
15458 - Bytecode threads: improved speed of I/O scheduling.
15459 - Native threads: fixed a bug involving signals and exceptions
15460 generated from C.
15461
15462 * The "str" library:
15463 - Added Str.string_partial_match.
15464 - Bumped size of internal stack.
15465
15466 * ocamlyacc: emit correct '# lineno' directive for prelude part of .mly file.
15467
15468 * Emacs editing mode: updated with Jacques Garrigue's newest code.
15469
15470 * Windows port:
15471 - Added support for the "-cclib -lfoo" option (instead of
15472 -cclib /full/path/libfoo.lib as before).
15473 - Threads: fixed a bug at initialization time.
15474
15475 * Macintosh port: source code for Macintosh application merged in.
15476
15477
15478 Objective Caml 2.00 (19 Aug 1998):
15479 ----------------------------------
15480
15481 * Language:
15482 - New class language. See http://caml.inria.fr/ocaml/refman/
15483 for a tutorial (chapter 2) and for the reference manual (section 4.9).
15484 - Local module definitions "let module X = <module-expr> in <expr>".
15485 - Record copying with update "{r with lbl1 = expr1; ...}".
15486 - Array patterns "[|pat1; ...;patN|]" in pattern-matchings.
15487 - New reserved keywords: "object", "initializer".
15488 - No longer reserved: "closed", "protected".
15489
15490 * Bytecode compiler:
15491 - Use the same compact memory representations for float arrays, float
15492 records and recursive closures as the native-code compiler.
15493 - More type-dependent optimizations.
15494 - Added the -use_runtime and -make_runtime flags to build separately
15495 and reuse afterwards custom runtime systems
15496 (inspired by Fabrice Le Fessant's patch).
15497
15498 * Native-code compiler:
15499 - Cross-module constant propagation of integer constants.
15500 - More type-dependent optimizations.
15501 - More compact code generated for "let rec" over data structures.
15502 - Better code generated for "for" loops (test at bottom of code).
15503 - More aggressive scheduling of stores.
15504 - Added -p option for time profiling with gprof
15505 (fully supported on Intel x86/Linux and Alpha/Digital Unix only)
15506 (inspired by Aleksey Nogin's patch).
15507 - A case of bad spilling with high register pressure fixed.
15508 - Fixed GC bug when GC called from C without active Caml code.
15509 - Alpha: $gp handling revised to follow Alpha's standard conventions,
15510 allow running "atom" and "pixie" on ocamlopt-generated binaries.
15511 - Intel x86: use movzbl and movsbl systematically to load 8-bit and 16-bit
15512 quantities, no more hacks with partial registers (better for the
15513 Pentium Pro, worse for the Pentium).
15514 - PowerPC: more aggressive scheduling of return address reloading.
15515 - Sparc: scheduling bug related to register pairs fixed.
15516
15517 * Runtime system:
15518 - Better printing of uncaught exceptions (print a fully qualified
15519 name whenever possible).
15520
15521 * New ports:
15522 - Cray T3E (bytecode only) (in collaboration with CEA).
15523 - PowerMac under Rhapsody.
15524 - SparcStations under Linux.
15525
15526 * Standard library:
15527 - Added set_binary_mode_in and set_binary_mode_out in Pervasives
15528 to toggle open channels between text and binary modes.
15529 - output_value and input_value check that the given channel is in
15530 binary mode.
15531 - input_value no longer fails on very large marshalled data (> 16 Mbytes).
15532 - Module Arg: added option Rest.
15533 - Module Filename: temp_file no longer loops if temp dir doesn't exist.
15534 - Module List: added rev_append (tail-rec alternative to @).
15535 - Module Set: tell the truth about "elements" returning a sorted list;
15536 added min_elt, max_elt, singleton.
15537 - Module Sys: added Sys.time for simple measuring of CPU time.
15538
15539 * ocamllex:
15540 - Check for overflow when generating the tables for the automaton.
15541 - Error messages in generated .ml file now point to .mll source.
15542 - Added "let <id> = <regexp>" to name regular expressions
15543 (inspired by Christian Lindig).
15544
15545 * ocamlyacc:
15546 - Better error recovery in presence of EOF tokens.
15547 - Error messages in generated .ml file now point to .mly source.
15548 - Generated .ml file now type-safe even without the generated .mli file.
15549
15550 * The Unix library:
15551 - Use float instead of int to represent Unix times (number of seconds
15552 from the epoch). This fixes a year 2005 problem on 32-bit platforms.
15553 Functions affected: stat, lstat, fstat, time, gmtime, localtime,
15554 mktime, utimes.
15555 - Added putenv.
15556 - Better handling of "unknown" error codes (EUNKNOWNERR).
15557 - Fixed endianness bug in getservbyport.
15558 - win32unix (the Win32 implementation of the Unix library) now has
15559 the same interface as the unix implementation, this allows exchange
15560 of compiled .cmo and .cmi files between Unix and Win32.
15561
15562 * The thread libraries:
15563 - Bytecode threads: bug with escaping exceptions fixed.
15564 - System threads (POSIX, Win32): malloc/free bug fixed; signal bug fixed.
15565 - Both: added Thread.wait_signal to wait synchronously for signals.
15566
15567 * The graph library: bigger color cache.
15568
15569 * The str library: added Str.quote, Str.regexp_string,
15570 Str.regexp_string_case_fold.
15571
15572 * Emacs mode:
15573 - Fixed bug with paragraph fill.
15574 - Fixed bug with next-error under Emacs 20.
15575
15576
15577 Objective Caml 1.07 (11 Dec 1997):
15578 ----------------------------------
15579
15580 * Native-code compiler:
15581 - Revised interface between generated code and GC, fixes serious GC
15582 problems with signals and native threads.
15583 - Added "-thread" option for compatibility with ocamlc.
15584
15585 * Debugger: correctly print instance variables of objects.
15586
15587 * Run-time system: ported to OpenBSD.
15588
15589 * Standard library: fixed wrong interface for Marshal.to_buffer and
15590 Obj.unmarshal.
15591
15592 * Num library: added Intel x86 optimized asm code (courtesy of
15593 Bernard Serpette).
15594
15595 * Thread libraries:
15596 - Native threads: fixed GC bugs and installation procedure.
15597 - Bytecode threads: fixed problem with "Marshal" module.
15598 - Both: added Event.always.
15599
15600 * MS Windows port: better handling of long command lines in Sys.command
15601
15602 Objective Caml 1.06 (18 Nov 1997):
15603 ----------------------------------
15604
15605 * Language:
15606 - Added two new keywords: "assert" (check assertion) and "lazy"
15607 (delay evaluation).
15608 - Allow identifiers to start with "_" (such identifiers are treated
15609 as lowercase idents).
15610
15611 * Objects:
15612 - Added "protected" methods (visible only from subclasses, can be hidden
15613 in class type declared in module signature).
15614 - Objects can be compared using generic comparison functions.
15615 - Fixed compilation of partial application of object constructors.
15616
15617 * Type system:
15618 - Occur-check now more strict (all recursions must traverse an object).
15619 - A few bugs fixed.
15620
15621 * Run-time system:
15622 - A heap compactor was implemented, so long-running programs can now
15623 fight fragmentation.
15624 - The meaning of the "space_overhead" parameter has changed.
15625 - The macros Push_roots and Pop_roots are superseded by Begin_roots* and
15626 End_roots.
15627 - Bytecode executable includes list of primitives used, avoids crashes
15628 on version mismatch.
15629 - Reduced startup overhead for marshalling, much faster marshalling of
15630 small objects.
15631 - New exception Stack_overflow distinct from Out_of_memory.
15632 - Maximum stack size configurable.
15633 - I/O revised for compatibility with compactor and with native threads.
15634 - All C code ANSIfied (new-style function declarations, etc).
15635 - Threaded code work on all 64-bit processors, not just Alpha/Digital Unix.
15636 - Better printing of uncaught exceptions.
15637
15638 * Both compilers:
15639 - Parsing: more detailed reporting of syntax errors (e.g. shows
15640 unmatched opening parenthesis on missing closing parenthesis).
15641 - Check consistency between interfaces (.cmi).
15642 - Revised rules for determining dependencies between modules.
15643 - Options "-verbose" for printing calls to C compiler, "-noassert"
15644 for turning assertion checks off.
15645
15646 * Native-code compiler:
15647 - Machine-dependent parts rewritten using inheritance instead of
15648 parameterized modules.
15649 - GC bug in value let rec fixed.
15650 - Port to Linux/Alpha.
15651 - Sparc: cleaned up use of %g registers, now compatible with Solaris threads.
15652
15653 * Top-level interactive system:
15654 - Can execute Caml script files given on command line.
15655 - Reads commands from ./.ocamlinit on startup.
15656 - Now thread-compatible.
15657
15658 * Standard library:
15659 - New library module: Lazy (delayed computations).
15660 - New library module: Marshal. Allows marshalling to strings and
15661 transmission of closures between identical programs (SPMD parallelism).
15662 - Filename: "is_absolute" is superseded by "is_implicit" and "is_relative".
15663 To adapt old programs, change "is_absolute x" to "not (is_implicit x)"
15664 (but the new "is_relative" is NOT the opposite of the old "is_absolute").
15665 - Array, Hashtbl, List, Map, Queue, Set, Stack, Stream:
15666 the "iter" functions now take as argument a unit-returning function.
15667 - Format: added "printf" interface to the formatter (see the documentation).
15668 Revised behaviour of simple boxes: no more than one new line is output
15669 when consecutive break hints should lead to multiple line breaks.
15670 - Stream: revised implementation, renamed Parse_failure to Failure and
15671 Parse_error to Error (don't you love gratuitous changes?).
15672 - String: added index, rindex, index_from, rindex_from.
15673 - Array: added mapi, iteri, fold_left, fold_right, init.
15674 - Added Map.map, Set.subset, Printexc.to_string.
15675
15676 * ocamllex: lexers generated by ocamllex can now handle all characters,
15677 including '\000'.
15678
15679 * ocamlyacc: fixed bug with function closures returned by parser rules.
15680
15681 * Debugger:
15682 - Revised generation of events.
15683 - Break on function entrance.
15684 - New commands start/previous.
15685 - The command loadprinter now try to recursively load required
15686 modules.
15687 - Numerous small fixes.
15688
15689 * External libraries:
15690 - systhreads: can now use POSIX threads; POSIX and Win32 threads are
15691 now supported by the native-code compiler.
15692 - dbm and graph: work in native code.
15693 - num: fixed bug in Nat.nat_of_string.
15694 - str: fixed deallocation bug with case folding.
15695 - win32unix: use Win32 handles instead of (buggy) VC++ emulation of Unix
15696 file handles; added gettimeofday.
15697
15698 * Emacs editing mode and debugger interface updated to July '97 version.
15699
15700 Objective Caml 1.05 (21 Mar 1997):
15701 ----------------------------------
15702
15703 * Typing: fixed several bugs causing spurious type errors.
15704
15705 * Native-code compiler: fixed instruction selection bug causing GC to
15706 see ill-formed pointers; fixed callbacks to support invocation from a
15707 main program in C.
15708
15709 * Standard library: fixed String.lowercase; Weak now resists integers.
15710
15711 * Toplevel: multiple phrases without intermediate ";;" now really supported;
15712 fixed value printing problems where the wrong printer was selected.
15713
15714 * Debugger: fixed printing problem with local references; revised
15715 handling of checkpoints; various other small fixes.
15716
15717 * Macintosh port: fixed signed division problem in bytecomp/emitcode.ml
15718
15719 Objective Caml 1.04 (11 Mar 1997):
15720 ----------------------------------
15721
15722 * Replay debugger ported from Caml Light; added debugger support in
15723 compiler (option -g) and runtime system. Debugger is alpha-quality
15724 and needs testing.
15725
15726 * Parsing:
15727 - Support for "# linenum" directives.
15728 - At toplevel, allow several phrases without intermediate ";;".
15729
15730 * Typing:
15731 - Allow constraints on datatype parameters, e.g.
15732 type 'a foo = ... constraint 'a = 'b * 'c.
15733 - Fixed bug in signature matching in presence of free type variables '_a.
15734 - Extensive cleanup of internals of type inference.
15735
15736 * Native-code compilation:
15737 - Inlining of small functions at point of call (fairly conservative).
15738 - MIPS code generator ported to SGI IRIX 6.
15739 - Better code generated for large integer constants.
15740 - Check for urgent GC when allocating large objects in major heap.
15741 - PowerPC port: better scheduling, reduced TOC consumption.
15742 - HPPA port: handle long conditional branches gracefully,
15743 several span-dependent bugs fixed.
15744
15745 * Standard library:
15746 - More floating-point functions (all ANSI C float functions now available).
15747 - Hashtbl: added functorial interface (allow providing own equality
15748 and hash functions); rehash when resizing, avoid memory leak on
15749 Hashtbl.remove.
15750 - Added Char.uppercase, Char.lowercase, String.uppercase, String.lowercase,
15751 String.capitalize, String.uncapitalize.
15752 - New module Weak for manipulating weak pointers.
15753 - New module Callback for registering closures and exceptions to be
15754 used from C.
15755
15756 * Foreign interface:
15757 - Better support for callbacks (C calling Caml), exception raising
15758 from C, and main() in C. Added function to remove a global root.
15759 - Option -output-obj to package Caml code as a C library.
15760
15761 * Thread library: fixed bug in timed_read and timed_write operations;
15762 Lexing.from_function and Lexing.from_channel now reentrant.
15763
15764 * Unix interface: renamed EACCESS to EACCES (the POSIX name); added setsid;
15765 fixed bug in inet_addr_of_string for 64-bit platforms.
15766
15767 * Ocamlyacc: default error function no longer prevents error recovery.
15768
15769 * Ocamllex: fixed reentrancy problem w.r.t. exceptions during refill;
15770 fixed output problem (\r\r\n) under Win32.
15771
15772 * Macintosh port:
15773 - The makefiles are provided for compiling and installing O'Caml on
15774 a Macintosh with MPW 3.4.1.
15775 - An application with the toplevel in a window is forthcoming.
15776
15777 * Windows NT/95 port: updated toplevel GUI to that of Caml Light 0.73.
15778
15779 * Emacs editing mode and debugger interface included in distribution.
15780
15781
15782 Objective Caml 1.03 (29 Oct 1996):
15783 ----------------------------------
15784
15785 * Typing:
15786 - bug with type names escaping their scope via unification with
15787 non-generalized type variables '_a completely fixed;
15788 - fixed bug in occur check : it was too restrictive;
15789 - fixed bug of coercion operators;
15790 - check that no two types of the same name are generated in a module
15791 (there was no check for classes);
15792 - "#install_printer" works again;
15793 - fixed bug in printing of subtyping errors;
15794 - in class interfaces, construct "method m" (without type) change
15795 the status of method m from abstract to concrete;
15796 - in a recursive definition of class interfaces, a class can now
15797 inherit from a previous class;
15798 - typing of a method make use of an eventual previously given type
15799 of this method, yielding clearer type errors.
15800
15801 * Compilation (ocamlc and ocamlopt):
15802 - fixed bug in compilation of classes.
15803
15804 * Native-code compilation:
15805 - optimization of functions taking tuples of arguments;
15806 - code emitter for the Motorola 680x0 processors (retrocomputing week);
15807 - Alpha/OSF1: generate frame descriptors, avoids crashes when e.g.
15808 exp() or log() cause a domain error; fixed bug with
15809 String.length "literal";
15810 - Sparc, Mips, HPPA: removed marking of scanned stack frames
15811 (benefits do not outweigh cost).
15812
15813 * Standard library:
15814 - Arg.parse now prints documentation for command-line options;
15815 - I/O buffers (types in_channel and out_channel) now heap-allocated,
15816 avoids crashing when closing a channel several times;
15817 - Overflow bug in compare() fixed;
15818 - GC bug in raising Sys_error from I/O functions fixed;
15819 - Parsing.symbol_start works even for epsilon productions.
15820
15821 * Foreign interface: main() in C now working, fixed bug in library
15822 order at link time.
15823
15824 * Thread library: guard against calling thread functions before Thread.create.
15825
15826 * Unix library: fixed getsockopt, setsockopt, open_process_{in,out}.
15827
15828 * Perl-free, cpp-free, cholesterol-free installation procedure.
15829
15830
15831 Objective Caml 1.02 (27 Sep 1996):
15832 ----------------------------------
15833
15834 * Typing:
15835 - fixed bug with type names escaping their scope via unification
15836 with non-generalized type variables '_a;
15837 - keep #class abbreviations longer;
15838 - faster checking of well-formed abbreviation definitions;
15839 - stricter checking of "with" constraints over signatures (arity
15840 mismatch, overriding of an already manifest type).
15841
15842 * Compilation (ocamlc and ocamlopt):
15843 - fixed bug in compilation of recursive classes;
15844 - [|...|] and let...rec... allowed inside definitions of recursive
15845 data structures;
15846
15847 * Bytecode compilation: fixed overflow in linker for programs with
15848 more than 65535 globals and constants.
15849
15850 * Native-code compilation:
15851 - ocamlopt ported to HPPA under HP/UX, Intel x86 under Solaris 2,
15852 PowerMacintosh under MkLinux;
15853 - fixed two bugs related to floating-point arrays (one with "t array"
15854 where t is an abstract type implemented as float, one with
15855 comparison between two float arrays on 32 bit platforms);
15856 - fixed reloading/spilling problem causing non-termination of
15857 register allocation;
15858 - fixed bugs in handling of () causing loss of tail recursion;
15859 - fixed reloading bug in indirect calls.
15860
15861 * Windows NT/95 port:
15862 - complete port of the threads library (Pascal Cuoq);
15863 - partial port of the Unix library (Pascal Cuoq);
15864 - expansion of *, ? and @ on the command line.
15865
15866 * Standard library:
15867 - bug in in List.exists2 fixed;
15868 - bug in "Random.int n" for very large n on 64-bit machines fixed;
15869 - module Format: added a "general purpose" type of box (open_box);
15870 can output on several formatters at the same time.
15871
15872 * The "threads" library:
15873 - implementation on top of native threads available for Win32 and
15874 POSIX 1003.1c;
15875 - added -thread option to select a thread-safe version of the
15876 standard library, the ThreadIO module is no longer needed.
15877
15878 * The "graph" library: avoid invalid pixmaps when doing
15879 open_graph/close_graph several times.
15880
15881 * The "dynlink" library: support for "private" (no re-export) dynamic loading.
15882
15883 * ocamlyacc: skip '...' character literals correctly.
15884
15885 * C interface: C code linked with O'Caml code can provide its own main()
15886 and call caml_main() later.
15887
15888
15889 Objective Caml 1.01 (12 Jun 1996):
15890 ----------------------------------
15891
15892 * Typing: better report of type incompatibilities;
15893 non-generalizable type variables in a struct...end no longer flagged
15894 immediately as an error;
15895 name clashes during "open" avoided.
15896
15897 * Fixed bug in output_value where identical data structures
15898 could have different external representations; this bug caused wrong
15899 "inconsistent assumptions" errors when checking compatibility of
15900 interfaces at link-time.
15901
15902 * Standard library: fixed bug in Array.blit on overlapping array sections
15903
15904 * Unmarshaling from strings now working.
15905
15906 * ocamlc, ocamlopt: new flags -intf and -impl to force compilation as
15907 an implementation/an interface, regardless of file extension;
15908 overflow bug on wide-range integer pattern-matchings fixed.
15909
15910 * ocamlc: fixed bytecode generation bug causing problems with compilation
15911 units defining more than 256 values
15912
15913 * ocamlopt, all platforms:
15914 fixed GC bug in "let rec" over data structures;
15915 link startup file first, fixes "undefined symbol" errors with some
15916 libraries.
15917
15918 * ocamlopt, Intel x86:
15919 more efficient calling sequence for calling C functions;
15920 floating-point wars, chapter 5: don't use float stack for holding
15921 float pseudo-registers, stack-allocating them is just as efficient.
15922
15923 * ocamlopt, Alpha and Intel x86: more compact calling sequence for garbage
15924 collection.
15925
15926 * ocamllex: generated automata no longer use callbacks for refilling
15927 the input buffer (works better with threads); character literals
15928 correctly skipped inside actions.
15929
15930 * ocamldep: "-I" directories now searched in the right order
15931
15932 * Thread library: incompatibilities with callbacks, signals, and
15933 dynamic linking removed; scheduling bug with Thread.wait fixed.
15934
15935 * New "dbm" library, interfaces with NDBM.
15936
15937 * Object-oriented extensions:
15938 instance variables can now be omitted in class types;
15939 some error messages have been made clearer;
15940 several bugs fixes.
15941
15942 Objective Caml 1.00 (9 May 1996):
15943 ---------------------------------
15944
15945 * Merge of Jérôme Vouillon and Didier Rémy's object-oriented
15946 extensions.
15947
15948 * All libraries: all "new" functions renamed to "create" because "new"
15949 is now a reserved keyword.
15950
15951 * Compilation of "or" patterns (pat1 | pat2) completely revised to
15952 avoid code size explosion.
15953
15954 * Compiler support for preprocessing source files (-pp flag).
15955
15956 * Library construction: flag -linkall to force linking of all units in
15957 a library.
15958
15959 * Native-code compiler: port to the Sparc under NetBSD.
15960
15961 * Toplevel: fixed bug when tracing several times the same function
15962 under different names.
15963
15964 * New format for marshaling arbitrary data structures, allows
15965 marshaling to/from strings.
15966
15967 * Standard library: new module Genlex (configurable lexer for streams)
15968
15969 * Thread library: much better support for I/O and blocking system calls.
15970
15971 * Graphics library: faster reclamation of unused pixmaps.
15972
15973 * Unix library: new functions {set,clear}_nonblock, {set,clear}_close_on_exec,
15974 {set,get}itimer, inet_addr_any, {get,set}sockopt.
15975
15976 * Dynlink library: added support for linking libraries (.cma files).
15977
15978 Caml Special Light 1.15 (15 Mar 1996):
15979 --------------------------------------
15980
15981 * Caml Special Light now runs under Windows NT and 95. Many thanks to
15982 Kevin Gallo (Microsoft Research) who contributed his initial port.
15983
15984 * csllex now generates tables for a table-driven automaton.
15985 The resulting lexers are smaller and run faster.
15986
15987 * Completely automatic configuration script.
15988
15989 * Typing: more stringent checking of module type definitions against
15990 manifest module type specifications.
15991
15992 * Toplevel: recursive definitions of values now working.
15993
15994 * Native-code compiler, all platforms:
15995 toplevel "let"s with refutable patterns now working;
15996 fixed bug in assignment to float record fields;
15997 direct support for floating-point negation and absolute value.
15998
15999 * Native-code compiler, x86: fixed bug with tail calls (with more than
16000 4 arguments) from a function with a one-word stack frame.
16001
16002 * Native-code compiler, Sparc: problem with -compact fixed.
16003
16004 * Thread library: support for non-blocking writes; scheduler revised.
16005
16006 * Unix library: bug in gethostbyaddr fixed; bounds checking for read,
16007 write, etc.
16008
16009 Caml Special Light 1.14 (8 Feb 1996):
16010 -------------------------------------
16011
16012 * cslopt ported to the PowerPC/RS6000 architecture. Better support for
16013 AIX in the bytecode system as well.
16014
16015 * cslopt, all platforms: fixed bug in live range splitting around catch/exit.
16016
16017 * cslopt for the Intel (floating-point wars, chapter 4):
16018 implemented Ershov's algorithm to minimize floating-point stack usage;
16019 out-of-order pops fixed.
16020
16021 * Several bug fixes in callbacks and signals.
16022
16023 Caml Special Light 1.13 (4 Jan 1996):
16024 -------------------------------------
16025
16026 * Pattern-matching compilation revised to factor out accesses inside
16027 matched structures.
16028
16029 * Callbacks and signals now supported in cslopt.
16030 Signals are only detected at allocation points, though.
16031 Added callback functions with 2 and 3 arguments.
16032
16033 * More explicit error messages when a native-code program aborts due
16034 to array or string bound violations.
16035
16036 * In patterns, "C _" allowed even if the constructor C has several arguments.
16037
16038 * && and || allowed as alternate syntax for & and or.
16039
16040 * cslopt for the Intel: code generation for floating-point
16041 operations entirely redone for the third time (a pox on whomever at
16042 Intel decided to organize the floating-point registers as a stack).
16043
16044 * cslopt for the Sparc: don't use Sparc V8 smul and sdiv instructions,
16045 emulation on V7 processors is abysmal.
16046
16047 Caml Special Light 1.12 (30 Nov 1995):
16048 --------------------------------------
16049
16050 * Fixed an embarrassing bug with references to floats.
16051
16052 Caml Special Light 1.11 (29 Nov 1995):
16053 --------------------------------------
16054
16055 * Streams and stream parsers a la Caml Light are back (thanks to
16056 Daniel de Rauglaudre).
16057
16058 * User-level concurrent threads, with low-level shared memory primitives
16059 (locks and conditions) as well as channel-based communication primitives
16060 with first-class synchronous events, in the style of Reppy's CML.
16061
16062 * The native-code compiler has been ported to the HP PA-RISC processor
16063 running under NextStep (sorry, no HPUX, its linker keeps dumping
16064 core on me).
16065
16066 * References not captured in a function are optimized into variables.
16067
16068 * Fixed several bugs related to exceptions.
16069
16070 * Floats behave a little more as specified in the IEEE standard
16071 (believe it or not, but x < y is not the negation of x >= y).
16072
16073 * Lower memory consumption for the native-code compiler.
16074
16075 Caml Special Light 1.10 (07 Nov 1995):
16076 --------------------------------------
16077
16078 * Many bug fixes (too many to list here).
16079
16080 * Module language: introduction of a "with module" notation over
16081 signatures for concise sharing of all type components of a signature;
16082 better support for concrete types in signatures.
16083
16084 * Native-code compiler: the Intel 386 version has been ported to
16085 NextStep and FreeBSD, and generates better code (especially for
16086 floats)
16087
16088 * Tools and libraries: the Caml Light profiler and library for
16089 arbitrary-precision arithmetic have been ported (thanks to John
16090 Malecki and Victor Manuel Gulias Fernandez); better docs for the Unix
16091 and regexp libraries.
16092
16093 Caml Special Light 1.07 (20 Sep 1995):
16094 --------------------------------------
16095
16096 * Syntax: optional ;; allowed in compilation units and structures
16097 (back by popular demand)
16098
16099 * cslopt:
16100 generic handling of float arrays fixed
16101 direct function application when the function expr is not a path fixed
16102 compilation of "let rec" over values fixed
16103 multiple definitions of a value name in a module correctly handled
16104 no calls to ranlib in Solaris
16105
16106 * csltop: #trace now working
16107
16108 * Standard library: added List.memq; documentation of Array fixed.
16109
16110 Caml Special Light 1.06 (12 Sep 1995):
16111 --------------------------------------
16112
16113 * First public release.