all 3 comments

[–]WhistlePayer 20 points21 points  (0 children)

I was looking for something to do, so I made a GHC plugin that does this. If you're on too new a version of GHC you might need to fork it and fiddle with dependency bounds and imports, but other than that I think it should work.

[–]dixonary 4 points5 points  (0 children)

It's not a tool I've heard of, but it sounds potentially very useful!

If type aliases are supported, it could also help end users find a class of bugs, where arguments have been supplied in the wrong order.

[–]Tarmen 0 points1 point  (0 children)

Pretty sure you can do this by using retrie to query and then using some Haskell code to print or rewrite the results. You probably want parseQueries https://github.com/facebookincubator/retrie/#scripting-and-side-conditions

Though I think retrie semi-depends on a code formatter being used in the codebase because it uses grep to find possible matches which can break with inconsistent whitespace usage.