[GHC] #12165: Multiple pattern type signatures accepted

GHC ghc-devs at haskell.org
Mon Jul 4 21:31:24 UTC 2016


#12165: Multiple pattern type signatures accepted
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:  seraphime
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
                                     |  PatternSynonyms, newcomer
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC accepts       |  Unknown/Multiple
  invalid program                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D2361
       Wiki Page:                    |
-------------------------------------+-------------------------------------

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

 In [changeset:"2a3af15270d1c04745b1c42e61bf4d5f6dbc8ad5/ghc"
 2a3af152/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="2a3af15270d1c04745b1c42e61bf4d5f6dbc8ad5"
 Treat duplicate pattern synonym signatures as an error

 Fixes issue T12165 by banning duplicate pattern synonyms
 signatures. This seems to me the best solution because:

    1) it is coherent with the way we treat other duplicate signatures

    2) the typechecker currently doesn't try to apply a second
        signature to a pattern to see if it matches, probably because
        it assumes there is no more than one signature per object.

 Test Plan: ./validate

 Reviewers: goldfire, austin, mpickering, bgamari

 Reviewed By: mpickering, bgamari

 Subscribers: mpickering, thomie

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

 GHC Trac Issues: #12165
 }}}

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


More information about the ghc-tickets mailing list