summaryrefslogtreecommitdiff
path: root/testsuite/tests/plugins/simple-plugin/Simple/SourcePlugin.hs
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-06-26 12:58:02 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-08-12 03:50:12 -0400
commitaccbc242e555822a2060091af7188ce6e9b0144e (patch)
tree641ced97452a46a0ff17f6754d2150e283c9b9ca /testsuite/tests/plugins/simple-plugin/Simple/SourcePlugin.hs
parentf1088b3f31ceddf918a319c97557fb1f08a9a387 (diff)
downloadhaskell-accbc242e555822a2060091af7188ce6e9b0144e.tar.gz
DynFlags: disentangle Outputable
- put panic related functions into GHC.Utils.Panic - put trace related functions using DynFlags in GHC.Driver.Ppr One step closer making Outputable fully independent of DynFlags. Bump haddock submodule
Diffstat (limited to 'testsuite/tests/plugins/simple-plugin/Simple/SourcePlugin.hs')
-rw-r--r--testsuite/tests/plugins/simple-plugin/Simple/SourcePlugin.hs10
1 files changed, 7 insertions, 3 deletions
diff --git a/testsuite/tests/plugins/simple-plugin/Simple/SourcePlugin.hs b/testsuite/tests/plugins/simple-plugin/Simple/SourcePlugin.hs
index 4e0eec36c0..dfadc4bc8b 100644
--- a/testsuite/tests/plugins/simple-plugin/Simple/SourcePlugin.hs
+++ b/testsuite/tests/plugins/simple-plugin/Simple/SourcePlugin.hs
@@ -4,7 +4,9 @@ import Control.Monad.IO.Class
import Data.List (intercalate)
import Data.Maybe (isJust)
import GHC.Driver.Plugins
+import GHC.Driver.Session
import GHC.Driver.Types
+import GHC.Driver.Ppr
import GHC.Tc.Types
import GHC.Hs.Extension
import GHC.Types.Avail
@@ -42,11 +44,13 @@ typecheckPlugin _ _ tc
metaPlugin' :: [CommandLineOption] -> LHsExpr GhcTc -> TcM (LHsExpr GhcTc)
metaPlugin' _ meta
- = do liftIO $ putStrLn $ "metaPlugin: " ++ (showSDocUnsafe $ ppr meta)
+ = do dflags <- getDynFlags
+ liftIO $ putStrLn $ "metaPlugin: " ++ (showSDoc dflags $ ppr meta)
return meta
interfaceLoadPlugin' :: [CommandLineOption] -> ModIface -> IfM lcl ModIface
interfaceLoadPlugin' _ iface
- = do liftIO $ putStrLn $ "interfacePlugin: "
- ++ (showSDocUnsafe $ ppr $ mi_module iface)
+ = do dflags <- getDynFlags
+ liftIO $ putStrLn $ "interfacePlugin: "
+ ++ (showSDoc dflags $ ppr $ mi_module iface)
return iface