[GHC] #15431: Coercible and Existential types don't play nicely

GHC ghc-devs at haskell.org
Mon Jul 23 14:09:51 UTC 2018


#15431: Coercible and Existential types don't play nicely
-------------------------------------+-------------------------------------
        Reporter:  NioBium           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.3
      Resolution:                    |             Keywords:  Roles
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #14333            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 I'm not all that surprised here. GHC has no way of decomposing `Coercible
 Int (t a)`, and so it just remembers that constraint in case it needs to
 prove exactly `Coercible Int (t a)`. In this case, it's trying to prove
 `Coercible (t a) Int`, and so it gives up.

 I suppose we special-case the lookup to include looking for a symmetrical
 constraint, but there will always be incompleteness lurking around the
 corner.

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


More information about the ghc-tickets mailing list