haskell-idea-plugin icon indicating copy to clipboard operation
haskell-idea-plugin copied to clipboard

Support refactoring with HaRe

Open tobiasgwaaler opened this issue 10 years ago • 3 comments

It would be nice to have refactoring support, for instance by using HaRe as a backend.

A sensible place to start would be support for renaming functions, variable and modules.

I'll try to work something out, but it might take a while.

tobiasgwaaler avatar Jun 04 '14 17:06 tobiasgwaaler

Thanks, for idea I have never seen this tool.

atsky avatar Jun 04 '14 17:06 atsky

Some thoughts:

  • Idea store documents in memory. You need to save all before refactoring FileDocumentManager.getInstance().saveAllDocuments() should help.
  • You have to find ghc options for file. buildwrapper getbuildflags can help. There is class BuildWrapper that executes some buildwrapper functions.
  • I'm going to implement refactoring without external tools, but it's hart task and takes a lot time. So using HaRe can be a good decision to start.

atsky avatar Jun 04 '14 20:06 atsky

Thank you, those are all good points!

tobiasgwaaler avatar Jun 04 '14 21:06 tobiasgwaaler