summaryrefslogtreecommitdiff
path: root/compiler/ghci/Debugger.hs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-05-29 13:21:12 +0100
committerIan Lynagh <igloo@earth.li>2012-05-29 13:21:12 +0100
commit93abcfa562008fa7caf752f25ce61ca6d07fdab1 (patch)
tree6b706397f96ef09a193ef056b406f51d26b888e2 /compiler/ghci/Debugger.hs
parent78252479dfa2e3ef11d973fdec9e29b5d3810930 (diff)
downloadhaskell-93abcfa562008fa7caf752f25ce61ca6d07fdab1.tar.gz
Remove more uses of stdout and stderr
Diffstat (limited to 'compiler/ghci/Debugger.hs')
-rw-r--r--compiler/ghci/Debugger.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/ghci/Debugger.hs b/compiler/ghci/Debugger.hs
index c8946d6367..ab028f603d 100644
--- a/compiler/ghci/Debugger.hs
+++ b/compiler/ghci/Debugger.hs
@@ -27,6 +27,7 @@ import GHC
import Outputable
import PprTyThing
import MonadUtils
+import DynFlags
import Exception
import Control.Monad
@@ -34,7 +35,6 @@ import Data.List
import Data.Maybe
import Data.IORef
-import System.IO
import GHC.Exts
-------------------------------------
@@ -58,7 +58,8 @@ pprintClosureCommand bindThings force str = do
-- Finally, print the Terms
unqual <- GHC.getPrintUnqual
docterms <- mapM showTerm terms
- liftIO $ (printForUser stdout unqual . vcat)
+ dflags <- getDynFlags
+ liftIO $ (printOutputForUser dflags unqual . vcat)
(zipWith (\id docterm -> ppr id <+> char '=' <+> docterm)
ids
docterms)
@@ -226,4 +227,4 @@ pprTypeAndContents id = do
traceOptIf :: GhcMonad m => DynFlag -> SDoc -> m ()
traceOptIf flag doc = do
dflags <- GHC.getSessionDynFlags
- when (dopt flag dflags) $ liftIO $ printForUser stderr alwaysQualify doc
+ when (dopt flag dflags) $ liftIO $ printInfoForUser dflags alwaysQualify doc