mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -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
|
||||
|
||||
## 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
|
||||
|
||||
- add `Containers_bencode` for lightweight (de)ser
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
opam-version: "2.0"
|
||||
version: "3.8"
|
||||
version: "3.9"
|
||||
author: "Simon Cruanes"
|
||||
maintainer: "simon.cruanes.2007@m4x.org"
|
||||
synopsis: "A set of advanced datatypes for containers"
|
||||
|
|
@ -14,7 +14,8 @@ depends: [
|
|||
"dune" { >= "2.0" }
|
||||
"containers" { = version }
|
||||
"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 }
|
||||
"gen" { with-test }
|
||||
#"mdx" { with-test & >= "1.5.0" & < "2.0.0" }
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
opam-version: "2.0"
|
||||
version: "3.8"
|
||||
version: "3.9"
|
||||
author: "Simon Cruanes"
|
||||
maintainer: "simon.cruanes.2007@m4x.org"
|
||||
license: "BSD-2-Clause"
|
||||
|
|
@ -16,7 +16,8 @@ depends: [
|
|||
"dune-configurator"
|
||||
"containers" { = version }
|
||||
"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 }
|
||||
"odoc" { with-doc }
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
opam-version: "2.0"
|
||||
name: "containers"
|
||||
version: "3.8"
|
||||
version: "3.9"
|
||||
author: "Simon Cruanes"
|
||||
maintainer: "simon.cruanes.2007@m4x.org"
|
||||
license: "BSD-2-Clause"
|
||||
|
|
@ -16,7 +16,8 @@ depends: [
|
|||
"dune-configurator"
|
||||
"seq" # 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 }
|
||||
"iter" { with-test }
|
||||
"gen" { with-test }
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
{b note} this is only available on OCaml >= 4.08. Below that, the module
|
||||
is empty.
|
||||
|
||||
@since NEXT_RELEASE
|
||||
@since 3.9
|
||||
*)
|
||||
|
||||
type t =
|
||||
|
|
|
|||
|
|
@ -9,5 +9,6 @@
|
|||
(rule
|
||||
(alias runtest)
|
||||
(deps t_appendix_a.exe appendix_a.json)
|
||||
(package containers)
|
||||
(action
|
||||
(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
|
||||
(** Always returns true. All values are equal.
|
||||
@since NEXT_RELEASE *)
|
||||
@since 3.9 *)
|
||||
|
||||
val never_eq : _ t
|
||||
(** Always returns false. No values are, so this
|
||||
is not even reflexive (i.e. [x=x] is false).
|
||||
Be careful!
|
||||
@since NEXT_RELEASE *)
|
||||
@since 3.9 *)
|
||||
|
||||
module Infix : sig
|
||||
val ( >|= ) : 'b t -> ('a -> 'b) -> 'a t
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ val pow : t -> t -> t
|
|||
|
||||
val popcount : t -> int
|
||||
(** Number of bits set to 1.
|
||||
@since NEXT_RELEASE *)
|
||||
@since 3.9 *)
|
||||
|
||||
val floor_div : t -> t -> t
|
||||
(** [floor_div x n] is integer division rounding towards negative infinity.
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ val hash : t -> int
|
|||
|
||||
val popcount : t -> int
|
||||
(** Number of bits set to 1.
|
||||
@since NEXT_RELEASE *)
|
||||
@since 3.9 *)
|
||||
|
||||
val sign : t -> int
|
||||
(** [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
|
||||
(** [init len f] initializes a bitvector of length [len], where bit [i]
|
||||
is true iff [f i] is.
|
||||
@since NEXT_RELEASE *)
|
||||
@since 3.9 *)
|
||||
|
||||
val copy : t -> t
|
||||
(** Copy of bitvector. *)
|
||||
|
|
@ -55,7 +55,7 @@ val resize_minimize_memory : t -> int -> unit
|
|||
(** Same as {!resize}, but this can also shrink the underlying
|
||||
array if this reduces the size.
|
||||
@raise Invalid_argument on negative sizes.
|
||||
@since NEXT_RELEASE *)
|
||||
@since 3.9 *)
|
||||
|
||||
val is_empty : t -> bool
|
||||
(** Are there any true bits? *)
|
||||
|
|
@ -71,7 +71,7 @@ val reset : t -> int -> unit
|
|||
|
||||
val set_bool : t -> int -> bool -> unit
|
||||
(** Set or reset [i]-th bit.
|
||||
@since NEXT_RELEASE *)
|
||||
@since 3.9 *)
|
||||
|
||||
val flip : t -> int -> unit
|
||||
(** Flip i-th bit, extending the bitvector if needed. *)
|
||||
|
|
@ -81,7 +81,7 @@ val clear : t -> unit
|
|||
|
||||
val clear_and_shrink : t -> unit
|
||||
(** Set every bit to 0, and set length to 0.
|
||||
@since NEXT_RELEASE *)
|
||||
@since 3.9 *)
|
||||
|
||||
val iter : t -> (int -> bool -> unit) -> unit
|
||||
(** Iterate on all bits. *)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue