In Haskell, why non-exhaustive patterns are not compile-time errors?
There are cases where you don’t mind that a pattern match is non-exhaustive. For example, while this might not be the optimal implementation, I don’t think it would help if it didn’t compile: fac 0 = 1 fac n | n > 0 = n * fac (n-1) That this is non-exhaustive (negative numbers don’t … Read more