(+) and (-) are not constructors of type Integer -> Integer -> Integer :
- They are not constructor names
Integer -> Integer -> Integer not an algebraic data type
And so your code is equivalent to using any other variable names to bind the first argument, for example.
test foo = "plus" test bar = "minus" test _ = "other"
which, we hope, makes it clear that all three patterns actually correspond to something (and the first two are linked by some names). In other words, for the first template ( foo or (+) in your example) there is no way to skip, so it overlaps with the remaining two.
source share