mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
add more deprecation comments
This commit is contained in:
parent
af4662e962
commit
c92a09ac9d
6 changed files with 15 additions and 4 deletions
|
|
@ -142,6 +142,7 @@ val find : ('a -> 'b option) -> 'a t -> 'b option
|
||||||
@deprecated since 1.3, use {!find_map} instead.
|
@deprecated since 1.3, use {!find_map} instead.
|
||||||
The version with labels is
|
The version with labels is
|
||||||
@deprecated since 2.1, use {!find_map} instead. *)
|
@deprecated since 2.1, use {!find_map} instead. *)
|
||||||
|
[@@ocaml.deprecated "use find_map instead"]
|
||||||
|
|
||||||
val find_map_i : (int -> 'a -> 'b option) -> 'a t -> 'b option
|
val find_map_i : (int -> 'a -> 'b option) -> 'a t -> 'b option
|
||||||
(** [find_map_i f a] is like {!find_map}, but the index of the element is also passed
|
(** [find_map_i f a] is like {!find_map}, but the index of the element is also passed
|
||||||
|
|
@ -152,9 +153,10 @@ val find_map_i : (int -> 'a -> 'b option) -> 'a t -> 'b option
|
||||||
val findi : (int -> 'a -> 'b option) -> 'a t -> 'b option
|
val findi : (int -> 'a -> 'b option) -> 'a t -> 'b option
|
||||||
(** [findi f a] is an alias to {!find_map_i}.
|
(** [findi f a] is an alias to {!find_map_i}.
|
||||||
@since 0.3.4
|
@since 0.3.4
|
||||||
@deprecated since 1.3, use {!find_map} instead.
|
@deprecated since 1.3, use {!find_map_i} instead.
|
||||||
The version with labels is
|
The version with labels is
|
||||||
@deprecated since 2.1, use {!find_map} instead. *)
|
@deprecated since 2.1, use {!find_map_i} instead. *)
|
||||||
|
[@@ocaml.deprecated "use find_map_i instead"]
|
||||||
|
|
||||||
val find_idx : ('a -> bool) -> 'a t -> (int * 'a) option
|
val find_idx : ('a -> bool) -> 'a t -> (int * 'a) option
|
||||||
(** [find_idx f a] returns [Some (i,x)] where [x] is the [i]-th element of [a],
|
(** [find_idx f a] returns [Some (i,x)] where [x] is the [i]-th element of [a],
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,7 @@ val find : f:('a -> 'b option) -> 'a t -> 'b option
|
||||||
@deprecated since 1.3, use {!find_map} instead.
|
@deprecated since 1.3, use {!find_map} instead.
|
||||||
The version with labels is
|
The version with labels is
|
||||||
@deprecated since 2.1, use {!find_map} instead. *)
|
@deprecated since 2.1, use {!find_map} instead. *)
|
||||||
|
[@@ocaml.deprecated "use find_map instead"]
|
||||||
|
|
||||||
val find_map_i : f:(int -> 'a -> 'b option) -> 'a t -> 'b option
|
val find_map_i : f:(int -> 'a -> 'b option) -> 'a t -> 'b option
|
||||||
(** [find_map_i ~f a] is like {!find_map}, but the index of the element is also passed
|
(** [find_map_i ~f a] is like {!find_map}, but the index of the element is also passed
|
||||||
|
|
@ -150,9 +151,10 @@ val find_map_i : f:(int -> 'a -> 'b option) -> 'a t -> 'b option
|
||||||
val findi : f:(int -> 'a -> 'b option) -> 'a t -> 'b option
|
val findi : f:(int -> 'a -> 'b option) -> 'a t -> 'b option
|
||||||
(** [findi ~f a] is an alias to {!find_map_i}.
|
(** [findi ~f a] is an alias to {!find_map_i}.
|
||||||
@since 0.3.4
|
@since 0.3.4
|
||||||
@deprecated since 1.3, use {!find_map} instead.
|
@deprecated since 1.3, use {!find_map_i} instead.
|
||||||
The version with labels is
|
The version with labels is
|
||||||
@deprecated since 2.1, use {!find_map} instead. *)
|
@deprecated since 2.1, use {!find_map_i} instead. *)
|
||||||
|
[@@ocaml.deprecated "use find_map_i instead"]
|
||||||
|
|
||||||
val find_idx : f:('a -> bool) -> 'a t -> (int * 'a) option
|
val find_idx : f:('a -> bool) -> 'a t -> (int * 'a) option
|
||||||
(** [find_idx ~f a] returns [Some (i,x)] where [x] is the [i]-th element of [a],
|
(** [find_idx ~f a] returns [Some (i,x)] where [x] is the [i]-th element of [a],
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ val of_int : int -> t
|
||||||
val negate : t -> t
|
val negate : t -> t
|
||||||
(** Negation on booleans (functional version of [not]).
|
(** Negation on booleans (functional version of [not]).
|
||||||
@deprecated since 1.3, simply use {!not} instead. *)
|
@deprecated since 1.3, simply use {!not} instead. *)
|
||||||
|
[@@ocaml.deprecated "use `not` instead"]
|
||||||
|
|
||||||
type 'a printer = Format.formatter -> 'a -> unit
|
type 'a printer = Format.formatter -> 'a -> unit
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ val of_string : string -> t
|
||||||
(** Alias to {!float_of_string}.
|
(** Alias to {!float_of_string}.
|
||||||
@deprecated since 1.2, use {!of_string_exn} instead.
|
@deprecated since 1.2, use {!of_string_exn} instead.
|
||||||
@raise Failure in case of failure. *)
|
@raise Failure in case of failure. *)
|
||||||
|
[@@ocaml.deprecated "use of_string_exn instead"]
|
||||||
|
|
||||||
val equal_precision : epsilon:t -> t -> t -> bool
|
val equal_precision : epsilon:t -> t -> t -> bool
|
||||||
(** Equality with allowed error up to a non negative epsilon value. *)
|
(** Equality with allowed error up to a non negative epsilon value. *)
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@ val of_int : int -> t
|
||||||
val of_int_exn : int -> t
|
val of_int_exn : int -> t
|
||||||
(** Alias to {!Int64.of_int}.
|
(** Alias to {!Int64.of_int}.
|
||||||
@deprecated since 2.1, use {!Int64.of_int} instead. *)
|
@deprecated since 2.1, use {!Int64.of_int} instead. *)
|
||||||
|
[@@ocaml.deprecated "use Int64.of_int instead"]
|
||||||
|
|
||||||
val to_int32 : t -> int32
|
val to_int32 : t -> int32
|
||||||
(** Convert the given 64-bit integer (type [int64]) to a
|
(** Convert the given 64-bit integer (type [int64]) to a
|
||||||
|
|
@ -136,6 +137,7 @@ val of_int32 : int32 -> t
|
||||||
val of_int32_exn : int32 -> t
|
val of_int32_exn : int32 -> t
|
||||||
(** Alias to {!Int64.of_int32}.
|
(** Alias to {!Int64.of_int32}.
|
||||||
@deprecated since 2.1, use {!Int64.of_int32} instead. *)
|
@deprecated since 2.1, use {!Int64.of_int32} instead. *)
|
||||||
|
[@@ocaml.deprecated "use Int64.of_int32 instead"]
|
||||||
|
|
||||||
val to_nativeint : t -> nativeint
|
val to_nativeint : t -> nativeint
|
||||||
(** Convert the given 64-bit integer (type [int64]) to a
|
(** Convert the given 64-bit integer (type [int64]) to a
|
||||||
|
|
@ -150,6 +152,7 @@ val of_nativeint : nativeint -> t
|
||||||
val of_nativeint_exn : nativeint -> t
|
val of_nativeint_exn : nativeint -> t
|
||||||
(** Alias to {!Int64.of_nativeint}.
|
(** Alias to {!Int64.of_nativeint}.
|
||||||
@deprecated since 2.1, use {!Int64.of_nativeint} instead. *)
|
@deprecated since 2.1, use {!Int64.of_nativeint} instead. *)
|
||||||
|
[@@ocaml.deprecated "use Int64.of_nativeint instead"]
|
||||||
|
|
||||||
val to_float : t -> float
|
val to_float : t -> float
|
||||||
(** Convert the given 64-bit integer to a floating-point number. *)
|
(** Convert the given 64-bit integer to a floating-point number. *)
|
||||||
|
|
@ -165,6 +168,7 @@ val of_float : float -> t
|
||||||
val of_float_exn : float -> t
|
val of_float_exn : float -> t
|
||||||
(** Alias to {!Int64.of_float}.
|
(** Alias to {!Int64.of_float}.
|
||||||
@deprecated since 2.1, use {!Int64.of_float} instead. *)
|
@deprecated since 2.1, use {!Int64.of_float} instead. *)
|
||||||
|
[@@ocaml.deprecated "use Int64.of_float instead"]
|
||||||
|
|
||||||
val to_string : t -> string
|
val to_string : t -> string
|
||||||
(** Return the string representation of its argument, in decimal. *)
|
(** Return the string representation of its argument, in decimal. *)
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ val sample_without_replacement:
|
||||||
@deprecated use sample_without_duplicates instead
|
@deprecated use sample_without_duplicates instead
|
||||||
@raise Invalid_argument if [n <= 0].
|
@raise Invalid_argument if [n <= 0].
|
||||||
@since 0.15 *)
|
@since 0.15 *)
|
||||||
|
[@@ocaml.deprecated "use sample_without_duplicates instead"]
|
||||||
|
|
||||||
val sample_without_duplicates:
|
val sample_without_duplicates:
|
||||||
cmp:('a -> 'a -> int) -> int -> 'a t -> 'a list t
|
cmp:('a -> 'a -> int) -> int -> 'a t -> 'a list t
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue