- deriveTypeableFromMeta :: Name -> Q [Dec]
- declareTypeableFromMeta :: Kind -> Name -> Q [Dec]
- convertTypeIDToTypeRep :: TypeID -> TypeRep
Documentation
Used to derive instances of the Typeable
classes from the Meta
classes.
Requires the ScopedTypeVariables language option.
import Data.Type import Data.Type.Typeable data T (m :: * -> *) a = ... deriveMeta ''T deriveTypeableFromMeta ''T
Yields a Typeable
instance like:
instance (MetaX m) => Typeable1 (T m) where ...
The template haskell funtions in this module expect to find symbols exported from Data.Type
module under Data.Type
. Thus change:
import qualified Data.Type as T
Into:
import qualified Data.Type import qualified Data.Type as T
It would be possible to drop this requirement, but currently not without bloating the library unnecessarily.