From: Chris Hanson Date: Sat, 8 Dec 2018 08:19:31 +0000 (-0800) Subject: Add param:trace-syntax? to help debugging syntax expansion. X-Git-Tag: mit-scheme-pucked-10.1.7~3^2~15 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b4ecd3086120af9f6fb1243608933bf818f897d5;p=mit-scheme.git Add param:trace-syntax? to help debugging syntax expansion. --- diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index 5ebee077b..be6daba25 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -4558,6 +4558,7 @@ USA. identifier? make-syntactic-closure new-identifier + param:trace-syntax? reverse-syntactic-environments strip-syntactic-closures syntactic-closure-form diff --git a/src/runtime/syntax-rename.scm b/src/runtime/syntax-rename.scm index c6b0b9347..1060a3f5b 100644 --- a/src/runtime/syntax-rename.scm +++ b/src/runtime/syntax-rename.scm @@ -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) diff --git a/src/runtime/syntax.scm b/src/runtime/syntax.scm index cd191b70d..b82b3310e 100644 --- a/src/runtime/syntax.scm +++ b/src/runtime/syntax.scm @@ -43,6 +43,9 @@ USA. ;;;; Top level +(define-deferred param:trace-syntax? + (make-settable-parameter #f)) + (define (syntax form environment) (syntax* (list form) environment))