X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcRnMonad.lhs;h=f0303c11412b58e1954f56f5a54699719728a778;hp=79282899418541fd227e912652a94f9e934db244;hb=bb7d80b3b8d1396d481d3b24302bee24a3d92f71;hpb=a01188d12783adf93b1b6c5a08de1dfa0abf55f2 diff --git a/compiler/typecheck/TcRnMonad.lhs b/compiler/typecheck/TcRnMonad.lhs index 7928289..f0303c1 100644 --- a/compiler/typecheck/TcRnMonad.lhs +++ b/compiler/typecheck/TcRnMonad.lhs @@ -725,9 +725,12 @@ checkTc False err = failWithTc err \begin{code} addWarnTc :: Message -> TcM () -addWarnTc msg +addWarnTc msg = do { env0 <- tcInitTidyEnv + ; addWarnTcM (env0, msg) } + +addWarnTcM :: (TidyEnv, Message) -> TcM () +addWarnTcM (env0, msg) = do { ctxt <- getErrCtxt ; - env0 <- tcInitTidyEnv ; ctxt_msgs <- do_ctxt env0 ctxt ; addWarn (vcat (msg : ctxt_to_use ctxt_msgs)) }