X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2FqNameSet.ml;h=e81118edea2aa2fb2568fb787d1c829436f358dc;hb=83c90cb5eeebfffa05d0383430eb80e7905b46a0;hp=8746b09e8ef9ba78a04f7c5d54cd5700678f88c6;hpb=e80e269c313952b4d427fa6a5a9729ea15e43f39;p=tatoo.git diff --git a/src/qNameSet.ml b/src/qNameSet.ml index 8746b09..e81118e 100644 --- a/src/qNameSet.ml +++ b/src/qNameSet.ml @@ -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 *)