Merge branch 'local-ocamlbuild' into local-trunk
[SXSI/xpathcomp.git] / src / finiteCofinite.mli
diff --git a/src/finiteCofinite.mli b/src/finiteCofinite.mli
new file mode 100644 (file)
index 0000000..cbe3c56
--- /dev/null
@@ -0,0 +1,44 @@
+exception InfiniteSet
+
+module type S =
+  sig
+    type elt
+    type t
+    type set
+    val empty : t
+    val any : t
+    val is_empty : t -> bool
+    val is_any : t -> bool
+    val is_finite : t -> bool
+    val kind : t -> [ `Cofinite | `Finite ]
+    val singleton : elt -> t
+    val mem : elt -> t -> bool
+    val add : elt -> t -> t
+    val remove : elt -> t -> t
+    val cup : t -> t -> t
+    val cap : t -> t -> t
+    val diff : t -> t -> t
+    val neg : t -> t
+    val compare : t -> t -> int
+    val subset : t -> t -> bool
+    val kind_split : t list -> t * t
+    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
+    val for_all : (elt -> bool) -> t -> bool
+    val exists : (elt -> bool) -> t -> bool
+    val filter : (elt -> bool) -> t -> t
+    val partition : (elt -> bool) -> t -> t * t
+    val cardinal : t -> int
+    val elements : t -> elt list
+    val from_list : elt list -> t
+    val choose : t -> elt
+    val hash : t -> int
+    val equal : t -> t -> bool
+    val uid : t -> Uid.t
+    val positive : t -> set
+    val negative : t -> set
+    val inj_positive : set -> t
+    val inj_negative : set -> t
+  end
+
+module Make :  functor  (E : Ptset.S) -> S with type elt = E.elt and type set = E.t
+