Explain that `with-syntax' ~= "define pattern variable".

This commit is contained in:
Greg Hendershott 2012-10-30 18:11:44 -04:00
parent 209aa0fb7e
commit 40518865c6

View File

@ -726,9 +726,11 @@ Well that explains it. Instead, we wanted to expand to:
Our template is using the symbol @racket[name] but we wanted its
value, such as @racket[foo-bar] in this use of our macro.
A solution here is @racket[with-syntax], which lets us say that
@racket[name] is something whose value can be used in our output
template:
A solution here is @racket[with-syntax]@margin-note*{You could
consider @racket[with-syntax] to mean, "define pattern variables".},
which lets us say that @racket[name] is something whose value can be
used in our output template. In effect, it lets us say that
@racket[name] is an additional pattern variable.
@i[
(define-syntax (hyphen-define/wrong1.3 stx)