From 12929a219671cd7794b5a533cebdfef11d2f8ff4 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Tue, 5 Apr 2011 17:38:51 +0100 Subject: [PATCH] Suppress dumpTcRn when -dno-debug-output is enabled. Signed-off-by: Edward Z. Yang --- compiler/typecheck/TcRnMonad.lhs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/typecheck/TcRnMonad.lhs b/compiler/typecheck/TcRnMonad.lhs index ad2405b..16ac13c 100644 --- a/compiler/typecheck/TcRnMonad.lhs +++ b/compiler/typecheck/TcRnMonad.lhs @@ -429,7 +429,7 @@ traceOptTcRn flag doc = ifDOptM flag $ do dumpTcRn :: SDoc -> TcRn () dumpTcRn doc = do { rdr_env <- getGlobalRdrEnv ; dflags <- getDOpts - ; liftIO (printForUser stderr (mkPrintUnqualified dflags rdr_env) doc) } + ; when (not opt_NoDebugOutput) $ liftIO (printForUser stderr (mkPrintUnqualified dflags rdr_env) doc) } debugDumpTcRn :: SDoc -> TcRn () debugDumpTcRn doc | opt_NoDebugOutput = return () -- 1.7.10.4