[project @ 1999-01-07 12:47:34 by simonpj]
[ghc-hetmet.git] / ghc / compiler / utils / Outputable.lhs
index 0e55176..15a2acf 100644 (file)
@@ -402,4 +402,12 @@ assertPprPanic file line msg
                           text file, 
                           text "line", int line], 
                    msg]
+
+warnPprTrace :: Bool -> String -> Int -> SDoc -> a -> a
+warnPprTrace False file line msg x = x
+warnPprTrace True  file line msg x
+  = trace (show (doc PprDebug)) x
+  where
+    doc = sep [hsep [text "WARNING: file", text file, text "line", int line],
+              msg]
 \end{code}