~npalix/coccinelle/upstream

« back to all changes in this revision

Viewing changes to bundles/stdcompat/stdcompat-8/stdcompat__hashtbl_s.mli.in

  • Committer: Thierry Martinez
  • Date: 2019-08-20 13:37:04 UTC
  • Revision ID: git-v1:0214afad4a32c95349c2c5a38e37cea407c455d0
Update bundles

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
module type S = sig
2
 
type ('a, 'b) t = ('a, 'b) Hashtbl.t
3
 
(** Alias for {!Hashtbl.t} *)
4
 
 
5
 
@BEGIN_FROM_4_00_0@
6
 
type statistics = Hashtbl.statistics =
7
 
  {
8
 
  num_bindings: int ;
9
 
  num_buckets: int ;
10
 
  max_bucket_length: int ;
11
 
  bucket_histogram: int array }
12
 
@END_FROM_4_00_0@
13
 
@BEGIN_BEFORE_4_00_0@
14
 
type statistics = Stdcompat__hashtbl_ext.statistics =
15
 
  {
16
 
  num_bindings: int ;
17
 
  num_buckets: int ;
18
 
  max_bucket_length: int ;
19
 
  bucket_histogram: int array }
20
 
@END_BEFORE_4_00_0@
21
 
(** @since 4.00.0:
22
 
    type statistics =
23
 
      {
24
 
      num_bindings: int ;
25
 
      num_buckets: int ;
26
 
      max_bucket_length: int ;
27
 
      bucket_histogram: int array }
28
 
 *)
29
 
 
30
 
module type HashedType  =
31
 
  sig type t val equal : t -> t -> bool val hash : t -> int end
32
 
(** Alias for {!Hashtbl.HashedType} *)
33
 
 
34
 
@BEGIN_FROM_4_07_0@
35
 
module type S  =
36
 
  sig
37
 
    type key
38
 
    type 'a t
39
 
    val create : int -> 'a t
40
 
    val clear : 'a t -> unit
41
 
    val reset : 'a t -> unit
42
 
    val copy : 'a t -> 'a t
43
 
    val add : 'a t -> key -> 'a -> unit
44
 
    val remove : 'a t -> key -> unit
45
 
    val find : 'a t -> key -> 'a
46
 
    val find_opt : 'a t -> key -> 'a option
47
 
    val find_all : 'a t -> key -> 'a list
48
 
    val replace : 'a t -> key -> 'a -> unit
49
 
    val mem : 'a t -> key -> bool
50
 
    val iter : (key -> 'a -> unit) -> 'a t -> unit
51
 
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
52
 
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
53
 
    val length : 'a t -> int
54
 
    val stats : 'a t -> statistics
55
 
    val to_seq : 'a t -> (key * 'a) Seq.t
56
 
    val to_seq_keys : 'a t -> key Seq.t
57
 
    val to_seq_values : 'a t -> 'a Seq.t
58
 
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
59
 
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
60
 
    val of_seq : (key * 'a) Seq.t -> 'a t
61
 
  end
62
 
@END_FROM_4_07_0@
63
 
@BEGIN_BEFORE_4_07_0@
64
 
module type S  =
65
 
  sig
66
 
    type key
67
 
    type 'a t
68
 
    val create : int -> 'a t
69
 
    val clear : 'a t -> unit
70
 
    val reset : 'a t -> unit
71
 
    val copy : 'a t -> 'a t
72
 
    val add : 'a t -> key -> 'a -> unit
73
 
    val remove : 'a t -> key -> unit
74
 
    val find : 'a t -> key -> 'a
75
 
    val find_opt : 'a t -> key -> 'a option
76
 
    val find_all : 'a t -> key -> 'a list
77
 
    val replace : 'a t -> key -> 'a -> unit
78
 
    val mem : 'a t -> key -> bool
79
 
    val iter : (key -> 'a -> unit) -> 'a t -> unit
80
 
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
81
 
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
82
 
    val length : 'a t -> int
83
 
    val stats : 'a t -> statistics
84
 
    val to_seq : 'a t -> (key * 'a) Stdcompat__seq.t
85
 
    val to_seq_keys : 'a t -> key Stdcompat__seq.t
86
 
    val to_seq_values : 'a t -> 'a Stdcompat__seq.t
87
 
    val add_seq : 'a t -> (key * 'a) Stdcompat__seq.t -> unit
88
 
    val replace_seq : 'a t -> (key * 'a) Stdcompat__seq.t -> unit
89
 
    val of_seq : (key * 'a) Stdcompat__seq.t -> 'a t
90
 
  end
91
 
@END_BEFORE_4_07_0@
92
 
(** @since 4.07.0:
93
 
    module type S  =
94
 
      sig
95
 
        type key
96
 
        type 'a t
97
 
        val create : int -> 'a t
98
 
        val clear : 'a t -> unit
99
 
        val reset : 'a t -> unit
100
 
        val copy : 'a t -> 'a t
101
 
        val add : 'a t -> key -> 'a -> unit
102
 
        val remove : 'a t -> key -> unit
103
 
        val find : 'a t -> key -> 'a
104
 
        val find_opt : 'a t -> key -> 'a option
105
 
        val find_all : 'a t -> key -> 'a list
106
 
        val replace : 'a t -> key -> 'a -> unit
107
 
        val mem : 'a t -> key -> bool
108
 
        val iter : (key -> 'a -> unit) -> 'a t -> unit
109
 
        val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
110
 
        val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
111
 
        val length : 'a t -> int
112
 
        val stats : 'a t -> statistics
113
 
        val to_seq : 'a t -> (key * 'a) Seq.t
114
 
        val to_seq_keys : 'a t -> key Seq.t
115
 
        val to_seq_values : 'a t -> 'a Seq.t
116
 
        val add_seq : 'a t -> (key * 'a) Seq.t -> unit
117
 
        val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
118
 
        val of_seq : (key * 'a) Seq.t -> 'a t
119
 
      end
120
 
 *)
121
 
 
122
 
@BEGIN_FROM_4_07_0@
123
 
module Make = Hashtbl.Make
124
 
@END_FROM_4_07_0@
125
 
@BEGIN_BEFORE_4_07_0@
126
 
module Make :
127
 
functor (H : HashedType) ->
128
 
  sig
129
 
    type key = H.t
130
 
    type 'a t = 'a Hashtbl.Make(H).t
131
 
    val create : int -> 'a t
132
 
    val clear : 'a t -> unit
133
 
    val reset : 'a t -> unit
134
 
    val copy : 'a t -> 'a t
135
 
    val add : 'a t -> key -> 'a -> unit
136
 
    val remove : 'a t -> key -> unit
137
 
    val find : 'a t -> key -> 'a
138
 
    val find_opt : 'a t -> key -> 'a option
139
 
    val find_all : 'a t -> key -> 'a list
140
 
    val replace : 'a t -> key -> 'a -> unit
141
 
    val mem : 'a t -> key -> bool
142
 
    val iter : (key -> 'a -> unit) -> 'a t -> unit
143
 
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
144
 
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
145
 
    val length : 'a t -> int
146
 
    val stats : 'a t -> statistics
147
 
    val to_seq : 'a t -> (key * 'a) Stdcompat__seq.t
148
 
    val to_seq_keys : 'a t -> key Stdcompat__seq.t
149
 
    val to_seq_values : 'a t -> 'a Stdcompat__seq.t
150
 
    val add_seq : 'a t -> (key * 'a) Stdcompat__seq.t -> unit
151
 
    val replace_seq : 'a t -> (key * 'a) Stdcompat__seq.t -> unit
152
 
    val of_seq : (key * 'a) Stdcompat__seq.t -> 'a t
153
 
  end
154
 
@END_BEFORE_4_07_0@
155
 
(** @since 4.07.0: module Make = Hashtbl.Make
156
 
 *)
157
 
 
158
 
@BEGIN_FROM_4_00_0@
159
 
module type SeededHashedType  =
160
 
  sig type t val equal : t -> t -> bool val hash : int -> t -> int end
161
 
@END_FROM_4_00_0@
162
 
@BEGIN_BEFORE_4_00_0@
163
 
module type SeededHashedType  =
164
 
  sig type t val equal : t -> t -> bool val hash : int -> t -> int end
165
 
@END_BEFORE_4_00_0@
166
 
(** @since 4.00.0:
167
 
    module type SeededHashedType  =
168
 
      sig type t val equal : t -> t -> bool val hash : int -> t -> int end
169
 
 *)
170
 
 
171
 
@BEGIN_FROM_4_07_0@
172
 
module type SeededS  =
173
 
  sig
174
 
    type key
175
 
    type 'a t
176
 
    val create : ?random:bool -> int -> 'a t
177
 
    val clear : 'a t -> unit
178
 
    val reset : 'a t -> unit
179
 
    val copy : 'a t -> 'a t
180
 
    val add : 'a t -> key -> 'a -> unit
181
 
    val remove : 'a t -> key -> unit
182
 
    val find : 'a t -> key -> 'a
183
 
    val find_opt : 'a t -> key -> 'a option
184
 
    val find_all : 'a t -> key -> 'a list
185
 
    val replace : 'a t -> key -> 'a -> unit
186
 
    val mem : 'a t -> key -> bool
187
 
    val iter : (key -> 'a -> unit) -> 'a t -> unit
188
 
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
189
 
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
190
 
    val length : 'a t -> int
191
 
    val stats : 'a t -> statistics
192
 
    val to_seq : 'a t -> (key * 'a) Seq.t
193
 
    val to_seq_keys : 'a t -> key Seq.t
194
 
    val to_seq_values : 'a t -> 'a Seq.t
195
 
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
196
 
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
197
 
    val of_seq : (key * 'a) Seq.t -> 'a t
198
 
  end
199
 
@END_FROM_4_07_0@
200
 
@BEGIN_BEFORE_4_07_0@
201
 
module type SeededS  =
202
 
  sig
203
 
    type key
204
 
    type 'a t
205
 
    val create : ?random:bool -> int -> 'a t
206
 
    val clear : 'a t -> unit
207
 
    val reset : 'a t -> unit
208
 
    val copy : 'a t -> 'a t
209
 
    val add : 'a t -> key -> 'a -> unit
210
 
    val remove : 'a t -> key -> unit
211
 
    val find : 'a t -> key -> 'a
212
 
    val find_opt : 'a t -> key -> 'a option
213
 
    val find_all : 'a t -> key -> 'a list
214
 
    val replace : 'a t -> key -> 'a -> unit
215
 
    val mem : 'a t -> key -> bool
216
 
    val iter : (key -> 'a -> unit) -> 'a t -> unit
217
 
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
218
 
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
219
 
    val length : 'a t -> int
220
 
    val stats : 'a t -> statistics
221
 
    val to_seq : 'a t -> (key * 'a) Stdcompat__seq.t
222
 
    val to_seq_keys : 'a t -> key Stdcompat__seq.t
223
 
    val to_seq_values : 'a t -> 'a Stdcompat__seq.t
224
 
    val add_seq : 'a t -> (key * 'a) Stdcompat__seq.t -> unit
225
 
    val replace_seq : 'a t -> (key * 'a) Stdcompat__seq.t -> unit
226
 
    val of_seq : (key * 'a) Stdcompat__seq.t -> 'a t
227
 
  end
228
 
@END_BEFORE_4_07_0@
229
 
(** @since 4.07.0:
230
 
    module type SeededS  =
231
 
      sig
232
 
        type key
233
 
        type 'a t
234
 
        val create : ?random:bool -> int -> 'a t
235
 
        val clear : 'a t -> unit
236
 
        val reset : 'a t -> unit
237
 
        val copy : 'a t -> 'a t
238
 
        val add : 'a t -> key -> 'a -> unit
239
 
        val remove : 'a t -> key -> unit
240
 
        val find : 'a t -> key -> 'a
241
 
        val find_opt : 'a t -> key -> 'a option
242
 
        val find_all : 'a t -> key -> 'a list
243
 
        val replace : 'a t -> key -> 'a -> unit
244
 
        val mem : 'a t -> key -> bool
245
 
        val iter : (key -> 'a -> unit) -> 'a t -> unit
246
 
        val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
247
 
        val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
248
 
        val length : 'a t -> int
249
 
        val stats : 'a t -> statistics
250
 
        val to_seq : 'a t -> (key * 'a) Seq.t
251
 
        val to_seq_keys : 'a t -> key Seq.t
252
 
        val to_seq_values : 'a t -> 'a Seq.t
253
 
        val add_seq : 'a t -> (key * 'a) Seq.t -> unit
254
 
        val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
255
 
        val of_seq : (key * 'a) Seq.t -> 'a t
256
 
      end
257
 
 *)
258
 
 
259
 
@BEGIN_FROM_4_07_0@
260
 
module MakeSeeded = Hashtbl.MakeSeeded
261
 
@END_FROM_4_07_0@
262
 
@BEGIN_BEFORE_4_07_0@
263
 
module MakeSeeded :
264
 
functor (H : SeededHashedType) ->
265
 
  sig
266
 
    type key = H.t
267
 
    type 'a t = 'a Stdcompat__hashtbl_ext.MakeSeeded(H).t
268
 
    val create : ?random:bool -> int -> 'a t
269
 
    val clear : 'a t -> unit
270
 
    val reset : 'a t -> unit
271
 
    val copy : 'a t -> 'a t
272
 
    val add : 'a t -> key -> 'a -> unit
273
 
    val remove : 'a t -> key -> unit
274
 
    val find : 'a t -> key -> 'a
275
 
    val find_opt : 'a t -> key -> 'a option
276
 
    val find_all : 'a t -> key -> 'a list
277
 
    val replace : 'a t -> key -> 'a -> unit
278
 
    val mem : 'a t -> key -> bool
279
 
    val iter : (key -> 'a -> unit) -> 'a t -> unit
280
 
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
281
 
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
282
 
    val length : 'a t -> int
283
 
    val stats : 'a t -> statistics
284
 
    val to_seq : 'a t -> (key * 'a) Stdcompat__seq.t
285
 
    val to_seq_keys : 'a t -> key Stdcompat__seq.t
286
 
    val to_seq_values : 'a t -> 'a Stdcompat__seq.t
287
 
    val add_seq : 'a t -> (key * 'a) Stdcompat__seq.t -> unit
288
 
    val replace_seq : 'a t -> (key * 'a) Stdcompat__seq.t -> unit
289
 
    val of_seq : (key * 'a) Stdcompat__seq.t -> 'a t
290
 
  end
291
 
@END_BEFORE_4_07_0@
292
 
(** @since 4.07.0: module MakeSeeded = Hashtbl.MakeSeeded
293
 
 *)
294
 
 
295
 
@BEGIN_FROM_4_07_0@
296
 
val to_seq : ('a, 'b) t -> ('a * 'b) Seq.t
297
 
@END_FROM_4_07_0@
298
 
@BEGIN_BEFORE_4_07_0@
299
 
val to_seq : ('a, 'b) t -> ('a * 'b) Stdcompat__seq.t
300
 
@END_BEFORE_4_07_0@
301
 
(** @since 4.07.0: val to_seq : ('a, 'b) t -> ('a * 'b) Seq.t
302
 
 *)
303
 
 
304
 
@BEGIN_FROM_4_07_0@
305
 
val to_seq_keys : ('a, 'b) t -> 'a Seq.t
306
 
@END_FROM_4_07_0@
307
 
@BEGIN_BEFORE_4_07_0@
308
 
val to_seq_keys : ('a, 'b) t -> 'a Stdcompat__seq.t
309
 
@END_BEFORE_4_07_0@
310
 
(** @since 4.07.0: val to_seq_keys : ('a, 'b) t -> 'a Seq.t
311
 
 *)
312
 
 
313
 
@BEGIN_FROM_4_07_0@
314
 
val to_seq_values : ('a, 'b) t -> 'b Seq.t
315
 
@END_FROM_4_07_0@
316
 
@BEGIN_BEFORE_4_07_0@
317
 
val to_seq_values : ('a, 'b) t -> 'b Stdcompat__seq.t
318
 
@END_BEFORE_4_07_0@
319
 
(** @since 4.07.0: val to_seq_values : ('a, 'b) t -> 'b Seq.t
320
 
 *)
321
 
 
322
 
@BEGIN_FROM_4_07_0@
323
 
val add_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit
324
 
@END_FROM_4_07_0@
325
 
@BEGIN_BEFORE_4_07_0@
326
 
val add_seq : ('a, 'b) t -> ('a * 'b) Stdcompat__seq.t -> unit
327
 
@END_BEFORE_4_07_0@
328
 
(** @since 4.07.0: val add_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit
329
 
 *)
330
 
 
331
 
@BEGIN_FROM_4_07_0@
332
 
val replace_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit
333
 
@END_FROM_4_07_0@
334
 
@BEGIN_BEFORE_4_07_0@
335
 
val replace_seq : ('a, 'b) t -> ('a * 'b) Stdcompat__seq.t -> unit
336
 
@END_BEFORE_4_07_0@
337
 
(** @since 4.07.0: val replace_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit
338
 
 *)
339
 
 
340
 
@BEGIN_FROM_4_07_0@
341
 
val of_seq : ('a * 'b) Seq.t -> ('a, 'b) t
342
 
@END_FROM_4_07_0@
343
 
@BEGIN_BEFORE_4_07_0@
344
 
val of_seq : ('a * 'b) Stdcompat__seq.t -> ('a, 'b) t
345
 
@END_BEFORE_4_07_0@
346
 
(** @since 4.07.0: val of_seq : ('a * 'b) Seq.t -> ('a, 'b) t
347
 
 *)
348
 
 
349
 
val find_opt : ('a, 'b) t -> 'a -> 'b option
350
 
(** @since 4.05.0: val find_opt : ('a, 'b) t -> 'a -> 'b option *)
351
 
 
352
 
val filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit
353
 
(** @since 4.03.0:
354
 
    val filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit *)
355
 
 
356
 
val is_randomized : unit -> bool
357
 
(** @since 4.03.0: val is_randomized : unit -> bool *)
358
 
 
359
 
val create : ?random:bool -> int -> ('a, 'b) t
360
 
(** @since 4.00.0: val create : ?random:bool -> int -> ('a, 'b) t *)
361
 
 
362
 
val reset : ('a, 'b) t -> unit
363
 
(** @since 4.00.0: val reset : ('a, 'b) t -> unit *)
364
 
 
365
 
val randomize : unit -> unit
366
 
(** @since 4.00.0: val randomize : unit -> unit *)
367
 
 
368
 
val stats : ('a, 'b) t -> statistics
369
 
(** @since 4.00.0: val stats : ('a, 'b) t -> statistics *)
370
 
 
371
 
val seeded_hash : int -> 'a -> int
372
 
(** @since 4.00.0: val seeded_hash : int -> 'a -> int *)
373
 
 
374
 
val seeded_hash_param : int -> int -> int -> 'a -> int
375
 
(** @since 4.00.0: val seeded_hash_param : int -> int -> int -> 'a -> int *)
376
 
 
377
 
val length : ('a, 'b) t -> int
378
 
(** @since 3.08.0: val length : ('a, 'b) t -> int *)
379
 
 
380
 
val clear : ('a, 'b) t -> unit
381
 
(** Alias for {!Hashtbl.clear} *)
382
 
 
383
 
val copy : ('a, 'b) t -> ('a, 'b) t
384
 
(** Alias for {!Hashtbl.copy} *)
385
 
 
386
 
val add : ('a, 'b) t -> 'a -> 'b -> unit
387
 
(** Alias for {!Hashtbl.add} *)
388
 
 
389
 
val find : ('a, 'b) t -> 'a -> 'b
390
 
(** Alias for {!Hashtbl.find} *)
391
 
 
392
 
val find_all : ('a, 'b) t -> 'a -> 'b list
393
 
(** Alias for {!Hashtbl.find_all} *)
394
 
 
395
 
val mem : ('a, 'b) t -> 'a -> bool
396
 
(** Alias for {!Hashtbl.mem} *)
397
 
 
398
 
val remove : ('a, 'b) t -> 'a -> unit
399
 
(** Alias for {!Hashtbl.remove} *)
400
 
 
401
 
val replace : ('a, 'b) t -> 'a -> 'b -> unit
402
 
(** Alias for {!Hashtbl.replace} *)
403
 
 
404
 
val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit
405
 
(** Alias for {!Hashtbl.iter} *)
406
 
 
407
 
val fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) t -> 'c -> 'c
408
 
(** Alias for {!Hashtbl.fold} *)
409
 
 
410
 
val hash : 'a -> int
411
 
(** Alias for {!Hashtbl.hash} *)
412
 
 
413
 
@BEGIN_FROM_4_00_0@
414
 
val hash_param : int -> int -> 'a -> int
415
 
@END_FROM_4_00_0@
416
 
@BEGIN_BEFORE_4_00_0@
417
 
@BEGIN_FROM_3_08_0@
418
 
external hash_param :
419
 
  int -> int -> 'a -> int = "caml_hash_univ_param" "noalloc"
420
 
@END_FROM_3_08_0@
421
 
@BEGIN_BEFORE_3_08_0@
422
 
external hash_param : int -> int -> 'a -> int = "hash_univ_param" "noalloc"
423
 
@END_BEFORE_3_08_0@
424
 
 
425
 
@END_BEFORE_4_00_0@
426
 
(** @since 4.00.0: val hash_param : int -> int -> 'a -> int
427
 
@since 3.08.0:
428
 
external hash_param :
429
 
  int -> int -> 'a -> int = "caml_hash_univ_param" "noalloc"
430
 
@since 3.07.0:
431
 
external hash_param : int -> int -> 'a -> int = "hash_univ_param" "noalloc"
432
 
 *)
433
 
 
434
 
end