summaryrefslogtreecommitdiff
path: root/ghc/GHCi/UI/Monad.hs
diff options
context:
space:
mode:
Diffstat (limited to 'ghc/GHCi/UI/Monad.hs')
-rw-r--r--ghc/GHCi/UI/Monad.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/ghc/GHCi/UI/Monad.hs b/ghc/GHCi/UI/Monad.hs
index b371a9b8b4..ed06d81d75 100644
--- a/ghc/GHCi/UI/Monad.hs
+++ b/ghc/GHCi/UI/Monad.hs
@@ -57,6 +57,7 @@ import GHCi.RemoteTypes
import GHC.Hs (ImportDecl, GhcPs, GhciLStmt, LHsDecl)
import GHC.Hs.Utils
import GHC.Utils.Misc
+import GHC.Utils.Logger
import GHC.Utils.Exception hiding (uninterruptibleMask, mask, catch)
import Numeric
@@ -307,13 +308,20 @@ instance MonadIO GHCi where
instance HasDynFlags GHCi where
getDynFlags = getSessionDynFlags
+instance HasLogger GHCi where
+ getLogger = hsc_logger <$> getSession
+
instance GhcMonad GHCi where
setSession s' = liftGhc $ setSession s'
getSession = liftGhc $ getSession
+
instance HasDynFlags (InputT GHCi) where
getDynFlags = lift getDynFlags
+instance HasLogger (InputT GHCi) where
+ getLogger = lift getLogger
+
instance GhcMonad (InputT GHCi) where
setSession = lift . setSession
getSession = lift getSession