Pattern match(es) are non-exhaustive

That warning is why you probably want to use a case statement or pattern matching instead of guards in this case, see this explanation I wrote for a similar problem.

4 Likes