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

GHC ghc-devs at haskell.org
Sun Jul 15 20:51:51 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:                    |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):

 * status:  new => patch
 * differential:   => Phab:D4968


Comment:

 It turns out that when GHC desugars patterns bound by pattern guards, it
 completely forgets to update the local dictionaries in scope with
 `addDictsDs`! I have no idea how this oversight went unnoticed for so
 long... In any case, I have a patch for this at Phab:D4968.

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


More information about the ghc-tickets mailing list