[GHC] #15385: -Wincomplete-patterns gets confused when combining GADTs and pattern guards

GHC ghc-devs at haskell.org
Fri Jul 27 09:06:53 UTC 2018


#15385: -Wincomplete-patterns gets confused when combining GADTs and pattern guards
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.5
      Resolution:                    |             Keywords:
                                     |  PatternMatchWarnings
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D4968
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 In [changeset:"45cfe6514afb47c26883687e25ff7eb1e40c5a52/ghc"
 45cfe651/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="45cfe6514afb47c26883687e25ff7eb1e40c5a52"
 Small refactor in desugar of pattern matching

 In reviewing Phab:D4968 for Trac #15385 I saw a small
 but simple refactor to avoid unnecessary work in the
 desugarer.

 This patch just arranges to call
    matchSinglePatVar v ...
 rather than
    matchSinglePat (Var v) ...

 The more specialised function already existed, as
    match_single_pat_var

 I also added more comments about decideBangHood
 }}}

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


More information about the ghc-tickets mailing list