projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
FIX #2197: an update frame might point to an IND_OLDGEN
[ghc-hetmet.git]
/
compiler
/
typecheck
/
TcRnMonad.lhs
diff --git
a/compiler/typecheck/TcRnMonad.lhs
b/compiler/typecheck/TcRnMonad.lhs
index
d7988e8
..
dcba808
100644
(file)
--- a/
compiler/typecheck/TcRnMonad.lhs
+++ b/
compiler/typecheck/TcRnMonad.lhs
@@
-44,11
+44,12
@@
import Bag
import Outputable
import UniqSupply
import Unique
import Outputable
import UniqSupply
import Unique
-import UniqFM
+import LazyUniqFM
import DynFlags
import StaticFlags
import FastString
import Panic
import DynFlags
import StaticFlags
import FastString
import Panic
+import Util
import System.IO
import Data.IORef
import System.IO
import Data.IORef
@@
-65,11
+66,6
@@
import Control.Monad
%************************************************************************
\begin{code}
%************************************************************************
\begin{code}
-ioToTcRn :: IO r -> TcRn r
-ioToTcRn = liftIO
-\end{code}
-
-\begin{code}
initTc :: HscEnv
-> HscSource
initTc :: HscEnv
-> HscSource
@@
-373,7
+369,7
@@
traceOptTcRn flag doc = ifOptM flag $ do
dumpTcRn :: SDoc -> TcRn ()
dumpTcRn doc = do { rdr_env <- getGlobalRdrEnv ;
dflags <- getDOpts ;
dumpTcRn :: SDoc -> TcRn ()
dumpTcRn doc = do { rdr_env <- getGlobalRdrEnv ;
dflags <- getDOpts ;
- ioToTcRn (printForUser stderr (mkPrintUnqualified dflags rdr_env) doc) }
+ liftIO (printForUser stderr (mkPrintUnqualified dflags rdr_env) doc) }
dumpOptTcRn :: DynFlag -> SDoc -> TcRn ()
dumpOptTcRn flag doc = ifOptM flag (dumpTcRn doc)
dumpOptTcRn :: DynFlag -> SDoc -> TcRn ()
dumpOptTcRn flag doc = ifOptM flag (dumpTcRn doc)
@@
-651,7
+647,7
@@
checkNoErrs main
= do { (msgs, mb_res) <- tryTcLIE main
; addMessages msgs
; case mb_res of
= do { (msgs, mb_res) <- tryTcLIE main
; addMessages msgs
; case mb_res of
- Nothing -> failM
+ Nothing -> failM
Just val -> return val
}
Just val -> return val
}
@@
-820,11
+816,9
@@
debugTc is useful for monadic debugging code
\begin{code}
debugTc :: TcM () -> TcM ()
\begin{code}
debugTc :: TcM () -> TcM ()
-#ifdef DEBUG
-debugTc thing = thing
-#else
-debugTc thing = return ()
-#endif
+debugTc thing
+ | debugIsOn = thing
+ | otherwise = return ()
\end{code}
%************************************************************************
\end{code}
%************************************************************************