prepare for 0.21

This commit is contained in:
Simon Cruanes 2016-11-03 16:04:12 +01:00
parent af4c3fc195
commit c7b815509d
6 changed files with 28 additions and 13 deletions

View file

@ -1,5 +1,20 @@
= 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
- bugfix in `CCArray.equal`

2
_oasis
View file

@ -1,6 +1,6 @@
OASISFormat: 0.4
Name: containers
Version: 0.20
Version: 0.21
Homepage: https://github.com/c-cube/ocaml-containers
Authors: Simon Cruanes
License: BSD-2-clause

View file

@ -53,14 +53,14 @@ module type S = sig
val sorted : ('a -> 'a -> int) -> 'a t -> 'a array
(** [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
(** [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].
In other words, [map (fun i -> a.(i)) (sort_indices a) = sorted cmp a].
[a] is not modified.
@since NEXT_RELEASE *)
@since 0.21 *)
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],
@ -72,7 +72,7 @@ module type S = sig
Without duplicates, we also have
[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
(** [find f a] returns [Some y] if there is an element [x] such

View file

@ -55,14 +55,14 @@ module type S = sig
val sorted : ('a -> 'a -> int) -> 'a t -> 'a array
(** [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
(** [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].
In other words, [map (fun i -> a.(i)) (sort_indices a) = sorted cmp a].
[a] is not modified.
@since NEXT_RELEASE *)
@since 0.21 *)
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],
@ -74,7 +74,7 @@ module type S = sig
Without duplicates, we also have
[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
(** [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
(** Convert directly to a list
@since NEXT_RELEASE *)
@since 0.21 *)
val full : 'a array -> 'a t
(** Slice that covers the full array *)

View file

@ -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;;
]}
{b status: experimental}
@since NEXT_RELEASE *)
@since 0.21 *)
(** {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.Dump.(list int) [1;2;3] |> print_endline;;
]}
@since NEXT_RELEASE *)
@since 0.21 *)
val fprintf : t -> ('a, t, unit ) format -> 'a
(** 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
(** Similar to {!fprintf} but enable/disable colors depending on [colors]
@since NEXT_RELEASE *)
@since 0.21 *)
val ksprintf :
f:(string -> 'b) ->
@ -214,7 +214,7 @@ val to_file : string -> ('a, t, unit, unit) format4 -> 'a
[| [1, true; 2, false]; []; [42, false] |];;
]}
@since NEXT_RELEASE *)
@since 0.21 *)
module Dump : sig
type 'a t = 'a printer

View file

@ -82,7 +82,7 @@ module Int64 = CCInt64
(** @since 0.13 *)
module IO = CCIO
(** @since NEXT_RELEASE *)
(** @since 0.21 *)
module Char = struct
include Char