Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/af9f0170fa3b20cdf0a4d1843bbe1f03743ed3aa

>---------------------------------------------------------------

commit af9f0170fa3b20cdf0a4d1843bbe1f03743ed3aa
Author: Ian Lynagh <[email protected]>
Date:   Tue Jun 12 15:51:50 2012 +0100

    Use showPpr in a few more places

>---------------------------------------------------------------

 compiler/codeGen/CgProf.hs       |    3 ++-
 compiler/simplCore/CoreMonad.lhs |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/compiler/codeGen/CgProf.hs b/compiler/codeGen/CgProf.hs
index 296dd62..1a5f916 100644
--- a/compiler/codeGen/CgProf.hs
+++ b/compiler/codeGen/CgProf.hs
@@ -170,8 +170,9 @@ emitCostCentreDecl cc = do
                 -- All cost centres will be in the main package, since we
                 -- don't normally use -auto-all or add SCCs to other packages.
                 -- Hence don't emit the package name in the module here.
+  ; dflags <- getDynFlags
   ; loc <- newByteStringCLit $ bytesFS $ mkFastString $
-                   showSDoc (ppr (costCentreSrcSpan cc))
+                   showPpr dflags (costCentreSrcSpan cc)
            -- XXX going via FastString to get UTF-8 encoding is silly
   ; let
      lits = [ zero,    -- StgInt ccID,
diff --git a/compiler/simplCore/CoreMonad.lhs b/compiler/simplCore/CoreMonad.lhs
index cd5b647..48ff0ee 100644
--- a/compiler/simplCore/CoreMonad.lhs
+++ b/compiler/simplCore/CoreMonad.lhs
@@ -133,7 +133,7 @@ stuff before and after core passes, and do Core Lint when 
necessary.
 
 \begin{code}
 showPass :: DynFlags -> CoreToDo -> IO ()
-showPass dflags pass = Err.showPass dflags (showSDoc (ppr pass))
+showPass dflags pass = Err.showPass dflags (showPpr dflags pass)
 
 endPass :: DynFlags -> CoreToDo -> CoreProgram -> [CoreRule] -> IO ()
 endPass dflags pass binds rules
@@ -181,7 +181,7 @@ lintPassResult :: DynFlags -> CoreToDo -> CoreProgram -> IO 
()
 lintPassResult dflags pass binds
   = when (dopt Opt_DoCoreLinting dflags) $
     do { let (warns, errs) = lintCoreBindings binds
-       ; Err.showPass dflags ("Core Linted result of " ++ showSDoc (ppr pass))
+       ; Err.showPass dflags ("Core Linted result of " ++ showPpr dflags pass)
        ; displayLintResults dflags pass warns errs binds  }
 
 displayLintResults :: DynFlags -> CoreToDo



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to