Add instances for MonadCatch and MonadMask for Either
Came up in a discussion with @bitonic. There's no downside I can see to the MonadCatch instance. However, the MonadMask instance is a little bit more controversial, in that it's not actually doing any masking. However, it's impossible to know that it's not masking the async exceptions since there are no side-effects from the Either monad. Of course, by using unsafePerformIO, we could observe the difference, but I think that's a valid trade-off. One final argument against MonadMask for Either: it's probably not terribly useful.
Loading
Please register or sign in to comment