Regression in a warning of an unused import in a GADT
alcremi at pobox.com
Tue Jan 24 16:36:34 EST 2006
The following program incorrectly produces a warning about an unused
module Bug ( Structure (..) ) where
import Data.Ratio ( Rational )
data Structure a where
StructCons :: Int -> Structure Int
StructRatio :: Structure Rational
Warning: Module `Data.Ratio' is imported, but nothing from it is used,
except perhaps instances visible in `Data.Ratio'
To suppress this warning, use: import Data.Ratio()
Warning: Imported from `Data.Ratio' but not used:
type constructor or class `Rational'
with ghc checked-out from the HEAD 4 days ago (but the problem has been
present for quite some time).
ghc-6.4.1, rightly, does not produce any message.
Of course the problem exists with any import, not just Rational.
More information about the Cvs-ghc