I'm still not sure how easy it will be to remove one type from a union. That would be a gamechanger in error-handling ergonomics.
Yes... but (unfortunately) I don't think that evidence is trivial in general. Err1 and Err2 may be large unions, and the evidence you construct at such time as the types are concrete isn't the same evidence you need in an abstract context.
-
-
It might be easier to enforce some constraint which guarantees that the types in the intersection are all proper subtypes of an abstract supertype. This property is true of singleton types, for example.
-
Type unions without an effect system aren’t very useful. For exceptions, you’d end up with something like Go’s error handling where you have to handle the exception on each step
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.