Add queries states
[tatoo.git] / src / qNameSet.ml
index 8746b09..e81118e 100644 (file)
@@ -19,18 +19,14 @@ module Weak = FiniteCofinite.Weak(Ptset.Weak(QName))
 
 (* BEGIN : Lucca Hirschi *)
 let to_string set =
-  String.concat " "
-    [
-      (match (kind set) with
-       | `Finite -> "F("
-       | `Cofinite  -> "Cof(")
-      ;
-      if is_empty (complement set) then
-       "ø"
-      else
-       ( String.concat " "
-           (List.map (fun name -> QName.to_string name) (elements (complement set))))
-      ;
-      ")"
-    ]
+  let print_set s=
+    if is_empty (s) then
+      "ø"
+    else
+      String.concat " "
+       (List.map (fun name -> QName.to_string name) (elements s))
+  in
+  match (kind set) with
+    | `Finite -> "F("^(print_set set)^")"
+    | `Cofinite  -> "Cof("^(print_set (complement set))^")"
 (* END : Lucca Hirschi *)