e1fa8a1098e2021f7a14fabf72f9c02539a5eb76
[tatoo.git] / src / utils / 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 (*
17   Time-stamp: <Last modified on 2013-01-30 19:07:29 CET by Kim Nguyen>
18 *)
19
20 include FiniteCofinite.Make(Ptset.Make(QName))
21
22 let print_finite fmt e conv =
23   Format.fprintf fmt "{";
24   Pretty.print_list ~sep:"," QName.print fmt (conv e);
25   Format.fprintf fmt "}"
26
27 let printer fmt e test conv inv  =
28   if test e then print_finite fmt e conv
29   else begin
30     Format.fprintf fmt "%s \\ " Pretty.big_sigma;
31     print_finite fmt (inv e) conv
32   end
33
34 let print fmt e = printer fmt e is_finite elements complement
35
36 module Weak =
37 struct
38   include FiniteCofinite.Weak(Ptset.Weak(QName))
39   let print fmt e =  printer fmt e is_finite elements complement
40 end