[GHC] #15359: Quantified constraints do not work with equality constraints

GHC ghc-devs at haskell.org
Thu Jul 12 01:47:43 UTC 2018


#15359: Quantified constraints do not work with equality constraints
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.5
      Resolution:                    |             Keywords:
                                     |  QuantifiedConstraints
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 Simon and I discussed this today. The lack of symmetry between `Coercible`
 and `~` here is by design. Essentially, any equality implication
 constraint is guaranteed to be redundant, because GHC can already deduce
 all equalities from whatever assumptions are at hand. On the other hand,
 `Coercible` implication constraints are quite useful, because coercibility
 is fundamentally incomplete.

 So the trouble I saw isn't so bad. But I still think we should document
 the restriction and report a better error message here.

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


More information about the ghc-tickets mailing list