Skip to content

Commit 18c9f88

Browse files
committed
prepare for 1.5
1 parent 7f6cb0f commit 18c9f88

File tree

13 files changed

+68
-46
lines changed

13 files changed

+68
-46
lines changed

CHANGELOG.adoc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
= Changelog
22

3+
== 1.5
4+
5+
- have `CCList.{get,insert,set}_at_idx` work with negative indices
6+
- Add CCCache.add
7+
- missing function in `CCListLabels`
8+
- Allow negative indexes in CCList.remove_at_idx
9+
- add an optional `drop` parameter to string-splitting functions
10+
- add `Hash.const0` for trivial hash function that ignores its input
11+
- improve compatibility with the stdlib
12+
- Add List.count
13+
- Add String.is_empty
14+
- add missing compatibility functions: `{assoc_opt,assq_opt}`
15+
- backport some functions added in 4.05 in `CCList`
16+
- add functions from 4.05 into `CC{Map,Set}`
17+
- Implement `CCImmutArray.sub`
18+
- bugfix in `CCTrie.Make`: Remove polymorphic comparison
19+
20+
- remove dependency on cppo
21+
- add travis support
22+
- update doc of `CCList.cartesian_product`, which returns results in unspecified order (close #154)
23+
- fix containers.top (closes #155)
24+
325
== 1.4
426

527
- add `CCMap.union`

_oasis

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
OASISFormat: 0.4
22
Name: containers
3-
Version: 1.4
3+
Version: 1.5
44
Homepage: https://github.com/c-cube/ocaml-containers
55
Authors: Simon Cruanes
66
License: BSD-2-clause

src/core/CCHash.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ val const0 : _ t
1818
(** Always return 0. Useful for ignoring elements.
1919
Example: [Hash.(pair string const0)] will map pairs [("a", 1)]
2020
and [("a", 2)] to the same hash, but not the same as [("b", 1)]
21-
@since NEXT_RELEASE *)
21+
@since 1.5 *)
2222

2323
val int : int t
2424
val bool : bool t

src/core/CCList.mli

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ val fold_flat_map : ('acc -> 'a -> 'acc * 'b list) -> 'acc -> 'a list -> 'acc *
7878

7979
val count : ('a -> bool) -> 'a list -> int
8080
(** [count f l] counts how much element of [l] comply with the function [f].
81-
@since NEXT_RELEASE *)
81+
@since 1.5 *)
8282

8383
val init : int -> (int -> 'a) -> 'a t
8484
(** Similar to {!Array.init}
@@ -103,11 +103,11 @@ val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
103103

104104
val compare_lengths : 'a t -> 'b t -> int
105105
(** equivalent to [compare (length l1) (length l2)] but more efficient.
106-
@since NEXT_RELEASE *)
106+
@since 1.5 *)
107107

108108
val compare_length_with : 'a t -> int -> int
109109
(** equivalent to [compare (length l) x] but more efficient.
110-
@since NEXT_RELEASE *)
110+
@since 1.5 *)
111111

112112
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
113113

@@ -239,7 +239,7 @@ val find_pred : ('a -> bool) -> 'a t -> 'a option
239239

240240
val find_opt : ('a -> bool) -> 'a t -> 'a option
241241
(** Safe version of {!find}
242-
@since NEXT_RELEASE *)
242+
@since 1.5 *)
243243

244244
val find_pred_exn : ('a -> bool) -> 'a t -> 'a
245245
(** Unsafe version of {!find_pred}
@@ -346,7 +346,7 @@ val get_at_idx : int -> 'a t -> 'a option
346346
val nth_opt : 'a t -> int -> 'a option
347347
(** Safe version of {!nth}.
348348
@raise Invalid_argument if the int is negative.
349-
@since NEXT_RELEASE *)
349+
@since 1.5 *)
350350

351351
val get_at_idx_exn : int -> 'a t -> 'a
352352
(** Get the i-th element, or
@@ -466,11 +466,11 @@ end
466466

467467
val assoc_opt : 'a -> ('a * 'b) t -> 'b option
468468
(** Safe version of {!assoc}
469-
@since NEXT_RELEASE *)
469+
@since 1.5 *)
470470

471471
val assq_opt : 'a -> ('a * 'b) t -> 'b option
472472
(** Safe version of {!assq}
473-
@since NEXT_RELEASE *)
473+
@since 1.5 *)
474474

475475
(** {2 References on Lists}
476476
@since 0.3.3 *)

src/core/CCListLabels.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ val sublists_of_len :
109109
110110
See {!CCList.sublists_of_len} for more details.
111111
112-
@since NEXT_RELEASE *)
112+
@since 1.5 *)
113113

114114
val pure : 'a -> 'a t
115115

src/core/CCMap.ml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,28 @@ module type S = sig
2727

2828
val choose_opt : 'a t -> (key * 'a) option
2929
(** Safe version of {!choose}
30-
@since NEXT_RELEASE *)
30+
@since 1.5 *)
3131

3232
val min_binding_opt : 'a t -> (key * 'a) option
3333
(** Safe version of {!min_binding}
34-
@since NEXT_RELEASE *)
34+
@since 1.5 *)
3535

3636
val max_binding_opt : 'a t -> (key * 'a) option
3737
(** Safe version of {!max_binding}
38-
@since NEXT_RELEASE *)
38+
@since 1.5 *)
3939

4040
val find_opt : key -> 'a t -> 'a option
4141
(** Safe version of {!find}
42-
@since NEXT_RELEASE *)
42+
@since 1.5 *)
4343

4444
val find_first : (key -> bool) -> 'a t -> key * 'a
4545
(** Find smallest binding satisfying the monotonic predicate.
4646
See {!Map.S.find_first}.
47-
@since NEXT_RELEASE *)
47+
@since 1.5 *)
4848

4949
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
5050
(** Safe version of {!find_first}
51-
@since NEXT_RELEASE *)
51+
@since 1.5 *)
5252

5353
val merge_safe :
5454
f:(key -> [`Left of 'a | `Right of 'b | `Both of 'a * 'b] -> 'c option) ->

src/core/CCMap.mli

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type 'a sequence = ('a -> unit) -> unit
1010
type 'a printer = Format.formatter -> 'a -> unit
1111

1212
module type OrderedType = Map.OrderedType
13-
(** @since NEXT_RELEASE *)
13+
(** @since 1.5 *)
1414

1515
module type S = sig
1616
include Map.S
@@ -31,28 +31,28 @@ module type S = sig
3131

3232
val choose_opt : 'a t -> (key * 'a) option
3333
(** Safe version of {!choose}
34-
@since NEXT_RELEASE *)
34+
@since 1.5 *)
3535

3636
val min_binding_opt : 'a t -> (key * 'a) option
3737
(** Safe version of {!min_binding}
38-
@since NEXT_RELEASE *)
38+
@since 1.5 *)
3939

4040
val max_binding_opt : 'a t -> (key * 'a) option
4141
(** Safe version of {!max_binding}
42-
@since NEXT_RELEASE *)
42+
@since 1.5 *)
4343

4444
val find_opt : key -> 'a t -> 'a option
4545
(** Safe version of {!find}
46-
@since NEXT_RELEASE *)
46+
@since 1.5 *)
4747

4848
val find_first : (key -> bool) -> 'a t -> key * 'a
4949
(** Find smallest binding satisfying the monotonic predicate.
5050
See {!Map.S.find_first}.
51-
@since NEXT_RELEASE *)
51+
@since 1.5 *)
5252

5353
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
5454
(** Safe version of {!find_first}
55-
@since NEXT_RELEASE *)
55+
@since 1.5 *)
5656

5757
val merge_safe :
5858
f:(key -> [`Left of 'a | `Right of 'b | `Both of 'a * 'b] -> 'c option) ->

src/core/CCResult.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type 'a printer = Format.formatter -> 'a -> unit
1515
(** {2 Basics} *)
1616

1717
include module type of Result
18-
(** @since NEXT_RELEASE *)
18+
(** @since 1.5 *)
1919

2020
type (+'good, +'bad) t = ('good, 'bad) Result.result =
2121
| Ok of 'good

src/core/CCSet.ml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,35 @@ module type S = sig
1313

1414
val min_elt_opt : t -> elt option
1515
(** Safe version of {!min_elt}
16-
@since NEXT_RELEASE *)
16+
@since 1.5 *)
1717

1818
val max_elt_opt : t -> elt option
1919
(** Safe version of {!max_elt}
20-
@since NEXT_RELEASE *)
20+
@since 1.5 *)
2121

2222
val choose_opt : t -> elt option
2323
(** Safe version of {!choose}
24-
@since NEXT_RELEASE *)
24+
@since 1.5 *)
2525

2626
val find_opt : elt -> t -> elt option
2727
(** Safe version of {!find}
28-
@since NEXT_RELEASE *)
28+
@since 1.5 *)
2929

3030
val find_first : (elt -> bool) -> t -> elt
3131
(** Find minimum element satisfying predicate
32-
@since NEXT_RELEASE *)
32+
@since 1.5 *)
3333

3434
val find_first_opt : (elt -> bool) -> t -> elt option
3535
(** Safe version of {!find_first}
36-
@since NEXT_RELEASE *)
36+
@since 1.5 *)
3737

3838
val find_last : (elt -> bool) -> t -> elt
3939
(** Find maximum element satisfying predicate
40-
@since NEXT_RELEASE *)
40+
@since 1.5 *)
4141

4242
val find_last_opt : (elt -> bool) -> t -> elt option
4343
(** Safe version of {!find_last}
44-
@since NEXT_RELEASE *)
44+
@since 1.5 *)
4545

4646
val of_seq : elt sequence -> t
4747

src/core/CCSet.mli

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,42 +9,42 @@ type 'a sequence = ('a -> unit) -> unit
99
type 'a printer = Format.formatter -> 'a -> unit
1010

1111
module type OrderedType = Set.OrderedType
12-
(** @since NEXT_RELEASE *)
12+
(** @since 1.5 *)
1313

1414
module type S = sig
1515
include Set.S
1616

1717
val min_elt_opt : t -> elt option
1818
(** Safe version of {!min_elt}
19-
@since NEXT_RELEASE *)
19+
@since 1.5 *)
2020

2121
val max_elt_opt : t -> elt option
2222
(** Safe version of {!max_elt}
23-
@since NEXT_RELEASE *)
23+
@since 1.5 *)
2424

2525
val choose_opt : t -> elt option
2626
(** Safe version of {!choose}
27-
@since NEXT_RELEASE *)
27+
@since 1.5 *)
2828

2929
val find_opt : elt -> t -> elt option
3030
(** Safe version of {!find}
31-
@since NEXT_RELEASE *)
31+
@since 1.5 *)
3232

3333
val find_first : (elt -> bool) -> t -> elt
3434
(** Find minimum element satisfying predicate
35-
@since NEXT_RELEASE *)
35+
@since 1.5 *)
3636

3737
val find_first_opt : (elt -> bool) -> t -> elt option
3838
(** Safe version of {!find_first}
39-
@since NEXT_RELEASE *)
39+
@since 1.5 *)
4040

4141
val find_last : (elt -> bool) -> t -> elt
4242
(** Find maximum element satisfying predicate
43-
@since NEXT_RELEASE *)
43+
@since 1.5 *)
4444

4545
val find_last_opt : (elt -> bool) -> t -> elt option
4646
(** Safe version of {!find_last}
47-
@since NEXT_RELEASE *)
47+
@since 1.5 *)
4848

4949
val of_seq : elt sequence -> t
5050

0 commit comments

Comments
 (0)