@@ -68,12 +68,13 @@ module Squeal.PostgreSQL.PQ
68 , okResult
68 , okResult
69 , catchSqueal
69 , catchSqueal
70 , handleSqueal
70 , handleSqueal
73import Control.Exception (Exception, throw)
74import Control.Exception (Exception, throw)
74import Control.Monad.Except
75import Control.Monad.Except
75import Control.Monad.Morph
76import Control.Monad.Morph
76−import UnliftIO (MonadUnliftIO (..), bracket, catch, handle)
77+import UnliftIO (MonadUnliftIO (..), bracket, catch, handle, try)
77import Data.ByteString (ByteString)
78import Data.ByteString (ByteString)
78import Data.Foldable
79import Data.Foldable
79import Data.Function ((&))
80import Data.Function ((&))
@@ -678,3 +679,10 @@ handleSqueal
678 => (SquealException -> io a) -- ^ handler
679 => (SquealException -> io a) -- ^ handler
679 -> io a -> io a
680 -> io a -> io a
680handleSqueal = handle
681handleSqueal = handle
683+-- | `Either` return a `SquealException` or a result.
687+ -> io (Either SquealException a)