Suppose I have a data type:
data A f = A { a :: f Integer }
why can't I derive a Typeable instance like so?
deriving instance Typeable (A Maybe)
I get:
Can't make a derived instance of `Typeable (A Maybe)':
`A' has arguments of kind other than `*'
In the stand-alone deriving
You can't automatically derive Typeable for any type with a kind that
has any arguments that aren't of type *.
For instance, you can derive an instance for a type with a kind *, *
- *, or even * - * - * - * - * - *, but not one with a kind (*
- *) - *.
And your type A there has kind (* - *) - *.