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

GHC ghc-devs at haskell.org
Thu Jul 12 00:31:56 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 AntC):

 Replying to [comment:1 RyanGlScott]:
 > It's very strange to me that we allow quantified `Coercible` constraints
 but not quantified `(~)` constraints. What is the rationale behind this
 decision choice?

 Yes, I'm gravely disappointed to learn that: I've been posting lots of
 suggestions using `~` inside quantified (implication) constraints.
 {{{
     • Class ‘~’ does not support user-specified instances
 }}}

 Before there was `~`, there were plenty of ways for a user to specify a
 unifiability constraint -- see for example `TypeCast` in the HList paper.
 (Using bi-directional FunDeps.) And other examples of Quantified
 Constraints are using FunDeps for type improvement. So just do that
 instead of `~`?

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


More information about the ghc-tickets mailing list