You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fact that functions like query from postgresql-simple operate in IO monad, whereas the functions in this library use mtl's MonadError (e.g. queryNamed) which makes it a bit harder to handle SqlErrors (thrown by postgresql-simple via throwIO) when using wrappers from this library.
I recently used MonadBaseControl + lifted-base to be able to get access to SqlError thrown by a query and rethrow it in our application monad which also uses MonadError.
Would it be a good idea to take advantage of the fact that potgresql-functions run in IO
and modify the existing PgNamedError by adding new constructor like this?