Commit 60b0a553 authored by Kim Nguyễn's avatar Kim Nguyễn
Browse files

Fix the pretty printing of types of the form (Any\t) where t is a named type.

parent cec65110
......@@ -1680,14 +1680,14 @@ module Print = struct
| Some c -> add (Char c)
| None ->
List.iter (fun x -> add (Atomic x)) (Chars.print not_seq.chars) );
List.iter (fun x -> add (Atomic x)) (Intervals.print not_seq.ints);
List.iter (fun x -> add (Atomic x)) (Atoms.print not_seq.atoms);
List.iter (fun x -> add (Atomic x)) (Abstract.print not_seq.abstract);
List.iter
(fun (p, n) ->
let aux (t, s) = (prepare (descr t), prepare (descr s)) in
let p = List.map aux p and n = List.map aux n in
add (Arrows (p, n)))
List.iter (fun x -> add (Atomic x)) (Intervals.print not_seq.ints);
List.iter (fun x -> add (Atomic x)) (Atoms.print not_seq.atoms);
List.iter (fun x -> add (Atomic x)) (Abstract.print not_seq.abstract);
List.iter
(fun (p, n) ->
let aux (t, s) = (prepare (descr t), prepare (descr s)) in
let p = List.map aux p and n = List.map aux n in
add (Arrows (p, n)))
(BoolPair.get not_seq.arrow);
if not_seq.absent then
add (Atomic (fun ppf -> Format.fprintf ppf "#ABSENT"));
......@@ -1792,7 +1792,7 @@ module Print = struct
else aux ppf def
and do_print pri ppf = function
| Neg { def = []; _ } -> Format.fprintf ppf "Any"
| Neg { def = []; state = `None; _ } -> Format.fprintf ppf "Any"
| Neg t -> Format.fprintf ppf "Any \\ (@[%a@])"
(do_print_slot 0) t
| Abs t -> Format.fprintf ppf "?(@[%a@])" (do_print_slot 0)
......
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