DrIFT

[an error occurred while processing this directive]

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.

Features

Currently supported derivations include:
Binary:                
   Binary              efficient binary encoding of terms
   GhcBinary           byte sized binary encoding of terms
Debugging:             
   Observable          HOOD observable
General:               
   NFData              provides 'rnf' to reduce to normal form (deepSeq)
   Typeable            derive Typeable for Dynamic
Generics:              
   HFoldable           Strafunski hfoldr
   Term                Strafunski representation via Dynamic
Prelude:               
   Bounded             
   Enum                
   Eq                  
   Ord                 
   Read                
   Show                
Representation:        
   ATermConvertible    encode terms in the ATerm format
   Haskell2Xml         encode terms as XML
Utility:               
   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


Documents

Download

*** Download Directory ***

Other pages related to DrIFT


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