hashtables 1.3.1 → 1.4.0
raw patch · 4 files changed
+27/−19 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- changelog.md +6/−0
- hashtables.cabal +15/−13
- src/Data/HashTable/Internal/IntArray.hs +2/−2
- test/suite/Data/HashTable/Test/Common.hs +4/−4
changelog.md view
@@ -1,5 +1,11 @@ # Hashtables changelog +## 1.4.0++Replace deprecated Mutable Array function, which modifies the signature of the `length`+function and hence the API.+Support more recent compilers.+ ## 1.3.1 Fix Noncanonical mappend definition warning.
hashtables.cabal view
@@ -1,6 +1,6 @@ Cabal-Version: 2.2 Name: hashtables-Version: 1.3.1+Version: 1.4.0 Synopsis: Mutable hash tables in the ST monad Homepage: http://github.com/gregorycollins/hashtables License: BSD-3-Clause@@ -13,17 +13,19 @@ tested-with:- GHC == 7.8.4- GHC == 7.10.3- GHC == 8.0.2- GHC == 8.2.2- GHC == 8.4.4- GHC == 8.6.5- GHC == 8.8.4+ GHC == 9.12.0+ GHC == 9.10.1+ GHC == 9.8.2+ GHC == 9.6.6+ GHC == 9.4.8+ GHC == 9.2.8+ GHC == 9.0.2 GHC == 8.10.7- GHC == 9.0.1- GHC == 9.2.4- GHC == 9.4.2+ GHC == 8.8.4+ GHC == 8.6.5+ GHC == 8.4.4+ GHC == 8.2.2+ GHC == 8.0.2 Description: This package provides a couple of different implementations of mutable hash@@ -193,7 +195,7 @@ Data.HashTable.Internal.Linear.Bucket Build-depends: base >= 4.7 && <5,- hashable >= 1.4 && < 1.5,+ hashable >= 1.4 && < 1.6, primitive, vector >= 0.7 && <0.14 @@ -271,7 +273,7 @@ cpp-options: -DBOUNDS_CHECKING Build-depends: base >= 4 && <5,- hashable >= 1.4 && < 1.5,+ hashable >= 1.4 && < 1.6, mwc-random >= 0.8 && <0.16, primitive, QuickCheck >= 2.3.0.2,
src/Data/HashTable/Internal/IntArray.hs view
@@ -106,8 +106,8 @@ -------------------------------------------------------------------------------length :: IntArray s -> Int-length (IA a) = A.sizeofMutableByteArray a `div` wordSizeInBytes+length :: IntArray s -> ST s Int+length (IA a) = (`div` wordSizeInBytes) <$> A.getSizeofMutableByteArray a ------------------------------------------------------------------------------
test/suite/Data/HashTable/Test/Common.hs view
@@ -15,7 +15,7 @@ import Control.Applicative (pure, (<$>)) #endif import Control.Applicative ((<|>))-import Control.Monad (foldM_, liftM, when)+import Control.Monad (foldM_, when) import qualified Control.Monad as Monad import Data.IORef import Data.List hiding (delete, insert,@@ -32,7 +32,7 @@ import Test.HUnit (assertEqual, assertFailure) import Test.QuickCheck (arbitrary, choose,- sample')+ generate) import Test.QuickCheck.Monadic (PropertyM, assert, forAllM, monadicIO, pre, run)@@ -242,7 +242,7 @@ prop n = do announceQ "growTable" n ht <- run $ go n- i <- liftM head $ run $ sample' $ choose (0,n-1)+ i <- run $ generate $ choose (0,n-1) v <- run $ lookup ht i assertEq ("lookup " ++ show i) (Just i) v@@ -290,7 +290,7 @@ ht <- run $ go n - i <- liftM head $ run $ sample' $ choose (4,n-1)+ i <- run $ generate $ choose (4,n-1) v <- run $ lookup ht i assertEq ("lookup " ++ show i) (Just i) v