[project @ 1997-07-25 22:57:21 by sof]
authorsof <unknown>
Fri, 25 Jul 1997 22:57:21 +0000 (22:57 +0000)
committersof <unknown>
Fri, 25 Jul 1997 22:57:21 +0000 (22:57 +0000)
new function: putDocRn

ghc/compiler/rename/RnMonad.lhs

index c824df5..37363ed 100644 (file)
@@ -93,10 +93,13 @@ ioToRnMG :: IO r -> RnMG (Either IOError13 r)
 ioToRnMG (MkIO io) rn_down g_down = stToSST io
 
 traceRn :: Doc -> RnMG ()
-traceRn msg | opt_D_show_rn_trace = ioToRnMG (hPutStr stderr (show msg) >> 
-                                             hPutStr stderr "\n")      `thenRn_`
-                                   returnRn ()
+traceRn msg | opt_D_show_rn_trace = putDocRn msg
            | otherwise           = returnRn ()
+
+putDocRn :: Doc -> RnMG ()
+putDocRn msg = ioToRnMG (hPutStr stderr (show msg) >> 
+              hPutStr stderr "\n")     `thenRn_`
+              returnRn ()
 \end{code}