Module documentation for 0.8.4.0
A Haskell 2010 refactoring tool. HaRe supports the full Haskell 2010 standard, through making use of the GHC API.
Version 0.7.2.8 supports up to GHC 7.6.3.
There is no support for GHC 7.8.x. There will never be support for GHC 7.8.x
From version 0.8.0.0, GHC 7.10.2 is supported.
From version 0.8.3.0, GHC 8.0.1 is supported.
From version 0.8.4.0, GHC 8.0.2 is supported.
It is tested against GHC 7.10.3, GHC 8.0.1 and GHC 8.0.2 (via travis-ci.org)
It currently only has emacs integration built in, community input welcome for others.
HaRe attempts to operate in a safe way, by first writing new files with proposed changes, and only swapping these with the originals when the change is accepted. In the process the original file is renamed to have the current date/time as a suffix. Thus it should be possible to (manually) undo changes.
Even so, it is strongly advised to back up any source files before refactoring, as we can make no promises as to the reliability of this tool. Use at your own risk.
At the moment parsing of any file with FFI exports will fail.
See Language.Haskell.Refact.HaRe for the current list of refactorings supported
* Update for ghc-mod 126.96.36.199
* Update for GHC 8.0.2
* Use ghc-mod version to 5.7
* Add deleteDef refactoring to generalise a monadic function
to use applicative (@SAdams601)
* Add genapplicative refactoring to generalise a monadic function
to use applicative (@SAdams601)
* Update for GHC 8.0.1
* Use ghc-mod version to 5.6 now it is released
* Use ghc-mod version to 5.5 now it is released
* Expose commands working in RefactGhc, so the ghc-mod session can
be shared in haskell-ide-engine. By @cocreature
* Internal only, heavily clean up the ...Refactoring.Rename
module. By @glittershark
* Lock ghc-mod version to 0.5.4 to prevent issues when 0.5.5 comes out
* Set minimum bound on ghc-exactprint, the behaviour of layout has
changed for ifToCase. This will be re-done once ghc-exactprint is
updated for GHC 8.0.1
* The constructors for ghc-mod `Options` are now re-exported too
* Set GHC-Opts to -O0 for sane compile times
* Make the ghc-hare depend on the library, rather than rebuilding
* elisp no longer prompts to save modified dired buffers
all of it.
* Work around a bug in GHC 7.10.2 that will not process pragmas
after a comment at the top of a file, when comments are returned
for ghc-exactprint processing.
* Add parameters to all use sites in the original location when
lifting a declaration.
* Move to new/old home at https://github.com/RefactoringTools/HaRe
* Reinstate processing of CPP directives as comments #36
* Fix problem in renaming in a client module when the old name is
not in scope in the client module. #35
* No longer mark a client module as refactored if no renaming
takes place in it.
* Major rework, replacing haskell-token-utils with ghc-exactprint
* Now supports GHC 7.10.2 and up. ONLY.
* Functionally equivalent to v0.7.2.8
lower bounds on parsec and haskell-token-utils
Upper bound on ghc-mod until 5.0 is released and stabilises
tokenise / basicTokenise moved to haskell-token-utils
Fix incompatibility with haskell-token-utils 0.0.0.3, closing
Re-architect to split out haskell-token-utils as a separate
package, usable with haskell-src-exts too
* Update for ghc-mod 4.1.0
* Fix renaming so that it also renames types in the export list of
* revert to ghc-mod >= 4.0, with note that FFI exports can't
currently be processed
* limit ghc-mod to <= 3.1.7, new version 4.0 does not deal with
FFI exports. This does not stop ghc-mod >= 4.0 being used in the
editor, it is just the library linked into ghc-hare
* Added disclaimer that API is subject to change without notice
* liftToTopLevel now brings along an updated type signature,
provided there are no constraints on any of the types
* Reorganised package structure to have
Language.Haskell.Refact.HaRe which provides all the functions
needed to call the refactorer from external code, and
Language.Haskell.Refact.API which provides the interfaces to write
* liftToMod of last local decl having preceding comment now removes 'where'
* Correctly determine the location for a demoted decl
* Correctly determine what parameters to add when lifting a decl
* Do not demote a decl if it is used in more than one match
* Do not treat single-line layout as a group, hence preserving
layout of adjacent let expressions when renaming.
* Process Template Haskell expressions instead of blowing up
* Adding parameters to lifted declarations now works as expected
* Load and process files using TH and/or QuasiQuotes
* Make loading of multiple targets from a cabal file more robust
* Various fixes for robustness based on real world trials
* Rework the free and declared variable calculation to be more accurate
* Extend the range of syntax elements that HaRe can handle when
reading a file. Most bar parallel extensions are in place.
* Make sure the refactored file retains its original extension, so
that syntax highlighting still works while the preview is being done.
* Ensure that the right target is activated for the primary file
when it belongs to a non-library target,not just for client
modules of it.
* The non-library targets were having the wrong path prepended
* Rework the module loading to load each target in turn, so that
all exe, test, benchmark etc will be refactored in one go
* Tweaks to output stage based on real world use. Renaming seems
stable, liftXXX, demote have issues
* Removed deprecated hspec-discover dependency
* added ghc-hare show command to the elisp as well to be able to
check that it is using the correct cabal file
* Major rewrite of the token output stage. It now makes use of a
dual-tree structure to manage the maintenance of required vertical
layout while refactoring.
* Bump the lower bound on Diff
* Sort out most of the do/in/let layout when renaming. Only nested
layout changes to be dealt with.
* Updated to use the latest ghc-mod, with cabal 1.18.x sandbox
* Updated to latest versions of Diff and hspec
* When refactoring a CPP pre-processed file, read the preprocessor
directives and non-compiled code as comments, so the source can be
round-tripped. This allows refactoring of simple #if/#else/#endif
code. NOTE: no refactoring is done on code that is not live after
* Now able to get tokens for a file pre-processed with CPP. But it
is the pre-processed output, so the CPP directives are stripped
out when writing out the refactored source.
* Correct Haddock compile error. Close #4
* hsWithBndrs only exists for GHC > 7.4.x
* Fix elisp, would not commit refactoring due to missing methods
* Fix issue #3: ifToCase formatting
* Fix issue #2: elisp
* Alpha release with new GHC API