morphismtech / squeal

Squeal, a deep embedding of SQL in Haskell
350 stars 32 forks source link

use `MonadThrow`, `MonadCatch`, `MonadMask` #292

Closed echatav closed 3 years ago

echatav commented 3 years ago

PR #238 added instances of MonadThrow, MonadCatch, MonadMask to PQ. PR #290 used MonadCatch and MonadMask in order to define an api for safe transactions; letting transactions handle synchronous exceptions but masking asynchronous exceptions during the transaction. This PR pushes this change through Squeal, using the exceptions style of exception handling. Squeal still supports the monad-control and UnliftIO styles of asynchronous exception handling by having appropriate instances for PQ.