diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 9db37954a..ff5ac1db3 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -1,5 +1,34 @@ = Changelog +== 2.4 + +=== breaking: + +- rename `Random.sample_without_{replacement,duplicates}` + +=== Features + +- add `CCResult.iter_err` +- add `CCEqual.{always,never}_eq` +- add `containersLabels.ml`, generate unlabelled interfaces from labelled ones +- add `CCEqualLabels` +- add `CCArray_sliceLabels` +- add `CCStringLabels` +- add `CCResult.get_or_failwith` +- add `CCInt.( ** )` for integer exponentiation +- add `List.counts`, related to `List.count` (#230) + +- migrate to dune +- migrate to opam2 +- add CODE_OF_CONDUCT.md + +=== Fixes + +- #235: release memory in vector/ringbuffer (thanks to @copy) +- remove spurious `Labels` module +- doc: fix small inaccuracy in comments and API +- test: improve perf by changing random gens + == 2.3 - feat(vector): add `Vector.{filter,filter_map}_in_place` diff --git a/containers.opam b/containers.opam index 4d2d5f4cd..590e4d9d0 100644 --- a/containers.opam +++ b/containers.opam @@ -1,6 +1,6 @@ opam-version: "2.0" name: "containers" -version: "2.3" +version: "2.4" author: "Simon Cruanes" maintainer: "simon.cruanes.2007@m4x.org" synopsis: "A modular, clean and powerful extension of the OCaml standard library" diff --git a/src/core/CCInt.mli b/src/core/CCInt.mli index c57fc9603..398d9c29c 100644 --- a/src/core/CCInt.mli +++ b/src/core/CCInt.mli @@ -126,7 +126,7 @@ module Infix : sig val (/) : t -> t -> t (** @since 2.1 *) - val ( ** ) : t -> t -> t (** @since NEXT_RELEASE *) + val ( ** ) : t -> t -> t (** @since 2.4 *) val (mod) : t -> t -> t (** @since 2.1 *) diff --git a/src/core/CCList.mli b/src/core/CCList.mli index 7f4719b29..f2ab25cd5 100644 --- a/src/core/CCList.mli +++ b/src/core/CCList.mli @@ -94,7 +94,7 @@ val count : ('a -> bool) -> 'a list -> int @since 2.2 with labels *) val count_true_false : ('a -> bool) -> 'a list -> int * int -(** @since NEXT_RELEASE *) +(** @since 2.4 *) val init : int -> (int -> 'a) -> 'a t (** [init len f] is [f 0; f 1; ...; f (len-1)]. diff --git a/src/core/CCListLabels.mli b/src/core/CCListLabels.mli index 75f34ef51..ce373ff31 100644 --- a/src/core/CCListLabels.mli +++ b/src/core/CCListLabels.mli @@ -92,7 +92,7 @@ val count : f:('a -> bool) -> 'a list -> int @since 2.2 with labels *) val count_true_false : f:('a -> bool) -> 'a list -> int * int -(** @since NEXT_RELEASE *) +(** @since 2.4 *) val init : int -> f:(int -> 'a) -> 'a t (** [init len ~f] is [f 0; f 1; ...; f (len-1)]. diff --git a/src/core/CCRandom.mli b/src/core/CCRandom.mli index c52852d58..e609aa462 100644 --- a/src/core/CCRandom.mli +++ b/src/core/CCRandom.mli @@ -74,7 +74,7 @@ val sample_without_duplicates: generated randomly using [g] with the added constraint that none of the generated random values are equal. @raise Invalid_argument if [n <= 0]. - @since NEXT_RELEASE *) + @since 2.4 *) val list_seq : 'a t list -> 'a list t (** Build random lists from lists of random generators. diff --git a/src/core/CCResult.mli b/src/core/CCResult.mli index 6e4f23331..a5b47bb6f 100644 --- a/src/core/CCResult.mli +++ b/src/core/CCResult.mli @@ -75,7 +75,7 @@ val iter : ('a -> unit) -> ('a, _) t -> unit val iter_err : ('err -> unit) -> (_, 'err) t -> unit (** Apply the function in case of [Error]. - @since NEXT_RELEASE *) + @since 2.4 *) exception Get_error @@ -91,7 +91,7 @@ val get_or : ('a, _) t -> default:'a -> 'a val get_or_failwith : ('a, string) t -> 'a (** [get_or_failwith e] returns [x] if [e = Ok x], fails otherwise. @raise Failure with [msg] if [e = Error msg]. - @since NEXT_RELEASE *) + @since 2.4 *) val map_or : ('a -> 'b) -> ('a, 'c) t -> default:'b -> 'b (** [map_or f e ~default] returns [f x] if [e = Ok x], [default] otherwise. *) diff --git a/src/core/CCVector.mli b/src/core/CCVector.mli index 72f66863c..42f4bd4e6 100644 --- a/src/core/CCVector.mli +++ b/src/core/CCVector.mli @@ -280,7 +280,7 @@ val fill_empty_slots_with : ('a, _) t -> 'a -> unit array that are not used (ie in the last [capacity v - length v] slots). This is useful if you removed some elements from the vector and want to be sure they can be GC'd by erasing them from the vector. - @since NEXT_RELEASE *) + @since 2.4 *) val of_klist : ?init:('a, rw) t -> 'a klist -> ('a, rw) t val to_klist : ('a,_) t -> 'a klist diff --git a/src/data/CCRingBuffer.ml b/src/data/CCRingBuffer.ml index 4970b4805..808f1c95e 100644 --- a/src/data/CCRingBuffer.ml +++ b/src/data/CCRingBuffer.ml @@ -20,7 +20,7 @@ module Array = struct val dummy : elt (** A dummy element used for empty slots in the array - @since NEXT_RELEASE *) + @since 2.4 *) val create : int -> t (** Make an array of the given size, filled with dummy elements *) diff --git a/src/data/CCRingBuffer.mli b/src/data/CCRingBuffer.mli index bb2b4f2f3..66a568525 100644 --- a/src/data/CCRingBuffer.mli +++ b/src/data/CCRingBuffer.mli @@ -28,7 +28,7 @@ module Array : sig val dummy : elt (** A dummy element used for empty slots in the array - @since NEXT_RELEASE *) + @since 2.4 *) val create : int -> t (** Make an array of the given size, filled with dummy elements. *)