In OOP class is also type. In Haskell class in a grouping of types that have common methods. Eq groups type of signature (kind) *. Monad groups types of kind * -> *
Monad is constrained to work on kinds -> by its signature.
types are build-in or created by data, newtype or type.
class Applicative m => Monad (m :: * -> *) where -- m will need * -> *
(>>=) :: m a -> (a -> m b) -> m b
(>>) :: m a -> m b -> m b
return :: a -> m a
fail :: String -> m a
https://kseo.github.io/posts/2017-01-13-constraint-kinds.html says
See https://www.haskell.org/tutorial/classes.html
Also String is kind *, similar to Maybe Int.
In OOP class is also type. In Haskell class in a grouping of types that have common methods.
Eq
groups type of signature (kind)*
.Monad
groups types of kind* -> *
Monad is constrained to work on kinds -> by its signature.
types are build-in or created by
data
,newtype
ortype
.See strange prelude https://github.com/copton/haskell-examples/blob/master/typeclassopedia/bottomup.hs
Try kinds of typeclasses from https://en.wikibooks.org/wiki/Haskell/Classes_and_types#Type_constraints
Reason about
:k (->)