mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
prepare for 3.9
This commit is contained in:
parent
6a415e963a
commit
249dc3596e
10 changed files with 31 additions and 15 deletions
12
CHANGELOG.md
12
CHANGELOG.md
|
|
@ -1,5 +1,17 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 3.9
|
||||||
|
|
||||||
|
- feat: add `Containers_cbor` module
|
||||||
|
- feat(CCInt32): add popcount function
|
||||||
|
- feat(CCInt64): add `popcount` operation
|
||||||
|
- CCBV:
|
||||||
|
* more extensive test suite
|
||||||
|
* use `bytes` underneath, not an array of integers
|
||||||
|
- add `containers_testlib`, removing qtest and ounit.
|
||||||
|
|
||||||
|
- fix: handle uppercase in string/hex
|
||||||
|
|
||||||
## 3.8
|
## 3.8
|
||||||
|
|
||||||
- add `Containers_bencode` for lightweight (de)ser
|
- add `Containers_bencode` for lightweight (de)ser
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
opam-version: "2.0"
|
opam-version: "2.0"
|
||||||
version: "3.8"
|
version: "3.9"
|
||||||
author: "Simon Cruanes"
|
author: "Simon Cruanes"
|
||||||
maintainer: "simon.cruanes.2007@m4x.org"
|
maintainer: "simon.cruanes.2007@m4x.org"
|
||||||
synopsis: "A set of advanced datatypes for containers"
|
synopsis: "A set of advanced datatypes for containers"
|
||||||
|
|
@ -14,7 +14,8 @@ depends: [
|
||||||
"dune" { >= "2.0" }
|
"dune" { >= "2.0" }
|
||||||
"containers" { = version }
|
"containers" { = version }
|
||||||
"seq"
|
"seq"
|
||||||
"qcheck-core" { with-test }
|
(("ocaml" {with-test & < "4.08"} & "qcheck-core" {>= "0.17" & with-test})
|
||||||
|
| ("ocaml" {with-test & >= "4.08"} & "qcheck-core" {>= "0.18" & with-test}))
|
||||||
"iter" { with-test }
|
"iter" { with-test }
|
||||||
"gen" { with-test }
|
"gen" { with-test }
|
||||||
#"mdx" { with-test & >= "1.5.0" & < "2.0.0" }
|
#"mdx" { with-test & >= "1.5.0" & < "2.0.0" }
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
opam-version: "2.0"
|
opam-version: "2.0"
|
||||||
version: "3.8"
|
version: "3.9"
|
||||||
author: "Simon Cruanes"
|
author: "Simon Cruanes"
|
||||||
maintainer: "simon.cruanes.2007@m4x.org"
|
maintainer: "simon.cruanes.2007@m4x.org"
|
||||||
license: "BSD-2-Clause"
|
license: "BSD-2-Clause"
|
||||||
|
|
@ -16,7 +16,8 @@ depends: [
|
||||||
"dune-configurator"
|
"dune-configurator"
|
||||||
"containers" { = version }
|
"containers" { = version }
|
||||||
"iter" { with-test }
|
"iter" { with-test }
|
||||||
"qcheck-core" { with-test }
|
(("ocaml" {with-test & < "4.08"} & "qcheck-core" {>= "0.17" & with-test})
|
||||||
|
| ("ocaml" {with-test & >= "4.08"} & "qcheck-core" {>= "0.18" & with-test}))
|
||||||
"uutf" { with-test }
|
"uutf" { with-test }
|
||||||
"odoc" { with-doc }
|
"odoc" { with-doc }
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
opam-version: "2.0"
|
opam-version: "2.0"
|
||||||
name: "containers"
|
name: "containers"
|
||||||
version: "3.8"
|
version: "3.9"
|
||||||
author: "Simon Cruanes"
|
author: "Simon Cruanes"
|
||||||
maintainer: "simon.cruanes.2007@m4x.org"
|
maintainer: "simon.cruanes.2007@m4x.org"
|
||||||
license: "BSD-2-Clause"
|
license: "BSD-2-Clause"
|
||||||
|
|
@ -16,7 +16,8 @@ depends: [
|
||||||
"dune-configurator"
|
"dune-configurator"
|
||||||
"seq" # compat
|
"seq" # compat
|
||||||
"either" # compat
|
"either" # compat
|
||||||
"qcheck-core" { >= "0.14" & with-test }
|
(("ocaml" {with-test & < "4.08"} & "qcheck-core" {>= "0.17" & with-test})
|
||||||
|
| ("ocaml" {with-test & >= "4.08"} & "qcheck-core" {>= "0.18" & with-test}))
|
||||||
"yojson" { with-test }
|
"yojson" { with-test }
|
||||||
"iter" { with-test }
|
"iter" { with-test }
|
||||||
"gen" { with-test }
|
"gen" { with-test }
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
{b note} this is only available on OCaml >= 4.08. Below that, the module
|
{b note} this is only available on OCaml >= 4.08. Below that, the module
|
||||||
is empty.
|
is empty.
|
||||||
|
|
||||||
@since NEXT_RELEASE
|
@since 3.9
|
||||||
*)
|
*)
|
||||||
|
|
||||||
type t =
|
type t =
|
||||||
|
|
|
||||||
|
|
@ -9,5 +9,6 @@
|
||||||
(rule
|
(rule
|
||||||
(alias runtest)
|
(alias runtest)
|
||||||
(deps t_appendix_a.exe appendix_a.json)
|
(deps t_appendix_a.exe appendix_a.json)
|
||||||
|
(package containers)
|
||||||
(action
|
(action
|
||||||
(run ./t_appendix_a.exe ./appendix_a.json)))
|
(run ./t_appendix_a.exe ./appendix_a.json)))
|
||||||
|
|
|
||||||
|
|
@ -35,13 +35,13 @@ val map : f:('a -> 'b) -> 'b t -> 'a t
|
||||||
|
|
||||||
val always_eq : _ t
|
val always_eq : _ t
|
||||||
(** Always returns true. All values are equal.
|
(** Always returns true. All values are equal.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.9 *)
|
||||||
|
|
||||||
val never_eq : _ t
|
val never_eq : _ t
|
||||||
(** Always returns false. No values are, so this
|
(** Always returns false. No values are, so this
|
||||||
is not even reflexive (i.e. [x=x] is false).
|
is not even reflexive (i.e. [x=x] is false).
|
||||||
Be careful!
|
Be careful!
|
||||||
@since NEXT_RELEASE *)
|
@since 3.9 *)
|
||||||
|
|
||||||
module Infix : sig
|
module Infix : sig
|
||||||
val ( >|= ) : 'b t -> ('a -> 'b) -> 'a t
|
val ( >|= ) : 'b t -> ('a -> 'b) -> 'a t
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ val pow : t -> t -> t
|
||||||
|
|
||||||
val popcount : t -> int
|
val popcount : t -> int
|
||||||
(** Number of bits set to 1.
|
(** Number of bits set to 1.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.9 *)
|
||||||
|
|
||||||
val floor_div : t -> t -> t
|
val floor_div : t -> t -> t
|
||||||
(** [floor_div x n] is integer division rounding towards negative infinity.
|
(** [floor_div x n] is integer division rounding towards negative infinity.
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ val hash : t -> int
|
||||||
|
|
||||||
val popcount : t -> int
|
val popcount : t -> int
|
||||||
(** Number of bits set to 1.
|
(** Number of bits set to 1.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.9 *)
|
||||||
|
|
||||||
val sign : t -> int
|
val sign : t -> int
|
||||||
(** [sign x] return [0] if [x = 0], [-1] if [x < 0] and [1] if [x > 0].
|
(** [sign x] return [0] if [x = 0], [-1] if [x < 0] and [1] if [x > 0].
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ val create : size:int -> bool -> t
|
||||||
val init : int -> (int -> bool) -> t
|
val init : int -> (int -> bool) -> t
|
||||||
(** [init len f] initializes a bitvector of length [len], where bit [i]
|
(** [init len f] initializes a bitvector of length [len], where bit [i]
|
||||||
is true iff [f i] is.
|
is true iff [f i] is.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.9 *)
|
||||||
|
|
||||||
val copy : t -> t
|
val copy : t -> t
|
||||||
(** Copy of bitvector. *)
|
(** Copy of bitvector. *)
|
||||||
|
|
@ -55,7 +55,7 @@ val resize_minimize_memory : t -> int -> unit
|
||||||
(** Same as {!resize}, but this can also shrink the underlying
|
(** Same as {!resize}, but this can also shrink the underlying
|
||||||
array if this reduces the size.
|
array if this reduces the size.
|
||||||
@raise Invalid_argument on negative sizes.
|
@raise Invalid_argument on negative sizes.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.9 *)
|
||||||
|
|
||||||
val is_empty : t -> bool
|
val is_empty : t -> bool
|
||||||
(** Are there any true bits? *)
|
(** Are there any true bits? *)
|
||||||
|
|
@ -71,7 +71,7 @@ val reset : t -> int -> unit
|
||||||
|
|
||||||
val set_bool : t -> int -> bool -> unit
|
val set_bool : t -> int -> bool -> unit
|
||||||
(** Set or reset [i]-th bit.
|
(** Set or reset [i]-th bit.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.9 *)
|
||||||
|
|
||||||
val flip : t -> int -> unit
|
val flip : t -> int -> unit
|
||||||
(** Flip i-th bit, extending the bitvector if needed. *)
|
(** Flip i-th bit, extending the bitvector if needed. *)
|
||||||
|
|
@ -81,7 +81,7 @@ val clear : t -> unit
|
||||||
|
|
||||||
val clear_and_shrink : t -> unit
|
val clear_and_shrink : t -> unit
|
||||||
(** Set every bit to 0, and set length to 0.
|
(** Set every bit to 0, and set length to 0.
|
||||||
@since NEXT_RELEASE *)
|
@since 3.9 *)
|
||||||
|
|
||||||
val iter : t -> (int -> bool -> unit) -> unit
|
val iter : t -> (int -> bool -> unit) -> unit
|
||||||
(** Iterate on all bits. *)
|
(** Iterate on all bits. *)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue