[GHC] #10195: GHC forgets constraints when matching on GADTs

GHC ghc-devs at haskell.org
Tue Apr 7 14:10:40 UTC 2015


#10195: GHC forgets constraints when matching on GADTs
-------------------------------------+-------------------------------------
        Reporter:  crockeea          |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.8.4
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

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

 In [changeset:"8b7ceece52d2a0bb8a4ea5609da286fb76d88211/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="8b7ceece52d2a0bb8a4ea5609da286fb76d88211"
 More aggressive Given/Wanted overlap check

 This fixes Trac #10195

 For some reason we considered untouchability before, but Trac #10195
 shows that this is positively worng.

 See Note [Instance and Given overlap] in TcInteract.

 Looking at the Git log, it seems that this bug was introduced at the
 same time that we introduced the Given/Wanted overlap check in the first
 place.
 }}}

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


More information about the ghc-tickets mailing list