http://deni-ok.livejournal.com/ ([identity profile] deni-ok.livejournal.com) wrote in [personal profile] deniok 2008-01-16 10:02 pm (UTC)

Не, причём здесь классы типов? Пользуем data:
data Maybe a = Just a | Nothing
data Either a b = Left a | Right b
data Rec f = In (f (Rec f))

Имеем:
*MyModule> :k Maybe 
Maybe :: * -> *
*MyModule> :k Either
Either :: * -> * -> *
*MyModule> :k Rec
Rec :: (* -> *) -> *

kind'ом обладают конструкторы типов.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting