Add queries states
[tatoo.git] / src / qNameSet.ml
1 (***********************************************************************)
2 (*                                                                     *)
3 (*                               TAToo                                 *)
4 (*                                                                     *)
5 (*                     Kim Nguyen, LRI UMR8623                         *)
6 (*                   Université Paris-Sud & CNRS                       *)
7 (*                                                                     *)
8 (*  Copyright 2010-2012 Université Paris-Sud and Centre National de la *)
9 (*  Recherche Scientifique. All rights reserved.  This file is         *)
10 (*  distributed under the terms of the GNU Lesser General Public       *)
11 (*  License, with the special exception on linking described in file   *)
12 (*  ../LICENSE.                                                        *)
13 (*                                                                     *)
14 (***********************************************************************)
15
16 include FiniteCofinite.Make(Ptset.Make(QName))
17
18 module Weak = FiniteCofinite.Weak(Ptset.Weak(QName))
19
20 (* BEGIN : Lucca Hirschi *)
21 let to_string set =
22   let print_set s=
23     if is_empty (s) then
24       "ø"
25     else
26       String.concat " "
27         (List.map (fun name -> QName.to_string name) (elements s))
28   in
29   match (kind set) with
30     | `Finite -> "F("^(print_set set)^")"
31     | `Cofinite  -> "Cof("^(print_set (complement set))^")"
32 (* END : Lucca Hirschi *)