[project @ 2000-04-03 16:46:41 by simonpj]
[ghc-hetmet.git] / ghc / compiler / utils / Outputable.lhs
index 5dd86b7..19ad666 100644 (file)
@@ -161,7 +161,7 @@ printErrs doc = printDoc PageMode stderr (final_doc user_style)
                user_style = mkUserStyle (PartWay opt_PprUserLength)
 
 printDump :: SDoc -> IO ()
-printDump doc = printForUser stderr (doc $$ text "")
+printDump doc = printForUser stdout (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
@@ -305,6 +305,14 @@ instance (Outputable a, Outputable b, Outputable c) => Outputable (a, b, c) wher
                   ppr y <> comma,
                   ppr z ])
 
+instance (Outputable a, Outputable b, Outputable c, Outputable d) =>
+        Outputable (a, b, c, d) where
+    ppr (x,y,z,w) =
+      parens (sep [ppr x <> comma,
+                  ppr y <> comma,
+                  ppr z <> comma,
+                  ppr w])
+
 instance Outputable FastString where
     ppr fs = text (unpackFS fs)                -- Prints an unadorned string,
                                        -- no double quotes or anything
@@ -338,7 +346,7 @@ printDoc mode hdl doc
 
 showDocWith :: Mode -> Doc -> String
 showDocWith mode doc
-  = fullRender PageMode 100 1.5 put "" doc
+  = fullRender mode 100 1.5 put "" doc
   where
     put (Chr c)   s  = c:s
     put (Str s1)  s2 = s1 ++ s2