Skip to content

Commit e825bf2

Browse files
committed
prepare for 2.2
1 parent ba87e10 commit e825bf2

File tree

6 files changed

+38
-27
lines changed

6 files changed

+38
-27
lines changed

CHANGELOG.adoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
= Changelog
22

3+
== 2.2
4+
5+
- Improving comments presentation
6+
- Add `CCOpt.return_if`
7+
- Add `CCOpt.flatten`
8+
- Add `CCString.{,r}drop_while`
9+
- add many missing functions to `CCListLabels`
10+
- test: consistency `CCList{,Labels}`
11+
12+
- fix(arrayLabels): compatibility with 4.07
13+
- fix: compatibility for CCArrayLabels
14+
- test: add compatibility checks between `CCArray{,Labels}`
15+
316
== 2.1
417

518
- make `CCInt64` compatible with `Int64` (breaking!) (closes #192)

README.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,6 @@ can be removed.
560560
removed deprecated functions, etc.
561561
. update `CHANGELOG.adoc` (see its end to find the right git command)
562562
. commit the changes
563-
. `git checkout stable`
564-
. `git merge master`
565563
. `make test doc`
566564
. tag, and push both to github
567565
. `opam pin add containers https://github.com/c-cube/ocaml-containers.git#<release>`

containers.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
opam-version: "1.2"
22
name: "containers"
3-
version: "2.1"
3+
version: "2.2"
44
author: "Simon Cruanes"
55
maintainer: "[email protected]"
66
build: [

src/core/CCListLabels.mli

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ val fold_map : f:('acc -> 'a -> 'acc * 'b) -> init:'acc -> 'a list -> 'acc * 'b
6666
@since 0.14 *)
6767

6868
val scan_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a list -> 'acc list
69-
(** @since NEXT_RELEASE *)
69+
(** @since 2.2 *)
7070

7171
val fold_map2 : f:('acc -> 'a -> 'b -> 'acc * 'c) -> init:'acc -> 'a list -> 'b list -> 'acc * 'c list
7272
(** [fold_map2] is to [fold_map] what [List.map2] is to [List.map].
@@ -84,29 +84,29 @@ val fold_flat_map : f:('acc -> 'a -> 'acc * 'b list) -> init:'acc -> 'a list ->
8484
@since 0.14 *)
8585

8686
val count : f:('a -> bool) -> 'a list -> int
87-
(** @since NEXT_RELEASE *)
87+
(** @since 2.2 *)
8888

8989
val init : int -> f:(int -> 'a) -> 'a t
9090
(** [init len ~f] is [f 0; f 1; ...; f (len-1)].
9191
@raise Invalid_argument if len < 0.
9292
@since 0.6 *)
9393

9494
val combine : 'a list -> 'b list -> ('a * 'b) list
95-
(** @since NEXT_RELEASE *)
95+
(** @since 2.2 *)
9696

9797
val combine_gen : 'a list -> 'b list -> ('a * 'b) gen
98-
(** @since NEXT_RELEASE *)
98+
(** @since 2.2 *)
9999

100100
val split : ('a * 'b) t -> 'a t * 'b t
101-
(** @since NEXT_RELEASE *)
101+
(** @since 2.2 *)
102102

103103
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
104104

105105
val compare_lengths : 'a t -> 'b t -> int
106-
(** @since NEXT_RELEASE *)
106+
(** @since 2.2 *)
107107

108108
val compare_length_with : 'a t -> int -> int
109-
(** @since NEXT_RELEASE *)
109+
(** @since 2.2 *)
110110

111111
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
112112

@@ -123,10 +123,10 @@ val fold_product : f:('c -> 'a -> 'b -> 'c) -> init:'c -> 'a t -> 'b t -> 'c
123123
(** Fold on the cartesian product. *)
124124

125125
val cartesian_product : 'a t t -> 'a t t
126-
(** @since NEXT_RELEASE *)
126+
(** @since 2.2 *)
127127

128128
val map_product_l : f:('a -> 'b list) -> 'a list -> 'b list list
129-
(** @since NEXT_RELEASE *)
129+
(** @since 2.2 *)
130130
val diagonal : 'a t -> ('a * 'a) t
131131
(** All pairs of distinct positions of the list. [list_diagonal l] will
132132
return the list of [List.nth i l, List.nth j l] if [i < j]. *)
@@ -155,12 +155,12 @@ val sublists_of_len :
155155

156156
val intersperse : x:'a -> 'a list -> 'a list
157157
(** Insert the first argument between every element of the list.
158-
@since NEXT_RELEASE *)
158+
@since 2.2 *)
159159

160160
val interleave : 'a list -> 'a list -> 'a list
161161
(** [interleave [x1…xn] [y1…ym]] is [x1,y1,x2,y2,…] and finishes with
162162
the suffix of the longest list.
163-
@since NEXT_RELEASE *)
163+
@since 2.2 *)
164164

165165
val pure : 'a -> 'a t
166166
(** [pure] is [return]. *)
@@ -201,7 +201,7 @@ val drop_while : f:('a -> bool) -> 'a t -> 'a t
201201
@since 0.13 *)
202202

203203
val take_drop_while : f:('a -> bool) -> 'a t -> 'a t * 'a t
204-
(** @since NEXT_RELEASE *)
204+
(** @since 2.2 *)
205205

206206
val last : int -> 'a t -> 'a t
207207
(** [last n l] takes the last [n] elements of [l] (or less if
@@ -225,7 +225,7 @@ val find_pred : f:('a -> bool) -> 'a t -> 'a option
225225
@since 0.11 *)
226226

227227
val find_opt : f:('a -> bool) -> 'a t -> 'a option
228-
(** @since NEXT_RELEASE *)
228+
(** @since 2.2 *)
229229

230230
val find_pred_exn : f:('a -> bool) -> 'a t -> 'a
231231
(** Unsafe version of {!find_pred}.
@@ -257,16 +257,16 @@ val filter_map : f:('a -> 'b option) -> 'a t -> 'b t
257257
Map and remove elements at the same time. *)
258258

259259
val keep_some : 'a option t -> 'a t
260-
(** @since NEXT_RELEASE *)
260+
(** @since 2.2 *)
261261

262262
val keep_ok : ('a, _) Result.result t -> 'a t
263-
(** @since NEXT_RELEASE *)
263+
(** @since 2.2 *)
264264

265265
val all_some : 'a option t -> 'a t option
266-
(** @since NEXT_RELEASE *)
266+
(** @since 2.2 *)
267267

268268
val all_ok : ('a, 'err) Result.result t -> ('a t, 'err) Result.result
269-
(** @since NEXT_RELEASE *)
269+
(** @since 2.2 *)
270270

271271
val sorted_merge : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list
272272
(** Merges elements from both sorted list. *)
@@ -316,21 +316,21 @@ val iteri : f:(int -> 'a -> unit) -> 'a t -> unit
316316
itself as second argument. *)
317317

318318
val iteri2 : f:(int -> 'a -> 'b -> unit) -> 'a t -> 'b t -> unit
319-
(** @since NEXT_RELEASE *)
319+
(** @since 2.2 *)
320320

321321
val foldi : f:('b -> int -> 'a -> 'b) -> init:'b -> 'a t -> 'b
322322
(** Like [fold] but it also passes in the index of each element to the folded function. Tail-recursive. *)
323323

324324
val foldi2 : f:('c -> int -> 'a -> 'b -> 'c) -> init:'c -> 'a t -> 'b t -> 'c
325-
(** @since NEXT_RELEASE *)
325+
(** @since 2.2 *)
326326

327327
val get_at_idx : int -> 'a t -> 'a option
328328
(** Get by index in the list.
329329
If the index is negative, it will get element starting from the end
330330
of the list. *)
331331

332332
val nth_opt : 'a t -> int -> 'a option
333-
(** @since NEXT_RELEASE *)
333+
(** @since 2.2 *)
334334

335335
val get_at_idx_exn : int -> 'a t -> 'a
336336
(** Get the i-th element, or

src/core/CCOpt.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ val choice : 'a t list -> 'a t
124124

125125
val flatten : 'a t t -> 'a t
126126
(** [flatten] transforms [Some x] into [x].
127-
@since NEXT_RELEASE *)
127+
@since 2.2 *)
128128

129129
val return_if : bool -> 'a -> 'a t
130130
(** Apply [Some] or [None] depending on a boolean.
131131
More precisely, [return_if false x] is [None],
132132
and [return_if true x] is [Some x].
133-
@since NEXT_RELEASE *)
133+
@since 2.2 *)
134134

135135
(** {2 Infix Operators}
136136
@since 0.16 *)

src/core/CCString.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,12 @@ include S with type t := string
249249
val drop_while : (char -> bool) -> t -> t
250250
(** [drop_while f s] discards any characters starting from the left,
251251
up to the first character [c] not satisfying [f c].
252-
@since NEXT_RELEASE *)
252+
@since 2.2 *)
253253

254254
val rdrop_while : (char -> bool) -> t -> t
255255
(** [rdrop_while f s] discards any characters starting from the right,
256256
up to the first character [c] not satisfying [f c].
257-
@since NEXT_RELEASE *)
257+
@since 2.2 *)
258258

259259
val ltrim : t -> t
260260
(** Trim space on the left (see {!String.trim} for more details).

0 commit comments

Comments
 (0)