On second thought, surviving connection drops means catching some network & backend specific errors. So this can't be added to resource-pool. There could be a common package for network errors though. I think the most common error I have seen is:
hGetBuf: resource vanished (Connection reset by peer)
I would like for database drivers to survive connection drops (these can be created by re-starting the database). Does it make sense to add a withResourceRetry function to the resource-pool library?