Skip to content

Commit bedf9ec

Browse files
committed
prepare for 1.3
1 parent acb286d commit bedf9ec

File tree

10 files changed

+38
-20
lines changed

10 files changed

+38
-20
lines changed

CHANGELOG.adoc

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

3+
== 1.3
4+
5+
- deprecate `CCBool.negate`
6+
- add `CCString.compare_natural` (closes #146)
7+
- add callbacks in `CCCache.with_cache{,_rec}` (closes #140)
8+
- tail-rec `CCList.split` (by @bikalgurung, see #138)
9+
- change `CCRingBuffer.peek_{front,back}` to return options (closes #127)
10+
- add `CCRingBuffer.is_full`
11+
- add `CCArray.find_map{,_i}`, deprecated older names (closes #129)
12+
- add `CCList.{keep,all}_{some,ok}` (closes #124)
13+
- large refactor of `CCSimple_queue` (close #125)
14+
- add `CCSimple_queue` to containers.data
15+
- small change for consistency in `CCIntMap`
16+
17+
- bugfix in `CCRingBuffer.skip`, and corresponding tests
18+
- cleanup and refactor of `CCRingBuffer` (see #126). Add strong tests.
19+
- add rich testsuite to `CCIntMap`, based on @jmid's work
20+
321
== 1.2
422

523
- make many modules extensions of stdlib (close #109)

_oasis

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
OASISFormat: 0.4
22
Name: containers
3-
Version: 1.2
3+
Version: 1.3
44
Homepage: https://github.com/c-cube/ocaml-containers
55
Authors: Simon Cruanes
66
License: BSD-2-clause

src/core/CCArray.mli

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,21 @@ val sort_ranking : ('a -> 'a -> int) -> 'a t -> int array
9494
val find_map : ('a -> 'b option) -> 'a t -> 'b option
9595
(** [find_map f a] returns [Some y] if there is an element [x] such
9696
that [f x = Some y], else it returns [None]
97-
@since NEXT_RELEASE
97+
@since 1.3
9898
*)
9999

100100
val find : ('a -> 'b option) -> 'a t -> 'b option
101101
(** Alias to {!find_map}
102-
@deprecated since NEXT_RELEASE *)
102+
@deprecated since 1.3 *)
103103

104104
val find_map_i : (int -> 'a -> 'b option) -> 'a t -> 'b option
105105
(** Like {!find_map}, but also pass the index to the predicate function.
106-
@since NEXT_RELEASE *)
106+
@since 1.3 *)
107107

108108
val findi : (int -> 'a -> 'b option) -> 'a t -> 'b option
109109
(** Alias to {!find_map_i}
110110
@since 0.3.4
111-
@deprecated since NEXT_RELEASE *)
111+
@deprecated since 1.3 *)
112112

113113
val find_idx : ('a -> bool) -> 'a t -> (int * 'a) option
114114
(** [find_idx p x] returns [Some (i,x)] where [x] is the [i]-th element of [l],

src/core/CCBool.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ val equal : t -> t -> bool
1212

1313
val negate : t -> t
1414
(** Negation on booleans (functional version of [not])
15-
@deprecate since NEXT_RELEASE, simply use {!not} instead *)
15+
@deprecate since 1.3, simply use {!not} instead *)
1616

1717
type 'a printer = Format.formatter -> 'a -> unit
1818

src/core/CCList.mli

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,22 +253,22 @@ val filter_map : ('a -> 'b option) -> 'a t -> 'b t
253253
val keep_some : 'a option t -> 'a t
254254
(** [filter_some l] retains only elements of the form [Some x].
255255
Same as [filter_map CCFun.id]
256-
@since NEXT_RELEASE *)
256+
@since 1.3 *)
257257

258258
val keep_ok : ('a, _) Result.result t -> 'a t
259259
(** [filter_some l] retains only elements of the form [Some x].
260260
Same as [filter_map CCFun.id]
261-
@since NEXT_RELEASE *)
261+
@since 1.3 *)
262262

263263
val all_some : 'a option t -> 'a t option
264264
(** [all_some l] returns [Some l'] if all elements of [l] are of the form [Some x],
265265
or [None] otherwise.
266-
@since NEXT_RELEASE *)
266+
@since 1.3 *)
267267

268268
val all_ok : ('a, 'err) Result.result t -> ('a t, 'err) Result.result
269269
(** [all_ok l] returns [Ok l'] if all elements of [l] are of the form [Ok x],
270270
or [Error e] otherwise (with the first error met).
271-
@since NEXT_RELEASE *)
271+
@since 1.3 *)
272272

273273
val sorted_merge : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list
274274
(** Merges elements from both sorted list *)

src/core/CCString.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ val compare_versions : string -> string -> int
581581
val compare_natural : string -> string -> int
582582
(** Natural Sort Order, comparing chunks of digits as natural numbers.
583583
https://en.wikipedia.org/wiki/Natural_sort_order
584-
@since NEXT_RELEASE *)
584+
@since 1.3 *)
585585

586586
(*$T
587587
compare_natural "foo1" "foo2" < 0

src/data/CCCache.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type ('a, 'b) callback = in_cache:bool -> 'a -> 'b -> unit
3737
Should never raise.
3838
@param in_cache is [true] if the value was in cache, [false]
3939
if the value was just produced.
40-
@since NEXT_RELEASE *)
40+
@since 1.3 *)
4141

4242
val with_cache : ?cb:('a, 'b) callback -> ('a, 'b) t -> ('a -> 'b) -> 'a -> 'b
4343
(** [with_cache c f] behaves like [f], but caches calls to [f] in the

src/data/CCRingBuffer.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ module type S = sig
9494

9595
val is_full : t -> bool
9696
(** true if pushing an element would erase another element.
97-
@since NEXT_RELEASE *)
97+
@since 1.3 *)
9898

9999
val blit_from : t -> Array.t -> int -> int -> unit
100100
(** [blit_from buf from_buf o len] copies the slice [o, ... o + len - 1] from
@@ -162,15 +162,15 @@ module type S = sig
162162
val peek_front_exn : t -> Array.elt
163163
(** First value from front of [t], without modification.
164164
@raise Empty if buffer is empty.
165-
@since NEXT_RELEASE *)
165+
@since 1.3 *)
166166

167167
val peek_back : t -> Array.elt option
168168
(** Get the last value from back of [t], without modification. *)
169169

170170
val peek_back_exn : t -> Array.elt
171171
(** Get the last value from back of [t], without modification.
172172
@raise Empty if buffer is empty.
173-
@since NEXT_RELEASE *)
173+
@since 1.3 *)
174174

175175
val take_back : t -> Array.elt option
176176
(** Take and remove the last value from back of [t], if any *)

src/data/CCRingBuffer.mli

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
@since 0.9
1414
1515
Change in the API to provide only a bounded buffer
16-
@since NEXT_RELEASE
16+
@since 1.3
1717
*)
1818

1919
(** {2 Underlying Array} *)
@@ -95,7 +95,7 @@ module type S = sig
9595

9696
val is_full : t -> bool
9797
(** true if pushing an element would erase another element.
98-
@since NEXT_RELEASE *)
98+
@since 1.3 *)
9999

100100
val blit_from : t -> Array.t -> int -> int -> unit
101101
(** [blit_from buf from_buf o len] copies the slice [o, ... o + len - 1] from
@@ -163,15 +163,15 @@ module type S = sig
163163
val peek_front_exn : t -> Array.elt
164164
(** First value from front of [t], without modification.
165165
@raise Empty if buffer is empty.
166-
@since NEXT_RELEASE *)
166+
@since 1.3 *)
167167

168168
val peek_back : t -> Array.elt option
169169
(** Get the last value from back of [t], without modification. *)
170170

171171
val peek_back_exn : t -> Array.elt
172172
(** Get the last value from back of [t], without modification.
173173
@raise Empty if buffer is empty.
174-
@since NEXT_RELEASE *)
174+
@since 1.3 *)
175175

176176
val take_back : t -> Array.elt option
177177
(** Take and remove the last value from back of [t], if any *)

src/data/CCSimple_queue.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
(** {1 Functional queues (fifo)} *)
55

66
(** Simple implementation of functional queues
7-
@since NEXT_RELEASE *)
7+
@since 1.3 *)
88

99
type 'a sequence = ('a -> unit) -> unit
1010
type 'a printer = Format.formatter -> 'a -> unit

0 commit comments

Comments
 (0)