mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-21 11:10:21 +02:00
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.
This commit is contained in:
parent
0f1fd214f1
commit
f929b9e5ec
3 changed files with 105 additions and 39 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue