hpqtypes 1.11.1.0 → 1.11.1.1
raw patch · 4 files changed
+14/−9 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +3/−0
- hpqtypes.cabal +2/−2
- src/Database/PostgreSQL/PQTypes/Internal/Monad.hs +1/−0
- test/Main.hs +8/−7
CHANGELOG.md view
@@ -1,3 +1,6 @@+# hpqtypes-1.11.1.1 (2023-03-14)+* Add support for GHC 9.6.+ # hpqtypes-1.11.1.0 (2023-01-31) * Add support for setting a custom role when establishing a connection.
hpqtypes.cabal view
@@ -1,5 +1,5 @@ name: hpqtypes-version: 1.11.1.0+version: 1.11.1.1 synopsis: Haskell bindings to libpqtypes description: Efficient and easy-to-use bindings to (slightly modified)@@ -21,7 +21,7 @@ category: Database build-type: Simple cabal-version: 1.24-tested-with: GHC ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.5 || ==9.4.4+tested-with: GHC ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.7 || ==9.4.4 || ==9.6.1 extra-source-files: README.md , CHANGELOG.md
src/Database/PostgreSQL/PQTypes/Internal/Monad.hs view
@@ -7,6 +7,7 @@ import Control.Applicative import Control.Concurrent.MVar+import Control.Monad import Control.Monad.Base import Control.Monad.Catch import Control.Monad.Error.Class
test/Main.hs view
@@ -6,10 +6,10 @@ import Control.Monad import Control.Monad.Base import Control.Monad.Catch-import Control.Monad.State import Control.Monad.Trans.Control import Data.Aeson hiding ((<?>)) import Data.Char+import Data.Function import Data.Int import Data.Maybe import Data.Time@@ -26,6 +26,7 @@ import Test.QuickCheck.Gen import Test.QuickCheck.Random import TextShow+import qualified Control.Monad.State as S import qualified Data.ByteString as BS import qualified Data.Text as T import qualified Data.UUID.Types as U@@ -36,7 +37,7 @@ import Test.Aeson.Compat (Value0) import Test.QuickCheck.Arbitrary.Instances -type InnerTestEnv = StateT QCGen (DBT IO)+type InnerTestEnv = S.StateT QCGen (DBT IO) newtype TestEnv a = TestEnv { unTestEnv :: InnerTestEnv a } deriving ( Applicative, Functor, Monad, MonadFail@@ -50,7 +51,7 @@ withQCGen :: (QCGen -> r) -> TestEnv r withQCGen f = do- gen <- TestEnv $ state split+ gen <- TestEnv $ S.state split return (f gen) ----------------------------------------@@ -58,7 +59,7 @@ type TestData = (QCGen, ConnectionSettings) runTestEnv :: TestData -> TransactionSettings -> TestEnv a -> IO a-runTestEnv (env, connSettings) ts m = runDBT cs ts $ evalStateT (unTestEnv m) env+runTestEnv (env, connSettings) ts m = runDBT cs ts $ S.evalStateT (unTestEnv m) env where ConnectionSource cs = simpleSource connSettings @@ -415,7 +416,7 @@ notifyTest td = testCase "Notifications work" . runTestEnv td tsNoTrans $ do listen chan forkNewConn $ notify chan payload- mnt1 <- getNotification 100000+ mnt1 <- getNotification 250000 liftBase $ assertBool "Notification received" (isJust mnt1) Just nt1 <- pure mnt1 assertEqualEq "Channels are equal" chan (ntChannel nt1)@@ -423,13 +424,13 @@ unlisten chan forkNewConn $ notify chan payload- mnt2 <- getNotification 100000+ mnt2 <- getNotification 250000 assertEqualEq "No notification received after unlisten" Nothing mnt2 listen chan unlistenAll forkNewConn $ notify chan payload- mnt3 <- getNotification 100000+ mnt3 <- getNotification 250000 assertEqualEq "No notification received after unlistenAll" Nothing mnt3 where chan = "test_channel"