fix pretty-print bugs introduced with support for mpairs
svn: r10548 original commit: f3b142367d2139fba33cbb9c7a7a0fa93ff808ea
This commit is contained in:
parent
a3d4e9492f
commit
ed05ff3b71
|
@ -840,7 +840,8 @@
|
||||||
(out "#")
|
(out "#")
|
||||||
(when print-vec-length?
|
(when print-vec-length?
|
||||||
(out (number->string (vector-length obj))))
|
(out (number->string (vector-length obj))))
|
||||||
(pp-list (vector->repeatless-list obj) extra pp-expr #f depth)]
|
(pp-list (vector->repeatless-list obj) extra pp-expr #f depth
|
||||||
|
pair? car cdr pair-open pair-close)]
|
||||||
[(and (custom-write? obj)
|
[(and (custom-write? obj)
|
||||||
(not (struct-type? obj)))
|
(not (struct-type? obj)))
|
||||||
(write-custom pp* obj pport depth display? width)]
|
(write-custom pp* obj pport depth display? width)]
|
||||||
|
@ -849,12 +850,14 @@
|
||||||
(let ([v (struct->vector obj)])
|
(let ([v (struct->vector obj)])
|
||||||
(when (prefab?! obj v)
|
(when (prefab?! obj v)
|
||||||
(out "s"))
|
(out "s"))
|
||||||
(pp-list (vector->list v) extra pp-expr #f depth))]
|
(pp-list (vector->list v) extra pp-expr #f depth
|
||||||
|
pair? car cdr pair-open pair-close))]
|
||||||
[(hash-table? obj)
|
[(hash-table? obj)
|
||||||
(out (if (hash-table? obj 'equal)
|
(out (if (hash-table? obj 'equal)
|
||||||
"#hash"
|
"#hash"
|
||||||
"#hasheq"))
|
"#hasheq"))
|
||||||
(pp-list (hash-table-map obj cons) extra pp-expr #f depth)]
|
(pp-list (hash-table-map obj cons) extra pp-expr #f depth
|
||||||
|
pair? car cdr pair-open pair-close)]
|
||||||
[(and (box? obj) print-box?)
|
[(and (box? obj) print-box?)
|
||||||
(out "#&")
|
(out "#&")
|
||||||
(pr (unbox obj) extra pp-pair depth)])
|
(pr (unbox obj) extra pp-pair depth)])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user