[commit: ghc] master: Fix unused-import stuff in a better way (9376249)

git at git.haskell.org git at git.haskell.org
Fri Oct 30 11:27:25 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/9376249b6b78610db055a10d05f6592d6bbbea2f/ghc

>---------------------------------------------------------------

commit 9376249b6b78610db055a10d05f6592d6bbbea2f
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Oct 28 17:16:55 2015 +0000

    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.


>---------------------------------------------------------------

9376249b6b78610db055a10d05f6592d6bbbea2f
 compiler/basicTypes/RdrName.hs                     | 62 ++++++++++++----------
 compiler/rename/RnNames.hs                         | 28 +++-------
 testsuite/tests/module/mod177.stderr               |  2 +-
 .../T10890/{T10890.hs => T10890_2.hs}              | 12 ++---
 .../warnings/should_compile/T10890/T10890_2.stderr |  5 ++
 .../should_compile/T10890/{A.hs => T10890_2A.hs}   |  2 +-
 .../should_compile/T10890/{B.hs => T10890_2B.hs}   |  2 +-
 .../tests/warnings/should_compile/T10890/all.T     |  4 ++
 8 files changed, 57 insertions(+), 60 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 9376249b6b78610db055a10d05f6592d6bbbea2f


More information about the ghc-commits mailing list