Clean up renamed symbols that are quoted.

This commit is contained in:
Justin Ethier 2016-09-22 23:55:19 -04:00
parent 77cae5060b
commit aea65ac563

View file

@ -109,8 +109,14 @@
(cond
((const? expr) expr)
((null? expr) expr)
;((prim? expr) expr)
((quote? expr) expr)
((quote? expr)
(let ((atom (cadr expr)))
;; Clean up any renamed symbols that are quoted
;; TODO: good enough for quoted pairs or do
;; we need to traverse those, too?
(if (ref? atom)
`(quote ,(clean atom bv))
expr)))
((define-c? expr) expr)
((ref? expr)
;; if symbol has been renamed and is not a bound variable,