Commit 1af85e51 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-05-20 15:49:18 by cvscast] Pretty-printer: don't abbreviate simple types

Original author: cvscast
Date: 2003-05-20 15:49:18+00:00
parent f232cfda
......@@ -1099,9 +1099,16 @@ struct
tr, Atoms.contains nil_atom t.atoms)
d
let gen = ref 0
let rec assign_name s =
incr gen;
match s.state with
| `None -> s.state <- `Marked; List.iter assign_name_rec s.def
| `None ->
let g = !gen in
s.state <- `Marked;
List.iter assign_name_rec s.def;
if (s.state == `Marked) && (!gen == g) then s.state <- `None
| `Marked -> s.state <- `Named (name ()); to_print := s :: !to_print
| _ -> ()
and assign_name_rec = function
......@@ -1128,9 +1135,7 @@ struct
let rec do_print_slot pri ppf s =
match s.state with
| `Named n -> Format.fprintf ppf "%s" n
| `None -> assert false
| `Expand | `Marked ->
do_print_slot_real pri ppf s.def
| _ -> do_print_slot_real pri ppf s.def
and do_print_slot_real pri ppf def =
let rec aux ppf = function
| [] -> Format.fprintf ppf "Empty"
......
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