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

runSqlConn with ExceptT and friends #516

Closed
jkarni opened this issue Dec 11, 2015 · 5 comments
Closed

runSqlConn with ExceptT and friends #516

jkarni opened this issue Dec 11, 2015 · 5 comments

Comments

@jkarni
Copy link
Contributor

jkarni commented Dec 11, 2015

runSqlConn, when m is instantiated to a monad that doesn't necessarily execute all further actions (like ExceptT), may neither commit nor rollback (when its first argument is e.g. throwE someError). This seems like undesirable behaviour.

Original discussion here.

@snoyberg
Copy link
Member

There's no valid instance of MonadBaseControl for ExceptT, so this should be impossible by the types we're using. Where does this instance come from, and what's its code? I've encountered this bug many times in the past in different guises.

@snoyberg
Copy link
Member

I see that the instance is in monad-control itself, which is surprising (I don't remember the short-circuiting transformers having such instances in the past). I'll look into this a bit more tomorrow.

@snoyberg
Copy link
Member

Can you test the code on master?

@ondrap
Copy link

ondrap commented Dec 14, 2015

Seems to work well, good work!

@snoyberg
Copy link
Member

Cool, thanks for confirming. New version on Hackage.

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

3 participants