-> Module
-> TcM r
-> IO (Messages, Maybe r)
-initTcPrintErrors env mod todo = do
- (msgs, res) <- initTc env HsSrcFile False mod todo
- return (msgs, res)
+
+initTcPrintErrors env mod todo = initTc env HsSrcFile False mod todo
\end{code}
%************************************************************************
setOptM :: ExtensionFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
setOptM flag = updEnv (\ env@(Env { env_top = top }) ->
- env { env_top = top { hsc_dflags = xopt_set_flattened (hsc_dflags top) flag}} )
+ env { env_top = top { hsc_dflags = xopt_set (hsc_dflags top) flag}} )
unsetOptM :: DynFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
unsetOptM flag = updEnv (\ env@(Env { env_top = top }) ->
= do { env <- getEnv ;
let { u_var = env_us env } ;
us <- readMutVar u_var ;
- case splitUniqSupply us of { (us1,_) -> do {
- writeMutVar u_var us1 ;
- return $! uniqFromSupply us }}}
+ case takeUniqFromSupply us of { (uniq, us') -> do {
+ writeMutVar u_var us' ;
+ return $! uniq }}}
-- NOTE 1: we strictly split the supply, to avoid the possibility of leaving
-- a chain of unevaluated supplies behind.
-- NOTE 2: we use the uniq in the supply from the MutVar directly, and