Type-class for proving that an implicit T does not exist in scope.
Example:
// works
implicitly[Not[Numeric[String]]]
implicitly[Not[Numeric[Int]]]
//=> :9: error: cannot prove that Not[Numeric[Int]] because an implicit for Numeric[Int] exists in scope//=> implicitly[Not[Numeric[Int]]]//=> ^
implicitly[Int =:= Double]
//=> :9: error: Cannot prove that Int =:= Double.//=> implicitly[Int =:= Double]//=> ^// works
implicitly[Not[Int =:= Double]]
T
is the implicit value that shouldn't exist in scope for Not[T] to exist
Type-class for proving that an implicit
T
does not exist in scope.Example:
is the implicit value that shouldn't exist in scope for
Not[T]
to exist