From 745649e86c0596be37ee1c4e6b24f612740204cf Mon Sep 17 00:00:00 2001 From: Aleksey Uymanov Date: Fri, 12 Jan 2024 12:28:45 +0500 Subject: [PATCH 1/5] more ghc versions --- .github/workflows/haskell-ci.yml | 1 + ghc-9.4.3.yaml | 1 + ghc-9.4.3.yaml.lock | 12 ++++++++++++ 3 files changed, 14 insertions(+) create mode 100644 ghc-9.4.3.yaml create mode 100644 ghc-9.4.3.yaml.lock diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 494ff53..0590597 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -11,6 +11,7 @@ jobs: - 8.10.7 - 9.0.2 - 9.2.4 + - 9.4.3 steps: - uses: actions/checkout@v3 - uses: haskell/actions/setup@v2 diff --git a/ghc-9.4.3.yaml b/ghc-9.4.3.yaml new file mode 100644 index 0000000..6a8eb10 --- /dev/null +++ b/ghc-9.4.3.yaml @@ -0,0 +1 @@ +resolver: nightly-2022-12-26 diff --git a/ghc-9.4.3.yaml.lock b/ghc-9.4.3.yaml.lock new file mode 100644 index 0000000..d31b93a --- /dev/null +++ b/ghc-9.4.3.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + sha256: bbe432b2abd6d866aa37f65a8129a5f858b7c6eaae9464f8bc2814ce92ac2d15 + size: 573163 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2022/12/26.yaml + original: nightly-2022-12-26 From 97851dd7ac817ec6f1fe9e61a914e0642ece2a52 Mon Sep 17 00:00:00 2001 From: Aleksey Uymanov Date: Fri, 12 Jan 2024 12:35:01 +0500 Subject: [PATCH 2/5] add latest ghc --- .github/workflows/haskell-ci.yml | 1 + ghc-9.8.1.yaml | 1 + ghc-9.8.1.yaml.lock | 12 ++++++++++++ 3 files changed, 14 insertions(+) create mode 100644 ghc-9.8.1.yaml create mode 100644 ghc-9.8.1.yaml.lock diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 0590597..3caf8a1 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -12,6 +12,7 @@ jobs: - 9.0.2 - 9.2.4 - 9.4.3 + - 9.8.1 steps: - uses: actions/checkout@v3 - uses: haskell/actions/setup@v2 diff --git a/ghc-9.8.1.yaml b/ghc-9.8.1.yaml new file mode 100644 index 0000000..d43c6ee --- /dev/null +++ b/ghc-9.8.1.yaml @@ -0,0 +1 @@ +resolver: nightly-2024-01-12 diff --git a/ghc-9.8.1.yaml.lock b/ghc-9.8.1.yaml.lock new file mode 100644 index 0000000..253c35a --- /dev/null +++ b/ghc-9.8.1.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + sha256: 8f06e87750f95bc8620644ea22344ad023c3c5aa6efa854747aa70093898fd79 + size: 556465 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2024/1/12.yaml + original: nightly-2024-01-12 From 949d4d958639e5f9e55d3711e8fc89cea2676ef3 Mon Sep 17 00:00:00 2001 From: Aleksey Uymanov Date: Fri, 12 Jan 2024 12:51:12 +0500 Subject: [PATCH 3/5] enum test --- generic-arbitrary.cabal | 1 + test/EnumTest.hs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 test/EnumTest.hs diff --git a/generic-arbitrary.cabal b/generic-arbitrary.cabal index b93b2c6..e15c09e 100644 --- a/generic-arbitrary.cabal +++ b/generic-arbitrary.cabal @@ -66,6 +66,7 @@ test-suite test , tasty-hunit , tasty-quickcheck other-modules: Auxiliary + , EnumTest , LimitationDemo , NoTypecheckTest , ParametersTest diff --git a/test/EnumTest.hs b/test/EnumTest.hs new file mode 100644 index 0000000..109729b --- /dev/null +++ b/test/EnumTest.hs @@ -0,0 +1,18 @@ +{-# OPTIONS_GHC -fconstraint-solver-iterations=6 #-} + +module EnumTest where + +import Control.DeepSeq +import GHC.Generics +import Test.QuickCheck +import Test.QuickCheck.Arbitrary.Generic + +data Country = PL | GB | RU | RO | CZ | HR | SK | DE | NL | ES | BR + deriving (Generic, NFData, Show) + +instance Arbitrary Country where + arbitrary = genericArbitrary + shrink = genericShrink + +prop_CountryTest :: Country -> Property +prop_CountryTest = total From 7b105ddaf8b9be52a047ade35ee791f213b23720 Mon Sep 17 00:00:00 2001 From: Aleksey Uymanov Date: Mon, 15 Jan 2024 12:42:58 +0500 Subject: [PATCH 4/5] versions --- test/EnumTest.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/EnumTest.hs b/test/EnumTest.hs index 109729b..00915a8 100644 --- a/test/EnumTest.hs +++ b/test/EnumTest.hs @@ -1,4 +1,10 @@ -{-# OPTIONS_GHC -fconstraint-solver-iterations=6 #-} +#if __GLASGOW_HASKELL__ >= 810 +{-# OPTIONS_GHC -fconstraint-solver-iterations=5 #-} +#endif + +-- #elif __GLASGOW_HASKELL__ >= 904 +-- {-# OPTIONS_GHC -fconstraint-solver-iterations=6 #-} + module EnumTest where From e925bf426e48156e6505fffbc8547d0bab4ae095 Mon Sep 17 00:00:00 2001 From: Aleksey Uymanov Date: Mon, 15 Jan 2024 14:23:27 +0500 Subject: [PATCH 5/5] fix --- test/EnumTest.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/EnumTest.hs b/test/EnumTest.hs index 00915a8..0957cdb 100644 --- a/test/EnumTest.hs +++ b/test/EnumTest.hs @@ -1,9 +1,9 @@ -#if __GLASGOW_HASKELL__ >= 810 +#if __GLASGOW_HASKELL__ >= 806 && __GLASGOW_HASKELL__ <= 900 {-# OPTIONS_GHC -fconstraint-solver-iterations=5 #-} +#elif __GLASGOW_HASKELL__ >= 902 && __GLASGOW_HASKELL__ <= 908 +{-# OPTIONS_GHC -fconstraint-solver-iterations=6 #-} #endif --- #elif __GLASGOW_HASKELL__ >= 904 --- {-# OPTIONS_GHC -fconstraint-solver-iterations=6 #-} module EnumTest where