[GHC] #9918: GHC chooses an instance between two overlapping, but cannot resolve a clause within the similar closed type family

GHC ghc-devs at haskell.org
Tue Jan 6 16:31:30 UTC 2015


#9918: GHC chooses an instance between two overlapping, but cannot resolve a
clause within the similar closed type family
-------------------------------------+-------------------------------------
        Reporter:  qnikst            |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.8.3
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by goldfire):

 Replying to [comment:17 simonpj]:
 > It's tantalising that overlapping type classes achieve the same end
 without risking unsoundness.  Surely we must be able to replicate this in
 type families, somehow?

 However, a mistake with type family reduction is unsound. A mistake with
 class instance selection is unpredictable/incoherent, but not unsound. I
 posit that we have such a mistake lurking here -- a loophole that, if we
 closed it, would prevent Oleg's working case from working.

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


More information about the ghc-tickets mailing list