X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcRnMonad.lhs;h=dcba8084753937d94e613aab65f714337f9e6762;hb=7ba02f08d722982bfdb54c28b8a9cbd49b1fdb5f;hp=11e6bba76f3e6a1a9d73f731c06e605b897937b5;hpb=d51f42f602bf9a6d1b356c41228a534c88723f65;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcRnMonad.lhs b/compiler/typecheck/TcRnMonad.lhs index 11e6bba..dcba808 100644 --- a/compiler/typecheck/TcRnMonad.lhs +++ b/compiler/typecheck/TcRnMonad.lhs @@ -49,6 +49,7 @@ import DynFlags import StaticFlags import FastString import Panic +import Util import System.IO import Data.IORef @@ -646,7 +647,7 @@ checkNoErrs main = do { (msgs, mb_res) <- tryTcLIE main ; addMessages msgs ; case mb_res of - Nothing -> failM + Nothing -> failM Just val -> return val } @@ -815,11 +816,9 @@ debugTc is useful for monadic debugging code \begin{code} debugTc :: TcM () -> TcM () -#ifdef DEBUG -debugTc thing = thing -#else -debugTc thing = return () -#endif +debugTc thing + | debugIsOn = thing + | otherwise = return () \end{code} %************************************************************************