Strategy for extending a type class

#1

What is the flow/strategy for extending a type class? I mean by that that I need to have a sufficient number of implicit instances in scope to handle all the different applications of the method in question in my program.

When I get a message like the following:

Error:(68, 30) value doReduce is not a member of scala.collection.parallel.immutable.ParRange
      assert(sum == nums.par.doReduce(0)(id,_ + _))

I think I need to put some supertype of scala.collection.parallel.immutable.ParRange in the collection of implicits. Right? I’m not exactly sure how to actually query the list of supertypes.

The current set of implicits for my type class is:

object TreeReducable {
  implicit def traversableOnceTreeReducable[T[X] <: TraversableOnce[X]]: TreeReducable[T] = new TreeReducable[T] {
    override def foldLeft[A, B](m: T[A])(z: B)(op: (B, A) => B): B = m.foldLeft(z)(op)
  }

  implicit val arrayTreeReducable: TreeReducable[Array] = new TreeReducable[Array] {
    override def foldLeft[A, B](m: Array[A])(z: B)(op: (B, A) => B): B = m.foldLeft(z)(op)
  }

  implicit val seqTreeReducable: TreeReducable[Seq] = new TreeReducable[Seq] {
    override def foldLeft[A, B](m: Seq[A])(z: B)(op: (B, A) => B): B = m.foldLeft(z)(op)
  }

  // implicit val rangeTreeReducable:TreeReducable[Range] = new TreeReducable[Range] {
  //  override def foldLeft[B](m: Range)(z: B)(op: (B, Int) => B):B = m.foldLeft(z)(op)
  //}
}