Print labels (=QName -> qname.ml? )
[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   String.concat " "
23     [
24       (match (kind set) with
25         | `Finite -> "F("
26         | `Cofinite  -> "Cof(")
27       ;
28       if is_empty (complement set) then
29         "ø"
30       else
31         ( String.concat " "
32             (List.map (fun name -> QName.to_string name) (elements (complement set))))
33       ;
34       ")"
35     ]
36 (* END : Lucca Hirschi *)