1 OCaml 4.07.1 (4 October 2018)
2 -----------------------------
3
4 This release consists mostly of bug fixes. The most salient bugs were
5
6 - MPR#7820, GPR#1897: a bug in Array.of_seq (new in 4.07)
7 (Thierry Martinez, review by Nicolás Ojeda Bär)
8
9 - MPR#7815, GPR#1896: crash in the major GC with the first-fit policy
10 (Stephen Dolan and Damien Doligez, report by Joris Giovannangeli)
11
12 - MPR#7821, GPR#1908: the compiler loads more cmi, which breaks some builds
13 (Jérémie Dimino, review by Gabriel Scherer)
14
15 - MPR#7833, GPR#1946: typechecking failure (regression) on large GADT matchings
16 (Thomas Refis, report by Jerome Simeon, review by Jacques Garrigue)
17
18 See the detailed list of fixes at (Changes#4.07.1).
19
20
21 OCaml 4.07.0 (10 July 2018):
22 ----------------------------
23
24 Some highlights of this release are:
25
26 - The way the standard library modules are organized internally has
27 changed (GPR#1010, by Jérémie Dimino):
28
29 1. the `List` module (for example) is now named `Stdlib__list`
30 2. a new Stdlib module contains a series of aliases
31 such as `module List = Stdlib__list`
32 3. the `Stdlib` module is implicitly opened when type-checking OCaml
33 programs (as `Pervasives` previously was), so that `Stdlib.List` can be
34 accessed as just `List`, as before.
35
36 This should be invisible to most users, although it is possible that
37 some tools show the `Stdlib.` or `Stdlib__` prefixes in
38 messages. (You might want to report these situations as usability
39 bugs.) The change prevents standard library modules from conflicting
40 with end-user filenames (please avoid `stdlib.ml` and the
41 `Stdlib__` prefix); we may introduce new standard library modules in
42 the future with less fear of breaking user code. In particular,
43 `Float` (GPR#1638, by Nicolás Ojeda Bär) and `Seq` (GPR#1002, by
44 Simon Cruanes) modules have now been added to the standard library.
45
46 - The error messages caused by various typing errors have been improved
47 to be easier to understand, in particular for beginners.
48 (GPR#1505, GPR#1510, by Arthur Charguéreau and Armaël Guéneau)
49
50 For example,
51
52 # while 1 do () done;;
53 ^
54 Error: This expression has type int but
55 an expression was expected of type bool
56
57 now adds the extra explanation
58
59 because it is in the condition of a while-loop
60
61 - Effort has been made to reduce the compilation time of flambda
62 programs, and the size of the produced `.cmx` files when using
63 the -Oclassic optimisation level.
64 (GPR#1401, GPR#1455, GPR#1627, GPR#1665, by Pierre Chambart, Xavier
65 Clerc, Fuyong Quah, and Leo White)
66
67 - The HTML manual has benefited from various style improvements
68 and should look visually nicer than previous editions.
69 (GPR#1741, GPR#1757, GPR#1767 by Charles Chamberlain and steinuil)
70
71 The new version of the manual can be consulted at
72 <http://caml.inria.fr/pub/docs/manual-ocaml-4.07/>; see the
73 previous version for comparison at
74 <http://caml.inria.fr/pub/docs/manual-ocaml-4.06/>.
75
76 - Since 4.01, it is possible to select a variant constructor or
77 record field from a sub-module that is not opened in the current
78 scope, if type information is available at the point of use. This
79 now also works for GADT constructors.
80 (GPR#1648, by Thomas Refis and Leo White)
81
82 - The GC should handle the accumulation of custom blocks in the minor
83 heap better; this solves some memory-usage issues observed by code
84 which allocates a lot of small custom blocks, typically small bigarrays
85 (GPR#1476, by Alain Frsich)
86
87 See also the detailed list of changes: (Changes#4.07.0).
88
89
90 OCaml 4.06.1 (16 Feb 2018):
91 ---------------------------
92
93 This release consists mostly of bug fixes. The most salient bugs were
94
95 - An incorrect compilation of pattern-matching in presence of
96 extensible variant constructors (such as exceptions), that had been
97 present for a long time.
98 (GPR#1459, GPR#1538, by Luc Maranget, Thomas Refis and Gabriel Scherer)
99
100 - An optimization of `not (x = y)` into `x <> y`, introduced in
101 4.06.0, is incorrect on floating-point numbers in the `nan`
102 case. (GPR#1470, by Leo White)
103
104 See the detailed list of fixes at (Changes#4.06.1).
105
106
107 OCaml 4.06.0 (3 Nov 2017):
108 --------------------------
109
110 - Strings (type `string`) are now immutable by default. In-place
111 modification must use the type `bytes` of byte sequences, which is
112 distinct from `string`. This corresponds to the `-safe-string`
113 compile-time option, which was introduced in OCaml 4.02 in 2014, and
114 which is now the default.
115 (GPR#1252, by Damien Doligez)
116
117 - Object types can now extend a previously-defined object type,
118 as in `<t; a: int>`.
119 (GPR#1118, by Runhang Li)
120
121 - Destructive substitution over module signatures can now express more
122 substitutions, such as `S with type M.t := type-expr` and `S with
123 module M.N := path`.
124 (GPR#792, by Valentin Gatien-Baron)
125
126 - Users can now define operators that look like array indexing,
127 e.g. `let ( .%() ) = List.nth in [0; 1; 2].%(1)`
128 (GPR#1064, GPR#1392, by Florian Angeletti)
129
130 - New escape `\u{XXXX}` in string literals, denoting the UTF-8
131 encoding of the Unicode code point `XXXX`.
132 (GPR#1232, by Daniel Bünzli)
133
134 - Full Unicode support was added to the Windows runtime system. In
135 particular, file names can now contain Unicode characters.
136 (GPR#153, GPR#1200, GPR#1357, GPR#1362, GPR#1363, GPR#1369, GPR#1398,
137 GPR#1446, GPR#1448, by ygrek and Nicolás Ojeda Bär)
138
139 - An alternate register allocator based on linear scan can be selected
140 with `ocamlopt -linscan`. It reduces compilation time compared with
141 the default register allocator.
142 (GPR#375, Marcell Fischbach and Benedikt Meurer)
143
144 - The Num library for arbitrary-precision integer and rational
145 arithmetic is no longer part of the core distribution and can be
146 found as a separate OPAM package.
147
148 See the detailed list of changes: (Changes#4.06.0).
149
150
151 OCaml 4.05.0 (13 Jul 2017):
152 ---------------------------
153
154 Some highlights include:
155
156 - Instrumentation support for fuzzing with afl-fuzz.
157 (GPR#504, by Stephen Dolan)
158
159 - The compilers now accept new `-args/-args0 <file>` command-line
160 parameters to provide extra command-line arguments in a file. User
161 programs may implement similar options using the new `Expand`
162 constructor of the `Arg` module.
163 (GPR#748, GPR#843, GPR#864, by Bernhard Schommer)
164
165 - Many functions of the standard library that raise an exception now
166 have an option-returning variable suffixed by `_opt` Typical
167 examples of the new functions include:
168
169 int_of_string_opt: string -> int option
170 List.nth_opt: 'a list -> int -> 'a option
171 Hashtbl.find_opt : ('a, 'b) t -> 'a -> 'b option
172
173 (GPR#885, by Alain Frisch)
174
175 - The security of the runtime system is now hardened by using `secure_getenv`
176 to access environment variables whenever its possible, to avoid unplanned
177 privilege-escalation when running setuid binaries.
178 (GPR#1213, by Damien Doligez)
179
180 See the detailed list of changes: (Changes#4.05.0).
181