Haxl
Haxl copied to clipboard
Adding MonadMask instance
Is there any obstacle preventing addition of MoandMask
instance for GenHaxl u w
? It already has MonadThrow
and MonadCatch
instances.
My usecase for this is that I would like to dump caches to file at the end of GenHaxl
computation, to be able to reproduce any problem that ocurred. I would really like to use finally
there, but it requires MonadMask
instance.
Yeah I suspect this would be quite difficult. Haxl computations don't execute in a nicely scoped way like IO does, you would have to mask/unmask when suspending and resuming fragments of the computation. Sounds messy and probably has a performance impact.