resyntax
resyntax copied to clipboard
Manually triggering post-rules
The designer of a rule may know that the rhs of its rule may contain code that can be simplified. Then, if applying all existing rules is too expensive (though I really want a mode that does that automatically), the rule itself could propose next rules to apply. For example:
(define-refactoring-rule smurf
#:literals (if begin)
[(smurf x x y z)
(if x x z)
#:trigger (if-to-and if-to-when)])