Skip to content

Commit 81acaaa

Browse files
committed
prepare for 3.12
1 parent e6afa76 commit 81acaaa

File tree

10 files changed

+38
-25
lines changed

10 files changed

+38
-25
lines changed

CHANGELOG.md

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

3+
## 3.12
4+
5+
- add `containers.pp` sublibrary, with Wadler-style pretty printing combinators
6+
- add `CCArray.{max,argmax,min,argmin}` and their _exn counterparts
7+
- add `CCParse.take_until_success`
8+
- add `Option.flat_map_l`
9+
- add `CCSet.{find_first_map,find_last_map}`
10+
- `CCHash`: native FNV hash for int64/int32
11+
12+
- fix bugs in CCParse related to `recurse` and `Slice`
13+
- fix: fix Set.find_last_map on OCaml 4.03
14+
- fix: make sure `Vector.to_{seq,gen}` captures the length initially
15+
316
## 3.11
417

518
- official OCaml 5 support

containers-data.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
opam-version: "2.0"
2-
version: "3.11"
2+
version: "3.12"
33
author: "Simon Cruanes"
44
maintainer: "[email protected]"
55
synopsis: "A set of advanced datatypes for containers"

containers-thread.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
opam-version: "2.0"
2-
version: "3.11"
2+
version: "3.12"
33
author: "Simon Cruanes"
44
maintainer: "[email protected]"
55
license: "BSD-2-Clause"

containers.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
opam-version: "2.0"
22
name: "containers"
3-
version: "3.11"
3+
version: "3.12"
44
author: "Simon Cruanes"
55
maintainer: "[email protected]"
66
license: "BSD-2-Clause"

src/core/CCArray.mli

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,43 +145,43 @@ val find_idx : ('a -> bool) -> 'a t -> (int * 'a) option
145145
val max : ('a -> 'a -> int) -> 'a t -> 'a option
146146
(** [max cmp a] returns [None] if [a] is empty, otherwise, returns [Some e] where [e]
147147
is a maximum element in [a] with respect to [cmp].
148-
@since NEXT_RELEASE *)
148+
@since 3.12 *)
149149

150150
val max_exn : ('a -> 'a -> int) -> 'a t -> 'a
151151
(** [max_exn cmp a] is like {!max}, but
152152
@raise Invalid_argument if [a] is empty.
153-
@since NEXT_RELEASE *)
153+
@since 3.12 *)
154154

155155

156156
val argmax : ('a -> 'a -> int) -> 'a t -> int option
157157
(** [argmax cmp a] returns [None] if [a] is empty, otherwise, returns [Some i] where [i]
158158
is the index of a maximum element in [a] with respect to [cmp].
159-
@since NEXT_RELEASE *)
159+
@since 3.12 *)
160160

161161
val argmax_exn : ('a -> 'a -> int) -> 'a t -> int
162162
(** [argmax_exn cmp a] is like {!argmax}, but
163163
@raise Invalid_argument if [a] is empty.
164-
@since NEXT_RELEASE *)
164+
@since 3.12 *)
165165

166166
val min : ('a -> 'a -> int) -> 'a t -> 'a option
167167
(** [min cmp a] returns [None] if [a] is empty, otherwise, returns [Some e] where [e]
168168
is a minimum element in [a] with respect to [cmp].
169-
@since NEXT_RELEASE *)
169+
@since 3.12 *)
170170

171171
val min_exn : ('a -> 'a -> int) -> 'a t -> 'a
172172
(** [min_exn cmp a] is like {!min}, but
173173
@raise Invalid_argument if [a] is empty.
174-
@since NEXT_RELEASE *)
174+
@since 3.12 *)
175175

176176
val argmin : ('a -> 'a -> int) -> 'a t -> int option
177177
(** [argmin cmp a] returns [None] if [a] is empty, otherwise, returns [Some i] where [i]
178178
is the index of a minimum element in [a] with respect to [cmp].
179-
@since NEXT_RELEASE *)
179+
@since 3.12 *)
180180

181181
val argmin_exn : ('a -> 'a -> int) -> 'a t -> int
182182
(** [argmin_exn cmp a] is like {!argmin}, but
183183
@raise Invalid_argument if [a] is empty.
184-
@since NEXT_RELEASE *)
184+
@since 3.12 *)
185185

186186
val lookup : cmp:'a ord -> 'a -> 'a t -> int option
187187
(** [lookup ~cmp key a] lookups the index of some key [key] in a sorted array [a].

src/core/CCArrayLabels.mli

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,43 +144,43 @@ val find_idx : f:('a -> bool) -> 'a t -> (int * 'a) option
144144
val max : cmp:('a -> 'a -> int) -> 'a t -> 'a option
145145
(** [max ~cmp a] returns [None] if [a] is empty, otherwise, returns [Some e] where [e]
146146
is a maximum element in [a] with respect to [cmp].
147-
@since NEXT_RELEASE *)
147+
@since 3.12 *)
148148

149149
val max_exn : cmp:('a -> 'a -> int) -> 'a t -> 'a
150150
(** [max_exn ~cmp a] is like {!max}, but
151151
@raise Invalid_argument if [a] is empty.
152-
@since NEXT_RELEASE *)
152+
@since 3.12 *)
153153

154154

155155
val argmax : cmp:('a -> 'a -> int) -> 'a t -> int option
156156
(** [argmax ~cmp a] returns [None] if [a] is empty, otherwise, returns [Some i] where [i]
157157
is the index of a maximum element in [a] with respect to [cmp].
158-
@since NEXT_RELEASE *)
158+
@since 3.12 *)
159159

160160
val argmax_exn : cmp:('a -> 'a -> int) -> 'a t -> int
161161
(** [argmax_exn ~cmp a] is like {!argmax}, but
162162
@raise Invalid_argument if [a] is empty.
163-
@since NEXT_RELEASE *)
163+
@since 3.12 *)
164164

165165
val min : cmp:('a -> 'a -> int) -> 'a t -> 'a option
166166
(** [min ~cmp a] returns [None] if [a] is empty, otherwise, returns [Some e] where [e]
167167
is a minimum element in [a] with respect to [cmp].
168-
@since NEXT_RELEASE *)
168+
@since 3.12 *)
169169

170170
val min_exn : cmp:('a -> 'a -> int) -> 'a t -> 'a
171171
(** [min_exn ~cmp a] is like {!min}, but
172172
@raise Invalid_argument if [a] is empty.
173-
@since NEXT_RELEASE *)
173+
@since 3.12 *)
174174

175175
val argmin : cmp:('a -> 'a -> int) -> 'a t -> int option
176176
(** [argmin ~cmp a] returns [None] if [a] is empty, otherwise, returns [Some i] where [i]
177177
is the index of a minimum element in [a] with respect to [cmp].
178-
@since NEXT_RELEASE *)
178+
@since 3.12 *)
179179

180180
val argmin_exn : cmp:('a -> 'a -> int) -> 'a t -> int
181181
(** [argmin_exn ~cmp a] is like {!argmin}, but
182182
@raise Invalid_argument if [a] is empty.
183-
@since NEXT_RELEASE *)
183+
@since 3.12 *)
184184

185185
val lookup : cmp:('a ord[@keep_label]) -> key:'a -> 'a t -> int option
186186
(** [lookup ~cmp ~key a] lookups the index of some key [key] in a sorted array [a].

src/core/CCOption.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ val flat_map : ('a -> 'b t) -> 'a t -> 'b t
5151

5252
val flat_map_l : ('a -> 'b list) -> 'a t -> 'b list
5353
(** [flat_map_l f o] is [[]] if [o] is [None], or [f x] if [o] is [Some x].
54-
@since NEXT_RELEASE *)
54+
@since 3.12 *)
5555

5656
val bind : 'a t -> ('a -> 'b t) -> 'b t
5757
(** [bind o f] is [f v] if [o] is [Some v], [None] otherwise.

src/core/CCParse.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ val take_until_success : 'a t -> (slice * 'a) t
310310
{b NOTE} performance wise, if [p] does a lot of work at each position,
311311
this can be costly (thing naive substring search if [p] is [string "very long needle"]).
312312
313-
@since NEXT_RELEASE *)
313+
@since 3.12 *)
314314

315315
val take : int -> slice t
316316
(** [take len] parses exactly [len] characters from the input.

src/core/CCSet.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module type S = sig
3737
val find_first_map : (elt -> 'a option) -> t -> 'a option
3838
(** [find_first_map f s] find the minimum element [x] of [s] such that [f x = Some y]
3939
and return [Some y]. Otherwise returns [None].
40-
@since NEXT_RELEASE *)
40+
@since 3.12 *)
4141

4242
val find_last : (elt -> bool) -> t -> elt
4343
(** Find maximum element satisfying predicate.
@@ -50,7 +50,7 @@ module type S = sig
5050
val find_last_map : (elt -> 'a option) -> t -> 'a option
5151
(** [find_last_map f s] find the maximum element [x] of [s] such that [f x = Some y]
5252
and return [Some y]. Otherwise returns [None].
53-
@since NEXT_RELEASE *)
53+
@since 3.12 *)
5454

5555
val of_iter : elt iter -> t
5656
(** Build a set from the given [iter] of elements.

src/core/CCSet.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ module type S = sig
4343
val find_first_map : (elt -> 'a option) -> t -> 'a option
4444
(** [find_first_map f s] find the minimum element [x] of [s] such that [f x = Some y]
4545
and return [Some y]. Otherwise returns [None].
46-
@since NEXT_RELEASE *)
46+
@since 3.12 *)
4747

4848
val find_last : (elt -> bool) -> t -> elt
4949
(** Find maximum element satisfying predicate.
@@ -56,7 +56,7 @@ module type S = sig
5656
val find_last_map : (elt -> 'a option) -> t -> 'a option
5757
(** [find_last_map f s] find the maximum element [x] of [s] such that [f x = Some y]
5858
and return [Some y]. Otherwise returns [None].
59-
@since NEXT_RELEASE *)
59+
@since 3.12 *)
6060

6161
val of_iter : elt iter -> t
6262
(** Build a set from the given [iter] of elements.

0 commit comments

Comments
 (0)