fix begin-for-syntax under splicing-let

This fixes an immediate problem, but the macro expander should have
complained about an unbound `maybe` at phase 2. (A new implementation
of the macro expander detected the unbound `maybe`.)
This commit is contained in:
Matthew Flatt 2016-05-16 13:07:44 -06:00
parent c9074c26dc
commit f327a44080
2 changed files with 14 additions and 0 deletions

View File

@ -1634,6 +1634,15 @@
(define-syntax outer-x (make-rename-transformer #'x)))
outer-x))
(test 10 'splicing+begin-for-syntax
(eval
'(begin
(splicing-let ([x 10])
(begin-for-syntax
(define id #'x)))
(define-syntax (m stx) id)
(m))))
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Check keyword & optionals for define-syntax
;; and define-syntax-for-values:

View File

@ -171,6 +171,11 @@
[_ body]))]))
(begin-for-syntax
(define-for-syntax ((maybe unintro) form)
(if (syntax-property form 'definition-intended-as-local)
form
(unintro form)))
(define-syntax (splicing-let-body/et stx)
(syntax-case stx ()
[(_ marked-id markless-id body)