= do { errs_var <- newIORef (emptyBag, emptyBag) ;
meta_var <- newIORef initTyVarUnique ;
tvs_var <- newIORef emptyVarSet ;
= do { errs_var <- newIORef (emptyBag, emptyBag) ;
meta_var <- newIORef initTyVarUnique ;
tvs_var <- newIORef emptyVarSet ;
used_rdr_var <- newIORef Set.empty ;
th_var <- newIORef False ;
lie_var <- newIORef emptyBag ;
used_rdr_var <- newIORef Set.empty ;
th_var <- newIORef False ;
lie_var <- newIORef emptyBag ;
tcg_type_env_var = type_env_var,
tcg_inst_env = emptyInstEnv,
tcg_fam_inst_env = emptyFamInstEnv,
tcg_type_env_var = type_env_var,
tcg_inst_env = emptyInstEnv,
tcg_fam_inst_env = emptyFamInstEnv,
tcg_exports = [],
tcg_imports = emptyImportAvails,
tcg_used_rdrnames = used_rdr_var,
tcg_exports = [],
tcg_imports = emptyImportAvails,
tcg_used_rdrnames = used_rdr_var,
setOptM :: ExtensionFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
setOptM flag = updEnv (\ env@(Env { env_top = top }) ->
setOptM :: ExtensionFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
setOptM flag = updEnv (\ env@(Env { env_top = top }) ->
unsetOptM :: DynFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
unsetOptM flag = updEnv (\ env@(Env { env_top = top }) ->
unsetOptM :: DynFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a
unsetOptM flag = updEnv (\ env@(Env { env_top = top }) ->
- 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
-- 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