[GHC] #14861: QuantifiedConstraints: Can't use forall'd variable in context

GHC ghc-devs at haskell.org
Tue Feb 27 17:12:45 UTC 2018


#14861: QuantifiedConstraints: Can't use forall'd variable in context
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.5
  checker)                           |             Keywords:
      Resolution:  invalid           |  QuantifiedConstraints wipT2893
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 Hm. Your point about `instance C a => C [b]` being wonky is a good one. In
 practice, such an instance would probably be OK if we could explicitly
 manipulate dictionaries and specify what exactly `a` should be whenever we
 applied it. But alas, we cannot, and GHC is unwilling to do this for us,
 so I'm forced to agree that this is in the realm of the impossible for the
 time being.

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


More information about the ghc-tickets mailing list