summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2015-12-08 11:11:11 +0100
committerHerbert Valerio Riedel <hvr@gnu.org>2015-12-08 11:15:49 +0100
commitfd3b845c01aa26b6e5cd12c00af59e5468e21b1b (patch)
treea6048cc545e9db073a1213aaa03ad02c8ef66531 /ghc
parent9f4ca5afaccc8a397d8ee91b5423a9c2fcd151ce (diff)
downloadhaskell-fd3b845c01aa26b6e5cd12c00af59e5468e21b1b.tar.gz
Make HasDynFlags more transformers friendly
Ideally, we'd have the more general instance (MonadTrans t, Monad m, HasDynFlags m) => HasDynFlags (t m) where getDynFlags = lift getDynFlags definition. However, that one would overlap with the `HasDynFlags (GhcT m)` instance. Instead we define instances for a couple of common Monad transformers explicitly in order to avoid nasty overlapping instances. This is a preparatory refactoring for #10874 Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D1581
Diffstat (limited to 'ghc')
-rw-r--r--ghc/InteractiveUI.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs
index 02a8670ef1..7fd9c8b1ab 100644
--- a/ghc/InteractiveUI.hs
+++ b/ghc/InteractiveUI.hs
@@ -849,7 +849,7 @@ runOneCommand eh gCmd = do
checkInputForLayout :: String -> InputT GHCi (Maybe String)
-> InputT GHCi (Maybe String)
checkInputForLayout stmt getStmt = do
- dflags' <- lift $ getDynFlags
+ dflags' <- getDynFlags
let dflags = xopt_set dflags' Opt_AlternativeLayoutRule
st0 <- getGHCiState
let buf' = stringToStringBuffer stmt