[GHC] #12615: Record pattern synonyms cause spurious name shadowing warnings

GHC ghc-devs at haskell.org
Sun Oct 2 00:01:55 UTC 2016


#12615: Record pattern synonyms cause spurious name shadowing warnings
-------------------------------------+-------------------------------------
        Reporter:  gelisam           |                Owner:  mpickering
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
                                     |  PatternSynonyms
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
                                     |  patsyn/should_compile/T12615
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D2545
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"1851349acd9e73f1c18d68f70d5cf7b46a843cb5/ghc"
 1851349a/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="1851349acd9e73f1c18d68f70d5cf7b46a843cb5"
 Don't warn about name shadowing when renaming the patten in a PatSyn decl

 Previously the renamer assumed that *any* time we renamed a pattern, the
 pattern was introducing new binders. This isn't true in pattern synonym
 declarations where the pattern is used as part of a definition.

 We add a special case to not warn in this situation.

 Reviewers: simonpj, austin, bgamari

 Reviewed By: simonpj

 Subscribers: simonpj, thomie

 Differential Revision: https://phabricator.haskell.org/D2545

 GHC Trac Issues: #12615
 }}}

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


More information about the ghc-tickets mailing list