Add param:trace-syntax? to help debugging syntax expansion.
authorChris Hanson <org/chris-hanson/cph>
Sat, 8 Dec 2018 08:19:31 +0000 (00:19 -0800)
committerChris Hanson <org/chris-hanson/cph>
Sat, 8 Dec 2018 08:23:35 +0000 (00:23 -0800)
src/runtime/runtime.pkg
src/runtime/syntax-rename.scm
src/runtime/syntax.scm

index 5ebee077bb46b4758887c68253f4144525b45c8e..be6daba25b11a559a6397376bc159fba21f95e97 100644 (file)
@@ -4558,6 +4558,7 @@ USA.
          identifier?
          make-syntactic-closure
          new-identifier
+         param:trace-syntax?
          reverse-syntactic-environments
          strip-syntactic-closures
          syntactic-closure-form
index c6b0b9347c4b0bfe98e5e2c1a4570fea46f9ee23..1060a3f5bc1ec3f39e1447cf3ed6ed8a5932f7a4 100644 (file)
@@ -108,6 +108,9 @@ USA.
 ;;;; Post processing
 
 (define (post-process-output expression)
+  (if (param:trace-syntax?)
+      (parameterize ((param:pp-uninterned-symbols-by-name? #f))
+       (pp expression)))
   (let ((safe-set (make-strong-eq-hash-table)))
     (compute-substitution expression
                          (lambda (rename original)
index cd191b70df5f49415573d2a048977ab25d941708..b82b3310e6f827fc4e3855e7dfac0fe943e1fd05 100644 (file)
@@ -43,6 +43,9 @@ USA.
 \f
 ;;;; Top level
 
+(define-deferred param:trace-syntax?
+  (make-settable-parameter #f))
+
 (define (syntax form environment)
   (syntax* (list form) environment))