From 4ef3839ea9ffbdc1aad773072ebcbd747764815e Mon Sep 17 00:00:00 2001 From: Diogo Biazus Date: Sun, 5 May 2024 17:39:53 -0400 Subject: [PATCH 1/2] Upgrade hasql-pool to 1.2. Had to drop compatibility with previous versions since QueryError now is a data constructor for SessionError --- hasql-notifications.cabal | 2 +- src/Hasql/Notifications.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hasql-notifications.cabal b/hasql-notifications.cabal index 6dbd19d..030633a 100644 --- a/hasql-notifications.cabal +++ b/hasql-notifications.cabal @@ -19,7 +19,7 @@ library build-depends: base >= 4.7 && < 5 , bytestring >= 0.10.8.2 , text >= 2 && < 2.2 - , hasql-pool >= 0.4 && < 1.1 + , hasql-pool >= 1.2 && < 1.3 , bytestring >= 0.10 , postgresql-libpq >= 0.9 && < 1.0 , hasql >= 0.19 diff --git a/src/Hasql/Notifications.hs b/src/Hasql/Notifications.hs index 09d2952..dd75d2e 100644 --- a/src/Hasql/Notifications.hs +++ b/src/Hasql/Notifications.hs @@ -81,7 +81,7 @@ notify :: PgIdentifier -> -- | Payload to be sent with the notification Text -> - IO (Either S.QueryError ()) + IO (Either S.SessionError ()) notify con channel mesg = run (sql $ T.encodeUtf8 ("NOTIFY " <> fromPgIdentifier channel <> ", '" <> mesg <> "'")) con From 48f92a83683c7e7f4a7ee7d7bae2b470e5a9dbdf Mon Sep 17 00:00:00 2001 From: Diogo Biazus Date: Sun, 5 May 2024 22:21:52 -0400 Subject: [PATCH 2/2] Add some missing upper bounds --- hasql-notifications.cabal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hasql-notifications.cabal b/hasql-notifications.cabal index 030633a..c2fc5cf 100644 --- a/hasql-notifications.cabal +++ b/hasql-notifications.cabal @@ -17,12 +17,12 @@ library hs-source-dirs: src exposed-modules: Hasql.Notifications build-depends: base >= 4.7 && < 5 - , bytestring >= 0.10.8.2 + , bytestring >= 0.10.8.2 && < 0.12 , text >= 2 && < 2.2 , hasql-pool >= 1.2 && < 1.3 , bytestring >= 0.10 , postgresql-libpq >= 0.9 && < 1.0 - , hasql >= 0.19 + , hasql >= 0.19 && < 1.8 default-language: Haskell2010 ghc-options: -Wall