-
-
Save NathanHowell/8062519e4524bd2d7e30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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