X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=finiteCofinite.mli;fp=finiteCofinite.mli;h=b48955772a0bdead4ea664bbe3dcfbf927fe3437;hb=d04661689691b4587cfc45a35e98604fcdc2b878;hp=0000000000000000000000000000000000000000;hpb=f84dd2f6de7d5da16da729dc2e91cbdeb3585d75;p=SXSI%2Fxpathcomp.git diff --git a/finiteCofinite.mli b/finiteCofinite.mli new file mode 100644 index 0000000..b489557 --- /dev/null +++ b/finiteCofinite.mli @@ -0,0 +1,38 @@ +exception InfiniteSet + +module type S = + sig + type elt + type t + 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 + end + +module Make : functor (E : Sigs.Set) -> S with type elt = E.elt +