1 OCaml 4.10.0 (21 February 2020)
2 -------------------------------
3
4 (Changes that can break existing programs are marked with a "*")
5
6 ### Language features
7
8 - #7757, #1726: multi-indices for extended indexing operators:
9 `a.%{0;1;2}` desugars to `( .%{ ;.. } ) a [|0;1;2|]`
10 (Florian Angeletti, review by Gabriel Radanne)
11
12 * #1859, #9117: enforce safe (immutable) strings by removing
13 the -unsafe-string option by default. This can be overridden by
14 a configure-time option (available since 4.04 in 2016):
15 --disable-force-safe-string since 4.08, -no-force-safe-since
16 between 4.07 and 4.04.
17 In the force-safe-string mode (now the default), the return type of the
18 String_val macro in C stubs is `const char*` instead of
19 `char*`. This change may break C FFI code.
20 (Kate Deplaix)
21
22
23 - #6662, #8908: allow writing "module _ = E" to ignore module expressions
24 (Thomas Refis, review by Gabriel Radanne)
25
26 ### Runtime system:
27
28 - #8809, #9292: Add a best-fit allocator for the major heap; still
29 experimental, it should be much better than current allocation
30 policies (first-fit and next-fit) for programs with large heaps,
31 reducing both GC cost and memory usage.
32 This new best-fit is not (yet) the default; set it explicitly with
33 OCAMLRUNPARAM="a=2" (or Gc.set from the program). You may also want
34 to increase the `space_overhead` parameter of the GC (a percentage,
35 80 by default), for example OCAMLRUNPARAM="o=85", for optimal
36 speed.
37 (Damien Doligez, review by Stephen Dolan, Jacques-Henri Jourdan,
38 Xavier Leroy, Leo White)
39
40 * #8713, #8940, #9115, #9143, #9202, #9251:
41 Introduce a state table in the runtime to contain the global variables.
42 (The Multicore runtime will have one such state for each domain.)
43
44 This changes the status of some internal variables of the OCaml runtime;
45 in many cases the header file originally defining the internal variable
46 provides a compatibility macro with the old name, but programs
47 re-defining those variables by hand need to be fixed.
48
49 (KC Sivaramakrishnan and Stephen Dolan,
50 compatibility hacking by David Allsopp, Florian Angeletti, Kate Deplaix,
51 Jacques Garrigue, Guillaume Munch-Maccagnoni and Nicolás Ojeda Bär,
52 review by David Allsopp, Alain Frisch, Nicolas Ojeda Bar,
53 Gabriel Scherer, Damien Doligez, and Guillaume Munch-Maccagnoni)
54
55 - #8993: New C functions caml_process_pending_actions{,_exn} in
56 caml/signals.h, intended for executing all pending actions inside
57 long-running C functions (requested minor and major collections,
58 signal handlers, finalisers, and memprof callbacks). The function
59 caml_process_pending_actions_exn returns any exception arising
60 during their execution, allowing resources to be cleaned-up before
61 re-raising.
62 (Guillaume Munch-Maccagnoni, review by Jacques-Henri Jourdan,
63 Stephen Dolan, and Gabriel Scherer)
64
65 * #8691, #8897, #9027: Allocation functions are now guaranteed not to
66 trigger any OCaml callback when called from C. In long-running C
67 functions, this can be replaced with calls to
68 caml_process_pending_actions at safe points.
69 Side effect of this change: in bytecode mode, polling for
70 asynchronous callbacks is performed at every minor heap allocation,
71 in addition to function calls and loops as in previous OCaml
72 releases.
73 (Jacques-Henri Jourdan, review by Stephen Dolan, Gabriel Scherer and
74 Guillaume Munch-Maccagnoni)
75
76 * #9037: caml_check_urgent_gc is now guaranteed not to trigger any
77 finaliser. In long-running C functions, this can be replaced
78 with calls to caml_process_pending_actions at safe points.
79 (Guillaume Munch-Maccagnoni, review by Jacques-Henri Jourdan and
80 Stephen Dolan)
81
82
83 - #8619: Ensure Gc.minor_words remains accurate after a GC.
84 (Stephen Dolan, Xavier Leroy and David Allsopp,
85 review by Xavier Leroy and Gabriel Scherer)
86
87 - #8667: Limit GC credit to 1.0
88 (Leo White, review by Damien Doligez)
89
90 - #8670: Fix stack overflow detection with systhreads
91 (Stephen Dolan, review by Xavier Leroy, Anil Madhavapeddy, Gabriel Scherer,
92 Frédéric Bour and Guillaume Munch-Maccagnoni)
93
94 * #8711: The major GC hooks are no longer allowed to interact with the
95 OCaml heap.
96 (Jacques-Henri Jourdan, review by Damien Doligez)
97
98 - #8630: Use abort() instead of exit(2) in caml_fatal_error, and add
99 the new hook caml_fatal_error_hook.
100 (Jacques-Henri Jourdan, review by Xavier Leroy)
101
102 - #8641: Better call stacks when a C call is involved in byte code mode
103 (Jacques-Henri Jourdan, review by Xavier Leroy)
104
105 - #8634, #8668, #8684, #9103 (originally #847): Statistical memory profiling.
106 In OCaml 4.10, support for allocations in the minor heap in native
107 mode is not available, and callbacks for promotions and
108 deallocations are not available.
109 Hence, there is not any public API for this feature yet.
110 (Jacques-Henri Jourdan, review by Stephen Dolan, Gabriel Scherer
111 and Damien Doligez)
112
113 - #9268, #9271: Fix bytecode backtrace generation with large integers present.
114 (Stephen Dolan and Mark Shinwell, review by Gabriel Scherer and
115 Jacques-Henri Jourdan)
116
117 ### Standard library:
118
119 - #8760: List.concat_map : ('a -> 'b list) -> 'a list -> 'b list
120 (Gabriel Scherer, review by Daniel Bünzli and Thomas Refis)
121
122 - #8832: List.find_map : ('a -> 'b option) -> 'a list -> 'b option
123 (Gabriel Scherer, review by Jeremy Yallop, Nicolás Ojeda Bär
124 and Daniel Bünzli)
125
126 - #7672, #1492: Add `Filename.quote_command` to produce properly-quoted
127 commands for execution by Sys.command.
128 (Xavier Leroy, review by David Allsopp and Damien Doligez)
129
130 - #8971: Add `Filename.null`, the conventional name of the "null" device.
131 (Nicolás Ojeda Bär, review by Xavier Leroy and Alain Frisch)
132
133 - #8651: add '%#F' modifier in printf to output OCaml float constants
134 in hexadecimal
135 (Pierre Roux, review by Gabriel Scherer and Xavier Leroy)
136
137
138 - #8657: Optimization in [Array.make] when initializing with unboxed
139 or young values.
140 (Jacques-Henri Jourdan, review by Gabriel Scherer and Stephen Dolan)
141
142 - #8716: Optimize [Array.fill] and [Hashtbl.clear] with a new runtime primitive
143 (Alain Frisch, review by David Allsopp, Stephen Dolan and Damien Doligez)
144
145 - #8530: List.sort: avoid duplicate work by chop
146 (Guillaume Munch-Maccagnoni, review by David Allsopp, Damien Doligez and
147 Gabriel Scherer)
148
149 ### Other libraries:
150
151 - #1939, #2023: Implement Unix.truncate and Unix.ftruncate on Windows.
152 (Florent Monnier and Nicolás Ojeda Bär, review by David Allsopp)
153
154 ### Code generation and optimizations:
155
156 - #8806: Add an [@@immediate64] attribute for types that are known to
157 be immediate only on 64 bit platforms
158 (Jérémie Dimino, review by Vladimir Keleshev)
159
160 - #9028, #9032: Fix miscompilation by no longer assuming that
161 untag_int (tag_int x) = x in Cmmgen; the compilation of `(n lsl 1) + 1`,
162 for example, would be incorrect if evaluated with a large value for `n`.
163 (Stephen Dolan, review by Vincent Laviron and Xavier Leroy)
164
165 - #8672: Optimise Switch code generation on booleans.
166 (Stephen Dolan, review by Pierre Chambart)
167
168
169 - #8990: amd64: Emit 32bit registers for Iconst_int when we can
170 (Xavier Clerc, Tom Kelly and Mark Shinwell, review by Xavier Leroy)
171
172 - #2322: Add pseudo-instruction `Ladjust_trap_depth` to replace
173 dummy Lpushtrap generated in linearize
174 (Greta Yorsh and Vincent Laviron, review by Xavier Leroy)
175
176 - #8707: Simplif: more regular treatment of Tupled and Curried functions
177 (Gabriel Scherer, review by Leo White and Alain Frisch)
178
179 - #8526: Add compile-time option -function-sections in ocamlopt to emit
180 each function in a separate named text section on supported targets.
181 (Greta Yorsh, review by Pierre Chambart)
182
183 - #2321: Eliminate dead ICatch handlers
184 (Greta Yorsh, review by Pierre Chambart and Vincent Laviron)
185
186 - #8919: lift mutable lets along with immutable ones
187 (Leo White, review by Pierre Chambart)
188
189 - #8909: Graph coloring register allocator: the weights put on
190 preference edges should not be divided by 2 in branches of
191 conditional constructs, because it is not good for performance
192 and because it leads to ignoring preference edges with 0 weight.
193 (Eric Stavarache, review by Xavier Leroy)
194
195 - #9006: int32 code generation improvements
196 (Stephen Dolan, designed with Greta Yorsh, review by Xavier Clerc,
197 Xavier Leroy and Alain Frisch)
198
199 - #9041: amd64: Avoid stall in sqrtsd by clearing destination.
200 (Stephen Dolan, with thanks to Andrew Hunter, Will Hasenplaugh,
201 Spiros Eliopoulos and Brian Nigito. Review by Xavier Leroy)
202
203 - #2165: better unboxing heuristics for let-bound identifiers
204 (Alain Frisch, review by Vincent Laviron and Gabriel Scherer)
205
206 - #8735: unbox across static handlers
207 (Alain Frisch, review by Vincent Laviron and Gabriel Scherer)
208
209 ### Manual and documentation:
210
211 - #8718, #9089: syntactic highlighting for code examples in the manual
212 (Florian Angeletti, report by Anton Kochkov, review by Gabriel Scherer)
213
214 - #9101: add links to section anchor before the section title,
215 make the name of those anchor explicits.
216 (Florian Angeletti, review by Daniel Bünzli, Sébastien Hinderer,
217 and Gabriel Scherer)
218
219 - #9257, cautionary guidelines for using the internal runtime API
220 without too much updating pain.
221 (Florian Angeletti, review by Daniel Bünzli, Guillaume Munch-Maccagnoni
222 and KC Sivaramakrishnan)
223
224
225 - #8950: move local opens in pattern out of the extension chapter
226 (Florian Angeletti, review and suggestion by Gabriel Scherer)
227
228 - #9088, #9097: fix operator character classes
229 (Florian Angelettion, review by Gabriel Scherer,
230 report by Clément Busschaert)
231
232 - #9169: better documentation for the best-fit allocation policy
233 (Gabriel Scherer, review by Guillaume Munch-Maccagnoni
234 and Florian Angeletti)
235
236 ### Compiler user-interface and warnings:
237
238 - #8833: Hint for (type) redefinitions in toplevel session
239 (Florian Angeletti, review by Gabriel Scherer)
240
241 - #2127, #9185: Refactor lookup functions
242 Included observable changes:
243 - makes the location of usage warnings and alerts for constructors more
244 precise
245 - don't warn about a constructor never being used to build values when it
246 has been defined as private
247 (Leo White, Hugo Heuzard review by Thomas Refis, Florian Angeletti)
248
249 - #8702, #8777: improved error messages for fixed row polymorphic variants
250 (Florian Angeletti, report by Leo White, review by Thomas Refis)
251
252 - #8844: Printing faulty constructors, inline records fields and their types
253 during type mismatches. Also slightly changed other type mismatches error
254 output.
255 (Mekhrubon Turaev, review by Florian Angeletti, Leo White)
256
257 - #8885: Warn about unused local modules
258 (Thomas Refis, review by Alain Frisch)
259
260 - #8872: Add ocamlc option "-output-complete-exe" to build a self-contained
261 binary for bytecode programs, containing the runtime and C stubs.
262 (Stéphane Glondu, Nicolás Ojeda Bär, review by Jérémie Dimino and Daniel
263 Bünzli)
264
265 - #8874: add tests for typechecking error messages and pack them into
266 pretty-printing boxes.
267 (Oxana Kostikova, review by Gabriel Scherer)
268
269 - #8891: Warn about unused functor parameters
270 (Thomas Refis, review by Gabriel Radanne)
271
272 - #8903: Improve errors for first-class modules
273 (Leo White, review by Jacques Garrigue)
274
275 - #8914: clarify the warning on unboxable types used in external primitives (61)
276 (Gabriel Scherer, review by Florian Angeletti, report on the Discourse forum)
277
278 - #9046: disable warning 30 by default
279 This outdated warning complained on label/constructor name conflicts
280 within a mutually-recursive type declarations; there is now no need
281 to complain thanks to type-based disambiguation.
282 (Gabriel Scherer)
283
284 ### Tools:
285
286 * #6792, #8654 ocamldebug now supports programs using Dynlink. This
287 changes ocamldebug messages, which may break compatibility
288 with older emacs modes.
289 (Whitequark and Jacques-Henri Jourdan, review by Gabriel Scherer
290 and Xavier Clerc)
291
292 - #8621: Make ocamlyacc a Windows Unicode application
293 (David Allsopp, review by Nicolás Ojeda Bär)
294
295 * #8834, `ocaml`: adhere to the XDG base directory specification to
296 locate an `.ocamlinit` file. Reads an `$XDG_CONFIG_HOME/ocaml/init.ml`
297 file before trying to lookup `~/.ocamlinit`. On Windows the behaviour
298 is unchanged.
299 (Daniel C. Bünzli, review by David Allsopp, Armaël Guéneau and
300 Nicolás Ojeda Bär)
301
302 - #9113: ocamldoc: fix the rendering of multi-line code blocks
303 in the 'man' backend.
304 (Gabriel Scherer, review by Florian Angeletti)
305
306 - #9127, #9130: ocamldoc: fix the formatting of closing brace in record types.
307 (David Allsopp, report by San Vu Ngoc)
308
309 - #9181: make objinfo work on Cygwin and look for the caml_plugin_header
310 symbol in both the static and the dynamic symbol tables.
311 (Sébastien Hinderer, review by Gabriel Scherer and David Allsopp)
312
313 ### Build system:
314
315 - #8840: use ocaml{c,opt}.opt when available to build internal tools
316 On my machine this reduces parallel-build times from 3m30s to 2m50s.
317 (Gabriel Scherer, review by Xavier Leroy and Sébastien Hinderer)
318
319 - #8650: ensure that "make" variables are defined before use;
320 revise generation of config/util.ml to better quote special characters
321 (Xavier Leroy, review by David Allsopp)
322
323 - #8690, #8696: avoid rebuilding the world when files containing primitives
324 change.
325 (Stephen Dolan, review by Gabriel Scherer, Sébastien Hinderer and
326 Thomas Refis)
327
328 - #8835: new configure option --disable-stdlib-manpages to disable building
329 and installation of the library manpages.
330 (David Allsopp, review by Florian Angeletti and Gabriel Scherer)
331
332 - #8837: build manpages using ocamldoc.opt when available
333 cuts the manpages build time from 14s to 4s
334 (Gabriel Scherer, review by David Allsopp and Sébastien Hinderer,
335 report by David Allsopp)
336
337 - #8843, #8841: fix use of off_t on 32-bit systems.
338 (Stephen Dolan, report by Richard Jones, review by Xavier Leroy)
339
340 - #8947, #9134, #9302, #9311: fix/improve support for the BFD library
341 (Sébastien Hinderer, review by Damien Doligez and David Allsopp)
342
343 - #8951: let make's default target build the compiler
344 (Sébastien Hinderer, review by David Allsopp)
345
346 - #8995: allow developers to specify frequently-used configure options in
347 Git (ocaml.configure option) and a directory for host-specific, shareable
348 config.cache files (ocaml.configure-cache option). See HACKING.adoc for
349 further details.
350 (David Allsopp, review by Gabriel Scherer)
351
352 - #9136: Don't propagate Cygwin-style prefix from configure to
353 Makefile.config on Windows ports.
354 (David Allsopp, review by Sébastien Hinderer)
355
356 ### Internal/compiler-libs changes:
357
358 - #8828: Added abstractions for variants, records, constructors, fields and
359 extension constructor types mismatch.
360 (Mekhrubon Turaev, review by Florian Angeletti, Leo White and Gabriel Scherer)
361
362 - #7927, #8527: Replace long tuples into records in typeclass.ml
363 (Ulugbek Abdullaev, review by David Allsopp and Gabriel Scherer)
364
365 - #1963: split cmmgen into generic Cmm helpers and clambda transformations
366 (Vincent Laviron, review by Mark Shinwell)
367
368 - #1901: Fix lexing of character literals in comments
369 (Pieter Goetschalckx, review by Damien Doligez)
370
371 - #1932: Allow octal escape sequences and identifiers containing apostrophes
372 in ocamlyacc actions and comments.
373 (Pieter Goetschalckx, review by Damien Doligez)
374
375 - #2288: Move middle end code from [Asmgen] to [Clambda_middle_end] and
376 [Flambda_middle_end]. Run [Un_anf] from the middle end, not [Cmmgen].
377 (Mark Shinwell, review by Pierre Chambart)
378
379 - #8692: Remove Misc.may_map and similar
380 (Leo White, review by Gabriel Scherer and Thomas Refis)
381
382 - #8677: Use unsigned comparisons in amd64 and i386 emitter of Lcondbranch3.
383 (Greta Yorsh, review by Xavier Leroy)
384
385 - #8766: Parmatch: introduce a type for simplified pattern heads
386 (Gabriel Scherer and Thomas Refis, review by Stephen Dolan and
387 Florian Angeletti)
388
389 - #8774: New implementation of Env.make_copy_of_types
390 (Alain Frisch, review by Thomas Refis, Leo White and Jacques Garrigue)
391
392 - #7924: Use a variant instead of an int in Bad_variance exception
393 (Rian Douglas, review by Gabriel Scherer)
394
395 - #8890: in -dtimings output, show time spent in C linker clearly
396 (Valentin Gatien-Baron)
397
398 - #8910, #8911: minor improvements to the printing of module types
399 (Gabriel Scherer, review by Florian Angeletti)
400
401 - #8913: ocamltest: improve 'promote' implementation to take
402 skipped lines/bytes into account
403 (Gabriel Scherer, review by Sébastien Hinderer)
404
405 - #8908: Use an option instead of a string for module names ("_" becomes None),
406 and a dedicated type for functor parameters: "()" maps to "Unit" (instead of
407 "*").
408 (Thomas Refis, review by Gabriel Radanne)
409
410 - #8928: Move contains_calls and num_stack_slots from Proc to Mach.fundecl
411 (Greta Yorsh, review by Florian Angeletti and Vincent Laviron)
412
413 - #8959, #8960, #8968, #9023: minor refactorings in the typing of patterns:
414 + refactor the {let,pat}_bound_idents* functions
415 + minor bugfix in type_pat
416 + refactor the generic pattern-traversal functions
417 in Typecore and Typedtree
418 + restrict the use of Need_backtrack
419 (Gabriel Scherer and Florian Angeletti,
420 review by Thomas Refis and Gabriel Scherer)
421
422 - #9030: clarify and document the parameter space of type_pat
423 (Gabriel Scherer and Florian Angeletti and Jacques Garrigue,
424 review by Florian Angeletti and Thomas Refis)
425
426 - #8975: "ocamltests" files are no longer required or used by
427 "ocamltest". Instead, any text file in the testsuite directory containing a
428 valid "TEST" block will be automatically included in the testsuite.
429 (Nicolás Ojeda Bär, review by Gabriel Scherer and Sébastien Hinderer)
430
431 - #8992: share argument implementations between executables
432 (Florian Angeletti, review by Gabriel Scherer)
433
434 - #9015: fix fatal error in pprint_ast (#8789)
435 (Damien Doligez, review by ...)
436
437 ### Bug fixes:
438
439 - #5673, #7636: unused type variable causes generalization error
440 (Jacques Garrigue and Leo White, review by Leo White,
441 reports by Jean-Louis Giavitto and Christophe Raffalli)
442
443 - #6922, #8955: Fix regression with -principal type inference for inherited
444 methods, allowing to compile ocamldoc with -principal
445 (Jacques Garrigue, review by Leo White)
446
447 - #7925, #8611: fix error highlighting for exceptionally
448 long toplevel phrases
449 (Kyle Miller, reported by Armaël Guéneau, review by Armaël Guéneau
450 and Nicolás Ojeda Bär)
451
452 - #8622: Don't generate #! headers over 127 characters.
453 (David Allsopp, review by Xavier Leroy and Stephen Dolan)
454
455 - #8715: minor bugfixes in CamlinternalFormat; removes the unused
456 and misleading function CamlinternalFormat.string_of_formatting_gen
457 (Gabriel Scherer and Florian Angeletti,
458 review by Florian Angeletti and Gabriel Radanne)
459
460 - #8792, #9018: Possible (latent) bug in Ctype.normalize_type
461 removed incrimined Btype.log_type, replaced by Btype.set_type
462 (Jacques Garrigue, report by Alain Frisch, review by Thomas Refis)
463
464 - #8856, #8860: avoid stackoverflow when printing cyclic type expressions
465 in some error submessages.
466 (Florian Angeletti, report by Mekhrubon Turaev, review by Leo White)
467
468 - #8875: fix missing newlines in the output from MSVC invocation.
469 (Nicolás Ojeda Bär, review by Gabriel Scherer)
470
471 - #8921, #8924: Fix stack overflow with Flambda
472 (Vincent Laviron, review by Pierre Chambart and Leo White,
473 report by Aleksandr Kuzmenko)
474
475 - #8892, #8895: fix the definition of Is_young when CAML_INTERNALS is not
476 defined.
477 (David Allsopp, review by Xavier Leroy)
478
479 - #8896: deprecate addr typedef in misc.h
480 (David Allsopp, suggestion by Xavier Leroy)
481
482 - #8981: Fix check for incompatible -c and -o options.
483 (Greta Yorsh, review by Damien Doligez)
484
485 - #9019, #9154: Unsound exhaustivity of GADTs from incomplete unification
486 Also fixes bug found by Thomas Refis in #9012
487 (Jacques Garrigue, report and review by Leo White, Thomas Refis)
488
489 - #9031: Unregister Windows stack overflow handler while shutting
490 the runtime down.
491 (Dmitry Bely, review by David Allsopp)
492
493 - #9051: fix unregistered local root in win32unix/select.c (could result in
494 `select` returning file_descr-like values which weren't in the original sets)
495 and correct initialisation of some blocks allocated with caml_alloc_small.
496 (David Allsopp, review by Xavier Leroy)
497
498 - #9073, #9120: fix incorrect GC ratio multiplier when allocating custom blocks
499 with caml_alloc_custom_mem in runtime/custom.c
500 (Markus Mottl, review by Gabriel Scherer and Damien Doligez)
501
502 - #9209, #9212: fix a development-version regression caused by #2288
503 (Kate Deplaix and David Allsopp, review by Sébastien Hinderer
504 and Gabriel Scherer )
505
506 - #9218, #9269: avoid a rare wrong module name error with "-annot" and
507 inline records.
508 (Florian Angeletti, review by Gabriel Scherer, report by Kate Deplaix)
509
510 - #9261: Fix a soundness bug in Rec_check, new in 4.10 (from #8908)
511 (Vincent Laviron, review by Jeremy Yallop and Gabriel Scherer)
512
513 OCaml 4.09 maintenance branch:
514 ------------------------------
515
516 - #8855, #8858: Links for tools not created when installing with
517 --disable-installing-byecode-programs (e.g. ocamldep.opt installed, but
518 ocamldep link not created)
519 (David Allsopp, report by Thomas Leonard)
520
521 - #8953, #8954: Fix error submessages in the toplevel: do not display
522 dummy locations
523 (Armaël Guéneau, review by Gabriel Scherer)
524
525 - #8965, #8979: Alpine build failure caused by check-parser-uptodate-or-warn.sh
526 (Gabriel Scherer and David Allsopp, report by Anton Kochkov)
527
528 - #8985, #8986: fix generation of the primitives when the locale collation is
529 incompatible with C.
530 (David Allsopp, review by Nicolás Ojeda Bär, report by Sebastian Rasmussen)
531
532 - #9050, #9076: install missing compilerlibs/ocamlmiddleend archives
533 (Gabriel Scherer, review by Florian Angeletti, report by Olaf Hering)
534
535 - #9180: pass -fno-common option to C compiler when available,
536 so as to detect problematic multiple definitions of global variables
537 in the C runtime
538 (Xavier Leroy, review by Mark Shinwell)
539
540 - #9144, #9180: multiple definitions of global variables in the C runtime,
541 causing problems with GCC 10.0 and possibly with other C compilers
542 (Xavier Leroy, report by Jürgen Reuter, review by Mark Shinwell)
543
544 - #9128: Fix a bug in bytecode mode which could lead to a segmentation
545 fault. The bug was caused by the fact that the atom table shared a
546 page with some bytecode. The fix makes sure both the atom table and
547 the minor heap have their own pages.
548 (Jacques-Henri Jourdan, review by Stephen Dolan, Xavier Leroy and
549 Gabriel Scherer)
550
551 OCaml 4.09.0 (19 September 2019):
552 ---------------------------------
553
554 ### Runtime system:
555
556 * #1725, #2279: Deprecate Obj.set_tag and Obj.truncate
557 (Stephen Dolan, review by Gabriel Scherer, Damien Doligez and Xavier Leroy)
558
559 * #2240: Constify "identifier" in struct custom_operations
560 (Cedric Cellier, review by Xavier Leroy)
561
562 * #2293: Constify "caml_named_value"
563 (Stephen Dolan, review by Xavier Leroy)
564
565 - #8787, #8788: avoid integer overflow in caml_output_value_to_bytes
566 (Jeremy Yallop, report by Marcello Seri)
567
568
569 - #2075, #7729: rename _T macro used to support Unicode in the (Windows) runtime
570 in order to avoid compiler warning
571 (Nicolás Ojeda Bär, review by Gabriel Scherer and David Allsopp)
572
573 - #2250: Remove extra integer sign-extension in compare functions
574 (Stefan Muenzel, review by Xavier Leroy)
575
576 - #8607: Remove obsolete macros for pre-2002 MSVC support
577 (Stephen Dolan, review by Nicolás Ojeda Bär and David Allsopp)
578
579 - #8656: Fix a bug in [caml_modify_generational_global_root]
580 (Jacques-Henri Jourdan, review by Gabriel Scherer)
581
582 ### Standard library:
583
584 - #2262: take precision (.<n>) and flags ('+' and ' ') into account
585 in printf %F
586 (Pierre Roux, review by Gabriel Scherer)
587
588 - #6148, #8596: optimize some buffer operations
589 (Damien Doligez, reports by John Whitington and Alain Frisch,
590 review by Jeremy Yallop and Gabriel Scherer)
591
592 ### Other libraries:
593
594 * #2318: Delete the graphics library. This library is now available
595 as a separate "graphics" package in opam. Its new home is:
596 https://github.com/ocaml/graphics
597 (Jérémie Dimino, review by Nicolas Ojeda Bar, Xavier Leroy and
598 Sébastien Hinderer)
599
600 * #2289: Delete the vmthreads library. This library was deprecated in 4.08.0.
601 (Jérémie Dimino)
602
603 - #2112: Fix Thread.yield unfairness with busy threads yielding to each
604 other.
605 (Andrew Hunter, review by Jacques-Henri Jourdan, Spiros Eliopoulos, Stephen
606 Weeks, & Mark Shinwell)
607
608 - #7903, #2306: Make Thread.delay interruptible by signals again
609 (Xavier Leroy, review by Jacques-Henri Jourdan and Edwin Török)
610
611 - #2248: Unix alloc_sockaddr: Fix read of uninitialized memory for an
612 unbound Unix socket. Add support for receiving abstract (Linux) socket paths.
613 (Tim Cuthbertson, review by Sébastien Hinderer and Jérémie Dimino)
614
615 ### Compiler user-interface and warnings:
616
617 * #2276: Remove support for compiler plugins and hooks (also adds
618 [Dynlink.unsafe_get_global_value])
619 (Mark Shinwell, Xavier Clerc, review by Nicolás Ojeda Bär,
620 Florian Angeletti, David Allsopp and Xavier Leroy)
621
622 - #2301: Hint on type error on int literal
623 (Jules Aguillon, review by Nicolás Ojeda Bär , Florian Angeletti,
624 Gabriel Scherer and Armaël Guéneau)
625
626 * #2314: Remove support for gprof profiling.
627 (Mark Shinwell, review by Xavier Clerc and Stephen Dolan)
628
629 - #2190: fix pretty printing (using Pprintast) of "lazy ..." patterns and
630 "fun (type t) -> ..." expressions.
631 (Nicolás Ojeda Bär, review by Gabriel Scherer)
632
633 - #2277: Use newtype names as type variable names
634 The inferred type of (fun (type t) (x : t) -> x)
635 is now printed as ('t -> 't) rather than ('a -> 'a).
636 (Matthew Ryan)
637
638
639 - #2309: New options -with-runtime and -without-runtime in ocamlopt/ocamlc
640 that control the inclusion of the runtime system in the generated program.
641 (Lucas Pluvinage, review by Daniel Bünzli, Damien Doligez, David Allsopp
642 and Florian Angeletti)
643
644 - #3819, #8546 more explanations and tests for illegal permutation
645 (Florian Angeletti, review by Gabriel Scherer)
646
647 - #8537: fix the -runtime-variant option for bytecode
648 (Damien Doligez, review by David Allsopp)
649
650 - #8541: Correctly print multi-lines locations
651 (Louis Roché, review by Gabriel Scherer)
652
653 - #8579: Better error message for private constructors
654 of an extensible variant type
655 (Guillaume Bury, review by many fine eyes)
656
657 ### Code generation and optimizations:
658
659 - #2278: Remove native code generation support for 32-bit Intel macOS,
660 iOS and other Darwin targets.
661 (Mark Shinwell, review by Nicolas Ojeda Bar and Xavier Leroy)
662
663 - #8547: Optimize matches that are an affine function of the input.
664 (Stefan Muenzel, review by Alain Frisch, Gabriel Scherer)
665
666
667 - #1904, #7931: Add FreeBSD/aarch64 support
668 (Greg V, review by Sébastien Hinderer, Stephen Dolan, Damien Doligez
669 and Xavier Leroy)
670
671 - #8507: Shorten symbol names of anonymous functions in Flambda mode
672 (the directory portions are now hidden)
673 (Mark Shinwell, review by Nicolás Ojeda Bär)
674
675 - #8681, #8699, #8712: Fix code generation with nested let rec of functions.
676 (Stephen Dolan, Leo White, Gabriel Scherer and Pierre Chambart,
677 review by Gabriel Scherer, reports by Alexey Solovyev and Jonathan French)
678
679 ### Manual and documentation:
680
681 - #7584, #8538: Document .cmt* files in the "overview" of ocaml{c,opt}
682 (Oxana Kostikova, rewiew by Florian Angeletti)
683
684
685 - #8757: Rename Pervasives to Stdlib in core library documentation.
686 (Ian Zimmerman, review by David Allsopp)
687
688 - #8515: manual, precise constraints on reexported types
689 (Florian Angeletti, review by Gabriel Scherer)
690
691 ### Tools:
692
693 - #2221: ocamldep will now correctly allow a .ml file in an include directory
694 that appears first in the search order to shadow a .mli appearing in a later
695 include directory.
696 (Nicolás Ojeda Bär, review by Florian Angeletti)
697
698 ### Internal/compiler-libs changes:
699
700 - #1579: Add a separate types for clambda primitives
701 (Pierre Chambart, review by Vincent Laviron and Mark Shinwell)
702
703 - #1965: remove loop constructors in Cmm and Mach
704 (Vincent Laviron)
705
706 - #1973: fix compilation of catches with multiple handlers
707 (Vincent Laviron)
708
709 - #2228, #8545: refactoring the handling of .cmi files
710 by moving the logic from Env to a new module Persistent_env
711 (Gabriel Scherer, review by Jérémie Dimino and Thomas Refis)
712
713 - #2229: Env: remove prefix_idents cache
714 (Thomas Refis, review by Frédéric Bour and Gabriel Scherer)
715
716 - #2237, #8582: Reorder linearisation of Trywith to avoid a call instruction
717 (Vincent Laviron and Greta Yorsh, additional review by Mark Shinwell;
718 fix in #8582 by Mark Shinwell, Xavier Leroy and Anil Madhavapeddy)
719
720 - #2265: Add bytecomp/opcodes.mli
721 (Mark Shinwell, review by Nicolas Ojeda Bar)
722
723 - #2268: Improve packing mechanism used for building compilerlibs modules
724 into the Dynlink libraries
725 (Mark Shinwell, Stephen Dolan, review by David Allsopp)
726
727 - #2280: Don't make more Clambda constants after starting Cmmgen
728 (Mark Shinwell, review by Vincent Laviron)
729
730 - #2281: Move some middle-end files around
731 (Mark Shinwell, review by Pierre Chambart and Vincent Laviron)
732
733 - #2283: Add [is_prefix] and [find_and_chop_longest_common_prefix] to
734 [Misc.Stdlib.List]
735 (Mark Shinwell, review by Alain Frisch and Stephen Dolan)
736
737 - #2284: Add various utility functions to [Misc] and remove functions
738 from [Misc.Stdlib.Option] that are now in [Stdlib.Option]
739 (Mark Shinwell, review by Thomas Refis)
740
741 - #2286: Functorise [Consistbl]
742 (Mark Shinwell, review by Gabriel Radanne)
743
744 - #2291: Add [Compute_ranges] pass
745 (Mark Shinwell, review by Vincent Laviron)
746
747 - #2292: Add [Proc.frame_required] and [Proc.prologue_required].
748 Move tail recursion label creation to [Linearize]. Correctly position
749 [Lprologue] relative to [Iname_for_debugger] operations.
750 (Mark Shinwell, review by Vincent Laviron)
751
752 - #2308: More debugging information on [Cmm] terms
753 (Mark Shinwell, review by Stephen Dolan)
754
755 - #7878, #8542: Replaced TypedtreeIter with tast_iterator
756 (Isaac "Izzy" Avram, review by Gabriel Scherer and Nicolás Ojeda Bär)
757
758 - #8598: Replace "not is_nonexpansive" by "maybe_expansive".
759 (Thomas Refis, review by David Allsopp, Florian Angeletti, Gabriel Radanne,
760 Gabriel Scherer and Xavier Leroy)
761
762 ### Compiler distribution build system:
763
764 - #2267: merge generation of header programs, also fixing parallel build on
765 Cygwin.
766 (David Allsopp, review by Sébastien Hinderer)
767
768 - #8514: Use boot/ocamlc.opt for building, if available.
769 (Stephen Dolan, review by Gabriel Scherer)
770
771 ### Bug fixes:
772
773 - #8864, #8865: Fix native compilation of left shift by (word_size - 1)
774 (Vincent Laviron, report by Murilo Giacometti Rocha, review by Xavier Leroy)
775
776 - #2296: Fix parsing of hexadecimal floats with underscores in the exponent.
777 (Hugo Heuzard and Xavier Leroy, review by Gabriel Scherer)
778
779 - #8800: Fix soundness bug in extension constructor inclusion
780 (Leo White, review by Jacques Garrigue)
781
782 - #8848: Fix x86 stack probe CFI information in caml_c_call and
783 caml_call_gc
784 (Tom Kelly, review by Xavier Leroy)
785
786
787 - #7156, #8594: make top level use custom printers if they are available
788 (Andrew Litteken, report by Martin Jambon, review by Nicolás Ojeda Bär,
789 Thomas Refis, Armaël Guéneau, Gabriel Scherer, David Allsopp)
790
791 - #3249: ocamlmklib should reject .cmxa files
792 (Xavier Leroy)
793
794 - #7937, #2287: fix uncaught Unify exception when looking for type
795 declaration
796 (Florian Angeletti, review by Jacques Garrigue)
797
798 - #8610, #8613: toplevel printing, consistent deduplicated name for types
799 (Florian Angeletti, review by Thomas Refis and Gabriel Scherer,
800 reported by Xavier Clerc)
801
802 - #8635, #8636: Fix a bad side-effect of the -allow-approx option of
803 ocamldep. It used to turn some errors into successes
804 (Jérémie Dimino)
805
806 - #8701, #8725: Variance of constrained parameters causes principality issues
807 (Jacques Garrigue, report by Leo White, review by Gabriel Scherer)
808
809 - #8777(partial): fix position information in some polymorphic variant
810 error messages about missing tags
811 (Florian Angeletti, review by Thomas Refis)
812
813 - #8779, more cautious variance computation to avoid missing cmis
814 (Florian Angeletti, report by Antonio Nuno Monteiro, review by Leo White)
815
816 - #8810: Env.lookup_module: don't allow creating loops
817 (Thomas Refis, report by Leo White, review by Jacques Garrigue)
818
819 - #8862, #8871: subst: preserve scopes
820 (Thomas Refis, report by Leo White, review by Jacques Garrigue)
821
822 - #8921, #8924: Fix stack overflow with Flambda
823 (Vincent Laviron, review by Pierre Chambart and Leo White,
824 report by Aleksandr Kuzmenko)
825
826 - #8944: Fix "open struct .. end" on clambda backend
827 (Thomas Refis, review by Leo White, report by Damon Wang and Mark Shinwell)
828
829 OCaml 4.08.1 (5 August 2019)
830 ----------------------------
831
832 ### Bug fixes:
833
834 - #7887: ensure frame table is 8-aligned on ARM64 and PPC64
835 (Xavier Leroy, report by Mark Hayden, review by Mark Shinwell
836 and Gabriel Scherer)
837
838 - #8751: fix bug that could result in misaligned data section when compiling to
839 native-code on amd64. (observed with the mingw64 compiler)
840 (Nicolás Ojeda Bär, review by David Allsopp)
841
842 - #8769, #8770: Fix assertion failure with -pack
843 (Leo White, review by Gabriel Scherer, report by Fabian @copy)
844
845 - #8816, #8818: fix loading of packed modules with Dynlink (regression in
846 #2176).
847 (Leo White, report by Andre Maroneze, review by Gabriel Scherer)
848
849 - #8830: configure script: fix tool prefix detection and Debian's armhf
850 detection
851 (Stéphane Glondu, review by David Allsopp)
852
853 - #8843, #8841: fix use of off_t on 32-bit systems.
854 (Stephen Dolan, report by Richard Jones, review by Xavier Leroy)
855
856 OCaml 4.08.0 (13 June 2019)
857 ---------------------------
858
859 ### Language features:
860
861 - #1947: Introduce binding operators (let*, let+, and* etc.)
862 (Leo White, review by Thomas Refis)
863
864 - #1892: Allow shadowing of items coming from an include
865 (Thomas Refis, review by Gabriel Radanne)
866
867 - #2122: Introduce local substitutions in signatures: "type t := type_expr"
868 and "module M := Extended(Module).Path"
869 (Thomas Refis, with help and review from Leo White, and Alain Frisch)
870
871 - #1804: New notion of "alerts" that generalizes the deprecated warning
872 [@@ocaml.alert deprecated "Please use bar instead!"]
873 [@@ocaml.alert unsafe "Please use safe_foo instead!"]
874 (Alain Frisch, review by Leo White and Damien Doligez)
875
876 - #6422, #7083, #305, #1568: Allow `exception` under or-patterns
877 (Thomas Refis, with help and review from Alain Frisch, Gabriel Scherer, Jeremy
878 Yallop, Leo White and Luc Maranget)
879
880
881 - #1705: Allow @@attributes on exception declarations.
882 (Hugo Heuzard, review by Gabriel Radanne and Thomas Refis)
883
884 - #1506, #2147, #2166, #2167: Extended `open` to arbitrary module
885 expression in structures and to applicative paths in signatures
886 (Runhang Li, review by Alain Frisch, Florian Angeletti, Jeremy Yallop,
887 Leo White and Thomas Refis)
888
889 * #2106: .~ is now a reserved keyword, and is no longer available
890 for use in extended indexing operators
891 (Jeremy Yallop, review by Gabriel Scherer, Florian Angeletti, and
892 Damien Doligez)
893
894 * #7841, #2041, #2235: allow modules from include directories
895 to shadow other ones, even in the toplevel; for a example, including
896 a directory that defines its own Result module will shadow the stdlib's.
897 (Jérémie Dimino, review by Alain Frisch and David Allsopp)
898
899 ### Type system:
900
901 - #2110: Partial support for GADTs inside or-patterns;
902 The type equalities introduced by the GADT constructor are only
903 available inside the or-pattern; they cannot be used in the
904 right-hand-side of the clause, when both sides of the or-pattern
905 agree on it.
906 (Thomas Refis and Leo White, review by Jacques Garrigue)
907
908 - #1826: allow expanding a type to a private abbreviation instead of
909 abstracting when removing references to an identifier.
910 (Thomas Refis and Leo White, review by Jacques Garrigue)
911
912 - #1942, #2244: simplification of the static check
913 for recursive definitions
914 (Alban Reynaud and Gabriel Scherer,
915 review by Jeremy Yallop, Armaël Guéneau and Damien Doligez)
916
917 ### Standard library:
918
919 - #2128: Add Fun module: `id, const, flip, negate, protect`
920 (protect is a "try_finally" combinator)
921 https://caml.inria.fr/pub/docs/manual-ocaml/libref/Fun.html
922 (Many fine eyes)
923
924 - #2010: Add Bool module
925 https://caml.inria.fr/pub/docs/manual-ocaml/libref/Bool.html
926 (Many fine eyes)
927
928 - #2011: Add Int module
929 https://caml.inria.fr/pub/docs/manual-ocaml/libref/Int.html
930 (Many fine eyes)
931
932 - #1940: Add Option module and Format.pp_print_option
933 `none, some, value, get, bind, join, map, fold, iter`, etc.
934 https://caml.inria.fr/pub/docs/manual-ocaml/libref/Option.html
935 (Many fine eyes)
936
937 - #1956: Add Result module and Format.pp_print_result
938 `ok, error, value, get_ok, bind, join, map, map_error`, etc.
939 https://caml.inria.fr/pub/docs/manual-ocaml/libref/Result.html
940 (Many fine eyes)
941
942 - #1855, #2118: Add `Fun.protect ~finally` for enforcing local
943 invariants whether a function raises or not, similar to
944 `unwind-protect` in Lisp and `FINALLY` in Modula-2. It is careful
945 about preserving backtraces and treating exceptions in finally as
946 errors.
947 (Marcello Seri and Guillaume Munch-Maccagnoni, review by Daniel
948 Bünzli, Gabriel Scherer, François Bobot, Nicolás Ojeda Bär, Xavier
949 Clerc, Boris Yakobowski, Damien Doligez, and Xavier Leroy)
950
951 * #1605: Deprecate Stdlib.Pervasives. Following #1010, Pervasives
952 is no longer needed and Stdlib should be used instead.
953 (Jérémie Dimino, review by Nicolás Ojeda Bär)
954
955 - #2185: Add `List.filter_map`
956 (Thomas Refis, review by Alain Frisch and Gabriel Scherer)
957
958 - #1957: Add Stack.{top_opt,pop_opt} and Queue.{peek_opt,take_opt}.
959 (Vladimir Keleshev, review by Nicolás Ojeda Bär and Gabriel Scherer)
960
961 - #1182: Add new Printf formats %#d %#Ld %#ld %#nd (idem for %i and %u) for
962 alternative integer formatting -- inserts '_' between blocks of digits.
963 (ygrek, review by Gabriel Scherer)
964
965 - #1959: Add Format.dprintf, a printing function which outputs a closure
966 usable with %t.
967 (Gabriel Radanne, request by Armaël Guéneau,
968 review by Florian Angeletti and Gabriel Scherer)
969
970 - #1986, #6450: Add Set.disjoint
971 (Nicolás Ojeda Bär, review by Gabriel Scherer)
972
973 - #7812, #2125: Add Filename.chop_suffix_opt
974 (Alain Frisch, review by Nicolás Ojeda Bär, suggestion by whitequark)
975
976 - #1864: Extend Bytes and Buffer with functions to read/write
977 binary representations of numbers
978 (Alain Frisch and Daniel Bünzli)
979
980 - #1458: Add unsigned operations unsigned_div, unsigned_rem, unsigned_compare
981 and unsigned_to_int to modules Int32, Int64, Nativeint.
982 (Nicolás Ojeda Bär, review by Daniel Bünzli, Alain Frisch and Max Mouratov)
983
984 - #2002: Add Format.pp_print_custom_break, a new more general kind of break
985 hint that can emit non-whitespace characters.
986 (Vladimir Keleshev and Pierre Weis, review by Josh Berdine, Gabriel Radanne)
987
988 - #1966: Add Format semantic tags using extensible sum types.
989 (Gabriel Radanne, review by Nicolás Ojeda Bär)
990
991 - #1794: Add constants zero, one, minus_one and functions succ,
992 pred, is_finite, is_infinite, is_nan, is_integer, trunc, round,
993 next_after, sign_bit, min, max, min_max, min_num, max_num,
994 min_max_num to module Float.
995 (Christophe Troestler, review by Alain Frish, Xavier Clerc and Daniel Bünzli)
996
997 - #1354, #2177: Add fma support to Float module.
998 (Laurent Thévenoux, review by Alain Frisch, Jacques-Henri Jourdan,
999 Xavier Leroy)
1000
1001
1002
1003 - #5072, #6655, #1876: add aliases in Stdlib for built-in types
1004 and exceptions.
1005 (Jeremy Yallop, reports by Pierre Letouzey and David Sheets,
1006 review by Valentin Gatien-Baron, Gabriel Scherer and Alain Frisch)
1007
1008 - #1731: Format, use raise_notrace to preserve backtraces.
1009 (Frédéric Bour, report by Jules Villard, review by Gabriel Scherer)
1010
1011 - #6701, #1185, #1803: make float_of_string and string_of_float
1012 locale-independent.
1013 (ygrek, review by Xavier Leroy and Damien Doligez)
1014
1015 - #7795, #1782: Fix off-by-one error in Weak.create.
1016 (KC Sivaramakrishnan, review by Gabriel Scherer and François Bobot)
1017
1018 - #7235: Format, flush err_formatter at exit.
1019 (Pierre Weis, request by Jun Furuse)
1020
1021 - #1857, #7812: Remove Sort module, deprecated since 2000 and emitting
1022 a deprecation warning since 4.02.
1023 (whitequark)
1024
1025 - #1923: Arg module sometimes misbehaved instead of rejecting invalid
1026 -keyword=arg inputs
1027 (Valentin Gatien-Baron, review by Gabriel Scherer)
1028
1029 - #1959: Small simplification and optimization to Format.ifprintf
1030 (Gabriel Radanne, review by Gabriel Scherer)
1031
1032 - #2119: clarify the documentation of Set.diff
1033 (Gabriel Scherer, suggestion by John Skaller)
1034
1035 - #2145: Deprecate the mutability of Gc.control record fields
1036 (Damien Doligez, review by Alain Frisch)
1037
1038 - #2159, #7874: annotate {String,Bytes}.equal as being [@@noalloc].
1039 (Pierre-Marie Pédrot, review by Nicolás Ojeda Bär)
1040
1041 - #1936: Add module Float.Array
1042 (Damien Doligez, review by Xavier Clerc and Alain Frisch)
1043
1044 - #2183: Fix segfault in Array.create_float with -no-flat-float-array
1045 (Damien Doligez, review by Gabriel Scherer and Jeremy Yallop)
1046
1047 - #1525: Make function set_max_indent respect documentation
1048 (Pierre Weis, Richard Bonichon, review by Florian Angeletti)
1049
1050 - #2202: Correct Hashtbl.MakeSeeded.{add_seq,replace_seq,of_seq} to use
1051 functor hash function instead of default hash function. Hashtbl.Make.of_seq
1052 shouldn't create randomized hash tables.
1053 (David Allsopp, review by Alain Frisch)
1054
1055 ### Other libraries:
1056
1057 - #2533, #1839, #1949: added Unix.fsync
1058 (Francois Berenger, Nicolás Ojeda Bär, review by Daniel Bünzli, David Allsopp
1059 and ygrek)
1060
1061 - #1792, #7794: Add Unix.open_process_args{,_in,_out,_full} similar to
1062 Unix.open_process{,_in,_out,_full}, but passing an explicit argv array.
1063 (Nicolás Ojeda Bär, review by Jérémie Dimino, request by Volker Diels-Grabsch)
1064
1065 - #1999: Add Unix.process{,_in,_out,_full}_pid to retrieve opened process's
1066 pid.
1067 (Romain Beauxis, review by Nicolás Ojeda Bär)
1068
1069 - #2222: Set default status in waitpid when pid is zero. Otherwise,
1070 status value is undefined.
1071 (Romain Beauxis and Xavier Leroy, review by Stephen Dolan)
1072
1073 * #2104, #2211, #4127, #7709: Fix Thread.sigmask. When
1074 system threads are loaded, Unix.sigprocmask is now an alias for
1075 Thread.sigmask. This changes the behavior at least on MacOS, where
1076 Unix.sigprocmask used to change the masks of all threads.
1077 (Jacques-Henri Jourdan, review by Jérémie Dimino)
1078
1079 - #1061: Add ?follow parameter to Unix.link. This allows hardlinking
1080 symlinks.
1081 (Christopher Zimmermann, review by Xavier Leroy, Damien Doligez, David
1082 Allsopp, David Sheets)
1083
1084 - #2038: Deprecate vm threads.
1085 OCaml supported both "native threads", based on pthreads,
1086 and its own green-threads implementation, "vm threads". We are not
1087 aware of any recent usage of "vm threads", and removing them simplifies
1088 further maintenance.
1089 (Jérémie Dimino)
1090
1091 * #4208, #4229, #4839, #6462, #6957, #6950, #1063, #2176,
1092 #2297: Make (nat)dynlink sound by correctly failing when
1093 dynlinked module names clash with other modules or interfaces.
1094 (Mark Shinwell, Leo White, Nicolás Ojeda Bär, Pierre Chambart)
1095
1096 - #2263: Delete the deprecated Bigarray.*.map_file functions in
1097 favour of `*_of_genarray (Unix.map_file ...)` functions instead. The
1098 `Unix.map_file` function was introduced in OCaml 4.06.0 onwards.
1099 (Jérémie Dimino, reviewed by David Allsopp and Anil Madhavapeddy)
1100
1101 ### Compiler user-interface and warnings:
1102
1103 - #2096: Add source highlighting for errors & warnings in batch mode
1104 (Armaël Guéneau, review by Gabriel Scherer and Jérémie Dimino)
1105
1106 - #2133: [@ocaml.warn_on_literal_pattern]: now warn on literal patterns
1107 found anywhere in a constructor's arguments.
1108 (Jeremy Yallop, review by Gabriel Scherer)
1109
1110 - #1720: Improve error reporting for missing 'rec' in let-bindings.
1111 (Arthur Charguéraud and Armaël Guéneau, with help and advice
1112 from Gabriel Scherer, Frédéric Bour, Xavier Clerc and Leo White)
1113
1114 - #7116, #1430: new -config-var option
1115 to get the value of a single configuration variable in scripts.
1116 (Gabriel Scherer, review by Sébastien Hinderer and David Allsopp,
1117 request by Adrien Nader)
1118
1119 - #1733,1993,1998,2058,2094,2140: Typing error message improvements
1120 - #1733, change the perspective of the unexpected existential error
1121 message.
1122 - #1993, expanded error messages for universal quantification failure
1123 - #1998, more context for unbound type parameter error
1124 - #2058, full explanation for unsafe cycles in recursive module
1125 definitions (suggestion by Ivan Gotovchits)
1126 - #2094, rewording for "constructor has no type" error
1127 - #7565, #2140, more context for universal variable escape
1128 in method type
1129 (Florian Angeletti, reviews by Jacques Garrique, Armaël Guéneau,
1130 Gabriel Radanne, Gabriel Scherer and Jeremy Yallop)
1131
1132 - #1913: new flag -dump-into-file to print debug output like -dlambda into
1133 a file named after the file being built, instead of on stderr.
1134 (Valentin Gatien-Baron, review by Thomas Refis)
1135
1136 - #1921: in the compilation context passed to ppx extensions,
1137 add more configuration options related to type-checking:
1138 -rectypes, -principal, -alias-deps, -unboxed-types, -unsafe-string
1139 (Gabriel Scherer, review by Gabriel Radanne, Xavier Clerc and Frédéric Bour)
1140
1141 - #1976: Better error messages for extension constructor type mismatches
1142 (Thomas Refis, review by Gabriel Scherer)
1143
1144 - #1841, #7808: the environment variable OCAMLTOP_INCLUDE_PATH can now
1145 specify a list of additional include directories for the ocaml toplevel.
1146 (Nicolás Ojeda Bär, request by Daniel Bünzli, review by Daniel Bünzli and
1147 Damien Doligez)
1148
1149 - #6638, #1110: introduced a dedicated warning to report
1150 unused "open!" statements
1151 (Alain Frisch, report by dwang, review by and design from Leo White)
1152
1153 - #1974: Trigger warning 5 in "let _ = e" and "ignore e" if e is of function
1154 type and syntactically an application. (For the case of "ignore e" the warning
1155 already existed, but used to be triggered even when e was not an application.)
1156 (Nicolás Ojeda Bär, review by Alain Frisch and Jacques Garrigue)
1157
1158 - #7408, #7846, #2015: Check arity of primitives.
1159 (Hugo Heuzard, review by Nicolás Ojeda Bär)
1160
1161
1162
1163 - #2091: Add a warning triggered by type declarations "type t = ()"
1164 (Armaël Guéneau, report by linse, review by Florian Angeletti and Gabriel
1165 Scherer)
1166
1167 - #2004: Use common standard library path `lib/ocaml` for Windows,
1168 for consistency with OSX & Linux. Previously was located at `lib`.
1169 (Bryan Phelps, Jordan Walke, review by David Allsopp)
1170
1171 - #6416, #1120: unique printed names for identifiers
1172 (Florian Angeletti, review by Jacques Garrigue)
1173
1174 - #1691: add shared_libraries to ocamlc -config exporting
1175 SUPPORTS_SHARED_LIBRARIES from Makefile.config.
1176 (David Allsopp, review by Gabriel Scherer and Mark Shinwell)
1177
1178 - #6913, #1786: new -match-context-rows option
1179 to control the degree of optimization in the pattern matching compiler.
1180 (Dwight Guth, review by Gabriel Scherer and Luc Maranget)
1181
1182 - #1822: keep attributes attached to pattern variables from being discarded.
1183 (Nicolás Ojeda Bär, review by Thomas Refis)
1184
1185 - #1845: new `-dcamlprimc` option to keep the generated C file containing
1186 the information about primitives; pass `-fdebug-prefix-map` to the C compiler
1187 when supported, for reproducible builds
1188 (Xavier Clerc, review by Jérémie Dimino)
1189
1190 - #1856, #1869: use `BUILD_PATH_PREFIX_MAP` when compiling primitives
1191 in order to make builds reproducible if code contains uses of
1192 `__FILE__` or `__LOC__`
1193 (Xavier Clerc, review by Gabriel Scherer and Sébastien Hinderer)
1194
1195 - #1906: the -unsafe option does not apply to marshalled ASTs passed
1196 to the compiler directly or by a -pp preprocessor; add a proper
1197 warning (64) instead of a simple stderr message
1198 (Valentin Gatien-Baron)
1199
1200 - #1925: Print error locations more consistently between batch mode, toplevel
1201 and expect tests
1202 (Armaël Guéneau, review by Thomas Refis, Gabriel Scherer and François Bobot)
1203
1204 - #1930: pass the elements from `BUILD_PATH_PREFIX_MAP` to the assembler
1205 (Xavier Clerc, review by Gabriel Scherer, Sébastien Hinderer, and
1206 Xavier Leroy)
1207
1208 - #1945, #2032: new "-stop-after [parsing|typing]" option
1209 to stop compilation after the parsing or typing pass
1210 (Gabriel Scherer, review by Jérémie Dimino)
1211
1212 - #1953: Add locations to attributes in the parsetree.
1213 (Hugo Heuzard, review by Gabriel Radanne)
1214
1215 - #1954: Add locations to toplevel directives.
1216 (Hugo Heuzard, review by Gabriel Radanne)
1217
1218 * #1979: Remove support for TERM=norepeat when displaying errors
1219 (Armaël Guéneau, review by Gabriel Scherer and Florian Angeletti)
1220
1221 - #1960: The parser keeps previous location when relocating ast node.
1222 (Hugo Heuzard, review by Jérémie Dimino)
1223
1224 - #7864, #2109: remove duplicates from spelling suggestions.
1225 (Nicolás Ojeda Bär, review by Armaël Guéneau)
1226
1227 ### Manual and documentation:
1228
1229 - #7548: printf example in the tutorial part of the manual
1230 (Kostikova Oxana, rewiew by Gabriel Scherer, Florian Angeletti,
1231 Marcello Seri and Armaël Guéneau)
1232
1233 - #7546, #2020: preambles and introduction for compiler-libs.
1234 (Florian Angeletti, review by Daniel Bünzli, Perry E. Metzger
1235 and Gabriel Scherer)
1236
1237 - #7547, #2273: Tutorial on Lazy expressions and patterns in OCaml Manual
1238 (Ulugbek Abdullaev, review by Florian Angeletti and Gabriel Scherer)
1239
1240 - #7720, #1596, precise the documentation
1241 of the maximum indentation limit in Format.
1242 (Florian Angeletti, review by Richard Bonichon and Pierre Weis)
1243
1244 - #7825: html manual split compilerlibs from stdlib in the html
1245 index of modules
1246 (Florian Angeletti, review by Perry E. Metzger and Gabriel Scherer)
1247
1248 - #1209, #2008: in the Extension section, use the caml_example environment
1249 (uses the compiler to check the example code).
1250 This change was made possible by a lot of tooling work from Florian Angeletti:
1251 #1702, #1765, #1863, and Gabriel Scherer's #1903.
1252 (Gabriel Scherer, review by Florian Angeletti)
1253
1254 - #1788, 1831, 2007, 2198, 2232, move language extensions to the core
1255 chapters:
1256 - #1788: quoted string description
1257 - #1831: local exceptions and exception cases
1258 - #2007: 32-bit, 64-bit and native integer literals
1259 - #2198: lazy patterns
1260 - #2232: short object copy notation
1261 (Florian Angeletti, review by Xavier Clerc, Perry E. Metzger, Gabriel Scherer
1262 and Jeremy Yallop)
1263
1264 - #1863: caml-tex2, move to compiler-libs
1265 (Florian Angeletti, review by Sébastien Hinderer and Gabriel Scherer)
1266
1267 - #2105: Change verbatim to caml_example in documentation
1268 (Maxime Flin, review by Florian Angeletti)
1269
1270 - #2114: ocamldoc, improved manpages for documentation inside modules
1271 (Florian Angeletti, review by Gabriel Scherer)
1272
1273 - #2117: stdlib documentation, duplicate the operator precedence table
1274 from the manual inside a separate "OCaml_operators" module.
1275 (Florian Angeletti, review by Daniel Bünzli, Perry E. Metzger
1276 and Gabriel Scherer)
1277
1278 - #2187: document "exception A | pat" patterns
1279 (Florian Angeletti, review by Perry E. Metzger and Jeremy Yallop)
1280
1281 - #8508: refresh \moduleref macro
1282 (Florian Angeletti, review by Gabriel Scherer)
1283
1284 ### Code generation and optimizations:
1285
1286 - #7725, #1754: improve AFL instrumentation for objects and lazy values.
1287 (Stephen Dolan)
1288
1289 - #1631: AMD64 code generator: emit shorter instruction sequences for the
1290 sign-extension operations.
1291 (LemonBoy, review by Alain Frisch and Xavier Leroy)
1292
1293 - #7246, #2146: make a few int64 primitives use [@@unboxed]
1294 stubs on 32bits
1295 (Jérémie Dimino)
1296
1297 - #1917: comballoc: ensure object allocation order is preserved
1298 (Stephen Dolan)
1299
1300 - #6242, #2143, #8558, #8559: Optimize some local functions.
1301 Local functions that do not escape and whose calls all have
1302 the same continuation are lowered into a static-catch handler.
1303 (Alain Frisch, review by Gabriel Scherer)
1304
1305 - #2082: New options [-insn-sched] and [-no-insn-sched] to control
1306 instruction scheduling.
1307 (Mark Shinwell, review by Damien Doligez)
1308
1309 - #2239: Fix match miscompilation with flambda
1310 (Leo White, review by Alain Frisch)
1311
1312 ### Runtime system:
1313
1314 - #7198, #7750, #1738: add a function (caml_alloc_custom_mem)
1315 and three GC parameters to give the user better control of the
1316 out-of-heap memory retained by custom values; use the function to
1317 allocate bigarrays and I/O channels.
1318 (Damien Doligez, review by Alain Frisch)
1319
1320 - #1793: add the -m and -M command-line options to ocamlrun.
1321 Option -m prints the magic number of the bytecode executable passed
1322 as argument, -M prints the magic number expected by ocamlrun.
1323 (Sébastien Hinderer, review by Xavier Clerc and Damien Doligez)
1324
1325 - #1867: Remove the C plugins mechanism.
1326 (Xavier Leroy, review by David Allsopp, Damien Doligez, Sébastien Hinderer)
1327
1328 - #8627: Require SSE2 for 32-bit mingw port to generate correct code
1329 for caml_round with GCC 7.4.
1330 (David Allsopp, review by Xavier Leroy)
1331
1332 - #7676, #2144: Remove old GC heuristic
1333 (Damien Doligez, report and review by Alain Frisch)
1334
1335 - #1723: Remove internal Meta.static_{alloc,free} primitives.
1336 (Stephen Dolan, review by Gabriel Scherer)
1337
1338 - #1895: Printexc.get_callstack would return only one frame in native
1339 code in threads other then the initial one
1340 (Valentin Gatien-Baron, review by Xavier Leroy)
1341
1342 - #1900, #7814: avoid exporting non-prefixed identifiers in the debug
1343 and instrumented runtimes.
1344 (Damien Doligez, report by Gabriel Scherer)
1345
1346 - #2079: Avoid page table lookup in Pervasives.compare with
1347 no-naked-pointers
1348 (Sam Goldman, review by Gabriel Scherer, David Allsopp, Stephen Dolan)
1349
1350 - #7829, #8585: Fix pointer comparisons in freelist.c (for 32-bit platforms)
1351 (David Allsopp and Damien Doligez)
1352
1353 - #8567, #8569: on ARM64, use 32-bit loads to access caml_backtrace_active
1354 (Xavier Leroy, review by Mark Shinwell and Greta Yorsh)
1355
1356 - #8568: Fix a memory leak in mmapped bigarrays
1357 (Damien Doligez, review by Xavier Leroy and Jérémie Dimino)
1358
1359 ### Tools
1360
1361 - #2182: Split Emacs caml-mode as an independent project.
1362 (Christophe Troestler, review by Gabriel Scherer)
1363
1364 - #1865: support dark themes in Emacs, and clean up usage of
1365 deprecated Emacs APIs
1366 (Wilfred Hughes, review by Clément Pit-Claudel)
1367
1368 - #1590: ocamllex-generated lexers can be instructed not to update
1369 their lex_curr_p/lex_start_p fields, resulting in a significant
1370 performance gain when those fields are not required.
1371 (Alain Frisch, review by Jérémie Dimino)
1372
1373 - #7843, #2013: ocamldoc, better handling of {{!label}text} in the latex
1374 backend.
1375 (Florian Angeletti, review by Nicolás Ojeda Bär and Gabriel Scherer)
1376
1377 - #7844, #2040: Emacs, use built-in detection of comments,
1378 fixes an imenu crash.
1379 (Wilfred Hughes, review by Christophe Troestler)
1380
1381 - #7850: Emacs, use symbol boundaries in regular expressions,
1382 fixes an imenu crash.
1383 (Wilfred Hughes, review by Christophe Troestler)
1384
1385 - #1711: the new 'open' flag in OCAMLPARAM takes a comma-separated list of
1386 modules to open as if they had been passed via the command line -open flag.
1387 (Nicolás Ojeda Bär, review by Mark Shinwell)
1388
1389 - #2000: ocamdoc, extended support for "include module type of ..."
1390 (Florian Angeletti, review by Jérémie Dimino)
1391
1392 - #2045: ocamlmklib now supports options -args and -args0 to provide extra
1393 command-line arguments in a file.
1394 (Nicolás Ojeda Bär, review by Gabriel Scherer and Daniel Bünzli)
1395
1396 - #2189: change ocamldep Makefile-output to print each dependency
1397 on a new line, for more readable diffs of versioned dependencies.
1398 (Gabriel Scherer, review by Nicolás Ojeda Bär)
1399
1400 - #2223: ocamltest: fix the "bsd" and "not-bsd" built-in actions to
1401 recognize all BSD variants
1402 (Damien Doligez, review by Sébastien Hinderer and David Allsopp)
1403
1404 ### Compiler distribution build system:
1405
1406 - #1776: add -no-install-bytecode-programs and related configure options to
1407 control (non-)installation of ".byte" executables.
1408 (Mark Shinwell, review by Sébastien Hinderer and Gabriel Scherer)
1409
1410 - #1777: add -no-install-source-artifacts and related configure options to
1411 control installation of .cmt, .cmti, .mli and .ml files.
1412 (Mark Shinwell, review by Nicolás Ojeda Bär and Sébastien Hinderer)
1413
1414 - #1781: cleanup of the manual's build process.
1415 (steinuil, review by Marcello Seri, Gabriel Scherer and Florian Angeletti)
1416
1417 - #1797: remove the deprecated Makefile.nt files.
1418 (Sébastien Hinderer, review by Nicolas Ojeda Bar)
1419
1420 - #1805: fix the bootstrap procedure and its documentation.
1421 (Sébastien Hinderer, Xavier Leroy and Damien Doligez; review by
1422 Gabriel Scherer)
1423
1424 - #1840: build system enhancements.
1425 (Sébastien Hinderer, review by David Allsopp, Xavier Leroy and
1426 Damien Doligez)
1427
1428 - #1852: merge runtime directories
1429 (Sébastien Hinderer, review by Xavier Leroy and Damien Doligez)
1430
1431 - #1854: remove the no longer defined BYTECCCOMPOPTS build variable.
1432 (Sébastien Hinderer, review by Damien Doligez)
1433
1434 - #2024: stop supporting obsolete platforms: Rhapsody (old beta
1435 version of MacOS X, BeOS, alpha*-*-linux*, mips-*-irix6*,
1436 alpha*-*-unicos, powerpc-*-aix, *-*-solaris2*, mips*-*-irix[56]*,
1437 i[3456]86-*-darwin[89].*, i[3456]86-*-solaris*, *-*-sunos* *-*-unicos.
1438 (Sébastien Hinderer, review by Xavier Leroy, Damien Doligez, Gabriel
1439 Scherer and Armaël Guéneau)
1440
1441 - #2053: allow unix, vmthreads and str not to be built.
1442 (David Allsopp, review by Sébastien Hinderer)
1443
1444 * #2059: stop defining OCAML_STDLIB_DIR in s.h.
1445 (Sébastien Hinderer, review by David Allsopp and Damien Doligez)
1446
1447 * #2066: remove the standard_runtime configuration variable.
1448 (Sébastien Hinderer, review by Xavier Leroy, Stephen Dolan and
1449 Damien Doligez)
1450
1451 * #2139: use autoconf to generate the compiler's configuration script
1452 (Sébastien Hinderer, review by Damien Doligez and David Allsopp)
1453
1454 - #2148: fix a parallel build bug involving CamlinternalLazy.
1455 (Stephen Dolan, review by Gabriel Scherer and Nicolas Ojeda Bar)
1456
1457 - #2264, #7904: the configure script now sets the Unicode handling mode
1458 under Windows according to the value of the variable WINDOWS_UNICODE_MODE. If
1459 WINDOWS_UNICODE_MODE is "ansi" then it is assumed to be the current code page
1460 encoding. If WINDOWS_UNICODE_MODE is "compatible" or empty or not set at all,
1461 then encoding is UTF-8 with code page fallback.
1462 (Nicolás Ojeda Bär, review by Sébastien Hinderer and David Allsopp)
1463
1464 - #2266: ensure Cygwin ports configure with `EXE=.exe`, or the compiler is
1465 unable to find the camlheader files (subtle regression of #2139/2041)
1466 (David Allsopp, report and review by Sébastien Hinderer)
1467
1468 - #7919, #2311: Fix assembler detection in configure
1469 (Sébastien Hinderer, review by David Allsopp)
1470
1471 - #2295: Restore support for bytecode target XLC/AIX/Power
1472 (Konstantin Romanov, review by Sébastien Hinderer and David Allsopp)
1473
1474 - #8528: get rid of the direct call to the C preprocessor in the testsuite
1475 (Sébastien Hinderer, review by David Allsopp)
1476
1477 - #7938, #8532: Fix alignment detection for ints on 32-bits platforms
1478 (Sébastien Hinderer, review by Xavier Leroy)
1479
1480 * #8533: Remove some unused configure tests
1481 (Stephen Dolan, review by David Allsopp and Sébastien Hinderer)
1482
1483 - #2207, #8604: Add opam files to allow pinning
1484 (Leo White, Greta Yorsh, review by Gabriel Radanne)
1485
1486 - #8616: configure: use variables rather than arguments for a few options
1487 (Sébastien Hinderer, review by David Allsopp, Gabriel Scherer and
1488 Damien Doligez)
1489
1490 - #8632: Correctly propagate flags for --with-pic in configure.
1491 (David Allsopp, review by Sébastien Hinderer and Damien Doligez)
1492
1493 - #8673: restore SpaceTime and libunwind support in configure script
1494 (Sébastien Hinderer, review by Damien Doligez)
1495
1496 ### Internal/compiler-libs changes:
1497
1498 - #7918, #1703, #1944, #2213, #2257: Add the module
1499 Compile_common, which factorizes the common part in Compile and
1500 Optcompile. This also makes the pipeline more modular.
1501 (Gabriel Radanne, help from Gabriel Scherer and Valentin
1502 Gatien-Baron, review by Mark Shinwell and Gabriel Radanne,
1503 regression spotted by Clément Franchini)
1504
1505 - #292: use Menhir as the parser generator for the OCaml parser.
1506 Satellite GPRs: #1844, #1846, #1853, #1850, #1934, #2151,
1507 #2174
1508 (Gabriel Scherer, Nicolás Ojeda Bär, Frédéric Bour, Thomas Refis
1509 and François Pottier,
1510 review by Nicolás Ojeda Bär, Leo White and David Allsopp)
1511
1512 - #374: use Misc.try_finally for resource cleanup in the compiler
1513 codebase. This should fix the problem of catch-and-reraise `try .. with`
1514 blocks destroying backtrace information -- in the compiler.
1515 (François Bobot, help from Gabriel Scherer and Nicolás Ojeda Bär,
1516 review by Gabriel Scherer)
1517
1518 - #1148, #1287, #1288, #1874: significant improvements
1519 of the tools/check-typo script used over the files of the whole repository;
1520 contributors are now expected to check that check-typo passes on their
1521 pull requests; see CONTRIBUTING.md for more details.
1522 (David Allsopp, review by Damien Doligez and Sébastien Hinderer)
1523
1524 - #1610, #2252: Remove positions from paths
1525 (Leo White, review by Frédéric Bour and Thomas Refis)
1526
1527 - #1745: do not generalize the type of every sub-pattern,
1528 only of variables. (preliminary work for GADTs in or-patterns)
1529 (Thomas Refis, review by Leo White)
1530
1531 - #1909: unsharing pattern types (preliminary work for GADTs in or-patterns)
1532 (Thomas Refis, with help from Leo White, review by Jacques Garrigue)
1533
1534 - #1748: do not error when instantiating polymorphic fields in patterns.
1535 (Thomas Refis, review by Gabriel Scherer)
1536
1537 - #2317: type_let: be more careful generalizing parts of the pattern
1538 (Thomas Refis and Leo White, review by Jacques Garrigue)
1539
1540 - #1746: remove unreachable error variant: Make_seltype_nongen.
1541 (Florian Angeletti, review by Gabriel Radanne)
1542
1543 - #1747: type_cases: always propagate (preliminary work
1544 for GADTs in or-patterns)
1545 (Thomas Refis, review by Jacques Garrigue)
1546
1547 - #1811: shadow the polymorphic comparison in the middle-end
1548 (Xavier Clerc, review by Pierre Chambart)
1549
1550 - #1833: allow non-val payloads in CMM Ccatch handlers
1551 (Simon Fowler, review by Xavier Clerc)
1552
1553 - #1866: document the release process
1554 (Damien Doligez and Gabriel Scherer, review by Sébastien Hinderer,
1555 Perry E. Metzger, Xavier Leroy and David Allsopp)
1556
1557 - #1886: move the Location.absname reference to Clflags.absname
1558 (Armaël Guéneau, review by Jérémie Dimino)
1559
1560 - #1894: generalize highlight_dumb in location.ml to handle highlighting
1561 several locations
1562 (Armaël Guéneau, review by Gabriel Scherer)
1563
1564 - #1903: parsetree, add locations to all nodes with attributes
1565 (Gabriel Scherer, review by Thomas Refis)
1566
1567 - #1905: add check-typo-since to check the files changed
1568 since a given git reference
1569 (Gabriel Scherer, review by David Allsopp)
1570
1571 - #1910: improve the check-typo use of .gitattributes
1572 (Gabriel Scherer, review by David Allsopp and Damien Doligez)
1573
1574 - #1938: always check ast invariants after preprocessing
1575 (Florian Angeletti, review by Alain Frisch and Gabriel Scherer)
1576
1577 - #1941: refactor the command line parsing of ocamlcp and ocamloptp
1578 (Valentin Gatien-Baron, review by Florian Angeletti)
1579
1580 - #1948: Refactor Stdlib.Format. Notably, use Stdlib.Stack and Stdlib.Queue,
1581 and avoid exceptions for control flow.
1582 (Vladimir Keleshev, review by Nicolás Ojeda Bär and Gabriel Scherer)
1583
1584 * #1952: refactor the code responsible for displaying errors and warnings
1585 `Location.report_error` is removed, use `Location.print_report` instead
1586 (Armaël Guéneau, review by Thomas Refis)
1587
1588 - #7835, #1980, #8548, #8586: separate scope from stamp in idents and explicitly
1589 rescope idents when substituting signatures.
1590 (Thomas Refis, review by Jacques Garrigue and Leo White)
1591
1592 - #1996: expose Pprintast.longident to help compiler-libs users print
1593 Longident.t values.
1594 (Gabriel Scherer, review by Florian Angeletti and Thomas Refis)
1595
1596 - #2030: makefile targets to build AST files of sources
1597 for parser testing. See parsing/HACKING.adoc.
1598 (Gabriel Scherer, review by Nicolás Ojeda Bär)
1599
1600 * #2041: add a cache for looking up files in the load path
1601 (Jérémie Dimino, review by Alain Frisch and David Allsopp)
1602
1603 - #2047, #2269: a new type for unification traces
1604 (Florian Angeletti, report by Leo White (#2269),
1605 review by Thomas Refis and Gabriel Scherer)
1606
1607 - #2055: Add [Linearize.Lprologue].
1608 (Mark Shinwell, review by Pierre Chambart)
1609
1610 - #2056: Use [Backend_var] rather than [Ident] from [Clambda] onwards;
1611 use [Backend_var.With_provenance] for variables in binding position.
1612 (Mark Shinwell, review by Pierre Chambart)
1613
1614 - #2060: "Phantom let" support for the Clambda language.
1615 (Mark Shinwell, review by Vincent Laviron)
1616
1617 - #2065: Add [Proc.destroyed_at_reloadretaddr].
1618 (Mark Shinwell, review by Damien Doligez)
1619
1620 - #2070: "Phantom let" support for the Cmm language.
1621 (Mark Shinwell, review by Vincent Laviron)
1622
1623 - #2072: Always associate a scope to a type
1624 (Thomas Refis, review by Jacques Garrigue and Leo White)
1625
1626 - #2074: Correct naming of record field inside [Ialloc] terms.
1627 (Mark Shinwell, review by Jérémie Dimino)
1628
1629 - #2076: Add [Targetint.print].
1630 (Mark Shinwell)
1631
1632 - #2080: Add [Proc.dwarf_register_numbers] and
1633 [Proc.stack_ptr_dwarf_register_number].
1634 (Mark Shinwell, review by Bernhard Schommer)
1635
1636 - #2088: Add [Clambda.usymbol_provenance].
1637 (Mark Shinwell, review by Damien Doligez)
1638
1639 - #2152, #2517: refactorize the fixpoint to compute type-system
1640 properties of mutually-recursive type declarations.
1641 (Gabriel Scherer and Rodolphe Lepigre, review by Armaël Guéneau)
1642
1643 - #2156: propagate more type information through Lambda and Clambda
1644 intermediate language, as a preparation step for more future optimizations
1645 (Pierre Chambart and Alain Frisch, cross-reviewed by themselves)
1646
1647 - #2160: restore --disable-shared support and ensure testsuite runs correctly
1648 when compiled without shared library support.
1649 (David Allsopp, review by Damien Doligez and Sébastien Hinderer)
1650
1651 * #2173: removed TypedtreeMap
1652 (Thomas Refis, review by Gabriel Scherer)
1653
1654 - #7867: Fix #mod_use raising an exception for filenames with no
1655 extension.
1656 (Geoff Gole)
1657
1658 - #2100: Fix Unix.getaddrinfo when called on strings containing
1659 null bytes; it would crash the GC later on.
1660 (Armaël Guéneau, report and fix by Joe, review by Sébastien Hinderer)
1661
1662 - #7847, #2019: Fix an infinite loop that could occur when the
1663 (Menhir-generated) parser encountered a syntax error in a certain
1664 specific state.
1665 (François Pottier, report by Stefan Muenzel,
1666 review by Frédéric Bour, Thomas Refis, Gabriel Scherer)
1667
1668 - #1626: Do not allow recursive modules in `with module`
1669 (Leo White, review by Gabriel Radanne)
1670
1671 - #7726, #1676: Recursive modules, equi-recursive types and stack overflow
1672 (Jacques Garrigue, report by Jeremy Yallop, review by Leo White)
1673
1674 - #7723, #1698: Ensure `with module` and `with type` do not weaken
1675 module aliases.
1676 (Leo White, review by Gabriel Radanne and Jacques Garrigue)
1677
1678 - #1719: fix Pervasives.LargeFile functions under Windows.
1679 (Alain Frisch)
1680
1681 - #1739: ensure ocamltest waits for child processes to terminate on Windows.
1682 (David Allsopp, review by Sébastien Hinderer)
1683
1684 - #7554, #1751: Lambda.subst: also update debug event environments
1685 (Thomas Refis, review by Gabriel Scherer)
1686
1687 - #7238, #1825: in Unix.in_channel_of_descr and Unix.out_channel_of_descr,
1688 raise an error if the given file description is not suitable for
1689 character-oriented I/O, for example if it is a block device or a
1690 datagram socket.
1691 (Xavier Leroy, review by Jérémie Dimino and Perry E. Metzger)
1692
1693 - #7799, #1820: fix bug where Scanf.format_from_string could fail when
1694 the argument string contained characters that require escaping.
1695 (Gabriel Scherer and Nicolás Ojeda Bär, report by Guillaume Melquiond, review
1696 by Gabriel Scherer)
1697
1698 - #1843: ocamloptp was doing the wrong thing with option -inline-max-unroll.
1699 (Github user @poechsel, review by Nicolás Ojeda Bär).
1700
1701 - #1890: remove last use of Ctype.unroll_abbrev
1702 (Thomas Refis, report by Leo White, review by Jacques Garrigue)
1703
1704 - #1893: dev-branch only, warning 40(name not in scope) triggered spurious
1705 warnings 49(missing cmi) with -no-alias-deps.
1706 (Florian Angeletti, report by Valentin Gatien-Baron,
1707 review by Gabriel Scherer)
1708
1709 - #1912: Allow quoted strings, octal/unicode escape sequences and identifiers
1710 containing apostrophes in ocamllex actions and comments.
1711 (Pieter Goetschalckx, review by Damien Doligez)
1712
1713 - #7828, #1935: correct the conditions that generate warning 61,
1714 Unboxable_type_in_prim_decl
1715 (Stefan Muenzel)
1716
1717 - #1958: allow [module M(_:S) = struct end] syntax
1718 (Hugo Heuzard, review by Gabriel Scherer)
1719
1720 - #1970: fix order of floatting documentation comments in classes
1721 (Hugo Heuzard, review by Nicolás Ojeda Bär)
1722
1723 - #1977: [@@ocaml.warning "..."] attributes attached to type declarations are
1724 no longer ignored.
1725 (Nicolás Ojeda Bär, review by Gabriel Scherer)
1726
1727 - #7830, #1987: fix ocamldebug crash when printing a value in the scope of
1728 an `open` statement for which the `.cmi` is not available.
1729 (Nicolás Ojeda Bär, report by Jocelyn Sérot, review by Gabriel Scherer)
1730
1731 - #7854, #2062: fix an issue where the wrong locale may be used when using
1732 the legacy ANSI encoding under Windows.
1733 (Nicolás Ojeda Bär, report by Tiphaine Turpin)
1734
1735 - #2083: Fix excessively aggressive float unboxing and introduce similar fix
1736 as a preventative measure for boxed int unboxing.
1737 (Thomas Refis, Mark Shinwell, Leo White)
1738
1739 - #2130: fix printing of type variables with a quote in their name
1740 (Alain Frisch, review by Armaël Guéneau and Gabriel Scherer,
1741 report by Hugo Heuzard)
1742
1743 - #2131: fix wrong calls to Env.normalize_path on non-module paths
1744 (Alain Frisch, review by Jacques Garrigue)
1745
1746 - #2175: Apply substitution to all modules when packing
1747 (Leo White, review by Gabriel Scherer)
1748
1749 - #2220: Remove duplicate process management code in
1750 otherlibs/threads/unix.ml
1751 (Romain Beauxis, review by Gabriel Scherer and Alain Frisch)
1752
1753 - #2231: Env: always freshen persistent signatures before using them
1754 (Thomas Refis and Leo White, review by Gabriel Radanne)
1755
1756 - #7851, #8570: Module type of allows to transform a malformed
1757 module type into a vicious signature, breaking soundness
1758 (Jacques Garrigue, review by Leo White)
1759
1760 - #7923, #2259: fix regression in FlexDLL bootstrapped build caused by
1761 refactoring the root Makefile for Dune in #2093)
1762 (David Allsopp, report by Marc Lasson)
1763
1764 - #7929, #2261: Subst.signature: call cleanup_types exactly once
1765 (Thomas Refis, review by Gabriel Scherer and Jacques Garrigue,
1766 report by Daniel Bünzli and Jon Ludlam)
1767
1768 - #8550, #8552: Soundness issue with class generalization
1769 (Jacques Garrigue, review by Leo White and Thomas Refis,
1770 report by Jeremy Yallop)
1771
1772 OCaml 4.07.1 (4 October 2018)
1773 -----------------------------
1774
1775 ### Bug fixes:
1776
1777 - #7815, #1896: major GC crash with first-fit policy
1778 (Stephen Dolan and Damien Doligez, report by Joris Giovannangeli)
1779
1780 * #7818, #2051: Remove local aliases in functor argument types,
1781 to prevent the aliasing of their target.
1782 (Jacques Garrigue, report by mandrykin, review by Leo White)
1783
1784 - #7820, #1897: Fix Array.of_seq. This function used to apply a circular
1785 permutation of one cell to the right on the sequence.
1786 (Thierry Martinez, review by Nicolás Ojeda Bär)
1787
1788 - #7821, #1908: make sure that the compilation of extension
1789 constructors doesn't cause the compiler to load more cmi files
1790 (Jérémie Dimino, review by Gabriel Scherer)
1791
1792 - #7824, #1914: subtype_row: filter out absent fields when row is closed
1793 (Leo White and Thomas Refis, report by talex, review by Jacques Garrigue)
1794
1795 - #1915: rec_check.ml is too permissive for certain class declarations.
1796 (Alban Reynaud with Gabriel Scherer, review by Jeremy Yallop)
1797
1798 - #7833, #1946: typecore: only 1k existential per match, not 100k
1799 (Thomas Refis, report by Jerome Simeon, review by Jacques Garrigue)
1800
1801 - #7838: -principal causes assertion failure in type checker
1802 (Jacques Garrigue, report by Markus Mottl, review by Thomas Refis)
1803
1804 OCaml 4.07.0 (10 July 2018)
1805 ---------------------------
1806
1807 (Changes that can break existing programs are marked with a "*")
1808
1809 ### Language features:
1810
1811 - #6023, #1648: Allow type-based selection of GADT constructors.
1812 (Thomas Refis and Leo White, review by Jacques Garrigue and Gabriel Scherer)
1813
1814 - #1546: Allow empty variants.
1815 (Runhang Li, review by Gabriel Radanne and Jacques Garrigue)
1816
1817 ### Standard library:
1818
1819 - #4170, #1674: add the constant `Float.pi`.
1820 (Christophe Troestler, review by Damien Doligez)
1821
1822 - #6139, #1685: Move the Bigarray module to the standard library. Keep the
1823 bigarray library as on overlay adding the deprecated map_file functions.
1824 (Jérémie Dimino, review by Mark Shinwell)
1825
1826 - #7528, #1500: add a Format.pp_set_geometry function to avoid memory
1827 effects in set_margin and set_max_indent.
1828 (Florian Angeletti, review by Richard Bonichon, Gabriel Radanne,
1829 Gabiel Scherer and Pierre Weis)
1830
1831 - #7690, #1528: fix the float_of_string function for hexadecimal floats
1832 with very large values of the exponent.
1833 (Olivier Andrieu)
1834
1835 - #1002: add a new `Seq` module defining a list-of-thunks style iterator.
1836 Also add `{to,of}_seq` to several standard modules.
1837 (Simon Cruanes, review by Alain Frisch and François Bobot)
1838
1839 * #1010: pack all standard library modules into a single module Stdlib
1840 which is the default opened module (Stdlib itself includes Pervasives) to free
1841 up the global namespace for other standard libraries, while still allowing any
1842 OCaml standard library module to be referred to as Stdlib.Module). This is
1843 implemented efficiently using module aliases (prefixing all modules with
1844 Stdlib__, e.g. Stdlib__string).
1845 (Jérémie Dimino, David Allsopp and Florian Angeletti, review by David Allsopp
1846 and Gabriel Radanne)
1847
1848 - #1637: String.escaped is faster and does not allocate when called with a
1849 string that does not contain any characters needing to be escaped.
1850 (Alain Frisch, review by Xavier Leroy and Gabriel Scherer)
1851
1852 - #1638: add a Float module.
1853 (Nicolás Ojeda Bär, review by Alain Frisch and Jeremy Yallop)
1854
1855 - #1697: Tune [List.init] tailrec threshold so that it does not stack
1856 overflow when compiled with the Js_of_ocaml backend.
1857 (Hugo Heuzard, reviewed by Gabriel Scherer)
1858
1859 ### Other libraries:
1860
1861 - #7745, #1629: Graphics.open_graph displays the correct window title on
1862 Windows again (fault introduced by 4.06 Unicode changes).
1863 (David Allsopp)
1864
1865 * #1406: Unix.isatty now returns true in the native Windows ports when
1866 passed a file descriptor connected to a Cygwin PTY. In particular, compiler
1867 colors for the native Windows ports now work under Cygwin/MSYS2.
1868 (Nicolás Ojeda Bär, review by Gabriel Scherer, David Allsopp, Xavier Leroy)
1869
1870 - #1451: [getpwuid], [getgrgid], [getpwnam], [getgrnam] now raise Unix error
1871 instead of returning [Not_found] when interrupted by a signal.
1872 (Arseniy Alekseyev, review by Mark Shinwell and Xavier Leroy)
1873
1874 - #1477: raw_spacetime_lib can now be used in bytecode.
1875 (Nicolás Ojeda Bär, review by Mark Shinwell)
1876
1877 - #1533: (a) The implementation of Thread.yield for system thread
1878 now uses nanosleep(1) for enabling better preemption.
1879 (b) Thread.delay is now an alias for Unix.sleepf.
1880 (Jacques-Henri Jourdan, review by Xavier Leroy and David Allsopp)
1881
1882 ### Compiler user-interface and warnings:
1883
1884 - #7663, #1694: print the whole cycle and add a reference to the manual in
1885 the unsafe recursive module evaluation error message.
1886 (Florian Angeletti, report by Matej Košík, review by Gabriel Scherer)
1887
1888 - #1166: In OCAMLPARAM, an alternative separator can be specified as
1889 first character (instead of comma) in the set ":|; ,"
1890 (Fabrice Le Fessant)
1891
1892 - #1358: Fix usage warnings with no mli file.
1893 (Leo White, review by Alain Frisch)
1894
1895 - #1428: give a non dummy location for warning 49 (no cmi found).
1896 (Valentin Gatien-Baron)
1897
1898 - #1491: Improve error reporting for ill-typed applicative functor
1899 types, F(M).t.
1900 (Valentin Gatien-Baron, review by Florian Angeletti and Gabriel Radanne)
1901
1902 - #1496: Refactor the code printing explanation for unification type errors,
1903 in order to avoid duplicating pattern matches.
1904 (Armaël Guéneau, review by Florian Angeletti and Gabriel Scherer)
1905
1906 - #1505: Add specific error messages for unification errors involving
1907 functions of type "unit -> _".
1908 (Arthur Charguéraud and Armaël Guéneau, with help from Leo White, review by
1909 Florian Angeletti and Gabriel Radanne)
1910
1911 - #1510: Add specific explanation for unification errors caused by type
1912 constraints propagated by keywords (such as if, while, for...).
1913 (Armaël Guéneau and Gabriel Scherer, original design by Arthur Charguéraud,
1914 review by Frédéric Bour, Gabriel Radanne and Alain Frisch)
1915
1916 - #1515: honor the BUILD_PATH_PREFIX_MAP environment variable
1917 to enable reproducible builds.
1918 (Gabriel Scherer, with help from Ximin Luo, review by Damien Doligez)
1919
1920 - #1534: Extend the warning printed when (*) is used, adding a hint to
1921 suggest using ( * ) instead.
1922 (Armaël Guéneau, with help and review from Florian Angeletti and Gabriel
1923 Scherer)
1924
1925 - #1552, #1577: do not warn about ambiguous variables in guards
1926 (warning 57) when the ambiguous values have been filtered by
1927 a previous clause.
1928 (Gabriel Scherer and Thomas Refis, review by Luc Maranget)
1929
1930 - #1554: warnings 52 and 57: fix reference to manual detailed explanation.
1931 (Florian Angeletti, review by Thomas Refis and Gabriel Scherer)
1932
1933 - #1618: add the -dno-unique-ids and -dunique-ids compiler flags.
1934 (Sébastien Hinderer, review by Leo White and Damien Doligez)
1935
1936 - #1649: change compilation order of toplevel definitions, so that some
1937 warnings emitted by the bytecode compiler appear more in-order than before.
1938 (Luc Maranget, advice and review by Damien Doligez)
1939
1940 - #1806: add linscan to OCAMLPARAM options.
1941 (Raja Boujbel)
1942
1943 ### Code generation and optimizations:
1944
1945 - #7630, #1401: Faster compilation of large modules with Flambda.
1946 (Pierre Chambart, report by Emilio Jesús Gallego Arias,
1947 Pierre-Marie Pédrot and Paul Steckler, review by Gabriel Scherer
1948 and Leo White)
1949
1950 - #7630, #1455: Disable CSE for the initialization function.
1951 (Pierre Chambart, report by Emilio Jesús Gallego Arias,
1952 review by Gabriel Scherer and Xavier Leroy)
1953
1954 - #1370: Fix code duplication in Cmmgen.
1955 (Vincent Laviron, with help from Pierre Chambart,
1956 reviews by Gabriel Scherer and Luc Maranget)
1957
1958 - #1486: ARM 32-bit port: add support for ARMv8 in 32-bit mode,
1959 a.k.a. AArch32.
1960 For this platform, avoid ITE conditional instruction blocks and use
1961 simpler IT blocks instead.
1962 (Xavier Leroy, review by Mark Shinwell)
1963
1964 - #1487: Treat negated float comparisons more directly.
1965 (Leo White, review by Xavier Leroy)
1966
1967 - #1573: emitcode: merge events after instructions reordering.
1968 (Thomas Refis and Leo White, with help from David Allsopp, review by Frédéric
1969 Bour)
1970
1971 - #1606: Simplify the semantics of Lambda.free_variables and Lambda.subst,
1972 including some API changes in bytecomp/lambda.mli.
1973 (Pierre Chambart, review by Gabriel Scherer)
1974
1975 - #1613: ensure that set-of-closures are processed first so that other
1976 entries in the let-rec symbol do not get dummy approximations.
1977 (Leo White and Xavier Clerc, review by Pierre Chambart)
1978
1979 * #1617: Make string/bytes distinguishable in the bytecode.
1980 (Hugo Heuzard, reviewed by Nicolás Ojeda Bär)
1981
1982 - #1627: Reduce cmx sizes by sharing variable names (Flambda only).
1983 (Fuyong Quah, Leo White, review by Xavier Clerc)
1984
1985 - #1665: reduce the size of cmx files in classic mode by dropping the
1986 bodies of functions that will not be inlined.
1987 (Fuyong Quah, review by Leo White and Pierre Chambart)
1988
1989 - #1666: reduce the size of cmx files in classic mode by dropping the
1990 bodies of functions that cannot be reached from the module block.
1991 (Fuyong Quah, review by Leo White and Pierre Chambart)
1992
1993 - #1686: Turn off by default flambda invariants checks.
1994 (Pierre Chambart)
1995
1996 - #1707: Add [Closure_origin.t] to trace inlined functions to prevent
1997 infinite loops from repeatedly inlining copies of the same function.
1998 (Fu Yong Quah)
1999
2000 - #1740: make sure startup.o is always linked in when using
2001 "-output-complete-obj". Previously, it was always linked in only on some
2002 platforms, making this option unusable on platforms where it wasn't.
2003 (Jérémie Dimino, review by Sébastien Hinderer and Xavier Leroy)
2004
2005 ### Runtime system:
2006
2007 - #515 #676 #7173: Add a public C API for weak arrays and
2008 ephemerons. Update the documentation for a 4.03 change: finalisation
2009 functions are now run before the erasure of the corresponding
2010 values.
2011 (François Bobot and Jacques-Henri Jourdan, review by Mark Shinwell,
2012 Damien Doligez and Frédéric Bour)
2013
2014 - #6411, #1535: don't compile everything with -static-libgcc on mingw32,
2015 only dllbigarray.dll and libbigarray.a. Allows the use of C++ libraries which
2016 raise exceptions.
2017 (David Allsopp)
2018
2019 - #7100, #1476: trigger a minor GC when custom blocks accumulate
2020 in minor heap.
2021 (Alain Frisch, report by talex, review by Damien Doligez, Leo White,
2022 Gabriel Scherer)
2023
2024 - #1431: remove ocamlrun dependencies on curses/terminfo/termcap C library.
2025 (Xavier Leroy, review by Daniel Bünzli)
2026
2027 - #1478: The Spacetime profiler now works under Windows (but it is not yet
2028 able to collect profiling information from C stubs).
2029 (Nicolás Ojeda Bär, review by Xavier Leroy, Mark Shinwell)
2030
2031 - #1483: fix GC freelist accounting for chunks larger than the maximum block
2032 size.
2033 (David Allsopp and Damien Doligez)
2034
2035 - #1526: install the debug and instrumented runtimes
2036 (lib{caml,asm}run{d,i}.a).
2037 (Gabriel Scherer, reminded by Julia Lawall)
2038
2039 - #1563: simplify implementation of LSRINT and ASRINT.
2040 (Max Mouratov, review by Frédéric Bour)
2041
2042 - #1644: remove caml_alloc_float_array from the bytecode primitives list
2043 (it's a native code primitive).
2044 (David Allsopp)
2045
2046 - #1701: fix missing root bug in #1476.
2047 (Mark Shinwell)
2048
2049 - #1752: do not alias function arguments to sigprocmask.
2050 (Anil Madhavapeddy)
2051
2052 - #1753: avoid potential off-by-one overflow in debugger socket path length.
2053 (Anil Madhavapeddy)
2054
2055 * #1683: Change Marshal format to make Custom_tag objects store their
2056 length. Old versions of OCaml will no longer be able to parse new marshalled
2057 files containing custom blocks, but old files will still parse.
2058 (Stephen Dolan)
2059
2060 ### Tools:
2061
2062 - #7643, #1377: ocamldep, fix an exponential blowup in presence of nested
2063 structures and signatures, e.g. "include struct … include(struct … end) … end"
2064 (Florian Angeletti, review by Gabriel Scherer, report by Christophe Raffalli)
2065
2066 - #7687, #1653: deprecate -thread option,
2067 which is equivalent to -I +threads.
2068 (Nicolás Ojeda Bär, report by Daniel Bünzli)
2069
2070 - #7710: `ocamldep -sort` should exit with nonzero code in case of
2071 cyclic dependencies.
2072 (Xavier Leroy, report by Mantis user baileyparker)
2073
2074 - #1537: boot/ocamldep is no longer included in the source distribution;
2075 boot/ocamlc -depend can be used in its place.
2076 (Nicolás Ojeda Bär, review by Xavier Leroy and Damien Doligez)
2077
2078 - #1585: optimize output of "ocamllex -ml".
2079 (Alain Frisch, review by Frédéric Bour and Gabriel Scherer)
2080
2081 - #1667: add command-line options -no-prompt, -no-version, -no-time,
2082 -no-breakpoint-message and -topdirs-path to ocamldebug.
2083 (Sébastien Hinderer, review by Damien Doligez)
2084
2085 - #1695: add the -null-crc command-line option to ocamlobjinfo.
2086 (Sébastien Hinderer, review by David Allsopp and Gabriel Scherer)
2087
2088 - #1710: ocamldoc, improve the 'man' rendering of subscripts and
2089 superscripts.
2090 (Gabriel Scherer)
2091
2092 - #1771: ocamldebug, avoid out of bound access.
2093 (Thomas Refis)
2094
2095 ### Manual and documentation:
2096
2097 - #7613: minor rewording of the "refutation cases" paragraph.
2098 (Florian Angeletti, review by Jacques Garrigue)
2099
2100 - #7647, #1384: emphasize ocaml.org website and forum in README.
2101 (Yawar Amin, review by Gabriel Scherer)
2102
2103 - #7698, #1545: improve wording in OCaml manual in several places,
2104 mostly in Chapter 1. This addresses the easier changes suggested in the PR.
2105 (Jim Fehrle, review by Florian Angeletti and David Allsopp)
2106
2107 - #1540: manual, decouple verbatim and toplevel style in code examples.
2108 (Florian Angeletti, review by Gabriel Scherer)
2109
2110 - #1556: manual, add a consistency test for manual references inside
2111 the compiler source code.
2112 (Florian Angeletti, review by Gabriel Scherer)
2113
2114 - #1647: manual, subsection on record and variant disambiguation.
2115 (Florian Angeletti, review by Alain Frisch and Gabriel Scherer)
2116
2117 - #1702: manual, add a signature mode for code examples.
2118 (Florian Angeletti, review by Gabriel Scherer)
2119
2120 - #1741: manual, improve typesetting and legibility in HTML output.
2121 (steinuil, review by Gabriel Scherer)
2122
2123 - #1757: style the html manual, changing type and layout.
2124 (Charles Chamberlain, review by Florian Angeletti, Xavier Leroy,
2125 Gabriel Radanne, Perry E. Metzger, and Gabriel Scherer)
2126
2127 - #1765: manual, ellipsis in code examples.
2128 (Florian Angeletti, review and suggestion by Gabriel Scherer)
2129
2130 - #1767: change html manual to use relative font sizes.
2131 (Charles Chamberlain, review by Daniel Bünzli, Perry E. Metzger,
2132 Josh Berdine, and Gabriel Scherer)
2133
2134 - #1779: integrate the Bigarray documentation into the main manual.
2135 (Perry E. Metzger, review by Florian Angeletti and Xavier Clerc)
2136
2137 ### Type system:
2138
2139 - #7611, #1491: reject the use of generative functors as applicative.
2140 (Valentin Gatien-Baron)
2141
2142 - #7706, #1565: in recursive value declarations, track
2143 static size of locally-defined variables.
2144 (Gabriel Scherer, review by Jeremy Yallop and Leo White, report by Leo White)
2145
2146 - #7717, #1593: in recursive value declarations, don't treat
2147 unboxed constructor size as statically known.
2148 (Jeremy Yallop, report by Pierre Chambart, review by Gabriel Scherer)
2149
2150 - #7767, #1712: restore legacy treatment of partially-applied
2151 labeled functions in 'let rec' bindings.
2152 (Jeremy Yallop, report by Ivan Gotovchits, review by Gabriel Scherer)
2153
2154 * #7787, #1652, #1743: Don't remove module aliases in `module type of`
2155 and `with module`.
2156 The old behaviour can be obtained using the `[@remove_aliases]` attribute.
2157 (Leo White and Thomas Refis, review by Jacques Garrigue)
2158
2159 - #1468: Do not enrich type_decls with incoherent manifests.
2160 (Thomas Refis and Leo White, review by Jacques Garrigue)
2161
2162 - #1469: Use the information from [@@immediate] annotations when
2163 computing whether a type can be [@@unboxed].
2164 (Damien Doligez, report by Stephan Muenzel, review by Alain Frisch)
2165
2166 - #1513: Allow compilation units to shadow sub-modules of Pervasives.
2167 For instance users can now use a largeFile.ml file in their project.
2168 (Jérémie Dimino, review by Nicolás Ojeda Bär, Alain Frisch and Gabriel
2169 Radanne)
2170
2171 - #1516: Allow float array construction in recursive bindings
2172 when configured with -no-flat-float-array.
2173 (Jeremy Yallop, report by Gabriel Scherer)
2174
2175 - #1583: propagate refined ty_arg to Parmatch checks.
2176 (Thomas Refis, review by Jacques Garrigue)
2177
2178 - #1609: Changes to ambivalence scope tracking.
2179 (Thomas Refis and Leo White, review by Jacques Garrigue)
2180
2181 - #1628: Treat reraise and raise_notrace as nonexpansive.
2182 (Leo White, review by Alain Frisch)
2183
2184 * #1778: Fix Soundness bug with non-generalized type variable and
2185 local modules. This is the same bug as #7414, but using local
2186 modules instead of non-local ones.
2187 (Leo White, review by Jacques Garrigue)
2188
2189 ### Compiler distribution build system:
2190
2191 - #5219, #1680, #1877: use 'install' instead of 'cp'
2192 in install scripts.
2193 (Gabriel Scherer, review by Sébastien Hinderer and Valentin Gatien-Baron)
2194
2195 - #7679: make sure .a files are erased before calling ar rc, otherwise
2196 leftover .a files from an earlier compilation may contain unwanted modules.
2197 (Xavier Leroy)
2198
2199 - #1571: do not perform architecture tests on 32-bit platforms, allowing
2200 64-bit back-ends to use 64-bit specific constructs.
2201 (Xavier Clerc, review by Damien Doligez)
2202
2203 ### Internal/compiler-libs changes:
2204
2205 - #7738, #1624: Asmlink.reset also resets lib_ccobjs/ccopts.
2206 (Cedric Cellier, review by Gabriel Scherer)
2207
2208 - #1488, #1560: Refreshing parmatch.
2209 (Gabriel Scherer and Thomas Refis, review by Luc Maranget)
2210
2211 - #1502: more command line options for expect tests.
2212 (Florian Angeletti, review by Gabriel Scherer)
2213
2214 - #1511: show code at error location in expect-style tests,
2215 using new Location.show_code_at_location function.
2216 (Gabriel Scherer and Armaël Guéneau,
2217 review by Valentin Gatien-Baron and Damien Doligez)
2218
2219 - #1519, #1532, #1570: migrate tests to ocamltest.
2220 (Sébastien Hinderer, review by Gabriel Scherer, Valentin Gatien-Baron
2221 and Nicolás Ojeda Bär)
2222
2223 - #1520: more robust implementation of Misc.no_overflow_mul.
2224 (Max Mouratov, review by Xavier Leroy)
2225
2226 - #1557: Organise and simplify translation of primitives.
2227 (Leo White, review by François Bobot and Nicolás Ojeda Bär)
2228
2229 - #1567: register all idents relevant for reraise.
2230 (Thomas Refis, review by Alain Frisch and Frédéric Bour)
2231
2232 - #1586: testsuite: 'make promote' for ocamltest tests.
2233 (The new "-promote" option for ocamltest is experimental
2234 and subject to change/removal).
2235 (Gabriel Scherer)
2236
2237 - #1619: expect_test: print all the exceptions, even the unexpected ones.
2238 (Thomas Refis, review by Jérémie Dimino)
2239
2240 - #1621: expect_test: make sure to not use the installed stdlib.
2241 (Jérémie Dimino, review by Thomas Refis)
2242
2243 - #1646: add ocamldoc test to ocamltest and
2244 migrate ocamldoc tests to ocamltest.
2245 (Florian Angeletti, review by Sébastien Hinderer)
2246
2247 - #1663: refactor flambda specialise/inlining handling.
2248 (Leo White and Xavier Clerc, review by Pierre Chambart)
2249
2250 - #1679: remove Pbittest from primitives in lambda.
2251 (Hugo Heuzard, review by Mark Shinwell)
2252
2253 * #1704: Make Ident.t abstract and immutable.
2254 (Gabriel Radanne, review by Mark Shinwell)
2255
2256 - #1699: Clean up Maps and Sets throughout the compiler.
2257 Remove the Tbl module in favor of dedicated Maps.
2258 (Gabriel Radanne, review by Mark Shinwell)
2259
2260 ### Bug fixes:
2261
2262 - #4499, #1479: Use native Windows API to implement Sys.getenv,
2263 Unix.getenv and Unix.environment under Windows.
2264 (Nicolás Ojeda Bär, report by Alain Frisch, review by David Allsopp, Xavier
2265 Leroy)
2266
2267 - #5250, #1435: on Cygwin, when ocamlrun searches the path
2268 for a bytecode executable file, skip directories and other
2269 non-regular files, like other Unix variants do.
2270 (Xavier Leroy)
2271
2272 - #6394, #1425: fix fatal_error from Parmatch.get_type_path.
2273 (Virgile Prevosto, review by David Allsopp, Thomas Refis and Jacques Garrigue)
2274
2275 * #6604, #931: Only allow directives with filename and at the beginning of
2276 the line.
2277 (Tadeu Zagallo, report by Roberto Di Cosmo,
2278 review by Hongbo Zhang, David Allsopp, Gabriel Scherer, Xavier Leroy)
2279
2280 - #7138, #7701, #1693: Keep documentation comments
2281 even in empty structures and signatures.
2282 (Leo White, Florian Angeletti, report by Anton Bachin)
2283
2284 - #7178, #7253, #7796, #1790: Make sure a function
2285 registered with "at_exit" is executed only once when the program exits.
2286 (Nicolás Ojeda Bär and Xavier Leroy, review by Max Mouratov)
2287
2288 - #7391, #1620: Do not put a dummy method in object types.
2289 (Thomas Refis, review by Jacques Garrigue)
2290
2291 - #7660, #1445: Use native Windows API to implement Unix.utimes in order to
2292 avoid unintended shifts of the argument timestamp depending on DST setting.
2293 (Nicolás Ojeda Bär, review by David Allsopp, Xavier Leroy)
2294
2295 - #7668: -principal is broken with polymorphic variants.
2296 (Jacques Garrigue, report by Jun Furuse)
2297
2298 - #7680, #1497: Incorrect interaction between Matching.for_let and
2299 Simplif.simplify_exits.
2300 (Alain Frisch, report and review by Vincent Laviron)
2301
2302 - #7682, #1495: fix [@@unboxed] for records with 1 polymorphic field.
2303 (Alain Frisch, report by Stéphane Graham-Lengrand, review by Gabriel Scherer)
2304
2305 - #7695, #1541: Fatal error: exception Ctype.Unify(_) with field override
2306 (Jacques Garrigue, report by Nicolás Ojeda Bär)
2307
2308 - #7704, #1564: use proper variant tag in non-exhaustiveness warning.
2309 (Jacques Garrigue, report by Thomas Refis)
2310
2311 - #7711, #1581: Internal typechecker error triggered by a constraint on
2312 self type in a class type.
2313 (Jacques Garrigue, report and review by Florian Angeletti)
2314
2315 - #7712, #1576: assertion failure with type abbreviations.
2316 (Thomas Refis, report by Michael O'Connor, review by Jacques Garrigue)
2317
2318 - #7747: Type checker can loop infinitely and consume all computer memory.
2319 (Jacques Garrigue, report by kantian)
2320
2321 - #7751, #1657: The toplevel prints some concrete types as abstract.
2322 (Jacques Garrigue, report by Matej Kosik)
2323
2324 - #7765, #1718: When unmarshaling bigarrays, protect against integer
2325 overflows in size computations.
2326 (Xavier Leroy, report by Maximilian Tschirschnitz,
2327 review by Gabriel Scherer)
2328
2329 - #7760, #1713: Exact selection of lexing engine, that is
2330 correct "Segfault in ocamllex-generated code using 'shortest'".
2331 (Luc Maranget, Frédéric Bour, report by Stephen Dolan,
2332 review by Gabriel Scherer)
2333
2334 - #7769, #1714: calls to Stream.junk could, under some conditions, be
2335 ignored when used on streams based on input channels.
2336 (Nicolás Ojeda Bär, report by Michael Perin, review by Gabriel Scherer)
2337
2338 - #7793, #1766: the toplevel #use directive now accepts sequences of ';;'
2339 tokens. This fixes a bug in which certain files accepted by the compiler were
2340 rejected by ocamldep.
2341 (Nicolás Ojeda Bär, report by Hugo Heuzard, review by Hugo Heuzard)
2342
2343 - #1517: More robust handling of type variables in mcomp.
2344 (Leo White and Thomas Refis, review by Jacques Garrigue)
2345
2346 - #1530, #1574: testsuite, fix 'make parallel' and 'make one DIR=...'
2347 to work on ocamltest-based tests.
2348 (Runhang Li and Sébastien Hinderer, review by Gabriel Scherer)
2349
2350 - #1550, #1555: Make pattern matching warnings more robust
2351 to ill-typed columns.
2352 (Thomas Refis, with help from Gabriel Scherer and Luc Maranget)
2353
2354 - #1614: consider all bound variables when inlining, fixing a compiler
2355 fatal error.
2356 (Xavier Clerc, review by Pierre Chambart, Leo White)
2357
2358 - #1622: fix bug in the expansion of command-line arguments under Windows
2359 which could result in some elements of Sys.argv being truncated in some cases.
2360 (Nicolás Ojeda Bär, review by Sébastien Hinderer)
2361
2362 - #1623: Segfault on Windows 64 bits when expanding wildcards in arguments.
2363 (Marc Lasson, review by David Allsopp, Alain Frisch, Sébastien Hinderer,
2364 Xavier Leroy, Nicolas Ojeda Bar)
2365
2366 - #1661: more precise principality warning regarding record fields
2367 disambiguation.
2368 (Thomas Refis, review by Leo White)
2369
2370 - #1687: fix bug in the printing of short functor types "(S1 -> S2) -> S3".
2371 (Pieter Goetschalckx, review by Gabriel Scherer)
2372
2373 - #1722: Scrape types in Typeopt.maybe_pointer.
2374 (Leo White, review by Thomas Refis)
2375
2376 - #1755: ensure that a bigarray is never collected while reading complex
2377 values.
2378 (Xavier Clerc, Mark Shinwell and Leo White, report by Chris Hardin,
2379 reviews by Stephen Dolan and Xavier Leroy)
2380
2381 - #1764: in byterun/memory.c, struct pool_block, use C99 flexible arrays
2382 if available.
2383 (Xavier Leroy, review by Max Mouratov)
2384
2385 - #1774: ocamlopt for ARM could generate VFP loads and stores with bad
2386 offsets, rejected by the assembler.
2387 (Xavier Leroy, review by Mark Shinwell)
2388
2389 - #1808: handle `[@inlined]` attributes under a module constraint.
2390 (Xavier Clerc, review by Leo White)
2391
2392 - #1810: use bit-pattern comparison when meeting float approximations.
2393 (Xavier Clerc, report by Christophe Troestler, review by Nicolás Ojeda Bär
2394 and Gabriel Scherer)
2395
2396 - #1835: Fix off-by-one errors in Weak.get_copy and Weak.blit.
2397 (KC Sivaramakrishnan)
2398
2399 - #1849: bug in runtime function generic_final_minor_update()
2400 that could lead to crashes when Gc.finalise_last is used.
2401 (report and fix by Yuriy Vostrikov, review by François Bobot)
2402
2403
2404 OCaml 4.06.1 (16 Feb 2018):
2405 ---------------------------
2406
2407 ### Bug fixes:
2408
2409 - #7661, #1459: fix faulty compilation of patterns
2410 using extensible variants constructors
2411 (Luc Maranget, review by Thomas Refis and Gabriel Scherer, report
2412 by Abdelraouf Ouadjaout and Thibault Suzanne)
2413
2414 - #7702, #1553: refresh raise counts when inlining a function
2415 (Vincent Laviron, Xavier Clerc, report by Cheng Sun)
2416
2417 - #7704, #1559: Soundness issue with private rows and pattern-matching
2418 (Jacques Garrigue, report by Jeremy Yallop, review by Thomas Refis)
2419
2420 - #7705, #1558: add missing bounds check in Bigarray.Genarray.nth_dim.
2421 (Nicolás Ojeda Bär, report by Jeremy Yallop, review by Gabriel Scherer)
2422
2423 - #7713, #1587: Make pattern matching warnings more robust
2424 to ill-typed columns; this is a backport of #1550 from 4.07+dev
2425 (Thomas Refis, review by Gabriel Scherer, report by Andreas Hauptmann)
2426
2427 - #1470: Don't commute negation with float comparison
2428 (Leo White, review by Xavier Leroy)
2429
2430 - #1538: Make pattern matching compilation more robust to ill-typed columns
2431 (Gabriel Scherer and Thomas Refis, review by Luc Maranget)
2432
2433 OCaml 4.06.0 (3 Nov 2017):
2434 --------------------------
2435
2436 (Changes that can break existing programs are marked with a "*")
2437
2438 ### Language features:
2439
2440 - #6271, #7529, #1249: Support "let open M in ..."
2441 in class expressions and class type expressions.
2442 (Alain Frisch, reviews by Thomas Refis and Jacques Garrigue)
2443
2444 - #792: fix limitations of destructive substitutions, by
2445 allowing "S with type t := type-expr",
2446 "S with type M.t := type-expr", "S with module M.N := path"
2447 (Valentin Gatien-Baron, review by Jacques Garrigue and Leo White)
2448
2449 * #1064, #1392: extended indexing operators, add a new class of
2450 user-defined indexing operators, obtained by adding at least
2451 one operator character after the dot symbol to the standard indexing
2452 operators: e,g ".%()", ".?[]", ".@{}<-":
2453 let ( .%() ) = List.nth in [0; 1; 2].%(1)
2454 After this change, functions or methods with an explicit polymorphic type
2455 annotation and of which the first argument is optional now requires a space
2456 between the dot and the question mark,
2457 e.g. "<f:'a.?opt:int->unit>" must now be written "<f:'a. ?opt:int->unit>".
2458 (Florian Angeletti, review by Damien Doligez and Gabriel Radanne)
2459
2460 - #1118: Support inherited field in object type expression
2461 type t = < m : int >
2462 type u = < n : int; t; k : int >
2463 (Runhang Li, review by Jeremy Yallop, Leo White, Jacques Garrigue,
2464 and Florian Angeletti)
2465
2466 * #1232: Support Unicode character escape sequences in string
2467 literals via the \u{X+} syntax. These escapes are substituted by the
2468 UTF-8 encoding of the Unicode character.
2469 (Daniel Bünzli, review by Damien Doligez, Alain Frisch, Xavier
2470 Leroy and Leo White)
2471
2472 - #1247: M.(::) construction for expressions
2473 and patterns (plus fix printing of (::) in the toplevel)
2474 (Florian Angeletti, review by Alain Frisch, Gabriel Scherer)
2475
2476 * #1252: The default mode is now safe-string, can be overridden
2477 at configure time or at compile time.
2478 (See #1386 below for the configure-time options)
2479 This breaks the code that uses the 'string' type as mutable
2480 strings (instead of Bytes.t, introduced by 4.02 in 2014).
2481 (Damien Doligez)
2482
2483 * #1253: Private extensible variants
2484 This change breaks code relying on the undocumented ability to export
2485 extension constructors for abstract type in signature. Briefly,
2486 module type S = sig
2487 type t
2488 type t += A
2489 end
2490 must now be written
2491 module type S = sig
2492 type t = private ..
2493 type t += A
2494 end
2495 (Leo White, review by Alain Frisch)
2496
2497 - #1333: turn off warning 40 by default
2498 (Constructor or label name used out of scope)
2499 (Leo White)
2500
2501 - #1348: accept anonymous type parameters in `with` constraints:
2502 S with type _ t = int
2503 (Valentin Gatien-Baron, report by Jeremy Yallop)
2504
2505 ### Type system
2506
2507 - #2642, #1225: unique names for weak type variables
2508 # ref [];;
2509 - : '_weak1 list ref = {contents = []}
2510 (Florian Angeletti, review by Frédéric Bour, Jacques Garrigue,
2511 Gabriel Radanne and Gabriel Scherer)
2512
2513 * #6738, #7215, #7231, #556: Add a new check that 'let rec'
2514 bindings are well formed.
2515 (Jeremy Yallop, reviews by Stephen Dolan, Gabriel Scherer, Leo
2516 White, and Damien Doligez)
2517
2518 - #1142: Mark assertions nonexpansive, so that 'assert false'
2519 can be used as a placeholder for a polymorphic function.
2520 (Stephen Dolan)
2521
2522 ### Standard library:
2523
2524 - #8223, #7309, #1026: Add update to maps. Allows to update a
2525 binding in a map or create a new binding if the key had no binding
2526 val update: key -> ('a option -> 'a option) -> 'a t -> 'a t
2527 (Sébastien Briais, review by Daniel Bünzli, Alain Frisch and
2528 Gabriel Scherer)
2529
2530 - #7515, #1147: Arg.align now optionally uses the tab character '\t' to
2531 separate the "unaligned" and "aligned" parts of the documentation string. If
2532 tab is not present, then space is used as a fallback. Allows to have spaces in
2533 the unaligned part, which is useful for Tuple options.
2534 (Nicolás Ojeda Bär, review by Alain Frisch and Gabriel Scherer)
2535
2536 * #615: Format, add symbolic formatters that output symbolic
2537 pretty-printing items. New fields have been added to the
2538 formatter_out_functions record, thus this change will break any code building
2539 such record from scratch.
2540 When building Format.formatter_out_functions values redefining the out_spaces
2541 field, "{ fmt_out_funs with out_spaces = f; }" should be replaced by
2542 "{ fmt_out_funs with out_spaces = f; out_indent = f; }" to maintain the old
2543 behavior.
2544 (Richard Bonichon and Pierre Weis, review by Alain Frisch, original request by
2545 Spiros Eliopoulos in #506)
2546
2547 * #943: Fixed the divergence of the Pervasives module between the stdlib
2548 and threads implementations. In rare circumstances this can change the
2549 behavior of existing applications: the implementation of Pervasives.close_out
2550 used when compiling with thread support was inconsistent with the manual.
2551 It will now not suppress exceptions escaping Pervasives.flush anymore.
2552 Developers who want the old behavior should use Pervasives.close_out_noerr
2553 instead. The stdlib implementation, used by applications not compiled
2554 with thread support, will now only suppress Sys_error exceptions in
2555 Pervasives.flush_all. This should allow exceedingly unlikely assertion
2556 exceptions to escape, which could help reveal bugs in the standard library.
2557 (Markus Mottl, review by Hezekiah M. Carty, Jeremie Dimino, Damien Doligez,
2558 Alain Frisch, Xavier Leroy, Gabriel Scherer and Mark Shinwell)
2559
2560 - #1034: List.init : int -> (int -> 'a) -> 'a list
2561 (Richard Degenne, review by David Allsopp, Thomas Braibant, Florian
2562 Angeletti, Gabriel Scherer, Nathan Moreau, Alain Frisch)
2563
2564 - #1091 Add the Uchar.{bom,rep} constants.
2565 (Daniel Bünzli, Alain Frisch)
2566
2567 - #1091: Add Buffer.add_utf_{8,16le,16be}_uchar to encode Uchar.t
2568 values to the corresponding UTF-X transformation formats in Buffer.t
2569 values.
2570 (Daniel Bünzli, review by Damien Doligez, Max Mouratov)
2571
2572 - #1175: Bigarray, add a change_layout function to each Array[N]
2573 submodules.
2574 (Florian Angeletti)
2575
2576 * #1306: In the MSVC and Mingw ports, "Sys.rename src dst" no longer fails if
2577 file "dst" exists, but replaces it with file "src", like in the other ports.
2578 (Xavier Leroy)
2579
2580 - #1314: Format, use the optional width information
2581 when formatting a boolean: "%8B", "%-8B" for example
2582 (Xavier Clerc, review by Gabriel Scherer)
2583
2584 - c9cc0f25138ce58e4f4e68c4219afe33e2a9d034: Resurrect tabulation boxes
2585 in module Format. Rewrite/extend documentation of tabulation boxes.
2586 (Pierre Weis)
2587
2588 ### Other libraries:
2589
2590 - #7564, #1211: Allow forward slashes in the target of symbolic links
2591 created by Unix.symlink under Windows.
2592 (Nicolás Ojeda Bär, review by David Allsopp)
2593
2594 * #7640, #1414: reimplementation of Unix.execvpe to fix issues
2595 with the 4.05 implementation. The main issue is that the current
2596 directory was always searched (last), even if the current directory
2597 is not listed in the PATH.
2598 (Xavier Leroy, report by Louis Gesbert and Arseniy Alekseyev,
2599 review by Ivan Gotovchits)
2600
2601 - #997, #1077: Deprecate Bigarray.*.map_file and add Unix.map_file as a
2602 first step towards moving Bigarray to the stdlib
2603 (Jérémie Dimino and Xavier Leroy)
2604
2605 * #1178: remove the Num library for arbitrary-precision arithmetic.
2606 It now lives as a separate project https://github.com/ocaml/num
2607 with an OPAM package called "num".
2608 (Xavier Leroy)
2609
2610 - #1217: Restrict Unix.environment in privileged contexts; add
2611 Unix.unsafe_environment.
2612 (Jeremy Yallop, review by Mark Shinwell, Nicolás Ojeda Bär,
2613 Damien Doligez and Hannes Mehnert)
2614
2615 - #1321: Reimplement Unix.isatty on Windows. It no longer returns true for
2616 the null device.
2617 (David Allsopp)
2618
2619 ### Compiler user-interface and warnings:
2620
2621 - #7361, #1248: support "ocaml.warning" in all attribute contexts, and
2622 arrange so that "ocaml.ppwarning" is correctly scoped by surrounding
2623 "ocaml.warning" attributes
2624 (Alain Frisch, review by Florian Angeletti and Thomas Refis)
2625
2626 - #7444, #1138: trigger deprecation warning when a "deprecated"
2627 attribute is hidden by signature coercion
2628 (Alain Frisch, report by bmillwood, review by Leo White)
2629
2630 - #7472: ensure .cmi files are created atomically,
2631 to avoid corruption of .cmi files produced simultaneously by a run
2632 of ocamlc and a run of ocamlopt.
2633 (Xavier Leroy, from a suggestion by Gerd Stolpmann)
2634
2635 * #7514, #1152: add -dprofile option, similar to -dtimings but
2636 also displays memory allocation and consumption.
2637 The corresponding addition of a new compiler-internal
2638 Profile module may affect some users of
2639 compilers-libs/ocamlcommon (by creating module conflicts).
2640 (Valentin Gatien-Baron, report by Gabriel Scherer)
2641
2642 - #7620, #1317: Typecore.force_delayed_checks does not run with -i option
2643 (Jacques Garrigue, report by Jun Furuse)
2644
2645 - #7624: handle warning attributes placed on let bindings
2646 (Xavier Clerc, report by dinosaure, review by Alain Frisch)
2647
2648 - #896: "-compat-32" is now taken into account when building .cmo/.cma
2649 (Hugo Heuzard)
2650
2651 - #948: the compiler now reports warnings-as-errors by prefixing
2652 them with "Error (warning ..):", instead of "Warning ..:" and
2653 a trailing "Error: Some fatal warnings were triggered" message.
2654 (Valentin Gatien-Baron, review by Alain Frisch)
2655
2656 - #1032: display the output of -dtimings as a hierarchy
2657 (Valentin Gatien-Baron, review by Gabriel Scherer)
2658
2659 - #1114, #1393, #1429: refine the (ocamlc -config) information
2660 on C compilers: the variables `{bytecode,native}_c_compiler` are deprecated
2661 (the distinction is now mostly meaningless) in favor of a single
2662 `c_compiler` variable combined with `ocaml{c,opt}_cflags`
2663 and `ocaml{c,opt}_cppflags`.
2664 (Sébastien Hinderer, Jeremy Yallop, Gabriel Scherer, review by
2665 Adrien Nader and David Allsopp)
2666
2667 * #1189: allow MSVC ports to use -l option in ocamlmklib
2668 (David Allsopp)
2669
2670 - #1332: fix ocamlc handling of "-output-complete-obj"
2671 (François Bobot)
2672
2673 - #1336: -thread and -vmthread option information is propagated to
2674 PPX rewriters.
2675 (Jun Furuse, review by Alain Frisch)
2676
2677 ### Code generation and optimizations:
2678
2679 - #5324, #375: An alternative Linear Scan register allocator for
2680 ocamlopt, activated with the -linscan command-line flag. This
2681 allocator represents a trade-off between worse generated code
2682 performance for higher compilation speed (especially interesting in
2683 some cases graph coloring is necessarily quadratic).
2684 (Marcell Fischbach and Benedikt Meurer, adapted by Nicolás Ojeda Bär, review
2685 by Nicolás Ojeda Bär and Alain Frisch)
2686
2687 - #6927, #988: On macOS, when compiling bytecode stubs, plugins,
2688 and shared libraries through -output-obj, generate dylibs instead of
2689 bundles.
2690 (whitequark)
2691
2692 - #7447, #995: incorrect code generation for nested recursive bindings
2693 (Leo White and Jeremy Yallop, report by Stephen Dolan)
2694
2695 - #7501, #1089: Consider arrays of length zero as constants
2696 when using Flambda.
2697 (Pierre Chambart, review by Mark Shinwell and Leo White)
2698
2699 - #7531, #1162: Erroneous code transformation at partial applications
2700 (Mark Shinwell)
2701
2702 - #7614, #1313: Ensure that inlining does not depend on the order
2703 of symbols (flambda)
2704 (Leo White, Xavier Clerc, report by Alex, review by Gabriel Scherer
2705 and Pierre Chambart)
2706
2707 - #7616, #1339: don't warn on mutation of zero size blocks.
2708 (Leo White)
2709
2710 - #7631, #1355: "-linscan" option crashes ocamlopt
2711 (Xavier Clerc, report by Paul Steckler)
2712
2713 - #7642, #1411: ARM port: wrong register allocation for integer
2714 multiply on ARMv4 and ARMv5; possible wrong register allocation for
2715 floating-point multiply and add on VFP and for floating-point
2716 negation and absolute value on soft FP emulation.
2717 (Xavier Leroy, report by Stéphane Glondu and Ximin Luo,
2718 review and additional sightings by Mark Shinwell)
2719
2720 * #659: Remove support for SPARC native code generation
2721 (Mark Shinwell)
2722
2723 - #850: Optimize away some physical equality
2724 (Pierre Chambart, review by Mark Shinwell and Leo White)
2725
2726 - #856: Register availability analysis
2727 (Mark Shinwell, Thomas Refis, review by Pierre Chambart)
2728
2729 - #1143: tweaked several allocation functions in the runtime by
2730 checking for likely conditions before unlikely ones and eliminating
2731 some redundant checks.
2732 (Markus Mottl, review by Alain Frisch, Xavier Leroy, Gabriel Scherer,
2733 Mark Shinwell and Leo White)
2734
2735 - #1183: compile curried functors to multi-argument functions
2736 earlier in the compiler pipeline; correctly propagate [@@inline]
2737 attributes on such functors; mark functor coercion veneers as
2738 stubs.
2739 (Mark Shinwell, review by Pierre Chambart and Leo White)
2740
2741 - #1195: Merge functions based on partiality rather than
2742 Parmatch.irrefutable.
2743 (Leo White, review by Thomas Refis, Alain Frisch and Gabriel Scherer)
2744
2745 - #1215: Improve compilation of short-circuit operators
2746 (Leo White, review by Frédéric Bour and Mark Shinwell)
2747
2748 - #1250: illegal ARM64 assembly code generated for large combined allocations
2749 (report and initial fix by Steve Walk, review and final fix by Xavier Leroy)
2750
2751 - #1271: Don't generate Ialloc instructions for closures that exceed
2752 Max_young_wosize; instead allocate them on the major heap. (Related
2753 to #1250.)
2754 (Mark Shinwell)
2755
2756 - #1294: Add a configure-time option to remove the dynamic float array
2757 optimization and add a floatarray type to let the user choose when to
2758 flatten float arrays. Note that float-only records are unchanged: they
2759 are still optimized by unboxing their fields.
2760 (Damien Doligez, review by Alain Frisch and Mark Shinwell)
2761
2762 - #1304: Mark registers clobbered by PLT stubs as destroyed across
2763 allocations.
2764 (Mark Shinwell, Xavier Clerc, report and initial debugging by
2765 Valentin Gatien-Baron)
2766
2767 - #1323: make sure that frame tables are generated in the data
2768 section and not in the read-only data section, as was the case
2769 before in the PPC and System-Z ports. This avoids relocations in
2770 the text segment of shared libraries and position-independent
2771 executables generated by ocamlopt.
2772 (Xavier Leroy, review by Mark Shinwell)
2773
2774 - #1330: when generating dynamically-linkable code on AArch64, always
2775 reference symbols (even locally-defined ones) through the GOT.
2776 (Mark Shinwell, review by Xavier Leroy)
2777
2778 ### Tools:
2779
2780 - #8395, #973: tools/check-symbol-names checks for globally
2781 linked names not namespaced with caml_
2782 (Stephen Dolan)
2783
2784 - #6928, #1103: ocamldoc, do not introduce an empty <h1> in index.html
2785 when no -title has been provided
2786 (Pierre Boutillier)
2787
2788 - #7048: ocamldoc, in -latex mode, don't escape Latin-1 accented letters
2789 (Xavier Leroy, report by Hugo Herbelin)
2790
2791 * #7351: ocamldoc, use semantic tags rather than <br> tags in the html
2792 backend
2793 (Florian Angeletti, request and review by Daniel Bünzli )
2794
2795 * #7352, #7353: ocamldoc, better paragraphs in html output
2796 (Florian Angeletti, request by Daniel Bünzli)
2797
2798 * #7363, #830: ocamldoc, start heading levels at {1 not {2 or {6.
2799 This change modifies the mapping between ocamldoc heading level and
2800 html heading level, breaking custom css style for ocamldoc.
2801 (Florian Angeletti, request and review by Daniel Bünzli)
2802
2803 * #7478, #1037: ocamldoc, do not use as a module preamble documentation
2804 comments that occur after the first module element. This change may break
2805 existing documentation. In particular, module preambles must now come before
2806 any `open` statement.
2807 (Florian Angeletti, review by David Allsopp and report by Daniel Bünzli)
2808
2809 - #7521, #1159: ocamldoc, end generated latex file with a new line
2810 (Florian Angeletti)
2811
2812 - #7575, #1219: Switch compilers from -no-keep-locs
2813 to -keep-locs by default: produced .cmi files will contain locations.
2814 This provides better error messages. Note that, as a consequence,
2815 .cmi digests now depend on the file path as given to the compiler.
2816 (Daniel Bünzli)
2817
2818 - #7610, #1346: caml.el (the Emacs editing mode) was cleaned up
2819 and made compatible with Emacs 25.
2820 (Stefan Monnier, Christophe Troestler)
2821
2822 - #7635, #1383: ocamldoc, add an identifier to module
2823 and module type elements
2824 (Florian Angeletti, review by Yawar Amin and Gabriel Scherer)
2825
2826 - #681, #1426: Introduce ocamltest, a new test driver for the
2827 OCaml compiler testsuite
2828 (Sébastien Hinderer, review by Damien Doligez)
2829
2830 - #1012: ocamlyacc, fix parsing of raw strings and nested comments, as well
2831 as the handling of ' characters in identifiers.
2832 (Demi Obenour)
2833
2834 - #1045: ocamldep, add a "-shared" option to generate dependencies
2835 for native plugin files (i.e. .cmxs files)
2836 (Florian Angeletti, suggestion by Sébastien Hinderer)
2837
2838 - #1078: add a subcommand "-depend" to "ocamlc" and "ocamlopt",
2839 to behave as ocamldep. Should be used mostly to replace "ocamldep" in the
2840 "boot" directory to reduce its size in the future.
2841 (Fabrice Le Fessant)
2842
2843 - #1036: ocamlcmt (tools/read_cmt) is installed, converts .cmt to .annot
2844 (Fabrice Le Fessant)
2845
2846 - #1180: Add support for recording numbers of direct and indirect
2847 calls over the lifetime of a program when using Spacetime profiling
2848 (Mark Shinwell)
2849
2850 - #1457, ocamldoc: restore label for exception in the latex backend
2851 (omitted since 4.04.0)
2852 (Florian Angeletti, review by Gabriel Scherer)
2853
2854 ### Toplevel:
2855
2856 - #7570: remove unusable -plugin option from the toplevel
2857 (Florian Angeletti)
2858
2859 - #1041: -nostdlib no longer ignored by toplevel.
2860 (David Allsopp, review by Xavier Leroy)
2861
2862 - #1231: improved printing of unicode texts in the toplevel,
2863 unless OCAMLTOP_UTF_8 is set to false.
2864 (Florian Angeletti, review by Daniel Bünzli, Xavier Leroy and
2865 Gabriel Scherer)
2866
2867 - #1688: Fix printing of -0.
2868 (Nicolás Ojeda Bär, review by Jérémie Dimino)
2869
2870 ### Runtime system:
2871
2872 * #3771, #153, #1200, #1357, #1362, #1363, #1369, #1398,
2873 #1446, #1448: Unicode support for the Windows runtime.
2874 (ygrek, Nicolás Ojeda Bär, review by Alain Frisch, David Allsopp, Damien
2875 Doligez)
2876
2877 * #7594, #1274, #1368: String_val now returns 'const char*', not
2878 'char*' when -safe-string is enabled at configure time. New macro Bytes_val
2879 for accessing bytes values.
2880 (Jeremy Yallop, reviews by Mark Shinwell and Xavier Leroy)
2881
2882 - #71: The runtime can now be shut down gracefully by means of the new
2883 caml_shutdown and caml_startup_pooled functions. The new 'c' flag in
2884 OCAMLRUNPARAM enables shutting the runtime properly on process exit.
2885 (Max Mouratov, review and discussion by Damien Doligez, Gabriel Scherer,
2886 Mark Shinwell, Thomas Braibant, Stephen Dolan, Pierre Chambart,
2887 François Bobot, Jacques Garrigue, David Allsopp, and Alain Frisch)
2888
2889 - #938, #1170, #1289: Stack overflow detection on 64-bit Windows
2890 (Olivier Andrieu, tweaked by David Allsopp)
2891
2892 - #1070, #1295: enable gcc typechecking for caml_alloc_sprintf,
2893 caml_gc_message. Make caml_gc_message a variadic function. Fix many
2894 caml_gc_message format strings.
2895 (Olivier Andrieu, review and 32bit fix by David Allsopp)
2896
2897 - #1073: Remove statically allocated compare stack.
2898 (Stephen Dolan)
2899
2900 - #1086: in Sys.getcwd, just fail instead of calling getwd()
2901 if HAS_GETCWD is not set.
2902 (Report and first fix by Sebastian Markbåge, final fix by Xavier Leroy,
2903 review by Mark Shinwell)
2904
2905 - #1269: Remove 50ms delay at exit for programs using threads
2906 (Valentin Gatien-Baron, review by Stephen Dolan)
2907
2908 * #1309: open files with O_CLOEXEC (or equivalent) in caml_sys_open, thus
2909 unifying the semantics between Unix and Windows and also eliminating race
2910 condition on Unix.
2911 (David Allsopp, report by Andreas Hauptmann)
2912
2913 - #1326: Enable use of CFI directives in AArch64 and ARM runtime
2914 systems' assembly code (asmrun/arm64.S). Add CFI directives to enable
2915 unwinding through [caml_c_call] and [caml_call_gc] with correct termination
2916 of unwinding at [main].
2917 (Mark Shinwell, review by Xavier Leroy and Gabriel Scherer, with thanks
2918 to Daniel Bünzli and Fu Yong Quah for testing)
2919
2920 - #1338: Add "-g" for bytecode runtime system compilation
2921 (Mark Shinwell)
2922
2923 * #1416, #1444: switch the Windows 10 Console to UTF-8 encoding.
2924 (David Allsopp, reviews by Nicolás Ojeda Bär and Xavier Leroy)
2925
2926 ### Manual and documentation:
2927
2928 - #6548: remove obsolete limitation in the description of private
2929 type abbreviations
2930 (Florian Angeletti, suggestion by Leo White)
2931
2932 - #6676, #1110: move record notation to tutorial
2933 (Florian Angeletti, review by Gabriel Scherer)
2934
2935 - #6676, #1112: move local opens to tutorial
2936 (Florian Angeletti)
2937
2938 - #6676, #1153: move overriding class definitions to reference
2939 manual and tutorial
2940 (Florian Angeletti)
2941
2942 - #6709: document the associativity and precedence level of
2943 pervasive operators
2944 (Florian Angeletti, review by David Allsopp)
2945
2946 - #7254, #1096: Rudimentary documentation of ocamlnat
2947 (Mark Shinwell)
2948
2949 - #7281, #1259: fix .TH macros in generated manpages
2950 (Olaf Hering)
2951
2952 - #7507: Align the description of the printf conversion
2953 specification "%g" with the ISO C90 description.
2954 (Florian Angeletti, suggestion by Armaël Guéneau)
2955
2956 - #7551, #1194 : make the final ";;" potentially optional in
2957 caml_example
2958 (Florian Angeletti, review and suggestion by Gabriel Scherer)
2959
2960 - #7588, #1291: make format documentation predictable
2961 (Florian Angeletti, review by Gabriel Radanne)
2962
2963 - #7604: Minor Ephemeron documentation fixes
2964 (Miod Vallat, review by Florian Angeletti)
2965
2966 - #594: New chapter on polymorphism troubles:
2967 weakly polymorphic types, polymorphic recursion,and higher-ranked
2968 polymorphism.
2969 (Florian Angeletti, review by Damien Doligez, Gabriel Scherer,
2970 and Gerd Stolpmann)
2971
2972 - #1187: Minimal documentation for compiler plugins
2973 (Florian Angeletti)
2974
2975 - #1202: Fix Typos in comments as well as basic grammar errors.
2976 (JP Rodi, review and suggestions by David Allsopp, Max Mouratov,
2977 Florian Angeletti, Xavier Leroy, Mark Shinwell and Damien Doligez)
2978
2979 - #1220: Fix "-keep-docs" option in ocamlopt manpage
2980 (Etienne Millon)
2981
2982 ### Compiler distribution build system:
2983
2984 - #6373, #1093: Suppress trigraph warnings from macOS assembler
2985 (Mark Shinwell)
2986
2987 - #7639, #1371: fix configure script for correct detection of
2988 int64 alignment on Mac OS X 10.13 (High Sierra) and above; fix bug in
2989 configure script relating to such detection.
2990 (Mark Shinwell, report by John Whitington, review by Xavier Leroy)
2991
2992 - #558: enable shared library and natdynlink support on more Linux
2993 platforms
2994 (Felix Janda, Mark Shinwell)
2995
2996 * #1104: remove support for the NeXTStep platform
2997 (Sébastien Hinderer)
2998
2999 - #1130: enable detection of IBM XL C compiler (one need to run configure
3000 with "-cc <path to xlc compiler>"). Enable shared library support for
3001 bytecode executables on AIX/xlc (tested on AIX 7.1, XL C 12).
3002 To enable 64-bit, run both "configure" and "make world" with OBJECT_MODE=64.
3003 (Konstantin Romanov, Enrique Naudon)
3004
3005 - #1203: speed up the manual build by using ocamldoc.opt
3006 (Gabriel Scherer, review by Florian Angeletti)
3007
3008 - #1214: harden config/Makefile against '#' characters in PREFIX
3009 (Gabriel Scherer, review by David Allsopp and Damien Doligez)
3010
3011 - #1216: move Compplugin and friends from BYTECOMP to COMP
3012 (Leo White, review by Mark Shinwell)
3013
3014 * #1242: disable C plugins loading by default
3015 (Alexey Egorov)
3016
3017 - #1275: correct configure test for Spacetime availability
3018 (Mark Shinwell)
3019
3020 - #1278: discover presence of <sys/shm.h> during configure for afl runtime
3021 (Hannes Mehnert)
3022
3023 - #1386: provide configure-time options to fine-tune the safe-string
3024 options and default settings changed by #1252.
3025
3026 The previous configure option -safe-string is now
3027 renamed -force-safe-string.
3028
3029 At configure-time, -force-safe-string forces all module to use
3030 immutable strings (this disables the per-file, compile-time
3031 -unsafe-string option). The new default-(un)safe-string options
3032 let you set the default choice for the per-file compile-time
3033 option. (The new #1252 behavior corresponds to having
3034 -default-safe-string, while 4.05 and older had
3035 -default-unsafe-string).
3036
3037 (Gabriel Scherer, review by Kate Deplaix and Damien Doligez)
3038
3039 - #1409: Fix to enable NetBSD/powerpc to work.
3040 (Håvard Eidnes)
3041
3042 ### Internal/compiler-libs changes:
3043
3044 - #6826, #828, #834: improve compilation time for open
3045 (Alain Frisch, review by Frédéric Bour and Jacques Garrigue)
3046
3047 - #7127, #454, #1058: in toplevel, print bytes and strip
3048 strings longer than the size specified by the "print_length" directive
3049 (Fabrice Le Fessant, initial PR by Junsong Li)
3050
3051 - #406: remove polymorphic comparison for Types.constructor_tag in compiler
3052 (Dwight Guth, review by Gabriel Radanne, Damien Doligez, Gabriel Scherer,
3053 Pierre Chambart, Mark Shinwell)
3054
3055 - #1119: Change Set (private) type to inline records.
3056 (Albin Coquereau)
3057
3058 * #1127: move config/{m,s}.h to byterun/caml and install them.
3059 User code should not have to include them directly since they are
3060 included by other header files.
3061 Previously {m,s}.h were not installed but they were substituted into
3062 caml/config.h; they are now just #include-d by this file. This may
3063 break some scripts relying on the (unspecified) presence of certain
3064 #define in config.h instead of m.h and s.h -- they can be rewritten
3065 to try to grep those files if they exist.
3066 (Sébastien Hinderer)
3067
3068 - #1281: avoid formatter flushes inside exported printers in Location
3069 (Florian Angeletti, review by Gabriel Scherer)
3070
3071 ### Bug fixes:
3072
3073 - #5927: Type equality broken for conjunctive polymorphic variant tags
3074 (Jacques Garrigue, report by Leo White)
3075
3076 - #6329, #1437: Introduce padding word before "data_end" symbols
3077 to ensure page table tests work correctly on an immediately preceding
3078 block of zero size.
3079 (Mark Shinwell, review by Xavier Leroy)
3080
3081 - #6587: only elide Pervasives from printed type paths in unambiguous context
3082 (Florian Angeletti and Jacques Garrigue)
3083
3084 - #6934: nonrec misbehaves with GADTs
3085 (Jacques Garrigue, report by Markus Mottl)
3086
3087 - #7070, #1139: Unexported values can cause non-generalisable variables
3088 error
3089 (Leo White)
3090
3091 - #7261: Warn on type constraints in GADT declarations
3092 (Jacques Garrigue, report by Fabrice Le Botlan)
3093
3094 - #7321: Private type in signature clashes with type definition via
3095 functor instantiation
3096 (Jacques Garrigue, report by Markus Mottl)
3097
3098 - #7372, #834: fix type-checker bug with GADT and inline records
3099 (Alain Frisch, review by Frédéric Bour and Jacques Garrigue)
3100
3101 - #7344: Inconsistent behavior with type annotations on let
3102 (Jacques Garrigue, report by Leo White)
3103
3104 - #7468: possible GC problem in caml_alloc_sprintf
3105 (Xavier Leroy, discovery by Olivier Andrieu)
3106
3107 - #7496: Fixed conjunctive polymorphic variant tags do not unify
3108 with themselves
3109 (Jacques Garrigue, report by Leo White)
3110
3111 - #7506: pprintast ignores attributes in tails of a list
3112 (Alain Frisch, report by Kenichi Asai and Gabriel Scherer)
3113
3114 - #7513: List.compare_length_with mishandles negative numbers / overflow
3115 (Fabrice Le Fessant, report by Jeremy Yallop)
3116
3117 - #7519: Incorrect rejection of program due to faux scope escape
3118 (Jacques Garrigue, report by Markus Mottl)
3119
3120 - #7540, #1179: Fixed setting of breakpoints within packed modules
3121 for ocamldebug
3122 (Hugo Herbelin, review by Gabriel Scherer, Damien Doligez)
3123
3124 - #7543: short-paths printtyp can fail on packed type error messages
3125 (Florian Angeletti)
3126
3127 - #7553, #1191: Prevent repeated warnings with recursive modules.
3128 (Leo White, review by Josh Berdine and Alain Frisch)
3129
3130 - #7563, #1210: code generation bug when a module alias and
3131 an extension constructor have the same name in the same module
3132 (Gabriel Scherer, report by Manuel Fähndrich,
3133 review by Jacques Garrigue and Leo White)
3134
3135 - #7591, #1257: on x86-64, frame table is not 8-aligned
3136 (Xavier Leroy, report by Mantis user "voglerr", review by Gabriel Scherer)
3137
3138 - #7601, #1320: It seems like a hidden non-generalized type variable
3139 remains in some inferred signatures, which leads to strange errors
3140 (Jacques Garrigue, report by Mandrikin)
3141
3142 - #7609: use-after-free memory corruption if a program debugged
3143 under ocamldebug calls Pervasives.flush_all
3144 (Xavier Leroy, report by Paul Steckler, review by Gabriel Scherer)
3145
3146 - #7612, #1345: afl-instrumentation bugfix for classes.
3147 (Stephen Dolan, review by Gabriel Scherer and David Allsopp)
3148
3149 - #7617, #7618, #1318: Ambiguous (mistakenly) type escaping the
3150 scope of its equation
3151 (Jacques Garrigue, report by Thomas Refis)
3152
3153 - #7619, #1387: position of the optional last semi-column not included
3154 in the position of the expression (same behavior as for lists)
3155 (Christophe Raffalli, review by Gabriel Scherer)
3156
3157 - #7638: in the Windows Mingw64 port, multithreaded programs compiled
3158 to bytecode could crash when raising an exception from C code.
3159 This looks like a Mingw64 issue, which we work around with GCC builtins.
3160 (Xavier Leroy)
3161
3162 - #7656, #1423: false 'unused type/constructor/value' alarms
3163 in the 4.06 development version
3164 (Alain Frisch, review by Jacques Garrigue, report by Kate Deplaix)
3165
3166 - #7657, #1424: ensures correct call-by-value semantics when
3167 eta-expanding functions to eliminate optional arguments
3168 (Alain Frisch, report by sliquister, review by Leo White and Jacques
3169 Garrigue)
3170
3171 - #7658, #1439: Fix Spacetime runtime system compilation with
3172 -force-safe-string
3173 (Mark Shinwell, report by Christoph Spiel, review by Gabriel Scherer)
3174
3175 - #1155: Fix a race condition with WAIT_NOHANG on Windows
3176 (Jérémie Dimino and David Allsopp)
3177
3178 - #1199: Pretty-printing formatting cleanup in pprintast
3179 (Ethan Aubin, suggestion by Gabriel Scherer, review by David Allsopp,
3180 Florian Angeletti, and Gabriel Scherer)
3181
3182 - #1223: Fix corruption of the environment when using -short-paths
3183 with the toplevel.
3184 (Leo White, review by Alain Frisch)
3185
3186 - #1243: Fix pprintast for #... infix operators
3187 (Alain Frisch, report by Omar Chebib)
3188
3189 - #1324: ensure that flambda warning are printed only once
3190 (Xavier Clerc)
3191
3192 - #1329: Prevent recursive polymorphic variant names
3193 (Jacques Garrigue, fix suggested by Leo White)
3194
3195 - #1308: Only treat pure patterns as inactive
3196 (Leo White, review by Alain Frisch and Gabriel Scherer)
3197
3198 - #1390: fix the [@@unboxed] type check to accept parametrized types
3199 (Leo White, review by Damien Doligez)
3200
3201 - #1407: Fix raw_spacetime_lib
3202 (Leo White, review by Gabriel Scherer and Damien Doligez)
3203
3204 OCaml 4.05.0 (13 Jul 2017):
3205 ---------------------------
3206
3207 (Changes that can break existing programs are marked with a "*")
3208
3209 ### Language features:
3210
3211 ### Code generation and optimizations:
3212
3213 - #7201, #954: Correct wrong optimisation of "0 / <expr>"
3214 and "0 mod <expr>" in the case when <expr> was a non-constant
3215 evaluating to zero
3216 (Mark Shinwell, review by Gabriel Scherer, Leo White and Xavier Leroy)
3217
3218 - #7357, #832: Improve compilation time for toplevel
3219 include(struct ... end : sig ... end)
3220 (Alain Frisch, report by Hongbo Zhang, review by Jacques Garrigue)
3221
3222 - #7533, #1173: Correctly perform side effects for certain
3223 cases of "/" and "mod"
3224 (Mark Shinwell, report by Jan Mitgaard)
3225
3226 - #504: Instrumentation support for fuzzing with afl-fuzz.
3227 (Stephen Dolan, review by Alain Frisch, Pierre Chambart, Mark
3228 Shinwell, Gabriel Scherer and Damien Doligez)
3229
3230 - #863, #1068, #1069: Optimise matches with constant
3231 results to lookup tables.
3232 (Stephen Dolan, review by Gabriel Scherer, Pierre Chambart,
3233 Mark Shinwell, and bug report by Gabriel Scherer)
3234
3235 - #1150: Fix typo in arm64 assembler directives
3236 (KC Sivaramakrishnan)
3237
3238 ### Runtime system:
3239
3240 - #2784, #953: Add caml_startup_exn
3241 (Mark Shinwell)
3242
3243 - #7423, #946: expose new exception-raising functions
3244 `void caml_{failwith,invalid_argument}_value(value msg)`
3245 in addition to
3246 `void caml_{failwith,invalid_argument}(char const *msg)`.
3247 The previous functions would not free their message argument, so
3248 were inconvient for dynamically-allocated messages; the messages
3249 passed to the new functions are handled by the garbage collector.
3250 (Gabriel Scherer, review by Mark Shinwell, request by Immanuel Litzroth)
3251
3252 - #7557, #1213: More security for getenv
3253 (Damien Doligez, reports by Seth Arnold and Eric Milliken, review by
3254 Xavier Leroy, David Allsopp, Stephen Dolan, Hannes Mehnert)
3255
3256 - #795: remove 256-character limitation on Sys.executable_name
3257 (Xavier Leroy)
3258
3259 - #891: Use -fno-builtin-memcmp when building runtime with gcc.
3260 (Leo White)
3261
3262 ### Type system:
3263
3264 - #6608, #901: unify record types when overriding all fields
3265 (Tadeu Zagallo and Gabriel Scherer, report by Jeremy Yallop,
3266 review by David Allsopp, Jacques Garrigue)
3267
3268 * #7414, #929: Soundness bug with non-generalized type variables and
3269 functors.
3270 (compatibility: some code using module-global mutable state will
3271 fail at compile-time and is fixed by adding extra annotations;
3272 see the Mantis and Github discussions.)
3273 (Jacques Garrigue, report by Leo White)
3274
3275 ### Compiler user-interface and warnings:
3276
3277 - #7050, #748 #843 #864: new `-args/-args0 <file>` parameters to
3278 provide extra command-line arguments in a file -- see documentation.
3279 User programs may implement similar options using the new `Expand`
3280 constructor of the `Arg` module.
3281 (Bernhard Schommer, review by Jérémie Dimino, Gabriel Scherer
3282 and Damien Doligez, discussion with Alain Frisch and Xavier Leroy,
3283 feature request from the Coq team)
3284
3285 - #7137, #960: "-open" command line flag now accepts
3286 a module path (not a module name)
3287 (Arseniy Alekseyev and Leo White)
3288
3289 - #7172, #970: add extra (ocamlc -config) options
3290 int_size, word_size, ext_exe
3291 (Gabriel Scherer, request by Daniel Bünzli)
3292
3293 - #7315, #736: refine some error locations
3294 (Gabriel Scherer and Alain Frisch, report by Matej Košík)
3295
3296 - #7473, #1025: perform proper globbing for command-line arguments on
3297 Windows
3298 (Jonathan Protzenko)
3299
3300 - #7479: make sure "ocamlc -pack" is only given .cmo and .cmi files,
3301 and that "ocamlopt -pack" is only given .cmx and .cmi files.
3302 (Xavier Leroy)
3303
3304 - #796: allow compiler plugins to declare their own arguments.
3305 (Fabrice Le Fessant)
3306
3307 - #829: better error when opening a module aliased to a functor
3308 (Alain Frisch)
3309
3310 - #911: ocamlc/ocamlopt do not pass warnings-related options to C
3311 compiler when called to compile third-party C source files
3312 (Sébastien Hinderer, review by Adrien Nader and David Allsopp)
3313
3314 - #915: fix -dsource (pprintast.ml) bugs
3315 (Runhang Li, review by Alain Frisch)
3316
3317 * #933: ocamlopt -p now reports an error on platforms that do not
3318 support profiling with gprof; dummy profiling libraries are no longer
3319 installed on such platforms.
3320 This can be tested with ocamlopt -config
3321 (Sébastien Hinderer)
3322
3323 - #1009: "ocamlc -c -linkall" and "ocamlopt -c -linkall" can now be used
3324 to set the "always link" flag on individual compilation units. This
3325 controls linking with finer granularity than "-a -linkall", which sets
3326 the "always link" flag on all units of the given library.
3327 (Xavier Leroy)
3328
3329 - #1015: add option "-plugin PLUGIN" to ocamldep too. Use compilerlibs
3330 to build ocamldep. Add option "-depend" to ocamlc/ocamlopt to behave
3331 as ocamldep. Remove any use of ocamldep to build the distribution.
3332 (Fabrice Le Fessant)
3333
3334 - #1027: various improvements to -dtimings, mostly including time
3335 spent in subprocesses like preprocessors
3336 (Valentin Gatien-Baron, review by Gabriel Scherer)
3337
3338 - #1098: the compiler now takes the boolean "OCAML_COLOR" environment
3339 variable into account if "-color" is not provided. This allows users
3340 to override the default behaviour without modifying invocations of ocaml
3341 manually.
3342 (Hannes Mehnert, Guillaume Bury,
3343 review by Daniel Bünzli, Gabriel Scherer, Damien Doligez)
3344
3345 ### Standard library:
3346
3347 - #6975, #902: Truncate function added to stdlib Buffer module
3348 (Dhruv Makwana, review by Alain Frisch and Gabriel Scherer)
3349
3350 - #7279, #710: `Weak.get_copy` `Ephemeron.*_copy` doesn't copy
3351 custom blocks anymore
3352 (François Bobot, Alain Frisch, bug reported by Martin R. Neuhäußer,
3353 review by Thomas Braibant and Damien Doligez)
3354
3355 * #7500, #1081: Remove Uchar.dump
3356 (Daniel Bünzli)
3357
3358 - #760: Add a functions List.compare_lengths and
3359 List.compare_length_with to avoid full list length computations
3360 (Fabrice Le Fessant, review by Leo White, Josh Berdine and Gabriel Scherer)
3361
3362 - #778: Arg: added option Expand that allows to expand a string
3363 argument to a string array of new arguments
3364 (Bernhard Schommer, review by Gabriel Scherer and Jérémie Dimino)
3365
3366 - #849: Expose a Spacetime.enabled value
3367 (Leo White)
3368
3369 - #885: Option-returning variants of stdlib functions
3370 (Alain Frisch, review by David Allsopp and Bart Jacobs)
3371
3372 - #869: Add find_first, find_first_opt, find_last, find_last_opt to
3373 maps and sets. Find the first or last binding or element
3374 satisfying a monotonic predicate.
3375 (Gabriel de Perthuis, with contributions from Alain Frisch, review by
3376 Hezekiah M. Carty and Simon Cruanes, initial report by Gerd Stolpmann)
3377
3378 - #875: Add missing functions to ArrayLabels, BytesLabels,
3379 ListLabels, MoreLabels, StringLabels so they are compatible with
3380 non-labeled counterparts. Also add missing @@ocaml.deprecated attributes
3381 in StringLabels and BytesLabels.
3382 (Roma Sokolov, review by Gabriel Scherer, Jacques Garrigue,
3383 Gabriel Radanne, Alain Frisch)
3384
3385 - #999: Arg, do not repeat the usage message thrice when reporting an error
3386 (this was a regression in 4.03)
3387 (Florian Angeletti, review by Gabriel Scherer)
3388
3389 - #1042: Fix escaping of command-line arguments in
3390 Unix.create_process{,_env} under Windows. Arguments with tabs should now
3391 be received verbatim by the child process.
3392 (Nicolás Ojeda Bär, Andreas Hauptmann review by Xavier Leroy)
3393
3394 ### Debugging and profiling:
3395
3396 - #7258: ocamldebug's "install_printer" command had problems with
3397 module aliases
3398 (Xavier Leroy)
3399
3400 - #378: Add [Printexc.raise_with_backtrace] to raise an exception using
3401 an explicit backtrace
3402 (François Bobot, review by Gabriel Scherer, Xavier Leroy, Damien Doligez,
3403 Frédéric Bour)
3404
3405 ### Manual and documentation:
3406
3407 - #6597, #1030: add forward references to language extensions
3408 that extend non-terminal symbols in the language reference section.
3409 (Florian Angeletti, review by Gabriel Scherer)
3410
3411 - #7497, #1095: manual, enable numbering for table of contents
3412 (Florian Angeletti, request by Daniel Bünzli)
3413
3414 - #7539, #1181: manual, update dead links in ocamldoc chapter
3415 (Florian Angeletti)
3416
3417 - #633: manpage and manual documentation for the `-opaque` option
3418 (Konstantin Romanov, Gabriel Scherer, review by Mark Shinwell)
3419
3420 - #751, #925: add a HACKING.adoc file to contain various
3421 tips and tricks for people hacking on the repository. See also
3422 CONTRIBUTING.md for advice on sending contributions upstream.
3423 (Gabriel Scherer and Gabriel Radanne, review by David Allsopp,
3424 inspired by John Whitington)
3425
3426 - #916: new tool lintapidiff, use it to update the manual with
3427 @since annotations for API changes introduced between 4.00-4.05.
3428 (Edwin Török, review by Gabriel Scherer, discussion with Alain Frisch,
3429 David Allsopp, Sébastien Hinderer, Damien Doligez and Xavier Leroy)
3430
3431 - #939: activate the caml_example environment in the language
3432 extensions section of the manual. Convert some existing code
3433 examples to this format.
3434 (Florian Angeletti)
3435
3436 - #1082: clarify that the use of quoted string for preprocessed
3437 foreign quotations still requires the use of an extension node
3438 [%foo ...] to mark non-standard interpretation.
3439 (Gabriel Scherer, request by Matthew Wahab in #1066,
3440 review by Florian Angeletti)
3441
3442 ### Other libraries:
3443
3444 - #7158: Event.sync, Mutex.create, Condition.create cause too many GCs.
3445 The fix is to no longer consider mutexes and condition variables
3446 as rare kernel resources.
3447 (Xavier Leroy)
3448
3449 - #7264: document the different behaviors of Unix.lockf under POSIX
3450 and under Win32.
3451 (Xavier Leroy, report by David Allsopp)
3452
3453 - #7339, #787: Support the '0 dimension' case for bigarrays
3454 (see Bigarray documentation)
3455 (Laurent Mazare,
3456 review by Gabriel Scherer, Alain Frisch and Hezekiah M. Carty)
3457
3458 * #7342, #797: fix Unix.read on pipes with no data left on Windows
3459 it previously raised an EPIPE error, it now returns 0 like other OSes
3460 (Jonathan Protzenko, review by Andreas Hauptmann and Damien Doligez)
3461
3462 - #650: in the Unix library, add `?cloexec:bool` optional arguments to
3463 functions that create file descriptors (`dup`, `dup2`, `pipe`, `socket`,
3464 `socketpair`, `accept`). Implement these optional arguments in the
3465 most atomic manner provided by the operating system to set (or clear)
3466 the close-on-exec flag at the same time the file descriptor is created,
3467 reducing the risk of race conditions with `exec` or `create_process`
3468 calls running in other threads, and improving security. Also: add a
3469 `O_KEEPEXEC` flag for `openfile` by symmetry with `O_CLOEXEC`.
3470 (Xavier Leroy, review by Mark Shinwell, David Allsopp and Alain Frisch,
3471 request by Romain Beauxis)
3472
3473 - #996: correctly update caml_top_of_stack in systhreads
3474 (Fabrice Le Fessant)
3475
3476 - #997, #1077: Deprecate Bigarray.*.map_file and add Unix.map_file as a
3477 first step towards moving Bigarray to the stdlib
3478 (Jérémie Dimino and Xavier Leroy)
3479
3480 ### Toplevel:
3481
3482 - #7060, #1035: Print exceptions in installed custom printers
3483 (Tadeu Zagallo, review by David Allsopp)
3484
3485 ### Tools:
3486
3487 - #5163: ocamlobjinfo, dump globals defined by bytecode executables
3488 (Stéphane Glondu)
3489
3490 - #7333: ocamldoc, use the first sentence of text file as
3491 a short description in overviews.
3492 (Florian Angeletti)
3493
3494 - #848: ocamldoc, escape link targets in HTML output
3495 (Etienne Millon, review by Gabriel Scherer, Florian Angeletti and
3496 Daniel Bünzli)
3497
3498 - #986: ocamldoc, use relative paths in error message
3499 to solve ocamlbuild+doc usability issue (ocaml/ocamlbuild#79)
3500 (Gabriel Scherer, review by Florian Angeletti, discussion with Daniel Bünzli)
3501
3502 - #1017: ocamldoc, add an option to detect code fragments that could be
3503 transformed into a cross-reference to a known element.
3504 (Florian Angeletti, review and suggestion by David Allsopp)
3505
3506 - clarify ocamldoc text parsing error messages
3507 (Gabriel Scherer)
3508
3509 ### Compiler distribution build system:
3510
3511 - #7377: remove -std=gnu99 for newer gcc versions
3512 (Damien Doligez, report by ygrek)
3513
3514 - #7452, #1228: tweak GCC options to try to avoid the
3515 Skylake/Kaby lake bug
3516 (Damien Doligez, review by David Allsopp, Xavier Leroy and Mark Shinwell)
3517
3518 - #693: fail on unexpected errors or warnings within caml_example
3519 environment.
3520 (Florian Angeletti)
3521
3522 - #803: new ocamllex-based tool to extract bytecode compiler
3523 opcode information from C headers.
3524 (Nicolás Ojeda Bär)
3525
3526 - #827: install missing mli and cmti files, new make target
3527 install-compiler-sources for installation of compiler-libs ml files
3528 (Hendrik Tews)
3529
3530 - #887: allow -with-frame-pointers if clang is used as compiler on Linux
3531 (Bernhard Schommer)
3532
3533 - #898: fix locale-dependence of primitive list order,
3534 detected through reproducible-builds.org.
3535 (Hannes Mehnert, review by Gabriel Scherer and Ximin Luo)
3536
3537 - #907: Remove unused variable from the build system
3538 (Sébastien Hinderer, review by whitequark, Gabriel Scherer, Adrien Nader)
3539
3540 - #911: Clarify the use of C compiler related variables in the build system.
3541 (Sébastien Hinderer, review by Adrien Nader, Alain Frisch, David Allsopp)
3542
3543 - #919: use clang as preprocessor assembler if clang is used as compiler
3544 (Bernhard Schommer)
3545
3546 - #927: improve the detection of hashbang support in the configure script
3547 (Armaël Guéneau)
3548
3549 - #932: install ocaml{c,lex}->ocaml{c,lex}.byte symlink correctly
3550 when the opt target is built but opt.opt target is not.
3551 (whitequark, review by Gabriel Scherer)
3552
3553 - #935: allow build in Android's termux
3554 (ygrek, review by Gabriel Scherer)
3555
3556 - #984: Fix compilation of compiler distribution when Spacetime
3557 enabled
3558 (Mark Shinwell)
3559
3560 - #991: On Windows, fix installation when native compiler is not
3561 built
3562 (Sébastien Hinderer, review by David Allsopp)
3563
3564 - #1033: merge Unix and Windows build systems in the root directory
3565 (Sébastien Hinderer, review by Damien Doligez and Adrien Nader)
3566
3567 - #1047: Make .depend files generated for C sources more portable
3568 (Sébastien Hinderer, review by Xavier Leroy and David Allsopp)
3569
3570 - #1076: Simplify ocamlyacc's build system
3571 (Sébastien Hinderer, review by David Allsopp)
3572
3573 ### Compiler distribution build system: Makefile factorization
3574
3575 The compiler distribution build system (the set of Makefiles used to
3576 build the compiler distribution) traditionally had separate Makefiles
3577 for Unix and Windows, which lead to some amount of duplication and
3578 subtle differences and technical debt in general -- for people working
3579 on the compiler distribution, but also cross-compilation or porting to
3580 new systems. During the 4.05 development period, Sébastien Hinderer
3581 worked on harmonizing the build rules and merging the two build
3582 systems.
3583
3584 * Some changes were made to the config/Makefile file which
3585 is exported as $(ocamlc -where)/Makefile.config, and on
3586 which some advanced users might rely. The changes are
3587 as follows:
3588 - a BYTERUN variable was added that points to the installed ocamlrun
3589 - the PARTIALLD variable was removed (PACKLD is more complete)
3590 - the always-empty DLLCCCOMPOPTS was removed
3591 - the SHARED variable was removed; its value is "shared" or "noshared",
3592 which duplicates the existing and more convenient
3593 SUPPORTS_SHARED_LIBRARIES variable whose value is "true" or "false".
3594
3595 Note that Makefile.config may change further in the future and relying
3596 on it is a bit fragile. We plan to make `ocamlc -config` easier to use
3597 for scripting purposes, and have a stable interface there. If you rely
3598 on Makefile.config, you may want to get in touch with Sébastien Hinderer
3599 or participate to #7116 (Allow easy retrieval of Makefile.config's values)
3600 or #7172 (More information in ocamlc -config).
3601
3602 The complete list of changes is listed below.
3603
3604 - #705: update Makefile.nt so that ocamlnat compiles
3605 for non-Cygwin Windows ports.
3606 (Sébastien Hinderer, review by Alain Frisch)
3607
3608 - #729: Make sure ocamlnat is built with a $(EXE) extension, merge
3609 rules between Unix and Windows Makefiles
3610 (Sébastien Hinderer, review by Alain Frisch)
3611
3612 - #762: Merge build systems in the yacc/ directory.
3613 (Sébastien Hinderer, review by David Allsopp, Alain Frisch)
3614
3615 - #764: Merge build systems in the debugger/ directory.
3616 (Sébastien Hinderer, review by Alain Frisch)
3617
3618 - #785: Merge build systems in otherlibs/systhreads/
3619 (Sébastien Hinderer, review by Alain Frisch, David Allsopp,
3620 testing and regression fix by Jérémie Dimino)
3621
3622 - #788: Merge build systems in subdirectories of otherlibs/.
3623 (Sébastien Hinderer, review by Alain Frisch)
3624
3625 - #808, #906: Merge Unix and Windows build systems
3626 in the ocamldoc/ directory
3627 (Sébastien Hinderer, review by Alain Frisch)
3628
3629 - #812: Merge build systems in the tools/ subdirectory
3630 (Sébastien Hinderer, review by Alain Frisch)
3631
3632 - #866: Merge build systems in the stdlib/ directory
3633 (Sébastien Hinderer, review by David Allsopp and Adrien Nader)
3634
3635 - #941: Merge Unix and Windows build systems in the asmrun/ directory
3636 (Sébastien Hinderer, review by Mark Shinwell, Adrien Nader,
3637 Xavier Leroy, David Allsopp, Damien Doligez)
3638
3639 - #981: Merge build systems in the byterun/ directory
3640 (Sébastien Hinderer, review by Adrien Nader)
3641
3642 - #1033, #1048: Merge build systems in the root directory
3643 (Sébastien Hinderer, review by Adrien Nader and Damien Doligez,
3644 testing and regression fix by Andreas Hauptmann)
3645
3646 ### Internal/compiler-libs changes:
3647
3648 - #673: distinguish initialization of block fields from mutation in lambda.
3649 (Frédéric Bour, review by Xavier Leroy, Stephen Dolan and Mark Shinwell)
3650
3651 - #744, #781: fix duplicate self-reference in imported cmi_crcs
3652 list in .cmti files + avoid rebuilding cmi_info record when creating
3653 .cmti files
3654 (Alain Frisch, report by Daniel Bünzli, review by Jérémie Dimino)
3655
3656 - #881: change `Outcometree.out_variant` to be more general.
3657 `Ovar_name of out_ident * out_type list` becomes `Ovar_type of out_type`.
3658 (Valentin Gatien-Baron, review by Leo White)
3659
3660 - #908: refactor PIC-handling in the s390x backend
3661 (Gabriel Scherer, review by Xavier Leroy and Mark Shinwell)
3662
3663 ### Bug fixes:
3664
3665 - #5115: protect all byterun/fail.c functions against
3666 uninitialized caml_global_data (only changes the bytecode behavior)
3667 (Gabriel Scherer, review by Xavier Leroy)
3668
3669 - #6136, #967: Fix Closure so that overapplication evaluation order
3670 matches the bytecode compiler and Flambda.
3671 (Mark Shinwell, report by Jeremy Yallop, review by Frédéric Bour)
3672
3673 - #6550, #1094: Allow creation of empty .cmxa files on macOS
3674 (Mark Shinwell)
3675
3676 - #6594, #955: Remove "Istore_symbol" specific operation on x86-64.
3677 This is more robust and in particular avoids assembly failures on Win64.
3678 (Mark Shinwell, review by Xavier Leroy, testing by David Allsopp and
3679 Olivier Andrieu)
3680
3681 - #6903: Unix.execvpe doesn't change environment on Cygwin
3682 (Xavier Leroy, report by Adrien Nader)
3683
3684 - #6987: Strange error message probably caused by
3685 universal variable escape (with polymorphic variants)
3686 (Jacques Garrigue, report by Mikhail Mandrykin and Leo White)
3687
3688 - #7216, #949: don't require double parens in Functor((val x))
3689 (Jacques Garrigue, review by Valentin Gatien-Baron)
3690
3691 - #7331: ocamldoc, avoid infinite loop in presence of self alias,
3692 i.e. module rec M:sig end = M
3693 (Florian Angeletti, review Gabriel Scherer)
3694
3695 - #7346, #966: Fix evaluation order problem whereby expressions could
3696 be incorrectly re-ordered when compiling with Flambda. This also fixes one
3697 example of evaluation order in the native code compiler not matching the
3698 bytecode compiler (even when not using Flambda)
3699 (Mark Shinwell, Leo White, code review by Pierre Chambart)
3700
3701 - #7348: Private row variables can escape their scope
3702 (Jacques Garrigue, report by Leo White)
3703
3704 - #7407: Two not-quite-standard C idioms rejected by SUNWSPro compilers
3705 (Xavier Leroy)
3706
3707 - #7421: Soundness bug with GADTs and lazy
3708 (Jacques Garrigue, report by Leo White)
3709
3710 - #7424: Typechecker diverges on unboxed type declaration
3711 (Jacques Garrigue, report by Stephen Dolan)
3712
3713 - #7426, #965: Fix fatal error during object compilation (also
3714 introduces new [Pfield_computed] and [Psetfield_computed] primitives)
3715 (Mark Shinwell, report by Ulrich Singer)
3716
3717 - #7427, #959: Don't delete let bodies in Cmmgen
3718 (Mark Shinwell, report by Valentin Gatien-Baron)
3719
3720 - #7432: Linking modules compiled with -labels and -nolabels is not safe
3721 (Jacques Garrigue, report by Jeremy Yallop)
3722
3723 - #7437: typing assert failure with nonrec priv
3724 (Jacques Garrigue, report by Anil Madhavapeddy)
3725
3726 - #7438: warning +34 exposes #row with private types
3727 (Alain Frisch, report by Anil Madhavapeddy)
3728
3729 - #7443, #990: spurious unused open warning with local open in patterns
3730 (Florian Angeletti, report by Gabriel Scherer)
3731
3732 - #7456, #1092: fix slow compilation on source files containing a lot
3733 of similar debugging information location entries
3734 (Mark Shinwell)
3735
3736 - #7504: fix warning 8 with unconstrained records
3737 (Florian Angeletti, report by John Whitington)
3738
3739 - #7511, #1133: Unboxed type with unboxed argument should not be accepted
3740 (Damien Doligez, review by Jeremy Yallop and Leo White)
3741
3742 - #805, #815, #833: check for integer overflow in String.concat
3743 (Jeremy Yallop,
3744 review by Damien Doligez, Alain Frisch, Daniel Bünzli, Fabrice Le Fessant)
3745
3746 - #881: short-paths did not apply to some polymorphic variants
3747 (Valentin Gatien-Baron, review by Leo White)
3748
3749 - #886: Fix Ctype.moregeneral's handling of row_name
3750 (Leo White, review by Jacques Garrigue)
3751
3752 - #934: check for integer overflow in Bytes.extend
3753 (Jeremy Yallop, review by Gabriel Scherer)
3754
3755 - #956: Keep possibly-effectful expressions when optimizing multiplication
3756 by zero.
3757 (Jeremy Yallop, review by Nicolás Ojeda Bär, Xavier Leroy and Mark Shinwell)
3758
3759 - #977: Catch Out_of_range in ocamldebug's "list" command
3760 (Yunxing Dai)
3761
3762 - #983: Avoid removing effectful expressions in Closure, and
3763 eliminate more non-effectful ones
3764 (Alain Frisch, review by Mark Shinwell and Gabriel Scherer)
3765
3766 - #987: alloc_sockaddr: don't assume a null terminator. It is not inserted
3767 on macOS by system calls that fill in a struct sockaddr (e.g. getsockname).
3768 (Anton Bachin)
3769
3770 - #998: Do not delete unused closures in un_anf.ml.
3771 (Leo White, review by Mark Shinwell and Pierre Chambart)
3772
3773 - #1019: Fix fatal error in Flambda mode "[functions] does not map set of
3774 closures ID"
3775 (Pierre Chambart, code review by Mark Shinwell and Leo White)
3776
3777 - #1075: Ensure that zero-sized float arrays have zero tags.
3778 (Mark Shinwell, Leo White, review by Xavier Leroy)
3779
3780 * #1088: Gc.minor_words now returns accurate numbers.
3781 (compatibility: the .mli declaration of `Gc.minor_words`
3782 and `Gc.get_minor_free` changed, which may break libraries
3783 re-exporting these values.)
3784 (Stephen Dolan, review by Pierre Chambart and Xavier Leroy)
3785
3786 OCaml 4.04.2 (23 Jun 2017):
3787 ---------------------------
3788
3789 ### Security fix:
3790
3791 - #7557: Local privilege escalation issue with ocaml binaries.
3792 (Damien Doligez, report by Eric Milliken, review by Xavier Leroy)
3793
3794 OCaml 4.04.1 (14 Apr 2017):
3795 ---------------------------
3796
3797 ### Standard library:
3798
3799 - #7403, #894: fix a bug in Set.map as introduced in 4.04.0
3800 (Gabriel Scherer, report by Thomas Leonard)
3801
3802 ### Tools:
3803
3804 - #7411: ocamldoc, avoid nested <pre> tags in module description.
3805 (Florian Angeletti, report by user 'kosik')
3806
3807 - #7488: ocamldoc, wrong Latex output for variant types
3808 with constructors without arguments.
3809 (Florian Angeletti, report by Xavier Leroy)
3810
3811 ### Build system:
3812
3813 - #7373, #1023: New flexlink target in Makefile.nt to bootstrap the
3814 flexlink binary only, rather than the flexlink binary and the FlexDLL C
3815 objects.
3816 (David Allsopp)
3817
3818 ### Bug fixes:
3819
3820 - #7369: Str.regexp raises "Invalid_argument: index out of bounds"
3821 (Damien Doligez, report by John Whitington)
3822
3823 - #7373, #1023: Fix ocamlmklib with bootstrapped FlexDLL. Bootstrapped
3824 FlexDLL objects are now installed to a subdirectory flexdll of the Standard
3825 Library which allows the compilers to pick them up explicitly and also
3826 ocamlmklib to include them without unnecessarily adding the entire Standard
3827 Library.
3828 (David Allsopp)
3829
3830 - #7385, #1057: fix incorrect timestamps returned by Unix.stat on Windows
3831 when either TZ is set or system date is in DST.
3832 (David Allsopp, report and initial fix by Nicolás Ojeda Bär, review and
3833 superior implementation suggestion by Xavier Leroy)
3834
3835 - #7405, #903: s390x: Fix address of caml_raise_exn in native dynlink
3836 modules.
3837 (Richard Jones, review by Xavier Leroy)
3838
3839 - #7417, #930: ensure 16 byte stack alignment inside caml_allocN on x86-64
3840 for ocaml build with WITH_FRAME_POINTERS defined
3841 (Christoph Cullmann)
3842
3843 - #7456, #1092: fix slow compilation on source files containing a lot
3844 of similar debugging information location entries
3845 (Mark Shinwell)
3846
3847 - #7457: a case of double free in the systhreads library (POSIX
3848 implementation).
3849 (Xavier Leroy, report by Chet Murthy)
3850
3851 - #7460, #1011: catch uncaught exception when unknown files are passed
3852 as argument (regression in 4.04.0)
3853 (Bernhard Schommer, review by Florian Angeletti and Gabriel Scherer,
3854 report by Stephen Dolan)
3855
3856 - #7505: Memory cannot be released after calling
3857 Bigarray.Genarray.change_layout.
3858 (Damien Doligez and Xavier Leroy, report by Liang Wang)
3859
3860 - #912: Fix segfault in Unix.create_process on Windows caused by wrong header
3861 configuration.
3862 (David Allsopp)
3863
3864 - #980: add dynlink options to ocamlbytecomp.cmxa to allow ocamlopt.opt
3865 to load plugins. See http://github.com/OCamlPro/ocamlc-plugins for examples.
3866 (Fabrice Le Fessant, review by David Allsopp)
3867
3868 - #992: caml-types.el: Fix missing format argument, so that it can show kind
3869 of call at point correctly.
3870 (Chunhui He)
3871
3872 - #1043: Allow Windows CRLF line-endings in ocamlyacc on Unix and Cygwin.
3873 (David Allsopp, review by Damien Doligez and Xavier Leroy)
3874
3875 - #1072: Fix segfault in Sys.runtime_parameters when exception backtraces
3876 are enabled.
3877 (Olivier Andrieu)
3878
3879 OCaml 4.04.0 (4 Nov 2016):
3880 --------------------------
3881
3882 (Changes that can break existing programs are marked with a "*")
3883
3884 ### Language features:
3885
3886 - #7233: Support GADT equations on non-local abstract types
3887 (Jacques Garrigue)
3888
3889 - #187, #578: Local opening of modules in a pattern.
3890 Syntax: "M.(p)", "M.[p]","M.[| p |]", "M.{p}"
3891 (Florian Angeletti, Jacques Garrigue, review by Alain Frisch)
3892
3893 - #301: local exception declarations "let exception ... in"
3894 (Alain Frisch)
3895
3896 - #508: Allow shortcut for extension on semicolons: ;%foo
3897 (Jérémie Dimino)
3898
3899 - #606: optimized representation for immutable records with a single
3900 field, and concrete types with a single constructor with a single argument.
3901 This is triggered with a [@@unboxed] attribute on the type definition.
3902 Currently mutually recursive datatypes are not well supported, this
3903 limitation should be lifted in the future (see #7364).
3904 (Damien Doligez)
3905
3906 ### Compiler user-interface and warnings:
3907
3908 * #6475, #464: interpret all command-line options before compiling any
3909 files, changes (improves) the semantics of repeated -o options or -o
3910 combined with -c see the super-detailed commit message at
3911 https://github.com/ocaml/ocaml/commit/da56cf6dfdc13c09905c2e07f1d4849c8346eec8
3912 (whitequark)
3913
3914 - #7139: clarify the wording of Warning 38
3915 (Unused exception or extension constructor)
3916 (Gabriel Scherer)
3917
3918 * #7147, #475: add colors when reporting errors generated by ppx rewriters.
3919 Remove the `Location.errorf_prefixed` function which is no longer relevant
3920 (Simon Cruanes, Jérémie Dimino)
3921
3922 - #7169, #501: clarify the wording of Warning 8
3923 (Non-exhaustivity warning for pattern matching)
3924 (Florian Angeletti, review and report by Gabriel Scherer)
3925
3926 * #591: Improve support for OCAMLPARAM: (i) do not use objects
3927 files with -a, -pack, -shared; (ii) use "before" objects in the toplevel
3928 (but not "after" objects); (iii) use -I dirs in the toplevel,
3929 (iv) fix bug where -I dirs were ignored when using threads
3930 (Marc Lasson, review by Damien Doligez and Alain Frisch)
3931
3932 - #648: New -plugin option for ocamlc and ocamlopt, to dynamically extend
3933 the compilers at runtime.
3934 (Fabrice Le Fessant)
3935
3936 - #684: Detect unused module declarations
3937 (Alain Frisch)
3938
3939 - #706: Add a settable Env.Persistent_signature.load function so
3940 that cmi files can be loaded from other sources. This can be used to
3941 create self-contained toplevels.
3942 (Jérémie Dimino)
3943
3944 ### Standard library:
3945
3946 - #6279, #553: implement Set.map
3947 (Gabriel Scherer)
3948
3949 - #6820, #560: Add Obj.reachable_words to compute the
3950 "transitive" heap size of a value
3951 (Alain Frisch, review by Mark Shinwell and Damien Doligez)
3952
3953 - #473: Provide `Sys.backend_type` so that user can write backend-specific
3954 code in some cases (for example, code generator).
3955 (Hongbo Zhang)
3956
3957 - #589: Add a non-allocating function to recover the number of
3958 allocated minor words.
3959 (Pierre Chambart, review by Damien Doligez and Gabriel Scherer)
3960
3961 - #626: String.split_on_char
3962 (Alain Frisch)
3963
3964 - #669: Filename.extension and Filename.remove_extension
3965 (Alain Frisch, request by Edgar Aroutiounian, review by Daniel Bünzli
3966 and Damien Doligez)
3967
3968 - #674: support unknown Sys.os_type in Filename, defaulting to Unix
3969 (Filename would previously fail at initialization time for
3970 Sys.os_type values other than "Unix", "Win32" and "Cygwin";
3971 mirage-os uses "xen")
3972 (Anil Madhavapeddy)
3973
3974 - #772 %string_safe_set and %string_unsafe_set are deprecated aliases
3975 for %bytes_safe_set and %bytes_unsafe_set.
3976 (Hongbo Zhang and Damien Doligez)
3977
3978 ### Other libraries
3979
3980 - #4834, #592: Add a Biggarray.Genarray.change_layout function
3981 to switch bigarrays between C and fortran layouts.
3982 (Guillaume Hennequin, review by Florian Angeletti)
3983
3984 ### Code generation and optimizations:
3985
3986 - #4747, #328: Optimize Hashtbl by using in-place updates of its
3987 internal bucket lists. All operations run in constant stack size
3988 and are usually faster, except Hashtbl.copy which can be much
3989 slower
3990 (Alain Frisch)
3991
3992 - #6217, #538: Optimize performance of record update:
3993 no more performance cliff when { foo with t1 = ..; t2 = ...; ... }
3994 hits 6 updated fields
3995 (Olivier Nicole, review by Thomas Braibant and Pierre Chambart)
3996
3997 - #7023, #336: Better unboxing strategy
3998 (Alain Frisch, Pierre Chambart)
3999
4000 - #7244, #840: Ocamlopt + flambda requires a lot of memory
4001 to compile large array literal expressions
4002 (Pierre Chambart, review by Mark Shinwell)
4003
4004 - #7291, #780: Handle specialisation of recursive function that does
4005 not always preserve the arguments
4006 (Pierre Chambart, Mark Shinwell, report by Simon Cruanes)
4007
4008 - #7328, #702: Do not eliminate boxed int divisions by zero and
4009 avoid checking twice if divisor is zero with flambda.
4010 (Pierre Chambart, report by Jeremy Yallop)
4011
4012 - #427: Obj.is_block is now an inlined OCaml function instead of a
4013 C external. This should be faster.
4014 (Demi Obenour)
4015
4016 - #580: Optimize immutable float records
4017 (Pierre Chambart, review by Mark Shinwell)
4018
4019 - #602: Do not generate dummy code to force module linking
4020 (Pierre Chambart, reviewed by Jacques Garrigue)
4021
4022 - #703: Optimize some constant string operations when the "-safe-string"
4023 configure time option is enabled.
4024 (Pierre Chambart)
4025
4026 - #707: Load cross module information during a meet
4027 (Pierre Chambart, report by Leo White, review by Mark Shinwell)
4028
4029 - #709: Share a few more equal switch branches
4030 (Pierre Chambart, review by Gabriel Scherer)
4031
4032 - #712: Small improvements to type-based optimizations for array
4033 and lazy
4034 (Alain Frisch, review by Pierre Chambart)
4035
4036 - #714: Prevent warning 59 from triggering on Lazy of constants
4037 (Pierre Chambart, review by Leo White)
4038
4039 - #723 Sort emitted functions according to source location
4040 (Pierre Chambart, review by Mark Shinwell)
4041
4042 - Lack of type normalization lead to missing simple compilation for "lazy x"
4043 (Alain Frisch)
4044
4045 ### Runtime system:
4046
4047 - #7203, #534: Add a new primitive caml_alloc_float_array to allocate an
4048 array of floats
4049 (Thomas Braibant)
4050
4051 - #7210, #562: Allows to register finalisation function that are
4052 called only when a value will never be reachable anymore. The
4053 drawbacks compared to the existing one is that the finalisation
4054 function is not called with the value as argument. These finalisers
4055 are registered with `GC.finalise_last`
4056 (François Bobot reviewed by Damien Doligez and Leo White)
4057
4058 - #247: In previous OCaml versions, inlining caused stack frames to
4059 disappear from stacktraces. This made debugging harder in presence of
4060 optimizations, and flambda was going to make this worse. The debugging
4061 information produced by the compiler now enables the reconstruction of the
4062 original backtrace. Use `Printexc.get_raw_backtrace_next_slot` to traverse
4063 the list of inlined stack frames.
4064 (Frédéric Bour, review by Mark Shinwell and Xavier Leroy)
4065
4066 - #590: Do not perform compaction if the real overhead is less than expected
4067 (Thomas Braibant)
4068
4069 ### Tools:
4070
4071 - #7189: toplevel #show, follow chains of module aliases
4072 (Gabriel Scherer, report by Daniel Bünzli, review by Thomas Refis)
4073
4074 - #7248: have ocamldep interpret -open arguments in left-to-right order
4075 (Gabriel Scherer, report by Anton Bachin)
4076
4077 - #7272, #798: ocamldoc, missing line breaks in type_*.html files
4078 (Florian Angeletti)
4079
4080 - #7290: ocamldoc, improved support for inline records
4081 (Florian Angeletti)
4082
4083 - #7323, #750: ensure "ocamllex -ml" works with -safe-string
4084 (Hongbo Zhang)
4085
4086 - #7350, #806: ocamldoc, add viewport metadata to generated html pages
4087 (Florian Angeletti, request by Daniel Bünzli)
4088
4089 - #452: Make the output of ocamldep more stable
4090 (Alain Frisch)
4091
4092 - #548: empty documentation comments
4093 (Florian Angeletti)
4094
4095 - #575: Add the -no-version option to the toplevel
4096 (Sébastien Hinderer)
4097
4098 - #598: Add a --strict option to ocamlyacc treat conflicts as errors
4099 (this option is now used for the compiler's parser)
4100 (Jeremy Yallop)
4101
4102 - #613: make ocamldoc use -open arguments
4103 (Florian Angeletti)
4104
4105 - #718: ocamldoc, fix order of extensible variant constructors
4106 (Florian Angeletti)
4107
4108 ### Debugging and profiling:
4109
4110 - #585: Spacetime, a new memory profiler (Mark Shinwell, Leo White)
4111
4112 ### Manual and documentation:
4113
4114 - #7007, #7311: document the existence of OCAMLPARAM and
4115 ocaml_compiler_internal_params
4116 (Damien Doligez, reports by Wim Lewis and Gabriel Scherer)
4117
4118 - #7243: warn users against using WinZip to unpack the source archive
4119 (Damien Doligez, report by Shayne Fletcher)
4120
4121 - #7245, #565: clarification to the wording and documentation
4122 of Warning 52 (fragile constant pattern)
4123 (Gabriel Scherer, William, Adrien Nader, Jacques Garrigue)
4124
4125 - #PR7265, #769: Restore 4.02.3 behaviour of Unix.fstat, if the
4126 file descriptor doesn't wrap a regular file (win32unix only)
4127 (Andreas Hauptmann, review by David Allsopp)
4128
4129 - #7288: flatten : Avoid confusion
4130 (Damien Doligez, report by user 'tormen')
4131
4132 - #7355: Gc.finalise and lazy values
4133 (Jeremy Yallop)
4134
4135 - #842: Document that [Store_field] must not be used to populate
4136 arrays of values declared using [CAMLlocalN] (Mark Shinwell)
4137
4138 ### Compiler distribution build system:
4139
4140 - #324: Compiler developers: Adding new C primitives to the
4141 standard runtime doesn't require anymore to run `make bootstrap`
4142 (François Bobot)
4143
4144 - #384: Fix compilation using old Microsoft C Compilers not
4145 supporting secure CRT functions (SDK Visual Studio 2005 compiler and
4146 earlier) and standard 64-bit integer literals (Visual Studio .NET
4147 2002 and earlier)
4148 (David Allsopp)
4149
4150 - #507: More sharing between Unix and Windows makefiles
4151 (whitequark, review by Alain Frisch)
4152
4153 * #512, #587: Installed `ocamlc`, `ocamlopt`, and `ocamllex` are
4154 now the native-code versions of the tools, if those versions were
4155 built.
4156 (Demi Obenour)
4157
4158 - #525: fix build on OpenIndiana
4159 (Sergey Avseyev, review by Damien Doligez)
4160
4161 - #687: "./configure -safe-string" to get a system where
4162 "-unsafe-string" is not allowed, thus giving stronger non-local
4163 guarantees about immutability of strings
4164 (Alain Frisch, review by Hezekiah M. Carty)
4165
4166 ### Bug fixes:
4167
4168 * #6505: Missed Type-error leads to a segfault upon record access.
4169 (Jacques Garrigue, extra report by Stephen Dolan)
4170 Proper fix required a more restrictive approach to recursive types:
4171 mutually recursive types are seen as abstract types (i.e. non-contractive)
4172 when checking the well-foundedness of the recursion.
4173
4174 * #6752: Nominal types and scope escaping.
4175 Revert to strict scope for non-generalizable type variables, cf. Mantis.
4176 Note that this is actually stricter than the behavior before 4.03,
4177 cf. #7313, meaning that you may sometimes need to add type annotations
4178 to explicitly instantiate non-generalizable type variables.
4179 (Jacques Garrigue, following discussion with Jeremy Yallop,
4180 Nicolás Ojeda Bär and Alain Frisch)
4181
4182 - #7112: Aliased arguments ignored for equality of module types
4183 (Jacques Garrigue, report by Leo White)
4184
4185 - #7134: compiler forcing aliases it shouldn't while reporting type errors
4186 (Jacques Garrigue, report and suggestion by sliquister)
4187
4188 - #7153: document that Unix.SOCK_SEQPACKET is not really usable.
4189
4190 - #7165, #494: uncaught exception on invalid lexer directive
4191 (Gabriel Scherer, report by KC Sivaramakrishnan using afl-fuzz)
4192
4193 - #7257, #583: revert a 4.03 change of behavior on (Unix.sleep 0.),
4194 it now calls (nano)sleep for 0 seconds as in (< 4.03) versions.
4195 (Hannes Mehnert, review by Damien Doligez)
4196
4197 - #7259 and #603: flambda does not collapse pattern matching
4198 in some cases
4199 (Pierre Chambart, report by Reed Wilson, review by Mark Shinwell)
4200
4201 - #7260: GADT + subtyping compile time crash
4202 (Jacques Garrigue, report by Nicolás Ojeda Bär)
4203
4204 - #7269: Segfault from conjunctive constraints in GADT
4205 (Jacques Garrigue, report by Stephen Dolan)
4206
4207 - #7276: Support more than FD_SETSIZE sockets in Windows' emulation
4208 of select
4209 (David Scott, review by Alain Frisch)
4210
4211 * #7278: Prevent private inline records from being mutated
4212 (Alain Frisch, report by Pierre Chambart)
4213
4214 - #7284: Bug in mcomp_fields leads to segfault
4215 (Jacques Garrigue, report by Leo White)
4216
4217 - #7285: Relaxed value restriction broken with principal
4218 (Jacques Garrigue, report by Leo White)
4219
4220 - #7297: -strict-sequence turns off Warning 21
4221 (Jacques Garrigue, report by Valentin Gatien-Baron)
4222
4223 - #7299: remove access to OCaml heap inside blocking section in win32unix
4224 (David Allsopp, report by Andreas Hauptmann)
4225
4226 - #7300: remove access to OCaml heap inside blocking in Unix.sleep on Windows
4227 (David Allsopp)
4228
4229 - #7305: -principal causes loop in type checker when compiling
4230 (Jacques Garrigue, report by Anil Madhavapeddy, analysis by Leo White)
4231
4232 - #7330: Missing exhaustivity check for extensible variant
4233 (Jacques Garrigue, report by Elarnon *)
4234
4235 - #7374: Contractiveness check unsound with constraints
4236 (Jacques Garrigue, report by Leo White)
4237
4238 - #7378: GADT constructors can be re-exposed with an incompatible type
4239 (Jacques Garrigue, report by Alain Frisch)
4240
4241 - #7389: Unsoundness in GADT exhaustiveness with existential variables
4242 (Jacques Garrigue, report by Stephen Dolan)
4243
4244 * #533: Thread library: fixed [Thread.wait_signal] so that it
4245 converts back the signal number returned by [sigwait] to an
4246 OS-independent number
4247 (Jérémie Dimino)
4248
4249 - #600: (similar to #555) ensure that register typing constraints are
4250 respected at N-way join points in the control flow graph
4251 (Mark Shinwell)
4252
4253 - #672: Fix float_of_hex parser to correctly reject some invalid forms
4254 (Bogdan Tătăroiu, review by Thomas Braibant and Alain Frisch)
4255
4256 - #700: Fix maximum weak bucket size
4257 (Nicolás Ojeda Bär, review by François Bobot)
4258
4259 - #708 Allow more module aliases in strengthening (Leo White)
4260
4261 - #713, #7301: Fix wrong code generation involving lazy values in Flambda
4262 mode
4263 (Mark Shinwell, review by Pierre Chambart and Alain Frisch)
4264
4265 - #721: Fix infinite loop in flambda due to [@@specialise] annotations
4266
4267 - #779: Building native runtime on Windows could fail when bootstrapping
4268 FlexDLL if there was also a system-installed flexlink
4269 (David Allsopp, report Michael Soegtrop)
4270
4271 - #805, #815, #833: check for integer overflow in String.concat
4272 (Jeremy Yallop,
4273 review by Damien Doligez, Alain Frisch, Daniel Bünzli, Fabrice Le Fessant)
4274
4275 - #810: check for integer overflow in Array.concat
4276 (Jeremy Yallop)
4277
4278 - #814: fix the Buffer.add_substring bounds check to handle overflow
4279 (Jeremy Yallop)
4280
4281 - #880: Fix [@@inline] with default parameters in flambda (Leo White)
4282
4283 * #1353: add labels to BytesLabels.sub_string (Jacques Garrigue)
4284
4285 ### Internal/compiler-libs changes:
4286
4287 - #7200, #539: Improve, fix, and add test for parsing/pprintast.ml
4288 (Runhang Li, David Sheets, Alain Frisch)
4289
4290 - #351: make driver/pparse.ml functions type-safe
4291 (Gabriel Scherer, Dmitrii Kosarev, review by Jérémie Dimino)
4292
4293 - #516: Improve Texp_record constructor representation, and
4294 propagate updated record type information
4295 (Pierre Chambart, review by Alain Frisch)
4296
4297 - #678: Graphics.close_graph crashes 64-bit Windows ports (re-implementation
4298 of #3963)
4299 (David Allsopp)
4300
4301 - #679: delay registration of docstring after the mapper is applied
4302 (Hugo Heuzard, review by Leo White)
4303
4304 - #872: don't attach (**/**) comments to any particular node
4305 (Thomas Refis, review by Leo White)
4306
4307 OCaml 4.03.0 (25 Apr 2016):
4308 ---------------------------
4309
4310 (Changes that can break existing programs are marked with a "*")
4311
4312 ### Language features:
4313
4314 - #5528: inline records for constructor arguments
4315 (Alain Frisch)
4316
4317 - #6220, #6403, #6437, #6801:
4318 Improved redundancy and exhaustiveness checks for GADTs.
4319 Namely, the redundancy checker now checks whether the uncovered pattern
4320 of the pattern is actually inhabited, exploding at most one wild card.
4321 This is also done for exhaustiveness when there is only one case.
4322 Additionally, one can now write unreachable cases, of the form
4323 "pat -> .", which are treated by the redundancy check.
4324 (Jacques Garrigue)
4325
4326 - #6374: allow "_ t" as a short-hand for "(_, _, ..) t" for n-ary type
4327 constructors
4328 (Alain Frisch)
4329
4330 - #6714: allow [@@ocaml.warning] on most structure and signature items:
4331 values, modules, module types
4332 (whitequark)
4333
4334 - #6806: Syntax shortcut for putting a type annotation on a record field:
4335 { f1 : typ = e } is sugar for { f1 = (e : typ) }
4336 { f1 : typ } is sugar for { f1 = (f1 : typ) }
4337 (Valentin Gatien-Baron, review by Jérémie Dimino)
4338
4339 - #6806: Allow type annotations before the "->" in "fun <args> -> <expr>"
4340 fun x y : (int * int) -> (x, y)
4341 (Valentin Gatien-Baron, review by Jérémie Dimino)
4342
4343 - #26: support for "(type a b)" as syntactic sugar for "(type a) (type b)"
4344 (Gabriel Scherer)
4345
4346 - #42: short functor type syntax: "S -> T" for "functor (_ : S) -> T"
4347 (Leo White)
4348
4349 - #88: allow field punning in object copying expressions:
4350 {< x; y; >} is sugar for {< x = x; y = y; >}
4351 (Jeremy Yallop)
4352
4353 - #112: octal escape sequences for char and string literals
4354 "Make it \o033[1mBOLD\o033[0m"
4355 (Rafaël Bocquet, request by John Whitington)
4356
4357 - #167: allow to annotate externals' arguments and result types so
4358 they can be unboxed or untagged: [@unboxed], [@untagged]. Supports
4359 untagging int and unboxing int32, int64, nativeint and float.
4360 (Jérémie Dimino, Mark Shinwell)
4361
4362 - #173: [@inline] and [@inlined] attributes (for function declarations
4363 and call sites respectively) to control inlining
4364 (Pierre Chambart, Mark Shinwell)
4365
4366 - #188: accept [@@immediate] attribute on type declarations to mark types
4367 that are represented at runtime by an integer
4368 (Will Crichton, reviewed by Leo White)
4369
4370 * #234: allow "[]" as a user-defined constructor. Demand parenthesis
4371 around "::" when using "::" as user-defined constructor:
4372 code using "| :: of ..." must change to "| (::) of ...".
4373 (Runhang Li, review by Damien Doligez)
4374
4375 - #240: replace special annotations on externals by attributes:
4376 * "float" is generalized to [@@unboxed]
4377 * "noalloc" becomes [@@noalloc]
4378 Deprecate "float" and "noalloc".
4379 (Jérémie Dimino)
4380
4381 - #254: @ocaml.warn_on_literal_pattern attribute on constructors to
4382 warn when the argument is matches against a constant pattern. This
4383 attribute is applied on predefined exception constructors which
4384 carry purely informational (with no stability guarantee) messages.
4385 (Alain Frisch)
4386
4387 - #268: hexadecimal notation for floating-point literals: -0x1.ffffp+987
4388 In OCaml source code, FP literals can be written using the hexadecimal
4389 notation 0x<mantissa in hex>p<exponent> from ISO C99.
4390 (Xavier Leroy)
4391
4392 - #273: allow to get the extension slot of an extension constructor
4393 by writing [%extension_constructor <path>]
4394 (Jérémie Dimino)
4395
4396 - #282: change short-paths penalty heuristic to assign the same cost to
4397 idents containing double underscores as to idents starting with an underscore
4398 (Thomas Refis, Leo White)
4399
4400 - #6681 #326: signature items are now accepted as payloads for
4401 extension and attributes, using the syntax [%foo: SIG ] or [@foo: SIG ].
4402 Examples: "[%%client: val foo : int]" or "val%client foo : int".
4403 (Alain Frisch and Gabriel Radanne)
4404
4405 * #342: Allow shortcuts for extension and attributes on all keywords:
4406 module%foo, class[@foo], etc.
4407 The attribute in "let[@foo] .. in .." is now attached to the value binding,
4408 not to the expression.
4409 (Gabriel Radanne)
4410
4411 ### Compilers:
4412
4413 * #4231, #5461: warning 31 is now fatal by default
4414 (Warning 31: A module is linked twice in the same executable.)
4415 This is an interim solution; double-linking of modules has dangerous
4416 semantics, eg. exception constructors end up with two distinct declarations.
4417 (Alain Frisch)
4418
4419 - #4800: better compilation of tuple assignment
4420 (Gabriel Scherer and Alain Frisch)
4421
4422 - #5995: keep -for-pack into account to name exceptions;
4423 -for-pack should now be used during bytecode compilation as well
4424 (Alain Frisch, report by Christophe Troestler)
4425
4426 - #6400: better error message for '_' used as an expression
4427 (Alain Frisch, report by whitequark)
4428
4429 - #6501: harden the native-code generator against certain uses of "%identity"
4430 (Xavier Leroy, report by Antoine Miné)
4431
4432 - #6636: add --version option
4433 (whitequark)
4434
4435 - #6679: fix pprintast printing of constraints in type declarations
4436 (Alain Frisch, report by Jun Furuse)
4437
4438 - #6737: fix Typedtree attributes on (fun x -> body) expressions
4439 (Alain Frisch, report by Oleg Kiselyov)
4440
4441 * #6865: remove special case for parsing "let _ = expr" in structures
4442 (Jérémie Dimino, Alain Frisch)
4443
4444 * #6438, #7059, #315: Pattern guard disables exhaustiveness check
4445 (function Some x when x = 0 -> ()) will now raise warning 8 (non-exhaustive)
4446 instead of warning 25 (all clauses are guarded). 25 isn't raised anymore.
4447 Projects that set warning 8 as an error may fail to compile (presumably
4448 this is the semantics they wanted).
4449 (Alain Frisch, request by Martin Jambon and John Whitington)
4450
4451 - #6920: fix debug information around uses of %apply or %revapply
4452 (Jérémie Dimino, report by Daniel Bünzli)
4453
4454 - #6939: Segfault with improper use of let-rec
4455 (Alain Frisch)
4456
4457 - #6943: native-code generator for POWER/PowerPC 64 bits, both in
4458 big-endian (ppc64) and little-endian (ppc64le) configuration.
4459 (Xavier Leroy, with inspiration from RedHat's unofficial ppc64 and ppc64le
4460 ports)
4461
4462 - #6979: better code generation in x86-32 backend for copying floats to
4463 the stack
4464 (Marc Lasson, review by Xavier Leroy)
4465
4466 - #7018: fix missing identifier renaming during inlining
4467 (Alain Frisch, review by Xavier Leroy)
4468
4469 - #7022, #259: unbox float and boxed ints earlier, avoid second pass
4470 (Alain Frisch)
4471
4472 - #7026, #288: remove write barrier for polymorphic variants without
4473 arguments
4474 (Simon Cruanes)
4475
4476 - #7031: new warning 57, ambiguous guarded or-patterns
4477 (Luc Maranget, Gabriel Scherer, report by Martin Clochard and Claude Marché)
4478
4479 - #7064, #316: allowing to mark compilation units and sub-modules as
4480 deprecated
4481 (Alain Frisch)
4482
4483 - #7067: fix performance regression (wrt. 4.01) in the native compiler
4484 for long nested structures
4485 (Alain Frisch, report by Daniel Bünzli, review by Jacques Garrigue)
4486
4487 - #7097: fix strange syntax error message around illegal packaged module
4488 signature constraints
4489 (Alain Frisch, report by Jun Furuse)
4490
4491 - #7118, #7120, #408, #476: Bug fixed in stack unwinding
4492 metadata generation. Was a cause of crashes in GUI programs on OS X.
4493 (Bart Jacobs, review by Mark Shinwell)
4494
4495 - #7168: Exceeding stack limit in bytecode can lead to a crash.
4496 (Jacques-Henri Jourdan)
4497
4498 - #7232: Strange Pprintast output with ppx_deriving
4499 (Damien Doligez, report by Anton Bachin)
4500
4501 - #17: some cmm optimizations of integer operations with constants
4502 (Stephen Dolan, review by Pierre Chambart)
4503
4504 - #89: improve type-specialization of unapplied primitives:
4505 unapplied annotations (compare : int -> _),
4506 type propagation (List.sort compare [1;2;3])
4507 and propagation from module signatures now lead to specialization
4508 (Frédéric Bour, review by Gabriel Scherer)
4509
4510 - #107: Prevent more unnecessary float boxing, especially in `if` and `match`
4511 (Vladimir Brankov, review by Alain Frisch)
4512
4513 - #109: new (lazy) unboxing strategy for float and int references
4514 (Vladimir Brankov, review by Alain Frisch)
4515
4516 - #115: More precise typing of values at the C-- and Mach level.
4517 (Xavier Leroy, review by Pierre Chambart)
4518
4519 - #132: Flambda: new intermediate language and "middle-end" optimizers
4520 (Pierre Chambart, Mark Shinwell, Leo White)
4521
4522 - #212, #7226, #542: emit column position in gas assembly `.loc`
4523 (Frédéric Bour, Anton Bachin)
4524
4525 - #207: Colors in compiler messages (warnings, errors)
4526 configure with -color {auto|always|never} or TERM=dumb
4527 (Simon Cruanes, review by Gabriel Scherer)
4528
4529 - #258: more precise information on PowerPC instruction sizes
4530 (Pierre Chambart, Xavier Leroy)
4531
4532 - #263: improve code generation for if-equivalents of (&&) and (||)
4533 (Pierre Chambart)
4534
4535 - #270: Make [transl_exception_constructor] generate [Immutable] blocks
4536 (Mark Shinwell)
4537
4538 - #271: Fix incorrect mutability flag when records are built using "with"
4539 (Mark Shinwell)
4540
4541 - #275: native-code generator for IBM z System running Linux.
4542 In memoriam Gene Amdahl, 1922-2015.
4543 (Bill O'Farrell, Tristan Amini, Xavier Leroy)
4544
4545 - #282: relax short-paths safety check in presence of module aliases, take
4546 penalty into account while building the printing map.
4547 (Thomas Refis, Leo White)
4548
4549 - #306: Instrument the compiler to debug performance regressions
4550 (Pierre Chambart)
4551
4552 - #319: add warning 58 for missing cmx files, and
4553 extend -opaque option to mli files: a missing .cmx does not warn
4554 if the corresponding .cmi is compiled -opaque.
4555 (Leo White)
4556
4557 - #388: OCAML_FLEXLINK environment variable allows overriding flexlink
4558 command (David Allsopp)
4559
4560 - #392: put all parsetree invariants in a new module Ast_invariants
4561 (Jérémie Dimino)
4562
4563 - #407: don't display the name of compiled .c files when calling the
4564 Microsoft C Compiler (same as the assembler).
4565 (David Allsopp)
4566
4567 - #431: permit constant float arrays to be eligible for pattern match
4568 branch merging
4569 (Pierre Chambart)
4570
4571 - #455: provide more debugging information to Js_of_ocaml
4572 (Jérôme Vouillon)
4573
4574 - #514, #554: Added several command-line flags to explicitly enable
4575 settings that are currently the default:
4576 `-alias-deps`, `-app-funct`, `-no-keep-docs`, `-no-keep-locs`,
4577 `-no-principal`, `-no-rectypes`, `-no-strict-formats`
4578 (Demi Obenour)
4579
4580 - #545: use reraise to preserve backtrace on
4581 `match .. with exception e -> raise e`
4582 (Nicolás Ojeda Bär, review by Gabriel Scherer)
4583
4584 ### Runtime system:
4585
4586 * #596: make string/bytes distinguishable in the underlying
4587 compiler implementation; caml_fill_string and caml_create_string are
4588 deprecated and will be removed in the future, please use
4589 caml_fill_bytes and caml_create_bytes for migration
4590 (Hongbo Zhang, review by Damien Doligez, Alain Frisch, and Hugo Heuzard)
4591
4592 - #3612, #2429: allow allocating custom block with finalizers
4593 in the minor heap.
4594 (Pierre Chambart)
4595
4596 * #6517: use ISO C99 types {,u}int{32,64}_t in preference to our homegrown
4597 types {,u}int{32,64}.
4598 C stubs may have to be updated as {,u}int{32,64}_t are not defined anymore.
4599 (Xavier Leroy)
4600
4601 - #6760: closures evaluated in the toplevel can now be marshalled
4602 (whitequark, review by Jacques-Henri Jourdan)
4603
4604 - #6902, #210: emit a runtime warning on stderr
4605 when finalizing an I/O channel which is still open:
4606 "channel opened on file '...' dies without being closed"
4607 this is controlled by OCAMLRUNPARAM=W=1 or with Sys.enable_runtime_warnings.
4608 The behavior of affected program is not changed,
4609 but they should still be fixed.
4610 (Alain Frisch, review by Damien Doligez)
4611
4612 - Signal handling: for read-and-clear, use GCC/Clang atomic builtins
4613 if available.
4614 (Xavier Leroy)
4615
4616 - #6910, #224: marshaling (output_value, input_value, et al)
4617 now support marshaled data bigger than 4 Gb.
4618 (Xavier Leroy)
4619
4620 * #22: The undocumented layout of weak arrays has been changed. Finalisation
4621 functions are now run before the erasure of the corresponding values.
4622
4623 * #226: select higher levels of optimization for GCC >= 3.4 and Clang
4624 when compiling the run-time system and C stub code.
4625 "-std=gnu99 -O2 -fno-strict-aliasing -fwrapv" is used by default.
4626 This also affects default flags for user stubs compiled with "ocamlc -c foo.c"
4627 and may uncover bugs in them.
4628 (Xavier Leroy)
4629
4630 - #262: Multiple GC roots per compilation unit
4631 (Pierre Chambart, Mark Shinwell, review by Damien Doligez)
4632
4633 * #297: Several changes to improve the worst-case GC pause time.
4634 Changes Gc.control and Gc.major_slice and adds functions to the Gc module.
4635 (Damien Doligez, with help from François Bobot, Thomas Braibant, Leo White)
4636
4637 - #325: Add v=0x400 flag to OCAMLRUNPARAM to display GC stats on exit
4638 (Louis Gesbert, review by Alain Frisch)
4639
4640 ### Standard library:
4641
4642 - #7848, #230: Array.map2, Array.iter2
4643 (John Christopher McAlpine)
4644
4645 - #5197, #63: Arg: allow flags such as --flag=arg as well as --flag arg
4646 (Richard Jones)
4647
4648 - #6017, #7034, #267: More efficient ifprintf implementation
4649 (Jeremy Yallop, review by Gabriel Scherer)
4650
4651 - #6296: Some documentation on the floating-point representations
4652 recognized by Pervasives.float_of_string
4653 (Xavier Leroy)
4654
4655 - #6316: Scanf.scanf failure on %u formats when reading big integers
4656 (Xavier Leroy, Benoît Vaugon)
4657
4658 - #6321: guarantee that "hypot infinity nan = infinity"
4659 (for conformance with ISO C99)
4660 (Xavier Leroy)
4661
4662 - #6390, #36: expose Sys.{int_size,max_wosize} for js_of_ocaml portability
4663 (Hugo Heuzard)
4664
4665 - #6449: Add Map.union
4666 (Alain Frisch)
4667
4668 * #6494: Add 'equal' functions in modules
4669 Bytes, Char, Digest, Int32, Int64, Nativeint, and String
4670 Users defining their own modules with signature 'module type of Int32'
4671 have to extend their implementation.
4672 (Romain Calascibetta)
4673
4674 * #6524, #79: Filename: Optional ?perms argument to open_temp_file
4675 May break partial applications of the function (fix by passing ?perms:None)
4676 (Daniel Bünzli, review by Kate Deplaix)
4677
4678 * #6525, #80: Add Uchar module to the standard library
4679 May introduce module name conflicts with existing projects.
4680 (Daniel Bünzli, review by Yoriyuki Yamagata and Damien Doligez)
4681
4682 - #6577: improve performance of %L, %l, %n, %S, %C format specifiers
4683 (Alain Frisch)
4684
4685 - #6585: fix memory leak in win32unix/createprocess.c
4686 (Alain Frisch, report by user 'aha')
4687
4688 - #6645, #174: Guarantee that Set.add, Set.remove, Set.filter
4689 return the original set if no change is required
4690 (Alain Frisch, Mohamed Iguernlala)
4691
4692 - #6649, #222: accept (int_of_string "+3")
4693 (John Christopher McAlpine)
4694
4695 - #6694, #6695, #124: deprecate functions using ISO-8859-1 character set
4696 in Char, Bytes, String and provide alternatives *_acii using US-ASCII.
4697 Affected functions:
4698 {Char,String,Bytes}.{uppercase,lowercase},
4699 {String,Bytes}.{capitalize,uncaptialize}
4700 (whitequark, review by Damien Doligez)
4701
4702 - #22: Add the Ephemeron module that implements ephemerons and weak
4703 hash table
4704 (François Bobot, review by Damien Doligez, Daniel Bünzli,
4705 Alain Frisch, Pierre Chambart)
4706
4707 - #164: more efficient (branchless) implementation of Pervasives.compare
4708 specialized at type 'float'.
4709 (Vladimir Brankov)
4710
4711 - #175: Guarantee that Map.add, Map.remove, Map.filter
4712 return the original map if no change is required.
4713 (Mohamed Iguernlala)
4714
4715 - #201: generalize types of Printf.{ifprintf,ikfprintf}
4716 (Maxence Guesdon)
4717
4718 - #216: add the missing POSIX.1-2001 signals in Sys
4719 (Guillaume Bury)
4720
4721 - #239: remove type-unsafe code from Stream
4722 (Pierre Chambart, review by Gabriel Scherer and Jeremy Yallop)
4723
4724 - #250: Check for negative start element in Array.sub
4725 (Jeremy Yallop)
4726
4727 - #265: new implementation of Queue avoiding Obj.magic
4728 (Jérémie Dimino)
4729
4730 - #268, #303: '%h' and '%H' modifiers for printf and scanf to
4731 support floating-point numbers in hexadecimal notation
4732 (Xavier Leroy, Benoît Vaugon)
4733
4734 - #272: Switch classify_float to [@@unboxed]
4735 (Alain Frisch)
4736
4737 - Improve speed of classify_float by not going through fpclassify()
4738 (Alain Frisch, Xavier Leroy)
4739
4740 - #277: Switch the following externals to [@@unboxed]:
4741 * {Nativeint,Int32,Int64}.{of,to}_float
4742 * Int{32,64}.float_of_bits
4743 * Int{32,64}.bits_of_float
4744 (Jérémie Dimino)
4745
4746 - #281: Switch the following externals to [@@unboxed]:
4747 * Sys.time (and [@@noalloc])
4748 * Pervasives.ldexp (and [@@noalloc])
4749 * Pervasives.compare for float, nativeint, int32, int64.
4750 (François Bobot)
4751
4752 - #3622, #195: add function Stack.fold
4753 (Simon Cruanes)
4754
4755 - #329: Add exists, for_all, mem and memq functions in Array
4756 (Bernhard Schommer)
4757
4758 - #337: Add [Hashtbl.filter_map_inplace]
4759 (Alain Frisch)
4760
4761 - #356: Add [Format.kasprintf]
4762 (Jérémie Dimino, Mark Shinwell)
4763
4764 ### Type system:
4765
4766 - #5545: Type annotations on methods cannot control the choice of abbreviation
4767 (Jacques Garrigue)
4768
4769 * #6465: allow incremental weakening of module aliases.
4770 This is done by adding equations to submodules when expanding aliases.
4771 In theory this may be incompatible is some corner cases defining a module
4772 type through inference, but no breakage known on published code.
4773 (Jacques Garrigue)
4774
4775 - #6593: Functor application in tests/basic-modules fails after commit 15405
4776 (Jacques Garrigue)
4777
4778 ### Toplevel and debugger:
4779
4780 - #6113: Add descriptions to directives, and display them via #help
4781 (Nick Giannarakis, Berke Durak, Francis Southern and Gabriel Scherer)
4782
4783 - #6396: Warnings-as-errors not properly flushed in the toplevel
4784 (Alain Frisch)
4785
4786 - #6401: use proper error reporting for toplevel environment initialization:
4787 no more Env.Error(_) at start time
4788 (Gabriel Scherer, Alain Frisch)
4789
4790 - #6468: toplevel now supports backtraces if invoked with OCAMLRUNPARAM=b
4791 (whitequark and Jake Donham,
4792 review by Gabriel Scherer and Jacques-Henri Jourdan)
4793
4794 - #6906: wrong error location for unmatched paren with #use in toplevel
4795 (Damien Doligez, report by Kenichi Asai)
4796
4797 - #6935, #298: crash in debugger when load_printer is given a directory
4798 (Junsong Li, review by Gabriel Scherer)
4799
4800 - #7081: report preprocessor warnings in the toplevel
4801 (Valentin Gatien-Baron, review by Jérémie Dimino)
4802
4803 - #7098: Loss of ppx context in toplevel after an exception
4804 (Alain Frisch, report by whitequark)
4805
4806 - #7101: The toplevel does not close in_channel for libraries specified on
4807 its command line
4808 (Alain Frisch)
4809
4810 - #7119: the toplevel does not respect [@@@warning]
4811 (Alain Frisch, report by Gabriel Radanne)
4812
4813 ### Other libraries:
4814
4815 * Unix library: channels created by Unix.in_channel_of_descr or
4816 Unix.out_channel_of_descr no longer support text mode under Windows.
4817 Calling [set_binary_mode_{in,out} chan false] on these channels
4818 now causes an error.
4819 (Xavier Leroy)
4820
4821 - #4023 and #68: add Unix.sleepf (sleep with sub-second resolution)
4822 (Evgenii Lepikhin and Xavier Leroy)
4823
4824 * Protect Unix.sleep against interruptions by handled signals.
4825 Before, a handled signal could cause Unix.sleep to return early.
4826 Now, the sleep is restarted until the given time is elapsed.
4827 (Xavier Leroy)
4828
4829 * #6120, #462: implement Unix.symlink and Unix.readlink on
4830 Windows. Unix.symlink has a new optional argument to_dir (ignored on
4831 non-native Windows platforms). stat functions reimplemented to avoid
4832 buggy Microsoft CRT implementations (native Windows only)
4833 (David Allsopp, review by Daniel Bünzli)
4834
4835 - #6263: add kind_size_in_bytes and size_in_bytes functions
4836 to Bigarray module.
4837 (Runhang Li, review by Mark Shinwell)
4838
4839 - #6289: Unix.utimes uses the current time only if both arguments
4840 are exactly 0.0. Also, use sub-second resolution if available.
4841 (Xavier Leroy, report by Christophe Troestler)
4842
4843 - #6896: serious reimplementation of Big_int.float_of_big_int and
4844 Ratio.float_of_ratio, ensuring that the result is correctly rounded.
4845 (Xavier Leroy)
4846
4847 - #6989: in Str library, make sure that all \(...\) groups are binding
4848 and can be consulted with Str.matched_group. There used to be
4849 a limitation to 32 binding groups.
4850 (Xavier Leroy)
4851
4852 - #7013: spurious wake-up in the Event module
4853 (Xavier Leroy)
4854
4855 - #7024: in documentation of Str regular expressions, clarify what
4856 "end of line" means for "^" and "$" regexps.
4857 (Xavier Leroy, question by Fredrik Lindgren)
4858
4859 - #7209: do not run at_exit handlers in [Unix.create_process] and
4860 similar functions when the [exec] call fails in the child process
4861 (Jérémie Dimino)
4862
4863 ### OCamldep:
4864
4865 - #286: add support for module aliases
4866 (Jacques Garrigue)
4867
4868 ### Manual:
4869
4870 - #302: The OCaml reference manual is now included in the manual/
4871 subdirectory of the main OCaml source repository. Contributions to
4872 the manual are warmly welcome.
4873 (François Bobot, review by Florian Angeletti)
4874
4875 - #6601: replace strcpy with caml_strdup in sample code
4876 (Christopher Zimmermann)
4877
4878 - #6676: ongoing simplification of the "Language Extensions" section
4879 (Alain Frisch, John Whitington)
4880
4881 - #6898: Update win32 support documentation of the Unix library
4882 (Damien Doligez, report by Daniel Bünzli)
4883
4884 - #7092, #379: Add missing documentation for new 4.03 features
4885 (Florian Angeletti)
4886
4887 - #7094, #468, #551: add new section 8.5 to document warnings
4888 The general idea is to document warnings that may require explanations.
4889 Currently documented warnings are:
4890 - 52: Fragile constant pattern.
4891 - 57: Ambiguous or-pattern variables under guard
4892 (Florian Angeletti and Gabriel Scherer)
4893
4894 - #7109, #380: Fix bigarray documentation layout
4895 (Florian Angeletti, Leo White)
4896
4897 ### Bug fixes:
4898
4899 - #3612: memory leak in bigarray read from file
4900 (Pierre Chambart, report by Gary Huber)
4901
4902 * #4166, #6956: force linking when calling external C primitives
4903 (Jacques Garrigue, reports by Markus Mottl and Christophe Troestler)
4904
4905 * #4466, #5325: under Windows, concurrent read and write operations
4906 on the same socket could block unexpectedly. Fixed by keeping sockets
4907 in asynchronous mode rather than creating them in synchronous mode.
4908 (Xavier Leroy)
4909
4910 * #4539: change exception string raised when comparing functional values
4911 May break programs matching on the string argument of Invalid_argument.
4912 Matching on the string argument of Invalid_argument or Failure is a
4913 programming mistake: these strings may change in future versions.
4914 (Nicolas Braud-Santoni, report by Eric Cooper)
4915
4916 - #4832: Filling bigarrays may block out runtime
4917 (Markus Mottl)
4918
4919 - #5663: program rejected due to nongeneralizable type variable that
4920 appears nowhere
4921 (Jacques Garrigue, report by Stephen Weeks)
4922
4923 - #5780: report more informative type names in GADTs error messages
4924 (Jacques Garrigue, report by Sebastien Furic)
4925
4926 - #5887: move the byterun/*.h headers to byterun/caml/*.h to avoid header
4927 name clashes
4928 (Jérôme Vouillon and Adrien Nader and whitequark)
4929
4930 * #6081: ocaml now adds script's directory to search path, not current
4931 directory
4932 (Thomas Leonard and Damien Doligez)
4933
4934 - #6108, #6802: fail cleanly if dynlink.cma or ocamltoplevel.cma
4935 are loaded inside the toplevel loop.
4936 (Xavier Leroy)
4937
4938 - #6171: Confusing error message when a type escapes its scope.
4939 (Jacques Garrigue and Leo White, report by John Whitington)
4940
4941 - #6340: Incorrect handling of \r when processing "Windows" source files
4942 (Damien Doligez, report by David Allsopp)
4943
4944 - #6342: Incorrect error message when type constraints differ
4945 (Alain Frisch, report by Philippe Wang)
4946
4947 * #6521: {Bytes,Char,String}.escaped were locale-dependent
4948 we now escape all non-ASCII-printable instead of a locale-dependent subset.
4949 (Damien Doligez, report by Jun Furuse)
4950
4951 - #6526: ocamllex should not warn on unescaped newline inside comments
4952 (Damien Doligez, report by user 'dhekir')
4953
4954 - #6341: ocamldoc -colorize-code adds spurious <br> tags to <pre> blocks
4955 (Maxence Guesdon, report by Damien Doligez)
4956
4957 - #6560: Wrong failure message for {Int32,Int64,NativeInt}.of_string
4958 It reported (Failure "int_of_string"), now "Int32.of_string" etc.
4959 (Maxime Dénès and Gabriel Scherer)
4960
4961 - #6648: show_module should indicate its elision
4962 (Jacques Garrigue, report by Leo White)
4963
4964 - #6650: Cty_constr not handled correctly by Subst
4965 (Jacques Garrigue, report by Leo White)
4966
4967 - #6651: Failing component lookup
4968 (Jacques Garrigue, report by Leo White)
4969
4970 * #6664: Crash when finalising lazy values of the wrong type.
4971 (Damien Doligez)
4972
4973 - #6672: Unused variance specification allowed in with constraint
4974 (Jacques Garrigue, report by Leo White)
4975
4976 - #6677: Allow to disable warning 39 (useless "rec") with [@ocaml.warning]
4977 applied to the first value binding of the would-be "rec" declaration
4978 (Alain Frisch, report by Jun Furuse)
4979
4980 - #6744: Univars can escape through polymorphic variants (partial fix)
4981 (Jacques Garrigue, report by Leo White)
4982
4983 - #6752: Extensible variant types and scope escaping
4984 A side-effect of the fix is that (ocamlc -i) sometimes reports
4985 (type-sound) invalid signature, with a type used before its declaration.
4986 (Jacques Garrigue, report by Maxence Guesdon)
4987
4988 - #6762: improve warning 45 in presence of re-exported type definitions
4989 (Warning 45: open statement shadows the constructor)
4990 (Alain Frisch, report by Olivier Andrieu)
4991
4992 - #6776: Failure to kill the "tick" thread, segfault when exiting the runtime
4993 (Damien Doligez, report by Thomas Braibant)
4994
4995 - #6780: Poor error message for wrong -farch and -ffpu options (ocamlopt, ARM)
4996 (Xavier Leroy, report by whitequark)
4997
4998 - #6805: Duplicated expression in case of hole in a non-failing switch.
4999 (Luc Maranget)
5000
5001 * #6808: the parsing of OCAMLRUNPARAM is too lax
5002 (Damien Doligez)
5003
5004 - #6874: Inefficient code generated for module function arguments
5005 (Jacques Garrigue, report by Markus Mottl)
5006
5007 - #6888: The list command of ocamldebug uses the wrong file
5008 (Damien Doligez, report by Pierre-Marie Pédrot)
5009
5010 - #6897: Bad error message for some pattern matching on extensible variants
5011 (Alain Frisch, report by Gabriel Radanne)
5012
5013 - #6899: Optional parameters and non generalizable type variables
5014 (Thomas Refis and Leo White)
5015
5016 - #6907: Stack overflow printing error in class declaration
5017 (Jacques Garrigue, report by Ivan Gotovchits)
5018
5019 - #6931: Incorrect error message on type error inside record construction
5020 (Damien Doligez, report by Leo White)
5021
5022 - #6938: fix regression on "%047.27{l,L,n}{d,i,x,X,o,u}"
5023 (Benoît Vaugon, report by Arduino Cascella)
5024
5025 - #6944: let module X = Path in … is not typed as a module alias
5026 (Jacques Garrigue, report by Frédéric Bour)
5027
5028 - #6945 and #227: protect Sys and Unix functions against string
5029 arguments containing the null character '\000'
5030 (Simon Cruanes and Xavier Leroy, report by Daniel Bünzli)
5031
5032 - #6946: Uncaught exception with wrong type for "%ignore"
5033 (Jacques Garrigue, report by Leo White)
5034
5035 - #6954: Infinite loop in type checker with module aliases
5036 (Jacques Garrigue, report by Markus Mottl)
5037
5038 - #6972, #276: 4.02.3 regression on documentation comments in .cmt files
5039 (Leo White, report by Olivier Andrieu)
5040
5041 - #6977: String literals in comments interpret escape sequences
5042 (Damien Doligez, report by Daniel Bünzli and David Sheets)
5043
5044 - #6980: Assert failure from polymorphic variants and existentials
5045 (Jacques Garrigue, report by Leo White)
5046
5047 - #6981: Ctype.Unify(_) with associated functor arg referring to previous one
5048 (Jacques Garrigue, report by Nicholas Labich)
5049
5050 - #6982: unexpected type error when packing a module alias
5051 (Jacques Garrigue, report by Valentin Gatien-Baron)
5052
5053 - #6985: `module type of struct include Bar end exposes
5054 %s#row when Bar contains private row types
5055 (Jacques Garrigue, report by Nicholas Labich)
5056
5057 - #6992: Segfault from bug in GADT/module typing
5058 (Jacques Garrigue, report by Stephen Dolan)
5059
5060 - #6993: Segfault from recursive modules violating exhaustiveness assumptions
5061 (Jacques Garrigue, report by Stephen Dolan)
5062
5063 - #6998: Typer fails reading unnecessary cmis with -no-alias-deps and -w -49
5064 (Leo White, report by Valentin Gatien-Baron)
5065
5066 - #7003: String.sub may cause segmentation fault on sizes above 2^31
5067 (Damien Doligez, report by Radek Micek)
5068
5069 - #7008: Fatal error in ocamlc with empty compilation unit name
5070 (Damien Doligez, report by Cesar Kunz)
5071
5072 - #7012: Variable name forgotten when it starts with a capital letter
5073 (Jacques Garrigue, Gabriel Scherer,
5074 report by Thomas Leonard and Florian Angeletti)
5075
5076 - #7016: fix Stack overflow in GADT typing
5077 Note: Equi-recursive types are considered when checking GADT pattern
5078 exhaustiveness, even when -rectypes is not used.
5079 (Jacques Garrigue, report by Mikhail Mandrykin)
5080
5081 - #7030: libasmrun_shared.so fails to build on SPARC Solaris
5082 (report and fix by Patrick Star)
5083
5084 - #7036: Module alias is not taken into account when checking module
5085 type compatibility (in a class type)
5086 (Jacques Garrigue)
5087
5088 - #7037: more reproducible builds, don't put temp file names into objects
5089 (Xavier Leroy)
5090
5091 - #7038: out of memory condition in caml_io_mutex_lock
5092 (Xavier Leroy, report by Marc Lasson)
5093
5094 - #7039: Unix.getsockname returns garbage for unnamed PF_UNIX sockets
5095 (Xavier Leroy)
5096
5097 - #7042 and #295: CSE optimization confuses the FP literals +0.0 and -0.0
5098 (Xavier Leroy)
5099
5100 - #7075: Fix repetitions in ocamldoc generated documentation
5101 (Florian Angeletti)
5102
5103 - #7082: Object type in recursive module's `with` annotation
5104 (Jacques Garrigue and Alain Frisch, report by Nicholas Labich)
5105
5106 - #7096: ocamldoc uses an incorrect subscript/superscript style
5107 (Gabriel Scherer, report by user 'pierpa')
5108
5109 - #7108: ocamldoc, have -html preserve custom/extended html generators
5110 (Armaël Guéneau)
5111
5112 - #7111: reject empty let bindings instead of printing incorrect syntax
5113 (Jérémie Dimino)
5114
5115 * #7113: -safe-string can break GADT compatibility check
5116 bytes and string are now considered compatible even with -safe-string,
5117 which may break exhaustivity for code assuming they were disjoint
5118 (Jacques Garrigue, report by Jeremy Yallop)
5119
5120 - #7115: shadowing in a branch of a GADT match breaks unused variable warning
5121 (Alain Frisch, report by Valentin Gatien-Baron)
5122
5123 - #7133, #450: generate local jump labels on OS X
5124 (Bart Jacobs)
5125
5126 - #7135: only warn about ground coercions in -principal mode
5127 (Jacques Garrigue, report by Jeremy Yallop)
5128
5129 * #7152: Typing equality involving non-generalizable type variable
5130 A side-effect of the fix is that, for deeply nested non generalizable
5131 type variables, having an interface file may no longer be sufficient,
5132 and you may have to add a local type annotation (cf #7313)
5133 (Jacques Garrigue, report by François Bobot)
5134
5135 - #7160: Type synonym definitions can weaken gadt constructor types
5136 (Jacques Garrigue, report by Mikhail Mandrykin)
5137
5138 - #7181: Misleading error message with GADTs and polymorphic variants
5139 (Jacques Garrigue, report by Pierre Chambart)
5140
5141 - #7182: Assertion failure with recursive modules and externals
5142 (Jacques Garrigue, report by Jeremy Yallop)
5143
5144 - #7196: "let open" is not correctly pretty-printed to the left of a ';'
5145 (Gabriel Scherer, report by Christophe Raffalli)
5146
5147 - #7214: Assertion failure in Env.add_gadt_instances
5148 (Jacques Garrigue, report by Stephen Dolan)
5149
5150 - #7220: fix a memory leak when using both threads and exception backtraces
5151 (Gabriel Scherer, review by François Bobot, report by Rob Hoes)
5152
5153 - #7222: Escaped existential type
5154 (Jacques Garrigue, report by Florian Angeletti)
5155
5156 - #7230: Scrutinee discarded in match with only refutation cases
5157 (Jacques Garrigue, report by Jeremy Yallop)
5158
5159 - #7234: Compatibility check wrong for abstract type constructors
5160 (Jacques Garrigue, report by Stephen Dolan)
5161
5162 - #7324: OCaml 4.03.0 type checker dies with an assert failure when
5163 given some cyclic recursive module expression
5164 (Jacques Garrigue, report by jmcarthur)
5165
5166 - #7368: Manual major GC fails to compact the heap
5167 (Krzysztof Pszeniczny)
5168
5169 - #205: Clear caml_backtrace_last_exn before registering as root
5170 (report and fix by Frédéric Bour)
5171
5172 - #220: minor -dsource error on recursive modules
5173 (Hongbo Zhang)
5174
5175 - #228: fix a dangling internal pointer in (bytecode )debug_info
5176 (Gabriel Scherer and Mark Shinwell and Xavier Leroy)
5177
5178 - #233: Make CamlinternalMod.init_mod robust to optimization
5179 (Pierre Chambart, Mark Shinwell)
5180
5181 - #249: fix a few hardcoded ar commands
5182 (Daniel Bünzli)
5183
5184 - #251: fix cross-compilation with ocamldoc enabled
5185 (whitequark)
5186
5187 - #280: Fix stdlib dependencies for .p.cmx
5188 (Pierre Chambart, Mark Shinwell)
5189
5190 - #283: Fix memory leaks in intern.c when OOM is raised
5191 (Marc Lasson, review by Alain Frisch)
5192
5193 - #22: Fix the cleaning of weak pointers. In very rare cases
5194 accessing a value during the cleaning of the weak pointers could
5195 result in the value being removed from one weak arrays and kept in
5196 another one. That breaks the property that a value is removed from a
5197 weak pointer only when it is dead and garbage collected.
5198 (François Bobot, review by Damien Doligez)
5199
5200 - #313: Prevent quadratic cases in CSE
5201 (Pierre Chambart, review by Xavier Leroy)
5202
5203 - #6795, #6996: Make ocamldep report errors passed in
5204 [%ocaml.error] extension points
5205 (Jérémie Dimino)
5206
5207 - #355: make ocamlnat build again
5208 (Jérémie Dimino, Thomas Refis)
5209
5210 - #405: fix compilation under Visual Studio 2015
5211 (David Allsopp)
5212
5213 - #441: better type error location in presence of type constraints
5214 (Thomas Refis, report by Arseniy Alekseyev)
5215
5216 - #477: reallow docstrings inside object types, and inside polymorphic
5217 variant and arrow types
5218 (Thomas Refis)
5219
5220 ### Features wishes:
5221
5222 - #4518, #29: change location format for reporting errors in ocamldoc
5223 (Sergei Lebedev)
5224
5225 - #4714: List.cons
5226
5227 - #5418 (comments) : generate dependencies with $(CC) instead of gcc
5228 (Damien Doligez, report by Michael Grünewald)
5229
5230 - #6167: OCAMLPARAM support for disabling PIC generation ("pic=0")
5231 (Gabor Pali)
5232
5233 - #6367, #25: introduce Asttypes.arg_label to encode labelled arguments
5234 (Frédéric Bour and Jacques Garrigue)
5235
5236 - #6452, #140: add internal support for custom printing formats
5237 (Jérémie Dimino)
5238
5239 - #6611: remove the option wrapper on optional arguments in the syntax tree
5240 (Alain Frisch, review by Damien Doligez, request by whitequark)
5241
5242 - #6635: support M.[], M.(), M.{< >} and M.[| |]
5243 (Jeremy Yallop, review by Gabriel Radanne)
5244
5245 - #6691: install .cmt[i] files for stdlib and compiler-libs
5246 (David Sheets, request by Gabriel Radanne)
5247
5248 - #6722: compatibility with x32 architecture (x86-64 in ILP32 mode).
5249 ocamlopt is not supported, but bytecode compiles cleanly.
5250 (Adam Borowski and Xavier Leroy)
5251
5252 - #6742: remove duplicate virtual_flag information from Tstr_class
5253 (Gabriel Radanne and Jacques Garrigue)
5254
5255 - #6719: improve Buffer.add_channel when not enough input is available
5256 (Simon Cruanes)
5257
5258 * #6816: reject integer and float literals directly followed by an identifier.
5259 This was previously read as two separate tokens.
5260 [let abc = 1 in (+) 123abc] was accepted and is now rejected.
5261 (Hugo Heuzard)
5262
5263 - #6876: improve warning 6 by listing the omitted labels.
5264 (Warning 6: Label omitted in function application)
5265 (Eyyüb Sari)
5266
5267 - #6924: tiny optim to avoid some spilling of floats in x87
5268 (Alain Frisch)
5269
5270 - #111: `(f [@taillcall]) x y` warns if `f x y` is not a tail-call
5271 (Simon Cruanes)
5272
5273 - #118: ocamldep -allow-approx: fallback to a lexer-based approximation
5274 (Frédéric Bour)
5275
5276 - #137: add untypeast.ml (in open recursion style) to compiler-libs
5277 (Gabriel Radanne)
5278
5279 - #142: add a CAMLdrop macro for undoing CAMLparam*/CAMLlocal*
5280 (Thomas Braibant and Damien Doligez)
5281
5282 - #145: speeedup bigarray access by optimizing Cmmgen.bigarray_indexing
5283 (Vladimir Brankov, review by Gabriel Scherer)
5284
5285 - #147: [type 'a result = Ok of 'a | Error of 'b] in Pervasives
5286 (Yaron Minsky)
5287
5288 - #156, #279: optimize caml_frame_descriptors realloc (dynlink speedup)
5289 (Pierre Chambart, Alain Frisch,
5290 review by François Bobot, Xavier Leroy and Damien Doligez)
5291
5292 - #165, #221: fix windows compilation warnings
5293 (Bernhard Schommer, Gabriel Scherer, report by Alain Frisch)
5294
5295 * #170: Parse arbitrary precision integers.
5296 Accept a single [A-Za-z] as modifier for integers (generalizing 'l','L','n')
5297 and floats.
5298 May cause breakage (ie. ppx preprocessor) because of changes in the parsetree.
5299 This changes #6816 a little bit by reading the literal [123a] as a single
5300 token that can later be rewritten by a ppx preprocessor.
5301 (Hugo Heuzard)
5302
5303 - #189: Added .dylib and .so as extensions for ocamlmklib
5304 (Edgar Aroutiounian, whitequark)
5305
5306 - #191: Making gc.h and some part of memory.h public
5307 (Thomas Refis)
5308
5309 - #196: Make [Thread.id] and [Thread.self] [noalloc]
5310 (Clark Gaebel)
5311
5312 - #237: a CONTRIBUTING document
5313 (François Bobot, Gabriel Scherer, review by Xavier Leroy)
5314
5315 - #245: remove a few remaining French comments
5316 (Florian Angeletti)
5317
5318 - #252: improve build instructions in MSVC Windows README
5319 (Philip Daian)
5320
5321 - #308: add experimental support for NetBSD/arm (verified on RaspberryPi)
5322 (Rich Neswold)
5323
5324 - #335: Type error messages specifies if a type is abstract
5325 because no corresponding cmi could be found.
5326 (Hugo Heuzard)
5327
5328 - #365: prevent printing just a single type variable on one side
5329 of a type error clash.
5330 (Hugo Heuzard)
5331
5332 - #383: configure: define _ALL_SOURCE for build on AIX7.1
5333 (tkob)
5334
5335 - #401: automatically retry failed test directories in the testsuite
5336 (David Allsopp)
5337
5338 - #451: an optional 'parallel' target in testsuite/Makefile using the
5339 GNU parallel tool to run tests in parallel.
5340 (Gabriel Scherer)
5341
5342 - #555: ensure that register typing constraints are respected at
5343 join points in the control flow graph
5344 (Mark Shinwell, debugging & test case by Arseniy Alekseyev and Leo White,
5345 code review by Xavier Leroy)
5346
5347 ### Build system:
5348
5349 - #388: FlexDLL added as a Git submodule and bootstrappable with the compiler
5350 (David Allsopp)
5351
5352 OCaml 4.02.3 (27 Jul 2015):
5353 ---------------------------
5354
5355 Bug fixes:
5356 - #6908: Top-level custom printing for GADTs: interface change in 4.02.2
5357 (Grégoire Henry, report by Jeremy Yallop)
5358 - #6919: corrupted final_table
5359 (ygrek)
5360 - #6926: Regression: ocamldoc lost unattached comment
5361 (Damien Doligez, report by François Bobot)
5362 - #6930: Aliased result type of GADT constructor results in assertion failure
5363 (Jacques Garrigue)
5364
5365 Feature wishes:
5366 - #6691: install .cmt[i] files for stdlib and compiler-libs
5367 (David Sheets, request by Gabriel Radanne)
5368 - #37: New primitive: caml_alloc_dummy_function
5369 (Hugo Heuzard)
5370
5371 OCaml 4.02.2 (17 Jun 2015):
5372 ---------------------------
5373
5374 (Changes that can break existing programs are marked with a "*")
5375
5376 Language features:
5377 - #6583: add a new class of binary operators with the same syntactic
5378 precedence as method calls; these operators start with # followed
5379 by a non-empty sequence of operator symbols (for instance #+, #!?).
5380 It is also possible to use '#' as part of these extra symbols
5381 (for instance ##, or #+#); this is rejected by the type-checker,
5382 but can be used e.g. by ppx rewriters.
5383 (Alain Frisch, request by Gabriel Radanne)
5384 * #6016: add a "nonrec" keyword for type declarations
5385 (Jérémie Dimino)
5386 * #6612, #152: change the precedence of attributes in type declarations
5387 (Jérémie Dimino)
5388
5389 Compilers:
5390 - #6600: make -short-paths faster by building the printing map
5391 incrementally
5392 (Jacques Garrigue)
5393 - #6642: replace $CAMLORIGIN in -ccopt with the path to cma or cmxa
5394 (whitequark, Gabriel Scherer, review by Damien Doligez)
5395 - #6797: new option -output-complete-obj
5396 to output an object file with included runtime and autolink libraries
5397 (whitequark)
5398 - #6845: -no-check-prims to tell ocamlc not to check primitives in runtime
5399 (Alain Frisch)
5400 - #149: Attach documentation comments to parse tree
5401 (Leo White)
5402 - #159: Better locations for structure/signature items
5403 (Leo White)
5404
5405 Toplevel and debugger:
5406 - #5958: generalized polymorphic #install_printer
5407 (Pierre Chambart and Grégoire Henry)
5408
5409 OCamlbuild:
5410 - #6237: explicit "infer" tag to control or disable menhir --infer
5411 (Hugo Heuzard)
5412 - #6625: pass -linkpkg to files built with -output-obj.
5413 (whitequark)
5414 - #6702: explicit "linkpkg" and "dontlink(foo)" flags
5415 (whitequark, Gabriel Scherer)
5416 - #6712: Ignore common VCS directories
5417 (whitequark)
5418 - #6720: pass -g to C compilers when tag 'debug' is set
5419 (whitequark, Gabriel Scherer)
5420 - #6733: add .byte.so and .native.so targets to pass
5421 -output-obj -cclib -shared.
5422 (whitequark)
5423 - #6733: "runtime_variant(X)" to pass -runtime-variant X option.
5424 (whitequark)
5425 - #6774: new menhir-specific flags "only_tokens" and "external_tokens(Foo)"
5426 (François Pottier)
5427
5428 Libraries:
5429 - #6285: Add support for nanosecond precision in Unix.stat()
5430 (Jérémie Dimino, report by user 'gfxmonk')
5431 - #6781: Add higher baud rates to Unix termios
5432 (Damien Doligez, report by Berke Durak)
5433 - #6834: Add Obj.{first,last}_non_constant_constructor_tag
5434 (Mark Shinwell, request by Gabriel Scherer)
5435
5436 Runtime:
5437 - #6078: Release the runtime system when calling caml_dlopen
5438 (Jérémie Dimino)
5439 - #6675: GC hooks
5440 (Damien Doligez and Roshan James)
5441
5442 Build system:
5443 - #5418 (comments) : generate dependencies with $(CC) instead of gcc
5444 (Damien Doligez and Michael Grünewald)
5445 - #6266: Cross compilation for iOs, Android etc
5446 (whitequark, review by Damien Doligez and Mark Shinwell)
5447
5448 Installation procedure:
5449 - Update instructions for x86-64 PIC mode and POWER architecture builds
5450 (Mark Shinwell)
5451
5452 Bug fixes:
5453 - #5271: Location.prerr_warning is hard-coded to use Format.err_formatter
5454 (Damien Doligez, report by Rolf Rolles)
5455 - #5395: OCamlbuild mishandles relative symlinks and include paths
5456 (Damien Doligez, report by Didier Le Botlan)
5457 - #5822: wrong value of Options.ext_dll on windows
5458 (Damien Doligez and Daniel Weil)
5459 - #5836, #6684: printing lazy values in ocamldebug may segfault
5460 (Gabriel Scherer, request by the Coq team)
5461 - #5887: move the byterun/*.h headers to byterun/caml/*.h to avoid
5462 header name clashes
5463 (Jérôme Vouillon and Adrien Nader and whitequark)
5464 - #6281: Graphics window does not acknowledge second click (double click)
5465 (Kyle Headley)
5466 - #6490: incorrect backtraces in gdb on AArch64. Also fixes incorrect
5467 backtraces on 32-bit ARM.
5468 (Mark Shinwell)
5469 - #6573: extern "C" for systhreads/threads.h
5470 (Mickaël Delahaye)
5471 - #6575: Array.init evaluates callback although it should not do so
5472 (Alain Frisch, report by Gerd Stolpmann)
5473 - #6607: The manual doesn't mention 0x200 flag for OCAMLRUNPARAM=v
5474 (Alain Frisch)
5475 - #6616: allow meaningful use of -use-runtime without -custom.
5476 (whitequark)
5477 - #6617: allow android build with pthreads support (since SDK r10c)
5478 (whitequark)
5479 - #6626: ocamlbuild on cygwin cannot find ocamlfind
5480 (Gergely Szilvasy)
5481 - #6628: Configure script rejects legitimate arguments
5482 (Michael Grünewald, Damien Doligez)
5483 - #6630: Failure of tests/prim-bigstring/{big,}string.ml on big-endian
5484 architectures
5485 (Pierre Chambart, testing by Mark Shinwell)
5486 - #6640: ocamlbuild: wrong "unused tag" warning on "precious"
5487 (report by user 'william')
5488 - #6652: ocamlbuild -clean does not print a newline after output
5489 (Damien Doligez, report by Andi McClure)
5490 - #6658: cross-compiler: version check not working on OS X
5491 (Gerd Stolpmann)
5492 - #6665: Failure of tests/asmcomp on sparc
5493 (Stéphane Glondu)
5494 - #6667: wrong implementation of %bswap16 on ARM64
5495 (Xavier Leroy)
5496 - #6669: fix 4.02 regression in toplevel printing of lazy values
5497 (Leo White, review by Gabriel Scherer)
5498 - #6671: Windows: environment variable 'TZ' affects Unix.gettimeofday
5499 (Mickaël Delahaye and Damien Doligez)
5500 - #6680: Missing parentheses in warning about polymorphic variant value
5501 (Jacques Garrigue and Gabriel Scherer, report by Philippe Veber)
5502 - #6686: Bug in [subst_boxed_number]
5503 (Jérémie Dimino, Mark Shinwell)
5504 - #6690: Uncaught exception (Not_found) with (wrong) wildcard or unification
5505 type variable in place of a local abstract type
5506 (Jacques Garrigue, report by Mikhail Mandrykin)
5507 - #6693 (part two): Incorrect relocation types in x86-64 runtime system
5508 (whitequark, review by Jacques-Henri Jourdan, Xavier Leroy and Mark Shinwell)
5509 - #6717: Pprintast does not print let-pattern attributes
5510 (Gabriel Scherer, report by whitequark)
5511 - #6727: Printf.sprintf "%F" misbehavior
5512 (Benoît Vaugon, report by Vassili Karpov)
5513 - #6747: ocamlobjinfo: missing symbol caml_plugin_header due to underscore
5514 (Damien Doligez, Maverick Woo)
5515 - #6749: ocamlopt returns n for (n mod 1) instead of 0
5516 (Mark Shinwell and Jérémie Dimino)
5517 - #6753: Num.quo_num and Num.mod_num incorrect for some negative arguments
5518 (Xavier Leroy)
5519 - #6758: Ocamldoc "analyse_module: parsetree and typedtree don't match"
5520 (Damien Doligez, report by user 'maro')
5521 - #6759: big_int_of_string incorrectly parses some hexa literals
5522 (Damien Doligez, report by Pierre-yves Strub)
5523 - #6763: #show with -short-paths doesn't select shortest type paths
5524 (Jacques Garrigue, report by David Sheets)
5525 - #6768: Typechecker overflow the stack on cyclic type
5526 (Jacques Garrigue, report by user 'darktenaibre')
5527 - #6770: (duplicate of #6686)
5528 - #6772: asmrun/signals_asm.c doesn't compile on NetBSD/i386
5529 (Kenji Tokudome)
5530 - #6775: Digest.file leaks file descriptor on error
5531 (Valentin Gatien-Baron)
5532 - #6779: Cross-compilers cannot link bytecode using custom primitives
5533 (Damien Doligez, request by whitequark)
5534 - #6787: Soundness bug with polymorphic variants
5535 (Jacques Garrigue, with help from Leo White and Grégoire Henry,
5536 report by Michael O'Connor)
5537 - #6790: otherlibs should be built with -g
5538 (Damien Doligez, report by whitequark)
5539 - #6791: "%s@[", "%s@{" regression in Scanf
5540 (Benoît Vaugon)
5541 - #6793: ocamlbuild passes nonsensical "-ocamlc ..." commands to menhir
5542 (Gabriel Scherer, report by Damien Doligez)
5543 - #6799: include guards missing for unixsupport.h and other files
5544 (Andreas Hauptmann)
5545 - #6810: Improve documentation of Bigarray.Genarray.map_file
5546 (Mark Shinwell and Daniel Bünzli)
5547 - #6812: -short-paths and -no-alias-deps can create inconsistent assumptions
5548 (Jacques Garrigue, report by Valentin Gatien-Baron)
5549 - #6817: GADT exhaustiveness breakage with modules
5550 (Leo White, report by Pierre Chambart)
5551 - #6824: fix buffer sharing on partial application of Format.asprintf
5552 (Gabriel Scherer, report by Alain Frisch)
5553 - #6831: Build breaks for -aspp gcc on solaris-like OSs
5554 (John Tibble)
5555 - #6836: Assertion failure using -short-paths
5556 (Jacques Garrigue, report by David Sheets)
5557 - #6837: Build profiling libraries on FreeBSD and NetBSD x86-64
5558 (Mark Shinwell, report by Michael Grünewald)
5559 - #6841: Changing compilation unit name with -o breaks ocamldebug
5560 (Jacques Garrigue, report by Jordan Walke)
5561 - #6842: export Typemod.modtype_of_package
5562 - #6843: record weak dependencies even when the .cmi is missing
5563 (Leo White, Gabriel Scherer)
5564 - #6849: Inverted pattern unification error
5565 (Jacques Garrigue, report by Leo White)
5566 - #6857: __MODULE__ doesn't give the current module with -o
5567 (Jacques Garrigue, report by Valentin Gatien-Baron)
5568 - #6862: Exhaustiveness check wrong for class constructor arguments
5569 (Jacques Garrigue)
5570 - #6869: Improve comment on [Hashtbl.hash_param]
5571 (Mark Shinwell, report by Jun Furuse)
5572 - #6870: Unsoundness when -rectypes fails to detect non-contractive type
5573 (Jacques Garrigue, report by Stephen Dolan)
5574 - #6872: Type-directed propagation fails to disambiguate variants
5575 that are also exception constructors
5576 (Jacques Garrigue, report by Romain Beauxis)
5577 - #6878: AArch64 backend generates invalid asm: conditional branch
5578 out of range (Mark Shinwell, report by Richard Jones, testing by Richard
5579 Jones and Xavier Leroy, code review by Xavier Leroy and Thomas Refis)
5580 - #6879: Wrong optimization of 1 mod n
5581 (Mark Shinwell, report by Jean-Christophe Filliâtre)
5582 - #6884: The __CYGWIN32__ #define should be replaced with __CYGWIN__
5583 (Adrien Nader)
5584 - #6886: -no-alias-deps allows to build self-referential compilation units
5585 (Jacques Garrigue, report by Valentin Gatien-Baron)
5586 - #6889: ast_mapper fails to rewrite class attributes
5587 (Sébastien Briais)
5588 - #6893: ocamlbuild: "tag not used" warning when using (p)dep
5589 (Gabriel Scherer, report by Christiano Haesbaert)
5590 - #143: fix getsockopt behaviour for boolean socket options
5591 (Anil Madhavapeddy and Andrew Ray)
5592 - #190: typo in pervasives
5593 (Guillaume Bury)
5594 - Misplaced assertion in major_gc.c for no-naked-pointers mode
5595 (Stephen Dolan, Mark Shinwell)
5596
5597 Feature wishes:
5598 - #6452, #140: add internal support for custom printing formats
5599 (Jérémie Dimino)
5600 - #6641: add -g, -ocamlcflags, -ocamloptflags options to ocamlmklib
5601 (whitequark)
5602 - #6693: also build libasmrun_shared.so and lib{asm,caml}run_pic.a
5603 (whitequark, review by Mark Shinwell)
5604 - #6842: export Typemod.modtype_of_package
5605 (Jacques Garrigue, request by Jun Furuse)
5606 - #139: more versatile specification of locations of .annot
5607 (Christophe Troestler, review by Damien Doligez)
5608 - #171: allow custom warning printers / catchers
5609 (Benjamin Canou, review by Damien Doligez)
5610 - #191: Making gc.h and some part of memory.h public
5611 (Thomas Refis)
5612
5613 OCaml 4.02.1 (14 Oct 2014):
5614 ---------------------------
5615
5616 (Changes that can break existing programs are marked with a "*")
5617
5618 Standard library:
5619 * Add optional argument ?limit to Arg.align.
5620
5621 Bug Fixes:
5622 - #4099: Bug in Makefile.nt: won't stop on error
5623 (George Necula)
5624 - #6181: Improve MSVC build
5625 (Chen Gang)
5626 - #6207: Configure doesn't detect features correctly on Haiku
5627 (Jessica Hamilton)
5628 - #6466: Non-exhaustive matching warning message for open types is confusing
5629 (whitequark)
5630 - #6529: fix quadratic-time algorithm in Consistbl.extract.
5631 (Xavier Leroy, Alain Frisch, relase-worthy report by Kate Deplaix)
5632 - #6530: Add stack overflow handling for native code (OpenBSD i386 and amd64)
5633 (Cristopher Zimmermann)
5634 - #6533: broken semantics of %(%) when substituted by a box
5635 (Benoît Vaugon, report by Boris Yakobowski)
5636 - #6534: legacy support for %.10s
5637 (Benoît Vaugon, Gabriel Scherer, report by Nick Chapman)
5638 - #6536: better documentation of flag # in format strings
5639 (Damien Doligez, report by Nick Chapman)
5640 - #6544: Bytes and CamlinternalFormat missing from threads stdlib.cma
5641 (Christopher Zimmermann)
5642 - #6546: -dsource omits parens for `List ((`String "A")::[]) in patterns
5643 (Gabriel Scherer, report by whitequark)
5644 - #6547: __MODULE__ aborts the compiler if the module name cannot be inferred
5645 (Jacques Garrigue, report by Kaustuv Chaudhuri)
5646 - #6549: Debug section is sometimes not readable when using -pack
5647 (Hugo Heuzard, review by Gabriel Scherer)
5648 - #6553: Missing command line options for ocamldoc
5649 (Maxence Guesdon)
5650 - #6554: fix race condition when retrieving backtraces
5651 (Jérémie Dimino, Mark Shinwell).
5652 - #6557: String.sub throws Invalid_argument("Bytes.sub")
5653 (Damien Doligez, report by Oliver Bandel)
5654 - #6562: Fix ocamldebug module source lookup
5655 (Leo White)
5656 - #6563: Inclusion of packs failing to run module initializers
5657 (Jacques Garrigue, report by Mark Shinwell)
5658 - #6564: infinite loop in Mtype.remove_aliases
5659 (Jacques Garrigue, report by Mark Shinwell)
5660 - #6565: compilation fails with Env.Error(_)
5661 (Jacques Garrigue and Mark Shinwell)
5662 - #6566: -short-paths and signature inclusion errors
5663 (Jacques Garrigue, report by Mark Shinwell)
5664 - #6572: Fatal error with recursive modules
5665 (Jacques Garrigue, report by Quentin Stievenart)
5666 - #6575: Array.init evaluates callback although it should not do so
5667 (Alain Frisch, report by Gerd Stolpmann)
5668 - #6578: Recursive module containing alias causes Segmentation fault
5669 (Jacques Garrigue)
5670 - #6581: Some bugs in generative functors
5671 (Jacques Garrigue, report by Mark Shinwell)
5672 - #6584: ocamldep support for "-open M"
5673 (Gabriel Scherer, review by Damien Doligez, report by Hezekiah M. Carty)
5674 - #6588: Code generation errors for ARM
5675 (Mark Shinwell, Xavier Leroy)
5676 - #6590: Improve Windows (MSVC and mingw) build
5677 (Chen Gang)
5678 - #6599: ocamlbuild: add -bin-annot when using -pack
5679 (Christopher Zimmermann)
5680 - #6602: Fatal error when tracing a function with abstract type
5681 (Jacques Garrigue, report by Hugo Herbelin)
5682 - ocamlbuild: add an -ocamlmklib option to change the ocamlmklib command
5683 (Jérôme Vouillon)
5684
5685 OCaml 4.02.0 (29 Aug 2014):
5686 ---------------------------
5687
5688 (Changes that can break existing programs are marked with a "*")
5689
5690 Language features:
5691 - Attributes and extension nodes
5692 (Alain Frisch)
5693 - Generative functors (#5905)
5694 (Jacques Garrigue)
5695 * Module aliases
5696 (Jacques Garrigue)
5697 * Alternative syntax for string literals {id|...|id} (can break comments)
5698 (Alain Frisch)
5699 - Separation between read-only strings (type string) and read-write byte
5700 sequences (type bytes). Activated by command-line option -safe-string.
5701 (Damien Doligez)
5702 - #6318: Exception cases in pattern matching
5703 (Jeremy Yallop, backend by Alain Frisch)
5704 - #5584: Extensible open datatypes
5705 (Leo White)
5706
5707 Build system for the OCaml distribution:
5708 - Use -bin-annot when building.
5709 - Use GNU make instead of portable makefiles.
5710 - Updated build instructions for 32-bit Mac OS X on Intel hardware.
5711
5712 Shedding weight:
5713 * Removed Camlp4 from the distribution, now available as third-party software.
5714 * Removed Labltk from the distribution, now available as a third-party library.
5715
5716 Type system:
5717 * #6235: Keep typing of pattern cases independent in principal mode
5718 (i.e. information from previous cases is no longer used when typing
5719 patterns; cf. '#6235' in testsuite/test/typing-warnings/records.ml)
5720 (Jacques Garrigue)
5721 - Allow opening a first-class module or applying a generative functor
5722 in the body of a generative functor. Allow it also in the body of
5723 an applicative functor if no types are created
5724 (Jacques Garrigue, suggestion by Leo White)
5725 * Module aliases are now typed in a specific way, which remembers their
5726 identity. Compiled interfaces become smaller, but may depend on the
5727 original modules. This also changes the signature inferred by
5728 "module type of".
5729 (Jacques Garrigue, feedback from Leo White, Mark Shinwell and Nick Chapman)
5730 - #6331: Slight change in the criterion to distinguish private
5731 abbreviations and private row types: create a private abbreviation for
5732 closed objects and fixed polymorphic variants.
5733 (Jacques Garrigue)
5734 * #6333: Compare first class module types structurally rather than
5735 nominally. Value subtyping allows module subtyping as long as the internal
5736 representation is unchanged.
5737 (Jacques Garrigue)
5738
5739 Compilers:
5740 - More aggressive constant propagation, including float and
5741 int32/int64/nativeint arithmetic. Constant propagation for floats
5742 can be turned off with option -no-float-const-prop, for codes that
5743 change FP rounding modes at run-time.
5744 (Xavier Leroy)
5745 - New back-end optimization pass: common subexpression elimination (CSE).
5746 (Reuses results of previous computations instead of recomputing them.)
5747 (Xavier Leroy)
5748 - New back-end optimization pass: dead code elimination.
5749 (Removes arithmetic and load instructions whose results are unused.)
5750 (Xavier Leroy)
5751 - #6269: Optimization of sequences of string patterns
5752 (Benoît Vaugon and Luc Maranget)
5753 - Experimental native code generator for AArch64 (ARM 64 bits)
5754 (Xavier Leroy)
5755 - #6042: Optimization of integer division and modulus by constant divisors
5756 (Xavier Leroy and Phil Denys)
5757 - Add "-open" command line flag for opening a single module before typing
5758 (Leo White, Mark Shinwell and Nick Chapman)
5759 * "-o" now sets module name to the output file name up to the first "."
5760 (it also applies when "-o" is not given, i.e. the module name is then
5761 the input file name up to the first ".")
5762 (Leo White, Mark Shinwell and Nick Chapman)
5763 * #5779: better sharing of structured constants
5764 (Alain Frisch)
5765 - #5817: new flag to keep locations in cmi files
5766 (Alain Frisch)
5767 - #5854: issue warning 3 when referring to a value marked with
5768 the [@@ocaml.deprecated] attribute
5769 (Alain Frisch, suggestion by Pierre-Marie Pédrot)
5770 - #6017: a new format implementation based on GADTs
5771 (Benoît Vaugon and Gabriel Scherer)
5772 * #6203: Constant exception constructors no longer allocate
5773 (Alain Frisch)
5774 - #6260: avoid unnecessary boxing in let
5775 (Vladimir Brankov)
5776 - #6345: Better compilation of optional arguments with default values
5777 (Alain Frisch, review by Jacques Garrigue)
5778 - #6389: ocamlopt -opaque option for incremental native compilation
5779 (Pierre Chambart, Gabriel Scherer)
5780
5781 Toplevel interactive system:
5782 - #5377: New "#show_*" directives
5783 (ygrek, Jacques Garrigue and Alain Frisch)
5784
5785 Runtime system:
5786 - New configure option "-no-naked-pointers" to improve performance by
5787 avoiding page table tests during block darkening and the marking phase
5788 of the major GC. In this mode, all out-of-heap pointers must point at
5789 things that look like OCaml values: in particular they must have a valid
5790 header. The colour of said headers should be black.
5791 (Mark Shinwell, reviews by Damien Doligez and Xavier Leroy)
5792 - Fixed bug in native code version of [caml_raise_with_string] that could
5793 potentially lead to heap corruption.
5794 (Mark Shinwell)
5795 * Blocks initialized by [CAMLlocal*] and [caml_alloc] are now filled with
5796 [Val_unit] rather than zero.
5797 (Mark Shinwell)
5798 - Fixed a major performance problem on large heaps (~1GB) by making heap
5799 increments proportional to heap size by default
5800 (Damien Doligez)
5801 - #4765: Structural equality treats exception specifically
5802 (Alain Frisch)
5803 - #5009: efficient comparison/indexing of exceptions
5804 (Alain Frisch, request by Markus Mottl)
5805 - #6075: avoid using unsafe C library functions (strcpy, strcat, sprintf)
5806 (Xavier Leroy, reports from user 'jfc' and Anil Madhavapeddy)
5807 - An ISO C99-compliant C compiler and standard library is now assumed.
5808 (Plus special exceptions for MSVC.) In particular, emulation code for
5809 64-bit integer arithmetic was removed, the C compiler must support a
5810 64-bit integer type.
5811 (Xavier Leroy)
5812
5813 Standard library:
5814 * Add new modules Bytes and BytesLabels for mutable byte sequences.
5815 (Damien Doligez)
5816 - #4986: add List.sort_uniq and Set.of_list
5817 (Alain Frisch)
5818 - #5935: a faster version of "raise" which does not maintain the backtrace
5819 (Alain Frisch)
5820 - #6146: support "Unix.kill pid Sys.sigkill" under Windows
5821 (Romain Bardou and Alain Frisch)
5822 - #6148: speed improvement for Buffer
5823 (John Whitington)
5824 - #6180: efficient creation of uninitialized float arrays
5825 (Alain Frisch, request by Markus Mottl)
5826 - #6355: Improve documentation regarding finalisers and multithreading
5827 (Daniel Bünzli, Mark Shinwell)
5828 - Trigger warning 3 for all values marked as deprecated in the documentation.
5829 (Damien Doligez)
5830
5831 OCamldoc:
5832 - #6257: handle full doc comments for variant constructors and
5833 record fields
5834 (Maxence Guesdon, request by ygrek)
5835 - #6274: allow doc comments on object types
5836 (Thomas Refis)
5837 - #6310: fix ocamldoc's subscript/superscript CSS font size
5838 (Anil Madhavapeddy)
5839 - #6425: fix generation of man pages
5840 (Maxence Guesdon, report by Anil Madhavapeddy)
5841
5842 Bug fixes:
5843 - #2719: wrong scheduling of bound checks within a
5844 try...with Invalid_argument -> _ ... (Xavier Leroy)
5845 - #4719: Sys.executable_name wrong if executable name contains dots (Windows)
5846 (Alain Frisch, report by Bart Jacobs)
5847 - #5406 ocamlbuild: "tag 'package' does not expect a parameter"
5848 (Gabriel Scherer)
5849 - #5598, #6165: Alterations to handling of \013 in source files
5850 breaking other tools
5851 (David Allsopp and Damien Doligez)
5852 - #5820: Fix camlp4 lexer roll back problem
5853 (Hongbo Zhang)
5854 - #5946: CAMLprim taking (void) as argument
5855 (Benoît Vaugon)
5856 - #6038: on x86-32, enforce 16-byte stack alignment for compatibility
5857 with recent GCC and Clang. Win32/MSVC keeps 4-byte stack alignment.
5858 (Xavier Leroy)
5859 - #6062: Fix a 4.01 camlp4 DELETE_RULE regression caused by commit 13047
5860 (Hongbo Zhang, report by Christophe Troestler)
5861 - #6173: Typing error message is worse than before
5862 (Jacques Garrigue and John Whitington)
5863 - #6174: OCaml compiler loops on an example using GADTs (-rectypes case)
5864 (Jacques Garrigue and Grégoire Henry, report by Chantal Keller)
5865 - #6175: open! was not supported by camlp4
5866 (Hongbo Zhang)
5867 - #6184: ocamlbuild: `ocamlfind ocamldep` does not support -predicate
5868 (Kate Deplaix)
5869 - #6194: Incorrect unused warning with first-class modules in patterns
5870 (Jacques Garrigue, report by Markus Mottl and Leo White)
5871 - #6211: in toplevel interactive use, bad interaction between uncaught
5872 exceptions and multiple bindings of the form "let x = a let y = b;;".
5873 (Xavier Leroy)
5874 - #6216: inlining of GADT matches generates invalid assembly
5875 (Xavier Leroy and Alain Frisch, report by Mark Shinwell)
5876 - #6232: Don't use [mktemp] on platforms where [mkstemp] is available
5877 (Stéphane Glondu, Mark Shinwell)
5878 - #6233: out-of-bounds exceptions lose their locations on ARM, PowerPC
5879 (Jacques-Henri Jourdan and Xavier Leroy,
5880 report and testing by Stéphane Glondu)
5881 - #6235: Issue with type information flowing through a variant pattern
5882 (Jacques Garrigue, report by Hongbo Zhang)
5883 - #6239: sometimes wrong stack alignment when raising exceptions
5884 in -g mode with backtraces active
5885 (Xavier Leroy, report by Yaron Minsky)
5886 - #6240: Fail to expand module type abbreviation during substyping
5887 (Jacques Garrigue, report by Leo White)
5888 - #6241: Assumed inequality between paths involving functor arguments
5889 (Jacques Garrigue, report by Jeremy Yallop)
5890 - #6243: Make "ocamlopt -g" more resistant to ill-formed locations
5891 (Xavier Leroy, report by Pierre-Marie Pédrot)
5892 - #6262: equality of first-class modules take module aliases into account
5893 (Alain Frisch and Leo White)
5894 - #6268: -DMODEL_$(MODEL) not passed when building asmrun/arm.p.o
5895 (Peter Michael Green)
5896 - #6273: fix Sys.file_exists on large files (Win32)
5897 (Christoph Bauer)
5898 - #6275: Soundness bug related to type constraints
5899 (Jacques Garrigue, report by Leo White)
5900 - #6293: Assert_failure with invalid package type
5901 (Jacques Garrigue, report by Elnatan Reisner)
5902 - #6300: ocamlbuild -use-ocamlfind conflicts with -ocamlc
5903 (Gabriel Scherer)
5904 - #6302: bytecode debug information re-read from filesystem every time
5905 (Jacques-Henri Jourdan)
5906 - #6307: Behavior of 'module type of' w.r.t. module aliases
5907 (Jacques Garrigue, report by Alain Frisch)
5908 - #6332: Unix.open_process fails to pass empty arguments under Windows
5909 (Damien Doligez, report Virgile Prevosto)
5910 - #6346: Build failure with latest version of xcode on OSX
5911 (Jérémie Dimino)
5912 - #6348: Unification failure for GADT when original definition is hidden
5913 (Leo White and Jacques Garrigue, report by Jeremy Yallop)
5914 - #6352: Automatic removal of optional arguments and sequencing
5915 (Jacques Garrigue and Alain Frisch)
5916 - #6361: Hashtbl.hash not terminating on some lazy values w/ recursive types
5917 (Xavier Leroy, report by Leo White)
5918 - #6383: Exception Not_found when using object type in absent module
5919 (Jacques Garrigue, report by Sébastien Briais)
5920 - #6384: Uncaught Not_found exception with a hidden .cmi file
5921 (Leo White)
5922 - #6385: wrong allocation of large closures by the bytecode interpreter
5923 (Xavier Leroy, report by Stephen Dolan)
5924 - #6394: Assertion failed in Typecore.expand_path
5925 (Alain Frisch and Jacques Garrigue)
5926 - #6405: unsound interaction of -rectypes and GADTs
5927 (Jacques Garrigue, report by Gabriel Scherer and Benoît Vaugon)
5928 - #6408: Optional arguments given as ~?arg instead of ?arg in message
5929 (Michael O'Connor)
5930 - #6411: missing libgcc_s_sjlj-1.dll in mingw (add -static-libgcc)
5931 (Jun Furuse and Alain Frisch, Jonathan Protzenko and Adrien Nader)
5932 - #6436: Typos in @deprecated text in stdlib/arrayLabels.mli
5933 (John Whitington)
5934 - #6439: Don't use the deprecated [getpagesize] function
5935 (John Whitington, Mark Shinwell)
5936 - #6441: undetected tail-call in some mutually-recursive functions
5937 (many arguments, and mutual block mixes functions and non-functions)
5938 (Stefan Holdermans, review by Xavier Leroy)
5939 - #6443: ocaml segfault when List.fold_left is traced then executed
5940 (Jacques Garrigue, report by user 'Reventlov')
5941 - #6451: some bugs in untypeast.ml
5942 (Jun Furuse, review by Alain Frisch)
5943 - #6460: runtime assertion failure with large [| e1;...eN |]
5944 float array expressions
5945 (Leo White)
5946 - #6463: -dtypedtree fails on class fields
5947 (Leo White)
5948 - #6469: invalid -dsource printing of "external _pipe = ...", "Pervasives.(!)"
5949 (Gabriel Scherer and Damien Doligez, user 'ngunn')
5950 - #6482: ocamlbuild fails when _tags file in unhygienic directory
5951 (Gabriel Scherer)
5952 - #6502: ocamlbuild spurious warning on "use_menhir" tag
5953 (Xavier Leroy)
5954 - #6505: Missed Type-error leads to a segfault upon record access
5955 (Jacques Garrigue, Jeremy Yallop, report by Christoph Höger)
5956 - #6507: crash on AArch64 resulting from incorrect setting of
5957 [caml_bottom_of_stack]. (Richard Jones, Mark Shinwell)
5958 - #6509: add -linkall flag to ocamlcommon.cma
5959 (Frédéric Bour)
5960 - #6513: Fatal error Ctype.Unify(_) in functor type
5961 - #6523: failure upon character bigarray access, and unnecessary change
5962 in comparison ordering (Jeremy Yallop, Mark Shinwell)
5963 - bound-checking bug in caml_string_{get,set}{16,32,64}
5964 (Pierre Chambart and Gabriel Scherer, report by Nicolas Trangez)
5965 - sometimes wrong stack alignment at out-of-bounds array access
5966 (Gabriel Scherer and Xavier Leroy, report by Pierre Chambart)
5967
5968 Features wishes:
5969 - #4243: make the Makefiles parallelizable
5970 (Grégoire Henry and Damien Doligez)
5971 - #4323: have "of_string" in Num and Big_int work with binary and
5972 hex representations
5973 (Zoe Paraskevopoulou, review by Gabriel Scherer)
5974 - #4771: Clarify documentation of Dynlink.allow_only
5975 (Damien Doligez, report by David Allsopp)
5976 - #4855: 'camlp4 -I +dir' accepted, dir is relative to 'camlp4 -where'
5977 (Jun Furuse and Hongbo Zhang, report by Dmitry Grebeniuk)
5978 - #5201: ocamlbuild: add --norc to the bash invocation to help performances
5979 (Daniel Weil)
5980 - #5650: Camlp4FoldGenerator doesn't handle well "abstract" types
5981 (Hongbo Zhang)
5982 - #5808: allow simple patterns, not just identifiers, in "let p : t = ..."
5983 (Alain Frisch)
5984 - #5851: warn when -r is disabled because no _tags file is present
5985 (Gabriel Scherer)
5986 - #5899: a programmer-friendly access to backtrace information
5987 (Jacques-Henri Jourdan and Gabriel Scherer)
5988 - #6000 comment 9644: add a warning for non-principal coercions to format
5989 (Jacques Garrigue, report by Damien Doligez)
5990 - #6054: add support for M.[ foo ], M.[| foo |] etc.
5991 (Kaustuv Chaudhuri)
5992 - #6064: GADT representation for Bigarray.kind + CAML_BA_CHAR runtime kind
5993 (Jeremy Yallop, review by Gabriel Scherer)
5994 - #6071: Add a -noinit option to the toplevel
5995 (David Sheets)
5996 - #6087: ocamlbuild, improve _tags parsing of escaped newlines
5997 (Gabriel Scherer, request by Daniel Bünzli)
5998 - #6109: Typos in ocamlbuild error messages
5999 (Gabriel Kerneis)
6000 - #6116: more efficient implementation of Digest.to_hex
6001 (ygrek)
6002 - #6142: add cmt file support to ocamlobjinfo
6003 (Anil Madhavapeddy)
6004 - #6166: document -ocamldoc option of ocamlbuild
6005 (Xavier Clerc)
6006 - #6182: better message for virtual objects and class types
6007 (Leo White, Stephen Dolan)
6008 - #6183: enhanced documentation for 'Unix.shutdown_connection'
6009 (Anil Madhavapeddy, report by Jun Furuse)
6010 - #6187: ocamlbuild: warn when using -plugin-tag(s) without myocamlbuild.ml
6011 (Kate Deplaix)
6012 - #6246: allow wildcard _ as for-loop index
6013 (Alain Frisch, request by ygrek)
6014 - #6267: more information printed by "bt" command of ocamldebug
6015 (Josh Watzman)
6016 - #6270: remove need for -I directives to ocamldebug in common case
6017 (Josh Watzman, review by Xavier Clerc and Alain Frisch)
6018 - #6311: Improve signature mismatch error messages
6019 (Alain Frisch, suggestion by Daniel Bünzli)
6020 - #6358: obey DESTDIR in install targets
6021 (Gabriel Scherer, request by François Berenger)
6022 - #6388, #6424: more parsetree correctness checks for -ppx users
6023 (Alain Frisch, request by whitequark and Jun Furuse)
6024 - #6406: Expose OCaml version in C headers
6025 (whitequark and Romain Calascibetta)
6026 - #6446: improve "unused declaration" warnings wrt. name shadowing
6027 (Alain Frisch)
6028 - #6495: ocamlbuild tags 'safe_string', 'unsafe_string'
6029 (Anil Madhavapeddy)
6030 - #6497: pass context information to -ppx preprocessors
6031 (whitequark, Alain Frisch)
6032 - ocamllex: user-definable refill action
6033 (Frédéric Bour, review by Gabriel Scherer and Luc Maranget)
6034 - shorten syntax for functor signatures: "functor (M1:S1) (M2:S2) .. -> .."
6035 (Thomas Gazagnaire and Jeremy Yallop, review by Gabriel Scherer)
6036 - make ocamldebug -I auto-detection work with ocamlbuild
6037 (Josh Watzman)
6038
6039 OCaml 4.01.0 (12 Sep 2013):
6040 ---------------------------
6041
6042 (Changes that can break existing programs are marked with a "*")
6043
6044 Other libraries:
6045 - Labltk: updated to Tcl/Tk 8.6.
6046
6047 Type system:
6048 - #5759: use well-disciplined type information propagation to
6049 disambiguate label and constructor names
6050 (Jacques Garrigue, Alain Frisch and Leo White)
6051 * Propagate type information towards pattern-matching, even in the presence of
6052 polymorphic variants (discarding only information about possibly-present
6053 constructors). As a result, matching against absent constructors is no longer
6054 allowed for exact and fixed polymorphic variant types.
6055 (Jacques Garrigue)
6056 * #6035: Reject multiple declarations of the same method or instance variable
6057 in an object
6058 (Alain Frisch)
6059
6060 Compilers:
6061 - #5861: raise an error when multiple private keywords are used in type
6062 declarations
6063 (Hongbo Zhang)
6064 - #5634: parsetree rewriter (-ppx flag)
6065 (Alain Frisch)
6066 - ocamldep now supports -absname
6067 (Alain Frisch)
6068 - #5768: On "unbound identifier" errors, use spell-checking to suggest names
6069 present in the environment
6070 (Gabriel Scherer)
6071 - ocamlc has a new option -dsource to visualize the parsetree
6072 (Alain Frisch, Hongbo Zhang)
6073 - tools/eqparsetree compares two parsetree ignoring location
6074 (Hongbo Zhang)
6075 - ocamlopt now uses clang as assembler on OS X if available, which enables
6076 CFI support for OS X.
6077 (Benedikt Meurer)
6078 - Added a new -short-paths option, which attempts to use the shortest
6079 representation for type constructors inside types, taking open modules
6080 into account. This can make types much more readable if your code
6081 uses lots of functors.
6082 (Jacques Garrigue)
6083 - #5986: added flag -compat-32 to ocamlc, ensuring that the generated
6084 bytecode executable can be loaded on 32-bit hosts.
6085 (Xavier Leroy)
6086 - #5980: warning on open statements which shadow an existing
6087 identifier (if it is actually used in the scope of the open); new
6088 open! syntax to silence it locally
6089 (Alain Frisch, thanks to a report of Daniel Bünzli)
6090 * warning 3 is extended to warn about other deprecated features:
6091 - ISO-latin1 characters in identifiers
6092 - uses of the (&) and (or) operators instead of (&&) and (||)
6093 (Damien Doligez)
6094 - Experimental OCAMLPARAM for ocamlc and ocamlopt
6095 (Fabrice Le Fessant)
6096 - #5571: incorrect ordinal number in error message
6097 (Alain Frisch, report by John Carr)
6098 - #6073: add signature to Tstr_include
6099 (patch by Leo White)
6100
6101 Standard library:
6102 - #5899: expose a way to inspect the current call stack,
6103 Printexc.get_callstack
6104 (Gabriel Scherer, Jacques-Henri Jourdan, Alain Frisch)
6105 - #5986: new flag Marshal.Compat_32 for the serialization functions
6106 (Marshal.to_*), forcing the output to be readable on 32-bit hosts.
6107 (Xavier Leroy)
6108 - infix application operators |> and @@ in Pervasives
6109 (Fabrice Le Fessant)
6110 - #6176: new Format.asprintf function with a %a formatter
6111 compatible with Format.fprintf (unlike Format.sprintf)
6112 (Pierre Weis)
6113
6114 Other libraries:
6115 - #5568: add O_CLOEXEC flag to Unix.openfile, so that the returned
6116 file descriptor is created in close-on-exec mode
6117 (Xavier Leroy)
6118
6119 Runtime system:
6120 * #6019: more efficient implementation of caml_modify() and caml_initialize().
6121 The new implementations are less lenient than the old ones: now,
6122 the destination pointer of caml_modify() must point within the minor or
6123 major heaps, and the destination pointer of caml_initialize() must
6124 point within the major heap.
6125 (Xavier Leroy, from an experiment by Brian Nigito, with feedback
6126 from Yaron Minsky and Gerd Stolpmann)
6127
6128 Internals:
6129 - Moved debugger/envaux.ml to typing/envaux.ml to publish env_of_only_summary
6130 as part of compilerlibs, to be used on bin-annot files.
6131 (Fabrice Le Fessant)
6132 - The test suite can now be run without installing OCaml first.
6133 (Damien Doligez)
6134
6135 Bug fixes:
6136 - #3236: Document the fact that queues are not thread-safe
6137 (Damien Doligez)
6138 - #3468: (part 1) Sys_error documentation
6139 (Damien Doligez)
6140 - #3679: Warning display problems
6141 (Fabrice Le Fessant)
6142 - #3963: Graphics.wait_next_event in Win32 hangs if window closed
6143 (Damien Doligez)
6144 - #4079: Queue.copy is now tail-recursive
6145 (patch by Christophe Papazian)
6146 - #4138: Documentation for Unix.mkdir
6147 (Damien Doligez)
6148 - #4469: emacs mode: caml-set-compile-command is annoying with ocamlbuild
6149 (Daniel Bünzli)
6150 - #4485: Graphics: Keyboard events incorrectly delivered in native code
6151 (Damien Doligez, report by Sharvil Nanavati)
6152 - #4502: ocamlbuild now reliably excludes the build-dir from hygiene check
6153 (Gabriel Scherer, report by Romain Bardou)
6154 - #4762: ?? is not used at all, but registered as a lexer token
6155 (Alain Frisch)
6156 - #4788: wrong error message when executable file is not found for backtrace
6157 (Damien Doligez, report by Claudio Sacerdoti Coen)
6158 - #4812: otherlibs/unix: add extern int code_of_unix_error (value error);
6159 (Goswin von Berdelow)
6160 - #4887: input_char after close_in crashes ocaml (msvc runtime)
6161 (Alain Frisch and Christoph Bauer, report by ygrek)
6162 - #4994: ocaml-mode doesn't work with xemacs21
6163 (Damien Doligez, report by Stéphane Glondu)
6164 - #5098: creating module values may lead to memory leaks
6165 (Alain Frisch, report by Milan Stanojević)
6166 - #5102: ocamlbuild fails when using an unbound variable in rule dependency
6167 (Xavier Clerc, report by Daniel Bünzli)
6168 * #5119: camlp4 now raises a specific exception when 'DELETE_RULE' fails,
6169 rather than raising 'Not_found'
6170 (ygrek)
6171 - #5121: %( %) in Format module seems to be broken
6172 (Pierre Weis, first patch by Valentin Gatien-Baron, report by Khoo Yit Phang)
6173 - #5178: document in INSTALL how to build a 32-bit version under Linux x86-64
6174 (Benjamin Monate)
6175 - #5212: Improve ocamlbuild error messages of _tags parser
6176 (ygrek)
6177 - #5240: register exception printers for Unix.Unix_error and Dynlink.Error
6178 (Jérémie Dimino)
6179 - #5300: ocamlbuild: verbose parameter should implicitly set classic display
6180 (Xavier Clerc, report by Robert Jakob)
6181 - #5327: (Windows) Unix.select blocks if same socket listed in first and
6182 third arguments
6183 (David Allsopp, displaying impressive MSDN skills)
6184 - #5343: ocaml -rectypes is unsound wrt module subtyping (was still unsound)
6185 (Jacques Garrigue)
6186 - #5350: missing return code checks in the runtime system
6187 (Xavier Leroy)
6188 - #5468: ocamlbuild should preserve order of parametric tags
6189 (Wojciech Meyer, report by Dario Texeira)
6190 - #5551: Avoid repeated lookups for missing cmi files
6191 (Alain Frisch)
6192 - #5552: unrecognized gcc option -no-cpp-precomp
6193 (Damien Doligez, report by Markus Mottl)
6194 * #5580: missed opportunities for constant propagation
6195 (Xavier Leroy and John Carr)
6196 - #5611: avoid clashes between .cmo files and output files during linking
6197 (Wojciech Meyer)
6198 - #5662: typo in md5.c
6199 (Olivier Andrieu)
6200 - #5673: type equality in a polymorphic field
6201 (Jacques Garrigue, report by Jean-Louis Giavitto)
6202 - #5674: Methods call are 2 times slower with 4.00 than with 3.12
6203 (Jacques Garrigue, Gabriel Scherer, report by Jean-Louis Giavitto)
6204 - #5694: Exception raised by type checker
6205 (Jacques Garrigue, report by Markus Mottl)
6206 - #5695: remove warnings on sparc code emitter
6207 (Fabrice Le Fessant)
6208 - #5697: better location for warnings on statement expressions
6209 (Dan Bensen)
6210 - #5698: remove hardcoded limit of 200000 labels in emitaux.ml
6211 (Fabrice Le Fessant, report by Marcin Sawicki)
6212 - #5702: bytecomp/bytelibrarian lib_sharedobjs was defined but never used
6213 (Hongbo Zhang, Fabrice Le Fessant)
6214 - #5708: catch Failure"int_of_string" in ocamldebug
6215 (Fabrice Le Fessant, report by user 'schommer')
6216 - #5712: (9) new option -bin-annot is not documented
6217 (Damien Doligez, report by Hendrik Tews)
6218 - #5731: instruction scheduling forgot to account for destroyed registers
6219 (Xavier Leroy, Benedikt Meurer, reported by Jeffrey Scofield)
6220 - #5734: improved Win32 implementation of Unix.gettimeofday
6221 (David Allsopp)
6222 - #5735: %apply and %revapply not first class citizens
6223 (Fabrice Le Fessant, reported by Jun Furuse)
6224 - #5738: first class module patterns not handled by ocamldep
6225 (Fabrice Le Fessant, Jacques Garrigue, reported by Hongbo Zhang)
6226 - #5739: Printf.printf "%F" (-.nan) returns -nan
6227 (Xavier Leroy, David Allsopp, reported by Samuel Mimram)
6228 - #5741: make pprintast.ml in compiler_libs
6229 (Alain Frisch, Hongbo Zhang)
6230 - #5747: 'unused open' warning not given when compiling with -annot
6231 (Alain Frisch, reported by Valentin Gatien-Baron)
6232 - #5752: missing dependencies at byte-code link with mlpack
6233 (Wojciech Meyer, Nicholas Lucaroni)
6234 - #5763: ocamlbuild does not give correct flags when running menhir
6235 (Gabriel Scherer, reported by Philippe Veber)
6236 - #5765: ocamllex doesn't preserve line directives
6237 (Damien Doligez, reported by Martin Jambon)
6238 - #5770: Syntax error messages involving unclosed parens are sometimes
6239 incorrect
6240 (Michel Mauny)
6241 - #5772: problem with marshaling of mutually-recursive functions
6242 (Jacques-Henri Jourdan, reported by Cédric Pasteur)
6243 - #5775: several bug fixes for tools/pprintast.ml
6244 (Hongbo Zhang)
6245 - #5784: -dclambda option is ignored
6246 (Pierre Chambart)
6247 - #5785: misbehaviour with abstracted structural type used as GADT index
6248 (Jacques Garrigue, report by Jeremy Yallop)
6249 - #5787: Bad behavior of 'Unused ...' warnings in the toplevel
6250 (Alain Frisch)
6251 - #5793: integer marshalling is inconsistent between architectures
6252 (Xavier Clerc, report by Pierre-Marie Pédrot)
6253 - #5798: add ARM VFPv2 support for Raspbian (ocamlopt)
6254 (Jeffrey Scofield and Anil Madhavapeddy, patch review by Benedikt Meurer)
6255 - #5802: Avoiding "let" as a value name
6256 (Jacques Garrigue, report by Tiphaine Turpin)
6257 - #5805: Assert failure with warning 34 on pre-processed file
6258 (Alain Frisch, report by Tiphaine Turpin)
6259 - #5806: ensure that backtrace tests are always run (testsuite)
6260 (Xavier Clerc, report by user 'michi')
6261 - #5809: Generating .cmt files takes a long time, in case of type error
6262 (Alain Frisch)
6263 - #5810: error in switch printing when using -dclambda
6264 (Pierre Chambart)
6265 - #5811: Untypeast produces singleton tuples for constructor patterns
6266 with only one argument
6267 (Tiphaine Turpin)
6268 - #5813: GC not called when unmarshaling repeatedly in a tight loop (ocamlopt)
6269 (Xavier Leroy, report by David Waern)
6270 - #5814: read_cmt -annot does not report internal references
6271 (Alain Frisch)
6272 - #5815: Multiple exceptions in signatures gives an error
6273 (Leo White)
6274 - #5816: read_cmt -annot does not work for partial .cmt files
6275 (Alain Frisch)
6276 - #5819: segfault when using [with] on large recursive record (ocamlopt)
6277 (Xavier Leroy, Damien Doligez)
6278 - #5821: Wrong record field is reported as duplicate
6279 (Alain Frisch, report by Martin Jambon)
6280 - #5824: Generate more efficient code for immediate right shifts.
6281 (Pierre Chambart, review by Xavier Leroy)
6282 - #5825: Add a toplevel primitive to use source file wrapped with the
6283 corresponding module
6284 (Grégoire Henry, Wojciech Meyer, caml-list discussion)
6285 - #5833: README.win32 can leave the wrong flexlink in the path
6286 (Damien Doligez, report by William Smith)
6287 - #5835: nonoptional labeled arguments can be passed with '?'
6288 (Jacques Garrigue, report by Elnatan Reisner)
6289 - #5840: improved documentation for 'Unix.lseek'
6290 (Xavier Clerc, report by Matej Košík)
6291 - #5848: Assertion failure in type checker
6292 (Jacques Garrigue, Alain Frisch, report by David Waern)
6293 - #5858: Assert failure during typing of class
6294 (Jacques Garrigue, report by Julien Signoles)
6295 - #5865: assert failure when reporting undefined field label
6296 (Jacques Garrigue, report by Anil Madhavapeddy)
6297 - #5872: Performance: Buffer.add_char is not inlined
6298 (Gerd Stolpmann, Damien Doligez)
6299 - #5876: Uncaught exception with a typing error
6300 (Alain Frisch, Gabriel Scherer, report by Julien Moutinho)
6301 - #5877: multiple "open" can become expensive in memory
6302 (Fabrice Le Fessant and Alain Frisch)
6303 - #5880: 'Genlex.make_lexer' documentation mentions the wrong exception
6304 (Xavier Clerc, report by Virgile Prevosto)
6305 - #5885: Incorrect rule for compiling C stubs when shared libraries are not
6306 supported.
6307 (Jérôme Vouillon)
6308 - #5891: ocamlbuild: support rectypes tag for mlpack
6309 (Khoo Yit Phang)
6310 - #5892: GADT exhaustiveness check is broken
6311 (Jacques Garrigue and Leo White)
6312 - #5906: GADT exhaustiveness check is still broken
6313 (Jacques Garrigue, report by Sébastien Briais)
6314 - #5907: Undetected cycle during typecheck causes exceptions
6315 (Jacques Garrigue, report by Pascal Zimmer)
6316 - #5910: Fix code generation bug for "mod 1" on ARM.
6317 (Benedikt Meurer, report by user 'jteg68')
6318 - #5911: Signature substitutions fail in submodules
6319 (Jacques Garrigue, report by Markus Mottl)
6320 - #5912: add configure option -no-cfi (for OSX 10.6.x with XCode 4.0.2)
6321 (Damien Doligez against XCode versions, report by Thomas Gazagnaire)
6322 - #5914: Functor breaks with an equivalent argument signature
6323 (Jacques Garrigue, report by Markus Mottl and Grégoire Henry)
6324 - #5920, #5957: linking failure for big bytecodes on 32bit architectures
6325 (Benoît Vaugon and Chet Murthy, report by Jun Furuse and Sebastien Mondet)
6326 - #5928: Missing space between words in manual page for ocamlmktop
6327 (Damien Doligez, report by Matej Košík)
6328 - #5930: ocamldep leaks temporary preprocessing files
6329 (Gabriel Scherer, report by Valentin Gatien-Baron)
6330 - #5933: Linking is slow when there are functions with large arities
6331 (Valentin Gatien-Baron, review by Gabriel Scherer)
6332 - #5934: integer shift by negative amount (in otherlibs/num)
6333 (Xavier Leroy, report by John Regehr)
6334 - #5944: Bad typing performances of big variant type declaration
6335 (Benoît Vaugon)
6336 - #5945: Mix-up of Minor_heap_min and Minor_heap_max units
6337 (Benoît Vaugon)
6338 - #5948: GADT with polymorphic variants bug
6339 (Jacques Garrigue, report by Leo White)
6340 - #5953: Unix.system does not handle EINTR
6341 (Jérémie Dimino)
6342 - #5965: disallow auto-reference to a recursive module in its definition
6343 (Alain Frisch, report by Arthur Windler via Gabriel Scherer)
6344 - #5973: Format module incorrectly parses format string
6345 (Pierre Weis, report by Frédéric Bour)
6346 - #5974: better documentation for Str.regexp
6347 (Damien Doligez, report by william)
6348 - #5976: crash after recovering from two stack overflows (ocamlopt on MacOS X)
6349 (Xavier Leroy, report by Pierre Boutillier)
6350 - #5977: Build failure on raspberry pi: "input_value: integer too large"
6351 (Alain Frisch, report by Sylvain Le Gall)
6352 - #5981: Incompatibility check assumes abstracted types are injective
6353 (Jacques Garrigue, report by Jeremy Yallop)
6354 - #5982: caml_leave_blocking section and errno corruption
6355 (Jérémie Dimino)
6356 - #5985: Unexpected interaction between variance and GADTs
6357 (Jacques Garrigue, Jeremy Yallop and Leo White and Gabriel Scherer)
6358 - #5988: missing from the documentation: -impl is a valid flag for ocamlopt
6359 (Damien Doligez, report by Vincent Bernardoff)
6360 - #5989: Assumed inequalities involving private rows
6361 (Jacques Garrigue, report by Jeremy Yallop)
6362 - #5992: Crash when pattern-matching lazy values modifies the scrutinee
6363 (Luc Maranget, Leo White)
6364 - #5993: Variance of private type abbreviations not checked for modules
6365 (Jacques Garrigue)
6366 - #5997: Non-compatibility assumed for concrete types with same constructor
6367 (Jacques Garrigue, report by Gabriel Scherer)
6368 - #6004: Type information does not flow to "inherit" parameters
6369 (Jacques Garrigue, report by Alain Frisch)
6370 - #6005: Type unsoundness with recursive modules
6371 (Jacques Garrigue, report by Jérémie Dimino and Josh Berdine)
6372 - #6010: Big_int.extract_big_int gives wrong results on negative arguments
6373 (Xavier Leroy, report by Drake Wilson via Stéphane Glondu)
6374 - #6024: Format syntax for printing @ is incompatible with 3.12.1
6375 (Damien Doligez, report by Boris Yakobowski)
6376 - #6001: Reduce the memory used by compiling Camlp4
6377 (Hongbo Zhang and Gabriel Scherer, report by Henri Gouraud)
6378 - #6031: Camomile problem with -with-frame-pointers
6379 (Fabrice Le Fessant, report by Anil Madhavapeddy)
6380 - #6032: better Random.self_init under Windows
6381 (Alain Frisch, Xavier Leroy)
6382 - #6033: Matching.inline_lazy_force needs eta-expansion (command-line flags)
6383 (Pierre Chambart, Xavier Leroy and Luc Maranget,
6384 regression report by Gabriel Scherer)
6385 - #6046: testsuite picks up the wrong ocamlrun dlls
6386 (Anil Madhavapeddy)
6387 - #6056: Using 'match' prevents generalization of values
6388 (Jacques Garrigue, report by Elnatan Reisner)
6389 - #6058: 'ocamlbuild -use-ocamlfind -tag thread -package threads t.cma' fails
6390 (Gabriel Scherer, report by Hezekiah M. Carty)
6391 - #6069: ocamldoc: lexing: empty token
6392 (Maxence Guesdon, Grégoire Henry, report by ygrek)
6393 - #6072: configure does not handle FreeBSD current (i.e. 10) correctly
6394 (Damien Doligez, report by Prashanth Mundkur)
6395 - #6074: Wrong error message for failing Condition.broadcast
6396 (Markus Mottl)
6397 - #6084: Define caml_modify and caml_initialize as weak symbols to help
6398 with Netmulticore
6399 (Xavier Leroy, Gerd Stolpmann)
6400 - #6090: Module constraint + private type seems broken in ocaml 4.01.0
6401 (Jacques Garrigue, report by Kate Deplaix)
6402 - #6109: Typos in ocamlbuild error messages
6403 (Gabriel Kerneis)
6404 - #6123: Assert failure when self escapes its class
6405 (Jacques Garrigue, report by whitequark)
6406 - #6158: Fatal error using GADTs
6407 (Jacques Garrigue, report by Jeremy Yallop)
6408 - #6163: Assert_failure using polymorphic variants in GADTs
6409 (Jacques Garrigue, report by Leo White)
6410 - #6164: segmentation fault on Num.power_num of 0/1
6411 (Fabrice Le Fessant, report by Johannes Kanig)
6412 - #6210: Camlp4 location error
6413 (Hongbo Zhang, report by Jun Furuse)
6414
6415 Feature wishes:
6416 - #5181: Merge common floating point constants in ocamlopt
6417 (Benedikt Meurer)
6418 - #5243: improve the ocamlbuild API documentation in signatures.mli
6419 (Christophe Troestler)
6420 - #5546: moving a function into an internal module slows down its use
6421 (Alain Frisch, report by Fabrice Le Fessant)
6422 - #5597: add instruction trace option 't' to OCAMLRUNPARAM
6423 (Anil Madhavapeddy, Wojciech Meyer)
6424 - #5676: IPv6 support under Windows
6425 (Jérôme Vouillon, review by Jonathan Protzenko)
6426 - #5721: configure -with-frame-pointers for Linux perf profiling
6427 (Fabrice Le Fessant, test by Jérémie Dimino)
6428 - #5722: toplevel: print full module path only for first record field
6429 (Jacques Garrigue, report by ygrek)
6430 - #5762: Add primitives for fast access to bigarray dimensions
6431 (Pierre Chambart)
6432 - #5769: Allow propagation of Sys.big_endian in native code
6433 (Pierre Chambart, stealth commit by Fabrice Le Fessant)
6434 - #5771: Add primitives for reading 2, 4, 8 bytes in strings and bigarrays
6435 (Pierre Chambart)
6436 - #5774: Add bswap primitives for amd64 and arm
6437 (Pierre Chambart, test by Alain Frisch)
6438 - #5795: Generate sqrtsd opcode instead of external call to sqrt on amd64
6439 (Pierre Chambart)
6440 - #5827: provide a dynamic command line parsing mechanism
6441 (Hongbo Zhang)
6442 - #5832: patch to improve "wrong file naming" error messages
6443 (William Smith)
6444 - #5864: Add a find operation to Set
6445 (François Berenger)
6446 - #5886: Small changes to compile for Android
6447 (Jérôme Vouillon, review by Benedikt Meurer)
6448 - #5902: -ppx based pre-processor executables accept arguments
6449 (Alain Frisch, report by Wojciech Meyer)
6450 - #5986: Protect against marshaling 64-bit integers in bytecode
6451 (Xavier Leroy, report by Alain Frisch)
6452 - #6049: support for OpenBSD/macppc platform
6453 (Anil Madhavapeddy, review by Benedikt Meurer)
6454 - #6059: add -output-obj rules for ocamlbuild
6455 (Anil Madhavapeddy)
6456 - #6060: ocamlbuild tags 'principal', 'strict_sequence' and 'short_paths'
6457 (Anil Madhavapeddy)
6458 - ocamlbuild tag 'no_alias_deps'
6459 (Daniel Bünzli)
6460
6461 Tools:
6462 - OCamlbuild now features a bin_annot tag to generate .cmt files.
6463 (Jonathan Protzenko)
6464 - OCamlbuild now features a strict_sequence tag to trigger the
6465 strict-sequence option.
6466 (Jonathan Protzenko)
6467 - OCamlbuild now picks the non-core tools like ocamlfind and menhir from PATH
6468 (Wojciech Meyer)
6469 - #5884: Misc minor fixes and cleanup for emacs mode
6470 (Stefan Monnier)
6471 - #6030: Improve performance of -annot
6472 (Guillaume Melquiond, Alain Frisch)
6473
6474
6475 OCaml 4.00.1 (5 Oct 2012):
6476 --------------------------
6477
6478 Bug fixes:
6479 - #4019: better documentation of Str.matched_string
6480 - #5111: ocamldoc, heading tags inside spans tags is illegal in html
6481 - #5278: better error message when typing "make"
6482 - #5468: ocamlbuild should preserve order of parametric tags
6483 - #5563: harden Unix.select against file descriptors above FD_SETSIZE
6484 - #5690: "ocamldoc ... -text README" raises exception
6485 - #5700: crash with native-code stack backtraces under MacOS 10.8 x86-64
6486 - #5707: AMD64 code generator: do not use r10 and r11 for parameter passing,
6487 as these registers can be destroyed by the dynamic loader
6488 - #5712: some documentation problems
6489 - #5715: configuring with -no-shared-libs breaks under cygwin
6490 - #5718: false positive on 'unused constructor' warning
6491 - #5719: ocamlyacc generates code that is not warning 33-compliant
6492 - #5725: ocamldoc output of preformatted code
6493 - #5727: emacs caml-mode indents shebang line in toplevel scripts
6494 - #5729: tools/untypeast.ml creates unary Pexp_tuple
6495 - #5731: instruction scheduling forgot to account for destroyed registers
6496 - #5735: %apply and %revapply not first class citizens
6497 - #5738: first class module patterns not handled by ocamldep
6498 - #5742: missing bound checks in Array.sub
6499 - #5744: ocamldoc error on "val virtual"
6500 - #5757: GC compaction bug (crash)
6501 - #5758: Compiler bug when matching on floats
6502 - #5761: Incorrect bigarray custom block size
6503
6504
6505 OCaml 4.00.0 (26 Jul 2012):
6506 ---------------------------
6507
6508 (Changes that can break existing programs are marked with a "*")
6509
6510 - The official name of the language is now OCaml.
6511
6512 Language features:
6513 - Added Generalized Algebraic Data Types (GADTs) to the language.
6514 See chapter "Language extensions" of the reference manual for documentation.
6515 - It is now possible to omit type annotations when packing and unpacking
6516 first-class modules. The type-checker attempts to infer it from the context.
6517 Using the -principal option guarantees forward compatibility.
6518 - New (module M) and (module M : S) syntax in patterns, for immediate
6519 unpacking of a first-class module.
6520
6521 Compilers:
6522 - Revised simplification of let-alias (#5205, #5288)
6523 - Better reporting of compiler version mismatch in .cmi files
6524 * Warning 28 is now enabled by default.
6525 - New option -absname to use absolute paths in error messages
6526 - Optimize away compile-time beta-redexes, e.g. (fun x y -> e) a b.
6527 - Added option -bin-annot to dump the AST with type annotations.
6528 - Added lots of new warnings about unused variables, opens, fields,
6529 constructors, etc.
6530 * New meaning for warning 7: it is now triggered when a method is overridden
6531 with the "method" keyword. Use "method!" to avoid the warning.
6532
6533 Native-code compiler:
6534 - Optimized handling of partially-applied functions (#5287)
6535 - Small improvements in code generated for array bounds checks (#5345,
6536 #5360).
6537 * New ARM backend (#5433):
6538 . Supports both Linux/EABI (armel) and Linux/EABI+VFPv3 (armhf).
6539 . Added support for the Thumb-2 instruction set with average code size
6540 savings of 28%.
6541 . Added support for position-independent code, natdynlink, profiling and
6542 exception backtraces.
6543 - Generation of CFI information, and filename/line number debugging (with -g)
6544 annotations, enabling in particular precise stack backtraces with
6545 the gdb debugger. Currently supported for x86 32-bits and 64-bits only.
6546 (#5487)
6547 - New tool: ocamloptp, the equivalent of ocamlcp for the native-code compiler.
6548
6549 OCamldoc:
6550 - #5645: ocamldoc doesn't handle module/type substitution in signatures
6551 - #5544: improve HTML output (less formatting in html code)
6552 - #5522: allow referring to record fields and variant constructors
6553 - fix #5419 (error message in french)
6554 - fix #5535 (no cross ref to class after dump+load)
6555 * Use first class modules for custom generators, to be able to
6556 load various plugins incrementally adding features to the current
6557 generator
6558 * #5507: Use Location.t structures for locations.
6559 - fix: do not keep code when not told to keep code.
6560
6561 Standard library:
6562 - Added float functions "hypot" and "copysign" (#3806, #4752, #5246)
6563 * Arg: options with empty doc strings are no longer included in the usage string
6564 (#5437)
6565 - Array: faster implementations of "blit", "copy", "sub", "append" and "concat"
6566 (#2395, #2787, #4591)
6567 * Hashtbl:
6568 . Statistically-better generic hash function based on Murmur 3 (#5225)
6569 . Fixed behavior of generic hash function w.r.t. -0.0 and NaN (#5222)
6570 . Added optional "random" parameter to Hashtbl.create to randomize
6571 collision patterns and improve security (#5572, CVE-2012-0839)
6572 . Added "randomize" function and "R" parameter to OCAMLRUNPARAM
6573 to turn randomization on by default (#5572, CVE-2012-0839)
6574 . Added new functorial interface "MakeSeeded" to support randomization
6575 with user-provided seeded hash functions.
6576 . Install new header <caml/hash.h> for C code.
6577 - Filename: on-demand (lazy) initialization of the PRNG used by "temp_file".
6578 - Marshal: marshalling of function values (flag Marshal.Closures) now
6579 also works for functions that come from dynamically-loaded modules (#5215)
6580 - Random:
6581 . More random initialization (Random.self_init()), using /dev/urandom
6582 when available (e.g. Linux, FreeBSD, MacOS X, Solaris)
6583 * Faster implementation of Random.float (changes the generated sequences)
6584 - Format strings for formatted input/output revised to correct #5380
6585 . Consistently treat %@ as a plain @ character
6586 . Consistently treat %% as a plain % character
6587 - Scanf: width and precision for floating point numbers are now handled
6588 - Scanf: new function "unescaped" (#3888)
6589 - Set and Map: more efficient implementation of "filter" and "partition"
6590 - String: new function "map" (#3888)
6591
6592 Installation procedure:
6593 - Compiler internals are now installed in `ocamlc -where`/compiler-libs.
6594 The files available there include the .cmi interfaces for all compiler
6595 modules, plus the following libraries:
6596 ocamlcommon.cma/.cmxa modules common to ocamlc, ocamlopt, ocaml
6597 ocamlbytecomp.cma/.cmxa modules for ocamlc and ocaml
6598 ocamloptcomp.cma/.cmxa modules specific to ocamlopt
6599 ocamltoplevel.cma modules specific to ocaml
6600 (#8255, #4653, frequently-asked feature).
6601 * Some .cmi for toplevel internals that used to be installed in
6602 `ocamlc -where` are now to be found in `ocamlc -where`/compiler-libs.
6603 Add "-I +compiler-libs" where needed.
6604 * toplevellib.cma is no longer installed because subsumed by
6605 ocamlcommon.cma ocamlbytecomp.cma ocamltoplevel.cma
6606 - Added a configuration option (-with-debug-runtime) to compile and install
6607 a debug version of the runtime system, and a compiler option
6608 (-runtime-variant) to select the debug runtime.
6609
6610 Bug Fixes:
6611
6612 - #8109: functions of the Lazy module whose named started with 'lazy_' have
6613 been deprecated, and new ones without the prefix added
6614 - #3571: in Bigarrays, call msync() before unmapping to commit changes
6615 - #4292: various documentation problems
6616 - #4511, #4838: local modules remove polymorphism
6617 * #4549: Filename.dirname is not handling multiple / on Unix
6618 - #4688: (Windows) special floating-point values aren't converted to strings
6619 correctly
6620 - #4697: Unix.putenv leaks memory on failure
6621 - #4705: camlp4 does not allow to define types with `True or `False
6622 - #4746: wrong detection of stack overflows in native code under Linux
6623 - #4869: rare collisions between assembly labels for code and data
6624 - #4880: "assert" constructs now show up in the exception stack backtrace
6625 - #4892: Array.set could raise "out of bounds" before evaluating 3rd arg
6626 - #4937: camlp4 incorrectly handles optional arguments if 'option' is
6627 redefined
6628 - #5024: camlp4r now handles underscores in irrefutable pattern matching of
6629 records
6630 - #5064, #5485: try to ensure that 4K words of stack are available
6631 before calling into C functions, raising a Stack_overflow exception
6632 otherwise. This reduces (but does not eliminate) the risk of
6633 segmentation faults due to stack overflow in C code
6634 - #5073: wrong location for 'Unbound record field label' error
6635 - #5084: sub-sub-module building fails for native code compilation
6636 - #5120: fix the output function of Camlp4.Debug.formatter
6637 - #5131: compilation of custom runtime with g++ generates lots of warnings
6638 - #5137: caml-types-explore does not work
6639 - #5159: better documentation of type Lexing.position
6640 - #5171: Map.join does more comparisons than needed
6641 - #5176: emacs mode: stack overflow in regexp matcher
6642 - #5179: port OCaml to mingw-w64
6643 - #5211: updated Genlex documentation to state that camlp4 is mandatory for
6644 'parser' keyword and associated notation
6645 - #5214: ocamlfind plugin invokes 'cut' utility
6646 - #5218: use $(MAKE) instead of "make" in Makefiles
6647 - #5224: confusing error message in non-regular type definition
6648 - #5231: camlp4: fix parsing of <:str_item< type t = $x$ >>
6649 - #5233: finaliser on weak array gives dangling pointers (crash)
6650 - #5238, #5277: Sys_error when getting error location
6651 - #5261, #5497: Ocaml source-code examples are not "copy-paste-able"
6652 * #5279: executable name is not initialized properly in caml_startup_code
6653 - #5290: added hash functions for channels, nats, mutexes, conditions
6654 - #5291: undetected loop in class initialization
6655 - #5295: OS threads: problem with caml_c_thread_unregister()
6656 - #5301: camlp4r and exception equal to another one with parameters
6657 - #5305: prevent ocamlbuild from complaining about links to _build/
6658 - #5306: comparing to Thread.self() raises exception at runtime
6659 - #5309: Queue.add is not thread/signal safe
6660 - #5310: Ratio.create_ratio/create_normalized_ratio have misleading names
6661 - #5311: better message for warning 23
6662 * #5312: command-line arguments @reponsefile auto-expansion feature
6663 removed from the Windows OCaml runtime, to avoid conflicts with "-w @..."
6664 - #5313: ocamlopt -g misses optimizations
6665 - #5214: ocamlfind plugin invokes 'cut' utility
6666 - #5316: objinfo now shows ccopts/ccobjs/force_link when applicable
6667 - #5318: segfault on stack overflow when reading marshaled data
6668 - #5319: %r11 clobbered by Lswitch in Windows AMD64 native-code compilation
6669 - #5322: type abbreviations expanding to a universal type variable
6670 - #5328: under Windows, Unix.select leaves sockets in non-blocking mode
6671 - #5330: thread tag with '.top' and '.inferred.mli' targets
6672 - #5331: ocamlmktop is not always a shell script
6673 - #5335: Unix.environment segfaults after a call to clearenv
6674 - #5338: sanitize.sh has windows style end-of-lines (mingw)
6675 - #5344: some predefined exceptions need special printing
6676 - #5349: Hashtbl.replace uses new key instead of reusing old key
6677 - #5356: ocamlbuild handling of 'predicates' for ocamlfind
6678 - #5364: wrong compilation of "((val m : SIG1) : SIG2)"
6679 - #5370: ocamldep omits filename in syntax error message
6680 - #5374: camlp4 creates wrong location for type definitions
6681 - #5380: strange sscanf input segfault
6682 - #5382: EOPNOTSUPP and ENOTSUPP different on exotic platforms
6683 - #5383: build failure in Win32/MSVC
6684 - #5387: camlp4: str_item and other syntactic elements with Nils are
6685 not very usable
6686 - #5389: compaction sometimes leaves a very large heap
6687 - #5393: fails to build from source on GNU/kFreeBSD because of -R link option
6688 - #5394: documentation for -dtypes is missing in manpage
6689 - #5397: Filename.temp_dir_name should be mutable
6690 - #5410: fix printing of class application with Camlp4
6691 - #5416: (Windows) Unix.(set|clear)_close_on_exec now preserves blocking mode
6692 - #5435: ocamlbuild does not find .opt executables on Windows
6693 - #5436: update object ids on unmarshaling
6694 - #5442: camlp4: quotation issue with strings
6695 - #5453: configure doesn't find X11 under Ubuntu/MultiarchSpec
6696 - #5461: Double linking of bytecode modules
6697 - #5463: Bigarray.*.map_file fail if empty array is requested
6698 - #5465: increase stack size of ocamlopt.opt for windows
6699 - #5469: private record type generated by functor loses abbreviation
6700 - #5475: Wrapper script for interpreted LablTk wrongly handles command line
6701 parameters
6702 - #5476: bug in native code compilation of let rec on float arrays
6703 - #5477: use pkg-config to configure graphics on linux
6704 - #5481: update camlp4 magic numbers
6705 - #5482: remove bashism in test suite scripts
6706 - #5495: camlp4o dies on infix definition (or)
6707 - #5498: Unification with an empty object only checks the absence of
6708 the first method
6709 - #5503: error when ocamlbuild is passed an absolute path as build directory
6710 - #5509: misclassification of statically-allocated empty array that
6711 falls exactly at beginning of an otherwise unused data page.
6712 - #5510: ocamldep has duplicate -ml{,i}-synonym options
6713 - #5511: in Bigarray.reshape, unwarranted limitation on new array dimensions.
6714 - #5513: Int64.div causes floating point exception (ocamlopt, x86)
6715 - #5516: in Bigarray C stubs, use C99 flexible array types if possible
6716 - #5518: segfault with lazy empty array
6717 - #5531: Allow ocamlbuild to add ocamldoc flags through -docflag
6718 and -docflags switches
6719 - #5538: combining -i and -annot in ocamlc
6720 - #5543: in Bigarray.map_file, try to avoid using lseek() when growing file
6721 - #5648: (probably fixed) test failures in tests/lib-threads
6722 - #5551: repeated calls to find_in_path degrade performance
6723 - #5552: Mac OS X: unrecognized gcc option "-no-cpp-precomp"
6724 - #5555: add Hashtbl.reset to resize the bucket table to its initial size
6725 - #5560: incompatible type for tuple pattern with -principal
6726 - #5575: Random states are not marshallable across architectures
6727 - #5579: camlp4: when a plugin is loaded in the toplevel,
6728 Token.Filter.define_filter has no effect before the first syntax error
6729 - #5585: typo: "explicitely"
6730 - #5587: documentation: "allows to" is not correct English
6731 - #5593: remove C file when -output-obj fails
6732 - #5597: register names for instrtrace primitives in embedded bytecode
6733 - #5598: add backslash-space support in strings in ocamllex
6734 - #5603: wrong .file debug info generated by ocamlopt -g
6735 - #5604: fix permissions of files created by ocamlbuild itself
6736 - #5610: new unmarshaler (from #5318) fails to freshen object identifiers
6737 - #5614: add missing -linkall flag when compiling ocamldoc.opt
6738 - #5616: move ocamlbuild documentation to the reference manual
6739 - #5619: Uncaught CType.Unify exception in the compiler
6740 - #5620: invalid printing of type manifest (camlp4 revised syntax)
6741 - #5637: invalid printing of anonymous type parameters (camlp4 revised syntax)
6742 - #5643: issues with .cfi and .loc directives generated by ocamlopt -g
6743 - #5644: Stream.count broken when used with Sapp or Slazy nodes
6744 - #5647: Cannot use install_printer in debugger
6745 - #5651: printer for abstract data type (camlp4 revised syntax)
6746 - #5654: self pattern variable location tweak
6747 - #5655: ocamlbuild doesn't pass cflags when building C stubs
6748 - #5657: wrong error location for abbreviated record fields
6749 - #5659: ocamlmklib -L option breaks with MSVC
6750 - #5661: fixes for the test suite
6751 - #5668: Camlp4 produces invalid syntax for "let _ = ..."
6752 - #5671: initialization of compare_ext field in caml_final_custom_operations()
6753 - #5677: do not use "value" as identifier (genprintval.ml)
6754 - #5687: dynlink broken when used from "output-obj" main program (bytecode)
6755 - problem with printing of string literals in camlp4 (reported on caml-list)
6756 - emacs mode: colorization of comments and strings now works correctly
6757 - problem with forall and method (reported on caml-list on 2011-07-26)
6758 - crash when using OCAMLRUNPARAM=a=X with invalid X (reported in private)
6759
6760 Feature wishes:
6761 - #2757: new option "-stdin" to make ocaml read stdin as a script
6762 - #3358: better error message when mixing -a and .cmxa
6763 - #3492: documentation: remove restriction on mixed streams
6764 - #7971: allow configuring LIBDIR, BINDIR, and MANDIR relative to $(PREFIX)
6765 - #8285: add Digest.from_hex
6766 - #8341: toplevel: add option to suppress continuation prompts
6767 - #4278: configure: option to disable "graph" library
6768 - #4444: new String.trim function, removing leading and trailing whistespace
6769 - #4549: make Filename.dirname/basename POSIX compliant
6770 - #4830: add option -v to expunge.ml
6771 - #4898: new Sys.big_endian boolean for machine endianness
6772 - #4963, #5467: no extern "C" into ocaml C-stub headers
6773 - #5199: tests are run only for bytecode if either native support is missing,
6774 or a non-empty value is set to "BYTECODE_ONLY" Makefile variable
6775 - #5215: marshalling of dynlinked closure
6776 - #5236: new '%revapply' primitive with the semantics 'revapply x f = f x',
6777