git.iko.soy/typeable/generic-arbitrary
on master help sign in
Merge branch 'bugfix/enums'
450ebbaAleksey Uymanov
.github/workflows/haskell-ci.yml+2
@@ -11,6 +11,8 @@ jobs:
11 - 8.10.7
11 - 8.10.7
12 - 9.0.2
12 - 9.0.2
13 - 9.2.4
13 - 9.2.4
14+ - 9.4.3
15+ - 9.8.1
14 steps:
16 steps:
15 - uses: actions/checkout@v3
17 - uses: actions/checkout@v3
16 - uses: haskell/actions/setup@v2
18 - uses: haskell/actions/setup@v2
generic-arbitrary.cabal+1
@@ -66,6 +66,7 @@ test-suite test
66 , tasty-hunit
66 , tasty-hunit
67 , tasty-quickcheck
67 , tasty-quickcheck
68 other-modules: Auxiliary
68 other-modules: Auxiliary
69+ , EnumTest
69 , LimitationDemo
70 , LimitationDemo
70 , NoTypecheckTest
71 , NoTypecheckTest
71 , ParametersTest
72 , ParametersTest
ghc-9.4.3.yamlnew file+1
@@ -0,0 +1 @@
1+resolver: nightly-2022-12-26
ghc-9.4.3.yaml.locknew file+12
@@ -0,0 +1,12 @@
1+# This file was autogenerated by Stack.
2+# You should not edit this file by hand.
3+# For more information, please see the documentation at:
4+# https://docs.haskellstack.org/en/stable/lock_files
5+
6+packages: []
7+snapshots:
8+- completed:
9+ sha256: bbe432b2abd6d866aa37f65a8129a5f858b7c6eaae9464f8bc2814ce92ac2d15
10+ size: 573163
11+ url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2022/12/26.yaml
12+ original: nightly-2022-12-26
ghc-9.8.1.yamlnew file+1
@@ -0,0 +1 @@
1+resolver: nightly-2024-01-12
ghc-9.8.1.yaml.locknew file+12
@@ -0,0 +1,12 @@
1+# This file was autogenerated by Stack.
2+# You should not edit this file by hand.
3+# For more information, please see the documentation at:
4+# https://docs.haskellstack.org/en/stable/lock_files
5+
6+packages: []
7+snapshots:
8+- completed:
9+ sha256: 8f06e87750f95bc8620644ea22344ad023c3c5aa6efa854747aa70093898fd79
10+ size: 556465
11+ url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2024/1/12.yaml
12+ original: nightly-2024-01-12
test/EnumTest.hsnew file+24
@@ -0,0 +1,24 @@
1+#if __GLASGOW_HASKELL__ >= 806 && __GLASGOW_HASKELL__ <= 900
2+{-# OPTIONS_GHC -fconstraint-solver-iterations=5 #-}
3+#elif __GLASGOW_HASKELL__ >= 902 && __GLASGOW_HASKELL__ <= 908
4+{-# OPTIONS_GHC -fconstraint-solver-iterations=6 #-}
5+#endif
6+
7+
8+
9+module EnumTest where
10+
11+import Control.DeepSeq
12+import GHC.Generics
13+import Test.QuickCheck
14+import Test.QuickCheck.Arbitrary.Generic
15+
16+data Country = PL | GB | RU | RO | CZ | HR | SK | DE | NL | ES | BR
17+ deriving (Generic, NFData, Show)
18+
19+instance Arbitrary Country where
20+ arbitrary = genericArbitrary
21+ shrink = genericShrink
22+
23+prop_CountryTest :: Country -> Property
24+prop_CountryTest = total