Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary constraints in the Graph class #3

Open
fiedlerp opened this issue Sep 14, 2020 · 1 comment
Open

Unnecessary constraints in the Graph class #3

fiedlerp opened this issue Sep 14, 2020 · 1 comment

Comments

@fiedlerp
Copy link

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.

@alx741
Copy link
Owner

alx741 commented Sep 19, 2020

Totally agree, will try and refactor that as soon as I have the time. If you'd like to try a PR for this though, it's welcome :) if not I'll try to make time for this soon, it's been stalled sadly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants