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

Why doesn't the AST define an instance for Eq? #16

Open
ivanperez-keera opened this issue Aug 15, 2023 · 1 comment
Open

Why doesn't the AST define an instance for Eq? #16

ivanperez-keera opened this issue Aug 15, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@ivanperez-keera
Copy link
Contributor

I just noticed that the AST does not define an instance for Eq.

It would be useful to be able to compare AST branches for equality (for example, to ensure you are not generating the same expression twice, or to be able to put declarations in a set). Is there a fundamental reason why it cannot or should not be done
?

@ivanperez-keera ivanperez-keera changed the title Why doesn't the AST define an instance for Eq Why doesn't the AST define an instance for Eq? Aug 15, 2023
@fdedden fdedden added the enhancement New feature or request label Aug 30, 2023
@fdedden
Copy link
Owner

fdedden commented Aug 30, 2023

No, there should not be a specific reason for omitting the Eq instance. So far there never was a need for it.

We can add the instance, and probably add it for language-c99 as well.

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

No branches or pull requests

2 participants