mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-07 03:35:30 -05:00
version 0.5
This commit is contained in:
parent
e0a47cba9b
commit
22d9d27c80
13 changed files with 58 additions and 30 deletions
26
CHANGELOG.md
26
CHANGELOG.md
|
|
@ -1,5 +1,31 @@
|
||||||
# Changelog
|
# 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
|
## 0.4.1
|
||||||
|
|
||||||
- `CCOpt.get`
|
- `CCOpt.get`
|
||||||
|
|
|
||||||
9
Makefile
9
Makefile
|
|
@ -77,9 +77,12 @@ QTEST_PREAMBLE='open CCFun;; '
|
||||||
|
|
||||||
qtest-gen: qtest-clean
|
qtest-gen: qtest-clean
|
||||||
@mkdir -p qtest
|
@mkdir -p qtest
|
||||||
@qtest extract --preamble $(QTEST_PREAMBLE) \
|
@if which qtest ; then \
|
||||||
-o qtest/run_qtest.cppo.ml \
|
qtest extract --preamble $(QTEST_PREAMBLE) \
|
||||||
$(QTESTABLE) 2> /dev/null
|
-o qtest/run_qtest.cppo.ml \
|
||||||
|
$(QTESTABLE) 2> /dev/null ; \
|
||||||
|
else touch qtest/run_qtest.cppo.ml ; \
|
||||||
|
fi
|
||||||
|
|
||||||
push-stable:
|
push-stable:
|
||||||
git checkout stable
|
git checkout stable
|
||||||
|
|
|
||||||
3
_oasis
3
_oasis
|
|
@ -1,6 +1,6 @@
|
||||||
OASISFormat: 0.4
|
OASISFormat: 0.4
|
||||||
Name: containers
|
Name: containers
|
||||||
Version: 0.4.1
|
Version: 0.5
|
||||||
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
|
||||||
|
|
@ -49,7 +49,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
|
|
||||||
|
|
||||||
Library "containers_string"
|
Library "containers_string"
|
||||||
Path: string
|
Path: string
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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 *)
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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 *)
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ 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.
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
20
core/META
20
core/META
|
|
@ -1,15 +1,15 @@
|
||||||
# OASIS_START
|
# OASIS_START
|
||||||
# DO NOT EDIT (digest: e4ab50f4ef28e5ea06e4145c3414c218)
|
# DO NOT EDIT (digest: f28449d1761e3b4dfea6c77b24996bbb)
|
||||||
version = "0.4.1"
|
version = "0.5"
|
||||||
description = "A modular standard library focused on data structures."
|
description = "A modular standard library focused on data structures."
|
||||||
requires = "cppo"
|
requires = "bytes"
|
||||||
archive(byte) = "containers.cma"
|
archive(byte) = "containers.cma"
|
||||||
archive(byte, plugin) = "containers.cma"
|
archive(byte, plugin) = "containers.cma"
|
||||||
archive(native) = "containers.cmxa"
|
archive(native) = "containers.cmxa"
|
||||||
archive(native, plugin) = "containers.cmxs"
|
archive(native, plugin) = "containers.cmxs"
|
||||||
exists_if = "containers.cma"
|
exists_if = "containers.cma"
|
||||||
package "thread" (
|
package "thread" (
|
||||||
version = "0.4.1"
|
version = "0.5"
|
||||||
description = "A modular standard library focused on data structures."
|
description = "A modular standard library focused on data structures."
|
||||||
requires = "containers threads"
|
requires = "containers threads"
|
||||||
archive(byte) = "containers_thread.cma"
|
archive(byte) = "containers_thread.cma"
|
||||||
|
|
@ -20,7 +20,7 @@ package "thread" (
|
||||||
)
|
)
|
||||||
|
|
||||||
package "string" (
|
package "string" (
|
||||||
version = "0.4.1"
|
version = "0.5"
|
||||||
description = "A modular standard library focused on data structures."
|
description = "A modular standard library focused on data structures."
|
||||||
archive(byte) = "containers_string.cma"
|
archive(byte) = "containers_string.cma"
|
||||||
archive(byte, plugin) = "containers_string.cma"
|
archive(byte, plugin) = "containers_string.cma"
|
||||||
|
|
@ -30,7 +30,7 @@ package "string" (
|
||||||
)
|
)
|
||||||
|
|
||||||
package "pervasives" (
|
package "pervasives" (
|
||||||
version = "0.4.1"
|
version = "0.5"
|
||||||
description = "A modular standard library focused on data structures."
|
description = "A modular standard library focused on data structures."
|
||||||
requires = "containers"
|
requires = "containers"
|
||||||
archive(byte) = "containers_pervasives.cma"
|
archive(byte) = "containers_pervasives.cma"
|
||||||
|
|
@ -41,7 +41,7 @@ package "pervasives" (
|
||||||
)
|
)
|
||||||
|
|
||||||
package "misc" (
|
package "misc" (
|
||||||
version = "0.4.1"
|
version = "0.5"
|
||||||
description = "A modular standard library focused on data structures."
|
description = "A modular standard library focused on data structures."
|
||||||
requires = "unix containers"
|
requires = "unix containers"
|
||||||
archive(byte) = "containers_misc.cma"
|
archive(byte) = "containers_misc.cma"
|
||||||
|
|
@ -52,7 +52,7 @@ package "misc" (
|
||||||
)
|
)
|
||||||
|
|
||||||
package "lwt" (
|
package "lwt" (
|
||||||
version = "0.4.1"
|
version = "0.5"
|
||||||
description = "A modular standard library focused on data structures."
|
description = "A modular standard library focused on data structures."
|
||||||
requires = "containers lwt lwt.unix containers.misc"
|
requires = "containers lwt lwt.unix containers.misc"
|
||||||
archive(byte) = "containers_lwt.cma"
|
archive(byte) = "containers_lwt.cma"
|
||||||
|
|
@ -63,7 +63,7 @@ package "lwt" (
|
||||||
)
|
)
|
||||||
|
|
||||||
package "cgi" (
|
package "cgi" (
|
||||||
version = "0.4.1"
|
version = "0.5"
|
||||||
description = "A modular standard library focused on data structures."
|
description = "A modular standard library focused on data structures."
|
||||||
requires = "containers CamlGI"
|
requires = "containers CamlGI"
|
||||||
archive(byte) = "containers_cgi.cma"
|
archive(byte) = "containers_cgi.cma"
|
||||||
|
|
@ -74,7 +74,7 @@ package "cgi" (
|
||||||
)
|
)
|
||||||
|
|
||||||
package "advanced" (
|
package "advanced" (
|
||||||
version = "0.4.1"
|
version = "0.5"
|
||||||
description = "A modular standard library focused on data structures."
|
description = "A modular standard library focused on data structures."
|
||||||
requires = "containers"
|
requires = "containers"
|
||||||
archive(byte) = "containers_advanced.cma"
|
archive(byte) = "containers_advanced.cma"
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
8
setup.ml
8
setup.ml
|
|
@ -1,7 +1,7 @@
|
||||||
(* setup.ml generated for the first time by OASIS v0.4.4 *)
|
(* setup.ml generated for the first time by OASIS v0.4.4 *)
|
||||||
|
|
||||||
(* OASIS_START *)
|
(* OASIS_START *)
|
||||||
(* DO NOT EDIT (digest: 8965d4f752d8126e982e660646a7ec33) *)
|
(* DO NOT EDIT (digest: b1a4974dee45e60fe6927115046bac0e) *)
|
||||||
(*
|
(*
|
||||||
Regenerated by OASIS v0.4.5
|
Regenerated by OASIS v0.4.5
|
||||||
Visit http://oasis.forge.ocamlcore.org for more information and
|
Visit http://oasis.forge.ocamlcore.org for more information and
|
||||||
|
|
@ -6903,7 +6903,7 @@ let setup_t =
|
||||||
alpha_features = [];
|
alpha_features = [];
|
||||||
beta_features = [];
|
beta_features = [];
|
||||||
name = "containers";
|
name = "containers";
|
||||||
version = "0.4.1";
|
version = "0.5";
|
||||||
license =
|
license =
|
||||||
OASISLicense.DEP5License
|
OASISLicense.DEP5License
|
||||||
(OASISLicense.DEP5Unit
|
(OASISLicense.DEP5Unit
|
||||||
|
|
@ -7078,7 +7078,7 @@ let setup_t =
|
||||||
lib_pack = false;
|
lib_pack = false;
|
||||||
lib_internal_modules = [];
|
lib_internal_modules = [];
|
||||||
lib_findlib_parent = None;
|
lib_findlib_parent = None;
|
||||||
lib_findlib_name = Some "containers";
|
lib_findlib_name = None;
|
||||||
lib_findlib_containers = []
|
lib_findlib_containers = []
|
||||||
});
|
});
|
||||||
Library
|
Library
|
||||||
|
|
@ -7940,7 +7940,7 @@ let setup_t =
|
||||||
};
|
};
|
||||||
oasis_fn = Some "_oasis";
|
oasis_fn = Some "_oasis";
|
||||||
oasis_version = "0.4.5";
|
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_exec = None;
|
||||||
oasis_setup_args = [];
|
oasis_setup_args = [];
|
||||||
setup_update = false
|
setup_update = false
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue