packages feed

hashable 1.3.4.0 → 1.3.4.1

raw patch · 5 files changed

+22/−16 lines, 5 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

CHANGES.md view
@@ -1,5 +1,10 @@ See also https://pvp.haskell.org/faq +## Version 1.3.4.1++ * Fix compilation on 32 bit platforms+ * Fix `Tree` instance+ ## Version 1.3.4.0  * `Text` and `ByteString` hashes include length.    This fixes a variant of https://github.com/haskell-unordered-containers/hashable/issues/74
hashable.cabal view
@@ -1,6 +1,6 @@ cabal-version:      1.12 name:               hashable-version:            1.3.4.0+version:            1.3.4.1 synopsis:           A class for types that can be converted to a hash value description:   This package defines a class, 'Hashable', for types that@@ -69,6 +69,7 @@    other-modules:     Data.Hashable.Class+    Data.Hashable.Imports     Data.Hashable.LowLevel     Data.Hashable.Generic.Instances 
src/Data/Hashable/Class.hs view
@@ -64,7 +64,6 @@ import Control.Applicative (Const(..)) import Control.Exception (assert) import Control.DeepSeq (NFData(rnf))-import Data.Bits (shiftL, shiftR, xor) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Unsafe as B@@ -132,12 +131,6 @@ import Data.Word (Word) #endif -#if MIN_VERSION_base(4,7,0)-import Data.Bits (finiteBitSize)-#else-import Data.Bits (bitSize)-#endif- #if !(MIN_VERSION_bytestring(0,10,0)) import qualified Data.ByteString.Lazy.Internal as BL  -- foldlChunks #endif@@ -193,7 +186,7 @@ #define Type * #endif -+import Data.Hashable.Imports import Data.Hashable.LowLevel  #include "MachDeps.h"@@ -1026,7 +1019,8 @@  -- | @since 1.3.4.0 instance Hashable1 Tree.Tree where-    liftHashWithSalt h s (Tree.Node x xs) = h s x+    liftHashWithSalt h = go where+        go s (Tree.Node x xs) = liftHashWithSalt go (h s x) xs  -- | @since 1.3.4.0 instance Hashable v => Hashable (Tree.Tree v) where
+ src/Data/Hashable/Imports.hs view
@@ -0,0 +1,11 @@+-- | This module exists to avoid conditional imports+-- and unused import warnings.+module Data.Hashable.Imports (+    Int64, Int32,+    Word64, Word32,+    xor, shiftR, shiftL,+) where++import Data.Int (Int64, Int32)+import Data.Word (Word64, Word32)+import Data.Bits (xor, shiftR, shiftL)
src/Data/Hashable/LowLevel.hs view
@@ -13,9 +13,6 @@  #include "MachDeps.h" -import Data.Bits (xor)-import Data.Int (Int64)-import Data.Word (Word64) import Foreign.C (CString) import Foreign.Ptr (Ptr, castPtr) import GHC.Base (ByteArray#)@@ -24,9 +21,7 @@ import System.IO.Unsafe (unsafePerformIO) #endif -#if WORD_SIZE_IN_BITS != 64-import Data.Bits (shiftR)-#endif+import Data.Hashable.Imports  ------------------------------------------------------------------------------- -- Initial seed