You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resyntax relies on the expander to find what forms it should analyze. This means that macros which circumvent the expander, like for, match, and syntax-parse, can hide forms from Resyntax. This is why Resyntax can't currently refactor (in-range a (add1 b)) to (in-inclusive-range a b) when inside a for clause. Similar issues exist for refactoring match patterns and syntax-parse patterns.
A fix to this would be to extend Racket with a 'disappeared-visit property, similar to the 'disappeared-use property, that macros can attach to syntax objects produced during "manual expansion". Integration with syntax-local-apply-transformer would also be nice. The syntax property should contain the syntax object that the macro manually expanded. In the case of for, that would be the right-hand-side of clauses when they contain sequence transformers. Resyntax can then search for this property in expanded code to find expansion visits that weren't otherwise visible.
The text was updated successfully, but these errors were encountered:
Resyntax relies on the expander to find what forms it should analyze. This means that macros which circumvent the expander, like
for
,match
, andsyntax-parse
, can hide forms from Resyntax. This is why Resyntax can't currently refactor(in-range a (add1 b))
to(in-inclusive-range a b)
when inside afor
clause. Similar issues exist for refactoringmatch
patterns andsyntax-parse
patterns.A fix to this would be to extend Racket with a
'disappeared-visit
property, similar to the'disappeared-use
property, that macros can attach to syntax objects produced during "manual expansion". Integration withsyntax-local-apply-transformer
would also be nice. The syntax property should contain the syntax object that the macro manually expanded. In the case offor
, that would be the right-hand-side of clauses when they contain sequence transformers. Resyntax can then search for this property in expanded code to find expansion visits that weren't otherwise visible.The text was updated successfully, but these errors were encountered: