Closed snoyberg closed 8 years ago
Looks generally good. These instances are basically identical to the ones for CatchT
, yes? If so, perhaps it's worth repeating the disclaimer that's currently attached to the MonadMask
instance for CatchT
?
LGTM
The reason that there's no cautionary note on Either
like CatchT
is that Either
is not a monad transformer, and therefore is always using Identity
(implicitly) under the surface.
Uploaded exceptions-0.8.3
to Hackage.
Awesome, thank you!
On Wed, Jul 20, 2016, 9:55 AM Ryan Scott notifications@github.com wrote:
Uploaded exceptions-0.8.3 http://hackage.haskell.org/package/exceptions-0.8.3 to Hackage.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ekmett/exceptions/pull/56#issuecomment-234011165, or mute the thread https://github.com/notifications/unsubscribe-auth/AADBBzFzeBdxPZcNewYICl-_bapVdjsDks5qXlMMgaJpZM4I4I2y .
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.