diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 2f2ab89f..506ae9df 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -1,5 +1,19 @@ = Changelog +== 0.20 + +- bugfix in `CCArray.equal` +- fix `CCString.*_ascii`; add `CCChar.{upper,lower}case_ascii` + +- add functions in `CCArray`: fold2,iter2,map2 +- add `CCArray.rev` +- add `CCFloat.round` +- add `CCVector.append_gen` +- add `CCList.{head_opt,last_opt}` +- add `CCInt.{print_binary,to_string_binary}` + tests (thanks @gsg) +- more general types for `CCArray.{for_all2,exists2}` +- more general type for `CCResult.map_or` + == 0.19 - add regression test for #75 diff --git a/_oasis b/_oasis index 6a4e3702..2ea5ba5d 100644 --- a/_oasis +++ b/_oasis @@ -1,6 +1,6 @@ OASISFormat: 0.4 Name: containers -Version: 0.19 +Version: 0.20 Homepage: https://github.com/c-cube/ocaml-containers Authors: Simon Cruanes License: BSD-2-clause @@ -179,7 +179,7 @@ Executable run_qtest containers.io, containers.advanced, containers.sexp, containers.bigarray, containers.unix, containers.thread, containers.data, - sequence, gen, unix, oUnit, qcheck + sequence, gen, unix, oUnit, qcheck Test all Command: ./run_qtest.native diff --git a/src/core/CCArray.ml b/src/core/CCArray.ml index 9b179414..cc7b622f 100644 --- a/src/core/CCArray.ml +++ b/src/core/CCArray.ml @@ -97,24 +97,24 @@ module type S = sig val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool (** Forall on pairs of arrays. @raise Invalid_argument if they have distinct lengths - allow different types @since NEXT_RELEASE *) + allow different types @since 0.20 *) val exists : ('a -> bool) -> 'a t -> bool val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool (** Exists on pairs of arrays. @raise Invalid_argument if they have distinct lengths - allow different types @since NEXT_RELEASE *) + allow different types @since 0.20 *) val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc (** Fold on two arrays stepwise. @raise Invalid_argument if they have distinct lengths - @since NEXT_RELEASE *) + @since 0.20 *) val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit (** Iterate on two arrays stepwise. @raise Invalid_argument if they have distinct lengths - @since NEXT_RELEASE *) + @since 0.20 *) val shuffle : 'a t -> unit (** Shuffle randomly the array, in place *) diff --git a/src/core/CCArray.mli b/src/core/CCArray.mli index 24be5897..8206d2cb 100644 --- a/src/core/CCArray.mli +++ b/src/core/CCArray.mli @@ -99,24 +99,24 @@ module type S = sig val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool (** Forall on pairs of arrays. @raise Invalid_argument if they have distinct lengths - allow different types @since NEXT_RELEASE *) + allow different types @since 0.20 *) val exists : ('a -> bool) -> 'a t -> bool val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool (** Exists on pairs of arrays. @raise Invalid_argument if they have distinct lengths - allow different types @since NEXT_RELEASE *) + allow different types @since 0.20 *) val fold2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc (** Fold on two arrays stepwise. @raise Invalid_argument if they have distinct lengths - @since NEXT_RELEASE *) + @since 0.20 *) val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit (** Iterate on two arrays stepwise. @raise Invalid_argument if they have distinct lengths - @since NEXT_RELEASE *) + @since 0.20 *) val shuffle : 'a t -> unit (** Shuffle randomly the array, in place *) @@ -158,11 +158,11 @@ val map : ('a -> 'b) -> 'a t -> 'b t val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t (** Map on two arrays stepwise. @raise Invalid_argument if they have distinct lengths - @since NEXT_RELEASE *) + @since 0.20 *) val rev : 'a t -> 'a t (** Copy + reverse in place - @since NEXT_RELEASE *) + @since 0.20 *) val filter : ('a -> bool) -> 'a t -> 'a t (** Filter elements out of the array. Only the elements satisfying diff --git a/src/core/CCChar.mli b/src/core/CCChar.mli index 345049b2..748ab659 100644 --- a/src/core/CCChar.mli +++ b/src/core/CCChar.mli @@ -11,11 +11,11 @@ val compare : t -> t -> int val lowercase_ascii : t -> t (** See {!Char} - @since NEXT_RELEASE *) + @since 0.20 *) val uppercase_ascii : t -> t (** See {!Char} - @since NEXT_RELEASE *) + @since 0.20 *) val pp : Buffer.t -> t -> unit val print : Format.formatter -> t -> unit diff --git a/src/core/CCFloat.mli b/src/core/CCFloat.mli index 538d2068..766027ac 100644 --- a/src/core/CCFloat.mli +++ b/src/core/CCFloat.mli @@ -60,7 +60,7 @@ val fsign : t -> t val round : t -> t (** [round f] returns the closest integer value, either above or below - @since NEXT_RELEASE *) + @since 0.20 *) exception TrapNaN of string val sign_exn : t -> int diff --git a/src/core/CCInt.mli b/src/core/CCInt.mli index c6b116d9..7657a315 100644 --- a/src/core/CCInt.mli +++ b/src/core/CCInt.mli @@ -42,10 +42,10 @@ val of_string : string -> t option val print_binary : t formatter (** prints as "0b00101010". - @since NEXT_RELEASE *) + @since 0.20 *) val to_string_binary : t -> string -(** @since NEXT_RELEASE *) +(** @since 0.20 *) val min : t -> t -> t (** @since 0.17 *) diff --git a/src/core/CCList.mli b/src/core/CCList.mli index 3331b9a7..93df4694 100644 --- a/src/core/CCList.mli +++ b/src/core/CCList.mli @@ -136,11 +136,11 @@ val last : int -> 'a t -> 'a t val head_opt : 'a t -> 'a option (** First element. - @since NEXT_RELEASE *) + @since 0.20 *) val last_opt : 'a t -> 'a option (** Last element. - @since NEXT_RELEASE *) + @since 0.20 *) val find_pred : ('a -> bool) -> 'a t -> 'a option (** [find_pred p l] finds the first element of [l] that satisfies [p], diff --git a/src/core/CCVector.mli b/src/core/CCVector.mli index 11dfdee6..ad47b070 100644 --- a/src/core/CCVector.mli +++ b/src/core/CCVector.mli @@ -86,7 +86,7 @@ val append_list : ('a, rw) t -> 'a list -> unit val append_gen : ('a, rw) t -> 'a gen -> unit (** Append content of generator - @since NEXT_RELEASE *) + @since 0.20 *) val equal : 'a equal -> ('a,_) t equal