[Haskell-cafe] DataKinds + KindSignatures question

Wojtek Narczyński wojtek at power.com.pl
Thu Nov 27 08:56:07 UTC 2014


On 27.11.2014 05:08, Karl Voelker wrote:
> The error message says that it expected a type. That might be a bit
> confusing. What it means by "type" is "a thing with kind *". That is the
> kind of types, and those types are the only things which have values.
> The argument to a function must be a value, so the argument to the "->"
> operator must be a type.
But why is it expecting type of kind '*' and rejecting type of kind 
'CmdKind'? Functions are limited to work on types of kind '*'?
>
> I don't think it's clear what you are trying to do, so it is hard to say
> what you should write.
I wanted to declare a class for that can only be instantiated for types 
of certain kind, and then create instances for all that types in a 
single statement. Basically, I was just trying to understand how kinds 
and type classes are related. Also, trying to save some typing.

-- 
Thank you,
Wojtek Narczynski


More information about the Haskell-Cafe mailing list