[GHC] #13363: Wildcarn patterns and COMPLETE sets can lead to misleading redundant pattern-match warnings

GHC ghc-devs at haskell.org
Fri Mar 3 08:34:25 UTC 2017


#13363: Wildcarn patterns and COMPLETE sets can lead to misleading redundant
pattern-match warnings
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.1
      Resolution:                    |             Keywords:
                                     |  PatternSynonyms
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  error/warning at compile-time      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by gkaracha):

 Replying to [comment:1 simonpj]:
 > George, this is your patch.

 Hello, I think this is Matthew's patch. If I remember mpickering's
 implementation correctly, both {`F`, `TooGoodToBeTrue`} and {`F`,`T`} are
 complete (especially in the module where everything is visible). So all
 the
 following combinations are exhaustive:
 {{{
 F, TooGoodToBeTrue -- Using COMPLETE
 F, _               -- Using the Boolean signature
 F, _               -- Using COMPLETE
 }}}

 Hence, I think this is just non-specified semantics, but not necessarily a
 bug. Maybe Matthew can shed some more light on this.

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


More information about the ghc-tickets mailing list