Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-hashable for openSUSE:Factory checked in at 2023-04-04 21:20:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-hashable (Old) and /work/SRC/openSUSE:Factory/.ghc-hashable.new.19717 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-hashable" Tue Apr 4 21:20:14 2023 rev:33 rq:1075890 version:1.4.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-hashable/ghc-hashable.changes 2022-02-11 23:10:52.647200712 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-hashable.new.19717/ghc-hashable.changes 2023-04-04 21:20:29.877220066 +0200 @@ -1,0 +2,46 @@ +Thu Mar 30 17:06:55 UTC 2023 - Peter Simons <[email protected]> + +- Updated spec file to conform with ghc-rpm-macros-2.5.2. + +------------------------------------------------------------------- +Sun Mar 12 08:49:40 UTC 2023 - Peter Simons <[email protected]> + +- Update hashable to version 1.4.2.0 revision 1. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Thu Jan 5 15:05:33 UTC 2023 - Peter Simons <[email protected]> + +- Update hashable to version 1.4.2.0. + ## Version 1.4.2.0 + + * Fix the foreign signature of `getThreadId` + https://github.com/haskell-unordered-containers/hashable/pull/263 + * Drop support for GHCs prior GHC-8.2 + The recent `unordered-containers` releases support only GHC-8.2+ + * Add instance for `OsString`, `PosixString`, `WindowsString` from `filepath-1.4.100.1` + * Add `Hashable ByteArray` instance using `data-array-byte` compat package + + ## Version 1.4.1.0 + + * Add instance for `Data.Array.Byte.ByteArray`. + + ## Version 1.4.0.2 + + * Restore older GHC support + * Support GHC-9.0.2 + + ## Version 1.4.0.1 + + * `text-2.0` compatibility + + ## Version 1.4.0.0 + + * `Eq` is now a superclass of `Hashable`. + Also `Eq1` is a superclass of `Hashable1` and `Eq2` is a superclass of `Hashable2` + when exists. + + * Remove `Hashable1 Fixed` instance + * Remove `Hashable1 Semi.Min/Max/...` instances as they don't have `Eq1` instance. + +------------------------------------------------------------------- Old: ---- hashable-1.3.5.0.tar.gz New: ---- hashable-1.4.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-hashable.spec ++++++ --- /var/tmp/diff_new_pack.RCYShd/_old 2023-04-04 21:20:31.257228865 +0200 +++ /var/tmp/diff_new_pack.RCYShd/_new 2023-04-04 21:20:31.261228890 +0200 @@ -1,7 +1,7 @@ # # spec file for package ghc-hashable # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,9 +17,10 @@ %global pkg_name hashable +%global pkgver %{pkg_name}-%{version} %bcond_with tests Name: ghc-%{pkg_name} -Version: 1.3.5.0 +Version: 1.4.2.0 Release: 0 Summary: A class for types that can be converted to a hash value License: BSD-3-Clause @@ -27,20 +28,35 @@ Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel +BuildRequires: ghc-base-devel +BuildRequires: ghc-base-prof BuildRequires: ghc-bytestring-devel +BuildRequires: ghc-bytestring-prof BuildRequires: ghc-containers-devel +BuildRequires: ghc-containers-prof BuildRequires: ghc-deepseq-devel +BuildRequires: ghc-deepseq-prof +BuildRequires: ghc-filepath-devel +BuildRequires: ghc-filepath-prof BuildRequires: ghc-rpm-macros BuildRequires: ghc-text-devel +BuildRequires: ghc-text-prof ExcludeArch: %{ix86} %if %{with tests} BuildRequires: ghc-HUnit-devel +BuildRequires: ghc-HUnit-prof BuildRequires: ghc-QuickCheck-devel +BuildRequires: ghc-QuickCheck-prof BuildRequires: ghc-random-devel +BuildRequires: ghc-random-prof BuildRequires: ghc-test-framework-devel BuildRequires: ghc-test-framework-hunit-devel +BuildRequires: ghc-test-framework-hunit-prof +BuildRequires: ghc-test-framework-prof BuildRequires: ghc-test-framework-quickcheck2-devel +BuildRequires: ghc-test-framework-quickcheck2-prof BuildRequires: ghc-unix-devel +BuildRequires: ghc-unix-prof %endif %description @@ -59,6 +75,22 @@ %description devel This package provides the Haskell %{pkg_name} library development files. +%package -n ghc-%{pkg_name}-doc +Summary: Haskell %{pkg_name} library documentation +Requires: ghc-filesystem +BuildArch: noarch + +%description -n ghc-%{pkg_name}-doc +This package provides the Haskell %{pkg_name} library documentation. + +%package -n ghc-%{pkg_name}-prof +Summary: Haskell %{pkg_name} profiling library +Requires: ghc-%{pkg_name}-devel = %{version}-%{release} +Supplements: (ghc-%{pkg_name}-devel and ghc-prof) + +%description -n ghc-%{pkg_name}-prof +This package provides the Haskell %{pkg_name} profiling library. + %prep %autosetup -n %{pkg_name}-%{version} cp -p %{SOURCE1} %{pkg_name}.cabal @@ -84,4 +116,9 @@ %files devel -f %{name}-devel.files %doc CHANGES.md README.md +%files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files +%license LICENSE + +%files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files + %changelog ++++++ hashable-1.3.5.0.tar.gz -> hashable-1.4.2.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashable-1.3.5.0/CHANGES.md new/hashable-1.4.2.0/CHANGES.md --- old/hashable-1.3.5.0/CHANGES.md 2001-09-09 03:46:40.000000000 +0200 +++ new/hashable-1.4.2.0/CHANGES.md 2001-09-09 03:46:40.000000000 +0200 @@ -1,5 +1,36 @@ See also https://pvp.haskell.org/faq +## Version 1.4.2.0 + + * Fix the foreign signature of `getThreadId` + https://github.com/haskell-unordered-containers/hashable/pull/263 + * Drop support for GHCs prior GHC-8.2 + The recent `unordered-containers` releases support only GHC-8.2+ + * Add instance for `OsString`, `PosixString`, `WindowsString` from `filepath-1.4.100.1` + * Add `Hashable ByteArray` instance using `data-array-byte` compat package + +## Version 1.4.1.0 + + * Add instance for `Data.Array.Byte.ByteArray`. + +## Version 1.4.0.2 + + * Restore older GHC support + * Support GHC-9.0.2 + +## Version 1.4.0.1 + + * `text-2.0` compatibility + +## Version 1.4.0.0 + + * `Eq` is now a superclass of `Hashable`. + Also `Eq1` is a superclass of `Hashable1` and `Eq2` is a superclass of `Hashable2` + when exists. + + * Remove `Hashable1 Fixed` instance + * Remove `Hashable1 Semi.Min/Max/...` instances as they don't have `Eq1` instance. + ## Version 1.3.5.0 * Add `Solo` instance (base-4.15+, GHC-9+) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashable-1.3.5.0/examples/Main.hs new/hashable-1.4.2.0/examples/Main.hs --- old/hashable-1.3.5.0/examples/Main.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/hashable-1.4.2.0/examples/Main.hs 2001-09-09 03:46:40.000000000 +0200 @@ -6,12 +6,12 @@ data Foo = Foo1 Int Char Bool | Foo2 String () - deriving (Generic) + deriving (Eq, Generic) instance Hashable Foo data Bar = Bar Double Float - deriving (Generic) + deriving (Eq, Generic) instance Hashable Bar @@ -31,6 +31,8 @@ -- Higher Rank Hashable Examples -- ----------------------------------- +{- TODO: + newtype WriterT w m a = WriterT { runWriterT :: m (a, w) } data Free f a = Pure a | Free (f (Free f a)) @@ -47,4 +49,4 @@ hashWithSalt = hashWithSalt1 instance (Hashable1 f, Hashable a) => Hashable (Free f a) where hashWithSalt = hashWithSalt1 - +-} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashable-1.3.5.0/hashable.cabal new/hashable-1.4.2.0/hashable.cabal --- old/hashable-1.3.5.0/hashable.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/hashable-1.4.2.0/hashable.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,6 @@ cabal-version: 1.12 name: hashable -version: 1.3.5.0 +version: 1.4.2.0 synopsis: A class for types that can be converted to a hash value description: This package defines a class, 'Hashable', for types that @@ -26,23 +26,21 @@ category: Data build-type: Simple tested-with: - GHC ==7.4.2 - || ==7.6.3 - || ==7.8.4 - || ==7.10.3 - || ==8.0.2 - || ==8.2.2 + GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.3 || ==8.10.4 + || ==8.10.7 || ==9.0.1 - || ==9.2.1 + || ==9.0.2 + || ==9.2.5 + || ==9.4.4 extra-source-files: CHANGES.md - README.md include/HsHashable.h + README.md flag integer-gmp description: @@ -69,23 +67,34 @@ other-modules: Data.Hashable.Class + Data.Hashable.Generic.Instances Data.Hashable.Imports Data.Hashable.LowLevel - Data.Hashable.Generic.Instances c-sources: cbits/fnv.c include-dirs: include hs-source-dirs: src build-depends: - base >=4.5 && <4.17 - , bytestring >=0.9 && <0.12 - , containers >=0.4.2.1 && <0.7 - , deepseq >=1.3 && <1.5 + base >=4.10.1.0 && <4.18 + , bytestring >=0.10.8.2 && <0.12 + , containers >=0.5.10.2 && <0.7 + , deepseq >=1.4.3.0 && <1.5 + , filepath >=1.4.1.2 && <1.5 , ghc-prim - , text >=0.12 && <1.3 + , text >=1.2.3.0 && <1.3 || >=2.0 && <2.1 + if !impl(ghc >=9.2) + build-depends: base-orphans >=0.8.6 && <0.9 + + if !impl(ghc >=9.4) + build-depends: data-array-byte >=0.1.0.1 && <0.2 + + -- Integer internals if impl(ghc >=9) - build-depends: ghc-bignum ==1.0.* || ==1.2.* + build-depends: ghc-bignum >=1.0 && <1.4 + + if !impl(ghc >=9.0.2) + build-depends: ghc-bignum-orphans >=0.1 && <0.2 else if flag(integer-gmp) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashable-1.3.5.0/src/Data/Hashable/Class.hs new/hashable-1.4.2.0/src/Data/Hashable/Class.hs --- old/hashable-1.3.5.0/src/Data/Hashable/Class.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/hashable-1.4.2.0/src/Data/Hashable/Class.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,13 +1,14 @@ -{-# LANGUAGE BangPatterns, CPP, MagicHash, - ScopedTypeVariables, UnliftedFFITypes, DeriveDataTypeable, - DefaultSignatures, FlexibleContexts, TypeFamilies, - MultiParamTypeClasses, CApiFFI #-} - -{-# LANGUAGE Trustworthy #-} - -#if __GLASGOW_HASKELL__ >= 801 -{-# LANGUAGE PolyKinds #-} -- For TypeRep instances -#endif +{-# LANGUAGE CApiFFI #-} +{-# LANGUAGE CPP #-} +{-# LANGUAGE DefaultSignatures #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE Trustworthy #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE UnliftedFFITypes #-} {-# OPTIONS_GHC -fno-warn-deprecations #-} @@ -56,94 +57,77 @@ -- * Caching hashes , Hashed , hashed + , hashedHash , unhashed , mapHashed , traverseHashed ) where -import Control.Applicative (Const(..)) -import Control.Exception (assert) -import Control.DeepSeq (NFData(rnf)) -import qualified Data.ByteString as B -import qualified Data.ByteString.Lazy as BL -import qualified Data.ByteString.Unsafe as B -import Data.Complex (Complex(..)) -import Data.Int (Int8, Int16, Int32, Int64) -import Data.List (foldl') -import Data.Ratio (Ratio, denominator, numerator) -import qualified Data.Text as T -import qualified Data.Text.Array as TA -import qualified Data.Text.Internal as T -import qualified Data.Text.Lazy as TL -import Data.Version (Version(..)) -import Data.Word (Word8, Word16, Word32, Word64) -import Foreign.Marshal.Utils (with) -import Foreign.Ptr (Ptr, FunPtr, IntPtr, WordPtr, castPtr, castFunPtrToPtr, ptrToIntPtr) -import Foreign.Storable (alignment, peek, sizeOf) -import GHC.Base (ByteArray#) -import GHC.Conc (ThreadId(..)) -import GHC.Prim (ThreadId#) -import System.IO.Unsafe (unsafeDupablePerformIO) -import System.Mem.StableName -import Data.Unique (Unique, hashUnique) -import qualified Data.IntMap as IntMap -import qualified Data.IntSet as IntSet -import qualified Data.Map as Map -import qualified Data.Sequence as Seq -import qualified Data.Set as Set -import qualified Data.Tree as Tree - --- As we use qualified F.Foldable, we don't get warnings with newer base -import qualified Data.Foldable as F - -#if MIN_VERSION_base(4,7,0) -import Data.Proxy (Proxy) -#endif - -#if MIN_VERSION_base(4,7,0) -import Data.Fixed (Fixed(..)) -#else -import Data.Fixed (Fixed) -import Unsafe.Coerce (unsafeCoerce) -#endif +import Control.Applicative (Const (..)) +import Control.DeepSeq (NFData (rnf)) +import Control.Exception (assert) +import Data.Complex (Complex (..)) +import Data.Fixed (Fixed (..)) +import Data.Functor.Classes (Eq1 (..), Eq2 (..), Ord1 (..), Show1 (..)) +import Data.Functor.Compose (Compose (..)) +import Data.Functor.Identity (Identity (..)) +import Data.Int (Int16, Int8) +import Data.Kind (Type) +import Data.List (foldl') +import Data.Proxy (Proxy) +import Data.Ratio (Ratio, denominator, numerator) +import Data.String (IsString (..)) +import Data.Unique (Unique, hashUnique) +import Data.Version (Version (..)) +import Data.Void (Void, absurd) +import Data.Word (Word16, Word8) +import Foreign.Ptr (FunPtr, IntPtr, Ptr, WordPtr, castFunPtrToPtr, ptrToIntPtr) +import Foreign.Storable (alignment, sizeOf) +import GHC.Base (ByteArray#) +import GHC.Conc (ThreadId (..)) +import GHC.Fingerprint.Type (Fingerprint (..)) +import GHC.Prim (ThreadId#) +import GHC.Word (Word (..)) +import System.IO.Unsafe (unsafeDupablePerformIO) +import System.Mem.StableName (StableName, hashStableName) +import Type.Reflection (SomeTypeRep (..), TypeRep) +import Type.Reflection.Unsafe (typeRepFingerprint) -#if MIN_VERSION_base(4,8,0) -import Data.Functor.Identity (Identity(..)) -#endif +import qualified Data.Array.Byte as AB +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.ByteString.Short.Internal as BSI +import qualified Data.ByteString.Unsafe as B +import qualified Data.Functor.Product as FP +import qualified Data.Functor.Sum as FS +import qualified Data.IntMap as IntMap +import qualified Data.IntSet as IntSet +import qualified Data.List.NonEmpty as NE +import qualified Data.Map as Map +import qualified Data.Semigroup as Semi +import qualified Data.Sequence as Seq +import qualified Data.Set as Set +import qualified Data.Text as T +import qualified Data.Text.Array as TA +import qualified Data.Text.Internal as T +import qualified Data.Text.Lazy as TL +import qualified Data.Tree as Tree import GHC.Generics -#if MIN_VERSION_base(4,10,0) -import Type.Reflection (Typeable, TypeRep, SomeTypeRep(..)) -import Type.Reflection.Unsafe (typeRepFingerprint) -import GHC.Fingerprint.Type(Fingerprint(..)) -#elif MIN_VERSION_base(4,8,0) -import Data.Typeable (typeRepFingerprint, Typeable, TypeRep) -import GHC.Fingerprint.Type(Fingerprint(..)) +#if __GLASGOW_HASKELL__ >= 904 +import Foreign.C.Types (CULLong (..)) +#elif __GLASGOW_HASKELL__ >= 900 +import Foreign.C.Types (CLong (..)) #else -import Data.Typeable.Internal (Typeable, TypeRep (..)) -import GHC.Fingerprint.Type(Fingerprint(..)) -#endif - -import Foreign.C.Types (CInt(..)) - -#if !(MIN_VERSION_base(4,8,0)) -import Data.Word (Word) -#endif - -#if !(MIN_VERSION_bytestring(0,10,0)) -import qualified Data.ByteString.Lazy.Internal as BL -- foldlChunks -#endif - -#if MIN_VERSION_bytestring(0,10,4) -import qualified Data.ByteString.Short.Internal as BSI +import Foreign.C.Types (CInt (..)) #endif #ifdef VERSION_ghc_bignum -import GHC.Num.BigNat (BigNat (..)) +import GHC.Exts (Int (..), sizeofByteArray#) +import GHC.Num.BigNat (BigNat (..)) import GHC.Num.Integer (Integer (..)) import GHC.Num.Natural (Natural (..)) -import GHC.Exts (Int (..), sizeofByteArray#) #endif #ifdef VERSION_integer_gmp @@ -152,30 +136,24 @@ # define MIN_VERSION_integer_gmp_1_0_0 # endif -import GHC.Exts (Int(..)) -import GHC.Integer.GMP.Internals (Integer(..)) +import GHC.Exts (Int (..)) +import GHC.Integer.GMP.Internals (Integer (..)) # if defined(MIN_VERSION_integer_gmp_1_0_0) -import GHC.Exts (sizeofByteArray#) -import GHC.Integer.GMP.Internals (BigNat(BN#)) +import GHC.Exts (sizeofByteArray#) +import GHC.Integer.GMP.Internals (BigNat (BN#)) # endif #endif -#if MIN_VERSION_base(4,8,0) -import Data.Void (Void, absurd) -import GHC.Exts (Word(..)) #ifndef VERSION_ghc_bignum -import GHC.Natural (Natural(..)) -#endif +import GHC.Natural (Natural (..)) #endif -#if MIN_VERSION_base(4,9,0) -import qualified Data.List.NonEmpty as NE -import Data.Semigroup -import Data.Functor.Classes (Eq1(..),Ord1(..),Show1(..),showsUnaryWith) - -import Data.Functor.Compose (Compose(..)) -import qualified Data.Functor.Product as FP -import qualified Data.Functor.Sum as FS +#if MIN_VERSION_base(4,11,0) +import GHC.Float (castDoubleToWord64, castFloatToWord32) +#else +import Foreign.Marshal.Utils (with) +import Foreign.Ptr (castPtr) +import Foreign.Storable (peek) #endif #if MIN_VERSION_base(4,16,0) @@ -184,12 +162,16 @@ import GHC.Tuple (Solo (..)) #endif -import Data.String (IsString(..)) +#if MIN_VERSION_filepath(1,4,100) +import System.OsString.Internal.Types (OsString (..), PosixString (..), WindowsString (..)) +#endif -#if MIN_VERSION_base(4,9,0) -import Data.Kind (Type) -#else -#define Type * +#ifdef VERSION_base_orphans +import Data.Orphans () +#endif + +#ifdef VERSION_ghc_bignum_orphans +import GHC.Num.Orphans () #endif import Data.Hashable.Imports @@ -213,7 +195,7 @@ -- If you are looking for 'Hashable' instance in @time@ package, -- check [time-compat](https://hackage.haskell.org/package/time-compat) -- -class Hashable a where +class Eq a => Hashable a where -- | Return a hash value for the argument, using the given salt. -- -- The general contract of 'hashWithSalt' is: @@ -270,7 +252,7 @@ class GHashable arity f where ghashWithSalt :: HashArgs arity a -> Int -> f a -> Int -class Hashable1 t where +class Eq1 t => Hashable1 t where -- | Lift a hashing function through the type constructor. liftHashWithSalt :: (Int -> a -> Int) -> Int -> t a -> Int @@ -285,7 +267,7 @@ genericLiftHashWithSalt = \h salt -> ghashWithSalt (HashArgs1 h) salt . from1 {-# INLINE genericLiftHashWithSalt #-} -class Hashable2 t where +class Eq2 t => Hashable2 t where -- | Lift a hashing function through the binary type constructor. liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> t a b -> Int @@ -400,27 +382,25 @@ numBytes = I# (sizeofByteArray# ba) #endif -#if MIN_VERSION_base(4,8,0) instance Hashable Natural where -# if defined(VERSION_ghc_bignum) +#if defined(VERSION_ghc_bignum) hash (NS n) = hash (W# n) hash (NB bn) = hash (BN# bn) hashWithSalt salt (NS n) = hashWithSalt salt (W# n) hashWithSalt salt (NB bn) = hashWithSalt salt (BN# bn) -# else -# if defined(MIN_VERSION_integer_gmp_1_0_0) +#else +#if defined(MIN_VERSION_integer_gmp_1_0_0) hash (NatS# n) = hash (W# n) hash (NatJ# bn) = hash bn hashWithSalt salt (NatS# n) = hashWithSalt salt (W# n) hashWithSalt salt (NatJ# bn) = hashWithSalt salt bn -# else +#else hash (Natural n) = hash n hashWithSalt salt (Natural n) = hashWithSalt salt n -# endif -# endif +#endif #endif instance Hashable Integer where @@ -481,12 +461,7 @@ instance Hashable1 Complex where liftHashWithSalt h s (r :+ i) = s `h` r `h` i -#if MIN_VERSION_base(4,9,0) --- Starting with base-4.9, numerator/denominator don't need 'Integral' anymore instance Hashable a => Hashable (Ratio a) where -#else -instance (Integral a, Hashable a) => Hashable (Ratio a) where -#endif {-# SPECIALIZE instance Hashable (Ratio Integer) #-} hash a = hash (numerator a) `hashWithSalt` denominator a hashWithSalt s a = s `hashWithSalt` numerator a `hashWithSalt` denominator a @@ -502,7 +477,11 @@ | isIEEE x = assert (sizeOf x >= sizeOf (0::Word32) && alignment x >= alignment (0::Word32)) $ +#if MIN_VERSION_base(4,11,0) + hash (castFloatToWord32 x) +#else hash ((unsafeDupablePerformIO $ with x $ peek . castPtr) :: Word32) +#endif | otherwise = hash (show x) hashWithSalt = defaultHashWithSalt @@ -517,7 +496,11 @@ | isIEEE x = assert (sizeOf x >= sizeOf (0::Word64) && alignment x >= alignment (0::Word64)) $ +#if MIN_VERSION_base(4,11,0) + hash (castDoubleToWord64 x) +#else hash ((unsafeDupablePerformIO $ with x $ peek . castPtr) :: Word64) +#endif | otherwise = hash (show x) hashWithSalt = defaultHashWithSalt @@ -588,8 +571,11 @@ hash (a1, a2, a3, a4, a5) = hash a1 `hashWithSalt` a2 `hashWithSalt` a3 `hashWithSalt` a4 `hashWithSalt` a5 - hashWithSalt = hashWithSalt1 + hashWithSalt s (a1, a2, a3, a4, a5) = + s `hashWithSalt` a1 `hashWithSalt` a2 `hashWithSalt` a3 + `hashWithSalt` a4 `hashWithSalt` a5 +{- instance (Hashable a1, Hashable a2, Hashable a3, Hashable a4) => Hashable1 ((,,,,) a1 a2 a3 a4) where liftHashWithSalt = defaultLiftHashWithSalt @@ -599,15 +585,18 @@ liftHashWithSalt2 h1 h2 s (a1, a2, a3, a4, a5) = (s `hashWithSalt` a1 `hashWithSalt` a2 `hashWithSalt` a3) `h1` a4 `h2` a5 - +-} instance (Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6) => Hashable (a1, a2, a3, a4, a5, a6) where hash (a1, a2, a3, a4, a5, a6) = hash a1 `hashWithSalt` a2 `hashWithSalt` a3 `hashWithSalt` a4 `hashWithSalt` a5 `hashWithSalt` a6 - hashWithSalt = hashWithSalt1 + hashWithSalt s (a1, a2, a3, a4, a5, a6) = + s `hashWithSalt` a1 `hashWithSalt` a2 `hashWithSalt` a3 + `hashWithSalt` a4 `hashWithSalt` a5 `hashWithSalt` a6 +{- instance (Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5) => Hashable1 ((,,,,,) a1 a2 a3 a4 a5) where liftHashWithSalt = defaultLiftHashWithSalt @@ -617,7 +606,7 @@ liftHashWithSalt2 h1 h2 s (a1, a2, a3, a4, a5, a6) = (s `hashWithSalt` a1 `hashWithSalt` a2 `hashWithSalt` a3 `hashWithSalt` a4) `h1` a5 `h2` a6 - +-} instance (Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6, Hashable a7) => @@ -629,6 +618,7 @@ s `hashWithSalt` a1 `hashWithSalt` a2 `hashWithSalt` a3 `hashWithSalt` a4 `hashWithSalt` a5 `hashWithSalt` a6 `hashWithSalt` a7 +{- instance (Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6) => Hashable1 ((,,,,,,) a1 a2 a3 a4 a5 a6) where liftHashWithSalt = defaultLiftHashWithSalt @@ -637,12 +627,13 @@ liftHashWithSalt2 h1 h2 s (a1, a2, a3, a4, a5, a6, a7) = (s `hashWithSalt` a1 `hashWithSalt` a2 `hashWithSalt` a3 `hashWithSalt` a4 `hashWithSalt` a5) `h1` a6 `h2` a7 +-} instance Hashable (StableName a) where hash = hashStableName hashWithSalt = defaultHashWithSalt --- Auxillary type for Hashable [a] definition +-- Auxiliary type for Hashable [a] definition data SPInt = SP !Int !Int instance Hashable a => Hashable [a] where @@ -669,12 +660,40 @@ s' <- hashPtrWithSalt p (fromIntegral len) s return (SP s' (l + len)) -#if MIN_VERSION_bytestring(0,10,4) instance Hashable BSI.ShortByteString where hashWithSalt salt sbs@(BSI.SBS ba) = hashByteArrayWithSalt ba 0 (BSI.length sbs) (hashWithSalt salt (BSI.length sbs)) + +#if MIN_VERSION_filepath(1,4,100) +-- | @since 1.4.2.0 +instance Hashable PosixString where + hashWithSalt salt (PosixString s) = hashWithSalt salt s + +-- | @since 1.4.2.0 +instance Hashable WindowsString where + hashWithSalt salt (WindowsString s) = hashWithSalt salt s + +-- | @since 1.4.2.0 +instance Hashable OsString where + hashWithSalt salt (OsString s) = hashWithSalt salt s #endif +#if MIN_VERSION_text(2,0,0) + +instance Hashable T.Text where + hashWithSalt salt (T.Text (TA.ByteArray arr) off len) = + hashByteArrayWithSalt arr off len (hashWithSalt salt len) + +instance Hashable TL.Text where + hashWithSalt salt = finalise . TL.foldlChunks step (SP salt 0) + where + finalise (SP s l) = hashWithSalt s l + step (SP s l) (T.Text (TA.ByteArray arr) off len) = SP + (hashByteArrayWithSalt arr off len s) + (l + len) + +#else + instance Hashable T.Text where hashWithSalt salt (T.Text arr off len) = hashByteArrayWithSalt (TA.aBA arr) (off `shiftL` 1) (len `shiftL` 1) @@ -688,13 +707,23 @@ (hashByteArrayWithSalt (TA.aBA arr) (off `shiftL` 1) (len `shiftL` 1) s) (l + len) +#endif + -- | Compute the hash of a ThreadId. hashThreadId :: ThreadId -> Int hashThreadId (ThreadId t) = hash (fromIntegral (getThreadId t) :: Int) -- this cannot be capi, as GHC panics. foreign import ccall unsafe "rts_getThreadId" getThreadId +#if __GLASGOW_HASKELL__ >= 904 + -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6163 + :: ThreadId# -> CULLong +#elif __GLASGOW_HASKELL__ >= 900 + -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/1254 + :: ThreadId# -> CLong +#else :: ThreadId# -> CInt +#endif instance Hashable ThreadId where hash = hashThreadId @@ -723,8 +752,6 @@ hashWithSalt = defaultHashWithSalt {-# INLINE hash #-} -#if MIN_VERSION_base(4,10,0) - hashTypeRep :: Type.Reflection.TypeRep a -> Int hashTypeRep tr = let Fingerprint x _ = typeRepFingerprint tr in fromIntegral x @@ -739,32 +766,10 @@ hashWithSalt = defaultHashWithSalt {-# INLINE hash #-} -#else - --- | Compute the hash of a TypeRep, in various GHC versions we can do this quickly. -hashTypeRep :: TypeRep -> Int -{-# INLINE hashTypeRep #-} -#if MIN_VERSION_base(4,8,0) --- Fingerprint is just the MD5, so taking any Int from it is fine -hashTypeRep tr = let Fingerprint x _ = typeRepFingerprint tr in fromIntegral x -#else --- Fingerprint is just the MD5, so taking any Int from it is fine -hashTypeRep (TypeRep (Fingerprint x _) _ _) = fromIntegral x -#endif - -instance Hashable TypeRep where - hash = hashTypeRep - hashWithSalt = defaultHashWithSalt - {-# INLINE hash #-} - -#endif - ---------------------------------------------------------------------------- -#if MIN_VERSION_base(4,8,0) instance Hashable Void where hashWithSalt _ = absurd -#endif -- | Compute a hash value for the content of this pointer. hashPtr :: Ptr a -- ^ pointer to the data to hash @@ -789,23 +794,13 @@ hashWithSalt salt (Version branch tags) = salt `hashWithSalt` branch `hashWithSalt` tags -#if MIN_VERSION_base(4,7,0) instance Hashable (Fixed a) where hashWithSalt salt (MkFixed i) = hashWithSalt salt i --- Using hashWithSalt1 would cause needless constraint -instance Hashable1 Fixed where - liftHashWithSalt _ salt (MkFixed i) = hashWithSalt salt i -#else -instance Hashable (Fixed a) where - hashWithSalt salt x = hashWithSalt salt (unsafeCoerce x :: Integer) -#endif -#if MIN_VERSION_base(4,8,0) instance Hashable a => Hashable (Identity a) where hashWithSalt = hashWithSalt1 instance Hashable1 Identity where liftHashWithSalt h salt (Identity x) = h salt x -#endif -- Using hashWithSalt1 would cause needless constraint instance Hashable a => Hashable (Const a b) where @@ -817,17 +812,13 @@ instance Hashable2 Const where liftHashWithSalt2 f _ salt (Const x) = f salt x -#if MIN_VERSION_base(4,7,0) instance Hashable (Proxy a) where hash _ = 0 hashWithSalt s _ = s instance Hashable1 Proxy where liftHashWithSalt _ s _ = s -#endif --- instances formerly provided by 'semigroups' package -#if MIN_VERSION_base(4,9,0) instance Hashable a => Hashable (NE.NonEmpty a) where hashWithSalt p (a NE.:| as) = p `hashWithSalt` a `hashWithSalt` as @@ -835,54 +826,59 @@ instance Hashable1 NE.NonEmpty where liftHashWithSalt h salt (a NE.:| as) = liftHashWithSalt h (h salt a) as -instance Hashable a => Hashable (Min a) where - hashWithSalt p (Min a) = hashWithSalt p a +instance Hashable a => Hashable (Semi.Min a) where + hashWithSalt p (Semi.Min a) = hashWithSalt p a --- | @since 1.3.1.0 -instance Hashable1 Min where liftHashWithSalt h salt (Min a) = h salt a - -instance Hashable a => Hashable (Max a) where - hashWithSalt p (Max a) = hashWithSalt p a - --- | @since 1.3.1.0 -instance Hashable1 Max where liftHashWithSalt h salt (Max a) = h salt a +instance Hashable a => Hashable (Semi.Max a) where + hashWithSalt p (Semi.Max a) = hashWithSalt p a -- | __Note__: Prior to @hashable-1.3.0.0@ the hash computation included the second argument of 'Arg' which wasn't consistent with its 'Eq' instance. -- -- @since 1.3.0.0 -instance Hashable a => Hashable (Arg a b) where - hashWithSalt p (Arg a _) = hashWithSalt p a +instance Hashable a => Hashable (Semi.Arg a b) where + hashWithSalt p (Semi.Arg a _) = hashWithSalt p a -instance Hashable a => Hashable (First a) where - hashWithSalt p (First a) = hashWithSalt p a +instance Hashable a => Hashable (Semi.First a) where + hashWithSalt p (Semi.First a) = hashWithSalt p a --- | @since 1.3.1.0 -instance Hashable1 First where liftHashWithSalt h salt (First a) = h salt a -instance Hashable a => Hashable (Last a) where - hashWithSalt p (Last a) = hashWithSalt p a +instance Hashable a => Hashable (Semi.Last a) where + hashWithSalt p (Semi.Last a) = hashWithSalt p a + + +instance Hashable a => Hashable (Semi.WrappedMonoid a) where + hashWithSalt p (Semi.WrapMonoid a) = hashWithSalt p a + + +#if !MIN_VERSION_base(4,16,0) +instance Hashable a => Hashable (Semi.Option a) where + hashWithSalt p (Semi.Option a) = hashWithSalt p a + +#endif + +-- TODO: this instance is removed as there isn't Eq1 Min/Max, ... +#if 0 -- | @since 1.3.1.0 -instance Hashable1 Last where liftHashWithSalt h salt (Last a) = h salt a +-- instance Hashable1 Min where liftHashWithSalt h salt (Min a) = h salt a -instance Hashable a => Hashable (WrappedMonoid a) where - hashWithSalt p (WrapMonoid a) = hashWithSalt p a +-- | @since 1.3.1.0 +-- instance Hashable1 Max where liftHashWithSalt h salt (Max a) = h salt a -- | @since 1.3.1.0 -instance Hashable1 WrappedMonoid where liftHashWithSalt h salt (WrapMonoid a) = h salt a +-- instance Hashable1 First where liftHashWithSalt h salt (First a) = h salt a + +-- | @since 1.3.1.0 +-- instance Hashable1 Last where liftHashWithSalt h salt (Last a) = h salt a -#if !MIN_VERSION_base(4,16,0) -instance Hashable a => Hashable (Option a) where - hashWithSalt p (Option a) = hashWithSalt p a -- | @since 1.3.1.0 -instance Hashable1 Option where liftHashWithSalt h salt (Option a) = liftHashWithSalt h salt a -#endif +-- instance Hashable1 WrappedMonoid where liftHashWithSalt h salt (WrapMonoid a) = h salt a + +-- | @since 1.3.1.0 +-- instance Hashable1 Option where liftHashWithSalt h salt (Option a) = liftHashWithSalt h salt a #endif --- instances for @Data.Functor.{Product,Sum,Compose}@, present --- in base-4.9 and onward. -#if MIN_VERSION_base(4,9,0) -- | In general, @hash (Compose x) â hash x@. However, @hashWithSalt@ satisfies -- its variant of this equivalence. instance (Hashable1 f, Hashable1 g, Hashable a) => Hashable (Compose f g a) where @@ -903,11 +899,25 @@ instance (Hashable1 f, Hashable1 g, Hashable a) => Hashable (FS.Sum f g a) where hashWithSalt = hashWithSalt1 -#endif + +-- | This instance was available since 1.4.1.0 only for GHC-9.4+ +-- +-- @since 1.4.2.0 +-- +instance Hashable AB.ByteArray where + hashWithSalt salt (AB.ByteArray ba) = + hashByteArrayWithSalt ba 0 numBytes salt + `hashWithSalt` size + where + size = numBytes `quot` SIZEOF_HSWORD + numBytes = I# (sizeofByteArray# ba) + +------------------------------------------------------------------------------- +-- Hashed +------------------------------------------------------------------------------- -- | A hashable value along with the result of the 'hash' function. data Hashed a = Hashed a {-# UNPACK #-} !Int - deriving (Typeable) -- | Wrap a hashable value, caching the 'hash' function result. hashed :: Hashable a => a -> Hashed a @@ -917,6 +927,12 @@ unhashed :: Hashed a -> a unhashed (Hashed a _) = a +-- | 'hash' has 'Eq' requirement. +-- +-- @since 1.4.0.0 +hashedHash :: Hashed a -> Int +hashedHash (Hashed _ h) = h + -- | Uses precomputed hash to detect inequality faster instance Eq a => Eq (Hashed a) where Hashed a ha == Hashed b hb = ha == hb && a == b @@ -928,9 +944,10 @@ showsPrec d (Hashed a _) = showParen (d > 10) $ showString "hashed" . showChar ' ' . showsPrec 11 a -instance Hashable (Hashed a) where +instance Eq a => Hashable (Hashed a) where hashWithSalt = defaultHashWithSalt - hash (Hashed _ h) = h + hash = hashedHash + -- This instance is a little unsettling. It is unusal for -- 'liftHashWithSalt' to ignore its first argument when a @@ -941,7 +958,8 @@ instance (IsString a, Hashable a) => IsString (Hashed a) where fromString s = let r = fromString s in Hashed r (hash r) -instance F.Foldable Hashed where +instance Foldable Hashed where + foldMap f (Hashed a _) = f a foldr f acc (Hashed a _) = f a acc instance NFData a => NFData (Hashed a) where @@ -957,7 +975,6 @@ -- instances for @Data.Functor.Classes@ higher rank typeclasses -- in base-4.9 and onward. -#if MIN_VERSION_base(4,9,0) instance Eq1 Hashed where liftEq f (Hashed a ha) (Hashed b hb) = ha == hb && f a b @@ -965,8 +982,8 @@ liftCompare f (Hashed a _) (Hashed b _) = f a b instance Show1 Hashed where - liftShowsPrec sp _ d (Hashed a _) = showsUnaryWith sp "hashed" d a -#endif + liftShowsPrec sp _ d (Hashed a _) = showParen (d > 10) $ + showString "hashed " . sp 11 a ------------------------------------------------------------------------------- -- containers @@ -1017,7 +1034,7 @@ -- | @since 1.3.4.0 instance Hashable1 Seq.Seq where - liftHashWithSalt h s x = F.foldl' h (hashWithSalt s (Seq.length x)) x + liftHashWithSalt h s x = foldl' h (hashWithSalt s (Seq.length x)) x -- | @since 1.3.4.0 instance Hashable v => Hashable (Seq.Seq v) where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashable-1.3.5.0/src/Data/Hashable/Generic/Instances.hs new/hashable-1.4.2.0/src/Data/Hashable/Generic/Instances.hs --- old/hashable-1.3.5.0/src/Data/Hashable/Generic/Instances.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/hashable-1.4.2.0/src/Data/Hashable/Generic/Instances.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,4 +1,4 @@ -{-# LANGUAGE BangPatterns, CPP, FlexibleInstances, KindSignatures, +{-# LANGUAGE BangPatterns, FlexibleInstances, KindSignatures, ScopedTypeVariables, TypeOperators, MultiParamTypeClasses, GADTs, FlexibleContexts #-} {-# OPTIONS_GHC -fno-warn-orphans #-} @@ -19,12 +19,7 @@ import Data.Hashable.Class import GHC.Generics - -#if MIN_VERSION_base(4,9,0) import Data.Kind (Type) -#else -#define Type * -#endif -- Type without constructors @@ -63,12 +58,12 @@ -- [Note: Hashing a sum type] -- -- The tree structure is used in GHC.Generics to represent the sum (and --- product) part of the generic represention of the type, e.g.: +-- product) part of the generic representation of the type, e.g.: -- -- (C0 ... :+: C1 ...) :+: (C2 ... :+: (C3 ... :+: C4 ...)) -- -- The value constructed with C2 constructor is represented as (R1 (L1 ...)). --- Yet, if we think that this tree is a flat (heterogenous) list: +-- Yet, if we think that this tree is a flat (heterogeneous) list: -- -- [C0 ..., C1 ..., C2 ..., C3 ..., C4... ] -- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashable-1.3.5.0/src/Data/Hashable/Imports.hs new/hashable-1.4.2.0/src/Data/Hashable/Imports.hs --- old/hashable-1.3.5.0/src/Data/Hashable/Imports.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/hashable-1.4.2.0/src/Data/Hashable/Imports.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,13 @@ -- | This module exists to avoid conditional imports -- and unused import warnings. +{-# LANGUAGE Safe #-} module Data.Hashable.Imports ( Int64, Int32, Word64, Word32, xor, shiftR, shiftL, ) where +import Prelude () import Data.Int (Int64, Int32) import Data.Word (Word64, Word32) import Data.Bits (xor, shiftR, shiftL) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashable-1.3.5.0/src/Data/Hashable.hs new/hashable-1.4.2.0/src/Data/Hashable.hs --- old/hashable-1.3.5.0/src/Data/Hashable.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/hashable-1.4.2.0/src/Data/Hashable.hs 2001-09-09 03:46:40.000000000 +0200 @@ -63,6 +63,7 @@ -- * Caching hashes , Hashed , hashed + , hashedHash , unhashed , mapHashed , traverseHashed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashable-1.3.5.0/tests/Properties.hs new/hashable-1.4.2.0/tests/Properties.hs --- old/hashable-1.3.5.0/tests/Properties.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/hashable-1.4.2.0/tests/Properties.hs 2001-09-09 03:46:40.000000000 +0200 @@ -28,9 +28,7 @@ import Test.Framework.Providers.QuickCheck2 (testProperty) import GHC.Generics -#if MIN_VERSION_bytestring(0,10,4) import qualified Data.ByteString.Short as BS -#endif ------------------------------------------------------------------------ -- * Properties @@ -49,10 +47,8 @@ ((BL.fromChunks . map (B.pack . nonEmpty)) `fmap` arbitrary) where nonEmpty (NonEmpty a) = a -#if MIN_VERSION_bytestring(0,10,4) instance Arbitrary BS.ShortByteString where arbitrary = BS.pack `fmap` arbitrary -#endif -- | Validate the implementation by comparing the C and Haskell -- versions. @@ -101,11 +97,9 @@ where (a,b) = T.splitAt (unCS c) t go _ [] = error "Properties.rechunk - The 'impossible' happened!" -#if MIN_VERSION_bytestring(0,10,4) -- | Content equality implies hash equality. pBSShort :: BS.ShortByteString -> BS.ShortByteString -> Bool pBSShort a b = if (a == b) then (hash a == hash b) else True -#endif -- | Content equality implies hash equality. pBS :: B.ByteString -> B.ByteString -> Bool @@ -154,7 +148,7 @@ -- Generics data Product2 a b = Product2 a b - deriving (Generic) + deriving (Eq, Generic) instance (Arbitrary a, Arbitrary b) => Arbitrary (Product2 a b) where arbitrary = Product2 `liftM` arbitrary `ap` arbitrary @@ -162,7 +156,7 @@ instance (Hashable a, Hashable b) => Hashable (Product2 a b) data Product3 a b c = Product3 a b c - deriving (Generic) + deriving (Eq, Generic) instance (Arbitrary a, Arbitrary b, Arbitrary c) => Arbitrary (Product3 a b c) where @@ -232,9 +226,7 @@ , testGroup "bytestring" [ testProperty "bytestring/strict" pBS , testProperty "bytestring/lazy" pBSLazy -#if MIN_VERSION_bytestring(0,10,4) , testProperty "bytestring/short" pBSShort -#endif , testProperty "bytestring/rechunk" pBSRechunk , testProperty "bytestring/rechunked" pBSLazyRechunked ] @@ -259,8 +251,4 @@ -- Utilities fromStrict :: B.ByteString -> BL.ByteString -#if MIN_VERSION_bytestring(0,10,0) fromStrict = BL.fromStrict -#else -fromStrict b = BL.fromChunks [b] -#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hashable-1.3.5.0/tests/Regress.hs new/hashable-1.4.2.0/tests/Regress.hs --- old/hashable-1.3.5.0/tests/Regress.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/hashable-1.4.2.0/tests/Regress.hs 2001-09-09 03:46:40.000000000 +0200 @@ -48,7 +48,12 @@ hs @=? nub hs #if WORD_SIZE_IN_BITS == 64 , testCase "64 bit Text" $ do - hash ("hello world" :: Text) @=? -3875242662334356092 + hash ("hello world" :: Text) @=? +#if MIN_VERSION_text(2,0,0) + 4078614214911247440 +#else + -3875242662334356092 +#endif #endif , F.testGroup "concatenation" [ testCase "String" $ do @@ -100,8 +105,8 @@ let actual = hashWithSalt salt s expected @=? actual -data SumOfNullary = S0 | S1 | S2 | S3 | S4 deriving (Generic) +data SumOfNullary = S0 | S1 | S2 | S3 | S4 deriving (Eq, Generic) instance Hashable SumOfNullary -data Nat = Z | S Nat deriving (Generic) +data Nat = Z | S Nat deriving (Eq, Generic) instance Hashable Nat ++++++ hashable.cabal ++++++ --- /var/tmp/diff_new_pack.RCYShd/_old 2023-04-04 21:20:31.369229578 +0200 +++ /var/tmp/diff_new_pack.RCYShd/_new 2023-04-04 21:20:31.373229604 +0200 @@ -1,6 +1,6 @@ cabal-version: 1.12 name: hashable -version: 1.3.5.0 +version: 1.4.2.0 x-revision: 1 synopsis: A class for types that can be converted to a hash value description: @@ -27,24 +27,22 @@ category: Data build-type: Simple tested-with: - GHC ==7.4.2 - || ==7.6.3 - || ==7.8.4 - || ==7.10.3 - || ==8.0.2 - || ==8.2.2 + GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.3 || ==8.10.4 + || ==8.10.7 || ==9.0.1 || ==9.0.2 - || ==9.2.1 + || ==9.2.5 + || ==9.4.4 + || ==9.6.1 extra-source-files: CHANGES.md - README.md include/HsHashable.h + README.md flag integer-gmp description: @@ -71,23 +69,34 @@ other-modules: Data.Hashable.Class + Data.Hashable.Generic.Instances Data.Hashable.Imports Data.Hashable.LowLevel - Data.Hashable.Generic.Instances c-sources: cbits/fnv.c include-dirs: include hs-source-dirs: src build-depends: - base >=4.5 && <4.17 - , bytestring >=0.9 && <0.12 - , containers >=0.4.2.1 && <0.7 - , deepseq >=1.3 && <1.5 + base >=4.10.1.0 && <4.19 + , bytestring >=0.10.8.2 && <0.12 + , containers >=0.5.10.2 && <0.7 + , deepseq >=1.4.3.0 && <1.5 + , filepath >=1.4.1.2 && <1.5 , ghc-prim - , text >=0.12 && <1.3 + , text >=1.2.3.0 && <1.3 || >=2.0 && <2.1 + if !impl(ghc >=9.2) + build-depends: base-orphans >=0.8.6 && <0.10 + + if !impl(ghc >=9.4) + build-depends: data-array-byte >=0.1.0.1 && <0.2 + + -- Integer internals if impl(ghc >=9) - build-depends: ghc-bignum ==1.0.* || ==1.1.* || ==1.2.* + build-depends: ghc-bignum >=1.0 && <1.4 + + if !impl(ghc >=9.0.2) + build-depends: ghc-bignum-orphans >=0.1 && <0.2 else if flag(integer-gmp)
