concept partial function in category haskell

This is an excerpt from Manning's book Get Programming with Haskell.
The head function is an example of a partial function. In lesson 2, you learned that every function must take an argument and return a result. Partial functions don’t violate this rule, but they have one significant failing. They aren’t defined on all inputs. The head function is undefined on the empty list.
Nearly all errors in software are the result of partial functions. Your program receives input you don’t expect, and the program has no way of dealing with it. Throwing an error is an obvious solution to this problem. Throwing errors in Haskell is simple: you use the error function. Here’s myHead with an error.
It turns out you’ve already seen one of the most useful ways to handle partial functions: Maybe. In many of the examples of Maybe that you’ve used, there would be a Null value in other languages. But Maybe is a reasonable way to transform any partial function into a complete function. Here’s your code for maybeHead.