add more deprecation comments

This commit is contained in:
Simon Cruanes 2019-12-14 14:04:09 -06:00
parent af4662e962
commit c92a09ac9d
6 changed files with 15 additions and 4 deletions

View file

@ -142,6 +142,7 @@ val find : ('a -> 'b option) -> 'a t -> 'b option
@deprecated since 1.3, use {!find_map} instead.
The version with labels is
@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
(** [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
(** [findi f a] is an alias to {!find_map_i}.
@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
@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
(** [find_idx f a] returns [Some (i,x)] where [x] is the [i]-th element of [a],

View file

@ -140,6 +140,7 @@ val find : f:('a -> 'b option) -> 'a t -> 'b option
@deprecated since 1.3, use {!find_map} instead.
The version with labels is
@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
(** [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
(** [findi ~f a] is an alias to {!find_map_i}.
@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
@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
(** [find_idx ~f a] returns [Some (i,x)] where [x] is the [i]-th element of [a],

View file

@ -20,6 +20,7 @@ val of_int : int -> t
val negate : t -> t
(** Negation on booleans (functional version of [not]).
@deprecated since 1.3, simply use {!not} instead. *)
[@@ocaml.deprecated "use `not` instead"]
type 'a printer = Format.formatter -> 'a -> unit

View file

@ -102,6 +102,7 @@ val of_string : string -> t
(** Alias to {!float_of_string}.
@deprecated since 1.2, use {!of_string_exn} instead.
@raise Failure in case of failure. *)
[@@ocaml.deprecated "use of_string_exn instead"]
val equal_precision : epsilon:t -> t -> t -> bool
(** Equality with allowed error up to a non negative epsilon value. *)

View file

@ -122,6 +122,7 @@ val of_int : int -> t
val of_int_exn : int -> t
(** Alias to {!Int64.of_int}.
@deprecated since 2.1, use {!Int64.of_int} instead. *)
[@@ocaml.deprecated "use Int64.of_int instead"]
val to_int32 : t -> int32
(** 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
(** Alias to {!Int64.of_int32}.
@deprecated since 2.1, use {!Int64.of_int32} instead. *)
[@@ocaml.deprecated "use Int64.of_int32 instead"]
val to_nativeint : t -> nativeint
(** 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
(** Alias to {!Int64.of_nativeint}.
@deprecated since 2.1, use {!Int64.of_nativeint} instead. *)
[@@ocaml.deprecated "use Int64.of_nativeint instead"]
val to_float : t -> float
(** 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
(** Alias to {!Int64.of_float}.
@deprecated since 2.1, use {!Int64.of_float} instead. *)
[@@ocaml.deprecated "use Int64.of_float instead"]
val to_string : t -> string
(** Return the string representation of its argument, in decimal. *)

View file

@ -67,6 +67,7 @@ val sample_without_replacement:
@deprecated use sample_without_duplicates instead
@raise Invalid_argument if [n <= 0].
@since 0.15 *)
[@@ocaml.deprecated "use sample_without_duplicates instead"]
val sample_without_duplicates:
cmp:('a -> 'a -> int) -> int -> 'a t -> 'a list t