Fix some minor bugs in syntax renaming.
authorChris Hanson <org/chris-hanson/cph>
Thu, 6 Dec 2018 07:42:49 +0000 (23:42 -0800)
committerChris Hanson <org/chris-hanson/cph>
Sat, 8 Dec 2018 08:23:35 +0000 (00:23 -0800)
src/runtime/syntax-rename.scm

index cf0138263509611fab2180373029cf4f63eb1f26..c6b0b9347c4b0bfe98e5e2c1a4570fea46f9ee23 100644 (file)
@@ -121,9 +121,11 @@ USA.
                          bound)))
     (for-each (lambda (rename)
                (let ((original (rename->original rename)))
-                 (if (not (any (lambda (rename*)
-                                 (eq? original (rename->original rename*)))
-                               free))
+                 (if (and (symbol? original)
+                          (not (any (lambda (rename*)
+                                      (eq? original
+                                           (rename->original rename*)))
+                                    free)))
                      (mark-safe! rename original))))
              bound)
     free))
@@ -152,11 +154,11 @@ USA.
          (if entry
              (cdr entry)
              (let ((finalized
-                    (symbol "." original
+                    (symbol "." (identifier->symbol original)
                             "." frame-id
                             "-" (length (cdr bucket)))))
                (set-cdr! bucket
-                         (cons (cons original finalized)
+                         (cons (cons frame-id finalized)
                                (cdr bucket)))
                finalized)))))