happstack-data-0.4.1: Happstack data manipulation librariesSource codeContentsIndex
Happstack.Data.DeriveAll
PortabilityNot portable
Stabilityexperimental
Maintainerhapps@googlegroups.com
Description
Concisely specify which classes to derive for your datatypes. As well as the standard derivable classes, it can also derive syb-with-class's New.Data class and Happstack.Data.Default's Default class.
Synopsis
deriveAll :: [Name] -> Q [Dec] -> Q [Dec]
deriveNewData :: [Name] -> Q [Dec]
deriveNewDataNoDefault :: [Name] -> Q [Dec]
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,..]
Produced by Haddock version 2.6.1