Made define-syntax-block less restrictive about source of bindings.

This commit is contained in:
Carl Eastlund 2011-04-30 16:37:37 -04:00
parent 31aa47f136
commit 01f1add1cb

View File

@ -54,20 +54,7 @@
(syntax-list decl.external ...)) (syntax-list decl.external ...))
"duplicate defined name" "duplicate defined name"
#'(define-syntaxes [decl.external ...] #'(define-syntaxes [decl.external ...]
;; Easier way to ensure the internal names are bound than (block body ... (values decl.internal ...)))])))
;; local-expand: bind them to an error macro and force the
;; user to shadow them.
(let-syntax
([decl.internal
(make-set!-transformer
(lambda (stx)
(raise-syntax-error #f
"transformer must be defined within define-syntax-block"
stx)))]
...)
(block
body ...
(values decl.internal ...))))])))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;