Skip to content
This repository was archived by the owner on Feb 8, 2022. It is now read-only.
This repository was archived by the owner on Feb 8, 2022. It is now read-only.

Semantics of default instances of Eq #137

Description

@rklaehn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions