Initial commit
[SXSI/xpathcomp.git] / tagSet.mli
1 (******************************************************************************)
2 (*  SXSI : XPath evaluator                                                    *)
3 (*  Kim Nguyen (Kim.Nguyen@nicta.com.au)                                      *)
4 (*  Copyright NICTA 2008                                                      *)
5 (*  Distributed under the terms of the LGPL (see LICENCE)                     *)
6 (******************************************************************************)
7 module type S = 
8 sig
9   module S : Set.S 
10   type t = private Finite of S.t | CoFinite of S.t
11   exception InfiniteTagSet
12   val empty : t
13   val any : t
14   val is_empty : t -> bool
15   val is_any : t -> bool
16   val is_finite : t -> bool
17   val singleton : S.elt -> t
18   val mem : S.elt -> t -> bool
19   val add : S.elt -> t -> t
20   val remove : S.elt -> t -> t
21   val cup : t -> t -> t
22   val cap : t -> t -> t
23   val diff : t -> t -> t
24   val neg : t -> t
25   val compare : t -> t -> int
26   val subset : t -> t -> bool
27   val kind_split : t list -> t * t
28   val fold : (S.elt -> 'a -> 'a) -> t -> 'a -> 'a
29   val for_all : (S.elt -> bool) -> t -> bool
30   val exists : (S.elt -> bool) -> t -> bool
31   val filter : (S.elt -> bool) -> t -> S.t
32   val partition : (S.elt -> bool) -> t -> S.t * S.t
33   val cardinal : t -> int
34   val elements : t -> S.elt list
35   val from_list : S.elt list -> t
36   val choose : t -> S.elt
37
38 end
39
40 module Make (Symbol : Set.OrderedType) : S with type S.elt = Symbol.t
41
42 module Xml : 
43 sig
44   include S with type S.elt = Tag.t
45   val star : t
46   val pcdata : t
47   val attribute : t
48   val node : t
49 end