diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 494ff53..3caf8a1 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -11,6 +11,8 @@ jobs: - 8.10.7 - 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/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/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 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 diff --git a/test/EnumTest.hs b/test/EnumTest.hs new file mode 100644 index 0000000..0957cdb --- /dev/null +++ b/test/EnumTest.hs @@ -0,0 +1,24 @@ +#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 + + + +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