[GHC] #10908: -fwarn-missing-exported-sigs doesn't respect qualified names
GHC
ghc-devs at haskell.org
Wed Sep 23 01:10:23 UTC 2015
#10908: -fwarn-missing-exported-sigs doesn't respect qualified names
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.2
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Incorrect
Unknown/Multiple | warning at compile-time
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Revisions: |
-------------------------------------+-------------------------------------
Trying to help @mpickering with Phab:D1258, I looked at the code in
`tcRnSrcDecls` and was surprised to see that exports are renamed after
this function is complete. This didn't make any sense to me. And, indeed,
it's wrong, witness by this example:
{{{
{-# OPTIONS_GHC -fwarn-missing-exported-sigs #-}
module Bug (Data.List.intercalate, x) where
import qualified Data.List
intercalate = True
x :: Bool
x = intercalate
}}}
This produces
{{{
Bug.hs:7:1: Warning:
Top-level binding with no type signature: intercalate :: Bool
}}}
This warning should not be emitted.
I'm not all that concerned about this scenario biting in the wild, but it
suggests that refactoring this code is a good thing, and not something
Phab:D1258 should take pains to avoid.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10908>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list