DrIFT

DrIFT is a type sensitive preprocessor for Haskell.
Download

DrIFT Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • John Meacham
  • Publisher web site:
  • http://repetae.net/computer/haskell/DrIFT/

DrIFT Tags


DrIFT Description

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 termsDebugging: Arbitrary Derive reasonable Arbitrary for QuickCheck Observable HOOD observableGeneral: NFData provides 'rnf' to reduce to normal form (deepSeq) Typeable derive Typeable for DynamicGenerics: FunctorM derive reasonable fmapM implementation HFoldable Strafunski hfoldr Monoid derive reasonable Data.Monoid implementation RMapM derive reasonable rmapM implementation Term Strafunski representation via DynamicPrelude: 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 itWhat's New in This Release:· Numerous enhancements and bugfixes.


DrIFT Related Software