From: Simon Marlow Date: Tue, 5 Aug 2008 13:37:02 +0000 (+0000) Subject: Don't warn if 'import Prelude' doesn't import anything X-Git-Tag: 2008-09-12~205 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=3245f93f334bf22e5590318c46dddc1865c636d5 Don't warn if 'import Prelude' doesn't import anything ... even if Prelude doesn't come from the base package (it might come from a old backwards-compatible version of base, for example). --- diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs index e629dac..f29b06f 100644 --- a/compiler/rename/RnNames.lhs +++ b/compiler/rename/RnNames.lhs @@ -1198,7 +1198,10 @@ reportUnusedNames export_decls gbl_env (_, no_imp, loc) <- xs, let mod_name = moduleName mod, not (mod_name `elemFM` minimal_imports1), - mod /= pRELUDE, + moduleName mod /= pRELUDE_NAME, + -- XXX not really correct, but we don't want + -- to generate warnings when compiling against + -- a compat version of base. not no_imp] -- The not no_imp part is not to complain about -- import M (), which is an idiom for importing