[GHC] #14840: QuantifiedConstraints: Can't define class alias

GHC ghc-devs at haskell.org
Thu Feb 22 15:44:09 UTC 2018


#14840: QuantifiedConstraints: Can't define class alias
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.5
      Resolution:                    |             Keywords:
                                     |  QuantifiedConstraints wipT2893
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 Iceland_jack):

 I have a hunch this will not be allow, but encoding sums and existentials
 doesn't work

 {{{#!hs
 class    (forall sum. (a => sum) => (b => sum) => sum) => Sum a b
 instance (forall sum. (a => sum) => (b => sum) => sum) => Sum a b

 class    (forall exists. (forall xx. f xx => exists) -> exists) => Exists
 f
 instance (forall exists. (forall xx. f xx => exists) -> exists) => Exists
 f
 }}}

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


More information about the ghc-tickets mailing list