Skip to content

Instantly share code, notes, and snippets.

@NathanHowell NathanHowell/ReaderT forked from jg/ReaderT
Created Jul 20, 2014

What would you like to do?
connectionUrl :: Monad m => ReaderT m Config B.ByteString
-- withConnection
-- :: (Database.PostgreSQL.Simple.Internal.Connection -> IO c)
-- -> ReaderT Config IO c
withConnection f = do
url <- connectionUrl
liftIO $ bracket (connectPostgreSQL url) close f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.