This commit is contained in:
Jay McCarthy 2016-04-06 10:09:16 -04:00
parent cf70c4a241
commit e4c0b75cae

View File

@ -13,26 +13,26 @@
[(_ ([id val] ...) body ...) [(_ ([id val] ...) body ...)
(let ([ids (syntax->list #'(id ...))]) (let ([ids (syntax->list #'(id ...))])
(with-syntax ([((gen-id must-be-renamer?) ...) (with-syntax ([((gen-id must-be-renamer?) ...)
(map (lambda (id) (map (lambda (id)
(unless (identifier? id) (unless (identifier? id)
(raise-syntax-error (raise-syntax-error
#f #f
"not an identifier" "not an identifier"
stx stx
id)) id))
(let ([sp (syntax-parameter-local-value id)]) (let ([sp (syntax-parameter-local-value id)])
(unless (syntax-parameter? sp) (unless (syntax-parameter? sp)
(raise-syntax-error (raise-syntax-error
#f #f
"not bound as a syntax parameter" "not bound as a syntax parameter"
stx stx
id)) id))
(list (list
(syntax-local-get-shadower (syntax-local-get-shadower
(syntax-local-introduce (syntax-parameter-target sp)) (syntax-local-introduce (syntax-parameter-target sp))
#t) #t)
(rename-transformer-parameter? sp)))) (rename-transformer-parameter? sp))))
ids)]) ids)])
(let ([dup (check-duplicate-identifier ids)]) (let ([dup (check-duplicate-identifier ids)])
(when dup (when dup
(raise-syntax-error (raise-syntax-error