From 3245f93f334bf22e5590318c46dddc1865c636d5 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Tue, 5 Aug 2008 13:37:02 +0000 Subject: [PATCH] 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). --- compiler/rename/RnNames.lhs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 1.7.10.4