You could use uniplate and a small AST to play more with it, the paper has examples of transformations
the paper: https://ndmitchell.com/downloads/paper-uniform_boilerplate_a...
small tutorial: https://www.cs.york.ac.uk/fp/darcs/uniplate/uniplate.htm