Skip to content

Commit 0097fd3

Browse files
committed
prepare for 3.2
1 parent f313361 commit 0097fd3

12 files changed

+53
-30
lines changed

CHANGELOG.md

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

3+
## 3.2
4+
5+
- add CCEither module
6+
- add `CCList.chunks`
7+
- add iter/seq functions to `CCString`
8+
- add `CCList.reduce` (resolves #305)
9+
- fix: in `CCInt` pick popcount at runtime on 64 bits
10+
- fix: in shims, use configurator properly to determine int size
11+
- in `CCFormat`, add `append`, `append_l`, infix `++` for sequencing,
12+
`space`, `break`, `cut`
13+
- fix: in `CCSexp`, handle non-ascii escapes in strings
14+
- `CCUtf8_string`: add and expose `uchar_to_bytes`
15+
16+
- enable auto deploy of doc
17+
- improve CI: test core on non ubuntu platform, test all on ubuntu
18+
- update readme
19+
- CCImmutArray: add tests (#344)
20+
- add fuzzing (#339)
21+
- add stronger test to compare with uutf in ccutf8string
22+
323
## 3.1
424

525
- add `List.combine_chop` and corresponding `(and&)` synchronized product

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,8 @@ the library, including printers, maps, etc.
371371
```ocaml
372372
# (|>) ;; (* quick reminder of this awesome standard operator *)
373373
- : 'a -> ('a -> 'b) -> 'b = <fun>
374+
# 10 |> succ;;
375+
- : int = 11
374376
375377
# open CCList.Infix;;
376378
@@ -383,7 +385,8 @@ val l : int list =
383385
76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93;
384386
94; 95; 96; 97; 98; 99; 100]
385387
386-
# l
388+
# (* transform a list, dropping some elements *)
389+
l
387390
|> CCList.filter_map
388391
(fun x-> if x mod 3=0 then Some (float x) else None)
389392
|> CCList.take 5 ;;

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.1"
2+
version: "3.2"
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.1"
2+
version: "3.2"
33
author: "Simon Cruanes"
44
maintainer: "[email protected]"
55
synopsis: "An extension of containers for threading"

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.1"
3+
version: "3.2"
44
author: "Simon Cruanes"
55
maintainer: "[email protected]"
66
synopsis: "A modular, clean and powerful extension of the OCaml standard library"

src/core/CCEither.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Module that is compatible with Either form OCaml 4.12 but can be use with any
66
ocaml version compatible with container
77
8-
@since NEXT_RELEASE
8+
@since 3.2
99
*)
1010

1111
type 'a iter = ('a -> unit) -> unit

src/core/CCFormat.mli

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ val exn : exn printer
3636

3737
val space : unit printer
3838
(** Alias to {!pp_print_space}.
39-
@since NEXT_RELEASE *)
39+
@since 3.2 *)
4040

4141
val cut : unit printer
4242
(** Alias to {!pp_print_cut}.
43-
@since NEXT_RELEASE *)
43+
@since 3.2 *)
4444

4545
val break : (int * int) printer
4646
(** Tuple-ized {!printer} form of {!pp_print_break}.
47-
@since NEXT_RELEASE *)
47+
@since 3.2 *)
4848

4949
val newline : unit printer
5050
(** Force newline (see {!Format.pp_force_newline}).
@@ -100,11 +100,11 @@ val quad : ?sep:unit printer -> 'a printer -> 'b printer ->
100100

101101
val append : unit printer -> unit printer -> unit printer
102102
(** [append ppa ppb] first prints [ppa ()], then prints [ppb ()].
103-
@since NEXT_RELEASE *)
103+
@since 3.2 *)
104104

105105
val append_l : unit printer list -> unit printer
106106
(** [append_l pps] runs the printers in [pps] sequentially.
107-
@since NEXT_RELEASE *)
107+
@since 3.2 *)
108108

109109
val within : string -> string -> 'a printer -> 'a printer
110110
(** [within a b p] wraps [p] inside the strings [a] and [b]. Convenient,
@@ -364,7 +364,7 @@ end
364364
module Infix : sig
365365
val (++) : unit printer -> unit printer -> unit printer
366366
(** Alias to {!append}.
367-
@since NEXT_RELEASE *)
367+
@since 3.2 *)
368368
end
369369

370370
include module type of Infix

src/core/CCList.mli

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ val scan_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a list -> 'acc list
8484
val reduce : ('a -> 'a -> 'a) -> 'a list -> 'a option
8585
(** [reduce f (hd::tl)] returns [Some (fold_left f hd tl)]. If [l] is empty,
8686
then [None] is returned.
87-
@since NEXT_RELEASE *)
87+
@since 3.2 *)
8888

8989
val reduce_exn : ('a -> 'a -> 'a) -> 'a list -> 'a
9090
(** [reduce_exn] is the unsafe version of {!reduce}.
9191
@raise Invalid_argument if the given list is empty.
92-
@since NEXT_RELEASE *)
92+
@since 3.2 *)
9393

9494
val fold_map2 : ('acc -> 'a -> 'b -> 'acc * 'c) -> 'acc -> 'a list -> 'b list -> 'acc * 'c list
9595
(** [fold_map2 f init l1 l2] is to [fold_map] what [List.map2] is to [List.map].
@@ -328,7 +328,7 @@ val chunks : int -> 'a list -> 'a list list
328328
Each item of [l] will occur in exactly one chunk. Only the last chunk
329329
might be of length smaller than [n].
330330
Invariant: [(chunks n l |> List.flatten) = l].
331-
@since NEXT_RELEASE *)
331+
@since 3.2 *)
332332

333333
val intersperse : 'a -> 'a list -> 'a list
334334
(** [intersperse x l] inserts the element [x] between adjacent elements of the list [l].

src/core/CCListLabels.mli

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ val scan_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a list -> 'acc list
8888
val reduce : f:('a -> 'a -> 'a) -> 'a list -> 'a option
8989
(** [reduce f (hd::tl)] returns [Some (fold_left f hd tl)]. If [l] is empty,
9090
then [None] is returned.
91-
@since NEXT_RELEASE *)
91+
@since 3.2 *)
9292

9393
val reduce_exn : f:('a -> 'a -> 'a) -> 'a list -> 'a
9494
(** [reduce_exn] is the unsafe version of {!reduce}.
9595
@raise Invalid_argument if the given list is empty.
96-
@since NEXT_RELEASE *)
96+
@since 3.2 *)
9797

9898
val fold_map2 : f:('acc -> 'a -> 'b -> 'acc * 'c) -> init:'acc -> 'a list -> 'b list -> 'acc * 'c list
9999
(** [fold_map2 ~f ~init l1 l2] is to [fold_map] what [List.map2] is to [List.map].
@@ -332,7 +332,7 @@ val chunks : int -> 'a list -> 'a list list
332332
Each item of [l] will occur in exactly one chunk. Only the last chunk
333333
might be of length smaller than [n].
334334
Invariant: [(chunks n l |> List.flatten) = l].
335-
@since NEXT_RELEASE *)
335+
@since 3.2 *)
336336

337337
val intersperse : x:'a -> 'a list -> 'a list
338338
(** [intersperse ~x l] inserts the element [x] between adjacent elements of the list [l].

src/core/CCString.mli

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,23 +189,23 @@ val lines_gen : string -> string gen
189189

190190
val lines_iter : string -> string iter
191191
(** [lines_iter s] returns the [iter] of the lines of [s] (splits along '\n').
192-
@since NEXT_RELEASE *)
192+
@since 3.2 *)
193193

194194
val lines_seq : string -> string Seq.t
195195
(** [lines_seq s] returns the [Seq.t] of the lines of [s] (splits along '\n').
196-
@since NEXT_RELEASE *)
196+
@since 3.2 *)
197197

198198
val concat_gen : sep:string -> string gen -> string
199199
(** [concat_gen ~sep gen] concatenates all strings of [gen], separated with [sep].
200200
@since 0.10 *)
201201

202202
val concat_seq : sep:string -> string Seq.t -> string
203203
(** [concat_seq ~sep seq] concatenates all strings of [seq], separated with [sep].
204-
@since NEXT_RELEASE *)
204+
@since 3.2 *)
205205

206206
val concat_iter : sep:string -> string iter -> string
207207
(** [concat_iter ~sep iter] concatenates all strings of [iter], separated with [sep].
208-
@since NEXT_RELEASE *)
208+
@since 3.2 *)
209209

210210
val unlines : string list -> string
211211
(** [unlines ls] concatenates all strings of [ls], separated with '\n'.
@@ -217,11 +217,11 @@ val unlines_gen : string gen -> string
217217

218218
val unlines_iter : string iter -> string
219219
(** [unlines_iter iter] concatenates all strings of [iter], separated with '\n'.
220-
@since NEXT_RELEASE *)
220+
@since 3.2 *)
221221

222222
val unlines_seq : string Seq.t -> string
223223
(** [unlines_seq seq] concatenates all strings of [seq], separated with '\n'.
224-
@since NEXT_RELEASE *)
224+
@since 3.2 *)
225225

226226
val set : string -> int -> char -> string
227227
(** [set s i c] creates a new string which is a copy of [s], except

0 commit comments

Comments
 (0)