Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Disappeared visit tracking #369

Open
jackfirth opened this issue Oct 16, 2024 · 0 comments · May be fixed by #376
Open

Disappeared visit tracking #369

jackfirth opened this issue Oct 16, 2024 · 0 comments · May be fixed by #376
Labels
enhancement New feature or request

Comments

@jackfirth
Copy link
Owner

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant