Conversation

Indeed, they are both types, just like 42 and True are both values. But they are different "kinds" of type * -> * and * resp. You can get a static "compile time" kind error, which is like a type error "one level up" so to speak. i.e. the type annotations themselves are incoherent
1
One of the things my students of Haskell consistently have trouble with is understanding why a declaration like "instance Monoid Either where..." isn't allowed.
1
Maybe the mental model error is related to the inelegance that the kind system is not polymorphic. e.g. you can 'map' a unary or binary function, so why not Monoid Either?
1
1
Show replies