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
.
More Related Contents:
- Memory footprint of Haskell data types
- When is memoization automatic in GHC Haskell?
- Small Haskell program compiled with GHC into huge binary
- Wrong IO actions order using putStr and getLine
- What is fusion in Haskell?
- How to make a CAF not a CAF in Haskell?
- What does the `forall` keyword in Haskell/GHC do?
- Is there a list of GHC extensions that are considered ‘safe’?
- Haskell \p -> not takeWhile
- Sum of two numbers with function in haskell
- How do I deal with many levels of indentation?
- Memoization in Haskell?
- Difference between `data` and `newtype` in Haskell
- How do functors work in haskell?
- double stream feed to prevent unneeded memoization?
- Currying subtraction
- Haskell: how to evaluate a String like “1+2”
- Why does haskell’s bind function take a function from non-monadic to monadic
- Difference between Monad and Applicative in Haskell
- Why is lazy evaluation useful?
- Using Maybe type in Haskell
- What is a monad?
- Why is there “data” and “newtype” in Haskell? [duplicate]
- Abusing the algebra of algebraic data types – why does this work?
- What does the : infix operator do in Haskell?
- Monoidal Functor is Applicative but where is the Monoid typeclass in the definition of Applicative?
- How to return a pure value from a impure method
- How to convert Unicode Escape Sequence to Unicode String in Haskell
- Functional lenses
- How does Haskell printf work?