Occasionally I will see reference to Hask.
Which is described as:
Hask is the category of Haskell types and functions.
Which is a fair enough thing to try to define. If one likes to try and find ways to describe things. But generally when doing so one hopes to gain particular insights in the nature of the thing, or otherwise produce something from it.
The reason to do that is not so much to talk about Hask itself.
Many things we do talk about a lot – functors, monads, natural transformations... – aren't programming-specific let alone Haskell-specific, but come from maths – from category theory. Now, in maths, if you say “F is a functor” people will first ask “a functor between which categories?” In practice mathematicians might e.g. consider functors from the category of topological spaces to the category of abelian groups. Such a functor is quite a different beast from the kind of functors we're using in Haskell; yet it shares the very general properties of the “abstract nonsense” category theory.
To apply the maths rigorously to what we want to do in Haskell, we need to be explicit, and that's where the term Hask comes in:
Haskell functors are functors from the category Hask to itself.
You could of course “inline” the definition of Hask here
Haskell functors are functors from the category of Haskell types (with Haskell functions as morphisms) onto itself.
but that would get cumbersome quickly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With