
#10890: Incorrect redundant import warning for type classes -------------------------------------+------------------------------------- Reporter: quchen | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by osa1): Not sure how much this helps with debugging this, but I found out that when compiling this slightly modified program: {{{#!haskell module Main where import Base (AClass (has)) import Extends (BClass (has)) data Bar = Bar instance AClass Bar where has = Bar instance BClass Bar where has = Bar }}} GHC prints this: {{{ Main.hs:3:1: warning: The import of ‘Base.has’ from module ‘Base’ is redundant Main.hs:4:1: warning: The import of ‘Extends.has’ from module ‘Extends’ is redundant Linking Main ... }}} This is a test case I generated while trying to figure out if GHC thinks both `has` are coming from the same module. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10890#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler