From aea65ac5630f2e8f663e4dd98ce5cf78887fe78d Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 22 Sep 2016 23:55:19 -0400 Subject: [PATCH] Clean up renamed symbols that are quoted. --- scheme/cyclone/macros.sld | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scheme/cyclone/macros.sld b/scheme/cyclone/macros.sld index 24e6dca3..3f31a09b 100644 --- a/scheme/cyclone/macros.sld +++ b/scheme/cyclone/macros.sld @@ -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,