[project @ 2001-04-17 21:44:16 by lewie]
[ghc-hetmet.git] / ghc / compiler / utils / Outputable.lhs
index 1c989b4..c8e454d 100644 (file)
@@ -7,9 +7,6 @@ Defines classes for pretty-printing and forcing, both forms of
 ``output.''
 
 \begin{code}
-{-# OPTIONS -fno-prune-tydecls #-}
--- Hopefully temporary; 3.02 complained about not being able
--- to see the consructors for ForeignObj
 
 module Outputable (
        Outputable(..),                 -- Class
@@ -37,7 +34,8 @@ module Outputable (
        printSDoc, printErrs, printDump,
        printForC, printForAsm, printForIface, printForUser,
        pprCode, pprCols,
-       showSDoc, showSDocDebug, showSDocIface, showSDocUnqual, showsPrecSDoc,
+       showSDoc, showSDocForUser, showSDocDebug, showSDocIface, 
+       showSDocUnqual, showsPrecSDoc,
        pprHsChar, pprHsString,
 
 
@@ -206,6 +204,9 @@ pprCode cs d = withPprStyle (PprCode cs) d
 showSDoc :: SDoc -> String
 showSDoc d = show (d defaultUserStyle)
 
+showSDocForUser :: PrintUnqualified -> SDoc -> String
+showSDocForUser unqual doc = show (doc (mkUserStyle unqual AllTheWay))
+
 showSDocUnqual :: SDoc -> String
 -- Only used in the gruesome HsExpr.isOperator
 showSDocUnqual d = show (d (mkUserStyle neverQualify AllTheWay))