From ce0f99c702be5d837231f833c901b5e904979572 Mon Sep 17 00:00:00 2001 From: Felix Paulusma Date: Mon, 4 May 2026 14:20:45 +0200 Subject: [PATCH 1/2] test: removed offending Arbitrary instances --- test/Instances.hs | 49 +---------------------------------------------- 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/test/Instances.hs b/test/Instances.hs index f353607..401f33c 100644 --- a/test/Instances.hs +++ b/test/Instances.hs @@ -15,28 +15,11 @@ import qualified Data.Aeson.KeyMap as KM #endif import Data.DList as DList (DList, fromList, toList) import Data.Int (Int64) -#if MIN_VERSION_quickcheck_instances(0,4,0) -import Data.List.NonEmpty as NonEmpty (NonEmpty, fromList, toList) -import Data.Semigroup as Semigroup (First (..), Last (..), Max (..), Min (..)) -#endif import Data.Time (NominalDiffTime) import Data.Time.Clock.POSIX (posixSecondsToUTCTime) import qualified Data.Vector.Primitive as VP -#if MIN_VERSION_quickcheck_instances(0,4,0) -import Numeric.Natural (Natural) -#endif -import Test.Tasty.QuickCheck ( - Arbitrary (..), -#if MIN_VERSION_quickcheck_instances(0,4,0) - Arbitrary1 (..), - arbitrary1, - arbitrarySizedNatural, - listOf1, - shrink1, - shrinkIntegral, -#endif - ) +import Test.Tasty.QuickCheck (Arbitrary (..)) #if !MIN_VERSION_aeson(2,0,3) import Test.Tasty.QuickCheck (oneof, resize) import Test.QuickCheck.Arbitrary.Generic (genericShrink) @@ -106,33 +89,3 @@ instance Ord Value where Array{} `compare` Object{} = LT _ `compare` _ = GT #endif - -#if MIN_VERSION_quickcheck_instances(0,4,0) -instance Arbitrary1 NonEmpty where - liftArbitrary arb = NonEmpty.fromList <$> listOf1 arb - liftShrink shr xs = [ NonEmpty.fromList xs' | xs' <- liftShrink shr (NonEmpty.toList xs), not (null xs') ] - -instance Arbitrary a => Arbitrary (NonEmpty a) where - arbitrary = arbitrary1 - shrink = shrink1 - -instance Arbitrary a => Arbitrary (Semigroup.Min a) where - arbitrary = fmap Semigroup.Min arbitrary - shrink = map Semigroup.Min . shrink . Semigroup.getMin - -instance Arbitrary a => Arbitrary (Semigroup.Max a) where - arbitrary = fmap Semigroup.Max arbitrary - shrink = map Semigroup.Max . shrink . Semigroup.getMax - -instance Arbitrary a => Arbitrary (Semigroup.First a) where - arbitrary = fmap Semigroup.First arbitrary - shrink = map Semigroup.First . shrink . Semigroup.getFirst - -instance Arbitrary a => Arbitrary (Semigroup.Last a) where - arbitrary = fmap Semigroup.Last arbitrary - shrink = map Semigroup.Last . shrink . Semigroup.getLast - -instance Arbitrary Natural where - arbitrary = arbitrarySizedNatural - shrink = shrinkIntegral -#endif From 4fb6fa78778f8ef14ef30b3554f3cc346745fa10 Mon Sep 17 00:00:00 2001 From: Felix Paulusma Date: Mon, 4 May 2026 14:21:00 +0200 Subject: [PATCH 2/2] bump version to 1.2.1.2 --- ChangeLog.md | 14 ++++++++++++++ package.yaml | 2 +- safe-json.cabal | 2 +- stack.yaml | 10 +--------- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 32001d3..9e34d02 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,19 @@ # Changelog for safe-json +## 1.2.1.2 + +* Bumped upper bound of `time` to `< 0.17` +* Bumped upper bound of `quickcheck-instances` in test suite to `< 0.5` + (again), and removed the superfluous `Arbitrary` instances. + +## 1.2.1.1 + +* Bumped upper bound of `time` to `< 0.16` +* Bumped upper bound of `quickcheck-instances` in test suite to `< 0.5` + (Also added `Arbitrary` instances, but apparently built the underlying + `QuickCheck` dependency with too low a version, because those now clash. + Hence why this version is DEPRECATED, please use version `1.2.1.2`) + ## 1.2.1.0 * Bumped upper bound of `containers` to `< 0.9` diff --git a/package.yaml b/package.yaml index 5bc09a0..0750ad8 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: safe-json -version: 1.2.1.1 +version: 1.2.1.2 github: "Vlix/safe-json" license: MIT author: "Felix Paulusma" diff --git a/safe-json.cabal b/safe-json.cabal index 3375dea..f92f59d 100644 --- a/safe-json.cabal +++ b/safe-json.cabal @@ -5,7 +5,7 @@ cabal-version: 1.12 -- see: https://github.com/sol/hpack name: safe-json -version: 1.2.1.1 +version: 1.2.1.2 synopsis: Automatic JSON format versioning description: This library aims to make the updating of JSON formats or contents, while keeping backward compatibility, as painless as possible. The way this is achieved is through versioning and defined migration functions to migrate older (or newer) versions to the one used. . diff --git a/stack.yaml b/stack.yaml index a954fd8..0561052 100644 --- a/stack.yaml +++ b/stack.yaml @@ -37,18 +37,10 @@ resolver: lts-24.39 # will not be run. This is useful for tweaking upstream packages. packages: - . + # Dependency packages to be pulled from upstream that are not in the resolver # (e.g., acme-missiles-0.3) extra-deps: [] - # - directory-1.3.10.1 - # - filepath-1.4.301.0 - # - file-io-0.2.0 - # - process-1.6.28.0 - # - time-1.16 - # - unix-2.8.8.0 - # - hashable-1.5.0.0 - # - tasty-1.5.1 - # - tasty-quickcheck-0.11 # allow-newer: true