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

Bracket instances for transformers #216

Closed
durban opened this issue May 13, 2018 · 2 comments
Closed

Bracket instances for transformers #216

durban opened this issue May 13, 2018 · 2 comments

Comments

@durban
Copy link
Contributor

durban commented May 13, 2018

For the various transformers (Kleisli, OptionT, ...) there are Sync instances (if the inner F has a Sync instance). There are also similar MonadError instances for them. However, there doesn't seem to be similar Bracket instances. Is it not possible to define them, or are they simply missing?

@alexandru
Copy link
Member

I think the reason there are no instances is because defining instances for these monad transformers is in general complicated. I've lost many hours solving problems for the available instances.

Also it might be challenging because you can't rely on the stack safety of Sync when all you have is Bracket. Not sure if that's important or not.

But try it out. Maybe we can.

@djspiewak
Copy link
Member

I would say that this is best tried and experimented with! PRs very much welcome.

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

No branches or pull requests

3 participants