lpsmith/postgresql-simple — pull request #23 by sopvop (2012-07-25 09:51:24+00:00)
Title: first take on catching constraint violation

Lets try to figure out good API.

catchViolation would benefit from MonadCatchIO constraint instead of just using IO, but postgresql-simple does not use it, and I don't want to add new deps.
I could not figure out how to use 'catch' with MonadIO constraint, so there is just IO.
This function is trivial, anyway, so it can be implemented in user library. For example snaplet-postgresql-simple, which uses MonadCatchIO.