pretty-print: order hash keys in common cases
This commit is contained in:
parent
9fe03ff6d9
commit
60b6b43485
|
@ -734,10 +734,12 @@
|
||||||
[else (list (make-unquoted 'cons) (car obj) (cdr obj))]))
|
[else (list (make-unquoted 'cons) (car obj) (cdr obj))]))
|
||||||
|
|
||||||
(define (convert-hash obj expr?)
|
(define (convert-hash obj expr?)
|
||||||
(let ([l (hash-map obj (lambda (k v)
|
(let ([l (hash-map obj
|
||||||
|
(lambda (k v)
|
||||||
(if expr?
|
(if expr?
|
||||||
(list k v)
|
(list k v)
|
||||||
(cons k (make-hide v)))))])
|
(cons k (make-hide v))))
|
||||||
|
#t)])
|
||||||
(if expr?
|
(if expr?
|
||||||
(cons (make-unquoted
|
(cons (make-unquoted
|
||||||
(if (hash-eq? obj)
|
(if (hash-eq? obj)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user