
#10117: Change the scheme for reporting redundant imports -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.4 Resolution: | Keywords: deprecate | warning Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): You state a principle; that's good. Can you refine it a bit? * Rather than referring indirectly to the PVP, in addition say exactly what changes should not add warnings. I think the specific issue is this: if a module M compiles without warnings, and one of the modules it imports adds an extra export, then M should still compile without warnings. * Can you give a refined form of the old principle? Something like: an import item should be reported as redundant if it can be deleted without changing the meaning of the program, EXCEPT that a specific `import B(x)` is not reported as redundant if the only other way `x` is in scope is via whole-module imports like `import A` or `import A hiding...`. I think that's not quite right, but it'd be a helpful second step. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10117#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler