[GHC] #15347: QuantifiedConstraints: Implication constraints with type families don't work

GHC ghc-devs at haskell.org
Fri Jul 6 21:53:25 UTC 2018


#15347: QuantifiedConstraints: Implication constraints with type families don't
work
-------------------------------------+-------------------------------------
        Reporter:  aaronvargo        |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.5
  checker)                           |             Keywords:
      Resolution:                    |  QuantifiedConstraints
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:                    |
-------------------------------------+-------------------------------------

Comment (by aaronvargo):

 To clarify, this also compiles:

 {{{#!hs
 class Functor (f :: * -> *) where
   type Dom f
   type Cod f

 liftOb :: ( Functor f, cod ~ Cod f
           , forall a. Ob (Dom f) a => Ob cod (f a)
           , Ob (Dom f) a
           ) => Dict (Ob cod (f a))
 liftOb = Dict
 }}}

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


More information about the ghc-tickets mailing list