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

diff: detect cycles in the values being compared. #64

Merged
merged 1 commit into from Aug 10, 2020

Conversation

jhenstridge
Copy link
Contributor

This prevents infinite recursion, similar to the fixes to the formatter in #13. In addition to detecting cycles, we also check that the two values contain the same cyclic structure.

The idea is that if a value contains cycles or multiple ways of visiting a sub-value, then that is important to the underlying structure of the value (e.g. a type representing a DAG, or or trees with back pointers to their parent nodes).

This prevents infinite recursion, similar to the fixes to the formatter
in kr#13.  In addition to detecting cycles, we also check that the two
values contain the same cyclic structure.
@jhenstridge
Copy link
Contributor Author

@kr: any chance of having this reviewed and/or merged?

Copy link
Owner

@kr kr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me! Sorry for taking so long to review this!

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

Successfully merging this pull request may close these issues.

None yet

2 participants