[GHC] #14958: QuantifiedConstraints: Doesn't apply implication for existential?

GHC ghc-devs at haskell.org
Sun Apr 1 17:08:57 UTC 2018


#14958: QuantifiedConstraints: Doesn't apply implication for existential?
-------------------------------------+-------------------------------------
        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):

 Ah! That makes perfect sense, we can specify a `Proxy cls` and not change
 the kind of `Foo` although I'm not sure this gives me what I want

 {{{#!hs
 data Foo where
   Foo :: Proxy cls -> (forall x. ((forall y. cls y => Num y), cls x) => x)
 -> Foo

 a :: Foo
 a = Foo (Proxy :: Proxy Num) 10

 b :: Foo
 b = Foo (Proxy :: Proxy Fractional) 10.0
 }}}

 I have a draft ready for an overview of this extension from
 ticket:14840#comment:6, should I email it to you?

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


More information about the ghc-tickets mailing list