Skip to content

Commit 5126973

Browse files
committed
prepare for 2.8
1 parent ab494fb commit 5126973

32 files changed

+218
-183
lines changed

CHANGELOG.md

+36
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
# Changelog
22

3+
## 2.8
4+
5+
### Breaking:
6+
7+
- bump minimum version of OCaml to 4.03, drop deps `{result,uchar}`
8+
- deprecate `{of,to}_seq` a bit everywhere
9+
- deprecate `CCKList` as it's subsumed by `Seq`
10+
11+
- feat: on `>= 4.08`, support let+ and let* operators
12+
- feat(list): add indexed functions and `fold_on_map`
13+
- refactor: also port `CCGraph` to iter
14+
- feat: add `{to,of,add}_{iter,std_seq}` where relevant
15+
- feat(unix): add `ensure_session_leader` and add some docs
16+
- feat(pool): add infix operators on futures
17+
- fix(pp): improve printing of hashtables
18+
- feat: add `monoid_product` to Array and Vector
19+
- improved gc behavior for `CCvector`
20+
- deprecate `CCVector.fill_empty_slots_with`
21+
- `CCVector.shrink_to_fit` to limit memory usage
22+
- add `CCVector.clear_and_reset`
23+
- feat(sexp): expose `parse_string_list` and the list decoder
24+
- add `CCUnix.with_temp_dir` function
25+
- deprecate `CCOpt.to_seq`, provide `to_iter` instead
26+
- add `CCOpt.value` to improve compat with `Stdlib.Option`
27+
- add `CCVector.mapi`
28+
29+
- fix: restore `CCSexp.atom` and `list` which was lost in 2.7
30+
- fix(sexp): set location properly when parsing a file
31+
- fix: properly alias to `CCChar` in containers.ml
32+
33+
- use older dune dialect
34+
- remove unlabel, remove all traces of Result
35+
- require dune configurator explicitly in opam
36+
- Re-enable mdx tests
37+
- fix benchs so they don't depend on clarity and they compile again
38+
339
## 2.7
440

541
- deprecate CCKList in favor of the standard Seq

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,6 @@ can be removed.
611611
- `make update_next_tag` (to update `@since` comments; be careful not to change symlinks)
612612
- check status of modules (`{b status: foo}`) and update if required;
613613
removed deprecated functions, etc.
614-
- `make unlabel` to see if labelled interfaces are up to date (requires compiler-libs)
615614
- update `CHANGELOG.md` (see its end to find the right git command)
616615
- commit the changes
617616
- `make test doc`

containers.opam

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
opam-version: "2.0"
22
name: "containers"
3-
version: "2.7"
3+
version: "2.8"
44
author: "Simon Cruanes"
55
maintainer: "simon.cruanes.2007@m4x.org"
66
synopsis: "A modular, clean and powerful extension of the OCaml standard library"

src/core/CCArray.mli

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type 'a sequence = ('a -> unit) -> unit
99

1010
type 'a iter = ('a -> unit) -> unit
1111
(** Fast internal iterator.
12-
@since NEXT_RELEASE *)
12+
@since 2.8 *)
1313

1414
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
1515
type 'a gen = unit -> 'a option
@@ -261,13 +261,13 @@ val to_iter : 'a t -> 'a iter
261261
(** [to_iter a] returns an [iter] of the elements of an array [a].
262262
The input array [a] is shared with the sequence and modification of it will result
263263
in modification of the iterator.
264-
@since NEXT_RELEASE *)
264+
@since 2.8 *)
265265

266266
val to_std_seq : 'a t -> 'a Seq.t
267267
(** [to_std_seq a] returns a [Seq.t] of the elements of an array [a].
268268
The input array [a] is shared with the sequence and modification of it will result
269269
in modification of the sequence.
270-
@since NEXT_RELEASE
270+
@since 2.8
271271
*)
272272

273273
val to_seq : 'a t -> 'a sequence
@@ -323,7 +323,7 @@ val filter_map : ('a -> 'b option) -> 'a t -> 'b t
323323

324324
val monoid_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
325325
(** All combinaisons of tuples from the two arrays are passed to the function
326-
@since NEXT_RELEASE *)
326+
@since 2.8 *)
327327

328328
val flat_map : ('a -> 'b t) -> 'a t -> 'b array
329329
(** [flat_map f a] transforms each element of [a] into an array, then flattens. *)
@@ -401,10 +401,10 @@ module Infix : sig
401401
@since 0.17 *)
402402

403403
(** Let operators on OCaml >= 4.08.0, nothing otherwise
404-
@since NEXT_RELEASE *)
404+
@since 2.8 *)
405405
include CCShimsMkLet_.S with type 'a t_let := 'a array
406406
end
407407

408408
(** Let operators on OCaml >= 4.08.0, nothing otherwise
409-
@since NEXT_RELEASE *)
409+
@since 2.8 *)
410410
include CCShimsMkLet_.S with type 'a t_let := 'a array

src/core/CCArrayLabels.mli

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type 'a sequence = ('a -> unit) -> unit
99

1010
type 'a iter = ('a -> unit) -> unit
1111
(** Fast internal iterator.
12-
@since NEXT_RELEASE *)
12+
@since 2.8 *)
1313

1414
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
1515
type 'a gen = unit -> 'a option
@@ -261,13 +261,13 @@ val to_iter : 'a t -> 'a iter
261261
(** [to_iter a] returns an [iter] of the elements of an array [a].
262262
The input array [a] is shared with the sequence and modification of it will result
263263
in modification of the iterator.
264-
@since NEXT_RELEASE *)
264+
@since 2.8 *)
265265

266266
val to_std_seq : 'a t -> 'a Seq.t
267267
(** [to_std_seq a] returns a [Seq.t] of the elements of an array [a].
268268
The input array [a] is shared with the sequence and modification of it will result
269269
in modification of the sequence.
270-
@since NEXT_RELEASE
270+
@since 2.8
271271
*)
272272

273273
val to_seq : 'a t -> 'a sequence
@@ -323,7 +323,7 @@ val filter_map : f:('a -> 'b option) -> 'a t -> 'b t
323323

324324
val monoid_product : f:('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
325325
(** All combinaisons of tuples from the two arrays are passed to the function
326-
@since NEXT_RELEASE *)
326+
@since 2.8 *)
327327

328328
val flat_map : f:('a -> 'b t) -> 'a t -> 'b array
329329
(** [flat_map ~f a] transforms each element of [a] into an array, then flattens. *)
@@ -401,10 +401,10 @@ module Infix : sig
401401
@since 0.17 *)
402402

403403
(** Let operators on OCaml >= 4.08.0, nothing otherwise
404-
@since NEXT_RELEASE *)
404+
@since 2.8 *)
405405
include CCShimsMkLet_.S with type 'a t_let := 'a array
406406
end
407407

408408
(** Let operators on OCaml >= 4.08.0, nothing otherwise
409-
@since NEXT_RELEASE *)
409+
@since 2.8 *)
410410
include CCShimsMkLet_.S with type 'a t_let := 'a array

src/core/CCArray_slice.mli

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type 'a sequence = ('a -> unit) -> unit
1212

1313
type 'a iter = ('a -> unit) -> unit
1414
(** Fast internal iterator.
15-
@since NEXT_RELEASE *)
15+
@since 2.8 *)
1616

1717
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
1818
type 'a gen = unit -> 'a option
@@ -249,13 +249,13 @@ val to_iter : 'a t -> 'a iter
249249
(** [to_iter a] returns an [iter] of the elements of a slice [a].
250250
The input array [a] is shared with the sequence and modification of it will result
251251
in modification of the iterator.
252-
@since NEXT_RELEASE *)
252+
@since 2.8 *)
253253

254254
val to_std_seq : 'a t -> 'a Seq.t
255255
(** [to_std_seq a] returns a [Seq.t] of the elements of a slice [a].
256256
The input array [a] is shared with the sequence and modification of it will result
257257
in modification of the sequence.
258-
@since NEXT_RELEASE
258+
@since 2.8
259259
*)
260260

261261
val to_seq : 'a t -> 'a sequence

src/core/CCArray_sliceLabels.mli

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type 'a sequence = ('a -> unit) -> unit
99

1010
type 'a iter = ('a -> unit) -> unit
1111
(** Fast internal iterator.
12-
@since NEXT_RELEASE *)
12+
@since 2.8 *)
1313

1414
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
1515
type 'a gen = unit -> 'a option
@@ -246,13 +246,13 @@ val to_iter : 'a t -> 'a iter
246246
(** [to_iter a] returns an [iter] of the elements of a slice [a].
247247
The input array [a] is shared with the sequence and modification of it will result
248248
in modification of the iterator.
249-
@since NEXT_RELEASE *)
249+
@since 2.8 *)
250250

251251
val to_std_seq : 'a t -> 'a Seq.t
252252
(** [to_std_seq a] returns a [Seq.t] of the elements of a slice [a].
253253
The input array [a] is shared with the sequence and modification of it will result
254254
in modification of the sequence.
255-
@since NEXT_RELEASE
255+
@since 2.8
256256
*)
257257

258258
val to_seq : 'a t -> 'a sequence

src/core/CCHashtbl.ml

+9-9
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ module type S = sig
211211

212212
val to_iter : 'a t -> (key * 'a) iter
213213
(** Iterate on bindings in the table.
214-
@since NEXT_RELEASE *)
214+
@since 2.8 *)
215215

216216
val to_seq : 'a t -> (key * 'a) sequence
217217
(** Iterate on values in the table.
@@ -220,11 +220,11 @@ module type S = sig
220220

221221
val add_iter : 'a t -> (key * 'a) iter -> unit
222222
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
223-
@since NEXT_RELEASE *)
223+
@since 2.8 *)
224224

225225
val add_std_seq : 'a t -> (key * 'a) Seq.t -> unit
226226
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
227-
@since NEXT_RELEASE *)
227+
@since 2.8 *)
228228

229229
val add_seq : 'a t -> (key * 'a) sequence -> unit
230230
(** Add the corresponding pairs to the table, using {!Hashtbl.add}.
@@ -234,11 +234,11 @@ module type S = sig
234234

235235
val of_iter : (key * 'a) iter -> 'a t
236236
(** From the given bindings, added in order.
237-
@since NEXT_RELEASE *)
237+
@since 2.8 *)
238238

239239
val of_std_seq : (key * 'a) Seq.t -> 'a t
240240
(** From the given bindings, added in order.
241-
@since NEXT_RELEASE *)
241+
@since 2.8 *)
242242

243243
val of_seq : (key * 'a) sequence -> 'a t
244244
(** From the given bindings, added in order.
@@ -249,13 +249,13 @@ module type S = sig
249249
(** [add_iter_count tbl i] increments the count of each element of [i]
250250
by calling {!incr}. This is useful for counting how many times each
251251
element of [i] occurs.
252-
@since NEXT_RELEASE *)
252+
@since 2.8 *)
253253

254254
val add_std_seq_count : int t -> key Seq.t -> unit
255255
(** [add_seq_count tbl seq] increments the count of each element of [seq]
256256
by calling {!incr}. This is useful for counting how many times each
257257
element of [seq] occurs.
258-
@since NEXT_RELEASE *)
258+
@since 2.8 *)
259259

260260
val add_seq_count : int t -> key sequence -> unit
261261
(** [add_seq_count tbl seq] increments the count of each element of [seq]
@@ -267,11 +267,11 @@ module type S = sig
267267

268268
val of_iter_count : key iter -> int t
269269
(** Like {!add_seq_count}, but allocates a new table and returns it.
270-
@since NEXT_RELEASE *)
270+
@since 2.8 *)
271271

272272
val of_std_seq_count : key Seq.t -> int t
273273
(** Like {!add_seq_count}, but allocates a new table and returns it.
274-
@since NEXT_RELEASE *)
274+
@since 2.8 *)
275275

276276
val of_seq_count : key sequence -> int t
277277
(** Like {!add_seq_count}, but allocates a new table and returns it.

0 commit comments

Comments
 (0)