resyntax icon indicating copy to clipboard operation
resyntax copied to clipboard

Manually triggering post-rules

Open Metaxal opened this issue 5 years ago • 0 comments

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)])

Metaxal avatar Jan 12 '21 19:01 Metaxal