~npalix/coccinelle/upstream

« back to all changes in this revision

Viewing changes to bundles/stdcompat/stdcompat-current/interfaces/4.00/map.mli

  • 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 OrderedType  = sig type t val compare : t -> t -> int end
 
2
module type S  =
 
3
  sig
 
4
    type key
 
5
    type +'a t
 
6
    val empty : 'a t
 
7
    val is_empty : 'a t -> bool
 
8
    val mem : key -> 'a t -> bool
 
9
    val add : key -> 'a -> 'a t -> 'a t
 
10
    val singleton : key -> 'a -> 'a t
 
11
    val remove : key -> 'a t -> 'a t
 
12
    val merge :
 
13
      (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t
 
14
    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
 
15
    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
 
16
    val iter : (key -> 'a -> unit) -> 'a t -> unit
 
17
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
 
18
    val for_all : (key -> 'a -> bool) -> 'a t -> bool
 
19
    val exists : (key -> 'a -> bool) -> 'a t -> bool
 
20
    val filter : (key -> 'a -> bool) -> 'a t -> 'a t
 
21
    val partition : (key -> 'a -> bool) -> 'a t -> ('a t * 'a t)
 
22
    val cardinal : 'a t -> int
 
23
    val bindings : 'a t -> (key * 'a) list
 
24
    val min_binding : 'a t -> (key * 'a)
 
25
    val max_binding : 'a t -> (key * 'a)
 
26
    val choose : 'a t -> (key * 'a)
 
27
    val split : key -> 'a t -> ('a t * 'a option * 'a t)
 
28
    val find : key -> 'a t -> 'a
 
29
    val map : ('a -> 'b) -> 'a t -> 'b t
 
30
    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
 
31
  end
 
32
module Make :
 
33
functor (Ord : OrderedType) ->
 
34
  sig
 
35
    type key = Ord.t
 
36
    type 'a t
 
37
    val empty : 'a t
 
38
    val is_empty : 'a t -> bool
 
39
    val mem : key -> 'a t -> bool
 
40
    val add : key -> 'a -> 'a t -> 'a t
 
41
    val singleton : key -> 'a -> 'a t
 
42
    val remove : key -> 'a t -> 'a t
 
43
    val merge :
 
44
      (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t
 
45
    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
 
46
    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
 
47
    val iter : (key -> 'a -> unit) -> 'a t -> unit
 
48
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
 
49
    val for_all : (key -> 'a -> bool) -> 'a t -> bool
 
50
    val exists : (key -> 'a -> bool) -> 'a t -> bool
 
51
    val filter : (key -> 'a -> bool) -> 'a t -> 'a t
 
52
    val partition : (key -> 'a -> bool) -> 'a t -> ('a t * 'a t)
 
53
    val cardinal : 'a t -> int
 
54
    val bindings : 'a t -> (key * 'a) list
 
55
    val min_binding : 'a t -> (key * 'a)
 
56
    val max_binding : 'a t -> (key * 'a)
 
57
    val choose : 'a t -> (key * 'a)
 
58
    val split : key -> 'a t -> ('a t * 'a option * 'a t)
 
59
    val find : key -> 'a t -> 'a
 
60
    val map : ('a -> 'b) -> 'a t -> 'b t
 
61
    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
 
62
  end