Commit b8e562b5 authored by Kim Nguyễn's avatar Kim Nguyễn

Fix various bugs in the pretty-printer (union of atoms not parenthesized, |...

Fix various bugs in the pretty-printer (union of atoms not parenthesized, | instead of & for some toplevel variables)
parent 8aacb975
...@@ -62,6 +62,18 @@ let print s = match get s with ...@@ -62,6 +62,18 @@ let print s = match get s with
Format.fprintf ppf " \\@ (%a)" (print_symbolset ns) s) Format.fprintf ppf " \\@ (%a)" (print_symbolset ns) s)
l ] l ]
let extract s =
let tr l =
List.map (fun (ns, ss) -> ns, match ss with
SymbolSet.Finite l -> `Finite l
| SymbolSet.Cofinite l -> `Cofinite l) l
in
match get s with
`Finite l -> `Finite (tr l)
| `Cofinite l -> `Cofinite (tr l)
type 'a map = 'a Imap.t * 'a Imap.t * 'a option type 'a map = 'a Imap.t * 'a Imap.t * 'a option
let map_map f (m1,m2,o) = let map_map f (m1,m2,o) =
......
...@@ -41,3 +41,9 @@ type 'a map ...@@ -41,3 +41,9 @@ type 'a map
val mk_map: (t * 'a) list -> 'a map val mk_map: (t * 'a) list -> 'a map
val get_map: V.t -> 'a map -> 'a val get_map: V.t -> 'a map -> 'a
val map_map: ('a -> 'b) -> 'a map -> 'b map val map_map: ('a -> 'b) -> 'a map -> 'b map
val extract : t ->
[ `Finite of (Ns.Uri.t * [`Finite of V.t list |`Cofinite of V.t list]) list
| `Cofinite of (Ns.Uri.t * [`Finite of V.t list |`Cofinite of V.t list]) list
]
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment