Incorrect redundant import warning
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
Trac metadata
Trac field | Value |
---|---|
Version | 7.4.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |