Is it possible to get the Kind of a Type Constructor in Haskell?
I am working with Data.Typeable and in particular I want to be able to generate correct types of a particular kind (say * ). The problem that I'm running into is that TypeRep allows us to do the following (working with the version in GHC 7.8): let maybeType = typeRep (Proxy :: Proxy Maybe) let maybeCon = fst (splitTyConApp maybeType) let badType = mkTyConApp maybeCon [maybeType] Here badType is in a sense the representation of the type Maybe Maybe, which is not a valid type of any Kind: > :k Maybe (Maybe) <interactive>:1:8: Expecting one more argument to ‘Maybe’ The first argument of ‘Maybe’