Safe Haskell | None |
---|
- data Ghc a
- runGhc :: Maybe FilePath -> Ghc a -> IO a
- data GhcT m a
- runGhcT :: (Functor m, MonadIO m, MonadCatch m, MonadMask m) => Maybe FilePath -> GhcT m a -> m a
- class (Functor m, MonadIO m, ExceptionMonad m, HasDynFlags m) => GhcMonad m where
- getSession :: m HscEnv
- setSession :: HscEnv -> m ()
- module Control.Monad.Trans
Documentation
MonadTrans GhcT | |
Monad m => Monad (GhcT m) | |
Functor m => Functor (GhcT m) | |
(Functor m, Monad m) => Applicative (GhcT m) | |
MonadCatch m => MonadThrow (GhcT m) | |
(MonadIO m, MonadCatch m, MonadMask m) => MonadCatch (GhcT m) | |
(MonadIO m, MonadMask m) => MonadMask (GhcT m) | |
(Functor m, MonadIO m, MonadCatch m, MonadMask m) => GhcMonad (GhcT m) | |
(Functor m, MonadMask m, MonadIO m) => HasDynFlags (GhcT m) | |
(MonadIO m, MonadCatch m, MonadMask m) => ExceptionMonad (GhcT m) | |
MonadIO m => MonadIO (GhcT m) | |
MonadIO m => MonadIO (GhcT m) |
runGhcT :: (Functor m, MonadIO m, MonadCatch m, MonadMask m) => Maybe FilePath -> GhcT m a -> m aSource
class (Functor m, MonadIO m, ExceptionMonad m, HasDynFlags m) => GhcMonad m where
A monad that has all the features needed by GHC API calls.
In short, a GHC monad
- allows embedding of IO actions,
- can log warnings,
- allows handling of (extensible) exceptions, and
- maintains a current session.
If you do not use Ghc
or GhcT
, make sure to call initGhcMonad
before any call to the GHC API functions can occur.
getSession :: m HscEnv
setSession :: HscEnv -> m ()
module Control.Monad.Trans