Permalink
Fetching contributors…
Cannot retrieve contributors at this time
56 lines (52 sloc) 1.87 KB
-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | An mtl compatible version of the Ghc-Api monads
-- and monad-transformers.
--
-- Provides an <a>mtl</a> compatible version of the <a>GhcT</a>
-- monad-transformer defined in the 'GHC-API' since version 6.10.1.
@package ghc-mtl
@version 1.0.1.0
module Control.Monad.Ghc
data Ghc a
runGhc :: Maybe FilePath -> Ghc a -> IO a
data GhcT m a
runGhcT :: (Functor m, MonadCatchIO m) => Maybe FilePath -> GhcT m a -> m a
-- | A monad that has all the features needed by GHC API calls.
--
-- In short, a GHC monad
--
-- <ul>
-- <li>allows embedding of IO actions,</li>
-- <li>can log warnings,</li>
-- <li>allows handling of (extensible) exceptions, and</li>
-- <li>maintains a current session.</li>
-- </ul>
--
-- If you do not use <a>Ghc</a> or <a>GhcT</a>, make sure to call
-- <tt>GHC.initGhcMonad</tt> before any call to the GHC API functions can
-- occur.
class (Functor m, MonadIO m, WarnLogMonad m, ExceptionMonad m) => GhcMonad m :: (* -> *)
getSession :: GhcMonad m => m HscEnv
setSession :: GhcMonad m => HscEnv -> m ()
instance Functor Ghc
instance Monad Ghc
instance WarnLogMonad Ghc
instance ExceptionMonad Ghc
instance MonadIO Ghc
instance GhcMonad Ghc
instance Functor m => Functor (MTLAdapter m)
instance Monad m => Monad (MTLAdapter m)
instance Functor m => Functor (GhcT m)
instance Monad m => Monad (GhcT m)
instance MonadCatchIO m => ExceptionMonad (MTLAdapter m)
instance MonadIO m => MonadIO (MTLAdapter m)
instance (Functor m, MonadCatchIO m) => GhcMonad (GhcT m)
instance MonadIO m => WarnLogMonad (GhcT m)
instance MonadCatchIO m => ExceptionMonad (GhcT m)
instance MonadCatchIO m => MonadCatchIO (GhcT m)
instance MonadIO m => MonadIO (GhcT m)
instance MonadIO m => MonadIO (GhcT m)
instance MonadTrans GhcT
instance MonadCatchIO Ghc
instance MonadIO Ghc