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
Value members
Concrete methods
Inherited methods
Concrete fields
Givens
Givens
Inherited givens
given product
this Diff instance addresses case classes differences
this Diff instance addresses case classes differences
- Inherited from
- DiffableLowImplicits2