th-orphans-0.13.4: 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 | None
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 Exp Source # |
Methods lift :: Exp -> Q Exp #
Lift Match Source # |
Methods lift :: Match -> Q Exp #
Lift Clause Source # |
Methods lift :: Clause -> Q Exp #
Lift Pat Source # |
Methods lift :: Pat -> Q Exp #
Lift Type Source # |
Methods lift :: Type -> Q Exp #
Lift Dec Source # |
Methods lift :: Dec -> Q Exp #
Lift FunDep Source # |
Methods lift :: FunDep -> Q Exp #
Lift TyVarBndr Source # |
Methods lift :: TyVarBndr -> Q Exp #
Lift InjectivityAnn Source # |
Methods lift :: InjectivityAnn -> Q Exp #
Lift Overlap Source # |
Methods lift :: Overlap -> Q Exp #
Lift Loc Source # |
Methods lift :: Loc -> Q Exp #
Lift Info Source # |
Methods lift :: Info -> Q Exp #
Lift Fixity Source # |
Methods lift :: Fixity -> Q Exp #
Lift FixityDirection Source # |
Methods lift :: FixityDirection -> Q Exp #
Lift Lit Source # |
Methods lift :: Lit -> Q Exp #
Lift Body Source # |
Methods lift :: Body -> Q Exp #
Lift Guard Source # |
Methods lift :: Guard -> Q Exp #
Lift Stmt Source # |
Methods lift :: Stmt -> Q Exp #
Lift Range Source # |
Methods lift :: Range -> Q Exp #
Lift TypeFamilyHead Source # |
Methods lift :: TypeFamilyHead -> Q Exp #
Lift TySynEqn Source # |
Methods lift :: TySynEqn -> Q Exp #
Lift Foreign Source # |
Methods lift :: Foreign -> Q Exp #
Lift Callconv Source # |
Methods lift :: Callconv -> Q Exp #
Lift Safety Source # |
Methods lift :: Safety -> Q Exp #
Lift Pragma Source # |
Methods lift :: Pragma -> Q Exp #
Lift Inline Source # |
Methods lift :: Inline -> Q Exp #
Lift RuleMatch Source # |
Methods lift :: RuleMatch -> Q Exp #
Lift Phases Source # |
Methods lift :: Phases -> Q Exp #
Lift RuleBndr Source # |
Methods lift :: RuleBndr -> Q Exp #
Lift AnnTarget Source # |
Methods lift :: AnnTarget -> Q Exp #
Lift SourceUnpackedness Source # |
Methods lift :: SourceUnpackedness -> Q Exp #
Lift SourceStrictness Source # |
Methods lift :: SourceStrictness -> Q Exp #
Lift Con Source # |
Methods lift :: Con -> Q Exp #
Lift Bang Source # |
Methods lift :: Bang -> Q Exp #
Lift FamilyResultSig Source # |
Methods lift :: FamilyResultSig -> Q Exp #
Lift TyLit Source # |
Methods lift :: TyLit -> Q Exp #
Lift Role Source # |
Methods lift :: Role -> Q Exp #
Quasi m => Quasi (StateT s m) Source # |

Methods

qNewName :: String -> StateT s m Name #

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

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

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

qReify :: Name -> StateT s m Info #

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

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

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

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

qReifyModule :: Module -> StateT s m ModuleInfo #

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

qLocation :: StateT s m Loc #

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

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

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

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

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

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

qIsExtEnabled :: Extension -> StateT s m Bool #

qExtsEnabled :: StateT s m [Extension] #

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

Methods

qNewName :: String -> WriterT w m Name #

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

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

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

qReify :: Name -> WriterT w m Info #

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

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

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

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

qReifyModule :: Module -> WriterT w m ModuleInfo #

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

qLocation :: WriterT w m Loc #

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

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

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

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

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

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

qIsExtEnabled :: Extension -> WriterT w m Bool #

qExtsEnabled :: WriterT w m [Extension] #

Quasi m => Quasi (ReaderT * r m) Source # |

Methods

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

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

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

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

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

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

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

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

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

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

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

qLocation :: ReaderT * r m Loc #

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

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

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

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

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

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

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

qExtsEnabled :: ReaderT * r m [Extension] #

(Quasi m, Monoid w) => Quasi (RWST r w s m) Source # |

Methods

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

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

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

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

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

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

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

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

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

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

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

qLocation :: RWST r w s m Loc #

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

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

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

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

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

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

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

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