Flatten flags for ghci's :show
[ghc-hetmet.git] / ghc / InteractiveUI.hs
index 1998e86..9a578df 100644 (file)
@@ -1193,7 +1193,7 @@ shellEscape str = io (system str >> return False)
 withFlattenedDynflags :: GHC.GhcMonad m => m a -> m a
 withFlattenedDynflags m
     = do dflags <- GHC.getSessionDynFlags
-         gbracket (GHC.setSessionDynFlags (ensureFlattenedLanguageFlags dflags))
+         gbracket (GHC.setSessionDynFlags (ensureFlattenedExtensionFlags dflags))
                   (\_ -> GHC.setSessionDynFlags dflags)
                   (\_ -> m)
 
@@ -1580,7 +1580,7 @@ optToStr RevertCAFs = "r"
 -- code for `:show'
 
 showCmd :: String -> GHCi ()
-showCmd str = do
+showCmd str = withFlattenedDynflags $ do
   st <- getGHCiState
   case words str of
         ["args"]     -> io $ putStrLn (show (args st))