extensioninside the typeclass definition.
stack trace is suppressed; run last Compile / dependencyBrowseTreeHTML for the full output
Athere will be a new different type
Bso in order to properly reference
Byou first need an instance of
I was trying to convince scala 3 to recusrively flatten nested
Eithers of some unknown depth but couldn’t figure out how to do it.
I got a match type that describes the expected output type:
case class Inv() type FlattenR[X] = Inv[X] match case Inv[Either[ValidationError, x]] => FlattenR[x] case Inv[x] => Either[ValidationError, x]
but couldn’t figure out a way around erasure to implement it at the value level?
implicit def ordered[A](implicit asComparable: AsComparable[A]): Ordering[A]