version 0.5

This commit is contained in:
Simon Cruanes 2014-11-12 00:10:25 +01:00
parent e0a47cba9b
commit 22d9d27c80
13 changed files with 58 additions and 30 deletions

View file

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

View file

@ -77,9 +77,12 @@ QTEST_PREAMBLE='open CCFun;; '
qtest-gen: qtest-clean
@mkdir -p qtest
@qtest extract --preamble $(QTEST_PREAMBLE) \
@if which qtest ; then \
qtest extract --preamble $(QTEST_PREAMBLE) \
-o qtest/run_qtest.cppo.ml \
$(QTESTABLE) 2> /dev/null
$(QTESTABLE) 2> /dev/null ; \
else touch qtest/run_qtest.cppo.ml ; \
fi
push-stable:
git checkout stable

3
_oasis
View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

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
['a option] type, with [module Option = CCOpt].
@since NEXT_RELEASE
@since 0.5
*)
module Array = struct include Array include CCArray end

View file

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