Patch Language for Haskell

I have just discovered spatch coccinelle for c and it is amazing how it makes writing programmatic patches so easy (way better than diff and git merge). Is there an Haskell equivalent?

Has anyone tried HaRe (seems abandoned) or retrie?

EDIT: @josephcsible gave the great suggestion of apply-refact

2 Likes

hlint uses apply-refact to automatically apply its changes, and it’s pretty easy to write your own arbitrary rules for it.

6 Likes

As you say, HaRe is abandoned but retrie is active: I tried it once for source-to-source transformation on a project, and it worked well.

1 Like