[Haskell-beginners] Various style at instance of a typeclass

Haisheng Wu freizl at gmail.com
Wed Jun 29 17:36:51 CEST 2011


Thanks Stephen. Your explanation is comprehensive.

Well, how did you know Monad is with kind :: * -> * ?
What about the Arrow (From Control.Arrow) class?

Did you have any references or something regarding such concepts?

-Haisheng


On Wed, Jun 29, 2011 at 10:21 PM, Stephen Tetley
<stephen.tetley at gmail.com>wrote:

> The class Monad is more specifically a "constructor class" rather than
> a type class.
>
> Constructor classes have particular arities (numbers of parameters -
> "holes") called "kinds".
>
> Monad is a constructor class with kind :: * -> *
>
> (Write w) - has kind :: * -> *
>
> Write - has kind :: * -> * -> *
>
> (Write w a) - has kind :: *
>
> Thus only the first is compatible with the Monad class.
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110629/ceddd95d/attachment.htm>


More information about the Beginners mailing list