mightybyte / snaplet-postgresql-simple

BSD 3-Clause "New" or "Revised" License
40 stars 38 forks source link

Generalize liftPG to any monad #32

Closed sopvop closed 9 years ago

sopvop commented 9 years ago

This is useful if you want to use connection from IO callback. Alternatively we could export withConnection (former liftPG'). That can actually be a good idea in addition to liftPG change. Added Connection to exports to simplify imports for user.

Rename original liftPG to liftPG' as one specialized to IO for internal use. And liftPG' renamed to withConnection, for better code readability.