[Haskell-cafe] ANN: HaRe 0.8 - The Haskell Refactorer

Alan & Kim Zimmerman alan.zimm at gmail.com
Sun Oct 4 20:18:52 UTC 2015

I'm pleased to announce the release of HaRe 0.8, available on hackage [1]

What's new?

Everything, and nothing.

Everything in the sense that it has been completely reworked internally to
use of the new API Annotations [2] in GHC 7.10.2, via the ghc-exactprint [3]

Nothing in the sense that the functionality in this version is/should be
identical to that in


HaRe 0.8 will only work for projects using GHC 7.10.2 for compilation.
HaRe with 7.10.2 and then using it against projects using an earlier
will not work, as HaRe needs to be able to invoke GHC to the type checker
on the project using GHC 7.10.2.

What is it?

HaRe makes changes to working code, so that it still works once the change

Refactorings it can do are

* demote

  Take a declaration from the level where it is defined and move it down to
  place where it is used. This only works if it is used in one place only.

* dupdef

  Duplicate a definition with a new name.

* iftocase

  Convert an if declaration to a case declaration.

* liftOneLevel

  Move a declaration one level up, adding parameters as needed to pass in
  locally declared variables.

* liftToTopLevel

  Move a declaration to the top level, adding parameters as needed to pass
  locally declared variables.

* rename

  Change a name throughout the project. This makes use of the GHC renamed
  so will not change other names that just happen to be lexically
identical, but
  are in fact different names.

It currently has an emacs integration only, assistance in supporting other
environnments welcome.

[1] https://hackage.haskell.org/package/HaRe
[2] https://ghc.haskell.org/trac/ghc/wiki/ApiAnnotations
[3] https://hackage.haskell.org/package/ghc-exactprint

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20151004/8e14a2f3/attachment.html>

More information about the Haskell-Cafe mailing list