module Hasql.Private.Session.MonadThrow where

-- base
import           Control.Exception

-- transformers
import           Control.Monad.IO.Class

-- exceptions
import           Control.Monad.Catch    (MonadThrow (..))

--hasql
import           Hasql.Session

instance MonadThrow Session where
  throwM :: forall e a. (HasCallStack, Exception e) => e -> Session a
throwM = IO a -> Session a
forall a. IO a -> Session a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO a -> Session a) -> (e -> IO a) -> e -> Session a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. e -> IO a
forall e a. Exception e => e -> IO a
throwIO