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

Unify MonadIO and MonadThrow constraints? #27

Closed
snoyberg opened this issue Jul 12, 2017 · 2 comments
Closed

Unify MonadIO and MonadThrow constraints? #27

snoyberg opened this issue Jul 12, 2017 · 2 comments
Milestone

Comments

@snoyberg
Copy link
Contributor

A number of functions provide both MonadIO and MonadThrow constraints. However, by sticking a liftIO in front of the function body, we can knock this down to just a MonadIO constraint in all cases. Is there any objection to this change? If not, I can send a PR.

@mrkkrp
Copy link
Owner

mrkkrp commented Jul 12, 2017

I think this is actually a good idea, please go ahead with the PR. I wonder if the same can be done about MonadCatch. I'd start by moving ignoringIOErrors (internal helper) into plain IO and then adding liftIO in front of copyDirRecurGen and similar, the constraint should go away then, although maybe I'm missing something.

We could try to stop depending on exceptions directly then. path still depends on exceptions though.

@mrkkrp mrkkrp added this to the 1.3.2 milestone Jul 12, 2017
snoyberg added a commit to snoyberg/path-io that referenced this issue Jul 12, 2017
@snoyberg
Copy link
Contributor Author

PR #28 is open.

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

2 participants