taiwan-id 0.1.1.1 → 0.1.1.2
raw patch · 4 files changed
+20/−86 lines, 4 filesdep +hspec-quickcheck-classesdep ~QuickCheckdep ~basePVP ok
version bump matches the API change (PVP)
Dependencies added: hspec-quickcheck-classes
Dependency ranges changed: QuickCheck, base
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- components/test/taiwan-id-test/Main.hs +10/−10
- components/test/taiwan-id-test/Test/QuickCheck/Classes/Hspec.hs +0/−72
- taiwan-id.cabal +6/−4
CHANGELOG.md view
@@ -1,3 +1,7 @@+# 0.1.1.2++- Added support for GHC 9.14.+ # 0.1.1.1 - Improved `README.md` and package description.
components/test/taiwan-id-test/Main.hs view
@@ -50,8 +50,8 @@ ) import Test.QuickCheck.Classes ( boundedEnumLaws, eqLaws, numLaws, ordLaws, showLaws, showReadLaws )-import Test.QuickCheck.Classes.Hspec- ( testLawsMany )+import Test.Hspec.QuickCheck.Classes+ ( testLaws ) import qualified Data.Finitary as Finitary import qualified Data.Set.NonEmpty as NESet@@ -96,7 +96,7 @@ describe "Class laws" $ do - testLawsMany @Digit+ testLaws @Digit [ boundedEnumLaws , eqLaws , numLaws@@ -105,7 +105,7 @@ , showReadLaws ] - testLawsMany @Digit1289+ testLaws @Digit1289 [ boundedEnumLaws , eqLaws , ordLaws@@ -113,7 +113,7 @@ , showReadLaws ] - testLawsMany @Gender+ testLaws @Gender [ boundedEnumLaws , eqLaws , ordLaws@@ -121,14 +121,14 @@ , showReadLaws ] - testLawsMany @ID+ testLaws @ID [ eqLaws , ordLaws , showLaws , showReadLaws ] - testLawsMany @Issuer+ testLaws @Issuer [ boundedEnumLaws , eqLaws , ordLaws@@ -136,7 +136,7 @@ , showReadLaws ] - testLawsMany @Language+ testLaws @Language [ boundedEnumLaws , eqLaws , ordLaws@@ -144,7 +144,7 @@ , showReadLaws ] - testLawsMany @Letter+ testLaws @Letter [ boundedEnumLaws , eqLaws , ordLaws@@ -152,7 +152,7 @@ , showReadLaws ] - testLawsMany @Region+ testLaws @Region [ boundedEnumLaws , eqLaws , ordLaws
− components/test/taiwan-id-test/Test/QuickCheck/Classes/Hspec.hs
@@ -1,72 +0,0 @@-{-# LANGUAGE PolyKinds #-}-{-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE TypeApplications #-}---- | Provides testing functions to check that type class instances obey laws.-module Test.QuickCheck.Classes.Hspec- ( testLaws- , testLawsMany- ) where--import Prelude--import Control.Monad- ( forM_- )-import Data.Proxy- ( Proxy (..)- )-import Data.Typeable- ( Typeable- , typeRep- )-import Test.Hspec- ( Spec- , describe- , it- , parallel- )-import Test.QuickCheck.Classes- ( Laws (..)- )---- | Constructs a test to check that the given type class instance obeys the--- given set of laws.------ Example usage:------ >>> testLaws @Natural ordLaws--- >>> testLaws @(Map Int) functorLaws-testLaws- :: forall a- . Typeable a- => (Proxy a -> Laws)- -> Spec-testLaws getLaws =- parallel- $ describe description- $ forM_ (lawsProperties laws)- $ uncurry it- where- description =- mconcat- [ "Testing "- , lawsTypeclass laws- , " laws for type "- , show (typeRep $ Proxy @a)- ]- laws = getLaws $ Proxy @a---- | Calls `testLaws` with multiple sets of laws.------ Example usage:------ >>> testLawsMany @Natural [eqLaws, ordLaws]--- >>> testLawsMany @(Map Int) [foldableLaws, functorLaws]-testLawsMany- :: forall a- . Typeable a- => [Proxy a -> Laws]- -> Spec-testLawsMany getLawsMany =- testLaws @a `mapM_` getLawsMany
taiwan-id.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: taiwan-id-version: 0.1.1.1+version: 0.1.1.2 synopsis: Library and CLI for working with ID numbers issued in Taiwan. category: Identification homepage: https://github.com/jonathanknowles/taiwan-id#readme@@ -43,7 +43,7 @@ README.md common dependency-base- build-depends:base >= 4.17.2.1 && < 4.22+ build-depends:base >= 4.17.2.1 && < 4.23 common dependency-directory build-depends:directory >= 1.3.7.1 && < 1.4 common dependency-doctest-parallel@@ -56,6 +56,8 @@ build-depends:finite-typelits >= 0.2.1.0 && < 0.3 common dependency-hspec build-depends:hspec >= 2.11.17 && < 2.12+common dependency-hspec-quickcheck-classes+ build-depends:hspec-quickcheck-classes >= 0.0.0.0 && < 0.1 common dependency-microlens build-depends:microlens >= 0.5.0.0 && < 0.6 common dependency-MonadRandom@@ -65,7 +67,7 @@ common dependency-optparse-applicative build-depends:optparse-applicative >= 0.19.0.0 && < 0.20 common dependency-QuickCheck- build-depends:QuickCheck >= 2.16.0.0 && < 2.17+ build-depends:QuickCheck >= 2.16.0.0 && < 2.19 common dependency-quickcheck-classes build-depends:quickcheck-classes >= 0.6.5.0 && < 0.7 common dependency-random@@ -171,6 +173,7 @@ , dependency-base , dependency-finitary , dependency-hspec+ , dependency-hspec-quickcheck-classes , dependency-MonadRandom , dependency-microlens , dependency-nonempty-containers@@ -180,7 +183,6 @@ type: exitcode-stdio-1.0 main-is: Main.hs other-modules:- Test.QuickCheck.Classes.Hspec hs-source-dirs: components/test/taiwan-id-test ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N