[plt-scheme] Binding transformers in a macro
Actually, I think you always want just
#`(define-syntax #,import-id (make-rename-transformer #'#,real-import-id))
That will work whether `real-import-id' has a regular or transformer
binding, so you don't need the `transformer?' test.
At Thu, 23 Oct 2008 17:13:20 +0100, "Noel Welsh" wrote:
> (define-for-syntax (make-define-form import-id real-import-id context)
> (if (transformer? real-import-id)
> (let ([transformer (syntax-local-value real-import-id)])
> (datum->syntax context
> `(define-syntax ,import-id ,transformer)))
> (datum->syntax context
> `(define ,import-id ,real-import-id))))