class (Functor m, ExceptionMonad m, HasDynFlags m, HasLogger m) => GhcMonad (m :: Type -> Type) whereA 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.
Methods
getSession :: m HscEnvsetSession :: HscEnv -> m ()
Instances2GhcMonad
GhcMonad GhcDefined in ghc-lib-parser-9.14.1.20251220 · GHC.Driver.MonadExceptionMonad m => GhcMonad (GhcT m)Defined in ghc-lib-parser-9.14.1.20251220 · GHC.Driver.Monad