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@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@haskell.org
http://www.haskell.org/mailman/listinfo/beginners