[GHC] #13064: Incorrect redudant imports warning

GHC ghc-devs at haskell.org
Wed Jan 4 17:54:05 UTC 2017


#13064: Incorrect redudant imports warning
-------------------------------------+-------------------------------------
        Reporter:  phadej            |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  error/warning at compile-time      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by phadej):

 If I reverse `Data.Binary` and `Data.Binary.Orphans` imports the error
 messages stay exactly the same.

 What I see, is that GHC 8.0.1 doesn't follow the spec in
 https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/UnusedImports

 > - import Foo dominates import Foo(x). (You could also argue that the
 reverse should hold.)
 > - Otherwise choose the textually first one.

 `import Data.Binary.Orphans` should dominate `import Data.Binary (Binary
 (..))` when we check where from `Binary` is imported.

 Either commentary or implementation is incorrect. I suspect the latter.

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


More information about the ghc-tickets mailing list