The reason this isnât working is that there needs to be some def derived[A]: Ordering[A] = ??? method in the Ordering companion object. Only the name really matters.
Unless you are busy with something else, could you elaborate a bit? I mean, does your observation suggest a remedy for the code in question, a way to remove
given Ordering[RGB] with
def compare(x: RGB, y: RGB): Int = x.ordinal compare y.ordinal
and do something simpler or better instead?
Do you have time to show me the code I could add instead?
If I misunderstand and you are too busy, then thank you anyway for your help.
Itâs not an issue in your code, the standard library needs to be updated to define a derived method on Ordering, but Scala 3 uses the Scala 2.13 standard library which makes this tricky without compiler hacks.