In scala, how to make type class working for Aux pattern? - Part 2
问题 This is a follow up question of: In scala, how to make type class working for Aux pattern? Considering the following example: trait Base { type Out def v: Out } object Base { type Aux[T] = Base { type Out = T } type Lt[T] = Base { type Out <: T } class ForH() extends Base { final type Out = HNil override def v: Out = HNil } object ForH extends ForH } trait TypeClasses { class TypeClass[B] def summon[B](b: B)(implicit ev: TypeClass[B]): TypeClass[B] = ev } object T1 extends TypeClasses {