[GHC] #7145: Incorrect redundant import warning
GHC
cvs-ghc at haskell.org
Tue Aug 14 14:09:22 CEST 2012
#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
More information about the Glasgow-haskell-bugs
mailing list