#1074: -fwarn-unused-imports complains about wrong import
-------------------------+--------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Milestone: _|_
Component: Compiler | Version: 6.6
Severity: minor | Resolution:
Keywords: | Difficulty: Unknown
Os: MacOS X | Testcase:
Architecture: powerpc |
-------------------------+--------------------------------------------------
Comment (by [EMAIL PROTECTED]):
I assume that this is the same bug, that I encountered, too.
It is possibly the same like
http://hackage.haskell.org/trac/ghc/ticket/1148
I remember that such wrong warnings occured when switching from GHC 6.2 to
GHC 6.4.
Here I have setup a self-contained example:
http://users.informatik.uni-halle.de/~thielema/Haskell/ImportWarning/
I insert the example here:
{{{
module A where
type T = Int
}}}
{{{
module B ( module A ) where
import A
}}}
{{{
module C where
{-
This import is necessary but is reported as unnecessary.
"necessary" means:
If you remove that import statement, then the module cannot be compiled.
Of course, we could use the identifiers from B,
since B just re-exports A.
But formally I consider it a bug to declare the import of A as
unnecessary.
-}
import qualified A
{-
This import is unnecessary but no warning is emitted.
If this import is removed, everything compiles fine without warnings.
-}
import B
f :: String -> A.T
f = read
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1074>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs