Why is this implicit ambiguity behaviour happening?

Scala specification says: If there are several eligible arguments which match the implicit parameter’s type, a most specific one will be chosen using the rules of static overloading resolution. https://www.scala-lang.org/files/archive/spec/2.13/07-implicits.html#implicit-parameters The relative weight of an alternative A over an alternative B is a number from 0 to 2, defined as the sum of 1 if … Read more

Why is the Aux technique required for type-level computations?

There are two separate questions here: Why does Shapeless use type members instead of type parameters in some cases in some type classes? Why does Shapeless include Aux type aliases in the companion objects of these type classes? I’ll start with the second question because the answer is more straightforward: the Aux type aliases are … Read more