[GHC] #8643: Silent name shadowing

GHC ghc-devs at haskell.org
Fri Jan 3 21:52:37 UTC 2014


#8643: Silent name shadowing
-------------------------------------+------------------------------------
        Reporter:  mirpa             |            Owner:
            Type:  feature request   |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  Compiler          |          Version:  7.4.1
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:  #5288
-------------------------------------+------------------------------------

Comment (by simonpj):

 Thanks.  Now I see.

 The problem is that
  * name-shadowing is a warning, not an error
  * if there are errors, GHC reports them and suppresses warnings
 In your example, your program had a type error, which was correctly
 reported; but the type error was caused by accidental name capture.  But
 only the type error is reported; the warning is suppressed.

 It would be easy to report warnings as well as errors, rather than
 suppressing the warnings.  That would help you, but will mix up warnings
 (which are no necessarily errors) with errors (which are).

 I'm open to suggestions here.  Does anyone else have an opinion?

 Simon

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


More information about the ghc-tickets mailing list