prepare for 2.4

This commit is contained in:
Simon Cruanes 2018-11-30 10:40:13 -06:00
parent 3b0ceb7821
commit 197b4e7f1b
10 changed files with 39 additions and 10 deletions

View file

@ -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`

View file

@ -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"

View file

@ -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 *)

View file

@ -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)].

View file

@ -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)].

View file

@ -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.

View file

@ -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. *)

View file

@ -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

View file

@ -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 *)

View file

@ -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. *)