stm-containers 1.2.0.2 → 1.2.0.3
raw patch · 5 files changed
+20/−19 lines, 5 files
Files
- library/StmContainers/Prelude.hs +1/−1
- stm-containers.cabal +1/−1
- test/Main.hs +5/−4
- test/Suites/Map.hs +12/−12
- test/Suites/Map/Update.hs +1/−1
library/StmContainers/Prelude.hs view
@@ -26,7 +26,7 @@ import Data.Fixed as Exports import Data.Foldable as Exports import Data.Function as Exports hiding (id, (.))-import Data.Functor as Exports+import Data.Functor as Exports hiding (unzip) import Data.Hashable as Exports (Hashable (..)) import Data.IORef as Exports import Data.Int as Exports
stm-containers.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: stm-containers-version: 1.2.0.2+version: 1.2.0.3 synopsis: Containers for STM description: This library is based on an STM-specialized implementation of
test/Main.hs view
@@ -5,7 +5,8 @@ main :: IO () main =- defaultMain . testGroup "" $- [ testGroup "Bimap" Suites.Bimap.tests,- testGroup "Map" Suites.Map.tests- ]+ defaultMain+ . testGroup ""+ $ [ testGroup "Bimap" Suites.Bimap.tests,+ testGroup "Map" Suites.Map.tests+ ]
test/Suites/Map.hs view
@@ -68,18 +68,18 @@ tests :: [TestTree] tests =- [ testProperty "sizeAndList" $- let gen = do- keys <- nub <$> listOf (choose ('a', 'z'))- mapM (liftA2 (flip (,)) (choose (0, 99 :: Int)) . pure) keys- prop list =- length list == stmMapLength- where- stmMapLength =- unsafePerformIO $ atomically $ do- x <- stmMapFromList list- StmMap.size x- in forAll gen prop,+ [ testProperty "sizeAndList"+ $ let gen = do+ keys <- nub <$> listOf (choose ('a', 'z'))+ mapM (liftA2 (flip (,)) (choose (0, 99 :: Int)) . pure) keys+ prop list =+ length list == stmMapLength+ where+ stmMapLength =+ unsafePerformIO $ atomically $ do+ x <- stmMapFromList list+ StmMap.size x+ in forAll gen prop, testProperty "fromListToListHashMapIsomorphism" $ \(list :: [(Text, Int)]) -> let hashMapList = HashMap.toList (HashMap.fromList list) stmMapList = unsafePerformIO $ atomically $ stmMapFromList list >>= stmMapToList
test/Suites/Map/Update.hs view
@@ -36,7 +36,7 @@ where showsPrecInner = showsPrec (succ 5) -instance Show1 (UpdateF k v) where+instance (Show k, Show v) => Show1 (UpdateF k v) where liftShowsPrec = undefined makeFree ''UpdateF