diff options
-rw-r--r-- | ghc/GHCi/UI/Monad.hs | 8 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T20909.script | 3 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T20909.stdout | 1 | ||||
-rwxr-xr-x | testsuite/tests/ghci/scripts/all.T | 1 |
4 files changed, 9 insertions, 4 deletions
diff --git a/ghc/GHCi/UI/Monad.hs b/ghc/GHCi/UI/Monad.hs index 157b9e8950..3aead3e91e 100644 --- a/ghc/GHCi/UI/Monad.hs +++ b/ghc/GHCi/UI/Monad.hs @@ -344,12 +344,12 @@ unsetOption opt printForUserNeverQualify :: GhcMonad m => SDoc -> m () printForUserNeverQualify doc = do - dflags <- getDynFlags + dflags <- GHC.getInteractiveDynFlags liftIO $ Ppr.printForUser dflags stdout neverQualify AllTheWay doc printForUserModInfo :: GhcMonad m => GHC.ModuleInfo -> SDoc -> m () printForUserModInfo info doc = do - dflags <- getDynFlags + dflags <- GHC.getInteractiveDynFlags mUnqual <- GHC.mkPrintUnqualifiedForModule info unqual <- maybe GHC.getPrintUnqual return mUnqual liftIO $ Ppr.printForUser dflags stdout unqual AllTheWay doc @@ -357,13 +357,13 @@ printForUserModInfo info doc = do printForUser :: GhcMonad m => SDoc -> m () printForUser doc = do unqual <- GHC.getPrintUnqual - dflags <- getDynFlags + dflags <- GHC.getInteractiveDynFlags liftIO $ Ppr.printForUser dflags stdout unqual AllTheWay doc printForUserPartWay :: GhcMonad m => SDoc -> m () printForUserPartWay doc = do unqual <- GHC.getPrintUnqual - dflags <- getDynFlags + dflags <- GHC.getInteractiveDynFlags liftIO $ Ppr.printForUser dflags stdout unqual DefaultDepth doc -- | Run a single Haskell expression diff --git a/testsuite/tests/ghci/scripts/T20909.script b/testsuite/tests/ghci/scripts/T20909.script new file mode 100644 index 0000000000..8cd302b33e --- /dev/null +++ b/testsuite/tests/ghci/scripts/T20909.script @@ -0,0 +1,3 @@ +:seti -fprint-explicit-foralls +:type id + diff --git a/testsuite/tests/ghci/scripts/T20909.stdout b/testsuite/tests/ghci/scripts/T20909.stdout new file mode 100644 index 0000000000..f2bad173c8 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T20909.stdout @@ -0,0 +1 @@ +id :: forall a. a -> a diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index 5cdbd8a21c..5e9aea056d 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -353,3 +353,4 @@ test('T20473a', normal, ghci_script, ['T20473a.script']) test('T20473b', normal, ghci_script, ['T20473b.script']) test('T20587', [extra_files(['../shell.hs'])], ghci_script, ['T20587.script']) +test('T20909', normal, ghci_script, ['T20909.script']) |