Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromocaml/ocaml

Commitfaab91a

Browse files
edwintorokgasche
authored andcommitted
Documentation: improve@SInCE annotations
Add missing@SInCE annotations for OCaml versions 4.00.0 - 4.05.0,and fix existing annotations as needed:Format.ikprintf: clarify ambiguity on@SInCE 4.0 annotationSeeocaml@b815196Hashtbl.is_randomized and ListLabels.sort_uniq should be@SInCE 4.03List.sort_uniq is 4.02 but ListLabels.sort_uniq is 4.03See:ocaml@512d128ocaml@189d29b
1 parentd08ba72 commitfaab91a

18 files changed

+117
-59
lines changed

‎otherlibs/bigarray/bigarray.mli

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,8 @@ Unix.map_file raises Unix_error."]
453453
similar to those of {!Bigarray.Genarray}, but specialized to the case
454454
of zero-dimensional arrays that only contain a single scalar value.
455455
Statically knowing the number of dimensions of the array allows
456-
faster operations, and more precise static type-checking.*)
456+
faster operations, and more precise static type-checking.
457+
@since 4.05.0*)
457458
moduleArray0 :sig
458459
type('a, 'b, 'c) t
459460
(** The type of zero-dimensional big arrays whose elements have
@@ -554,7 +555,8 @@ module Array1 : sig
554555
(** Extract a scalar (zero-dimensional slice) of the given one-dimensional
555556
big array. The integer parameter is the index of the scalar to
556557
extract. See {!Bigarray.Genarray.slice_left} and
557-
{!Bigarray.Genarray.slice_right} for more details.*)
558+
{!Bigarray.Genarray.slice_right} for more details.
559+
@since 4.05.0*)
558560

559561
externalblit: ('a,'b,'c)t -> ('a,'b,'c)t ->unit
560562
="caml_ba_blit"
@@ -842,7 +844,7 @@ end
842844
externalgenarray_of_array0 :
843845
('a,'b,'c)Array0.t -> ('a,'b,'c)Genarray.t="%identity"
844846
(** Return the generic big array corresponding to the given zero-dimensional
845-
big array.*)
847+
big array.@since 4.05.0*)
846848

847849
externalgenarray_of_array1 :
848850
('a,'b,'c)Array1.t -> ('a,'b,'c)Genarray.t="%identity"
@@ -862,7 +864,8 @@ external genarray_of_array3 :
862864
valarray0_of_genarray : ('a,'b,'c)Genarray.t -> ('a,'b,'c)Array0.t
863865
(** Return the zero-dimensional big array corresponding to the given
864866
generic big array. Raise [Invalid_argument] if the generic big array
865-
does not have exactly zero dimension.*)
867+
does not have exactly zero dimension.
868+
@since 4.05.0*)
866869

867870
valarray1_of_genarray : ('a,'b,'c)Genarray.t -> ('a,'b,'c)Array1.t
868871
(** Return the one-dimensional big array corresponding to the given
@@ -900,7 +903,8 @@ val reshape : ('a, 'b, 'c) Genarray.t -> int array -> ('a, 'b, 'c) Genarray.t
900903

901904
valreshape_0 : ('a,'b,'c)Genarray.t -> ('a,'b,'c)Array0.t
902905
(** Specialized version of {!Bigarray.reshape} for reshaping to
903-
zero-dimensional arrays.*)
906+
zero-dimensional arrays.
907+
@since 4.05.0*)
904908

905909
valreshape_1 : ('a,'b,'c)Genarray.t ->int -> ('a,'b,'c)Array1.t
906910
(** Specialized version of {!Bigarray.reshape} for reshaping to

‎otherlibs/num/big_int.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,4 +273,4 @@ val round_futur_last_digit : bytes -> int -> int -> bool
273273
valapprox_big_int:int ->big_int ->string
274274

275275
valround_big_int_to_float:big_int ->bool ->float
276-
(* @since 4.03.0*)
276+
(** @since 4.03.0*)

‎otherlibs/num/num.mli

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,19 @@ val num_of_string_opt: string -> num option
173173

174174
valint_of_num :num ->int
175175
valint_of_num_opt:num ->intoption
176+
(** @since 4.05.0*)
177+
176178
valnum_of_int :int ->num
177179
valnat_of_num :num ->nat
178180
valnat_of_num_opt:num ->natoption
181+
(** @since 4.05.0*)
182+
179183
valnum_of_nat :nat ->num
180184
valnum_of_big_int :big_int ->num
181185
valbig_int_of_num :num ->big_int
182186
valbig_int_of_num_opt:num ->big_intoption
187+
(** @since 4.05.0*)
188+
183189
valratio_of_num :num ->ratio
184190
valnum_of_ratio :ratio ->num
185191
valfloat_of_num :num ->float

‎otherlibs/unix/unix.mli

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,13 @@ val single_write : file_descr -> bytes -> int -> int -> int
301301

302302
valwrite_substring :file_descr ->string ->int ->int ->int
303303
(** Same as [write], but take the data from a string instead of a byte
304-
sequence.*)
304+
sequence.
305+
@since 4.02.0*)
305306

306307
valsingle_write_substring :file_descr ->string ->int ->int ->int
307308
(** Same as [single_write], but take the data from a string instead of
308-
a byte sequence.*)
309+
a byte sequence.
310+
@since 4.02.0*)
309311

310312
(** {6 Interfacing with the standard input/output library}*)
311313

@@ -513,7 +515,8 @@ val map_file :
513515
file is shrunk.
514516
515517
[Invalid_argument] or [Failure] may be raised in cases where argument
516-
validation fails.*)
518+
validation fails.
519+
@since 4.05.0*)
517520

518521
(** {6 Operations on file names}*)
519522

@@ -822,7 +825,8 @@ val has_symlink : unit -> bool
822825
(** Returns [true] if the user is able to create symbolic links. On Windows,
823826
this indicates that the user not only has the SeCreateSymbolicLinkPrivilege
824827
but is also running elevated, if necessary. On other platforms, this is
825-
simply indicates that the symlink system call is available.*)
828+
simply indicates that the symlink system call is available.
829+
@since 4.03.0*)
826830

827831
valreadlink :string ->string
828832
(** Read the contents of a symbolic link.*)
@@ -1278,7 +1282,8 @@ val send : file_descr -> bytes -> int -> int -> msg_flag list -> int
12781282

12791283
valsend_substring :file_descr ->string ->int ->int ->msg_flaglist ->int
12801284
(** Same as [send], but take the data from a string instead of a byte
1281-
sequence.*)
1285+
sequence.
1286+
@since 4.02.0*)
12821287

12831288
valsendto :
12841289
file_descr ->bytes ->int ->int ->msg_flaglist ->sockaddr ->int
@@ -1287,7 +1292,8 @@ val sendto :
12871292
valsendto_substring :
12881293
file_descr ->string ->int ->int ->msg_flaglist ->sockaddr ->int
12891294
(** Same as [sendto], but take the data from a string instead of a
1290-
byte sequence.*)
1295+
byte sequence.
1296+
@since 4.02.0*)
12911297

12921298

12931299
(** {6 Socket options}*)

‎otherlibs/unix/unixLabels.mli

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,14 @@ val single_write : file_descr -> buf:bytes -> pos:int -> len:int -> int
284284

285285
valwrite_substring :file_descr ->buf:string->pos:int->len:int->int
286286
(** Same as [write], but take the data from a string instead of a byte
287-
sequence.*)
287+
sequence.
288+
@since 4.02.0*)
288289

289290
valsingle_write_substring :
290291
file_descr ->buf:string->pos:int->len:int->int
291292
(** Same as [single_write], but take the data from a string instead of
292-
a byte sequence.*)
293+
a byte sequence.
294+
@since 4.02.0*)
293295

294296
(** {6 Interfacing with the standard input/output library}*)
295297

@@ -630,7 +632,8 @@ val has_symlink : unit -> bool
630632
(** Returns [true] if the user is able to create symbolic links. On Windows,
631633
this indicates that the user not only has the SeCreateSymbolicLinkPrivilege
632634
but is also running elevated, if necessary. On other platforms, this is
633-
simply indicates that the symlink system call is available.*)
635+
simply indicates that the symlink system call is available.
636+
@since 4.03.0*)
634637

635638
valreadlink :string ->string
636639
(** Read the contents of a link.*)
@@ -1035,7 +1038,8 @@ val send :
10351038
valsend_substring :
10361039
file_descr ->buf:string->pos:int->len:int->mode:msg_flaglist ->int
10371040
(** Same as [send], but take the data from a string instead of a byte
1038-
sequence.*)
1041+
sequence.
1042+
@since 4.02.0*)
10391043

10401044
valsendto :
10411045
file_descr ->buf:bytes->pos:int->len:int->mode:msg_flaglist ->
@@ -1046,7 +1050,8 @@ val sendto_substring :
10461050
file_descr ->buf:string->pos:int->len:int->mode:msg_flaglist
10471051
->sockaddr ->int
10481052
(** Same as [sendto], but take the data from a string instead of a
1049-
byte sequence.*)
1053+
byte sequence.
1054+
@since 4.02.0*)
10501055

10511056

10521057

‎stdlib/arg.mli

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ val parse_dynamic :
110110
is to parse command lines of the form:
111111
- command subcommand [options]
112112
where the list of options depends on the value of the subcommand argument.
113+
@since 4.01.0
113114
*)
114115

115116
valparse_argv :?current:intref ->stringarray ->
@@ -130,19 +131,22 @@ val parse_argv_dynamic : ?current:int ref -> string array ->
130131
(** Same as {!Arg.parse_argv}, except that the [speclist] argument is a
131132
reference and may be updated during the parsing.
132133
See {!Arg.parse_dynamic}.
134+
@since 4.01.0
133135
*)
134136

135137
valparse_and_expand_argv_dynamic :intref ->stringarrayref ->
136138
(key*spec*doc)listref ->anon_fun ->string ->unit
137139
(** Same as {!Arg.parse_argv_dynamic}, except that the [argv] argument is a
138140
reference and may be updated during the parsing of [Expand] arguments.
139141
See {!Arg.parse_argv_dynamic}.
142+
@since 4.05.0
140143
*)
141144

142145
valparse_expand:
143146
(key*spec*doc)list ->anon_fun ->usage_msg ->unit
144147
(** Same as {!Arg.parse}, except that the [Expand] arguments are allowed and
145148
the {!current} reference is not updated.
149+
@since 4.05.0
146150
*)
147151

148152
exceptionHelp ofstring
@@ -182,17 +186,22 @@ val current : int ref
182186

183187
valread_arg:string ->stringarray
184188
(** [Arg.read_arg file] reads newline-terminated command line arguments from
185-
file [file].*)
189+
file [file].
190+
@since 4.05.0*)
186191

187192
valread_arg0:string ->stringarray
188193
(** Identical to {!Arg.read_arg} but assumes null character terminated command line
189-
arguments.*)
194+
arguments.
195+
@since 4.05.0*)
196+
190197

191198
valwrite_arg:string ->stringarray ->unit
192199
(** [Arg.write_arg file args] writes the arguments [args] newline-terminated
193200
into the file [file]. If the any of the arguments in [args] contains a
194-
newline, use {!Arg.write_arg0} instead.*)
201+
newline, use {!Arg.write_arg0} instead.
202+
@since 4.05.0*)
195203

196204
valwrite_arg0:string ->stringarray ->unit
197205
(** Identical to {!Arg.write_arg} but uses the null character for terminator
198-
instead of newline.*)
206+
instead of newline.
207+
@since 4.05.0*)

‎stdlib/arrayLabels.mli

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,14 @@ val iter2 : f:('a -> 'b -> unit) -> 'a array -> 'b array -> unit
165165
(** [Array.iter2 f a b] applies function [f] to all the elements of [a]
166166
and [b].
167167
Raise [Invalid_argument] if the arrays are not the same size.
168-
@since 4.03.0*)
168+
@since 4.05.0*)
169169

170170
valmap2 :f:('a->'b ->'c) ->'aarray ->'barray ->'carray
171171
(** [Array.map2 f a b] applies function [f] to all the elements of [a]
172172
and [b], and builds an array with the results returned by [f]:
173173
[[| f a.(0) b.(0); ...; f a.(Array.length a - 1) b.(Array.length b - 1)|]].
174174
Raise [Invalid_argument] if the arrays are not the same size.
175-
@since 4.03.0*)
175+
@since 4.05.0*)
176176

177177

178178
(** {6 Array scanning}*)
@@ -181,20 +181,24 @@ val map2 : f:('a -> 'b -> 'c) -> 'a array -> 'b array -> 'c array
181181
valexists :f:('a->bool) ->'aarray ->bool
182182
(** [Array.exists p [|a1; ...; an|]] checks if at least one element of
183183
the array satisfies the predicate [p]. That is, it returns
184-
[(p a1) || (p a2) || ... || (p an)].*)
184+
[(p a1) || (p a2) || ... || (p an)].
185+
@since 4.03.0*)
185186

186187
valfor_all :f:('a->bool) ->'aarray ->bool
187188
(** [Array.for_all p [|a1; ...; an|]] checks if all elements of the array
188189
satisfy the predicate [p]. That is, it returns
189-
[(p a1) && (p a2) && ... && (p an)].*)
190+
[(p a1) && (p a2) && ... && (p an)].
191+
@since 4.03.0*)
190192

191193
valmem :'a ->set:'aarray ->bool
192194
(** [mem x a] is true if and only if [x] is equal
193-
to an element of [a].*)
195+
to an element of [a].
196+
@since 4.03.0*)
194197

195198
valmemq :'a ->set:'aarray ->bool
196199
(** Same as {!Array.mem}, but uses physical equality instead of structural
197-
equality to compare list elements.*)
200+
equality to compare list elements.
201+
@since 4.03.0*)
198202

199203
externalcreate_float:int ->floatarray="caml_make_float_vect"
200204
(** [Array.create_float n] returns a fresh float array of length [n],

‎stdlib/buffer.mli

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,5 @@ val output_buffer : out_channel -> t -> unit
135135
valtruncate :t ->int ->unit
136136
(** [truncate b len] truncates the length of [b] to [len]
137137
Note: the internal byte sequence is not shortened.
138-
Raise [Invalid_argument] if [len < 0] or [len > length b].*)
138+
Raise [Invalid_argument] if [len < 0] or [len > length b].
139+
@since 4.05.0*)

‎stdlib/bytesLabels.mli

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ val extend : bytes -> left:int -> right:int -> bytes
8484
the corresponding side of [s].
8585
8686
Raise [Invalid_argument] if the result length is negative or
87-
longer than {!Sys.max_string_length} bytes.*)
87+
longer than {!Sys.max_string_length} bytes.
88+
@since 4.05.0*)
8889

8990
valfill :bytes ->pos:int->len:int->char ->unit
9091
(** [fill s start len c] modifies [s] in place, replacing [len]
@@ -115,7 +116,8 @@ val blit_string :
115116
116117
Raise [Invalid_argument] if [srcoff] and [len] do not
117118
designate a valid range of [src], or if [dstoff] and [len]
118-
do not designate a valid range of [dst].*)
119+
do not designate a valid range of [dst].
120+
@since 4.05.0*)
119121

120122
valconcat :sep:bytes->byteslist ->bytes
121123
(** [concat sep sl] concatenates the list of byte sequences [sl],
@@ -127,7 +129,8 @@ val cat : bytes -> bytes -> bytes
127129
as new byte sequence.
128130
129131
Raise [Invalid_argument] if the result is longer than
130-
{!Sys.max_string_length} bytes.*)
132+
{!Sys.max_string_length} bytes.
133+
@since 4.05.0*)
131134

132135
valiter :f:(char->unit) ->bytes ->unit
133136
(** [iter f s] applies function [f] in turn to all the bytes of [s].
@@ -259,22 +262,22 @@ val uncapitalize : bytes -> bytes
259262
valuppercase_ascii :bytes ->bytes
260263
(** Return a copy of the argument, with all lowercase letters
261264
translated to uppercase, using the US-ASCII character set.
262-
@since 4.03.0*)
265+
@since 4.05.0*)
263266

264267
vallowercase_ascii :bytes ->bytes
265268
(** Return a copy of the argument, with all uppercase letters
266269
translated to lowercase, using the US-ASCII character set.
267-
@since 4.03.0*)
270+
@since 4.05.0*)
268271

269272
valcapitalize_ascii :bytes ->bytes
270273
(** Return a copy of the argument, with the first character set to uppercase,
271274
using the US-ASCII character set.
272-
@since 4.03.0*)
275+
@since 4.05.0*)
273276

274277
valuncapitalize_ascii :bytes ->bytes
275278
(** Return a copy of the argument, with the first character set to lowercase,
276279
using the US-ASCII character set.
277-
@since 4.03.0*)
280+
@since 4.05.0*)
278281

279282
typet=bytes
280283
(** An alias for the type of byte sequences.*)
@@ -287,7 +290,7 @@ val compare: t -> t -> int
287290

288291
valequal:t ->t ->bool
289292
(** The equality function for byte sequences.
290-
@since 4.03.0*)
293+
@since 4.05.0*)
291294

292295
(**/**)
293296

‎stdlib/ephemeron.mli

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
Ephemerons are defined in a language agnostic way in this paper:
6565
B. Hayes, Ephemerons: a New Finalization Mechanism, OOPSLA'9
6666
67+
@since 4.03.0
6768
*)
6869

6970
module typeS=sig

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp