Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QuantifiedConstraints #305

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 6 additions & 46 deletions .github/workflows/haskell-ci-bench.yml
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.19.20240514
# version: 0.19.20240608
#
# REGENDATA ("0.19.20240514",["github","--project","cabal.bench.project","-o",".github/workflows/haskell-ci-bench.yml","--github-action-name","Benchmarks"])
# REGENDATA ("0.19.20240608",["github","--project","cabal.bench.project","-o",".github/workflows/haskell-ci-bench.yml","--github-action-name","Benchmarks"])
#
name: Benchmarks
on:
@@ -47,46 +47,6 @@ jobs:
compilerVersion: 9.6.5
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
compilerKind: ghc
compilerVersion: 9.4.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.8
compilerKind: ghc
compilerVersion: 9.2.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.0.2
compilerKind: ghc
compilerVersion: 9.0.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.0.1
compilerKind: ghc
compilerVersion: 9.0.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.10.7
compilerKind: ghc
compilerVersion: 8.10.7
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.10.4
compilerKind: ghc
compilerVersion: 8.10.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.8.3
compilerKind: ghc
compilerVersion: 8.8.3
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.5
compilerKind: ghc
compilerVersion: 8.6.5
setup-method: ghcup
allow-failure: false
fail-fast: false
steps:
- name: apt
@@ -239,10 +199,10 @@ jobs:
rm -f cabal.project.local
- name: constraint set filepath-1.5
run: |
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all --dry-run ; fi
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then cabal-plan topo | sort ; fi
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' --dependencies-only -j2 all ; fi
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all ; fi
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all --dry-run
cabal-plan topo | sort
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' --dependencies-only -j2 all
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all
- name: constraint set filepath-1.4.100.0
run: |
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.4.100.0' all --dry-run ; fi
58 changes: 9 additions & 49 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.19.20240514
# version: 0.19.20240608
#
# REGENDATA ("0.19.20240514",["github","cabal.project"])
# REGENDATA ("0.19.20240608",["github","cabal.project"])
#
name: Haskell-CI
on:
@@ -42,49 +42,9 @@ jobs:
compilerVersion: 9.8.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.4
- compiler: ghc-9.6.5
compilerKind: ghc
compilerVersion: 9.6.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
compilerKind: ghc
compilerVersion: 9.4.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.8
compilerKind: ghc
compilerVersion: 9.2.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.0.2
compilerKind: ghc
compilerVersion: 9.0.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.0.1
compilerKind: ghc
compilerVersion: 9.0.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.10.7
compilerKind: ghc
compilerVersion: 8.10.7
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.10.4
compilerKind: ghc
compilerVersion: 8.10.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.8.4
compilerKind: ghc
compilerVersion: 8.8.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.5
compilerKind: ghc
compilerVersion: 8.6.5
compilerVersion: 9.6.5
setup-method: ghcup
allow-failure: false
fail-fast: false
@@ -242,11 +202,11 @@ jobs:
rm -f cabal.project.local
- name: constraint set filepath-1.5
run: |
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all --dry-run ; fi
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then cabal-plan topo | sort ; fi
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' --dependencies-only -j2 all ; fi
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all ; fi
if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all ; fi
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all --dry-run
cabal-plan topo | sort
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' --dependencies-only -j2 all
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all
$CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.5.2.0' all
- name: constraint set filepath-1.4.100.0
run: |
if [ $((HCNUMVER < 91000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='filepath ^>=1.4.100.0' all --dry-run ; fi
4 changes: 2 additions & 2 deletions .github/workflows/simple.yml
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, windows-latest]
ghc: ['9.2','9.4.8','9.6.5','9.8.2']
ghc: ['9.6.5','9.8.2']
fail-fast: false
steps:
- name: Set git to use LF
@@ -52,7 +52,7 @@ jobs:
CC: "gcc"
strategy:
matrix:
ghc: ['9.2.8']
ghc: ['9.6.5']
steps:
- name: Checkout
uses: actions/checkout@v4
17 changes: 17 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
See also https://pvp.haskell.org/faq

## 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.

## Version 1.4.7.0

* Make `arch-native` disabled by default.
62 changes: 10 additions & 52 deletions hashable-bench/hashable-bench.cabal
Original file line number Diff line number Diff line change
@@ -20,15 +20,7 @@ stability: Provisional
category: Data
build-type: Simple
tested-with:
GHC ==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.5
GHC ==9.6.5
|| ==9.8.2
|| ==9.10.1

@@ -37,13 +29,6 @@ extra-source-files:
include/HsXXHash.h
xxHash-0.8.2/xxhash.h

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

library
exposed-modules:
Data.Hashable
@@ -74,38 +59,17 @@ library
, 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
-- 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

if !impl(ghc >=9.4)
build-depends: data-array-byte >=0.1.0.1 && <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.200.1 && <1.6

if impl(ghc >=9)
build-depends: ghc-bignum >=1.0 && <1.4

if !impl(ghc >=9.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
-- Integer internals
build-depends: ghc-bignum >=1.3 && <1.4

default-language: Haskell2010
other-extensions:
@@ -146,12 +110,6 @@ benchmark hashable-benchmark
ghc-prim
, text >=0.11.0.5

if (impl(ghc) && flag(integer-gmp))
build-depends: integer-gmp >=0.2

if impl(ghc >=7.2.1)
cpp-options: -DGENERICS

ghc-options: -Wall
default-language: Haskell2010

Loading
Loading