diff options
author | Andy Wingo <wingo@pobox.com> | 2011-03-31 13:23:27 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-03-31 13:23:27 +0200 |
commit | f929b9e5ec39391bee1d0ce256b59b0c610caa25 (patch) | |
tree | c6afbebbfb268fcd853bd8c2566a628bf71e93e7 /test-suite/tests | |
parent | 0f1fd214f184a998a3d8e1580b7acb9d02dc879b (diff) | |
download | guile-f929b9e5ec39391bee1d0ce256b59b0c610caa25.tar.gz |
allow definitions in with-syntax body
* module/ice-9/psyntax.scm (with-syntax): Allow definitions in the body,
as seems to be suggested by the R6RS.
* test-suite/tests/syncase.test ("with-syntax"): Add test.
* module/ice-9/psyntax-pp.scm: Regenerate.
Diffstat (limited to 'test-suite/tests')
-rw-r--r-- | test-suite/tests/syncase.test | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test-suite/tests/syncase.test b/test-suite/tests/syncase.test index 84f1cfc8b..6183df813 100644 --- a/test-suite/tests/syncase.test +++ b/test-suite/tests/syncase.test @@ -68,6 +68,13 @@ ((alist ((key val) ...)) (list '(key . val) ...)))) +(with-test-prefix "with-syntax" + (pass-if "definitions allowed in body" + (equal? (with-syntax ((a 23)) + (define b #'a) + (syntax->datum b)) + 23))) + (with-test-prefix "tail patterns" (with-test-prefix "at the outermost level" (pass-if "non-tail invocation" |