From 22d9d27c808257cfed774c984da2af7049e368b5 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Wed, 12 Nov 2014 00:10:25 +0100 Subject: [PATCH] version 0.5 --- CHANGELOG.md | 26 ++++++++++++++++++++++++++ Makefile | 9 ++++++--- _oasis | 3 +-- core/CCError.mli | 6 +++--- core/CCFun.mli | 2 +- core/CCInt.mli | 2 +- core/CCList.mli | 2 +- core/CCMap.mli | 2 +- core/CCOpt.mli | 2 +- core/CCSequence.mli | 4 ++-- core/META | 20 ++++++++++---------- pervasives/CCPervasives.ml | 2 +- setup.ml | 8 ++++---- 13 files changed, 58 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72561eb7..d0232d54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,31 @@ # Changelog +## 0.5 + +### breaking changes + +- dependency on `cppo` (thanks to @whitequark, see AUHORS.md) and `bytes` +- `CCError`: + * now polymorphic on the error type + * some retro-incompatibilies (wrap,guard) +- `CCPervasives.Opt` -> `CCPervasives.Option` +- `Levenshtein.Index.remove` changed signature (useless param removed) + +### other changes + +- stronger inlining for `CCVector` (so that e.g. push is inline) +- more tests for `CCVector` +- removed many warnings +- `CCSequence` now provides some bytes-dependent operations +- `CCList.(>|=)` map operator +- `CCOpt.filter` +- `CCInt.neg` +- `CCMap` wrapper to the standard `Map` module +- make some functions in `CCFun` and `CCString` depend on ocaml version +- thanks to @whitequark, could use cppo for preprocessing files +- add Format printers to `CCString` +- `AUTHORS.md` + ## 0.4.1 - `CCOpt.get` diff --git a/Makefile b/Makefile index dc3a78e0..96dabd89 100644 --- a/Makefile +++ b/Makefile @@ -77,9 +77,12 @@ QTEST_PREAMBLE='open CCFun;; ' qtest-gen: qtest-clean @mkdir -p qtest - @qtest extract --preamble $(QTEST_PREAMBLE) \ - -o qtest/run_qtest.cppo.ml \ - $(QTESTABLE) 2> /dev/null + @if which qtest ; then \ + qtest extract --preamble $(QTEST_PREAMBLE) \ + -o qtest/run_qtest.cppo.ml \ + $(QTESTABLE) 2> /dev/null ; \ + else touch qtest/run_qtest.cppo.ml ; \ + fi push-stable: git checkout stable diff --git a/_oasis b/_oasis index 9e88d641..78c413ae 100644 --- a/_oasis +++ b/_oasis @@ -1,6 +1,6 @@ OASISFormat: 0.4 Name: containers -Version: 0.4.1 +Version: 0.5 Homepage: https://github.com/c-cube/ocaml-containers Authors: Simon Cruanes License: BSD-2-clause @@ -49,7 +49,6 @@ Library "containers" CCRandom, CCKTree, CCTrie, CCString, CCHashtbl, CCFlatHashtbl, CCSexp, CCMap BuildDepends: bytes - XMETARequires: cppo Library "containers_string" Path: string diff --git a/core/CCError.mli b/core/CCError.mli index 17297bb6..95929888 100644 --- a/core/CCError.mli +++ b/core/CCError.mli @@ -26,7 +26,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. (** {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 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 (** Map on error. - @since NEXT_RELEASE *) + @since 0.5 *) val map2 : ('a -> 'b) -> ('err -> 'err) -> ('a, 'err) t -> ('b, 'err) t (** 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} 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 (** [guard f] runs [f ()] and returns its result wrapped in [`Ok]. If diff --git a/core/CCFun.mli b/core/CCFun.mli index 59af0e40..6ac21173 100644 --- a/core/CCFun.mli +++ b/core/CCFun.mli @@ -37,7 +37,7 @@ val (%>) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c val (@@) : ('a -> 'b) -> 'a -> 'b (** [f @@ x] is the same as [f x], but right-associative. - @since NEXT_RELEASE *) + @since 0.5 *) val id : 'a -> 'a (** Identity function *) diff --git a/core/CCInt.mli b/core/CCInt.mli index 3fcd33ac..12a9040c 100644 --- a/core/CCInt.mli +++ b/core/CCInt.mli @@ -39,7 +39,7 @@ val sign : t -> int val neg : t -> t (** [neg i = - i] - @since NEXT_RELEASE *) + @since 0.5 *) type 'a printer = Buffer.t -> 'a -> unit type 'a formatter = Format.formatter -> 'a -> unit diff --git a/core/CCList.mli b/core/CCList.mli index 7e64a893..0b23eb47 100644 --- a/core/CCList.mli +++ b/core/CCList.mli @@ -35,7 +35,7 @@ val map : ('a -> 'b) -> 'a t -> 'b t val (>|=) : 'a t -> ('a -> 'b) -> 'b t (** Infix version of [map] with reversed arguments - @since NEXT_RELEASE *) + @since 0.5 *) val append : 'a t -> 'a t -> 'a t (** Safe version of append *) diff --git a/core/CCMap.mli b/core/CCMap.mli index 385c714a..2ff1d310 100644 --- a/core/CCMap.mli +++ b/core/CCMap.mli @@ -27,7 +27,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. (** {1 Extensions of Standard Map} Provide useful functions and iterators on [Map.S] -@since NEXT_RELEASE *) +@since 0.5 *) type 'a sequence = ('a -> unit) -> unit type 'a printer = Buffer.t -> 'a -> unit diff --git a/core/CCOpt.mli b/core/CCOpt.mli index 9098b19c..068631fa 100644 --- a/core/CCOpt.mli +++ b/core/CCOpt.mli @@ -63,7 +63,7 @@ val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a val filter : ('a -> bool) -> 'a t -> 'a t (** Filter on 0 or 1 elements - @since NEXT_RELEASE *) + @since 0.5 *) val get : 'a -> 'a t -> 'a (** [get default x] unwraps [x], but if [x = None] it returns [default] instead. diff --git a/core/CCSequence.mli b/core/CCSequence.mli index afa8f900..0c5fa9a6 100644 --- a/core/CCSequence.mli +++ b/core/CCSequence.mli @@ -606,7 +606,7 @@ module IO : sig val write_bytes_to : ?mode:int -> ?flags:open_flag list -> string -> Bytes.t t -> unit - (** @since NEXT_RELEASE *) + (** @since 0.5 *) val write_lines : ?mode:int -> ?flags:open_flag list -> string -> string t -> unit @@ -614,5 +614,5 @@ module IO : sig val write_bytes_lines : ?mode:int -> ?flags:open_flag list -> string -> Bytes.t t -> unit - (** @since NEXT_RELEASE *) + (** @since 0.5 *) end diff --git a/core/META b/core/META index 426d4e46..f15ae011 100644 --- a/core/META +++ b/core/META @@ -1,15 +1,15 @@ # OASIS_START -# DO NOT EDIT (digest: e4ab50f4ef28e5ea06e4145c3414c218) -version = "0.4.1" +# DO NOT EDIT (digest: f28449d1761e3b4dfea6c77b24996bbb) +version = "0.5" description = "A modular standard library focused on data structures." -requires = "cppo" +requires = "bytes" archive(byte) = "containers.cma" archive(byte, plugin) = "containers.cma" archive(native) = "containers.cmxa" archive(native, plugin) = "containers.cmxs" exists_if = "containers.cma" package "thread" ( - version = "0.4.1" + version = "0.5" description = "A modular standard library focused on data structures." requires = "containers threads" archive(byte) = "containers_thread.cma" @@ -20,7 +20,7 @@ package "thread" ( ) package "string" ( - version = "0.4.1" + version = "0.5" description = "A modular standard library focused on data structures." archive(byte) = "containers_string.cma" archive(byte, plugin) = "containers_string.cma" @@ -30,7 +30,7 @@ package "string" ( ) package "pervasives" ( - version = "0.4.1" + version = "0.5" description = "A modular standard library focused on data structures." requires = "containers" archive(byte) = "containers_pervasives.cma" @@ -41,7 +41,7 @@ package "pervasives" ( ) package "misc" ( - version = "0.4.1" + version = "0.5" description = "A modular standard library focused on data structures." requires = "unix containers" archive(byte) = "containers_misc.cma" @@ -52,7 +52,7 @@ package "misc" ( ) package "lwt" ( - version = "0.4.1" + version = "0.5" description = "A modular standard library focused on data structures." requires = "containers lwt lwt.unix containers.misc" archive(byte) = "containers_lwt.cma" @@ -63,7 +63,7 @@ package "lwt" ( ) package "cgi" ( - version = "0.4.1" + version = "0.5" description = "A modular standard library focused on data structures." requires = "containers CamlGI" archive(byte) = "containers_cgi.cma" @@ -74,7 +74,7 @@ package "cgi" ( ) package "advanced" ( - version = "0.4.1" + version = "0.5" description = "A modular standard library focused on data structures." requires = "containers" archive(byte) = "containers_advanced.cma" diff --git a/pervasives/CCPervasives.ml b/pervasives/CCPervasives.ml index b87db046..5e38bcd4 100644 --- a/pervasives/CCPervasives.ml +++ b/pervasives/CCPervasives.ml @@ -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 ['a option] type, with [module Option = CCOpt]. -@since NEXT_RELEASE +@since 0.5 *) module Array = struct include Array include CCArray end diff --git a/setup.ml b/setup.ml index 26199764..ee4e3c0f 100644 --- a/setup.ml +++ b/setup.ml @@ -1,7 +1,7 @@ (* setup.ml generated for the first time by OASIS v0.4.4 *) (* OASIS_START *) -(* DO NOT EDIT (digest: 8965d4f752d8126e982e660646a7ec33) *) +(* DO NOT EDIT (digest: b1a4974dee45e60fe6927115046bac0e) *) (* Regenerated by OASIS v0.4.5 Visit http://oasis.forge.ocamlcore.org for more information and @@ -6903,7 +6903,7 @@ let setup_t = alpha_features = []; beta_features = []; name = "containers"; - version = "0.4.1"; + version = "0.5"; license = OASISLicense.DEP5License (OASISLicense.DEP5Unit @@ -7078,7 +7078,7 @@ let setup_t = lib_pack = false; lib_internal_modules = []; lib_findlib_parent = None; - lib_findlib_name = Some "containers"; + lib_findlib_name = None; lib_findlib_containers = [] }); Library @@ -7940,7 +7940,7 @@ let setup_t = }; oasis_fn = Some "_oasis"; oasis_version = "0.4.5"; - oasis_digest = Some "\191L\228>\028\226\240\230.\000\185\131\240[~4"; + oasis_digest = Some "\189t\006\169y\003\204\136vd\245\216.\188J\140"; oasis_exec = None; oasis_setup_args = []; setup_update = false