merge back from stable

This commit is contained in:
Simon Cruanes 2014-11-12 00:42:28 +01:00
parent c69dc8b009
commit 4ced583f33
11 changed files with 20 additions and 22 deletions

View file

@ -116,4 +116,4 @@ update_next_tag:
udpate_sequence: udpate_sequence:
git subtree pull --prefix sequence sequence stable --squash git subtree pull --prefix sequence sequence stable --squash
.PHONY: examples push_doc tags qtest update_sequence .PHONY: examples push_doc tags qtest update_sequence update_next_tag

4
_oasis
View file

@ -1,6 +1,6 @@
OASISFormat: 0.4 OASISFormat: 0.4
Name: containers Name: containers
Version: 0.4 Version: dev
Homepage: https://github.com/c-cube/ocaml-containers Homepage: https://github.com/c-cube/ocaml-containers
Authors: Simon Cruanes Authors: Simon Cruanes
License: BSD-2-clause License: BSD-2-clause
@ -50,8 +50,6 @@ Library "containers"
CCRandom, CCKTree, CCTrie, CCString, CCHashtbl, CCRandom, CCKTree, CCTrie, CCString, CCHashtbl,
CCFlatHashtbl, CCSexp, CCMap CCFlatHashtbl, CCSexp, CCMap
BuildDepends: bytes BuildDepends: bytes
XMETARequires: cppo
FindlibName: containers
Library "containers_string" Library "containers_string"
Path: string Path: string

View file

@ -26,7 +26,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(** {1 Error Monad} (** {1 Error Monad}
The variant is polymorphic in the error type since NEXT_RELEASE *) The variant is polymorphic in the error type since 0.5 *)
type 'a sequence = ('a -> unit) -> unit type 'a sequence = ('a -> unit) -> unit
type 'a equal = 'a -> 'a -> bool type 'a equal = 'a -> 'a -> bool
@ -60,7 +60,7 @@ val map : ('a -> 'b) -> ('a, 'err) t -> ('b, 'err) t
val map_err : ('err1 -> 'err2) -> ('a, 'err1) t -> ('a, 'err2) t val map_err : ('err1 -> 'err2) -> ('a, 'err1) t -> ('a, 'err2) t
(** Map on error. (** Map on error.
@since NEXT_RELEASE *) @since 0.5 *)
val map2 : ('a -> 'b) -> ('err -> 'err) -> ('a, 'err) t -> ('b, 'err) t val map2 : ('a -> 'b) -> ('err -> 'err) -> ('a, 'err) t -> ('b, 'err) t
(** Same as {!map}, but also with a function that can transform (** Same as {!map}, but also with a function that can transform
@ -92,7 +92,7 @@ val fold : success:('a -> 'b) -> failure:('err -> 'b) -> ('a, 'err) t -> 'b
(** {2 Wrappers} (** {2 Wrappers}
The functions {!guard}, {!wrap1}, {!wrap2} and {!wrap3} now return The functions {!guard}, {!wrap1}, {!wrap2} and {!wrap3} now return
exceptions in case of failure, @since NEXT_RELEASE *) exceptions in case of failure, @since 0.5 *)
val guard : (unit -> 'a) -> ('a, exn) t val guard : (unit -> 'a) -> ('a, exn) t
(** [guard f] runs [f ()] and returns its result wrapped in [`Ok]. If (** [guard f] runs [f ()] and returns its result wrapped in [`Ok]. If

View file

@ -37,7 +37,7 @@ val (%>) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c
val (@@) : ('a -> 'b) -> 'a -> 'b val (@@) : ('a -> 'b) -> 'a -> 'b
(** [f @@ x] is the same as [f x], but right-associative. (** [f @@ x] is the same as [f x], but right-associative.
@since NEXT_RELEASE *) @since 0.5 *)
val id : 'a -> 'a val id : 'a -> 'a
(** Identity function *) (** Identity function *)

View file

@ -39,7 +39,7 @@ val sign : t -> int
val neg : t -> t val neg : t -> t
(** [neg i = - i] (** [neg i = - i]
@since NEXT_RELEASE *) @since 0.5 *)
type 'a printer = Buffer.t -> 'a -> unit type 'a printer = Buffer.t -> 'a -> unit
type 'a formatter = Format.formatter -> 'a -> unit type 'a formatter = Format.formatter -> 'a -> unit

View file

@ -35,7 +35,7 @@ val map : ('a -> 'b) -> 'a t -> 'b t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t val (>|=) : 'a t -> ('a -> 'b) -> 'b t
(** Infix version of [map] with reversed arguments (** Infix version of [map] with reversed arguments
@since NEXT_RELEASE *) @since 0.5 *)
val append : 'a t -> 'a t -> 'a t val append : 'a t -> 'a t -> 'a t
(** Safe version of append *) (** Safe version of append *)

View file

@ -27,7 +27,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(** {1 Extensions of Standard Map} (** {1 Extensions of Standard Map}
Provide useful functions and iterators on [Map.S] Provide useful functions and iterators on [Map.S]
@since NEXT_RELEASE *) @since 0.5 *)
type 'a sequence = ('a -> unit) -> unit type 'a sequence = ('a -> unit) -> unit
type 'a printer = Buffer.t -> 'a -> unit type 'a printer = Buffer.t -> 'a -> unit

View file

@ -63,11 +63,11 @@ val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val filter : ('a -> bool) -> 'a t -> 'a t val filter : ('a -> bool) -> 'a t -> 'a t
(** Filter on 0 or 1 elements (** Filter on 0 or 1 elements
@since NEXT_RELEASE *) @since 0.5 *)
val get : 'a -> 'a t -> 'a val get : 'a -> 'a t -> 'a
(** [get default x] unwraps [x], but if [x = None] it returns [default] instead. (** [get default x] unwraps [x], but if [x = None] it returns [default] instead.
@since NEXT_RELEASE *) @since 0.5 *)
val get_exn : 'a t -> 'a val get_exn : 'a t -> 'a
(** Open the option, possibly failing if it is [None] (** Open the option, possibly failing if it is [None]

View file

@ -606,7 +606,7 @@ module IO : sig
val write_bytes_to : ?mode:int -> ?flags:open_flag list -> val write_bytes_to : ?mode:int -> ?flags:open_flag list ->
string -> Bytes.t t -> unit string -> Bytes.t t -> unit
(** @since NEXT_RELEASE *) (** @since 0.5 *)
val write_lines : ?mode:int -> ?flags:open_flag list -> val write_lines : ?mode:int -> ?flags:open_flag list ->
string -> string t -> unit string -> string t -> unit
@ -614,5 +614,5 @@ module IO : sig
val write_bytes_lines : ?mode:int -> ?flags:open_flag list -> val write_bytes_lines : ?mode:int -> ?flags:open_flag list ->
string -> Bytes.t t -> unit string -> Bytes.t t -> unit
(** @since NEXT_RELEASE *) (** @since 0.5 *)
end end

View file

@ -252,11 +252,11 @@ Sexp.Traverse.list_all pt_of_sexp sexp;;
module Traverse : sig module Traverse : sig
type 'a conv = t -> 'a option type 'a conv = t -> 'a option
(** A converter from S-expressions to 'a is a function [sexp -> 'a option]. (** A converter from S-expressions to 'a is a function [sexp -> 'a option].
@since NEXT_RELEASE *) @since 0.5 *)
val map_opt : ('a -> 'b option) -> 'a list -> 'b list option val map_opt : ('a -> 'b option) -> 'a list -> 'b list option
(** Map over a list, failing as soon as the function fails on any element (** Map over a list, failing as soon as the function fails on any element
@since NEXT_RELEASE *) @since 0.5 *)
val list_any : 'a conv -> t -> 'a option val list_any : 'a conv -> t -> 'a option
(** [list_any f (List l)] tries [f x] for every element [x] in [List l], (** [list_any f (List l)] tries [f x] for every element [x] in [List l],
@ -284,19 +284,19 @@ module Traverse : sig
val to_list_with : (t -> 'a option) -> 'a list conv val to_list_with : (t -> 'a option) -> 'a list conv
(** Expect a list, applies [f] to all the elements of the list, and succeeds (** Expect a list, applies [f] to all the elements of the list, and succeeds
only if [f] succeeded on every element only if [f] succeeded on every element
@since NEXT_RELEASE *) @since 0.5 *)
val to_pair : (t * t) conv val to_pair : (t * t) conv
(** Expect a list of two elements *) (** Expect a list of two elements *)
val to_pair_with : 'a conv -> 'b conv -> ('a * 'b) conv val to_pair_with : 'a conv -> 'b conv -> ('a * 'b) conv
(** Same as {!to_pair} but applies conversion functions (** Same as {!to_pair} but applies conversion functions
@since NEXT_RELEASE *) @since 0.5 *)
val to_triple : (t * t * t) conv val to_triple : (t * t * t) conv
val to_triple_with : 'a conv -> 'b conv -> 'c conv -> ('a * 'b * 'c) conv val to_triple_with : 'a conv -> 'b conv -> 'c conv -> ('a * 'b * 'c) conv
(* @since NEXT_RELEASE *) (* @since 0.5 *)
val get_field : string -> t conv val get_field : string -> t conv
(** [get_field name e], when [e = List [(n1,x1); (n2,x2) ... ]], extracts (** [get_field name e], when [e = List [(n1,x1); (n2,x2) ... ]], extracts
@ -314,7 +314,7 @@ module Traverse : sig
(** [field_list name f "(... (name a b c d) ...record)"] (** [field_list name f "(... (name a b c d) ...record)"]
will look for a field based on the given [name], and expect it to have a will look for a field based on the given [name], and expect it to have a
list of arguments dealt with by [f] (here, "a b c d"). list of arguments dealt with by [f] (here, "a b c d").
@since NEXT_RELEASE *) @since 0.5 *)
val (>>=) : 'a option -> ('a -> 'b option) -> 'b option val (>>=) : 'a option -> ('a -> 'b option) -> 'b option

View file

@ -39,7 +39,7 @@ This module is meant to be opened if one doesn't want to use both, say,
Changed [Opt] to [Option] to better reflect that this module is about the Changed [Opt] to [Option] to better reflect that this module is about the
['a option] type, with [module Option = CCOpt]. ['a option] type, with [module Option = CCOpt].
@since NEXT_RELEASE @since 0.5
*) *)
module Array = struct include Array include CCArray end module Array = struct include Array include CCArray end