[Haskell] ANNOUNCE: HaRe, the Haskell Refactorer, version 0.2; and a workshop

C.Reinke C.Reinke at kent.ac.uk
Thu Jan 29 20:25:39 EST 2004

Dear Haskellers,

as part of our project on Refactoring Functional Programs


we are pleased to announce the availability of HaRe 0.2 (also known
as HaRe 27/01/2004 ;-), a snapshot of our Haskell Refactorer
prototype. The major changes since HaRe 0.1 (apart from numerous
bug-fixes, a clean-up of the Emacs binding, and initial support for
literate Haskell files) are that all refactorings are now
module-aware and can thus be used in multi-module settings. 

You can get HaRe 0.2 via


Please see the README.txt for build/use instructions and known
issues, and let us know about any problems, bugs, suggestions, or
additional platforms you can confirm as working: our project address
at kent.ac.uk is refactor-fp.

The catalogue describing the refactorings implemented in HaRe
has been updated and is included in the doc/ directory.

This means that our basic platform is now fairly complete
(type-awareness is the next big step), and that in future we can
hopefully focus a bit more on extending the range of refactorings,
and the range of our collaborations. 

To this end, we are organising a one-day workshop here in
Canterbury, on Monday, 09 February 2004:


If you'd be interested in participating, please let us know.

Happy Refactoring!

  The HaRe Team (Huiqing Li, Claus Reinke, Simon Thompson)

  project email: refactor-fp (at kent.ac.uk)



  Refactoring is the process of changing the structure of programs
  without changing their functionality, i.e., refactorings are
  meaning-preserving program transformations that implement design
  changes. For more details about refactoring, about our project and
  for background on HaRe, see our project pages and the
  papers/presentations/catalogue/demo/etc. available there, especially
  our contribution to last year's Haskell Workshop.

HaRe - the Haskell Refactorer:

  HaRe is our prototype tool supporting a first few basic refactorings
  for Haskell 98 (see README.txt for known issues and limitations).

  It is implemented as a separate refactoring engine (on top of
  Programatica's Haskell frontend and Strafunski's generic traversal
  strategy library), with small scripting frontends that call this
  engine from either Vim or Emacs. The refactoring engine itself has
  been seen to build (with ghc-6.0.1) and run on most flavours of
  Windows (cygwin needed to build) and on Suns (binutils recommended
  to build), so we expect it to build and work on other unix-like
  platforms with almost no changes.  

  In other words, we've tried to make sure that most of you should be
  able to build and use HaRe from your favourite OS/editor. 

  Currently supported refactorings: 

     removeDef      : remove an unused definition
     duplicateDef   : duplicate a definition under a new name

     liftToTopLevel : move a local definition to top level
     liftOneLevel   : move a local definition one level up
     demote         : move a definition local to point of use

     rename         : rename an identifier
     introNewDef    : turn expression into use of new definition
     unfoldDef      : replace use of identifier by right-hand side

     addOneParameter: add parameter to definition
     rmOneParameter : remove unused parameter from definition
     generaliseDef  : turn expression on rhs of definition into 
                      new parameter of that definition

  A series of screenshots illustrating some of the tasks one might
  want to accomplish with these refactorings can be found via the 
  HaRe page (see above for URL).

Caveats (see also README.txt):

  Please keep in mind that this is a prototype, so we do not recommend
  to use it on your productions sources just yet. Just play with it
  to get an idea of tool-supported refactoring in Haskell, and send us
  your feedback and bug-reports. Our goal is to develop this into a
  tool that many of you will find indispensible for Haskell
  development, and while we won't be able to follow every suggestion,
  we've got about 1.5 more years in which to work towards this goal!-)


  Functionally, HaRe 0.1 was still roughly the snapshot you'd seen at 
  the Haskell workshop, packaged up for relative ease of build/use,
  but unaware of types and modules, and all refactorings only working 
  on a single module. It had some annoying issues that plagued some 
  of our Emacs users, didn't work at all with literate Haskell
  files, and had several other minor problems.

  HaRe 0.2 has not added refactorings, but all refactorings have
  now been modified to take Haskell's module system into account.
  This means that a single refactoring may affect multiple modules
  in a given project (e.g., renaming an exported function should
  trigger corresponding renamings in all client modules that are
  part of the current project), that export/import lists have 
  to be respected or adapted, and that generally the refactorings
  should now work in multi-module settings.

  Beyond these major changes, several issues in the Emacs version of
  the user interface have been ironed out, there is initial support 
  for literate Haskell files, and lots of smaller issues have been
  dealt with (see README.txt for a few more details).

  Interim snapshots have been available since December last year,
  and some of you have already played with those. The earliest
  snapshots were somewhat buggy, but over the last weeks the software
  has stabilised to the extent that we are back to Bug 0 (aka:
  insufficient test-coverage!-), and the time has come to distribute
  the current snapshot more widely.

More information about the Haskell mailing list