Re: Type family bug?

2017-01-19 Thread Richard Eisenberg
This is correct behavior. The former has a CUSK, as all open type families have CUSKs with un-annotated kinds defaulting to Type. The latter does not have a CUSK, because the result kind is unknown. You therefore cannot specialize the k variable in the definition of the latter. There is a

Type family bug?

2017-01-19 Thread Simon Peyton Jones via ghc-devs
Richard This works type family F (a :: k) type instance F Maybe = Char But this does not. Surely it should? type family F (a :: k) where -- = r | r -> a where F Maybe = Char The latter is rejected with Foo.hs:6:5: error: * Expecting one more argument to `Maybe' Expected kind