Diffable

Note: variance is not managed by having a Diffable typeclass with a contravariant parameter Diffable[-T] In that the implicit for case classes (see product) can not be found.

Instead we deal with variance at the level of each implicit.

For example given exceptionDiffable[T <: Throwable]: Diffable[T] = new ThrowableDiffable[T] will be found for any custom exception extending Throwable. Similarly we can get a diff for RightString, Int and RightString, Int with given eitherDiffable[L: Diffable, R: Diffable, T <: Either[L, R]] because we unify both Rights with Either[String, Int]

Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def diff[T](actual: T, expected: T)(using di: Diffable[T]): ComparisonResult

Inherited methods

inline def derived[T](using p: ProductOf[T]): Diffable[T]
Inherited from
DiffableLowImplicits2
inline def summonAll[T <: Tuple]: List[Diffable[_]]
Inherited from
DiffableLowImplicits2

Concrete fields

final lazy val booleanDiffable: Diffable[Boolean]
final lazy val doubleDiffable: Diffable[Double]
final lazy val failureDiffable: Diffable[Failure[Nothing]]
final lazy val floatDiffable: Diffable[Float]
final lazy val intDiffable: Diffable[Int]
final lazy val longDiffable: Diffable[Long]
final lazy val nothingDiffable: Diffable[Nothing]
final lazy val stackTraceElementDiffable: Diffable[StackTraceElement]
final lazy val stringDiffable: Diffable[String]

Givens

Inherited givens

given product

this Diff instance addresses case classes differences

this Diff instance addresses case classes differences

Inherited from
DiffableLowImplicits2