I also tried the following with the LiberalTypeSynonyms extension as suggested in When (if ever) can type synonyms be partially applied?, and have added an explicit kind signiture to f
in Id
's definition. I still got the same error. I don't know if there are other extensions that might help.
ghci> type Id a = a
ghci> type Const a b = a
ghci> data D f = D (f ())
ghci> (((() :: Id ()) :: ()) :: Const () a)
()
ghci> D () :: D Id
<interactive>:10:9:
Type synonym ‘Id’ should have 1 argument, but has been given none
In an expression type signature: D Id
In the expression: D () :: D Id
In an equation for ‘it’: it = D () :: D Id
This really confuses me. f
in D
is * -> *
and Id
is * -> *
. What more is there to this?