> I can wrap the property around the target identifier, but the syntax property > doesn't stick: > > (provide (rename-out [mb #%module-begin])) > (define-syntax mb (make-rename-transformer (syntax-property > #'other-module-begin 'foo "bar"))) > (define-syntax other-module-begin (λ (stx) #'foo)) We've seen this problem before. It has to do with module boundaries and how syntax properties are preserved. https://groups.google.com/d/msg/racket-users/ZWjpz3kFmjo/SUXGVM3YEAAJ
It's been a while since I wrote this, but the work around I used was exporting the identifier that *expanded into code* that inserted the syntax property. This way, ths property doesn't need to be preserve, since it gets inserted every time it is used: > The workaround seems to be: if you want to stash an identifier in a > syntax-property, expand into syntax that attaches the syntax-property. That > is, don't do (define x (syntax-property #'id 'prop #'stx)) and then use x in > a syntax object, but generate #`(... (syntax-property #'id 'prop #'stx ...)) -- William J. Bowman -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

