change printer to not quote ellipsis in partially opaque structure

original commit: db2ed4cef3938f07da5a32cb1b1dcaa9acf69850
This commit is contained in:
Matthew Flatt 2010-04-26 14:18:43 -06:00
parent 13acc1b75e
commit 82598f1c4d

View File

@ -118,6 +118,8 @@
(define-struct (cached-delayed-element delayed-element) (cache-key))
(define-struct (cached-element element) (cache-key))
(define qq-ellipses (string->uninterned-symbol "..."))
(define (make-id-element c s)
(let* ([key (and id-element-cache
(let ([b (identifier-label-binding c)])
@ -201,7 +203,7 @@
is-var?)))
(values (substring s 1) #t #f)
(values s #f #f))))])
(let ([quote-depth (if (and qq? (identifier? c))
(let ([quote-depth (if (and qq? (identifier? c) (not (eq? qq-ellipses (syntax-e c))))
(let ([quote-depth
(if (and (quote-depth . < . 2)
(memq (syntax-e c) '(unquote unquote-splicing)))
@ -956,7 +958,7 @@
(if pf
(prefab-struct-key v)
(object-name v)))
(cdr (vector->list (struct->vector v))))]
(cdr (vector->list (struct->vector v qq-ellipses))))]
[else v])])
(if (null? v)
null