diff options
-rw-r--r-- | compiler/GHC/Tc/Module.hs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/compiler/GHC/Tc/Module.hs b/compiler/GHC/Tc/Module.hs index 34a02e70ec..026686b8cc 100644 --- a/compiler/GHC/Tc/Module.hs +++ b/compiler/GHC/Tc/Module.hs @@ -1560,10 +1560,13 @@ tcTopSrcDecls _ = panic "tcTopSrcDecls: ValBindsIn" tcSemigroupWarnings :: TcM () tcSemigroupWarnings = do - traceTc "tcSemigroupWarnings" empty - let warnFlag = Opt_WarnSemigroup - tcPreludeClashWarn warnFlag sappendName - tcMissingParentClassWarn warnFlag monoidClassName semigroupClassName + mod <- getModule + -- ghc-prim doesn't depend on base + unless (moduleUnit mod == primUnit) $ do + traceTc "tcSemigroupWarnings" empty + let warnFlag = Opt_WarnSemigroup + tcPreludeClashWarn warnFlag sappendName + tcMissingParentClassWarn warnFlag monoidClassName semigroupClassName -- | Warn on local definitions of names that would clash with future Prelude |