Skip to content

Instantly share code, notes, and snippets.

@mightybyte
Created March 16, 2013 00:59
Show Gist options
  • Save mightybyte/5174387 to your computer and use it in GitHub Desktop.
Save mightybyte/5174387 to your computer and use it in GitHub Desktop.
Another attempt at formulating MonadPostgres
class MonadIO m => MonadPostgres m where
withConn :: (P.Connection -> m a) -> m a
getPooler :: m ((P.Connection -> m a) -> m a)
withPool :: (P.Connection -> m a) -> m a
withPool f = do
pooler <- getPooler
pooler f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment