diff options
Diffstat (limited to 'compiler/GHC/Tc')
-rw-r--r-- | compiler/GHC/Tc/Module.hs | 6 | ||||
-rw-r--r-- | compiler/GHC/Tc/Types.hs | 5 |
2 files changed, 4 insertions, 7 deletions
diff --git a/compiler/GHC/Tc/Module.hs b/compiler/GHC/Tc/Module.hs index 94582b00a9..bc12f13423 100644 --- a/compiler/GHC/Tc/Module.hs +++ b/compiler/GHC/Tc/Module.hs @@ -296,11 +296,7 @@ tcRnModuleTcRnM hsc_env mod_sum tcRnSrcDecls explicit_mod_hdr local_decls export_ies ; whenM (goptM Opt_DoCoreLinting) $ - do { let (warns, errs) = lintGblEnv (hsc_dflags hsc_env) tcg_env - ; mapBagM_ (addWarn NoReason) warns - ; mapBagM_ addErr errs - ; failIfErrsM } -- if we have a lint error, we're only - -- going to get in deeper trouble by proceeding + lintGblEnv (hsc_dflags hsc_env) tcg_env ; setGblEnv tcg_env $ do { -- Process the export list diff --git a/compiler/GHC/Tc/Types.hs b/compiler/GHC/Tc/Types.hs index 3cda5de56f..2f41bb4b14 100644 --- a/compiler/GHC/Tc/Types.hs +++ b/compiler/GHC/Tc/Types.hs @@ -1712,7 +1712,8 @@ getRoleAnnots bndrs role_env -- | Check the 'TcGblEnv' for consistency. Currently, only checks -- axioms, but should check other aspects, too. -lintGblEnv :: DynFlags -> TcGblEnv -> (Bag SDoc, Bag SDoc) -lintGblEnv dflags tcg_env = lintAxioms dflags axioms +lintGblEnv :: DynFlags -> TcGblEnv -> TcM () +lintGblEnv dflags tcg_env = + liftIO $ lintAxioms dflags (text "TcGblEnv axioms") axioms where axioms = typeEnvCoAxioms (tcg_type_env tcg_env) |