From 1e26e60dd21c235678447ee903afbf15228e40de Mon Sep 17 00:00:00 2001 From: Krzysztof Gogolewski Date: Mon, 18 Mar 2019 19:34:00 +0100 Subject: Simplify monadic code --- compiler/main/GHC.hs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'compiler/main/GHC.hs') diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index 4e6e0f43c2..9fa8911d76 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -683,14 +683,12 @@ checkNewInteractiveDynFlags :: MonadIO m => DynFlags -> m DynFlags checkNewInteractiveDynFlags dflags0 = do -- We currently don't support use of StaticPointers in expressions entered on -- the REPL. See #12356. - dflags1 <- - if xopt LangExt.StaticPointers dflags0 - then do liftIO $ printOrThrowWarnings dflags0 $ listToBag - [mkPlainWarnMsg dflags0 interactiveSrcSpan - $ text "StaticPointers is not supported in GHCi interactive expressions."] - return $ xopt_unset dflags0 LangExt.StaticPointers - else return dflags0 - return dflags1 + if xopt LangExt.StaticPointers dflags0 + then do liftIO $ printOrThrowWarnings dflags0 $ listToBag + [mkPlainWarnMsg dflags0 interactiveSrcSpan + $ text "StaticPointers is not supported in GHCi interactive expressions."] + return $ xopt_unset dflags0 LangExt.StaticPointers + else return dflags0 -- %************************************************************************ -- cgit v1.2.1