resyntax
resyntax copied to clipboard
Ask politely for a stable macro expander hook
At present, resyntax relies on the undocumented and deeply magic current-expand-observe parameter (intended for the macro stepper) to apply refactoring rules to visited syntax objects. This has a few problems:
- It's an unstable API whose details change whenever the macro expander or macro stepper changes.
- It provides way more information than
resyntaxneeds. Allresyntaxneeds is a list of original syntax objects visited during expansion. - It doesn't provide a way to pause expansion, so there doesn't seem to be a way for refactoring rules to use
local-expandorsyntax-local-value.
Eventually it would be nice to have a public, documented, stable, and less powerful alternative to current-expand-observe in Racket.
Possible idea: maybe something in the syntax-check code could be used?