Haxl icon indicating copy to clipboard operation
Haxl copied to clipboard

Adding MonadMask instance

Open zarazek opened this issue 1 year ago • 1 comments

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.

zarazek avatar Sep 05 '23 11:09 zarazek

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.

simonmar avatar Sep 09 '23 16:09 simonmar