Commit 94e7c563 authored by Sylvain Henry's avatar Sylvain Henry Committed by Marge Bot

Don't use DynFlags in showLinkerState (#17957)

parent cab1871a
......@@ -234,11 +234,10 @@ withExtendedLinkEnv dl new_env action
-- | Display the persistent linker state.
showLinkerState :: DynLinker -> DynFlags -> IO ()
showLinkerState dl dflags
showLinkerState :: DynLinker -> IO SDoc
showLinkerState dl
= do pls <- readPLS dl
putLogMsg dflags NoReason SevDump noSrcSpan
$ withPprStyle defaultDumpStyle
return $ withPprStyle defaultDumpStyle
(vcat [text "----- Linker state -----",
text "Pkgs:" <+> ppr (pkgs_loaded pls),
text "Objs:" <+> ppr (objs_loaded pls),
......
......@@ -3047,7 +3047,10 @@ showCmd str = do
, action "imports" $ showImports
, action "modules" $ showModules
, action "bindings" $ showBindings
, action "linker" $ getDynFlags >>= liftIO . (showLinkerState (hsc_dynLinker hsc_env))
, action "linker" $ do
msg <- liftIO $ showLinkerState (hsc_dynLinker hsc_env)
dflags <- getDynFlags
liftIO $ putLogMsg dflags NoReason SevDump noSrcSpan msg
, action "breaks" $ showBkptTable
, action "context" $ showContext
, action "packages" $ showPackages
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment