Refactor module organisation and build process.
[tatoo.git] / src / utils / qNameSet.ml
diff --git a/src/utils/qNameSet.ml b/src/utils/qNameSet.ml
new file mode 100644 (file)
index 0000000..e1fa8a1
--- /dev/null
@@ -0,0 +1,40 @@
+(***********************************************************************)
+(*                                                                     *)
+(*                               TAToo                                 *)
+(*                                                                     *)
+(*                     Kim Nguyen, LRI UMR8623                         *)
+(*                   Université Paris-Sud & CNRS                       *)
+(*                                                                     *)
+(*  Copyright 2010-2012 Université Paris-Sud and Centre National de la *)
+(*  Recherche Scientifique. All rights reserved.  This file is         *)
+(*  distributed under the terms of the GNU Lesser General Public       *)
+(*  License, with the special exception on linking described in file   *)
+(*  ../LICENSE.                                                        *)
+(*                                                                     *)
+(***********************************************************************)
+
+(*
+  Time-stamp: <Last modified on 2013-01-30 19:07:29 CET by Kim Nguyen>
+*)
+
+include FiniteCofinite.Make(Ptset.Make(QName))
+
+let print_finite fmt e conv =
+  Format.fprintf fmt "{";
+  Pretty.print_list ~sep:"," QName.print fmt (conv e);
+  Format.fprintf fmt "}"
+
+let printer fmt e test conv inv  =
+  if test e then print_finite fmt e conv
+  else begin
+    Format.fprintf fmt "%s \\ " Pretty.big_sigma;
+    print_finite fmt (inv e) conv
+  end
+
+let print fmt e = printer fmt e is_finite elements complement
+
+module Weak =
+struct
+  include FiniteCofinite.Weak(Ptset.Weak(QName))
+  let print fmt e =  printer fmt e is_finite elements complement
+end