/[svn]/types/sortedList.mli
ViewVC logotype

Contents of /types/sortedList.mli

Parent Directory Parent Directory | Revision Log Revision Log


Revision 691 - (show annotations)
Tue Jul 10 17:55:19 2007 UTC (5 years, 10 months ago) by abate
File size: 2500 byte(s)
[r2003-09-27 12:41:30 by cvscast] Serialization, new system for operators, ...

Original author: cvscast
Date: 2003-09-27 12:41:34+00:00
1 module Make(X : Custom.T) :
2 sig
3 include Custom.T with type t = X.t list
4 module Elem : Custom.T with type t = X.t
5
6 external get: t -> X.t list = "%identity"
7
8 val singleton: X.t -> t
9 val iter: (X.t -> unit) -> t -> unit
10 val filter: (X.t -> bool) -> t -> t
11 val exists: (X.t -> bool) -> t -> bool
12 val fold: ('a -> X.t -> 'a) -> 'a -> t -> 'a
13 val pick: t -> X.t option
14 val length: t -> int
15
16 val empty: t
17 val is_empty: t -> bool
18 val from_list : X.t list -> t
19 val add: X.t -> t -> t
20 val remove: X.t -> t -> t
21 val disjoint: t -> t -> bool
22 val cup: t -> t -> t
23 val split: t -> t -> t * t * t
24 (* split l1 l2 = (l1 \ l2, l1 & l2, l2 \ l1) *)
25 val cap: t -> t -> t
26 val diff: t -> t -> t
27 val subset: t -> t -> bool
28 val map: (X.t -> X.t) -> t -> t
29 val mem: t -> X.t -> bool
30
31 module Map: sig
32 type 'a map
33 external get: 'a map -> (X.t * 'a) list = "%identity"
34 val empty: 'a map
35 val iter: ('a -> unit) -> 'a map -> unit
36 val filter: (X.t -> 'a -> bool) -> 'a map -> 'a map
37 val is_empty: 'a map -> bool
38 val singleton: X.t -> 'a -> 'a map
39 val assoc_remove: X.t -> 'a map -> 'a * 'a map
40 val remove: X.t -> 'a map -> 'a map
41 val merge: ('a -> 'a -> 'a ) -> 'a map -> 'a map -> 'a map
42 val cap: ('a -> 'a -> 'a ) -> 'a map -> 'a map -> 'a map
43 val sub: ('a -> 'a -> 'a ) -> 'a map -> 'a map -> 'a map
44
45 val merge_elem: 'a -> 'a map -> 'a map -> 'a map
46 val union_disj: 'a map -> 'a map -> 'a map
47 val diff: 'a map -> t -> 'a map
48 val from_list: ('a -> 'a -> 'a ) -> (X.t * 'a) list -> 'a map
49 val from_list_disj: (X.t * 'a) list -> 'a map
50
51 val map_from_slist: (X.t -> 'a) -> t -> 'a map
52 val collide: ('a -> 'b -> unit) -> 'a map -> 'b map -> unit
53 val map: ('a -> 'b) -> 'a map -> 'b map
54 val mapi: (X.t -> 'a -> 'b) -> 'a map -> 'b map
55 val constant: 'a -> t -> 'a map
56 val num: int -> t -> int map
57 val map_to_list: ('a -> 'b) -> 'a map -> 'b list
58 val mapi_to_list: (X.t -> 'a -> 'b) -> 'a map -> 'b list
59 val assoc: X.t -> 'a map -> 'a
60 val assoc_present: X.t -> 'a map -> 'a
61 val compare: ('a -> 'a -> int) -> 'a map -> 'a map -> int
62 val hash: ('a -> int) -> 'a map -> int
63 val equal: ('a -> 'a -> bool) -> 'a map -> 'a map -> bool
64
65 val serialize: 'a Serialize.Put.f -> 'a map Serialize.Put.f
66 val deserialize: 'a Serialize.Get.f -> 'a map Serialize.Get.f
67 end
68 module MakeMap(Y : Custom.T) : sig
69 include Custom.T with type t = Y.t Map.map
70 end
71 end

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5