X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Frename%2FRnNames.lhs;h=4a880ed1fb22bf9a0e630d54367a94fb60458173;hb=f8ec4ec53ba9377254af4c0c0d3787bbe1e27be3;hp=253d262fcf40271789e7200d031e6e71a6cea635;hpb=3c22606bf3114747deeae0a8a1d5832ee834d9d1;p=ghc-hetmet.git diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs index 253d262..4a880ed 100644 --- a/compiler/rename/RnNames.lhs +++ b/compiler/rename/RnNames.lhs @@ -69,6 +69,10 @@ rnImports imports (source, ordinary) = partition is_source_import imports is_source_import (L _ (ImportDecl _ is_boot _ _ _)) = is_boot + ifOptM Opt_WarnImplicitPrelude ( + when (notNull prel_imports) $ addWarn (implicitPreludeWarn) + ) + stuff1 <- mapM (rnImportDecl this_mod) (prel_imports ++ ordinary) stuff2 <- mapM (rnImportDecl this_mod) source let (decls, rdr_env, imp_avails) = combine (stuff1 ++ stuff2) @@ -1355,4 +1359,7 @@ nullModuleExport mod moduleDeprec mod txt = sep [ ptext SLIT("Module") <+> quotes (ppr mod) <+> ptext SLIT("is deprecated:"), nest 4 (ppr txt) ] + +implicitPreludeWarn + = ptext SLIT("Module `Prelude' implicitly imported") \end{code}