HAppS-Data-0.9.2.1: HAppS data manipulation librariesSource codeContentsIndex
HAppS.Data.DeriveAll
PortabilityNot portable
Stabilityexperimental
MaintainerAlexJacobson@HAppS.org
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 HAppS.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, Data and New.Data.

Example:

 $( deriveAll [''Show, ''Eq, ''Default] [d|
        data Foo a = Foo a
        data Bar = Baz | Quux
  |] )
deriveNewData :: [Name] -> Q [Dec]Source
deriveNewDataNoDefault :: [Name] -> Q [Dec]Source
Produced by Haddock version 2.1.0