When (if ever) can type synonyms be partially applied?
问题 Apparently a bit absent-mindedly, I wrote something like the following: {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE TypeFamilies #-} class Foo f where type Bar f :: * retbar :: Bar f -> IO f type Baz f = (Foo f, Eq f) -- WithBar :: * -> (*->Constraint) -> * -> Constraint type WithBar b c f = (c f, Bar f ~ b) instance Foo () where type Bar () = () retbar = return naim :: WithBar () Baz u => IO u -- why can I do this? naim = retbar () main = naim :: IO () Only after successfully compiling, I