[GHC] #11606: name shadowing warnings don't trigger on standalone declarations in ghci

GHC ghc-devs at haskell.org
Sat Feb 20 23:28:16 UTC 2016


#11606: name shadowing warnings don't trigger on standalone declarations in ghci
-------------------------------------+-------------------------------------
        Reporter:  rwbarton          |                Owner:  rwbarton
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.0.1
       Component:  GHCi              |              Version:  7.10.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by rwbarton):

 * owner:   => rwbarton


Comment:

 I realized the reason is that we never test names defined at top level for
 shadowing (shadowing names imported from other modules).

 So the plan is this. Add a flag `-Wtop-level-name-shadowing` that checks
 top-level bindings for shadowing (like defining `id`). Then make it
 default in the ghci interactive flags (only). (No, I do not suggest making
 it part of `-Wall`.)

 Validating that currently, then will post on Phab.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11606#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list