Hacker News new | ask | show | jobs
by kmill 2420 days ago
I put this in another comment, but I think you're thinking 'a' is a category, but it's an object in a category. The type for a functor (in Haskell) is Hask -> Hask, which is represented by the star notation Sniffnoy uses. That is, it sends objects of Hask to objects of Hask. The object mapping for a functor in Haskell is defined by its "data" or "type" definition.

The notation "a -> f a" means a function that sends elements of 'a' to elements of 'f a', where 'a' is an object of the category Hask. (Functors don't look into the objects at the element level.)

1 comments

Thanks for the clarification. I think I get it despite the incorrect notation. You guys are talking about some sort of type of types?
Yeah, the "type of types" is called a kind in Haskell https://wiki.haskell.org/Kind https://en.wikipedia.org/wiki/Kind_(type_theory)

Caveat: there seems to be some reason not to think of kinds as actually being the types of datatypes, but I don't understand why that is.