ghc-mtl-1.0.0.0: An mtl compatible version of the Ghc-Api monads and monad-transformers.Source codeContentsIndex
Control.Monad.Ghc
Synopsis
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
class (Functor m, MonadIO m, WarnLogMonad m, ExceptionMonad m) => GhcMonad m where
getSession :: m HscEnv
setSession :: HscEnv -> m ()
module Control.Monad.Trans
Documentation
data Ghc a Source
show/hide Instances
runGhc :: Maybe FilePath -> Ghc a -> IO aSource
data GhcT m a Source
show/hide Instances
runGhcT :: (Functor m, MonadCatchIO m) => Maybe FilePath -> GhcT m a -> m aSource
class (Functor m, MonadIO m, WarnLogMonad m, ExceptionMonad m) => GhcMonad m whereSource

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 GHC.initGhcMonad before any call to the GHC API functions can occur.

Methods
getSession :: m HscEnvSource
setSession :: HscEnv -> m ()Source
show/hide Instances
module Control.Monad.Trans
Produced by Haddock version 2.6.0