th-orphans
Copyright(c) Matt Morrow 2008
LicenseBSD3
MaintainerMichael Sloan <mgsloan at gmail>
Stabilityexperimental
Portabilityportable (template-haskell)
Safe HaskellNone
LanguageHaskell2010

Language.Haskell.TH.Instances

Description

It provides the following instances:

  • Lift instances for the datatypes in Language.Haskell.TH
  • Quasi for ReaderT, WriterT, StateT, and RWST.
  • MonadFix for Q

More recent versions of template-haskell provide these instances. However, in order to support older versions you should import this module.

Orphan instances

Quasi m => Quasi (ReaderT r m) Source # 
Instance details

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)

qReifyType :: Name -> ReaderT r m Type

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

qGetPackageRoot :: ReaderT r m FilePath

qAddDependentFile :: FilePath -> ReaderT r m ()

qAddTempFile :: String -> ReaderT r m FilePath

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

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

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

qAddCorePlugin :: String -> 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]

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

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

Quasi m => Quasi (StateT s m) Source # 
Instance details

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)

qReifyType :: Name -> StateT s m Type

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

qGetPackageRoot :: StateT s m FilePath

qAddDependentFile :: FilePath -> StateT s m ()

qAddTempFile :: String -> StateT s m FilePath

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

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

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

qAddCorePlugin :: String -> 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]

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

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

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

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)

qReifyType :: Name -> WriterT w m Type

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

qGetPackageRoot :: WriterT w m FilePath

qAddDependentFile :: FilePath -> WriterT w m ()

qAddTempFile :: String -> WriterT w m FilePath

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

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

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

qAddCorePlugin :: String -> 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]

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

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

Quote m => Quote (ReaderT r m) Source # 
Instance details

Methods

newName :: String -> ReaderT r m Name

Quote m => Quote (StateT s m) Source # 
Instance details

Methods

newName :: String -> StateT s m Name

(Quote m, Monoid w) => Quote (WriterT w m) Source # 
Instance details

Methods

newName :: String -> WriterT w m Name

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

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)

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

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

qGetPackageRoot :: RWST r w s m FilePath

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

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

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

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

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

qAddCorePlugin :: String -> 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]

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

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

(Quote m, Monoid w) => Quote (RWST r w s m) Source # 
Instance details

Methods

newName :: String -> RWST r w s m Name