diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2019-03-18 19:34:00 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-03-19 23:28:42 -0400 |
commit | 1e26e60dd21c235678447ee903afbf15228e40de (patch) | |
tree | 97a975d4ffae6f4c8f4fae34a186b2d4cd74eb03 /compiler/main/GHC.hs | |
parent | 6a47414f0cc6d538fbec7ca537ad36fbcc1a2480 (diff) | |
download | haskell-1e26e60dd21c235678447ee903afbf15228e40de.tar.gz |
Simplify monadic code
Diffstat (limited to 'compiler/main/GHC.hs')
-rw-r--r-- | compiler/main/GHC.hs | 14 |
1 files changed, 6 insertions, 8 deletions
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 -- %************************************************************************ |