The compiler cannot check that two types can be compared by the memory representation equality in the general case because that would require breaking abstraction.
The (=)
operator is mostly an useful default implementation of equality that behaves nicely on some types, but it is not really expected to be used for all types. Typically, base
shadows this polymorphic operator to avoid potential misuse. Overall, adding one type class (with the loss of modularity that this implies) to the language for the sake of this lone function was not judged worth it in term of language complexity.