From 717792edcb6e56384d6f530b44a2d018f43977a3b71d68112c81aa4ccbad48e0 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 20 Dec 2024 22:00:46 +0000 Subject: [PATCH] osc copypac from project:devel:languages:haskell:ghc-9.10.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=100 --- .gitattributes | 23 +++ .gitignore | 1 + ghc-hashable.changes | 372 ++++++++++++++++++++++++++++++++++++++++ ghc-hashable.spec | 141 +++++++++++++++ hashable-1.4.6.0.tar.gz | 3 + hashable-1.4.7.0.tar.gz | 3 + hashable-1.5.0.0.tar.gz | 3 + hashable.cabal | 217 +++++++++++++++++++++++ 8 files changed, 763 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 ghc-hashable.changes create mode 100644 ghc-hashable.spec create mode 100644 hashable-1.4.6.0.tar.gz create mode 100644 hashable-1.4.7.0.tar.gz create mode 100644 hashable-1.5.0.0.tar.gz create mode 100644 hashable.cabal diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/ghc-hashable.changes b/ghc-hashable.changes new file mode 100644 index 0000000..d8ec77b --- /dev/null +++ b/ghc-hashable.changes @@ -0,0 +1,372 @@ +------------------------------------------------------------------- +Thu Dec 19 10:57:25 UTC 2024 - Peter Simons + +- Update hashable to version 1.5.0.0 revision 1. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Thu Jul 4 19:38:39 UTC 2024 - Peter Simons + +- Update hashable to version 1.5.0.0. + ## Version 1.5.0.0 + + * Add `QuantifiedConstraints` superclasses to `Hashable1/2`: + + ```haskell + class (Eq1 t, forall a. Hashable a => Hashable (t a)) => Hashable1 t where + class (Eq2 t, forall a. Hashable a => Hashable1 (t a)) => Hashable2 t where + ``` + + * Change contexts of `Compose`, `Product` and `Sum` instances. + This and above is the similar change as [CLC proposal #10](https://github.com/haskell/core-libraries-committee/issues/10) + + * The above changes require `base-4.18.0.0`, so we drop support for GHC prior GHC-9.6.5 + (The `hashable-1.4` branch will be maintained for time being for older GHC users). + + * Make `Arg a b` instance behave as `Hashable a` instance. + +------------------------------------------------------------------- +Mon Jun 24 10:44:33 UTC 2024 - Peter Simons + +- Update hashable to version 1.4.7.0. + ## Version 1.4.7.0 + + * Make `arch-native` disabled by default. + +------------------------------------------------------------------- +Tue Jun 11 19:44:31 UTC 2024 - Andreas Schwab + +- Disable use of invalid -march flag. + +------------------------------------------------------------------- +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 + +- Update hashable to version 1.4.4.0 revision 1. + ## Version 1.4.4.0 + + * Depend on `os-string-2` for GHC-9.2+ + * Support `filepath-1.5` + +------------------------------------------------------------------- +Tue Oct 3 20:15:46 UTC 2023 - Peter Simons + +- Update hashable to version 1.4.3.0 revision 1. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Sat Jul 29 15:01:55 UTC 2023 - Peter Simons + +- Update hashable to version 1.4.3.0. + ## Version 1.4.3.0 + + * Export `defaultHashWithSalt` and `defaultHash`. + * Fix issue of tuples with 0 first component causing all-zero state. + * Change `hashInt` to mix bits more. + +------------------------------------------------------------------- +Thu Mar 30 17:06:55 UTC 2023 - Peter Simons + +- Updated spec file to conform with ghc-rpm-macros-2.5.2. + +------------------------------------------------------------------- +Sun Mar 12 08:49:40 UTC 2023 - Peter Simons + +- 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 + +- 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. + +------------------------------------------------------------------- +Thu Jan 6 13:38:03 UTC 2022 - Peter Simons + +- Update hashable to version 1.3.5.0 revision 1. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Thu Nov 4 12:28:59 UTC 2021 - psimons@suse.com + +- Update hashable to version 1.3.5.0. + ## Version 1.3.5.0 + + * Add `Solo` instance (base-4.15+, GHC-9+) + +------------------------------------------------------------------- +Thu Oct 7 07:58:49 UTC 2021 - psimons@suse.com + +- Update hashable to version 1.3.4.1. + ## 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 + for texts and bytestrings. + https://github.com/haskell-unordered-containers/hashable/pull/223 + * Use correct prime in `combine`. + This should improve the hash quality of compound structures on 64bit systems. + https://github.com/haskell-unordered-containers/hashable/pull/224 + * Add instance for types in `containers` package + https://github.com/haskell-unordered-containers/hashable/pull/226 + * Change `Int`, `Int64` and `Word64` `hashWithSalt` slightly. + https://github.com/haskell-unordered-containers/hashable/pull/227 + +------------------------------------------------------------------- +Wed Aug 25 10:24:30 UTC 2021 - psimons@suse.com + +- Update hashable to version 1.3.3.0. + ## Version 1.3.3.0 + + * `Text` hashing uses 64-bit FNV prime + * Don't truncate Text hashvalues on 64bit Windows: + https://github.com/haskell-unordered-containers/hashable/pull/211 + +------------------------------------------------------------------- +Thu May 20 09:19:48 UTC 2021 - psimons@suse.com + +- Update hashable to version 1.3.2.0. + ## Version 1.3.2.0 + + * Add `Hashable (Fixed a)` for `base <4.7` versions. + * Add documentation: + - `hashable` is not a stable hash + - `hashWithSalt` may return negative values + - there is `time-compat` with `Hashable` instances for `time` types. + * Add `random-initial-seed` flag causing the initial seed + to be randomized on each start of an executable using `hashable`. + +------------------------------------------------------------------- +Mon Apr 26 08:47:35 UTC 2021 - Ondřej Súkup + +- remve obsollete fix for i586 + +------------------------------------------------------------------- +Sat Feb 20 00:17:13 UTC 2021 - psimons@suse.com + +- Update hashable to version 1.3.1.0. + ## Version 1.3.1.0 + + * Add `Hashable1` instances to `semigroups` types. + + * Use `ghc-bignum` with GHC-9.0 + + * Use FNV-1 constants. + + * Make `hashable-examples` a test-suite + +------------------------------------------------------------------- +Thu Dec 17 12:20:00 UTC 2020 - Ondřej Súkup + +- disable %{ix86} build + +------------------------------------------------------------------- +Tue Dec 8 09:22:30 UTC 2020 - psimons@suse.com + +- Update hashable to version 1.3.0.0 revision 2. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Mon Aug 31 09:34:36 UTC 2020 - psimons@suse.com + +- Update hashable to version 1.3.0.0 revision 1. + Upstream has revised the Cabal build instructions on Hackage. + +------------------------------------------------------------------- +Tue Aug 18 10:44:58 UTC 2020 - Peter Simons + +- Replace %setup -q with the more modern %autosetup macro. + +------------------------------------------------------------------- +Tue Jun 16 11:14:09 UTC 2020 - Peter Simons + +- Re-generate file with latest version of spec-cleaner. + +------------------------------------------------------------------- +Thu May 7 08:08:20 UTC 2020 - Peter Simons + +- Update Cabal file to get more accurate dependency information. + +------------------------------------------------------------------- +Sun Dec 29 10:27:18 UTC 2019 - psimons@suse.com + +- Update hashable to version 1.3.0.0. + Upstream has edited the change log file since the last release in + a non-trivial way, i.e. they did more than just add a new entry + at the top. You can review the file at: + http://hackage.haskell.org/package/hashable-1.3.0.0/src/CHANGES.md + +------------------------------------------------------------------- +Fri Nov 8 16:13:49 UTC 2019 - Peter Simons + +- Drop obsolete group attributes. + +------------------------------------------------------------------- +Sat Oct 20 11:31:34 UTC 2018 - Peter Simons + +- Use https URL to refer to bugs.opensuse.org. + +------------------------------------------------------------------- +Fri Aug 17 14:30:43 UTC 2018 - psimons@suse.com + +- Update Cabal build information to support GHC 8.6.x. + +------------------------------------------------------------------- +Wed Jul 18 14:26:26 UTC 2018 - psimons@suse.com + +- Cosmetic: replace tabs with blanks, strip trailing white space, + and update copyright headers with spec-cleaner. + +------------------------------------------------------------------- +Mon May 14 17:02:11 UTC 2018 - psimons@suse.com + +- Update hashable to version 1.2.7.0. + + * Add `Hashable` and `Hashable1` instances for `Complex` + + * Fix undefined behavior in `hashable_fn_hash()` implementation + due to signed integer overflow (#152) + + * Mark `Data.Hashable.Lifted` as `Trustworthy` (re SafeHaskell) + + * Support GHC 8.4 + +------------------------------------------------------------------- +Thu Aug 3 15:38:38 UTC 2017 - psimons@suse.com + +- Updated with latest spec-cleaner version 0.9.8-8-geadfbbf. + +------------------------------------------------------------------- +Sat Jul 8 03:02:09 UTC 2017 - psimons@suse.com + +- Update to version 1.2.6.1 revision 2. + +------------------------------------------------------------------- +Sun Jun 25 18:41:41 UTC 2017 - psimons@suse.com + +- Update to version 1.2.6.1 revision 1. + +------------------------------------------------------------------- +Mon Mar 27 12:41:05 UTC 2017 - psimons@suse.com + +- Update to version 1.2.6.0 revision 1 with cabal2obs. + +------------------------------------------------------------------- +Sun Feb 12 14:20:09 UTC 2017 - psimons@suse.com + +- Update to version 1.2.5.0 with cabal2obs. + +------------------------------------------------------------------- +Sun Jul 10 17:08:32 UTC 2016 - psimons@suse.com + +- Update to version 1.2.4.0 revision 0 with cabal2obs. + +------------------------------------------------------------------- +Sun Jan 17 10:13:24 UTC 2016 - mimi.vx@gmail.com + +- update to 1.2.4.0 +* Add instances for: Unique, Version, Fixed, NonEmpty, Min, Max, Arg, + First, Last, WrappedMonoid, Option + +------------------------------------------------------------------- +Sun Jun 28 16:43:54 UTC 2015 - mimi.vx@gmail.com + +- update to 1.2.3.3 +* Support integer-simple. + +------------------------------------------------------------------- +Sun Apr 12 18:40:00 UTC 2015 - mimi.vx@gmail.com + +- update to 1.2.3.2 ++ disable SSE2 on i586 arch +* Add support for GHC 7.10 typeRepFingerprint +* Added support for random 1.1.*. +* Silence integer literal overflow warning +* Add support for GHC 7.10 `integer-gmp2` & `Natural` +* Add instance for Data.Void +* Make the SSE .cabal flags manual +* Add an upper bound on bytestring + +------------------------------------------------------------------- +Tue Sep 9 20:29:11 UTC 2014 - peter.trommler@ohm-hochschule.de + +- update to 1.2.2.0 +* several performance fixes including use of SSE and SSE2 +* Haskell Platform 2014.2.0.0 + +------------------------------------------------------------------- +Tue Sep 2 08:58:18 UTC 2014 - peter.trommler@ohm-hochschule.de + +- regenerate spec file + +------------------------------------------------------------------- +Sat Aug 23 00:11:47 UTC 2014 - peter.trommler@ohm-hochschule.de + +- enable PowerPC builds + +------------------------------------------------------------------- +Mon May 6 14:55:41 UTC 2013 - peter.trommler@ohm-hochschule.de + +- update to 1.1.2.5 from upstream +* changelog not updated since 1.1.1.0 +- version required for Haskell Platform 2013.2 +- more transparent packaging (fewer macros) + +------------------------------------------------------------------- +Thu Jun 7 19:07:50 UTC 2012 - herbert@graeber-clan.de + +- update to version 1.1.2.3 + spec file template generated by cabal2spec-0.25.5 + +------------------------------------------------------------------- +Sun Feb 5 16:47:19 UTC 2012 - herbert@graeber-clan.de + +- Initial package diff --git a/ghc-hashable.spec b/ghc-hashable.spec new file mode 100644 index 0000000..ff3ef2e --- /dev/null +++ b/ghc-hashable.spec @@ -0,0 +1,141 @@ +# +# spec file for package ghc-hashable +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global pkg_name hashable +%global pkgver %{pkg_name}-%{version} +%bcond_with tests +Name: ghc-%{pkg_name} +Version: 1.5.0.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 +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-os-string-devel +BuildRequires: ghc-os-string-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-primitive-devel +BuildRequires: ghc-primitive-prof +BuildRequires: ghc-random-devel +BuildRequires: ghc-random-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 + +%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. + +'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 +Requires: %{name} = %{version}-%{release} +Requires: ghc-compiler = %{ghc_version} +Requires(post): ghc-compiler = %{ghc_version} +Requires(postun): ghc-compiler = %{ghc_version} + +%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 + +%build +%define cabal_configure_options -f-arch-native +%ghc_lib_build + +%install +%ghc_lib_install + +%check +%cabal_test + +%post devel +%ghc_pkg_recache + +%postun devel +%ghc_pkg_recache + +%files -f %{name}.files +%license LICENSE + +%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 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-1.4.7.0.tar.gz b/hashable-1.4.7.0.tar.gz new file mode 100644 index 0000000..26d0c41 --- /dev/null +++ b/hashable-1.4.7.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3baee4c9027a08830d148ec524cbc0471de645e1e8426d46780ef2758df0e8da +size 89467 diff --git a/hashable-1.5.0.0.tar.gz b/hashable-1.5.0.0.tar.gz new file mode 100644 index 0000000..d08054f --- /dev/null +++ b/hashable-1.5.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e58b3a8e18da5f6cd7e937e5fd683e500bb1f8276b3768269759119ca0cddb6a +size 89062 diff --git a/hashable.cabal b/hashable.cabal new file mode 100644 index 0000000..9041fed --- /dev/null +++ b/hashable.cabal @@ -0,0 +1,217 @@ +cabal-version: 2.2 +name: hashable +version: 1.5.0.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. + . + '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. + +homepage: http://github.com/haskell-unordered-containers/hashable +license: BSD-3-Clause +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 ==9.6.5 || ==9.8.2 || ==9.8.3 || ==9.10.1 || ==9.12.1 + +extra-source-files: + CHANGES.md + include/HsHashable.h + include/HsXXHash.h + README.md + xxHash-0.8.2/xxhash.h + +flag arch-native + description: + Use @-march=native@ when compiling C sources. + Portable implementation is 15-50% slower. + Consider enabling this flag if hashing performance is important. + + manual: True + default: False + +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.FFI + Data.Hashable.Generic.Instances + Data.Hashable.Imports + Data.Hashable.LowLevel + Data.Hashable.Mix + Data.Hashable.XXH3 + + include-dirs: include xxHash-0.8.2 + includes: + HsHashable.h + HsXXHash.h + xxhash.h + + hs-source-dirs: src + build-depends: + , base >=4.18.0.0 && <4.22 + , bytestring >=0.11.5.3 && <0.13 + , containers >=0.6.7 && <0.8 + , deepseq >=1.4.8.1 && <1.6 + , ghc-prim + , text >=2.0.2 && <2.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 && <2.1 + + -- 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.200.1 && <1.6 + + -- Integer internals + build-depends: ghc-bignum >=1.3 && <1.4 + + 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 + QuantifiedConstraints + ScopedTypeVariables + Trustworthy + TypeOperators + UnliftedFFITypes + + ghc-options: -Wall + + if flag(arch-native) + -- Cabal doesn't pass cc-options to "ordinary" Haskell source compilation + -- https://github.com/haskell/cabal/issues/9801 + ghc-options: -optc=-march=native -optc-mtune=native + + 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.15 + , random >=1.0 && <1.3 + , tasty ^>=1.5 + , tasty-hunit ^>=0.10.1 + , tasty-quickcheck ^>=0.10.3 || ^>=0.11 + , 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 xxhash-tests + type: exitcode-stdio-1.0 + hs-source-dirs: tests src + main-is: xxhash-tests.hs + other-modules: + Data.Hashable.FFI + Data.Hashable.XXH3 + + default-language: Haskell2010 + build-depends: + , base <5 + , bytestring + , primitive ^>=0.9.0.0 + , tasty ^>=1.5 + , tasty-hunit ^>=0.10.1 + , tasty-quickcheck ^>=0.10.3 || ^>=0.11 + + include-dirs: include xxHash-0.8.2 + includes: + HsXXHash.h + xxhash.h + + if !impl(ghc >=9.4) + build-depends: data-array-byte >=0.1.0.1 && <0.2 + +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