From cd7f4d50fcbcadfc764b0aa764d5ead690a4d3bf Mon Sep 17 00:00:00 2001 From: sof Date: Fri, 25 Jul 1997 22:57:21 +0000 Subject: [PATCH] [project @ 1997-07-25 22:57:21 by sof] new function: putDocRn --- ghc/compiler/rename/RnMonad.lhs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc/compiler/rename/RnMonad.lhs b/ghc/compiler/rename/RnMonad.lhs index c824df5..37363ed 100644 --- a/ghc/compiler/rename/RnMonad.lhs +++ b/ghc/compiler/rename/RnMonad.lhs @@ -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} -- 1.7.10.4