#7145: Incorrect redundant import warning
------------------------------+---------------------------------------------
 Reporter:  edsko             |          Owner:                  
     Type:  bug               |         Status:  new             
 Priority:  normal            |      Component:  Compiler        
  Version:  7.4.2             |       Keywords:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
  Failure:  None/Unknown      |       Testcase:                  
Blockedby:                    |       Blocking:                  
  Related:                    |  
------------------------------+---------------------------------------------
 Compiling

 {{{
 module A (SomeDataType(SomeConstructor)) where

   newtype SomeDataType = SomeConstructor ()

 module B (SomeDataType(SomeConstructor)) where

   import A(SomeDataType(SomeConstructor))
 }}}

 with -Wall gives

 {{{
 B.hs:3:1:
     Warning: The import of `SomeConstructor'
              from module `A' is redundant
 }}}

 but this import is not redundant, I think. Indeed, removing the import
 gives

 {{{
 B.hs:1:11:
     The export item `SomeDataType(SomeConstructor)'
     attempts to export constructors or class methods that are not visible
 here
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7145>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to