-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | A program and library to derive instances for data types
--   
--   Data.Derive is a library and a tool for deriving instances for Haskell
--   programs. It is designed to work with custom derivations, SYB and
--   Template Haskell mechanisms. The tool requires GHC, but the generated
--   code is portable to all compilers. We see this tool as a competitor to
--   DrIFT.
@package derive
@version 2.6.3

-- | Compatibility definitions to paper over differences between 6.10 and
--   6.12.
module Language.Haskell.TH.Compat
fromTyVar :: TyVarBndr -> Name
instanceD :: Cxt -> Type -> [Dec] -> Dec
dataDefinitionTypeArgs :: Dec -> [Name]
from_cxt :: Type -> Name
typeToPred :: Type -> Type

-- | The core module of the Data.Derive system. This module contains the
--   data types used for communication between the extractors and the
--   derivors.
module Language.Haskell.TH.Data
type DataDef = Dec
type CtorDef = Con
dataName :: DataDef -> String
qualifiedDataName :: DataDef -> Name
dataArity :: DataDef -> Int
dataArgs :: DataDef -> [Name]
dataCtors :: DataDef -> [CtorDef]
ctorName :: CtorDef -> String
qualifiedCtorName :: CtorDef -> Name
ctorArity :: CtorDef -> Int
ctorStrictTypes :: CtorDef -> [StrictType]
ctorTypes :: CtorDef -> [Type]
ctorFields :: CtorDef -> [String]
dropModule :: String -> String
dropNumber :: String -> String
normData :: DataDef -> DataDef
unqualifiedName :: Name -> String
typeApp :: Type -> (Type, [Type])
eqConT :: String -> Type -> Bool
isTupleT :: Type -> Bool

-- | Expand type synonyms in data declarations.
--   
--   This is needed for some type based derivations.
module Language.Haskell.TH.ExpandSynonym

-- | Expand type synonyms in a data declaration
expandData :: DataDef -> Q DataDef

-- | These small short-named functions are intended to make the
--   construction of abstranct syntax trees less tedious.
module Language.Haskell.TH.Helper
applyWith :: Exp -> [Exp] -> Exp
foldl1With :: Exp -> [Exp] -> Exp
foldr1With :: Exp -> [Exp] -> Exp

-- | A simple clause, without where or guards.
sclause :: [Pat] -> Exp -> Clause

-- | A default clause with N arguments.
defclause :: Int -> Exp -> Clause

-- | A simple Val clause
sval :: Pat -> Exp -> Dec
case' :: Exp -> [(Pat, Exp)] -> Exp
(->:) :: String -> Exp -> Exp

-- | We provide 3 standard instance constructors instance_default requires
--   C for each free type variable instance_none requires no context
--   instance_context requires a given context
instance_none :: String -> DataDef -> [Dec] -> Dec
instance_default :: String -> DataDef -> [Dec] -> Dec
instance_context :: [String] -> String -> DataDef -> [Dec] -> Dec

-- | Build an instance of a class for a data type, using the heuristic that
--   the type is itself required on all type arguments.
simple_instance :: String -> DataDef -> [Dec] -> [Dec]

-- | Build an instance of a class for a data type, using the class at the
--   given types
generic_instance :: String -> DataDef -> [Type] -> [Dec] -> [Dec]

-- | Build a type signature declaration with a string name
sigN :: String -> Type -> Dec

-- | Build a fundecl with a string name
funN :: String -> [Clause] -> Dec
class Eq nm => NameLike nm
toName :: NameLike nm => nm -> Name

-- | The class used to overload lifting operations. To reduce code
--   duplication, we overload the wrapped constructors (and everything
--   else, but that's irrelevant) to work in patterns, expressions, and
--   types.
class Valcon a

-- | Build an application node, with a name for a head and a provided list
--   of arguments.
lK :: (Valcon a, NameLike nm) => nm -> [a] -> a

-- | Reference a named variable.
vr :: (Valcon a, NameLike nm) => nm -> a

-- | Lift a TH Lit
raw_lit :: Valcon a => Lit -> a

-- | Tupling
tup :: Valcon a => [a] -> a

-- | Listing
lst :: Valcon a => [a] -> a

-- | Build an application node without a given head
app :: Exp -> [Exp] -> Exp

-- | This class is used to overload literal construction based on the type
--   of the literal.
class LitC a
lit :: (LitC a, Valcon p) => a -> p
dataVars :: DataDef -> [Type]

-- | Common pattern: list of a familiy of variables
vars :: Valcon a => Char -> Int -> [a]

-- | Variable based on a letter + number
vrn :: Valcon a => Char -> Int -> a

-- | Make a list of variables, one for each argument to a constructor
ctv :: Valcon a => CtorDef -> Char -> [a]

-- | Make a simple pattern to bind a constructor
ctp :: Valcon a => CtorDef -> Char -> a

-- | Reference the constructor itself
ctc :: Valcon a => CtorDef -> a
l0 :: (NameLike nm, Valcon a) => nm -> a
l1 :: (NameLike nm, Valcon a) => nm -> a -> a
l2 :: (NameLike nm, Valcon a) => nm -> a -> a -> a
true :: Valcon a => a
false :: Valcon a => a
nil :: Valcon a => a
hNil' :: Type
hZero' :: Type
unit :: Exp
id' :: Exp
cons :: Valcon a => a -> a -> a
box :: Valcon a => a -> a
return' :: Exp -> Exp
const' :: Exp -> Exp
hSucc' :: Type -> Type
(==:) :: Exp -> Exp -> Exp
(&&:) :: Exp -> Exp -> Exp
(++:) :: Exp -> Exp -> Exp
(>>=:) :: Exp -> Exp -> Exp
(>>:) :: Exp -> Exp -> Exp
(.:) :: Exp -> Exp -> Exp
ap' :: Exp -> Exp -> Exp
(>:) :: Exp -> Exp -> Exp
hCons' :: Type -> Type -> Type

-- | Build a chain of expressions, with an appropriate terminal sequence__
--   does not require a unit at the end (all others are optimised
--   automatically)
(&&::) :: [Exp] -> Exp

-- | Build a chain of expressions, with an appropriate terminal sequence__
--   does not require a unit at the end (all others are optimised
--   automatically)
(++::) :: [Exp] -> Exp

-- | Build a chain of expressions, with an appropriate terminal sequence__
--   does not require a unit at the end (all others are optimised
--   automatically)
(>>::) :: [Exp] -> Exp

-- | Build a chain of expressions, with an appropriate terminal sequence__
--   does not require a unit at the end (all others are optimised
--   automatically)
sequence__ :: [Exp] -> Exp

-- | Build a chain of expressions, with an appropriate terminal sequence__
--   does not require a unit at the end (all others are optimised
--   automatically)
(.::) :: [Exp] -> Exp

-- | K-way liftM
liftmk :: Exp -> [Exp] -> Exp
instance Language.Haskell.TH.Helper.NameLike Language.Haskell.TH.Syntax.Name
instance Language.Haskell.TH.Helper.NameLike GHC.Base.String
instance Language.Haskell.TH.Helper.Valcon Language.Haskell.TH.Syntax.Exp
instance Language.Haskell.TH.Helper.Valcon Language.Haskell.TH.Syntax.Pat
instance Language.Haskell.TH.Helper.Valcon Language.Haskell.TH.Syntax.Type
instance Language.Haskell.TH.Helper.LitC GHC.Integer.Type.Integer
instance Language.Haskell.TH.Helper.LitC GHC.Types.Char
instance Language.Haskell.TH.Helper.LitC a => Language.Haskell.TH.Helper.LitC [a]
instance (Language.Haskell.TH.Helper.LitC a, Language.Haskell.TH.Helper.LitC b) => Language.Haskell.TH.Helper.LitC (a, b)
instance (Language.Haskell.TH.Helper.LitC a, Language.Haskell.TH.Helper.LitC b, Language.Haskell.TH.Helper.LitC c) => Language.Haskell.TH.Helper.LitC (a, b, c)
instance Language.Haskell.TH.Helper.LitC ()

module Language.Haskell.TH.Peephole
peephole :: Data a => a -> a
replaceVar :: Name -> Exp -> Exp -> Exp
replaceVars :: [(Name, Exp)] -> Exp -> Exp

module Language.Haskell.TH.All

-- | The type of ways to derive classes. Should not really be in this
--   module!
data Derivation
Derivation :: (DataDef -> Q [Dec]) -> String -> Derivation

-- | The derivation function proper
[derivationDeriver] :: Derivation -> DataDef -> Q [Dec]

-- | The name of the derivation
[derivationName] :: Derivation -> String
derivation :: (DataDef -> [Dec]) -> String -> Derivation
derivationQ :: (DataDef -> Q [Dec]) -> String -> Derivation

module Language.Haskell
(?) :: Bool -> a -> a -> a
infix 1 ?
foralls :: Type () -> Type ()
tyApps :: Type () -> [Type ()] -> Type ()
fromTyApps :: Type () -> (Type (), [Type ()])
fromTyTuple :: Type t -> [Type t]
fromTyParen :: Type () -> Type ()
fromTyParens :: Type () -> Type ()
tyRoot :: Type () -> String
isTyFun :: Type () -> Bool
isTyParen :: Type t -> Bool
fromTyList :: Type t -> Maybe (Type t)
(~=) :: Pretty a => a -> String -> Bool
appP :: Exp () -> Exp () -> Exp ()
simplify :: Data a => a -> a
isGuardFalse :: Match t -> Bool
rename :: QName () -> QName ()
isAtom :: Exp t -> Bool
paren :: Exp () -> Exp ()
sl :: SrcLoc
noSl :: Data from => from -> from
isIdent :: [Char] -> Bool
title :: [Char] -> [Char]
qname :: String -> QName ()
var :: String -> Exp ()
con :: String -> Exp ()
tyVar :: String -> Type ()
tyVarBind :: String -> TyVarBind ()
tyCon :: String -> Type ()
pVar :: String -> Pat ()
qvop :: String -> QOp ()
dataDeclType :: DataDecl -> Type ()
dataDeclFields :: DataDecl -> [String]
type DataDecl = Decl ()
type CtorDecl = Either (QualConDecl ()) (GadtDecl ())
type FieldDecl = [(String, Type ())]
type FullDataDecl = (ModuleName (), DataDecl)
moduleName :: Module t -> ModuleName t
moduleDecls :: Module t -> [Decl t]
moduleImports :: Module t -> [ImportDecl t]
modulePragmas :: Module t -> [ModulePragma t]
showDecls :: Pretty a => [a] -> String
tyApp :: Type () -> [Type ()] -> Type ()
tyFun :: [Type ()] -> Type ()
apps :: Exp () -> [Exp ()] -> Exp ()
bind :: String -> [Pat ()] -> Exp () -> Decl ()
binds :: String -> [([Pat ()], Exp ())] -> Decl ()
isDataDecl :: Decl () -> Bool
dataDeclName :: DataDecl -> String
fromDeclHead :: DeclHead a -> (Name a, [TyVarBind a])
fromIParen :: InstRule a -> InstRule a
fromInstHead :: InstHead a -> (QName a, [Type a])
dataDeclVars :: DataDecl -> [String]
dataDeclVarsStar :: DataDecl -> [String]
dataDeclArity :: DataDecl -> Int
dataDeclCtors :: DataDecl -> [CtorDecl]
ctorDeclName :: CtorDecl -> String
ctorDeclName' :: CtorDecl -> Name ()
ctorDeclFields :: CtorDecl -> FieldDecl
ctorDeclArity :: CtorDecl -> Int
declName :: Decl () -> String

module Language.Haskell.Convert
class (Typeable a, Typeable b, Show a, Show b) => Convert a b
convert :: forall a b. Convert a b => a -> b
instance Language.Haskell.Convert.Convert a b => Language.Haskell.Convert.Convert [a] [b]
instance Language.Haskell.Convert.Convert Language.Haskell.TH.Syntax.Dec (Language.Haskell.Exts.Syntax.Decl ())
instance Language.Haskell.Convert.Convert Language.Haskell.TH.Syntax.Cxt (Language.Haskell.Exts.Syntax.Context ())
instance Language.Haskell.Convert.Convert (GHC.Base.Maybe (Language.Haskell.Exts.Syntax.Context ())) Language.Haskell.TH.Syntax.Cxt
instance Language.Haskell.Convert.Convert Language.Haskell.TH.Syntax.Name (Language.Haskell.Exts.Syntax.TyVarBind ())
instance Language.Haskell.Convert.Convert Language.Haskell.TH.Syntax.Name (Language.Haskell.Exts.Syntax.Name ())
instance Language.Haskell.Convert.Convert Language.Haskell.TH.Syntax.Name (Language.Haskell.Exts.Syntax.QName ())
instance Language.Haskell.Convert.Convert Language.Haskell.TH.Syntax.Con (Language.Haskell.Exts.Syntax.QualConDecl ())
instance Language.Haskell.Convert.Convert Language.Haskell.TH.Syntax.Con (Language.Haskell.Exts.Syntax.ConDecl ())
instance Language.Haskell.Convert.Convert Language.Haskell.TH.Syntax.StrictType (Language.Haskell.Exts.Syntax.Type ())
instance Language.Haskell.Convert.Convert Language.Haskell.TH.Syntax.Type (Language.Haskell.Exts.Syntax.Type ())
instance Language.Haskell.Convert.Convert Language.Haskell.TH.Syntax.Type (Language.Haskell.Exts.Syntax.Asst ())
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.Decl ()) Language.Haskell.TH.Syntax.Dec
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.QualConDecl ()) Language.Haskell.TH.Syntax.Con
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.ConDecl ()) Language.Haskell.TH.Syntax.Con
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.FieldDecl ()) [Language.Haskell.TH.Syntax.VarStrictType]
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.Type ()) Language.Haskell.TH.Syntax.StrictType
instance Language.Haskell.Convert.Convert ([Language.Haskell.Exts.Syntax.Name ()], Language.Haskell.Exts.Syntax.Type ()) [Language.Haskell.TH.Syntax.VarStrictType]
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.Asst ()) Language.Haskell.TH.Syntax.Type
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.Type ()) Language.Haskell.TH.Syntax.Type
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.Name ()) Language.Haskell.TH.Syntax.Name
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.Match ()) Language.Haskell.TH.Syntax.Clause
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.Rhs ()) Language.Haskell.TH.Syntax.Body
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.Exp ()) Language.Haskell.TH.Syntax.Exp
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.GuardedRhs ()) (Language.Haskell.TH.Syntax.Guard, Language.Haskell.TH.Syntax.Exp)
instance Language.Haskell.Convert.Convert [Language.Haskell.Exts.Syntax.Stmt ()] Language.Haskell.TH.Syntax.Guard
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.Binds ()) [Language.Haskell.TH.Syntax.Dec]
instance Language.Haskell.Convert.Convert (GHC.Base.Maybe (Language.Haskell.Exts.Syntax.Binds ())) [Language.Haskell.TH.Syntax.Dec]
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.Pat ()) Language.Haskell.TH.Syntax.Pat
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.Literal ()) Language.Haskell.TH.Syntax.Lit
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.QName ()) Language.Haskell.TH.Syntax.Name
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.PatField ()) Language.Haskell.TH.Syntax.FieldPat
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.QOp ()) Language.Haskell.TH.Syntax.Exp
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.Alt ()) Language.Haskell.TH.Syntax.Match
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.Stmt ()) Language.Haskell.TH.Syntax.Stmt
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.QualStmt ()) Language.Haskell.TH.Syntax.Stmt
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.FieldUpdate ()) Language.Haskell.TH.Syntax.FieldExp
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.TyVarBind ()) Language.Haskell.TH.Syntax.Name
instance Language.Haskell.Convert.Convert Language.Haskell.TH.Syntax.TyVarBndr (Language.Haskell.Exts.Syntax.TyVarBind ())
instance Language.Haskell.Convert.Convert Language.Haskell.TH.Syntax.Kind (Language.Haskell.Exts.Syntax.Kind ())
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.TyVarBind ()) Language.Haskell.TH.Syntax.TyVarBndr
instance Language.Haskell.Convert.Convert (Language.Haskell.Exts.Syntax.Kind ()) Language.Haskell.TH.Syntax.Kind

module Data.Derive.DSL.HSE
sample :: Input
outEq :: Out -> Out -> Bool
showOut :: Pretty a => [a] -> String
type Input = DataDecl
type Ctor = CtorDecl
dataName :: DataDecl -> String
dataVars :: DataDecl -> Int
dataCtors :: DataDecl -> [CtorDecl]
ctorName :: CtorDecl -> String
ctorArity :: CtorDecl -> Integer
ctorIndex :: Input -> Ctor -> Integer
toInput :: DataDecl -> Input
type Out = [Decl ()]
data Output
OString :: String -> Output
OInt :: Integer -> Output
OApp :: String -> [Output] -> Output
OList :: [Output] -> Output
OIgnore :: Output
OCustom :: String -> Output
toOutput :: Data a => a -> Output
fromOutput :: Data a => Output -> a
coerce :: (Typeable * a, Typeable * a1) => a1 -> a
readCon :: DataType -> [Char] -> Constr
out :: Data a => a -> Output
fromState :: State a x -> x
instance Data.Data.Data Data.Derive.DSL.HSE.Output
instance GHC.Show.Show Data.Derive.DSL.HSE.Output
instance GHC.Classes.Eq Data.Derive.DSL.HSE.Output

module Data.Derive.DSL.DSL
data DSL
App :: String -> DSL -> DSL
Concat :: DSL -> DSL
Reverse :: DSL -> DSL
String :: String -> DSL
ShowInt :: DSL -> DSL
Int :: Integer -> DSL
List :: [DSL] -> DSL
MapField :: DSL -> DSL
MapCtor :: DSL -> DSL
DataName :: DSL
CtorName :: DSL
CtorIndex :: DSL
CtorArity :: DSL
FieldIndex :: DSL
Fold :: DSL -> DSL -> DSL
Head :: DSL
Tail :: DSL
Instance :: [String] -> String -> DSL -> DSL
Application :: DSL -> DSL
box :: DSL -> DSL
nil :: DSL
append :: DSL -> DSL -> DSL
fromOut :: Output -> DSL
simplifyDSL :: DSL -> DSL
prettyTex :: DSL -> String
instance GHC.Show.Show Data.Derive.DSL.DSL.DSL
instance Data.Data.Data Data.Derive.DSL.DSL.DSL

module Data.Derive.DSL.SYB
dslSYB :: DSL -> Maybe Out

module Data.Derive.DSL.Apply
apply :: DSL -> Input -> Out
applyEnv :: DSL -> Env -> Output
env :: Env
data Env
Env :: Input -> Ctor -> Integer -> (Output, Output) -> Env
[envInput] :: Env -> Input
[envCtor] :: Env -> Ctor
[envField] :: Env -> Integer
[envFold] :: Env -> (Output, Output)

module Data.Derive.DSL.Derive
derive :: Out -> [DSL]
instance GHC.Show.Show Data.Derive.DSL.Derive.Guess

module Data.DeriveDSL
data DSL
deriveDSL :: [Decl ()] -> Maybe DSL
applyDSL :: DSL -> DataDecl -> Either String [Decl ()]
dynamicDSL :: DSL -> Maybe [Decl ()]

module Data.Derive.Internal.Derivation
data Derivation
Derivation :: String -> (Type () -> (String -> Decl ()) -> FullDataDecl -> Either String [Decl ()]) -> Derivation
[derivationName] :: Derivation -> String
[derivationOp] :: Derivation -> Type () -> (String -> Decl ()) -> FullDataDecl -> Either String [Decl ()]
derivationParams :: String -> ([Type ()] -> (String -> Decl ()) -> FullDataDecl -> Either String [Decl ()]) -> Derivation
derivationCustom :: String -> (FullDataDecl -> Either String [Decl ()]) -> Derivation
derivationDSL :: String -> DSL -> Derivation
derivationCustomDSL :: String -> (FullDataDecl -> [Decl ()] -> [Decl ()]) -> DSL -> Derivation
customSplice :: (FullDataDecl -> Exp () -> Exp ()) -> (FullDataDecl -> [Decl ()] -> [Decl ()])
customContext :: (FullDataDecl -> Context () -> Context ()) -> (FullDataDecl -> [Decl ()] -> [Decl ()])

-- | For deriving Data on abstract data types.
module Data.Derive.DataAbstract
makeDataAbstract :: Derivation

module Data.Derive.Default
makeDefault :: Derivation
dslDefault :: DSL

module Data.Derive.EnumCyclic
makeEnumCyclic :: Derivation
dslEnumCyclic :: DSL

-- | A pseudo derivation. Derive a (non-recursive) fold function for the
--   type which takes one function per alternative constructor. Each
--   function takes the same arguments as the constructor and returns a
--   value. When applied to a value the fold function applies the function
--   for the matching constructor to the constructor fields. This provides
--   a first-class alternative to pattern matching to deconstruct the data
--   type.
module Data.Derive.Fold
makeFold :: Derivation

-- | A pseudo derivation. For each constructor in the data type, deriving
--   From generates fromCtorName which extracts
--   the components if given the appropriate constructor, and crashes
--   otherwise. Unlike the DrIFT "From" derivation, our version
--   works for all constructors - zero-arity constructors always return
--   (), arity-one constructors return the contained value, and
--   all others return a tuple with all the components.
module Data.Derive.From
makeFrom :: Derivation

-- | Has is a pseudo derivation. For each field of any constructor of the
--   data type, Has generates hasFieldName which returns
--   True if given the the given field is a member of the
--   constructor of the passed object, and False otherwise.
module Data.Derive.Has
makeHas :: Derivation

module Data.Derive.Is
makeIs :: Derivation

-- | Derive JSON instances.
--   
--   Unlike Text.JSON.Generics, single constructor types are not
--   handled specially. Every value is encoded as an object with a single
--   field, with the constructor name as key and the values as its
--   contents.
--   
--   If the constructor is a record, the contents is an Object with the
--   field names as keys. Otherwise, the contents is an array.
module Data.Derive.JSON

-- | Derivation for JSON
makeJSON :: Derivation

-- | A pseudo derivation. For each field in the data type, deriving
--   LazySet generates a function like a record updator, but lazy
--   where possible. This is very useful in certain situations to improve
--   laziness properties. A setter is only lazy if that field is present in
--   one constructor.
module Data.Derive.LazySet
makeLazySet :: Derivation

-- | A pseudo derivation. For each field in the data type, deriving
--   Lens generates lensFieldName = lens
--   fieldName ( x v -> v { fieldName =
--   x }).
--   
--   This works with the data-lens package.
module Data.Derive.Lens
makeLens :: Derivation

-- | Derives an instance of Monoid. It uses the product
--   construction of monoids. mappend on two different
--   constructors is undefined.
module Data.Derive.Monoid
makeMonoid :: Derivation

module Data.Derive.NFData
makeNFData :: Derivation
dslNFData :: DSL

-- | A pseudo derivation. For each field in the data type, deriving
--   Ref generates refFieldName = Ref { select
--   = fieldName , update = f v -> v {
--   fieldName = f (fieldName v) } }.
--   
--   This is intended for use with the compositional functional references
--   described in
--   http://www.haskell.org/pipermail/haskell-cafe/2007-June/026477.html.
module Data.Derive.Ref
makeRef :: Derivation

module Data.Derive.Serial
makeSerial :: Derivation
dslSerial :: DSL

module Data.Derive.Serialize
makeSerialize :: Derivation
dslSerialize :: DSL

-- | A pseudo derivation. For each field in the data type, deriving
--   Set generates setFieldName v x =
--   x{fieldName = v}. This derivation is intended to
--   work around the fact that in Haskell assigning to a field is not a
--   first class object (although extracting from a field is).
module Data.Derive.Set
makeSet :: Derivation

-- | Derive Uniplate and Biplate using the Direct combinators. You must
--   request monomorphic instances, i.e:
--   
--   
--   data Foo a = Foo a (Bool, a)
--   
--   {-!
--   deriving instance UniplateDirect (Foo Int)
--   deriving instance UniplateDirect (Bool, Int) Int
--   deriving instance UniplateDirect (Foo Int) Int
--   !-}
--   
--   
--   This will generate the instances Uniplate (Foo Int),
--   Biplate (Bool, Int) Int and Biplate (Foo Int) Int.
--   Generally, start with the instance you are after (e.g.
--   UniplateDirect (Foo Int)), try to compile and add further
--   instances as necessary. UniplateDirect with one argument
--   derives Uniplate, and with two arguments derives Biplate.
--   
--   deriving UniplateDirect on a data type with no arguments
--   derives Uniplate with all type parameters defaulting to ().
module Data.Derive.UniplateDirect
makeUniplateDirect :: Derivation
instance GHC.Classes.Eq Data.Derive.UniplateDirect.Ans
instance GHC.Show.Show Data.Derive.UniplateDirect.Ans

module Data.Derive.UniplateTypeable
makeUniplateTypeable :: Derivation
custom :: (t, DataDecl) -> [Decl ()] -> [Decl ()]

-- | A Pseudo derivation. For every label, creates a function foo_u and
--   foo_s which updates and sets the label respectively, e.g. 'foo_u (+1)
--   bar' or 'foo_s 10 baz'
module Data.Derive.Update
makeUpdate :: Derivation

module Data.Derive.Class.Default
class Default a
def :: Default a => a

module Data.Derive.Class.Arities
class Arities a
arities :: Arities a => a -> [Int]

module Data.Derive.Instance.Arities
instance Data.Data.Data d_type => Data.Derive.Class.Arities.Arities d_type

module Data.Derive.Bounded
makeBounded :: Derivation
dslBounded :: DSL

module Data.Derive.BinaryDefer
makeBinaryDefer :: Derivation
dslBinaryDefer :: DSL

module Data.Derive.Binary
makeBinary :: Derivation
dslBinary :: DSL

module Data.Derive.Arities
makeArities :: Derivation
dslArities :: DSL

module Data.Derive.ArbitraryOld
makeArbitraryOld :: Derivation
dslArbitraryOld :: DSL

module Data.Derive.Arbitrary
makeArbitrary :: Derivation

-- | This module provides convenience re-exports of all the standard
--   Data.Derive derivations.
module Data.Derive.All
data Derivation
derivations :: [Derivation]

-- | 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 )
--   
module Data.DeriveTH

-- | Derive an instance of some class. derive only derives
--   instances for the type of the argument.
derive :: Derivation -> Name -> Q [Dec]
derives :: [Derivation] -> [Name] -> Q [Dec]

-- | Derive an instance of some class. deriveFromDec only derives
--   instances for the type of the argument.
deriveFromDec :: Derivation -> Dec -> Q [Dec]

-- | Use this module to create your own derive program, supporting custom
--   derivations. As an example:
--   
--   
--   import Data.DeriveMain        (deriveMain)
--   import Data.Derive.All        (derivations)
--   import MyProject.MyDerivation (myDerivation)
--   
--   
--   
--   main :: IO
--   main = deriveMain $ [myDerivation] ++ derivations
--   
module Data.DeriveMain
deriveMain :: [Derivation] -> IO ()
