How do I compare two sets?
I tried comparing sets using https://www.roc-lang.org/builtins/Set#isEq
Getting The Set module does not expose
isEq:
Then tried set1 == set2
Getting a panic
An internal compiler expectation was broken.
This is definitely a compiler bug.
Is ==
meant to be the way to do it, should I open an issue then?
I'm not sure how two sets should be compared for equality, but set1 == set2
should give a nice error instead of the An internal compiler expectation was broken
. So yes, please make an issue for that :)
This is definitely supposed to just work with set1 == set2
. If you download the latest nightly, there is a chance it is fixed now (there was just a large update to all of this). Otherwise, please file a bug with the full error message. We can take a look.
it's a known bug: https://github.com/roc-lang/roc/issues/4671. I'm working on fixing it now
Ah, ok
This is now fixed - it shouldn't be a problem in the next nightly!
Last updated: Jul 05 2025 at 12:14 UTC