diff options
author | Richard Eisenberg <rae@richarde.dev> | 2021-06-01 15:32:34 -0400 |
---|---|---|
committer | Richard Eisenberg <rae@richarde.dev> | 2021-06-01 15:33:24 -0400 |
commit | ff6a88ec8bedf59295c2c154c1056b80569fe756 (patch) | |
tree | 1b19dc9bf743448fb105ac00528ab9bfbfca0459 /compiler/GHC/Tc/Module.hs | |
parent | 6db8a0f76ec45d47060e28bb303e9eef60bdb16b (diff) | |
download | haskell-wip/lower-parser-deps.tar.gz |
A little import wrangling. Not much accomplishedwip/lower-parser-deps
Diffstat (limited to 'compiler/GHC/Tc/Module.hs')
-rw-r--r-- | compiler/GHC/Tc/Module.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/GHC/Tc/Module.hs b/compiler/GHC/Tc/Module.hs index 450e97819a..95d442e4ad 100644 --- a/compiler/GHC/Tc/Module.hs +++ b/compiler/GHC/Tc/Module.hs @@ -121,6 +121,7 @@ import GHC.Core.Unify( RoughMatchTc(..) ) import GHC.Core.FamInstEnv ( FamInst, pprFamInst, famInstsRepTyCons , famInstEnvElts, extendFamInstEnvList, normaliseType ) +import GHC.Core.Lint ( lintAxioms ) import GHC.Parser.Header ( mkPrelImports ) @@ -348,6 +349,14 @@ tcRnModuleTcRnM hsc_env mod_sum } } +-- | Check the 'TcGblEnv' for consistency. Currently, only checks +-- axioms, but should check other aspects, too. +lintGblEnv :: Logger -> DynFlags -> TcGblEnv -> TcM () +lintGblEnv logger dflags tcg_env = + liftIO $ lintAxioms logger dflags (text "TcGblEnv axioms") axioms + where + axioms = typeEnvCoAxioms (tcg_type_env tcg_env) + implicitPreludeWarn :: SDoc implicitPreludeWarn = text "Module `Prelude' implicitly imported" |