The point here is that even though Haskell is a static language, you don't need to specify the types because its type system can infer the types and know that you are doing something wrong.
Another interesting fact is the error message itself. It is pretty straightforward to understand what is the error.