Closed eparejatobes closed 7 years ago
It is enough to have something like this:
def lazyMatch[S <: Or]: (∗ -> S#Left) × (∗ -> S#Right) -> (∗ -> Or.is[S]) =
All this is awful. There's no way out of it. Don't even try.
So the answer is: not in any sane way.
If we modify
identity
to bewe could use the reflection API to call the correct method. It'd be nice to wrap this into something defined on sums.