DrIFT...
...once known as Derive
[machine generated code]

I've not got the time to actively maintain DrIFT at the moment. Happily, Malcolm Wallace has produced an updated implementation for Haskell 98. He writes
Other changes include the addition of a rule for deriving the "Binary"
class (available as a library for both nhc98 and ghc), and altering
Main.main to write its results to stdout instead of overwriting the
original file.

So far, I have only tested this version of DrIFT with nhc98 - I do not
have the latest version of ghc available.  Hence, it will probably
require a little bit of tweaking to be made completely portable.
The sources are here:
   
ftp://ftp.cs.york.ac.uk/pub/haskell/contrib/DrIFT-1.0-98.tar.gz


Introduction

DrIFT is a type sensitive preprocessor for Haskell.  It extracts type declarations and directives from modules. The directives cause rules to be fired on the parsed type declarations, generating new code which is then appended to the bottom of the input file. The rules are expressed as Haskell code, and it is intended that the user can add new rules as required.

DrIFT is written in Haskell 1.4, can be compliled using GHC 2.2 or higher, or interpreted using Hugs 1.4

So, what does DrIFTdo?

DrIFT automates instance derivation for classes that aren't supported by the standard compilers. In addition, instances can be produced in seperate modules to that containing the type declaration. This allows instances to be derived for a type after the original module has been compiled. As a bonus, simple utility functions can also be produced from a type.

Features

Browse the DrIFT Manual

DrIFT Distribution

I'd like to hear comments, criticism, or praise? from anybody using DrIFT . I'd be especially interested in any new rules written for it.  Feel free to suggest improvements or bug fixes too.
 

Progress

For some time I've been meaning to go back to the source code, rewriting & debugging sections of it.  I've still not gotten round to doing this, but plan to do so before Christmas 1998. Improvements planned include :

nww@dcs.gla.ac.uk