[Haskell-cafe] Can't make a derived instance of `Typeable (A B)': `A' has arguments of kind other than `*'

2010-09-24 Thread Christopher Done
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

Re: [Haskell-cafe] Can't make a derived instance of `Typeable (A B)': `A' has arguments of kind other than `*'

2010-09-24 Thread Carl Howells
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 (* - *) - *.