#2055: Incorrect warning about qualified import
------------------------+---------------------------------------------------
Reporter: duncan | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.9 | Severity: normal
Keywords: | Testcase:
Architecture: Unknown | Os: Unknown
------------------------+---------------------------------------------------
GHC HEAD failed to validate recently because of this warning (in
combination with `-Werror`)
{{{
Distribution/Simple/Program.hs:222:24:
Warning: This binding for `update' shadows the existing binding
imported from Distribution.Compat.Map at
Distribution/Simple/Program.hs:87:0-46
In the definition of `updateUnconfiguredProgs'
}}}
The code it was warning about looks like
{{{
updateUnconfiguredProgs update conf =
conf { unconfiguredProgs = update (unconfiguredProgs conf) }
}}}
So initially it looks sensible. However the only import of
`Distribution.Compat.Map` in that module is from
{{{
import qualified Distribution.Compat.Map as Map
}}}
So actually there is no `update` in scope at all and thus there is no name
shadowing. The warning is incorrect.
This is a regression in ghc-6.9. The warning is not present with
ghc-6.8.2.
It should be possible to reproduce this problem using ghc's branch of the
Cabal lib and by reverting the patch that is currently masking the
incorrect warning:
{{{
Fri Jan 18 11:12:30 PST 2008 Ian Lynagh <[EMAIL PROTECTED]>
* Fix warnings in Cabal
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2055>
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