From 78030531ec382e94ad9b421ae6d1e7fa94fad79c68f13eec029e68b658b7c721 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Tue, 11 Jun 2024 14:38:21 +0000 Subject: [PATCH] osc copypac from project:devel:languages:haskell:ghc-9.8.x package:ghc-hashable revision:3, using keep-link OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc-hashable?expand=0&rev=94 --- ghc-hashable.changes | 15 +++ ghc-hashable.spec | 32 ++++--- hashable-1.4.4.0.tar.gz | 3 - hashable-1.4.6.0.tar.gz | 3 + hashable.cabal | 205 ---------------------------------------- 5 files changed, 38 insertions(+), 220 deletions(-) delete mode 100644 hashable-1.4.4.0.tar.gz create mode 100644 hashable-1.4.6.0.tar.gz delete mode 100644 hashable.cabal diff --git a/ghc-hashable.changes b/ghc-hashable.changes index b2e8360..0f6e690 100644 --- a/ghc-hashable.changes +++ b/ghc-hashable.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Sun Jun 9 19:43:26 UTC 2024 - Peter Simons + +- Update hashable to version 1.4.6.0. + ## Version 1.4.6.0 + + * Use GND&DerivingVia to derive `newtype` intances (`Data.Semigroup`, `Data.Monoid`, `Identity` etc). + + ## Version 1.4.5.0 + + * Drop support for GHCs prior 8.6.5 + * Use xxhash for hashing bytestrings and bytearrays. + Note: when compiling binaries for distribution, you may need to disable + `arch-native` flag. + ------------------------------------------------------------------- Wed Apr 3 13:35:27 UTC 2024 - Peter Simons diff --git a/ghc-hashable.spec b/ghc-hashable.spec index 41ca777..5615428 100644 --- a/ghc-hashable.spec +++ b/ghc-hashable.spec @@ -20,13 +20,12 @@ %global pkgver %{pkg_name}-%{version} %bcond_with tests Name: ghc-%{pkg_name} -Version: 1.4.4.0 +Version: 1.4.6.0 Release: 0 Summary: A class for types that can be converted to a hash value License: BSD-3-Clause URL: https://hackage.haskell.org/package/%{pkg_name} 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 @@ -49,14 +48,16 @@ BuildRequires: ghc-HUnit-devel BuildRequires: ghc-HUnit-prof BuildRequires: ghc-QuickCheck-devel BuildRequires: ghc-QuickCheck-prof +BuildRequires: ghc-primitive-devel +BuildRequires: ghc-primitive-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-tasty-devel +BuildRequires: ghc-tasty-hunit-devel +BuildRequires: ghc-tasty-hunit-prof +BuildRequires: ghc-tasty-prof +BuildRequires: ghc-tasty-quickcheck-devel +BuildRequires: ghc-tasty-quickcheck-prof BuildRequires: ghc-unix-devel BuildRequires: ghc-unix-prof %endif @@ -67,9 +68,17 @@ hash value. This class exists for the benefit of hashing-based data structures. The package provides instances for basic types and a way to combine hash values. -The 'Hashable' 'hash' values are not guaranteed to be stable across library -versions, operating systems or architectures. For stable hashing use named -hashes: SHA256, CRC32 etc. +'Hashable' is intended exclusively for use in in-memory data structures. + +'Hashable' does /not/ have a fixed standard. This allows it to improve over +time. + +Because it does not have a fixed standard, different computers or computers on +different versions of the code will observe different hash values. As such, +'hashable' is not recommended for use other than in-memory datastructures. +Specifically, 'hashable' is not intended for network use or in applications +which persist hashed values. For stable hashing use named hashes: sha256, +crc32, xxhash etc. %package devel Summary: Haskell %{pkg_name} library development files @@ -99,7 +108,6 @@ This package provides the Haskell %{pkg_name} profiling library. %prep %autosetup -n %{pkg_name}-%{version} -cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build diff --git a/hashable-1.4.4.0.tar.gz b/hashable-1.4.4.0.tar.gz deleted file mode 100644 index 6957a36..0000000 --- a/hashable-1.4.4.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1fa3d64548440942b2b38b99c76d8dcaa94fa2ea3912cd7a6354ea4ec4af4758 -size 26197 diff --git a/hashable-1.4.6.0.tar.gz b/hashable-1.4.6.0.tar.gz new file mode 100644 index 0000000..8ea64d2 --- /dev/null +++ b/hashable-1.4.6.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34652a7a1d2fc9e3d764b150bd35bcd2220761c1d4c6b446b0cfac5ad5b778cb +size 89426 diff --git a/hashable.cabal b/hashable.cabal deleted file mode 100644 index 33dcf02..0000000 --- a/hashable.cabal +++ /dev/null @@ -1,205 +0,0 @@ -cabal-version: 1.12 -name: hashable -version: 1.4.4.0 -x-revision: 1 -synopsis: A class for types that can be converted to a hash value -description: - This package defines a class, 'Hashable', for types that - can be converted to a hash value. This class - exists for the benefit of hashing-based data - structures. The package provides instances for - basic types and a way to combine hash values. - . - The 'Hashable' 'hash' values are not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc. - -homepage: http://github.com/haskell-unordered-containers/hashable - --- SPDX-License-Identifier : BSD-3-Clause -license: BSD3 -license-file: LICENSE -author: - Milan Straka - Johan Tibell - -maintainer: Oleg Grenrus -bug-reports: - https://github.com/haskell-unordered-containers/hashable/issues - -stability: Provisional -category: Data -build-type: Simple -tested-with: - 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.8 - || ==9.4.8 - || ==9.6.4 - || ==9.8.2 - || ==9.10.1 - -extra-source-files: - CHANGES.md - include/HsHashable.h - README.md - -flag integer-gmp - description: - Are we using @integer-gmp@ to provide fast Integer instances? No effect on GHC-9.0 or later. - - manual: False - default: True - -flag random-initial-seed - description: - Randomly initialize the initial seed on each final executable invocation - This is useful for catching cases when you rely on (non-existent) - stability of hashable's hash functions. - This is not a security feature. - - manual: True - default: False - -library - exposed-modules: - Data.Hashable - Data.Hashable.Generic - Data.Hashable.Lifted - - other-modules: - Data.Hashable.Class - Data.Hashable.Generic.Instances - Data.Hashable.Imports - Data.Hashable.LowLevel - - c-sources: cbits/fnv.c - include-dirs: include - hs-source-dirs: src - build-depends: - base >=4.10.1.0 && <4.21 - , bytestring >=0.10.8.2 && <0.13 - , containers >=0.5.10.2 && <0.8 - , deepseq >=1.4.3.0 && <1.6 - , ghc-prim - , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2 - - if impl(ghc >=9.2) - -- depend on os-string on newer GHCs only. - -- os-string has tight lower bound on bytestring, which prevents - -- using bundled version on older GHCs. - build-depends: os-string >=2.0.2 - - -- we also ensure that we can get filepath-1.5 only with GHC-9.2 - -- therefore there is else-branch with stricter upper bound. - build-depends: filepath >=1.4.1.2 && <1.6 - - else - build-depends: filepath >=1.4.1.2 && <1.5 - - 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.4 - - if !impl(ghc >=9.0.2) - build-depends: ghc-bignum-orphans >=0.1 && <0.2 - - else - if flag(integer-gmp) - build-depends: integer-gmp >=0.4 && <1.1 - - else - -- this is needed for the automatic flag to be well-balanced - build-depends: integer-simple - - if (flag(random-initial-seed) && impl(ghc)) - cpp-options: -DHASHABLE_RANDOM_SEED=1 - - if os(windows) - c-sources: cbits-win/init.c - - else - c-sources: cbits-unix/init.c - - default-language: Haskell2010 - other-extensions: - BangPatterns - CPP - DeriveDataTypeable - FlexibleContexts - FlexibleInstances - GADTs - KindSignatures - MagicHash - MultiParamTypeClasses - ScopedTypeVariables - Trustworthy - TypeOperators - UnliftedFFITypes - - ghc-options: -Wall -fwarn-tabs - - if impl(ghc >=9.0) - -- these flags may abort compilation with GHC-8.10 - -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295 - ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode - -test-suite hashable-tests - type: exitcode-stdio-1.0 - hs-source-dirs: tests - main-is: Main.hs - other-modules: - Properties - Regress - - build-depends: - base - , bytestring - , filepath - , ghc-prim - , hashable - , HUnit - , QuickCheck >=2.4.0.1 - , random >=1.0 && <1.3 - , test-framework >=0.3.3 - , test-framework-hunit - , test-framework-quickcheck2 >=0.2.9 - , text >=0.11.0.5 - - if impl(ghc >=9.2) - build-depends: os-string - - if !os(windows) - build-depends: unix - cpp-options: -DHAVE_MMAP - other-modules: Regress.Mmap - other-extensions: CApiFFI - - ghc-options: -Wall -fno-warn-orphans - default-language: Haskell2010 - -test-suite hashable-examples - type: exitcode-stdio-1.0 - build-depends: - base - , ghc-prim - , hashable - - hs-source-dirs: examples - main-is: Main.hs - default-language: Haskell2010 - -source-repository head - type: git - location: - https://github.com/haskell-unordered-containers/hashable.git