summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonmar <unknown>2005-05-17 13:05:45 +0000
committersimonmar <unknown>2005-05-17 13:05:45 +0000
commit58645b584f32be38af65625006e327e73f2354eb (patch)
tree898f362103ffca6540a278f401c42da027745fdb
parent70391624e84eb5dc6239a380f31144b8830f788f (diff)
downloadhaskell-58645b584f32be38af65625006e327e73f2354eb.tar.gz
[project @ 2005-05-17 13:05:45 by simonmar]
Add showSDocDump
-rw-r--r--ghc/compiler/utils/Outputable.lhs8
1 files changed, 4 insertions, 4 deletions
diff --git a/ghc/compiler/utils/Outputable.lhs b/ghc/compiler/utils/Outputable.lhs
index e0e9bbb672..f870b654c8 100644
--- a/ghc/compiler/utils/Outputable.lhs
+++ b/ghc/compiler/utils/Outputable.lhs
@@ -38,7 +38,7 @@ module Outputable (
printSDoc, printErrs, printDump,
printForC, printForAsm, printForUser,
pprCode, mkCodeStyle,
- showSDoc, showSDocForUser, showSDocDebug,
+ showSDoc, showSDocForUser, showSDocDebug, showSDocDump,
showSDocUnqual, showsPrecSDoc,
pprHsChar, pprHsString,
@@ -209,9 +209,6 @@ printDump doc = do
hFlush stdout
where
better_doc = doc $$ text ""
- -- We used to always print in debug style, but I want
- -- to try the effect of a more user-ish style (unless you
- -- say -dppr-debug)
printForUser :: Handle -> PrintUnqualified -> SDoc -> IO ()
printForUser handle unqual doc
@@ -246,6 +243,9 @@ showSDocUnqual d = show (d (mkUserStyle neverQualify AllTheWay))
showsPrecSDoc :: Int -> SDoc -> ShowS
showsPrecSDoc p d = showsPrec p (d defaultUserStyle)
+showSDocDump :: SDoc -> String
+showSDocDump d = show (d PprDump)
+
showSDocDebug :: SDoc -> String
showSDocDebug d = show (d PprDebug)
\end{code}