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

Comments

Projects
None yet
2 participants
@snoyberg
Contributor

snoyberg commented Jul 12, 2017

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

This comment has been minimized.

Show comment
Hide comment
@mrkkrp

mrkkrp Jul 12, 2017

Owner

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.

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 the enhancement label Jul 12, 2017

@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

This comment has been minimized.

Show comment
Hide comment
@snoyberg

snoyberg Jul 12, 2017

Contributor

PR #28 is open.

Contributor

snoyberg commented Jul 12, 2017

PR #28 is open.

mrkkrp added a commit that referenced this issue Jul 12, 2017

@mrkkrp mrkkrp closed this Jul 12, 2017

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