I have a data type that I promote with DataKinds in ghc 7.4.1 and a given type that I want to use for type type operations.
data Type = TInt32 | TInt64 | TInt16 class TypeTraits a where ...
And then I try to instantiate typeclass for promoted types, for example:
instance TypeTraits TInt32 where ...
I get errors of the following type:
Kind mis-match The first argument of `TypeTraits' should have kind `*', but `TInt32' has kind `Type' In the instance declaration for `TypeTraits TInt32'
tries to fix this by specifying type 'a':
class TypeTraits (a :: Type) where ... Kind mis-match Expected kind `ArgKind', but `a' has kind `Type' In the type `a -> String' In the class declaration for `TypeTraits'
source share