Skip to content

Instantly share code, notes, and snippets.

@jg jg/ReaderT
Created Jul 19, 2014

Embed
What would you like to do?
connectionUrl :: Reader Config B.ByteString
-- withConnection
-- :: (Database.PostgreSQL.Simple.Internal.Connection -> IO c)
-- -> ReaderT Config Data.Functor.Identity.Identity (IO c)
withConnection f = do
url <- connectionUrl
return $ 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.