[commit: ghc] master: Use DumpStyle rather than UserStyle for pprTrace output (9f8754e)

git at git.haskell.org git at git.haskell.org
Mon Aug 25 13:12:26 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/9f8754eb46b59886ebc09dec2581ed31eea053dc/ghc

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

commit 9f8754eb46b59886ebc09dec2581ed31eea053dc
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Aug 25 12:10:29 2014 +0100

    Use DumpStyle rather than UserStyle for pprTrace output
    
    The main motivation is that user-style output assumes that everything has been
    tidied, not enough uniques are printed by default.
    
    The downside is that pprTrace output now has module prefixes which can be overwhelming,
    but -dsuppress-module-prefixes will suppress them.


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

9f8754eb46b59886ebc09dec2581ed31eea053dc
 compiler/utils/Outputable.lhs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs
index a65607a..953797e 100644
--- a/compiler/utils/Outputable.lhs
+++ b/compiler/utils/Outputable.lhs
@@ -324,7 +324,7 @@ sdocWithPlatform f = sdocWithDynFlags (f . targetPlatform)
 \begin{code}
 qualName :: PprStyle -> QueryQualifyName
 qualName (PprUser q _)  mod occ = queryQualifyName q mod occ
-qualName _other                     mod _   = NameQual (moduleName mod)
+qualName _other         mod _   = NameQual (moduleName mod)
 
 qualModule :: PprStyle -> QueryQualifyModule
 qualModule (PprUser q _)  m = queryQualifyModule q m
@@ -1029,7 +1029,7 @@ assertPprPanic file line msg
 
 pprDebugAndThen :: DynFlags -> (String -> a) -> String -> SDoc -> a
 pprDebugAndThen dflags cont heading pretty_msg
- = cont (showSDoc dflags doc)
+ = cont (showSDocDump dflags doc)
  where
      doc = sep [text heading, nest 4 pretty_msg]
 \end{code}



More information about the ghc-commits mailing list