Skip to content

Consider providing typesafe structural equality for A ~ B by default #477

New issue

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

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

Already on GitHub? # to your account

Open
klaeufer opened this issue Aug 20, 2022 · 0 comments
Open

Comments

@klaeufer
Copy link

given [A, B](using CanEqual[A, A], CanEqual[B, B]): CanEqual[A ~ B, A ~ B] = CanEqual.derived

This would allow pattern-based productions to compile in the presence of strict equality.

Example: https://github.com/lucproglangcourse/expressions-scala/blob/main/src/main/scala/CombinatorParser.scala

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants