[GHC] #8779: Exhaustiveness checks for pattern synonyms

GHC ghc-devs at haskell.org
Tue Feb 28 20:50:35 UTC 2017


#8779: Exhaustiveness checks for pattern synonyms
-------------------------------------+-------------------------------------
        Reporter:  nomeata           |                Owner:  mpickering
            Type:  feature request   |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  7.8.1
  checker)                           |             Keywords:
      Resolution:  fixed             |  PatternSynonyms
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D2669
       Wiki Page:                    |
-------------------------------------+-------------------------------------

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

 In [changeset:"122c67763bd73144bc6f3a6d86f275e6d1e297f9/ghc"
 122c6776/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="122c67763bd73144bc6f3a6d86f275e6d1e297f9"
 Add COMPLETE pragmas for TypeRep and ErrorCall pattern synonyms

 When programming with the pattern synonyms for `TypeRep`, I noticed that
 I was receiving spurious non-exhaustive pattern-match warnings.  This
 can be easily fixed by adding `COMPLETE` pragmas for them.

 Moreover, there's another pattern synonym in `base`: `ErrorCall`. In
 fact, in the original ticket for `COMPLETE` pragmas (#8779), someone
 requested that `ErrorCall` be given a `COMPLETE` pragma as well
 (https://ghc.haskell.org/trac/ghc/ticket/8779#comment:21).  I decided to
 do that as well while I was in town.

 Reviewers: bgamari, mpickering, austin, hvr

 Reviewed By: bgamari

 Subscribers: rwbarton, thomie

 Differential Revision: https://phabricator.haskell.org/D3231
 }}}

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


More information about the ghc-tickets mailing list