[project @ 2003-10-29 18:14:27 by simonpj]
[ghc-hetmet.git] / ghc / compiler / typecheck / TcRnMonad.lhs
index c30ead5..47cd402 100644 (file)
@@ -92,7 +92,8 @@ initTc hsc_env mod do_this
                tcg_deprecs  = NoDeprecs,
                tcg_insts    = [],
                tcg_rules    = [],
-               tcg_fords    = []
+               tcg_fords    = [],
+               tcg_keep     = emptyNameSet
             } ;
             lcl_env = TcLclEnv {
                tcl_errs       = errs_var,
@@ -410,6 +411,8 @@ discardWarnings :: TcRn a -> TcRn a
 -- With -dppr-debug, the effects is switched off, so you can still see
 -- what warnings derived code would give
 discardWarnings thing_inside
+  | opt_PprStyle_Debug = thing_inside
+  | otherwise
   = do { errs_var <- newMutVar emptyMessages
        ; result <- setErrsVar errs_var thing_inside
        ; (_warns, errs) <- readMutVar errs_var