derive-2.5.8: A program and library to derive instances for data types

Safe HaskellSafe-Infered

Data.DeriveTH

Description

The main TH driver module. It is intended that this need be the only module imported by user code; it takes care of all data threading issues such that all one needs to do is:

   data Foo = Foo ; $( derive makeEq ''Foo )

Synopsis

Documentation

derive :: Derivation -> Name -> Q [Dec]Source

Derive an instance of some class. derive only derives instances for the type of the argument.

deriveFromDec :: Derivation -> Dec -> Q [Dec]Source

Derive an instance of some class. deriveFromDec only derives instances for the type of the argument.