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

Stephen Tetley stephen.tetley at gmail.com
Wed Jun 29 16:21:37 CEST 2011


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.



More information about the Beginners mailing list