You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I feel very strongly that the default instances for Eq should work according to this definition of equality:
Given any x and y, x = y if, given any predicate P, P(x) if and only if P(y).
This is not the case for e.g. the default Eq instance for map:
Eq.eqv(Map(1 → 0), Map.empty[Int, Int]) evaluates to true. I think for the default Eq this should be false.
The issue in case of map is that the Eq in the implicit scope is VectorEq. This has been implemented that way to allow defining a Group instance for any Map. But I think this should be changed so that MapEq is in scope.
I feel very strongly that the default instances for Eq should work according to this definition of equality:
Given any x and y, x = y if, given any predicate P, P(x) if and only if P(y).This is not the case for e.g. the default Eq instance for map:
Eq.eqv(Map(1 → 0), Map.empty[Int, Int])evaluates to true. I think for the default Eq this should be false.The issue in case of map is that the Eq in the implicit scope is VectorEq. This has been implemented that way to allow defining a Group instance for any Map. But I think this should be changed so that MapEq is in scope.