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
trait DiffableLowImplicits
trait DiffableLowImplicits2
trait DiffableLowImplicits3
class Object
trait Matchable
class Any
Diffable.type
Value members
Concrete methods
Inherited methods
Givens
Givens
given mapDiffable[K, V, M <: Map[K, V]](using evidence$4: Diffable[K], evidence$5: Diffable[V]): Diffable[M]
Inherited givens
given eitherDiffable[L, R, T <: Either[L, R]](using evidence$10: Diffable[L], evidence$11: Diffable[R]): Diffable[T]
- Inherited from:
- DiffableLowImplicits
this Diff instance addresses case classes differences
this Diff instance addresses case classes differences
- Inherited from:
- DiffableLowImplicits2