Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding MonadMask instance #155

Open
zarazek opened this issue Sep 5, 2023 · 1 comment
Open

Adding MonadMask instance #155

zarazek opened this issue Sep 5, 2023 · 1 comment

Comments

@zarazek
Copy link

zarazek commented Sep 5, 2023

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.

@simonmar
Copy link
Contributor

simonmar commented Sep 9, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants