Why is GHC complaining about non-exhaustive patterns?

It’s because the pattern matching is incomplete. There’s no guarantee that one of x==a, x<a, or x>a holds. For instance, if the type is Double and x is NaN then none of them are True.

Leave a Comment