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
Yeah the special rules around type level programming in haskell is annoying. I think the dependent haskell stuff aims to make it a bit less janky? I dunno though.
1
1
I do like that they are moving to `Type` instead of `*` for the type of types - would have made this stuff easier to learn at first! My brain always got really confused seeing stuff like `* -> *`.
3
1