Go to : Tool Homepage - Downloads - User Guide - Examples
The system works under Linux (at least Debian/Ubuntu) + Emacs.
You need the following programs and library installed :
The Glasgow Haskell Compiler GHC-6.12.1 (package ghc6 in Debian/Ubuntu distributions).
Some Haskell libraries and tools : the network library (package libghc6-network-dev) the mtl library (package libghc6-mtl-dev) and the “happy” tool (package happy).
An additional haskell tool : Hint. The Debian/Ubuntu package is libghc6-hint-dev. If you can't find it for your distributuion, you can install it from cabal. First install cabal (package cabal-install), then make 'cabal update' and finally 'cabal install hint' (you may also need to request the installation of “happy”, for instance with 'cabal install happy').
The classic patch
Unix utility (package patch).
Emacs.
You also need to download the following source code :
Download the source code of the Haskell Refactorer (HaRe) v.0.6 from
HaRe webpage.
Extract the files from the archive (for instance, 'tar xzvf HaRe_28062010.tar.gz').
Download the archive containing our tool source code (from
download page).
cd
into the directory created while extracting the HaRe archive (HaRe_28062010/) and extract the archive there.
(Optional) Edit the variable GHCFLAGS in the file tools/base/HuMakefile to add -O2 (the uppercase letter O, not the number 0) at the end of the string defining the compiler options. You should reach the following string: ”-fglasgow-exts -XNoOverlappingInstances -O2” . Compilation will take more time, but the refactorer will be much faster.
Patch HaRe to fix some bugs. The paches are provided in our tool source code archive. We provide a shell script to apply the patches (since our version 0.3): applyPatches.sh
(you may need to use the command ./applyPatches.sh
to execute it).
Compile : run make
at the root of the HaRe directory (it takes several minutes and a large ammount of memory: if you have 512MB of physical memory, you may need to close some processes).
(Optional) Place the following directive in your .emacs file : (load ”{PATH-TO-HaRe-DIRECTORY}/HaRe_28062010/editors/Emacs/haskell-refac.el”)