summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
Diffstat (limited to 'ghc')
-rw-r--r--ghc/GhciMonad.hs10
1 files changed, 6 insertions, 4 deletions
diff --git a/ghc/GhciMonad.hs b/ghc/GhciMonad.hs
index 55d8946c4f..41b9c724b6 100644
--- a/ghc/GhciMonad.hs
+++ b/ghc/GhciMonad.hs
@@ -183,10 +183,16 @@ instance MonadUtils.MonadIO GHCi where
instance Trans.MonadIO Ghc where
liftIO = MonadUtils.liftIO
+instance HasDynFlags GHCi where
+ getDynFlags = getSessionDynFlags
+
instance GhcMonad GHCi where
setSession s' = liftGhc $ setSession s'
getSession = liftGhc $ getSession
+instance HasDynFlags (InputT GHCi) where
+ getDynFlags = lift getDynFlags
+
instance GhcMonad (InputT GHCi) where
setSession = lift . setSession
getSession = lift getSession
@@ -221,10 +227,6 @@ instance ExceptionMonad (InputT GHCi) where
gblock = Haskeline.block
gunblock = Haskeline.unblock
-getDynFlags :: GhcMonad m => m DynFlags
-getDynFlags = do
- GHC.getSessionDynFlags
-
setDynFlags :: DynFlags -> GHCi [PackageId]
setDynFlags dflags = do
GHC.setSessionDynFlags dflags