diff --git a/src/Control.Monad.Postgres.Cursor.purs b/src/Control.Monad.Postgres.Cursor.purs index 6277c9e..83a0935 100644 --- a/src/Control.Monad.Postgres.Cursor.purs +++ b/src/Control.Monad.Postgres.Cursor.purs @@ -22,7 +22,6 @@ import Data.Tuple.Nested (type (/\), (/\)) import Effect.Aff.Class (class MonadAff) import Effect.Aff.Unlift (class MonadUnliftAff) import Effect.Class (class MonadEffect, liftEffect) -import Effect.Postgres.Error as E import Effect.Unlift (class MonadUnliftEffect) data Move @@ -119,7 +118,7 @@ instance (MonadSession m) => MonadCursor (CursorT t m) t where RowsAffected n' <- query $ ("move relative $1 from " <> cur) /\ n pure n' -instance (MonadThrow E.E m, MonadSession m) => MonadSession (CursorT t m) where +instance (MonadSession m) => MonadSession (CursorT t m) where query = lift <<< query exec = lift <<< exec exec_ = lift <<< exec_ diff --git a/src/Control.Monad.Postgres.Session.purs b/src/Control.Monad.Postgres.Session.purs index 324ca96..a0ac59b 100644 --- a/src/Control.Monad.Postgres.Session.purs +++ b/src/Control.Monad.Postgres.Session.purs @@ -2,7 +2,7 @@ module Control.Monad.Postgres.Session where import Prelude hiding (join) -import Control.Monad.Error.Class (class MonadError, class MonadThrow, catchError, throwError) +import Control.Monad.Error.Class (class MonadError, catchError, throwError) import Control.Monad.Fork.Class (class MonadBracket) import Control.Monad.Morph (hoist) import Control.Monad.Reader (ask) @@ -44,7 +44,7 @@ instance MonadStartSession Client where endSession _ _ = pure unit -- | A monad representing a connected session to a database -class (MonadThrow E.E m, MonadAff m) <= MonadSession m where +class MonadAff m <= MonadSession m where -- | Executes a query and unmarshals the result into `r` query :: forall q r. AsQuery q => FromRows r => q -> m r -- | Executes a query and returns the number of rows affected