DrIFT Homepage

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 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.


Currently supported derivations include:
   Binary              Data.Binary binary encoding of terms
   BitsBinary          bit based binary encoding of terms
   GhcBinary           byte oriented binary encoding compatable withoriented binary encoding compatable with oriented binary encoding compatable with older binary libraries
   Arbitrary           Derive reasonable Arbitrary for QuickCheck
   Observable          HOOD observable
   NFData              provides 'rnf' to reduce to normal form (deepSeq)
   Typeable            derive Typeable for Dynamic
   Foldable            derive instance for Data.Foldable
   Functor             derive reasonable Functor instance
   FunctorM            derive reasonable fmapM implementation
   HFoldable           Strafunski hfoldr
   Monoid              derive reasonable Data.Monoid implementation
   RMapM               derive reasonable rmapM implementation
   Term                Strafunski representation via Dynamic
   Traversable         derive instance for Data.Traversable
   ATermConvertible    encode terms in the ATerm format
   Haskell2Xml         encode terms as XML (HaXml<=1.13)
   XmlContent          encode terms as XML (HaXml>=1.14)
   Parse               parse values back from standard 'Show'
   Query               provide a QueryFoo class with 'is', 'has', 'from', and 'get' routines
   from                provides fromFoo for each constructor
   get                 for label 'foo' provide foo_g to get it
   has                 hasfoo for record types
   is                  provides isFoo for each constructor
   test                output raw data for testing
   un                  provides unFoo for unary constructors
   update              for label 'foo' provides 'foo_u' to update it and foo_s to set it



*** Download Directory ***

Darcs Repository

Darcs is the revision control system used for the development of DrIFT.

You may Browse the darcs Repository or fetch the development version with the command

darcs get http://repetae.net/repos/DrIFT

You can learn more about darcs at the darcs homepage

The changelog of the project is also available as a RSS feed

Other pages related to DrIFT

My Homepage -> Computer Stuff -> Haskell Page -> DrIFT Homepage