From 0978f6a661522ccefa72d18b7b7baed2861e3903 Mon Sep 17 00:00:00 2001 From: simonpj Date: Thu, 7 Dec 2000 08:19:53 +0000 Subject: [PATCH] [project @ 2000-12-07 08:19:53 by simonpj] Fix the bogus -fwarn-unused-exports problem --- ghc/compiler/rename/Rename.lhs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/rename/Rename.lhs b/ghc/compiler/rename/Rename.lhs index aca2451..8dbd8a2 100644 --- a/ghc/compiler/rename/Rename.lhs +++ b/ghc/compiler/rename/Rename.lhs @@ -726,7 +726,10 @@ reportUnusedNames my_mod_iface unqual imports avail_env minimal_imports1 = foldr add_name minimal_imports0 defined_and_used minimal_imports = foldr add_inst_mod minimal_imports1 inst_mods - add_name (n,NonLocalDef (UserImport m _ _)) acc = addToFM_C plusAvailEnv acc (moduleName (nameModule n)) + -- We've carefully preserved the provenance so that we can + -- construct minimal imports that import the name by (one of) + -- the same route(s) as the programmer originally did. + add_name (n,NonLocalDef (UserImport m _ _)) acc = addToFM_C plusAvailEnv acc (moduleName m) (unitAvailEnv (mk_avail n)) add_name (n,other_prov) acc = acc -- 1.7.10.4