case classSingletonOf[T, U <: AnyRef { ... /* 2 definitions in type refinement */ }](widen: T { ... /* 2 definitions in type refinement */ }) extends Product with Serializable
This is a workaround that allows us to approximate multiple implicit
parameter sections (which Scala does not currently support). See this gist
by Miles Sabin for the original context:
The key idea is that we can use an intermediate type to capture the type
members of the two Unapply instances in such a way that we can refer to
them in the implicit parameter list.
This is a workaround that allows us to approximate multiple implicit parameter sections (which Scala does not currently support). See this gist by Miles Sabin for the original context:
https://gist.github.com/milessabin/cadd73b7756fe4097ca0
The key idea is that we can use an intermediate type to capture the type members of the two
Unapply
instances in such a way that we can refer to them in the implicit parameter list.