Safe Haskell | None |
---|---|
Language | Haskell2010 |
Utilities for reifying simplified datatype info. It omits details that aren't usually relevant to generating instances that work with the datatype. This makes it easier to use TH to derive instances.
Documentation
Simplified info about a DataD
. Omits deriving, strictness, and
kind info.
reifyDataType :: Name -> Q DataType Source #
Reify the given data or newtype declaration, and yields its
DataType
representation.
conToDataCons :: Con -> [DataCon] Source #
reifyDataTypeSubstituted :: Type -> Q DataType Source #
Like reifyDataType
, but takes a Type
instead of just the Name
of the datatype. It expects a normal datatype argument (see
typeToNamedCon
).