-
Summoning again @gvolpe because I forgot to ask it when the PR got merged: why do we need to make our given Is this because it can conflict with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The first reason is the clash with the trait Hash[@sp A] extends Any with Eq[A] with Serializable Versus trait Order[@sp A] extends Any with PartialOrder[A]
trait PartialOrder[@sp A] extends Any with Eq[A]
trait Eq[@sp A] extends Any with Serializable
I only know that the low-priority pattern is quite common for typeclass instances, so I just moved this one there and everything else compiled. |
Beta Was this translation helpful? Give feedback.
The first reason is the clash with the
Eq
instance, that's correct. But I think it has to do with how it's defined:Versus
Hash
extendsSerializable
directly, and that seems to affect implicit resolution, but that's just a wild guess. You can see howEq
also extendsSerializable
, but in the eyes of bothOrder
andPartialOrder
it's another layer down in the mixin.I only know that the low-priority pattern is quite common for typeclass instances, so I just moved this one there and ever…