Using context bounds “negatively” to ensure type class instance is absent from scope

I eventually solved this using an ambiguity-based solution that doesn’t require prioritizing using inheritance. Here is my attempt at generalizing this. We use the type Not[A] to construct negative type classes: import scala.language.higherKinds trait Not[A] trait Monoid[_] // or import scalaz._, Scalaz._ type NotMonoid[A] = Not[Monoid[A]] trait Functor[_[_]] // or import scalaz._, Scalaz._ type NotFunctor[M[_]] … Read more