
Neil Mitchell wrote:
data ListGT map k a = Empt | BraF ![k] a !(map (ListGT map k a)) | BraE ![k] !(map (ListGT map k a)) deriving( Typeable )
Not in Haskell, only in GHC.
Thanks for the suggestions from Hugh and Neil. I tried this anyway and it doesn't work even with ghc I'm afraid..
Can't make a derived instance of `Typeable (ListGT map k a)' (`ListGT' has arguments of kind other than `*') When deriving instances for `ListGT'
So it seems ghc doesn't like kinds (* -> *) either :-( Actually, AFAICT the problem seems to be with Data.Typeable itself rather than ghc. There is no proper TypeRep for (ListGT map k a) because map is not a type. Or maybe I'm missing something. Is it possible to make correct instances of Typeable for types like this? What would Data.Derive make of this? Thanks for any thoughts or insight -- Adrian Hey