th-orphans-0.13.14: Orphan instances for TH datatypes

Copyright | (c) Matt Morrow 2008
License | BSD3
Maintainer | Michael Sloan <mgsloan at gmail>
Stability | experimental
Portability | portable (template-haskell)
Safe Haskell | Safe-Inferred
Language | Haskell2010

Language.Haskell.TH.Instances

Contents

- Orphan instances

Description

It provides the following instances:

- `Ord`, `Lift`, `Generic`, `Show`, `Eq`, `Data`, `Typeable`, `Ppr`, instances for the datatypes in Language.Haskell.TH
- `Lift` instances for Data.Word / Data.Int types
- `Applicative` for `Q`
- `Quasi` for `ReaderT`, `WriterT`, `StateT`, and `RWST`.
- `Typeable` for `Lift`, `NameIs`, `Ppr`, `PprM`, `Q`, `Quasi`, `QuasiQuoter`, and `TExp`

More recent versions of template-haskell, particularly 2.10 (GHC 7.10), provide these instances. However, in order to support older versions you should import this module.

Note that the `Ord` instances are not guaranteed to produce consistent results across template-haskell / GHC versions, as they have different data types, with different constructor orders.

This module also implicitly re-exports the instances defined in Instances.TH.Lift. This is mostly to ensure that there aren't collisions of orphans between `th-orphans` and `th-lift-instances`.

# Orphan instances

Lift AnnTarget Source # |
Instance details Methods lift :: Quote m => AnnTarget -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => AnnTarget -> Code m AnnTarget Source #
Lift Bang Source # |
Instance details Methods lift :: Quote m => Bang -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Bang -> Code m Bang Source #
Lift Body Source # |
Instance details Methods lift :: Quote m => Body -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Body -> Code m Body Source #
Lift Bytes Source # |
Instance details Methods lift :: Quote m => Bytes -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Bytes -> Code m Bytes Source #
Lift Callconv Source # |
Instance details Methods lift :: Quote m => Callconv -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Callconv -> Code m Callconv Source #
Lift Clause Source # |
Instance details Methods lift :: Quote m => Clause -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Clause -> Code m Clause Source #
Lift Con Source # |
Instance details Methods lift :: Quote m => Con -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Con -> Code m Con Source #
Lift Dec Source # |
Instance details Methods lift :: Quote m => Dec -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Dec -> Code m Dec Source #
Lift DerivClause Source # |
Instance details Methods lift :: Quote m => DerivClause -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => DerivClause -> Code m DerivClause Source #
Lift DerivStrategy Source # |
Instance details Methods lift :: Quote m => DerivStrategy -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => DerivStrategy -> Code m DerivStrategy Source #
Lift Exp Source # |
Instance details Methods lift :: Quote m => Exp -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Exp -> Code m Exp Source #
Lift FamilyResultSig Source # |
Instance details Methods lift :: Quote m => FamilyResultSig -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => FamilyResultSig -> Code m FamilyResultSig Source #
Lift Fixity Source # |
Instance details Methods lift :: Quote m => Fixity -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Fixity -> Code m Fixity Source #
Lift FixityDirection Source # |
Instance details Methods lift :: Quote m => FixityDirection -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => FixityDirection -> Code m FixityDirection Source #
Lift Foreign Source # |
Instance details Methods lift :: Quote m => Foreign -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Foreign -> Code m Foreign Source #
Lift FunDep Source # |
Instance details Methods lift :: Quote m => FunDep -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => FunDep -> Code m FunDep Source #
Lift Guard Source # |
Instance details Methods lift :: Quote m => Guard -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Guard -> Code m Guard Source #
Lift Info Source # |
Instance details Methods lift :: Quote m => Info -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Info -> Code m Info Source #
Lift InjectivityAnn Source # |
Instance details Methods lift :: Quote m => InjectivityAnn -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => InjectivityAnn -> Code m InjectivityAnn Source #
Lift Inline Source # |
Instance details Methods lift :: Quote m => Inline -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Inline -> Code m Inline Source #
Lift Lit Source # |
Instance details Methods lift :: Quote m => Lit -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Lit -> Code m Lit Source #
Lift Loc Source # |
Instance details Methods lift :: Quote m => Loc -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Loc -> Code m Loc Source #
Lift Match Source # |
Instance details Methods lift :: Quote m => Match -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Match -> Code m Match Source #
Lift Overlap Source # |
Instance details Methods lift :: Quote m => Overlap -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Overlap -> Code m Overlap Source #
Lift Pat Source # |
Instance details Methods lift :: Quote m => Pat -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Pat -> Code m Pat Source #
Lift PatSynArgs Source # |
Instance details Methods lift :: Quote m => PatSynArgs -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => PatSynArgs -> Code m PatSynArgs Source #
Lift PatSynDir Source # |
Instance details Methods lift :: Quote m => PatSynDir -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => PatSynDir -> Code m PatSynDir Source #
Lift Phases Source # |
Instance details Methods lift :: Quote m => Phases -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Phases -> Code m Phases Source #
Lift Pragma Source # |
Instance details Methods lift :: Quote m => Pragma -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Pragma -> Code m Pragma Source #
Lift Range Source # |
Instance details Methods lift :: Quote m => Range -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Range -> Code m Range Source #
Lift Role Source # |
Instance details Methods lift :: Quote m => Role -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Role -> Code m Role Source #
Lift RuleBndr Source # |
Instance details Methods lift :: Quote m => RuleBndr -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => RuleBndr -> Code m RuleBndr Source #
Lift RuleMatch Source # |
Instance details Methods lift :: Quote m => RuleMatch -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => RuleMatch -> Code m RuleMatch Source #
Lift Safety Source # |
Instance details Methods lift :: Quote m => Safety -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Safety -> Code m Safety Source #
Lift SourceStrictness Source # |
Instance details Methods lift :: Quote m => SourceStrictness -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => SourceStrictness -> Code m SourceStrictness Source #
Lift SourceUnpackedness Source # |
Instance details Methods lift :: Quote m => SourceUnpackedness -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => SourceUnpackedness -> Code m SourceUnpackedness Source #
Lift Specificity Source # |
Instance details Methods lift :: Quote m => Specificity -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Specificity -> Code m Specificity Source #
Lift Stmt Source # |
Instance details Methods lift :: Quote m => Stmt -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Stmt -> Code m Stmt Source #
Lift TyLit Source # |
Instance details Methods lift :: Quote m => TyLit -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => TyLit -> Code m TyLit Source #
Lift TySynEqn Source # |
Instance details Methods lift :: Quote m => TySynEqn -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => TySynEqn -> Code m TySynEqn Source #
Lift Type Source # |
Instance details Methods lift :: Quote m => Type -> m Exp Source # liftTyped :: forall (m :: Type0 -> Type0). Quote m => Type -> Code m Type Source #
Lift TypeFamilyHead Source # |
Instance details Methods lift :: Quote m => TypeFamilyHead -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => TypeFamilyHead -> Code m TypeFamilyHead Source #
Lift flag => Lift (TyVarBndr flag :: Type) Source # |
Instance details Methods lift :: Quote m => TyVarBndr flag -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => TyVarBndr flag -> Code m (TyVarBndr flag) Source #
Quasi m => Quasi (ReaderT r m) Source # |

Instance details

Methods

qNewName :: String -> ReaderT r m Name Source #

qReport :: Bool -> String -> ReaderT r m () Source #

qRecover :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a Source #

qLookupName :: Bool -> String -> ReaderT r m (Maybe Name) Source #

qReify :: Name -> ReaderT r m Info Source #

qReifyFixity :: Name -> ReaderT r m (Maybe Fixity) Source #

qReifyType :: Name -> ReaderT r m Type Source #

qReifyInstances :: Name -> [Type] -> ReaderT r m [Dec] Source #

qReifyRoles :: Name -> ReaderT r m [Role] Source #

qReifyAnnotations :: Data a => AnnLookup -> ReaderT r m [a] Source #

qReifyModule :: Module -> ReaderT r m ModuleInfo Source #

qReifyConStrictness :: Name -> ReaderT r m [DecidedStrictness] Source #

qLocation :: ReaderT r m Loc Source #

qRunIO :: IO a -> ReaderT r m a Source #

qGetPackageRoot :: ReaderT r m FilePath Source #

qAddDependentFile :: FilePath -> ReaderT r m () Source #

qAddTempFile :: String -> ReaderT r m FilePath Source #

qAddTopDecls :: [Dec] -> ReaderT r m () Source #

qAddForeignFilePath :: ForeignSrcLang -> String -> ReaderT r m () Source #

qAddModFinalizer :: Q () -> ReaderT r m () Source #

qAddCorePlugin :: String -> ReaderT r m () Source #

qGetQ :: Typeable a => ReaderT r m (Maybe a) Source #

qPutQ :: Typeable a => a -> ReaderT r m () Source #

qIsExtEnabled :: Extension -> ReaderT r m Bool Source #

qExtsEnabled :: ReaderT r m [Extension] Source #

qPutDoc :: DocLoc -> String -> ReaderT r m () Source #

qGetDoc :: DocLoc -> ReaderT r m (Maybe String) Source #

Quasi m => Quasi (StateT s m) Source # |

Instance details

Methods

qNewName :: String -> StateT s m Name Source #

qReport :: Bool -> String -> StateT s m () Source #

qRecover :: StateT s m a -> StateT s m a -> StateT s m a Source #

qLookupName :: Bool -> String -> StateT s m (Maybe Name) Source #

qReify :: Name -> StateT s m Info Source #

qReifyFixity :: Name -> StateT s m (Maybe Fixity) Source #

qReifyType :: Name -> StateT s m Type Source #

qReifyInstances :: Name -> [Type] -> StateT s m [Dec] Source #

qReifyRoles :: Name -> StateT s m [Role] Source #

qReifyAnnotations :: Data a => AnnLookup -> StateT s m [a] Source #

qReifyModule :: Module -> StateT s m ModuleInfo Source #

qReifyConStrictness :: Name -> StateT s m [DecidedStrictness] Source #

qLocation :: StateT s m Loc Source #

qRunIO :: IO a -> StateT s m a Source #

qGetPackageRoot :: StateT s m FilePath Source #

qAddDependentFile :: FilePath -> StateT s m () Source #

qAddTempFile :: String -> StateT s m FilePath Source #

qAddTopDecls :: [Dec] -> StateT s m () Source #

qAddForeignFilePath :: ForeignSrcLang -> String -> StateT s m () Source #

qAddModFinalizer :: Q () -> StateT s m () Source #

qAddCorePlugin :: String -> StateT s m () Source #

qGetQ :: Typeable a => StateT s m (Maybe a) Source #

qPutQ :: Typeable a => a -> StateT s m () Source #

qIsExtEnabled :: Extension -> StateT s m Bool Source #

qExtsEnabled :: StateT s m [Extension] Source #

qPutDoc :: DocLoc -> String -> StateT s m () Source #

qGetDoc :: DocLoc -> StateT s m (Maybe String) Source #

(Quasi m, Monoid w) => Quasi (WriterT w m) Source # |

Instance details

Methods

qNewName :: String -> WriterT w m Name Source #

qReport :: Bool -> String -> WriterT w m () Source #

qRecover :: WriterT w m a -> WriterT w m a -> WriterT w m a Source #

qLookupName :: Bool -> String -> WriterT w m (Maybe Name) Source #

qReify :: Name -> WriterT w m Info Source #

qReifyFixity :: Name -> WriterT w m (Maybe Fixity) Source #

qReifyType :: Name -> WriterT w m Type Source #

qReifyInstances :: Name -> [Type] -> WriterT w m [Dec] Source #

qReifyRoles :: Name -> WriterT w m [Role] Source #

qReifyAnnotations :: Data a => AnnLookup -> WriterT w m [a] Source #

qReifyModule :: Module -> WriterT w m ModuleInfo Source #

qReifyConStrictness :: Name -> WriterT w m [DecidedStrictness] Source #

qLocation :: WriterT w m Loc Source #

qRunIO :: IO a -> WriterT w m a Source #

qGetPackageRoot :: WriterT w m FilePath Source #

qAddDependentFile :: FilePath -> WriterT w m () Source #

qAddTempFile :: String -> WriterT w m FilePath Source #

qAddTopDecls :: [Dec] -> WriterT w m () Source #

qAddForeignFilePath :: ForeignSrcLang -> String -> WriterT w m () Source #

qAddModFinalizer :: Q () -> WriterT w m () Source #

qAddCorePlugin :: String -> WriterT w m () Source #

qGetQ :: Typeable a => WriterT w m (Maybe a) Source #

qPutQ :: Typeable a => a -> WriterT w m () Source #

qIsExtEnabled :: Extension -> WriterT w m Bool Source #

qExtsEnabled :: WriterT w m [Extension] Source #

qPutDoc :: DocLoc -> String -> WriterT w m () Source #

qGetDoc :: DocLoc -> WriterT w m (Maybe String) Source #

Quote m => Quote (ReaderT r m) Source # |
Instance details Methods newName :: String -> ReaderT r m Name Source #
Quote m => Quote (StateT s m) Source # |
Instance details Methods newName :: String -> StateT s m Name Source #
(Quote m, Monoid w) => Quote (WriterT w m) Source # |
Instance details Methods newName :: String -> WriterT w m Name Source #
(Quasi m, Monoid w) => Quasi (RWST r w s m) Source # |

Instance details

Methods

qNewName :: String -> RWST r w s m Name Source #

qReport :: Bool -> String -> RWST r w s m () Source #

qRecover :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

qLookupName :: Bool -> String -> RWST r w s m (Maybe Name) Source #

qReify :: Name -> RWST r w s m Info Source #

qReifyFixity :: Name -> RWST r w s m (Maybe Fixity) Source #

qReifyType :: Name -> RWST r w s m Type Source #

qReifyInstances :: Name -> [Type] -> RWST r w s m [Dec] Source #

qReifyRoles :: Name -> RWST r w s m [Role] Source #

qReifyAnnotations :: Data a => AnnLookup -> RWST r w s m [a] Source #

qReifyModule :: Module -> RWST r w s m ModuleInfo Source #

qReifyConStrictness :: Name -> RWST r w s m [DecidedStrictness] Source #

qLocation :: RWST r w s m Loc Source #

qRunIO :: IO a -> RWST r w s m a Source #

qGetPackageRoot :: RWST r w s m FilePath Source #

qAddDependentFile :: FilePath -> RWST r w s m () Source #

qAddTempFile :: String -> RWST r w s m FilePath Source #

qAddTopDecls :: [Dec] -> RWST r w s m () Source #

qAddForeignFilePath :: ForeignSrcLang -> String -> RWST r w s m () Source #

qAddModFinalizer :: Q () -> RWST r w s m () Source #

qAddCorePlugin :: String -> RWST r w s m () Source #

qGetQ :: Typeable a => RWST r w s m (Maybe a) Source #

qPutQ :: Typeable a => a -> RWST r w s m () Source #

qIsExtEnabled :: Extension -> RWST r w s m Bool Source #

qExtsEnabled :: RWST r w s m [Extension] Source #

qPutDoc :: DocLoc -> String -> RWST r w s m () Source #

qGetDoc :: DocLoc -> RWST r w s m (Maybe String) Source #

(Quote m, Monoid w) => Quote (RWST r w s m) Source # |
Instance details Methods newName :: String -> RWST r w s m Name Source #