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

Christopher Done chrisdone at googlemail.com
Fri Sep 24 16:18:33 EDT 2010


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 instance for `Typeable (A Maybe)'

I would have expected that the arguments are instantiated by the Maybe
type constructor and thus the type of A would be:

Maybe Integer -> A

What am I missing?


More information about the Haskell-Cafe mailing list