0

要找出一个类型是否是更高种类的类型,ghci 提供:

Prelude> :k Maybe
Maybe :: * -> *

并尝试了类型类,如:

Prelude> :k Functor
Functor :: (* -> *) -> Constraint

为什么我可以在 typeclass 上要求更高种类的类型?约束是什么意思?

4

0 回答 0