#3776: Warning: The import of `B.foo' from module `A' is redundant
---------------------------------+------------------------------------------
Reporter: slyfox | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.12.1 | Keywords: import, redundant, Wall
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Let's consider such '''A.hs''':
{{{
module A (C(foo)) where
class C a where
foo :: a
foo = bar
bar :: a
bar = foo
}}}
and '''B.hs''':
{{{
module B (Foo(..)) where
import qualified A as B (C(foo))
-- import qualified A as B (C) -- ? erros too
data Foo = Foo Int deriving Show
instance B.C Foo where
foo = Foo 4
}}}
Trying to build:
{{{
$ ghc --make -Wall -Werror B
[1 of 2] Compiling A ( A.hs, A.o )
[2 of 2] Compiling B ( B.hs, B.o )
B.hs:3:0:
Warning: The import of `B.foo' from module `A' is redundant
<no location info>:
Failing due to -Werror.
}}}
If I will remove foo somehow - I will get another error.
At least message looks misleading, and warning seems to be false positive.
Might be related ot #1074
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3776>
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