Skip to content

Unnecessary constraints in the Graph class #3

@fiedlerp

Description

@fiedlerp

The constraints (Hashable v, Eq v) for methods of the Graph class are totally unnecessary. These constraints are implementation-specific for UGraph and DGraph, so the constraints should be moved to instances of the Graph.

instance (Hashable v, Eq v) => Graph (Graph v e) where ...

Of course, the Eq v makes sense at some of the methods (e.g. removeVertex) but definitely not all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions