derive-0.1: A program and library to derive instances for data typesContentsIndex
Language.Haskell.TH.Data
Contents
Depreciated, old type stuff
Description
The core module of the Data.Derive system. This module contains the data types used for communication between the extractors and the derivors.
Synopsis
type DataDef = Dec
type CtorDef = Con
dataName :: DataDef -> String
dataArity :: DataDef -> Int
dataCtors :: DataDef -> [CtorDef]
ctorName :: CtorDef -> String
ctorArity :: CtorDef -> Int
ctorStrictTypes :: CtorDef -> [StrictType]
ctorTypes :: CtorDef -> [Type]
ctorFields :: CtorDef -> [String]
dropModule :: String -> String
normData :: DataDef -> DataDef
typeApp :: Type -> (Type, [Type])
eqConT :: String -> Type -> Bool
isTupleT :: Type -> Bool
data RType = RType {
typeCon :: TypeCon
typeArgs :: [RType]
}
data TypeCon
= TypeCon String
| TypeArg Int
ctorRTypes :: DataDef -> CtorDef -> [RType]
ex_type :: DataDef -> Type -> RType
ex_args :: DataDef -> [Name]
Documentation
type DataDef = Dec
type CtorDef = Con
dataName :: DataDef -> String
dataArity :: DataDef -> Int
dataCtors :: DataDef -> [CtorDef]
ctorName :: CtorDef -> String
ctorArity :: CtorDef -> Int
ctorStrictTypes :: CtorDef -> [StrictType]
ctorTypes :: CtorDef -> [Type]
ctorFields :: CtorDef -> [String]
dropModule :: String -> String
normData :: DataDef -> DataDef
typeApp :: Type -> (Type, [Type])
eqConT :: String -> Type -> Bool
isTupleT :: Type -> Bool
Depreciated, old type stuff
data RType
Constructors
RType
typeCon :: TypeCon
typeArgs :: [RType]
show/hide Instances
data TypeCon
A referencing type which is not itself an application.
Constructors
TypeCon StringA type defined elsewhere, free in the data declaration.
TypeArg IntA reference to a type bound by the type constructor; the argument to TypeArg is the index of the type argument, counting from zero at the left.
show/hide Instances
ctorRTypes :: DataDef -> CtorDef -> [RType]
ex_type :: DataDef -> Type -> RType
ex_args :: DataDef -> [Name]
Produced by Haddock version 0.8