Portability | Not portable |
---|---|
Stability | experimental |
Maintainer | [email protected] |
Safe Haskell | None |
Happstack.Data.DeriveAll
Description
Documentation
deriveAll :: [Name] -> Q [Dec] -> Q [Dec]Source
The deriveAll
function takes a list of classes to derive and
a block of declarations. It will additionally derive instances for
Typeable, Old.Data and New.Data.
Example:
$( deriveAll [''Show, ''Eq, ''Default] [d| data Foo a = Foo a data Bar = Baz | Quux |] )
deriveNewData :: [Name] -> Q [Dec]Source
Derives instances for syb-with-class's Data class and Happstack.Data.Default's Default class. The list of names should be of the form [''Foo,''Bar,..]
deriveNewDataNoDefault :: [Name] -> Q [Dec]Source
Derives instances for syb-with-class's Data class only. The list of names should be of the form [''Foo,''Bar,..]