mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
prepare for 0.21
This commit is contained in:
parent
af4c3fc195
commit
c7b815509d
6 changed files with 28 additions and 13 deletions
|
|
@ -1,5 +1,20 @@
|
||||||
= Changelog
|
= Changelog
|
||||||
|
|
||||||
|
== 0.21
|
||||||
|
|
||||||
|
- (breaking) make default `start`/`stop` arguments empty in printers (#82)
|
||||||
|
|
||||||
|
- add `CCFormat.{with_color_sf,fprintf_dyn_color,sprintf_dyn_color}`
|
||||||
|
- add `CCFormat.Dump` for easy debugging (see #82)
|
||||||
|
- add `CCArray.Sub.to_list`
|
||||||
|
- add `CCArray.{sorted,sort_indices,sort_ranking}` (closes #81)
|
||||||
|
|
||||||
|
- handle '\r` in CCSexpM (fixes #83)
|
||||||
|
- add alias `Containers.IO`
|
||||||
|
- bugfixes in `CCArray.Sub`
|
||||||
|
- bugfix + tests for `CCArray.Sub.sub`
|
||||||
|
- disable parallel build to support cygwin
|
||||||
|
|
||||||
== 0.20
|
== 0.20
|
||||||
|
|
||||||
- bugfix in `CCArray.equal`
|
- bugfix in `CCArray.equal`
|
||||||
|
|
|
||||||
2
_oasis
2
_oasis
|
|
@ -1,6 +1,6 @@
|
||||||
OASISFormat: 0.4
|
OASISFormat: 0.4
|
||||||
Name: containers
|
Name: containers
|
||||||
Version: 0.20
|
Version: 0.21
|
||||||
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
|
||||||
|
|
|
||||||
|
|
@ -53,14 +53,14 @@ module type S = sig
|
||||||
|
|
||||||
val sorted : ('a -> 'a -> int) -> 'a t -> 'a array
|
val sorted : ('a -> 'a -> int) -> 'a t -> 'a array
|
||||||
(** [sorted cmp a] makes a copy of [a] and sorts it with [cmp].
|
(** [sorted cmp a] makes a copy of [a] and sorts it with [cmp].
|
||||||
@since NEXT_RELEASE *)
|
@since 0.21 *)
|
||||||
|
|
||||||
val sort_indices : ('a -> 'a -> int) -> 'a t -> int array
|
val sort_indices : ('a -> 'a -> int) -> 'a t -> int array
|
||||||
(** [sort_indices cmp a] returns a new array [b], with the same length as [a],
|
(** [sort_indices cmp a] returns a new array [b], with the same length as [a],
|
||||||
such that [b.(i)] is the index of the [i]-th element of [a] in [sort cmp a].
|
such that [b.(i)] is the index of the [i]-th element of [a] in [sort cmp a].
|
||||||
In other words, [map (fun i -> a.(i)) (sort_indices a) = sorted cmp a].
|
In other words, [map (fun i -> a.(i)) (sort_indices a) = sorted cmp a].
|
||||||
[a] is not modified.
|
[a] is not modified.
|
||||||
@since NEXT_RELEASE *)
|
@since 0.21 *)
|
||||||
|
|
||||||
val sort_ranking : ('a -> 'a -> int) -> 'a t -> int array
|
val sort_ranking : ('a -> 'a -> int) -> 'a t -> int array
|
||||||
(** [sort_ranking cmp a] returns a new array [b], with the same length as [a],
|
(** [sort_ranking cmp a] returns a new array [b], with the same length as [a],
|
||||||
|
|
@ -72,7 +72,7 @@ module type S = sig
|
||||||
|
|
||||||
Without duplicates, we also have
|
Without duplicates, we also have
|
||||||
[lookup_exn a.(i) (sorted a) = (sorted_ranking a).(i)]
|
[lookup_exn a.(i) (sorted a) = (sorted_ranking a).(i)]
|
||||||
@since NEXT_RELEASE *)
|
@since 0.21 *)
|
||||||
|
|
||||||
val find : ('a -> 'b option) -> 'a t -> 'b option
|
val find : ('a -> 'b option) -> 'a t -> 'b option
|
||||||
(** [find f a] returns [Some y] if there is an element [x] such
|
(** [find f a] returns [Some y] if there is an element [x] such
|
||||||
|
|
|
||||||
|
|
@ -55,14 +55,14 @@ module type S = sig
|
||||||
|
|
||||||
val sorted : ('a -> 'a -> int) -> 'a t -> 'a array
|
val sorted : ('a -> 'a -> int) -> 'a t -> 'a array
|
||||||
(** [sorted cmp a] makes a copy of [a] and sorts it with [cmp].
|
(** [sorted cmp a] makes a copy of [a] and sorts it with [cmp].
|
||||||
@since NEXT_RELEASE *)
|
@since 0.21 *)
|
||||||
|
|
||||||
val sort_indices : ('a -> 'a -> int) -> 'a t -> int array
|
val sort_indices : ('a -> 'a -> int) -> 'a t -> int array
|
||||||
(** [sort_indices cmp a] returns a new array [b], with the same length as [a],
|
(** [sort_indices cmp a] returns a new array [b], with the same length as [a],
|
||||||
such that [b.(i)] is the index of the [i]-th element of [a] in [sort cmp a].
|
such that [b.(i)] is the index of the [i]-th element of [a] in [sort cmp a].
|
||||||
In other words, [map (fun i -> a.(i)) (sort_indices a) = sorted cmp a].
|
In other words, [map (fun i -> a.(i)) (sort_indices a) = sorted cmp a].
|
||||||
[a] is not modified.
|
[a] is not modified.
|
||||||
@since NEXT_RELEASE *)
|
@since 0.21 *)
|
||||||
|
|
||||||
val sort_ranking : ('a -> 'a -> int) -> 'a t -> int array
|
val sort_ranking : ('a -> 'a -> int) -> 'a t -> int array
|
||||||
(** [sort_ranking cmp a] returns a new array [b], with the same length as [a],
|
(** [sort_ranking cmp a] returns a new array [b], with the same length as [a],
|
||||||
|
|
@ -74,7 +74,7 @@ module type S = sig
|
||||||
|
|
||||||
Without duplicates, we also have
|
Without duplicates, we also have
|
||||||
[lookup_exn a.(i) (sorted a) = (sorted_ranking a).(i)]
|
[lookup_exn a.(i) (sorted a) = (sorted_ranking a).(i)]
|
||||||
@since NEXT_RELEASE *)
|
@since 0.21 *)
|
||||||
|
|
||||||
val find : ('a -> 'b option) -> 'a t -> 'b option
|
val find : ('a -> 'b option) -> 'a t -> 'b option
|
||||||
(** [find f a] returns [Some y] if there is an element [x] such
|
(** [find f a] returns [Some y] if there is an element [x] such
|
||||||
|
|
@ -249,7 +249,7 @@ module Sub : sig
|
||||||
|
|
||||||
val to_list : 'a t -> 'a list
|
val to_list : 'a t -> 'a list
|
||||||
(** Convert directly to a list
|
(** Convert directly to a list
|
||||||
@since NEXT_RELEASE *)
|
@since 0.21 *)
|
||||||
|
|
||||||
val full : 'a array -> 'a t
|
val full : 'a array -> 'a t
|
||||||
(** Slice that covers the full array *)
|
(** Slice that covers the full array *)
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ val with_color_sf : string -> ('a, t, unit, string) format4 -> 'a
|
||||||
CCFormat.with_color_sf "red" "%a" CCFormat.Dump.(list int) [1;2;3] |> print_endline;;
|
CCFormat.with_color_sf "red" "%a" CCFormat.Dump.(list int) [1;2;3] |> print_endline;;
|
||||||
]}
|
]}
|
||||||
{b status: experimental}
|
{b status: experimental}
|
||||||
@since NEXT_RELEASE *)
|
@since 0.21 *)
|
||||||
|
|
||||||
(** {2 IO} *)
|
(** {2 IO} *)
|
||||||
|
|
||||||
|
|
@ -175,7 +175,7 @@ val sprintf_dyn_color : colors:bool -> ('a, t, unit, string) format4 -> 'a
|
||||||
CCFormat.sprintf_dyn_color ~colors:false "@{<Red>%a@}"
|
CCFormat.sprintf_dyn_color ~colors:false "@{<Red>%a@}"
|
||||||
CCFormat.Dump.(list int) [1;2;3] |> print_endline;;
|
CCFormat.Dump.(list int) [1;2;3] |> print_endline;;
|
||||||
]}
|
]}
|
||||||
@since NEXT_RELEASE *)
|
@since 0.21 *)
|
||||||
|
|
||||||
val fprintf : t -> ('a, t, unit ) format -> 'a
|
val fprintf : t -> ('a, t, unit ) format -> 'a
|
||||||
(** Alias to {!Format.fprintf}
|
(** Alias to {!Format.fprintf}
|
||||||
|
|
@ -183,7 +183,7 @@ val fprintf : t -> ('a, t, unit ) format -> 'a
|
||||||
|
|
||||||
val fprintf_dyn_color : colors:bool -> t -> ('a, t, unit ) format -> 'a
|
val fprintf_dyn_color : colors:bool -> t -> ('a, t, unit ) format -> 'a
|
||||||
(** Similar to {!fprintf} but enable/disable colors depending on [colors]
|
(** Similar to {!fprintf} but enable/disable colors depending on [colors]
|
||||||
@since NEXT_RELEASE *)
|
@since 0.21 *)
|
||||||
|
|
||||||
val ksprintf :
|
val ksprintf :
|
||||||
f:(string -> 'b) ->
|
f:(string -> 'b) ->
|
||||||
|
|
@ -214,7 +214,7 @@ val to_file : string -> ('a, t, unit, unit) format4 -> 'a
|
||||||
[| [1, true; 2, false]; []; [42, false] |];;
|
[| [1, true; 2, false]; []; [42, false] |];;
|
||||||
]}
|
]}
|
||||||
|
|
||||||
@since NEXT_RELEASE *)
|
@since 0.21 *)
|
||||||
|
|
||||||
module Dump : sig
|
module Dump : sig
|
||||||
type 'a t = 'a printer
|
type 'a t = 'a printer
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ module Int64 = CCInt64
|
||||||
(** @since 0.13 *)
|
(** @since 0.13 *)
|
||||||
|
|
||||||
module IO = CCIO
|
module IO = CCIO
|
||||||
(** @since NEXT_RELEASE *)
|
(** @since 0.21 *)
|
||||||
|
|
||||||
module Char = struct
|
module Char = struct
|
||||||
include Char
|
include Char
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue