Instances do not respect functional dependency, yet are accepted
Taken from #7875 (closed):
class Het a b | a -> b where
het :: m (f c) -> a -> m b
class GHet (a :: Type -> Type) (b :: Type -> Type) | a -> b
instance GHet (K a) (K [a])
instance Het a b => GHet (K a) (K b)
data K x a = K x
Ticket #7875 (closed) is about a problem that arises later... but I'm flummoxed as to why these instances are accepted. The two instances of GHet
seem quite assuredly to violate its fundep. Yet ticket #7875 (closed) seems unconcerned about this issue, so I'm reluctant to fix until someone agrees that these instances are indeed problematic. Help?