Also, I don't seem to have recorded this anywhere, but I recall that setting
the syntax-property 'not-free-identifier=? helped with this or a related
problem regarding syntax-properties across module boundaries.
On Thu, Nov 30, 2017 at 11:21:12AM +0100, 'William J. Bowman' via Racket Users
> > 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.
> 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
> 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 racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
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
For more options, visit https://groups.google.com/d/optout.