X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=src%2Futils%2FqNameSet.ml;fp=src%2Futils%2FqNameSet.ml;h=e1fa8a1098e2021f7a14fabf72f9c02539a5eb76;hp=0000000000000000000000000000000000000000;hb=30bc0bb1291426e5e26eb2dee1ffc41e4c246349;hpb=d9c0e4863807eaf472e875a4bad35cfefe985c95 diff --git a/src/utils/qNameSet.ml b/src/utils/qNameSet.ml new file mode 100644 index 0000000..e1fa8a1 --- /dev/null +++ b/src/utils/qNameSet.ml @@ -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: +*) + +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