Fix unused-import stuff in a better way
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 28 Oct 2015 17:16:55 +0000 (17:16 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 30 Oct 2015 09:45:47 +0000 (09:45 +0000)
commit9376249b6b78610db055a10d05f6592d6bbbea2f
tree67526c534565bcf9e20fd0872fc87a8be2e74f8a
parent9b3a0588e7523db54443270005ba2c6016e56ab8
Fix unused-import stuff in a better way

The fix for Trac #10890 in commit 1818b48, namely
   Fix incorrect import warnings when methods with identical names are imported
was wrong, as demonstrated by the new test T10890_2.  It suppressed
far too many warnings!

This patch fixes the original problem in a different way, by making
RdrName.greUsedRdrName a bit cleverer.

But this too is not really the Right Thing.  I think the Right Thing is
to store the /GRE/ in the tcg_used_rdrnames, not the /RdrName/.  That
would be a lot simpler and more direct.

But one step at a time.
compiler/basicTypes/RdrName.hs
compiler/rename/RnNames.hs
testsuite/tests/module/mod177.stderr
testsuite/tests/warnings/should_compile/T10890/T10890_2.hs [new file with mode: 0644]
testsuite/tests/warnings/should_compile/T10890/T10890_2.stderr [new file with mode: 0644]
testsuite/tests/warnings/should_compile/T10890/T10890_2A.hs [new file with mode: 0644]
testsuite/tests/warnings/should_compile/T10890/T10890_2B.hs [new file with mode: 0644]
testsuite/tests/warnings/should_compile/T10890/all.T