From 8f33484dffd745eaeeb4dfcf61577ff8359baa76 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Sun, 24 May 2015 17:22:20 +0200 Subject: [PATCH] prepare 0.11 --- CHANGELOG.md | 24 ++++++++++++++++++++++++ _oasis | 2 +- src/core/CCInt.mli | 2 +- src/core/CCList.mli | 20 ++++++++++---------- src/core/CCOpt.mli | 2 +- src/data/CCMixset.mli | 2 +- src/data/CCRingBuffer.ml | 2 +- src/data/CCRingBuffer.mli | 2 +- src/string/CCParse.mli | 2 +- src/unix/CCUnix.mli | 14 +++++++------- 10 files changed, 48 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08de776a..50fa1a62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## 0.11 + +- add `CCList.{remove,is_empty}` +- add `CCOpt.is_none` +- remove packs for `containers_string` and `containers_advanced` +- add `Containers_string.Parse`, very simple monadic parser combinators +- remove warning from `.merlin` +- attempts of bugfix in PrintBox for unicode text (wip) +- add `CCList.{find_pred,find_pred_exn}` +- bugfix in `CCUnix.escape_str` +- add methods and accessors to `CCUnix` +- in `CCUnix`, use `Unix.environment` as the default environment +- add `CCList.partition_map` +- `RingBuffer.{of_array, to_array}` convenience functions +- `containers.misc.RAL`: more efficient in memory (unfold list) +- add `CCInt.pow` (thanks to bernardofpc) +- add `CCList.group_succ` +- `containers.data.CCMixset`, set of values indexed by poly keys +- disable warning 32 (unused val) in .merlin +- some infix operators for `CCUnix` +- add `CCUnix.async_call` for spawning and communicating with subprocess +- add `CCList.Set.{add,remove}` +- fix doc of `CCstring.Split.list_` + ## 0.10 - add `containers.misc.Puf.iter` diff --git a/_oasis b/_oasis index 66d1cc32..05e60867 100644 --- a/_oasis +++ b/_oasis @@ -1,6 +1,6 @@ OASISFormat: 0.4 Name: containers -Version: 0.10 +Version: 0.11 Homepage: https://github.com/c-cube/ocaml-containers Authors: Simon Cruanes License: BSD-2-clause diff --git a/src/core/CCInt.mli b/src/core/CCInt.mli index 8b9a3eaa..9ad57969 100644 --- a/src/core/CCInt.mli +++ b/src/core/CCInt.mli @@ -44,7 +44,7 @@ val neg : t -> t val pow : t -> t -> t (** [pow a b = a^b] for positive integers [a] and [b]. raises [Invalid_argument] if [a = b = 0] or [b] < 0. - @since NEXT_RELEASE *) + @since 0.11 *) type 'a printer = Buffer.t -> 'a -> unit type 'a formatter = Format.formatter -> 'a -> unit diff --git a/src/core/CCList.mli b/src/core/CCList.mli index c1e68ba0..201a2112 100644 --- a/src/core/CCList.mli +++ b/src/core/CCList.mli @@ -32,7 +32,7 @@ val empty : 'a t val is_empty : _ t -> bool (** [is_empty l] returns [true] iff [l = []] - @since NEXT_RELEASE *) + @since 0.11 *) val map : ('a -> 'b) -> 'a t -> 'b t (** Safe version of map *) @@ -87,7 +87,7 @@ val partition_map : ('a -> [<`Left of 'b | `Right of 'c | `Drop]) -> - if [f x = `Left y], adds [y] to the first list - if [f x = `Right z], adds [z] to the second list - if [f x = `Drop], ignores [x] - @since NEXT_RELEASE *) + @since 0.11 *) val pure : 'a -> 'a t @@ -116,25 +116,25 @@ val last : int -> 'a t -> 'a t val find_pred : ('a -> bool) -> 'a t -> 'a option (** [find_pred p l] finds the first element of [l] that satisfies [p], or returns [None] if no element satisfies [p] - @since NEXT_RELEASE *) + @since 0.11 *) val find_pred_exn : ('a -> bool) -> 'a t -> 'a (** Unsafe version of {!find_pred} @raise Not_found if no such element is found - @since NEXT_RELEASE *) + @since 0.11 *) val find_map : ('a -> 'b option) -> 'a t -> 'b option (** [find f l] traverses [l], applying [f] to each element. If for some element [x], [f x = Some y], then [Some y] is returned. Otherwise the call returns [None] - @since NEXT_RELEASE *) + @since 0.11 *) val find : ('a -> 'b option) -> 'a list -> 'b option (** @deprecated in favor of {!find_map}, for the name is too confusing *) val find_mapi : (int -> 'a -> 'b option) -> 'a t -> 'b option (** Like {!find_map}, but also pass the index to the predicate function. - @since NEXT_RELEASE *) + @since 0.11 *) val findi : (int -> 'a -> 'b option) -> 'a t -> 'b option (** @deprecated in favor of {!find_mapi}, name is too confusing @@ -147,7 +147,7 @@ val find_idx : ('a -> bool) -> 'a t -> (int * 'a) option val remove : ?eq:('a -> 'a -> bool) -> x:'a -> 'a t -> 'a t (** [remove ~x l] removes every instance of [x] from [l]. Tailrec. @param eq equality function - @since NEXT_RELEASE *) + @since 0.11 *) val filter_map : ('a -> 'b option) -> 'a t -> 'b t (** Map and remove elements at the same time *) @@ -173,7 +173,7 @@ val uniq_succ : ?eq:('a -> 'a -> bool) -> 'a list -> 'a list val group_succ : ?eq:('a -> 'a -> bool) -> 'a list -> 'a list list (** [group_succ ~eq l] groups together consecutive elements that are equal according to [eq] - @since NEXT_RELEASE *) + @since 0.11 *) (** {2 Indices} *) @@ -209,11 +209,11 @@ end module Set : sig val add : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> 'a t (** [add x set] adds [x] to [set] if it was not already present - @since NEXT_RELEASE *) + @since 0.11 *) val remove : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> 'a t (** [remove x set] removes one occurrence of [x] from [set] - @since NEXT_RELEASE *) + @since 0.11 *) val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> bool (** membership to the list *) diff --git a/src/core/CCOpt.mli b/src/core/CCOpt.mli index 09ffb8ae..ed1f3778 100644 --- a/src/core/CCOpt.mli +++ b/src/core/CCOpt.mli @@ -37,7 +37,7 @@ val maybe : ('a -> 'b) -> 'b -> 'a t -> 'b val is_some : _ t -> bool val is_none : _ t -> bool -(** @since NEXT_RELEASE *) +(** @since 0.11 *) val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int diff --git a/src/data/CCMixset.mli b/src/data/CCMixset.mli index 30e19276..cde9b021 100644 --- a/src/data/CCMixset.mli +++ b/src/data/CCMixset.mli @@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. () ]} - @since NEXT_RELEASE *) + @since 0.11 *) type t (** A set of values of heterogeneous types *) diff --git a/src/data/CCRingBuffer.ml b/src/data/CCRingBuffer.ml index 932f6710..fb8e820d 100644 --- a/src/data/CCRingBuffer.ml +++ b/src/data/CCRingBuffer.ml @@ -200,7 +200,7 @@ module type S = sig val to_array : t -> Array.t (** Create an array from the elements, in order. - @since NEXT_RELEASE *) + @since 0.11 *) end module MakeFromArray(Array:Array.S) = struct diff --git a/src/data/CCRingBuffer.mli b/src/data/CCRingBuffer.mli index 0caf4db6..2c7cdbb3 100644 --- a/src/data/CCRingBuffer.mli +++ b/src/data/CCRingBuffer.mli @@ -199,7 +199,7 @@ module type S = sig val to_array : t -> Array.t (** Create an array from the elements, in order. - @since NEXT_RELEASE *) + @since 0.11 *) end (** An efficient byte based ring buffer *) diff --git a/src/string/CCParse.mli b/src/string/CCParse.mli index 5bc0f146..106abc73 100644 --- a/src/string/CCParse.mli +++ b/src/string/CCParse.mli @@ -59,7 +59,7 @@ let p = U.list ~sep:"," U.word;; parse_string_exn "[abc , de, hello ,world ]" p;; ]} -@since NEXT_RELEASE +@since 0.11 *) type 'a or_error = [`Ok of 'a | `Error of string] diff --git a/src/unix/CCUnix.mli b/src/unix/CCUnix.mli index 1af80d9d..5291244c 100644 --- a/src/unix/CCUnix.mli +++ b/src/unix/CCUnix.mli @@ -82,13 +82,13 @@ type async_call_result = close_in:unit; (* close stdin *) close_err:unit; close_out:unit; - close_all:unit; (* close all 3 channels *) (** @since NEXT_RELEASE *) + close_all:unit; (* close all 3 channels *) (** @since 0.11 *) wait:Unix.process_status; (* block until the process ends *) wait_errcode:int; (* block until the process ends, then extract errcode *) - (** @since NEXT_RELEASE *) + (** @since 0.11 *) > (** A subprocess for interactive usage (read/write channels line by line) - @since NEXT_RELEASE *) + @since 0.11 *) val async_call : ?env:string array -> ('a, Buffer.t, unit, async_call_result) format4 -> @@ -97,11 +97,11 @@ val async_call : ?env:string array -> line generators and line sinks (for stdin). if [p] is [async_call "cmd"], then [p#wait] waits for the subprocess to die. Channels can be closed independently. - @since NEXT_RELEASE *) + @since 0.11 *) (** {2 Accessors} -@since NEXT_RELEASE *) +@since 0.11 *) val stdout : < stdout : 'a; .. > -> 'a val stderr : < stderr : 'a; .. > -> 'a @@ -113,11 +113,11 @@ val errcode : < errcode : 'a; .. > -> 'a module Infix : sig val (?|) : ('a, Buffer.t, unit, call_result) format4 -> 'a (** Infix version of {!call} - @since NEXT_RELEASE *) + @since 0.11 *) val (?|&) : ('a, Buffer.t, unit, async_call_result) format4 -> 'a (** Infix version of {!async_call} - @since NEXT_RELEASE *) + @since 0.11 *) end include module type of Infix