diff options
author | Neil Jerram <neil@ossau.uklinux.net> | 2009-02-05 22:11:26 +0000 |
---|---|---|
committer | Neil Jerram <neil@ossau.uklinux.net> | 2009-02-08 21:45:31 +0000 |
commit | ad5f5ada1d50ecdab634d60ffe3a13b9193156aa (patch) | |
tree | 3d91bdd4e81cc08d46030a5996e057548f2937c7 | |
parent | 95a040cd2be7ad03bf197edbdb1fec2c52749ef6 (diff) | |
download | guile-ad5f5ada1d50ecdab634d60ffe3a13b9193156aa.tar.gz |
Allow @ to work with (ice-9 syncase)
(Reported by Panicz Maciej Godek.)
* test-suite/tests/syncase.test ("@ works with syncase"): New test.
* ice-9/syncase.scm (guile-macro): When a Guile macro transformer
produces a variable, don't pass it through sc-expand.
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | THANKS | 1 | ||||
-rw-r--r-- | ice-9/syncase.scm | 8 | ||||
-rw-r--r-- | test-suite/tests/syncase.test | 3 |
4 files changed, 16 insertions, 3 deletions
@@ -50,6 +50,13 @@ Changes in 1.8.7 (since 1.8.6) ** Fix build problem when scm_t_timespec is different from struct timespec ** Fix build when compiled with -Wundef -Werror +** Allow @ macro to work with (ice-9 syncase) + +Previously, use of the @ macro in a module whose code is being +transformed by (ice-9 syncase) would cause an "Invalid syntax" error. +Now it works as you would expect (giving the value of the specified +module binding). + Changes in 1.8.6 (since 1.8.5) @@ -41,6 +41,7 @@ For fixes or providing information which led to a fix: Peter Gavin Eric Gillespie, Jr Didier Godefroy + Panicz Maciej Godek John Goerzen Mike Gran Szavai Gyula diff --git a/ice-9/syncase.scm b/ice-9/syncase.scm index 6ee4d166e..39cf27372 100644 --- a/ice-9/syncase.scm +++ b/ice-9/syncase.scm @@ -146,9 +146,11 @@ (let ((e ((macro-transformer m) e (append r (list eval-closure))))) - (if (null? r) - (sc-expand e) - (sc-chi e r w)))))))))) + (if (variable? e) + e + (if (null? r) + (sc-expand e) + (sc-chi e r w))))))))))) (define generated-symbols (make-weak-key-hash-table 1019)) diff --git a/test-suite/tests/syncase.test b/test-suite/tests/syncase.test index 1184f7b54..c681fc381 100644 --- a/test-suite/tests/syncase.test +++ b/test-suite/tests/syncase.test @@ -34,3 +34,6 @@ (pass-if "basic syncase macro" (= (plus 1 2 3) (+ 1 2 3))) + +(pass-if "@ works with syncase" + (eq? run-test (@ (test-suite lib) run-test))) |