[GHC] #10890: Incorrect redundant import warning for type classes

GHC ghc-devs at haskell.org
Fri Oct 30 11:37:48 UTC 2015


#10890: Incorrect redundant import warning for type classes
-------------------------------------+-------------------------------------
        Reporter:  quchen            |                Owner:
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.10.2
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
                                     |  warnings/should_compile/T10890,
                                     |  T10890_1, T10890_2
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D1257
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by simonpj):

 * testcase:   => warnings/should_compile/T10890, T10890_1, T10890_2


Comment:

 I followed up with this
 {{{
 commit 3e94842d4d1258fbd6a1202bf74d41ce1d01c753
 Author: Simon Peyton Jones <simonpj at microsoft.com>
 Date:   Fri Oct 30 09:41:47 2015 +0000

     Record usage information using GlobalRdrElt

     This patch implements an improvment that I've wanted to do for ages,
 but
     never gotten around to.

     Unused imports are computed based on how imported entities occur
 (qualified,
     unqualified).   This info was accumulated in tcg_used_rdrnames :: Set
 RdrName.
     But that was a huge pain, and it got worse when we introduced
 duplicate
     record fields.

     The Right Thing is to record tcg_used_gres :: [GlobalRdrElt], which
 records
     the GRE *after* filtering with pickGREs.  See Note [GRE filtering] in
 RdrName.
     This is much, much bette.  This patch deletes quite a bit of code, and
 is
     conceptually much easier to follow.

     Hooray.  There should be no change in functionality.
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10890#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list