Created
July 19, 2014 18:52
-
-
Save jg/bf0dd9c8023cdb2dfd20 to your computer and use it in GitHub Desktop.
This file contains 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 :: 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