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

Add deriving eq so we can test the editor/zippers #1409

Draft
wants to merge 3 commits into
base: dev
Choose a base branch
from
Draft

Conversation

7h3kk1d
Copy link
Contributor

@7h3kk1d 7h3kk1d commented Oct 7, 2024

I'm deriving eq for a bunch of types so we can add editor tests. Mostly having them ignore ids. I figure we can use structural equality if we want id checks for now.

I pulled out the parser tests (#1411) since we don't need this to do them.

@7h3kk1d 7h3kk1d requested a review from disconcision October 7, 2024 15:45
@7h3kk1d 7h3kk1d marked this pull request as ready for review October 7, 2024 15:47
@7h3kk1d 7h3kk1d changed the title Editor/Parsing tests Add deriving eq so we can test the editor/zippers Oct 13, 2024
@7h3kk1d 7h3kk1d marked this pull request as draft October 13, 2024 13:45
@7h3kk1d
Copy link
Contributor Author

7h3kk1d commented Nov 20, 2024

Having some issues integrating this into the new recursive types in TermBase. I don't want to override eq on IdTagged globally but all of the _t types are just type aliases as opposed to new types so there's no way to overwrite the equality for just them. ClosureEnvironments also have Ids so it's unclear how those should work with equality.

I'm also adding on VarBstMap and other types so it works.

@7h3kk1d
Copy link
Contributor Author

7h3kk1d commented Nov 21, 2024

I don't want to add even more work to consuming the TermBase types, but maybe we can wrap all of the _t types in a single constructor variant so we can customize equality without breaking IdTagged. Otherwise we either need to keep IdTagged as ignoring ids for equality or finish #1371

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.

1 participant