Deriving a Cats Order for Scala's Enumeration
问题 I would like a generic Cats Order for Scala's Enumeration . I tried implicit def enumOrder[E <: Enumeration, V <: E#Value]: cats.Order[V] = new cats.Order[V] { def compare(x: V, y: V): Int = x.compare(y) } but I get [error] overloaded method value compare with alternatives: [error] ((that: _1.Value)Int) forSome { val _1: E } <and> [error] (that: _1.Value)Int [error] cannot be applied to (V) [error] def compare(x: V, y: V): Int = x.compare(y) [error] ^ Does anybody know how I can implement