Go to : Tool Homepage - Downloads - User Guide - Examples

Installing the program restructuring system

The system works under Linux (at least Debian/Ubuntu) + Emacs.

Pre-requisites

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 :

  • Haskell Refactorer source code.
  • Our tool source code.

Install the system

  1. Download the source code of the Haskell Refactorer (HaRe) v.0.6 from HaRe webpage.
  2. Extract the files from the archive (for instance, 'tar xzvf HaRe_28062010.tar.gz').
  3. Download the archive containing our tool source code (from download page).
  4. cd into the directory created while extracting the HaRe archive (HaRe_28062010/) and extract the archive there.
  5. (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.
  6. 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).
  7. 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).
  8. (Optional) Place the following directive in your .emacs file : (load ”{PATH-TO-HaRe-DIRECTORY}/HaRe_28062010/editors/Emacs/haskell-refac.el”)
internet/view_switcher/install.txt · Last modified: 2011/07/05 12:03 by cohen-j