
#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