DrIFT 2.2.1

DrIFT is a type sensitive preprocessor for Haskell.
DrIFT is a type sensitive preprocessor for Haskell. The project 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.

Here are some key features of "DrIFT":

DrIFT comes with a set of rules to produce instances for all derivable classes given in the Hasekell Prelude. There are also a number of extra useful rules to derive instances of a variety of useful classes.
DrIFT performs import chasing to find the definition of a type.
Code is generated using pretty-printing combinators. This means that the output is (fairly) well formatted, and easy on the eye.
Effort has been made to make the rule interface as easy to use as possible. This is to allow users to add rules to generate code specific to their own projects. As the rules are themselves written in Haskell, the user doesn't have to learn a new language to express rules.

Currently supported derivations include:

Binary:
Binary Data.Binary binary encoding of terms
BitsBinary efficient binary encoding of terms
GhcBinary byte sized binary encoding of terms
Debugging:
Arbitrary Derive reasonable Arbitrary for QuickCheck
Observable HOOD observable
General:
NFData provides 'rnf' to reduce to normal form (deepSeq)
Typeable derive Typeable for Dynamic
Generics:
FunctorM derive reasonable fmapM implementation
HFoldable Strafunski hfoldr
Monoid derive reasonable Data.Monoid implementation
RMapM derive reasonable rmapM implementation
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 (HaXml=1.14)
Utility:
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

What's New in This Release:

Numerous enhancements and bugfixes.

last updated on:
January 18th, 2008, 9:14 GMT
price:
FREE!
developed by:
John Meacham
homepage:
repetae.net
license type:
BSD License 
category:
ROOT \ Programming \ Preprocessors

FREE!

In a hurry? Add it to your Download Basket!

user rating 17

2.3/5
 

0/5

Rate it!

Add your review!

SUBMIT