Gentoo Archives: gentoo-commits

From: Alexis Ballier <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ml/batteries/, dev-ml/batteries/files/
Date: Tue, 24 Jan 2017 11:06:13
Message-Id: 1485254943.a81ca5137d52c895f169351c1c144a6e645b5e19.aballier@gentoo
1 commit: a81ca5137d52c895f169351c1c144a6e645b5e19
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 24 10:49:03 2017 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 24 10:49:03 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a81ca513
7
8 dev-ml/batteries: remove old
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 dev-ml/batteries/Manifest | 2 -
13 dev-ml/batteries/batteries-2.4.0.ebuild | 31 --
14 dev-ml/batteries/batteries-2.5.2.ebuild | 24 -
15 dev-ml/batteries/files/oc43-1.patch | 762 --------------------------------
16 dev-ml/batteries/files/oc43-2.patch | 344 --------------
17 dev-ml/batteries/files/oc43-3.patch | 21 -
18 6 files changed, 1184 deletions(-)
19
20 diff --git a/dev-ml/batteries/Manifest b/dev-ml/batteries/Manifest
21 index d8f166c..5a016d7 100644
22 --- a/dev-ml/batteries/Manifest
23 +++ b/dev-ml/batteries/Manifest
24 @@ -1,3 +1 @@
25 -DIST batteries-2.4.0.tar.gz 739489 SHA256 f13ff15efa35c272e1e63a2604f92c1823d5685cd73d3d6cf00f25f80178439f SHA512 091aad40268aa3826f840e5abdb8be75665df3d026aae4206d467c2e2b2b2f10746280c2baecca3bc9b66a51aadb2346801d1e41ce9ff3cc3b7fd9808b63d193 WHIRLPOOL f1206abea0e1bed86b55e89f511112e113505b6dc4d2ccae185b83fdbddcec0389b1a302b9fca2531e5ba76c24278f68bdd785a187410d984d24f1dddd8a62cf
26 -DIST batteries-2.5.2.tar.gz 750624 SHA256 649038b47cdc2b7d4d4331fdb54b1e726212ce904c3472687a86aaa8d6006451 SHA512 310a2c88986cefe06424d428579203a5e147515fcd839a19daaedeca25803ef593d8eeb68027f26509fd820794b7928bf5ae56ff1aef852523ee91a4ce0d4d0d WHIRLPOOL eb4816ad84bac010460ca50e7f953fb2b05f3103444fcbc2e7b7b9a7a6f8dcf9fa5983f571128b6f8da38e0229a733b48dddbbb13fadc99deeffaea82ebaa744
27 DIST batteries-2.5.3.tar.gz 756020 SHA256 d437cfc8e65027425c081c8f72c2e4499f539ea5ea574bcabd372bdca45370b9 SHA512 d1b776c82a8a79c2908da5f5c7b7ee335ea8520e05b725910c03f4eb3c6e653619e1ff9fab8811d94a613620a84ec016651d13773e1ceea8830bb8c1ce7b46ba WHIRLPOOL 455a76a73037c5e0a2859699c080f6239158261f854c2bdca23f5fe7f7dcc33a8d6157c954ae207cd8a302643d632946953d2941009093720055ecff50762a23
28
29 diff --git a/dev-ml/batteries/batteries-2.4.0.ebuild b/dev-ml/batteries/batteries-2.4.0.ebuild
30 deleted file mode 100644
31 index b5a7c8f..00000000
32 --- a/dev-ml/batteries/batteries-2.4.0.ebuild
33 +++ /dev/null
34 @@ -1,31 +0,0 @@
35 -# Copyright 1999-2014 Gentoo Foundation
36 -# Distributed under the terms of the GNU General Public License v2
37 -# $Id$
38 -
39 -EAPI=5
40 -
41 -inherit oasis
42 -
43 -DESCRIPTION="The community-maintained foundation library for your OCaml projects"
44 -HOMEPAGE="https://github.com/ocaml-batteries-team/batteries-included/"
45 -SRC_URI="https://github.com/ocaml-batteries-team/batteries-included/archive/v${PV}.tar.gz -> ${P}.tar.gz"
46 -
47 -LICENSE="LGPL-2.1-with-linking-exception"
48 -SLOT="0/${PV}"
49 -KEYWORDS="~amd64"
50 -IUSE="test"
51 -
52 -RDEPEND="dev-ml/camomile:="
53 -DEPEND="${RDEPEND}
54 - test? ( dev-ml/ounit dev-ml/iTeML )"
55 -
56 -DOCS=( "ChangeLog" "FAQ" "README.folders" "README.md" )
57 -
58 -S="${WORKDIR}/${PN}-included-${PV}"
59 -
60 -src_prepare() {
61 - has_version '>=dev-lang/ocaml-4.03' && epatch \
62 - "${FILESDIR}/oc43-1.patch" \
63 - "${FILESDIR}/oc43-2.patch" \
64 - "${FILESDIR}/oc43-3.patch"
65 -}
66
67 diff --git a/dev-ml/batteries/batteries-2.5.2.ebuild b/dev-ml/batteries/batteries-2.5.2.ebuild
68 deleted file mode 100644
69 index 1548038..00000000
70 --- a/dev-ml/batteries/batteries-2.5.2.ebuild
71 +++ /dev/null
72 @@ -1,24 +0,0 @@
73 -# Copyright 1999-2014 Gentoo Foundation
74 -# Distributed under the terms of the GNU General Public License v2
75 -# $Id$
76 -
77 -EAPI=5
78 -
79 -inherit oasis
80 -
81 -DESCRIPTION="The community-maintained foundation library for your OCaml projects"
82 -HOMEPAGE="https://github.com/ocaml-batteries-team/batteries-included/"
83 -SRC_URI="https://github.com/ocaml-batteries-team/batteries-included/archive/v${PV}.tar.gz -> ${P}.tar.gz"
84 -
85 -LICENSE="LGPL-2.1-with-linking-exception"
86 -SLOT="0/${PV}"
87 -KEYWORDS="~amd64"
88 -IUSE="test"
89 -
90 -RDEPEND="dev-ml/camomile:="
91 -DEPEND="${RDEPEND}
92 - test? ( dev-ml/ounit dev-ml/iTeML )"
93 -
94 -DOCS=( "ChangeLog" "FAQ" "README.folders" "README.md" )
95 -
96 -S="${WORKDIR}/${PN}-included-${PV}"
97
98 diff --git a/dev-ml/batteries/files/oc43-1.patch b/dev-ml/batteries/files/oc43-1.patch
99 deleted file mode 100644
100 index a032374..00000000
101 --- a/dev-ml/batteries/files/oc43-1.patch
102 +++ /dev/null
103 @@ -1,762 +0,0 @@
104 -commit 45bcb681e4218586b66f3a0d83d7f5a51f5548e0
105 -Author: KC Sivaramakrishnan <sk826@×××××××××.uk>
106 -Date: Wed Mar 23 09:42:33 2016 +0000
107 -
108 - Upgrading to 4.03
109 -
110 -diff --git a/src/batArray.mliv b/src/batArray.mliv
111 -index 51b4e28..025887f 100644
112 ---- a/src/batArray.mliv
113 -+++ b/src/batArray.mliv
114 -@@ -82,8 +82,7 @@ external make : int -> 'a -> 'a array = "caml_make_vect"
115 - If the value of [x] is a floating-point number, then the maximum
116 - size is only [Sys.max_array_length / 2].*)
117 -
118 --##V<4.2##val make_float : int -> float array
119 --##V>=4.2##external make_float : int -> float array = "caml_make_float_vect"
120 -+val make_float : int -> float array
121 - (** [Array.make_float n] returns a fresh float array of length [n],
122 - with uninitialized data.
123 -
124 -diff --git a/src/batCharParser.mli b/src/batCharParser.mli
125 -index 52c00d8..80ff8a8 100644
126 ---- a/src/batCharParser.mli
127 -+++ b/src/batCharParser.mli
128 -@@ -52,7 +52,7 @@ val source_of_string : string -> (char, position) Source.t
129 - val source_of_enum : char BatEnum.t -> (char, position) Source.t
130 - (** Create a source from a latin-1 character.*)
131 -
132 --val parse : (char, 'a, position) t -> string -> ('a, position report) BatPervasives.result
133 -+val parse : (char, 'a, position) t -> string -> ('a, position report) result
134 - (**Apply a parser to a string.*)
135 -
136 - (**{6 Utilities}*)
137 -diff --git a/src/batGc.mli b/src/batGc.mli
138 -index f3e6f54..ecffb79 100644
139 ---- a/src/batGc.mli
140 -+++ b/src/batGc.mli
141 -@@ -34,18 +34,18 @@
142 - type stat = Gc.stat =
143 - { minor_words : float;
144 - (** Number of words allocated in the minor heap since
145 -- the program was started. This number is accurate in
146 -- byte-code programs, but only an approximation in programs
147 -- compiled to native code. *)
148 -+ the program was started. This number is accurate in
149 -+ byte-code programs, but only an approximation in programs
150 -+ compiled to native code. *)
151 -
152 - promoted_words : float;
153 - (** Number of words allocated in the minor heap that
154 -- survived a minor collection and were moved to the major heap
155 -- since the program was started. *)
156 -+ survived a minor collection and were moved to the major heap
157 -+ since the program was started. *)
158 -
159 - major_words : float;
160 - (** Number of words allocated in the major heap, including
161 -- the promoted words, since the program was started. *)
162 -+ the promoted words, since the program was started. *)
163 -
164 - minor_collections : int;
165 - (** Number of minor collections since the program was started. *)
166 -@@ -62,7 +62,7 @@ type stat = Gc.stat =
167 -
168 - live_words : int;
169 - (** Number of words of live data in the major heap, including the header
170 -- words. *)
171 -+ words. *)
172 -
173 - live_blocks : int;
174 - (** Number of live blocks in the major heap. *)
175 -@@ -78,8 +78,8 @@ type stat = Gc.stat =
176 -
177 - fragments : int;
178 - (** Number of wasted words due to fragmentation. These are
179 -- 1-words free blocks placed between two live blocks. They
180 -- are not available for allocation. *)
181 -+ 1-words free blocks placed between two live blocks. They
182 -+ are not available for allocation. *)
183 -
184 - compactions : int;
185 - (** Number of heap compactions since the program was started. *)
186 -@@ -89,62 +89,68 @@ type stat = Gc.stat =
187 -
188 - stack_size: int;
189 - (** Current size of the stack, in words. @since 3.12.0 *)
190 -- }
191 -+}
192 - (** The memory management counters are returned in a [stat] record.
193 -
194 -- The total amount of memory allocated by the program since it was started
195 -- is (in words) [minor_words + major_words - promoted_words]. Multiply by
196 -- the word size (4 on a 32-bit machine, 8 on a 64-bit machine) to get
197 -- the number of bytes.
198 -+ The total amount of memory allocated by the program since it was started
199 -+ is (in words) [minor_words + major_words - promoted_words]. Multiply by
200 -+ the word size (4 on a 32-bit machine, 8 on a 64-bit machine) to get
201 -+ the number of bytes.
202 - *)
203 -
204 - type control = Gc.control =
205 - { mutable minor_heap_size : int;
206 - (** The size (in words) of the minor heap. Changing
207 -- this parameter will trigger a minor collection. Default: 32k. *)
208 -+ this parameter will trigger a minor collection. Default: 256k. *)
209 -
210 - mutable major_heap_increment : int;
211 -- (** The minimum number of words to add to the
212 -- major heap when increasing it. Default: 124k. *)
213 -+ (** How much to add to the major heap when increasing it. If this
214 -+ number is less than or equal to 1000, it is a percentage of
215 -+ the current heap size (i.e. setting it to 100 will double the heap
216 -+ size at each increase). If it is more than 1000, it is a fixed
217 -+ number of words that will be added to the heap. Default: 15. *)
218 -
219 - mutable space_overhead : int;
220 - (** The major GC speed is computed from this parameter.
221 -- This is the memory that will be "wasted" because the GC does not
222 -- immediatly collect unreachable blocks. It is expressed as a
223 -- percentage of the memory used for live data.
224 -- The GC will work more (use more CPU time and collect
225 -- blocks more eagerly) if [space_overhead] is smaller.
226 -- Default: 80. *)
227 -+ This is the memory that will be "wasted" because the GC does not
228 -+ immediatly collect unreachable blocks. It is expressed as a
229 -+ percentage of the memory used for live data.
230 -+ The GC will work more (use more CPU time and collect
231 -+ blocks more eagerly) if [space_overhead] is smaller.
232 -+ Default: 80. *)
233 -
234 - mutable verbose : int;
235 - (** This value controls the GC messages on standard error output.
236 -- It is a sum of some of the following flags, to print messages
237 -- on the corresponding events:
238 -- - [0x001] Start of major GC cycle.
239 -- - [0x002] Minor collection and major GC slice.
240 -- - [0x004] Growing and shrinking of the heap.
241 -- - [0x008] Resizing of stacks and memory manager tables.
242 -- - [0x010] Heap compaction.
243 -- - [0x020] Change of GC parameters.
244 -- - [0x040] Computation of major GC slice size.
245 -- - [0x080] Calling of finalisation functions.
246 -- - [0x100] Bytecode executable search at start-up.
247 -- - [0x200] Computation of compaction triggering condition.
248 -- Default: 0. *)
249 -+ It is a sum of some of the following flags, to print messages
250 -+ on the corresponding events:
251 -+ - [0x001] Start of major GC cycle.
252 -+ - [0x002] Minor collection and major GC slice.
253 -+ - [0x004] Growing and shrinking of the heap.
254 -+ - [0x008] Resizing of stacks and memory manager tables.
255 -+ - [0x010] Heap compaction.
256 -+ - [0x020] Change of GC parameters.
257 -+ - [0x040] Computation of major GC slice size.
258 -+ - [0x080] Calling of finalisation functions.
259 -+ - [0x100] Bytecode executable and shared library search at start-up.
260 -+ - [0x200] Computation of compaction-triggering condition.
261 -+ - [0x400] Output GC statistics at program exit.
262 -+ Default: 0. *)
263 -
264 - mutable max_overhead : int;
265 - (** Heap compaction is triggered when the estimated amount
266 -- of "wasted" memory is more than [max_overhead] percent of the
267 -- amount of live data. If [max_overhead] is set to 0, heap
268 -- compaction is triggered at the end of each major GC cycle
269 -- (this setting is intended for testing purposes only).
270 -- If [max_overhead >= 1000000], compaction is never triggered.
271 -- Default: 500. *)
272 -+ of "wasted" memory is more than [max_overhead] percent of the
273 -+ amount of live data. If [max_overhead] is set to 0, heap
274 -+ compaction is triggered at the end of each major GC cycle
275 -+ (this setting is intended for testing purposes only).
276 -+ If [max_overhead >= 1000000], compaction is never triggered.
277 -+ If compaction is permanently disabled, it is strongly suggested
278 -+ to set [allocation_policy] to 1.
279 -+ Default: 500. *)
280 -
281 - mutable stack_limit : int;
282 - (** The maximum size of the stack (in words). This is only
283 -- relevant to the byte-code runtime, as the native code runtime
284 -- uses the operating system's stack. Default: 256k. *)
285 -+ relevant to the byte-code runtime, as the native code runtime
286 -+ uses the operating system's stack. Default: 1024k. *)
287 -
288 - mutable allocation_policy : int;
289 - (** The policy used for allocating in the heap. Possible
290 -@@ -153,16 +159,22 @@ type control = Gc.control =
291 - first-fit policy, which can be slower in some cases but
292 - can be better for programs with fragmentation problems.
293 - Default: 0. @since 3.11.0 *)
294 -- }
295 -+
296 -+ window_size : int;
297 -+ (** The size of the window used by the major GC for smoothing
298 -+ out variations in its workload. This is an integer between
299 -+ 1 and 50.
300 -+ Default: 1. @since 4.03.0 *)
301 -+}
302 - (** The GC parameters are given as a [control] record. Note that
303 - these parameters can also be initialised by setting the
304 - OCAMLRUNPARAM environment variable. See the documentation of
305 -- ocamlrun. *)
306 -+ [ocamlrun]. *)
307 -
308 - external stat : unit -> stat = "caml_gc_stat"
309 - (** Return the current values of the memory management counters in a
310 -- [stat] record. This function examines every heap block to get the
311 -- statistics. *)
312 -+ [stat] record. This function examines every heap block to get the
313 -+ statistics. *)
314 -
315 - external quick_stat : unit -> stat = "caml_gc_quick_stat"
316 - (** Same as [stat] except that [live_words], [live_blocks], [free_words],
317 -@@ -172,117 +184,144 @@ external quick_stat : unit -> stat = "caml_gc_quick_stat"
318 -
319 - external counters : unit -> float * float * float = "caml_gc_counters"
320 - (** Return [(minor_words, promoted_words, major_words)]. This function
321 -- is as fast at [quick_stat]. *)
322 -+ is as fast as [quick_stat]. *)
323 -
324 - external get : unit -> control = "caml_gc_get"
325 - (** Return the current values of the GC parameters in a [control] record. *)
326 -
327 - external set : control -> unit = "caml_gc_set"
328 - (** [set r] changes the GC parameters according to the [control] record [r].
329 -- The normal usage is: [Gc.set { (Gc.get()) with Gc.verbose = 0x00d }] *)
330 -+ The normal usage is: [Gc.set { (Gc.get()) with Gc.verbose = 0x00d }] *)
331 -
332 - external minor : unit -> unit = "caml_gc_minor"
333 - (** Trigger a minor collection. *)
334 -
335 --external major_slice : int -> int = "caml_gc_major_slice";;
336 --(** Do a minor collection and a slice of major collection. The argument
337 -- is the size of the slice, 0 to use the automatically-computed
338 -- slice size. In all cases, the result is the computed slice size. *)
339 -+external major_slice : int -> int = "caml_gc_major_slice"
340 -+(** [major_slice n]
341 -+ Do a minor collection and a slice of major collection. [n] is the
342 -+ size of the slice: the GC will do enough work to free (on average)
343 -+ [n] words of memory. If [n] = 0, the GC will try to do enough work
344 -+ to ensure that the next slice has no work to do.
345 -+ Return an approximation of the work that the next slice will have
346 -+ to do. *)
347 -
348 - external major : unit -> unit = "caml_gc_major"
349 - (** Do a minor collection and finish the current major collection cycle. *)
350 -
351 - external full_major : unit -> unit = "caml_gc_full_major"
352 - (** Do a minor collection, finish the current major collection cycle,
353 -- and perform a complete new cycle. This will collect all currently
354 -- unreachable blocks. *)
355 -+ and perform a complete new cycle. This will collect all currently
356 -+ unreachable blocks. *)
357 -
358 - external compact : unit -> unit = "caml_gc_compaction"
359 - (** Perform a full major collection and compact the heap. Note that heap
360 -- compaction is a lengthy operation. *)
361 -+ compaction is a lengthy operation. *)
362 -
363 - val print_stat : _ BatInnerIO.output -> unit
364 - (** Print the current values of the memory management counters (in
365 -- human-readable form) into the channel argument. *)
366 -+ human-readable form) into the channel argument. *)
367 -
368 - val allocated_bytes : unit -> float
369 - (** Return the total number of bytes allocated since the program was
370 -- started. It is returned as a [float] to avoid overflow problems
371 -- with [int] on 32-bit machines. *)
372 -+ started. It is returned as a [float] to avoid overflow problems
373 -+ with [int] on 32-bit machines. *)
374 -+
375 -+external get_minor_free : unit -> int = "caml_get_minor_free" [@@noalloc]
376 -+(** Return the current size of the free space inside the minor heap. *)
377 -+
378 -+external get_bucket : int -> int = "caml_get_major_bucket" [@@noalloc]
379 -+(** [get_bucket n] returns the current size of the [n]-th future bucket
380 -+ of the GC smoothing system. The unit is one millionth of a full GC.
381 -+ Raise [Invalid_argument] if [n] is negative, return 0 if n is larger
382 -+ than the smoothing window. *)
383 -+
384 -+external get_credit : unit -> int = "caml_get_major_credit" [@@noalloc]
385 -+(** [get_credit ()] returns the current size of the "work done in advance"
386 -+ counter of the GC smoothing system. The unit is one millionth of a
387 -+ full GC. *)
388 -+
389 -+external huge_fallback_count : unit -> int = "caml_gc_huge_fallback_count"
390 -+(** Return the number of times we tried to map huge pages and had to fall
391 -+ back to small pages. This is always 0 if [OCAMLRUNPARAM] contains [H=1].
392 -+ @since 4.03.0 *)
393 -
394 - val finalise : ('a -> unit) -> 'a -> unit
395 - (** [finalise f v] registers [f] as a finalisation function for [v].
396 -- [v] must be heap-allocated. [f] will be called with [v] as
397 -- argument at some point between the first time [v] becomes unreachable
398 -- and the time [v] is collected by the GC. Several functions can
399 -- be registered for the same value, or even several instances of the
400 -- same function. Each instance will be called once (or never,
401 -- if the program terminates before [v] becomes unreachable).
402 --
403 -- The GC will call the finalisation functions in the order of
404 -- deallocation. When several values become unreachable at the
405 -- same time (i.e. during the same GC cycle), the finalisation
406 -- functions will be called in the reverse order of the corresponding
407 -- calls to [finalise]. If [finalise] is called in the same order
408 -- as the values are allocated, that means each value is finalised
409 -- before the values it depends upon. Of course, this becomes
410 -- false if additional dependencies are introduced by assignments.
411 --
412 -- Anything reachable from the closure of finalisation functions
413 -- is considered reachable, so the following code will not work
414 -- as expected:
415 -- - [ let v = ... in Gc.finalise (fun x -> ...) v ]
416 --
417 -- Instead you should write:
418 -- - [ let f = fun x -> ... ;; let v = ... in Gc.finalise f v ]
419 --
420 --
421 -- The [f] function can use all features of OCaml, including
422 -- assignments that make the value reachable again. It can also
423 -- loop forever (in this case, the other
424 -- finalisation functions will not be called during the execution of f,
425 -- unless it calls [finalise_release]).
426 -- It can call [finalise] on [v] or other values to register other
427 -- functions or even itself. It can raise an exception; in this case
428 -- the exception will interrupt whatever the program was doing when
429 -- the function was called.
430 --
431 --
432 -- [finalise] will raise [Invalid_argument] if [v] is not
433 -- heap-allocated. Some examples of values that are not
434 -- heap-allocated are integers, constant constructors, booleans,
435 -- the empty array, the empty list, the unit value. The exact list
436 -- of what is heap-allocated or not is implementation-dependent.
437 -- Some constant values can be heap-allocated but never deallocated
438 -- during the lifetime of the program, for example a list of integer
439 -- constants; this is also implementation-dependent.
440 -- You should also be aware that compiler optimisations may duplicate
441 -- some immutable values, for example floating-point numbers when
442 -- stored into arrays, so they can be finalised and collected while
443 -- another copy is still in use by the program.
444 --
445 --
446 -- The results of calling {!String.make}, {!String.create},
447 -- {!Array.make}, and {!Pervasives.ref} are guaranteed to be
448 -- heap-allocated and non-constant except when the length argument is [0].
449 -+ [v] must be heap-allocated. [f] will be called with [v] as
450 -+ argument at some point between the first time [v] becomes unreachable
451 -+ (including through weak pointers) and the time [v] is collected by
452 -+ the GC. Several functions can
453 -+ be registered for the same value, or even several instances of the
454 -+ same function. Each instance will be called once (or never,
455 -+ if the program terminates before [v] becomes unreachable).
456 -+
457 -+ The GC will call the finalisation functions in the order of
458 -+ deallocation. When several values become unreachable at the
459 -+ same time (i.e. during the same GC cycle), the finalisation
460 -+ functions will be called in the reverse order of the corresponding
461 -+ calls to [finalise]. If [finalise] is called in the same order
462 -+ as the values are allocated, that means each value is finalised
463 -+ before the values it depends upon. Of course, this becomes
464 -+ false if additional dependencies are introduced by assignments.
465 -+
466 -+ In the presence of multiple OCaml threads it should be assumed that
467 -+ any particular finaliser may be executed in any of the threads.
468 -+
469 -+ Anything reachable from the closure of finalisation functions
470 -+ is considered reachable, so the following code will not work
471 -+ as expected:
472 -+ - [ let v = ... in Gc.finalise (fun _ -> ...v...) v ]
473 -+
474 -+ Instead you should make sure that [v] is not in the closure of
475 -+ the finalisation function by writing:
476 -+ - [ let f = fun x -> ... ;; let v = ... in Gc.finalise f v ]
477 -+
478 -+
479 -+ The [f] function can use all features of OCaml, including
480 -+ assignments that make the value reachable again. It can also
481 -+ loop forever (in this case, the other
482 -+ finalisation functions will not be called during the execution of f,
483 -+ unless it calls [finalise_release]).
484 -+ It can call [finalise] on [v] or other values to register other
485 -+ functions or even itself. It can raise an exception; in this case
486 -+ the exception will interrupt whatever the program was doing when
487 -+ the function was called.
488 -+
489 -+
490 -+ [finalise] will raise [Invalid_argument] if [v] is not
491 -+ guaranteed to be heap-allocated. Some examples of values that are not
492 -+ heap-allocated are integers, constant constructors, booleans,
493 -+ the empty array, the empty list, the unit value. The exact list
494 -+ of what is heap-allocated or not is implementation-dependent.
495 -+ Some constant values can be heap-allocated but never deallocated
496 -+ during the lifetime of the program, for example a list of integer
497 -+ constants; this is also implementation-dependent.
498 -+ Note that values of types [float] and ['a lazy] (for any ['a]) are
499 -+ sometimes allocated and sometimes not, so finalising them is unsafe,
500 -+ and [finalise] will also raise [Invalid_argument] for them.
501 -+
502 -+
503 -+ The results of calling {!String.make}, {!Bytes.make}, {!Bytes.create},
504 -+ {!Array.make}, and {!Pervasives.ref} are guaranteed to be
505 -+ heap-allocated and non-constant except when the length argument is [0].
506 - *)
507 -
508 --val finalise_release : unit -> unit;;
509 -+val finalise_release : unit -> unit
510 - (** A finalisation function may call [finalise_release] to tell the
511 - GC that it can launch the next finalisation function without waiting
512 - for the current one to return. *)
513 -
514 - type alarm = Gc.alarm
515 - (** An alarm is a piece of data that calls a user function at the end of
516 -- each major GC cycle. The following functions are provided to create
517 -- and delete alarms. *)
518 -+ each major GC cycle. The following functions are provided to create
519 -+ and delete alarms. *)
520 -
521 - val create_alarm : (unit -> unit) -> alarm
522 - (** [create_alarm f] will arrange for [f] to be called at the end of each
523 -- major GC cycle, starting with the current cycle or the next one.
524 -- A value of type [alarm] is returned that you can
525 -- use to call [delete_alarm]. *)
526 -+ major GC cycle, starting with the current cycle or the next one.
527 -+ A value of type [alarm] is returned that you can
528 -+ use to call [delete_alarm]. *)
529 -
530 - val delete_alarm : alarm -> unit
531 -- (** [delete_alarm a] will stop the calls to the function associated
532 -- to [a]. Calling [delete_alarm a] again has no effect. *)
533 -+(** [delete_alarm a] will stop the calls to the function associated
534 -+ to [a]. Calling [delete_alarm a] again has no effect. *)
535 -diff --git a/src/batHashtbl.mli b/src/batHashtbl.mli
536 -index d3a9118..dd95c0c 100644
537 ---- a/src/batHashtbl.mli
538 -+++ b/src/batHashtbl.mli
539 -@@ -276,7 +276,7 @@ val print : ?first:string -> ?last:string -> ?sep:string -> ?kvsep:string ->
540 - module Exceptionless :
541 - sig
542 - val find : ('a, 'b) t -> 'a -> 'b option
543 -- val modify : 'a -> ('b -> 'b) -> ('a, 'b) t -> (unit, exn) BatPervasives.result
544 -+ val modify : 'a -> ('b -> 'b) -> ('a, 'b) t -> (unit, exn) result
545 - end
546 -
547 - (** Infix operators over a {!BatHashtbl} *)
548 -@@ -402,7 +402,7 @@ sig
549 - module Exceptionless :
550 - sig
551 - val find : 'a t -> key -> 'a option
552 -- val modify : key -> ('a -> 'a) -> 'a t -> (unit, exn) BatPervasives.result
553 -+ val modify : key -> ('a -> 'a) -> 'a t -> (unit, exn) result
554 - end
555 -
556 - (** Infix operators over a {!BatHashtbl} *)
557 -@@ -562,7 +562,7 @@ sig
558 - module Exceptionless :
559 - sig
560 - val find : ('a, 'b, [>`Read]) t -> 'a -> 'b option
561 -- val modify : 'a -> ('b -> 'b) -> ('a, 'b, [>`Read]) t -> (unit, exn) BatPervasives.result
562 -+ val modify : 'a -> ('b -> 'b) -> ('a, 'b, [>`Read]) t -> (unit, exn) result
563 - end
564 -
565 - (** Operations on {!BatHashtbl.Cap} with labels.*)
566 -diff --git a/src/batHashtbl.mlv b/src/batHashtbl.mlv
567 -index 6a79a33..ef7a030 100644
568 ---- a/src/batHashtbl.mlv
569 -+++ b/src/batHashtbl.mlv
570 -@@ -413,7 +413,7 @@ sig
571 - module Exceptionless :
572 - sig
573 - val find : 'a t -> key -> 'a option
574 -- val modify : key -> ('a -> 'a) -> 'a t -> (unit, exn) BatPervasives.result
575 -+ val modify : key -> ('a -> 'a) -> 'a t -> (unit, exn) result
576 - end
577 -
578 - (** Infix operators over a {!BatHashtbl} *)
579 -@@ -571,7 +571,7 @@ struct
580 - let map_inplace (f:key -> 'a -> 'b) h = map_inplace f (to_hash h)
581 - let filteri_inplace f h = filteri_inplace f (to_hash h)
582 - let filter_inplace f h = filter_inplace f (to_hash h)
583 -- let filter_map_inplace f h = filter_map_inplace f (to_hash h)
584 -+ let filter_map_inplace f h = filter_map_inplace f h
585 -
586 -
587 - let find_option h key =
588 -diff --git a/src/batInnerPervasives.mlv b/src/batInnerPervasives.mlv
589 -index c86f1f7..c81cba4 100644
590 ---- a/src/batInnerPervasives.mlv
591 -+++ b/src/batInnerPervasives.mlv
592 -@@ -43,20 +43,16 @@ let unique () =
593 - Q.unit (fun () -> unique () <> unique ())
594 - *)
595 -
596 --type ('a, 'b) result =
597 -- | Ok of 'a
598 -- | Bad of 'b
599 --
600 - (* Ideas taken from Nicholas Pouillard's my_std.ml in ocamlbuild/ *)
601 - let ignore_ok = function
602 - Ok _ -> ()
603 -- | Bad ex -> raise ex
604 -+ | Error ex -> raise ex
605 -
606 - let ok = function
607 - Ok v -> v
608 -- | Bad ex -> raise ex
609 -+ | Error ex -> raise ex
610 -
611 --let wrap f x = try Ok (f x) with ex -> Bad ex
612 -+let wrap f x = try Ok (f x) with ex -> Error ex
613 -
614 - let forever f x = ignore (while true do f x done)
615 -
616 -diff --git a/src/batInnerWeaktbl.ml b/src/batInnerWeaktbl.ml
617 -index 64bb15f..c525f62 100644
618 ---- a/src/batInnerWeaktbl.ml
619 -+++ b/src/batInnerWeaktbl.ml
620 -@@ -120,6 +120,7 @@ module Make (H: Hashtbl.HashedType) : Hashtbl.S with type key = H.t = struct
621 - W.iter (fun cls -> W.add tbl' (Stack.copy cls)) tbl; tbl'
622 - let stats _ = assert false
623 - let reset _ = assert false
624 -+ let filter_map_inplace _ = assert false
625 - end
626 -
627 - module StdHash = Make
628 -diff --git a/src/batParserCo.ml b/src/batParserCo.ml
629 -index cac4701..75ac6fb 100644
630 ---- a/src/batParserCo.ml
631 -+++ b/src/batParserCo.ml
632 -@@ -274,10 +274,10 @@ let lookahead p e = match apply p e with
633 - | Failure _ as result -> result
634 -
635 - let interpret_result = function
636 -- | Setback f | Failure f -> BatInnerPervasives.Bad f
637 -- | Success (r, _) | Backtrack (r, _, _) -> BatInnerPervasives.Ok r
638 -+ | Setback f | Failure f -> Error f
639 -+ | Success (r, _) | Backtrack (r, _, _) -> Ok r
640 -
641 --let suspend : ('a, 'b, 'c) t -> ('a, (unit -> ('b, 'c report) BatInnerPervasives.result), 'c) t = fun s e ->
642 -+let suspend : ('a, 'b, 'c) t -> ('a, (unit -> ('b, 'c report) Pervasives.result), 'c) t = fun s e ->
643 - let resume () = interpret_result (s e) in
644 - Success (resume, e)
645 -
646 -diff --git a/src/batParserCo.mli b/src/batParserCo.mli
647 -index 1fbe15a..40c5cf7 100644
648 ---- a/src/batParserCo.mli
649 -+++ b/src/batParserCo.mli
650 -@@ -141,15 +141,15 @@ val filter: ('b -> bool) -> ('a, 'b, 'c) t -> ('a, 'b, 'c) t
651 - (**[filter f p] is only accepts values [x] such that [p]
652 - accepts [x] and [f (p x)] is [true]*)
653 -
654 --val suspend : ('a, 'b, 'c) t -> ('a, (unit -> ('b, 'c report) BatPervasives.result), 'c) t
655 -+val suspend : ('a, 'b, 'c) t -> ('a, (unit -> ('b, 'c report) result), 'c) t
656 - (**[suspend s] returns the state of the parser in a form that can be
657 - resumed by calling the returned function. evaluation will resume
658 - from parser s *)
659 -
660 --val run: ('a, 'b, 'c) t -> ('a, 'c) Source.t -> ('b, 'c report) BatPervasives.result
661 -+val run: ('a, 'b, 'c) t -> ('a, 'c) Source.t -> ('b, 'c report) result
662 - (**[run p s] executes parser [p] on source [s]. In case of
663 - success, returns [Ok v], where [v] is the return value of [p].
664 -- In case of failure, returns [Bad f], with [f] containing
665 -+ In case of failure, returns [Error f], with [f] containing
666 - details on the parsing error.*)
667 -
668 -
669 -diff --git a/src/batPathGen.ml b/src/batPathGen.ml
670 -index 46a97ba..71d1084 100644
671 ---- a/src/batPathGen.ml
672 -+++ b/src/batPathGen.ml
673 -@@ -512,7 +512,7 @@ module Make = functor (S : StringType) -> struct
674 - let full_match pars ss =
675 - let parser_final = BatParserCo.( >>> ) pars BatParserCo.eof in
676 - match BatParserCo.run parser_final (S.Parse.source ss) with
677 -- | BatPervasives.Ok _ -> true
678 -+ | Ok _ -> true
679 - | _ -> false
680 -
681 - (* let full_match_none_of raw_excluded ss =
682 -diff --git a/src/batPervasives.mliv b/src/batPervasives.mliv
683 -index 6353214..c74b913 100644
684 ---- a/src/batPervasives.mliv
685 -+++ b/src/batPervasives.mliv
686 -@@ -842,20 +842,14 @@ val print : ?first:string -> ?last:string -> ?sep:string -> ('a BatInnerIO.outp
687 -
688 - For more functions related to this type, see the {!BatResult} module.
689 - *)
690 --type ('a, 'b) result = ('a, 'b) BatInnerPervasives.result =
691 -- | Ok of 'a
692 -- | Bad of 'b
693 -- (** The result of a computation - either an [Ok] with the normal
694 -- result or a [Bad] with some value (often an exception) containing
695 -- failure information*)
696 -
697 - val ignore_ok : ('a, exn) result -> unit
698 - (** [ignore_ok (f x)] ignores the result of [f x] if it's ok, but
699 -- throws the exception contained if [Bad] is returned. *)
700 -+ throws the exception contained if [Error] is returned. *)
701 -
702 - val ok : ('a, exn) result -> 'a
703 - (** [f x |> ok] unwraps the [Ok] result of [f x] and returns it, or
704 -- throws the exception contained if [Bad] is returned. *)
705 -+ throws the exception contained if [Error] is returned. *)
706 -
707 - val wrap : ('a -> 'b) -> 'a -> ('b, exn) result
708 - (** [wrap f x] wraps a function that would normally throw an exception
709 -diff --git a/src/batResult.ml b/src/batResult.ml
710 -index 1d98663..f90b4d9 100644
711 ---- a/src/batResult.ml
712 -+++ b/src/batResult.ml
713 -@@ -1,45 +1,45 @@
714 -
715 --type ('a, 'b) t = ('a, 'b) BatPervasives.result =
716 -+type ('a, 'b) t = ('a, 'b) result =
717 - | Ok of 'a
718 -- | Bad of 'b
719 -+ | Error of 'b
720 -
721 --let catch f x = try Ok (f x) with e -> Bad e
722 --let catch2 f x y = try Ok (f x y) with e -> Bad e
723 --let catch3 f x y z = try Ok (f x y z) with e -> Bad e
724 -+let catch f x = try Ok (f x) with e -> Error e
725 -+let catch2 f x y = try Ok (f x y) with e -> Error e
726 -+let catch3 f x y z = try Ok (f x y z) with e -> Error e
727 -
728 - let of_option = function
729 - | Some x -> Ok x
730 -- | None -> Bad ()
731 -+ | None -> Error ()
732 -
733 - let to_option = function
734 - | Ok x -> Some x
735 -- | Bad _-> None
736 -+ | Error _-> None
737 -
738 - let default def = function
739 - | Ok x -> x
740 -- | Bad _ -> def
741 -+ | Error _ -> def
742 -
743 - let map_default def f = function
744 - | Ok x -> f x
745 -- | Bad _ -> def
746 -+ | Error _ -> def
747 -
748 --let is_ok = function Ok _ -> true | Bad _ -> false
749 -+let is_ok = function Ok _ -> true | Error _ -> false
750 -
751 --let is_bad = function Bad _ -> true | Ok _ -> false
752 -+let is_bad = function Error _ -> true | Ok _ -> false
753 -
754 --let is_exn e = function Bad exn -> exn = e | Ok _ -> false
755 -+let is_exn e = function Error exn -> exn = e | Ok _ -> false
756 -
757 --let get = function Ok x -> x | Bad e -> raise e
758 -+let get = function Ok x -> x | Error e -> raise e
759 -
760 - let print print_val oc = function
761 - | Ok x -> BatPrintf.fprintf oc "Ok(%a)" print_val x
762 -- | Bad e -> BatPrintf.fprintf oc "Bad(%a)" BatPrintexc.print e
763 -+ | Error e -> BatPrintf.fprintf oc "Error(%a)" BatPrintexc.print e
764 -
765 -
766 - module Monad = struct
767 - let bind m k = match m with
768 - | Ok x -> k x
769 -- | Bad _ as e -> e
770 -+ | Error _ as e -> e
771 -
772 - let return x = Ok x
773 -
774 -diff --git a/src/batResult.mli b/src/batResult.mli
775 -index a295c64..203c125 100644
776 ---- a/src/batResult.mli
777 -+++ b/src/batResult.mli
778 -@@ -1,12 +1,12 @@
779 - (** Monadic results of computations that can raise exceptions *)
780 -
781 - (** The type of a result. A result is either [Ok x] carrying the
782 -- normal return value [x] or is [Bad e] carrying some indication of an
783 -+ normal return value [x] or is [Error e] carrying some indication of an
784 - error. The value associated with a bad result is usually an exception
785 - ([exn]) that can be raised.
786 - @since 1.0
787 - *)
788 --type ('a, 'b) t = ('a, 'b) BatPervasives.result = Ok of 'a | Bad of 'b
789 -+type ('a, 'b) t = ('a, 'b) result = Ok of 'a | Error of 'b
790 -
791 - (** Execute a function and catch any exception as a result. This
792 - function encapsulates code that could throw an exception and returns
793 -@@ -26,19 +26,19 @@ val catch2: ('a -> 'b -> 'c) -> 'a -> 'b -> ('c, exn) t
794 - val catch3: ('a -> 'b -> 'c -> 'd) -> 'a -> 'b -> 'c -> ('d, exn) t
795 -
796 -
797 --(** [get (Ok x)] returns [x], and [get (Bad e)] raises [e]. This
798 -+(** [get (Ok x)] returns [x], and [get (Error e)] raises [e]. This
799 - function is, in a way, the opposite of the [catch] function
800 - @since 2.0
801 - *)
802 - val get : ('a, exn) t -> 'a
803 -
804 --(** [default d r] evaluates to [d] if [r] is [Bad] else [x] when [r] is
805 -+(** [default d r] evaluates to [d] if [r] is [Error] else [x] when [r] is
806 - [Ok x]
807 - @since 2.0
808 - *)
809 - val default: 'a -> ('a, _) t -> 'a
810 -
811 --(** [map_default d f r] evaluates to [d] if [r] is [Bad] else [f x]
812 -+(** [map_default d f r] evaluates to [d] if [r] is [Error] else [f x]
813 - when [r] is [Ok x]
814 - @since 2.0
815 - *)
816 -@@ -49,12 +49,12 @@ val map_default : 'b -> ('a -> 'b) -> ('a, _) t -> 'b
817 - *)
818 - val is_ok : ('a, 'b) t -> bool
819 -
820 --(** [is_bad (Bad _)] is [true], otherwise [false]
821 -+(** [is_bad (Error _)] is [true], otherwise [false]
822 - @since 2.0
823 - *)
824 - val is_bad : ('a, 'b) t -> bool
825 -
826 --(** [is_exn e1 r] is [true] iff [r] is [Bad e2] with [e1=e2] *)
827 -+(** [is_exn e1 r] is [true] iff [r] is [Error e2] with [e1=e2] *)
828 - val is_exn : exn -> ('a, exn) t -> bool
829 -
830 - (** Convert an [option] to a [result]
831 -@@ -96,5 +96,5 @@ module Infix : sig
832 - val ( >>= ): ('a, 'b) t -> ('a -> ('c, 'b) t) -> ('c, 'b) t
833 - end
834 -
835 --(** Print a result as Ok(x) or Bad(exn) *)
836 -+(** Print a result as Ok(x) or Error(exn) *)
837 - val print : ('b BatInnerIO.output -> 'a -> unit) -> 'b BatInnerIO.output -> ('a, exn) t -> unit
838 -diff --git a/src/batSys.mliv b/src/batSys.mliv
839 -index 510a661..add0b33 100644
840 ---- a/src/batSys.mliv
841 -+++ b/src/batSys.mliv
842 -@@ -65,7 +65,8 @@ external getenv : string -> string = "caml_sys_getenv"
843 - external command : string -> int = "caml_sys_system_command"
844 - (** Execute the given shell command and return its exit code. *)
845 -
846 --external time : unit -> float = "caml_sys_time"
847 -+##V<4.3## external time : unit -> float = "caml_sys_time"
848 -+##V>=4.3## external time : unit -> (float [@unboxed]) = "caml_sys_time" "caml_sys_time_unboxed" [@@noalloc]
849 - (** Return the processor time, in seconds, used by the program
850 - since the beginning of execution. *)
851 -
852 -diff --git a/src/batUnix.mliv b/src/batUnix.mliv
853 -index 60a6ec4..069d63a 100644
854 ---- a/src/batUnix.mliv
855 -+++ b/src/batUnix.mliv
856 -@@ -766,7 +766,8 @@ val create_process_env :
857 - (** {6 Symbolic links} *)
858 -
859 -
860 --val symlink : string -> string -> unit
861 -+##V>=4.3##val symlink : ?to_dir:bool -> string -> string -> unit
862 -+##V<4.3##val symlink : string -> string -> unit
863 - (** [symlink source dest] creates the file [dest] as a symbolic link
864 - to the file [source]. *)
865 -
866
867 diff --git a/dev-ml/batteries/files/oc43-2.patch b/dev-ml/batteries/files/oc43-2.patch
868 deleted file mode 100644
869 index 36d8e41..00000000
870 --- a/dev-ml/batteries/files/oc43-2.patch
871 +++ /dev/null
872 @@ -1,344 +0,0 @@
873 -commit 905cbb6a3ebf1edc11745737feeedd36708149a7
874 -Author: KC Sivaramakrishnan <sk826@×××××××××.uk>
875 -Date: Wed Mar 23 10:11:46 2016 +0000
876 -
877 - Spacing edits
878 -
879 -diff --git a/src/batGc.mli b/src/batGc.mli
880 -index ecffb79..494b9b1 100644
881 ---- a/src/batGc.mli
882 -+++ b/src/batGc.mli
883 -@@ -34,18 +34,18 @@
884 - type stat = Gc.stat =
885 - { minor_words : float;
886 - (** Number of words allocated in the minor heap since
887 -- the program was started. This number is accurate in
888 -- byte-code programs, but only an approximation in programs
889 -- compiled to native code. *)
890 -+ the program was started. This number is accurate in
891 -+ byte-code programs, but only an approximation in programs
892 -+ compiled to native code. *)
893 -
894 - promoted_words : float;
895 - (** Number of words allocated in the minor heap that
896 -- survived a minor collection and were moved to the major heap
897 -- since the program was started. *)
898 -+ survived a minor collection and were moved to the major heap
899 -+ since the program was started. *)
900 -
901 - major_words : float;
902 - (** Number of words allocated in the major heap, including
903 -- the promoted words, since the program was started. *)
904 -+ the promoted words, since the program was started. *)
905 -
906 - minor_collections : int;
907 - (** Number of minor collections since the program was started. *)
908 -@@ -62,7 +62,7 @@ type stat = Gc.stat =
909 -
910 - live_words : int;
911 - (** Number of words of live data in the major heap, including the header
912 -- words. *)
913 -+ words. *)
914 -
915 - live_blocks : int;
916 - (** Number of live blocks in the major heap. *)
917 -@@ -78,8 +78,8 @@ type stat = Gc.stat =
918 -
919 - fragments : int;
920 - (** Number of wasted words due to fragmentation. These are
921 -- 1-words free blocks placed between two live blocks. They
922 -- are not available for allocation. *)
923 -+ 1-words free blocks placed between two live blocks. They
924 -+ are not available for allocation. *)
925 -
926 - compactions : int;
927 - (** Number of heap compactions since the program was started. *)
928 -@@ -92,16 +92,16 @@ type stat = Gc.stat =
929 - }
930 - (** The memory management counters are returned in a [stat] record.
931 -
932 -- The total amount of memory allocated by the program since it was started
933 -- is (in words) [minor_words + major_words - promoted_words]. Multiply by
934 -- the word size (4 on a 32-bit machine, 8 on a 64-bit machine) to get
935 -- the number of bytes.
936 -+ The total amount of memory allocated by the program since it was started
937 -+ is (in words) [minor_words + major_words - promoted_words]. Multiply by
938 -+ the word size (4 on a 32-bit machine, 8 on a 64-bit machine) to get
939 -+ the number of bytes.
940 - *)
941 -
942 - type control = Gc.control =
943 - { mutable minor_heap_size : int;
944 - (** The size (in words) of the minor heap. Changing
945 -- this parameter will trigger a minor collection. Default: 256k. *)
946 -+ this parameter will trigger a minor collection. Default: 256k. *)
947 -
948 - mutable major_heap_increment : int;
949 - (** How much to add to the major heap when increasing it. If this
950 -@@ -112,45 +112,45 @@ type control = Gc.control =
951 -
952 - mutable space_overhead : int;
953 - (** The major GC speed is computed from this parameter.
954 -- This is the memory that will be "wasted" because the GC does not
955 -- immediatly collect unreachable blocks. It is expressed as a
956 -- percentage of the memory used for live data.
957 -- The GC will work more (use more CPU time and collect
958 -- blocks more eagerly) if [space_overhead] is smaller.
959 -- Default: 80. *)
960 -+ This is the memory that will be "wasted" because the GC does not
961 -+ immediatly collect unreachable blocks. It is expressed as a
962 -+ percentage of the memory used for live data.
963 -+ The GC will work more (use more CPU time and collect
964 -+ blocks more eagerly) if [space_overhead] is smaller.
965 -+ Default: 80. *)
966 -
967 - mutable verbose : int;
968 - (** This value controls the GC messages on standard error output.
969 -- It is a sum of some of the following flags, to print messages
970 -- on the corresponding events:
971 -- - [0x001] Start of major GC cycle.
972 -- - [0x002] Minor collection and major GC slice.
973 -- - [0x004] Growing and shrinking of the heap.
974 -- - [0x008] Resizing of stacks and memory manager tables.
975 -- - [0x010] Heap compaction.
976 -- - [0x020] Change of GC parameters.
977 -- - [0x040] Computation of major GC slice size.
978 -- - [0x080] Calling of finalisation functions.
979 -- - [0x100] Bytecode executable and shared library search at start-up.
980 -- - [0x200] Computation of compaction-triggering condition.
981 -- - [0x400] Output GC statistics at program exit.
982 -- Default: 0. *)
983 -+ It is a sum of some of the following flags, to print messages
984 -+ on the corresponding events:
985 -+ - [0x001] Start of major GC cycle.
986 -+ - [0x002] Minor collection and major GC slice.
987 -+ - [0x004] Growing and shrinking of the heap.
988 -+ - [0x008] Resizing of stacks and memory manager tables.
989 -+ - [0x010] Heap compaction.
990 -+ - [0x020] Change of GC parameters.
991 -+ - [0x040] Computation of major GC slice size.
992 -+ - [0x080] Calling of finalisation functions.
993 -+ - [0x100] Bytecode executable and shared library search at start-up.
994 -+ - [0x200] Computation of compaction-triggering condition.
995 -+ - [0x400] Output GC statistics at program exit.
996 -+ Default: 0. *)
997 -
998 - mutable max_overhead : int;
999 - (** Heap compaction is triggered when the estimated amount
1000 -- of "wasted" memory is more than [max_overhead] percent of the
1001 -- amount of live data. If [max_overhead] is set to 0, heap
1002 -- compaction is triggered at the end of each major GC cycle
1003 -- (this setting is intended for testing purposes only).
1004 -- If [max_overhead >= 1000000], compaction is never triggered.
1005 -- If compaction is permanently disabled, it is strongly suggested
1006 -- to set [allocation_policy] to 1.
1007 -- Default: 500. *)
1008 -+ of "wasted" memory is more than [max_overhead] percent of the
1009 -+ amount of live data. If [max_overhead] is set to 0, heap
1010 -+ compaction is triggered at the end of each major GC cycle
1011 -+ (this setting is intended for testing purposes only).
1012 -+ If [max_overhead >= 1000000], compaction is never triggered.
1013 -+ If compaction is permanently disabled, it is strongly suggested
1014 -+ to set [allocation_policy] to 1.
1015 -+ Default: 500. *)
1016 -
1017 - mutable stack_limit : int;
1018 - (** The maximum size of the stack (in words). This is only
1019 -- relevant to the byte-code runtime, as the native code runtime
1020 -- uses the operating system's stack. Default: 1024k. *)
1021 -+ relevant to the byte-code runtime, as the native code runtime
1022 -+ uses the operating system's stack. Default: 1024k. *)
1023 -
1024 - mutable allocation_policy : int;
1025 - (** The policy used for allocating in the heap. Possible
1026 -@@ -173,8 +173,8 @@ type control = Gc.control =
1027 -
1028 - external stat : unit -> stat = "caml_gc_stat"
1029 - (** Return the current values of the memory management counters in a
1030 -- [stat] record. This function examines every heap block to get the
1031 -- statistics. *)
1032 -+ [stat] record. This function examines every heap block to get the
1033 -+ statistics. *)
1034 -
1035 - external quick_stat : unit -> stat = "caml_gc_quick_stat"
1036 - (** Same as [stat] except that [live_words], [live_blocks], [free_words],
1037 -@@ -191,7 +191,7 @@ external get : unit -> control = "caml_gc_get"
1038 -
1039 - external set : control -> unit = "caml_gc_set"
1040 - (** [set r] changes the GC parameters according to the [control] record [r].
1041 -- The normal usage is: [Gc.set { (Gc.get()) with Gc.verbose = 0x00d }] *)
1042 -+ The normal usage is: [Gc.set { (Gc.get()) with Gc.verbose = 0x00d }] *)
1043 -
1044 - external minor : unit -> unit = "caml_gc_minor"
1045 - (** Trigger a minor collection. *)
1046 -@@ -210,21 +210,21 @@ external major : unit -> unit = "caml_gc_major"
1047 -
1048 - external full_major : unit -> unit = "caml_gc_full_major"
1049 - (** Do a minor collection, finish the current major collection cycle,
1050 -- and perform a complete new cycle. This will collect all currently
1051 -- unreachable blocks. *)
1052 -+ and perform a complete new cycle. This will collect all currently
1053 -+ unreachable blocks. *)
1054 -
1055 - external compact : unit -> unit = "caml_gc_compaction"
1056 - (** Perform a full major collection and compact the heap. Note that heap
1057 -- compaction is a lengthy operation. *)
1058 -+ compaction is a lengthy operation. *)
1059 -
1060 - val print_stat : _ BatInnerIO.output -> unit
1061 - (** Print the current values of the memory management counters (in
1062 -- human-readable form) into the channel argument. *)
1063 -+ human-readable form) into the channel argument. *)
1064 -
1065 - val allocated_bytes : unit -> float
1066 - (** Return the total number of bytes allocated since the program was
1067 -- started. It is returned as a [float] to avoid overflow problems
1068 -- with [int] on 32-bit machines. *)
1069 -+ started. It is returned as a [float] to avoid overflow problems
1070 -+ with [int] on 32-bit machines. *)
1071 -
1072 - external get_minor_free : unit -> int = "caml_get_minor_free" [@@noalloc]
1073 - (** Return the current size of the free space inside the minor heap. *)
1074 -@@ -247,63 +247,63 @@ external huge_fallback_count : unit -> int = "caml_gc_huge_fallback_count"
1075 -
1076 - val finalise : ('a -> unit) -> 'a -> unit
1077 - (** [finalise f v] registers [f] as a finalisation function for [v].
1078 -- [v] must be heap-allocated. [f] will be called with [v] as
1079 -- argument at some point between the first time [v] becomes unreachable
1080 -- (including through weak pointers) and the time [v] is collected by
1081 -- the GC. Several functions can
1082 -- be registered for the same value, or even several instances of the
1083 -- same function. Each instance will be called once (or never,
1084 -- if the program terminates before [v] becomes unreachable).
1085 --
1086 -- The GC will call the finalisation functions in the order of
1087 -- deallocation. When several values become unreachable at the
1088 -- same time (i.e. during the same GC cycle), the finalisation
1089 -- functions will be called in the reverse order of the corresponding
1090 -- calls to [finalise]. If [finalise] is called in the same order
1091 -- as the values are allocated, that means each value is finalised
1092 -- before the values it depends upon. Of course, this becomes
1093 -- false if additional dependencies are introduced by assignments.
1094 --
1095 -- In the presence of multiple OCaml threads it should be assumed that
1096 -- any particular finaliser may be executed in any of the threads.
1097 --
1098 -- Anything reachable from the closure of finalisation functions
1099 -- is considered reachable, so the following code will not work
1100 -- as expected:
1101 -- - [ let v = ... in Gc.finalise (fun _ -> ...v...) v ]
1102 --
1103 -- Instead you should make sure that [v] is not in the closure of
1104 -- the finalisation function by writing:
1105 -- - [ let f = fun x -> ... ;; let v = ... in Gc.finalise f v ]
1106 --
1107 --
1108 -- The [f] function can use all features of OCaml, including
1109 -- assignments that make the value reachable again. It can also
1110 -- loop forever (in this case, the other
1111 -- finalisation functions will not be called during the execution of f,
1112 -- unless it calls [finalise_release]).
1113 -- It can call [finalise] on [v] or other values to register other
1114 -- functions or even itself. It can raise an exception; in this case
1115 -- the exception will interrupt whatever the program was doing when
1116 -- the function was called.
1117 --
1118 --
1119 -- [finalise] will raise [Invalid_argument] if [v] is not
1120 -- guaranteed to be heap-allocated. Some examples of values that are not
1121 -- heap-allocated are integers, constant constructors, booleans,
1122 -- the empty array, the empty list, the unit value. The exact list
1123 -- of what is heap-allocated or not is implementation-dependent.
1124 -- Some constant values can be heap-allocated but never deallocated
1125 -- during the lifetime of the program, for example a list of integer
1126 -- constants; this is also implementation-dependent.
1127 -- Note that values of types [float] and ['a lazy] (for any ['a]) are
1128 -- sometimes allocated and sometimes not, so finalising them is unsafe,
1129 -- and [finalise] will also raise [Invalid_argument] for them.
1130 --
1131 --
1132 -- The results of calling {!String.make}, {!Bytes.make}, {!Bytes.create},
1133 -- {!Array.make}, and {!Pervasives.ref} are guaranteed to be
1134 -- heap-allocated and non-constant except when the length argument is [0].
1135 -+ [v] must be heap-allocated. [f] will be called with [v] as
1136 -+ argument at some point between the first time [v] becomes unreachable
1137 -+ (including through weak pointers) and the time [v] is collected by
1138 -+ the GC. Several functions can
1139 -+ be registered for the same value, or even several instances of the
1140 -+ same function. Each instance will be called once (or never,
1141 -+ if the program terminates before [v] becomes unreachable).
1142 -+
1143 -+ The GC will call the finalisation functions in the order of
1144 -+ deallocation. When several values become unreachable at the
1145 -+ same time (i.e. during the same GC cycle), the finalisation
1146 -+ functions will be called in the reverse order of the corresponding
1147 -+ calls to [finalise]. If [finalise] is called in the same order
1148 -+ as the values are allocated, that means each value is finalised
1149 -+ before the values it depends upon. Of course, this becomes
1150 -+ false if additional dependencies are introduced by assignments.
1151 -+
1152 -+ In the presence of multiple OCaml threads it should be assumed that
1153 -+ any particular finaliser may be executed in any of the threads.
1154 -+
1155 -+ Anything reachable from the closure of finalisation functions
1156 -+ is considered reachable, so the following code will not work
1157 -+ as expected:
1158 -+ - [ let v = ... in Gc.finalise (fun _ -> ...v...) v ]
1159 -+
1160 -+ Instead you should make sure that [v] is not in the closure of
1161 -+ the finalisation function by writing:
1162 -+ - [ let f = fun x -> ... ;; let v = ... in Gc.finalise f v ]
1163 -+
1164 -+
1165 -+ The [f] function can use all features of OCaml, including
1166 -+ assignments that make the value reachable again. It can also
1167 -+ loop forever (in this case, the other
1168 -+ finalisation functions will not be called during the execution of f,
1169 -+ unless it calls [finalise_release]).
1170 -+ It can call [finalise] on [v] or other values to register other
1171 -+ functions or even itself. It can raise an exception; in this case
1172 -+ the exception will interrupt whatever the program was doing when
1173 -+ the function was called.
1174 -+
1175 -+
1176 -+ [finalise] will raise [Invalid_argument] if [v] is not
1177 -+ guaranteed to be heap-allocated. Some examples of values that are not
1178 -+ heap-allocated are integers, constant constructors, booleans,
1179 -+ the empty array, the empty list, the unit value. The exact list
1180 -+ of what is heap-allocated or not is implementation-dependent.
1181 -+ Some constant values can be heap-allocated but never deallocated
1182 -+ during the lifetime of the program, for example a list of integer
1183 -+ constants; this is also implementation-dependent.
1184 -+ Note that values of types [float] and ['a lazy] (for any ['a]) are
1185 -+ sometimes allocated and sometimes not, so finalising them is unsafe,
1186 -+ and [finalise] will also raise [Invalid_argument] for them.
1187 -+
1188 -+
1189 -+ The results of calling {!String.make}, {!Bytes.make}, {!Bytes.create},
1190 -+ {!Array.make}, and {!Pervasives.ref} are guaranteed to be
1191 -+ heap-allocated and non-constant except when the length argument is [0].
1192 - *)
1193 -
1194 - val finalise_release : unit -> unit
1195 -@@ -313,15 +313,15 @@ val finalise_release : unit -> unit
1196 -
1197 - type alarm = Gc.alarm
1198 - (** An alarm is a piece of data that calls a user function at the end of
1199 -- each major GC cycle. The following functions are provided to create
1200 -- and delete alarms. *)
1201 -+ each major GC cycle. The following functions are provided to create
1202 -+ and delete alarms. *)
1203 -
1204 - val create_alarm : (unit -> unit) -> alarm
1205 - (** [create_alarm f] will arrange for [f] to be called at the end of each
1206 -- major GC cycle, starting with the current cycle or the next one.
1207 -- A value of type [alarm] is returned that you can
1208 -- use to call [delete_alarm]. *)
1209 -+ major GC cycle, starting with the current cycle or the next one.
1210 -+ A value of type [alarm] is returned that you can
1211 -+ use to call [delete_alarm]. *)
1212 -
1213 - val delete_alarm : alarm -> unit
1214 - (** [delete_alarm a] will stop the calls to the function associated
1215 -- to [a]. Calling [delete_alarm a] again has no effect. *)
1216 -+ to [a]. Calling [delete_alarm a] again has no effect. *)
1217
1218 diff --git a/dev-ml/batteries/files/oc43-3.patch b/dev-ml/batteries/files/oc43-3.patch
1219 deleted file mode 100644
1220 index 95fa8fa..00000000
1221 --- a/dev-ml/batteries/files/oc43-3.patch
1222 +++ /dev/null
1223 @@ -1,21 +0,0 @@
1224 -commit 39393f8fc2d7c60dc093e9ea836077598dfbe955
1225 -Author: KC Sivaramakrishnan <sk826@×××××××××.uk>
1226 -Date: Wed Mar 23 11:23:26 2016 +0000
1227 -
1228 - Fix make_float versioning
1229 -
1230 -diff --git a/src/batArray.mliv b/src/batArray.mliv
1231 -index 025887f..c6bfd02 100644
1232 ---- a/src/batArray.mliv
1233 -+++ b/src/batArray.mliv
1234 -@@ -82,7 +82,9 @@ external make : int -> 'a -> 'a array = "caml_make_vect"
1235 - If the value of [x] is a floating-point number, then the maximum
1236 - size is only [Sys.max_array_length / 2].*)
1237 -
1238 --val make_float : int -> float array
1239 -+##V>=4.3##val make_float : int -> float array
1240 -+##V=4.2##external make_float : int -> float array = "caml_make_float_vect"
1241 -+##V<4.2##val make_float : int -> float array
1242 - (** [Array.make_float n] returns a fresh float array of length [n],
1243 - with uninitialized data.
1244 -