Extends any type with a type-safe and balanced ===
operator.
Type-class representing equality of two arguments with arbitrary respective types.
Type-class representing equality of two arguments with arbitrary respective types.
Mixed into Equality to disambiguate the L =:= R
case.
Provides type-class instances based on natural equality for any two types
in a L <: R
or R <: L
relationship.
By importing
TypeWiseBalancedEquality._
you get type-safe and type-wise balanced equality:This equality is balanced with respect to subtyping, hence
===
works (compiles) for any two arguments on the left and right, whose types are in a subtype relationship (which includes type equality):Yet it doesn't work (compile) for two arguments on the left and right, whose types are in an implicit conversion relationship: