Non-Injective Closed Type Family
问题 I have this admittedly contrived chunk of code {-# LANGUAGE DataKinds, TypeFamilies #-} data Foo = Foo type family Id (n :: Foo) a where Id 'Foo a = a data Bar (n :: Foo) = Bar class Dispatch (n :: Foo) where consume :: Id n a -> Bar n -> a consume' :: Dispatch n => Id n [Bool] -> Bar n -> [Bool] consume' = consume consume'' :: Dispatch n => Id n [Bool] -> Bar n -> Bool consume'' g x = and (consume' g x) This compiles and works fine. However, if I replace the final consume'' definition with