polysemy-check 0.6.0.0 → 0.7.0.0
raw patch · 5 files changed
+12/−9 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- Polysemy.Check: prepropEquivalent :: forall effs x r1 r2 f. (forall a. Show a => Show (f a), forall a. Eq a => Eq (f a)) => (Eq x, Show x, Inject effs r1, Inject effs r2, Arbitrary (Sem effs x)) => (forall a. Sem r1 a -> IO (f a)) -> (forall a. Sem r2 a -> IO (f a)) -> Property
+ Polysemy.Check: prepropEquivalent :: forall effs r1 r2 f. (forall a. Show a => Show (f a), forall a. Eq a => Eq (f a)) => (Inject effs r1, Inject effs r2, Arbitrary (Sem effs Int)) => (forall a. Sem r1 a -> IO (f a)) -> (forall a. Sem r2 a -> IO (f a)) -> Property
Files
- ChangeLog.md +5/−0
- polysemy-check.cabal +1/−1
- src/Polysemy/Check.hs +4/−6
- test/EquivSpec.hs +1/−1
- test/ExampleSpec.hs +1/−1
ChangeLog.md view
@@ -1,5 +1,10 @@ # Changelog for polysemy-check +## v0.7.0.0 (2021-10-16)++- Removed the `x` type variable from `prepropEquivalent`, since it is safe to+ instantiate arbitrarily, and leads to aggressive type errors if forgotten.+ ## v0.6.0.0 (2021-10-16) - Changed the frequencies of `Sem`'s `Arbitrary` instance, to create more
polysemy-check.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: polysemy-check-version: 0.6.0.0+version: 0.7.0.0 synopsis: QuickCheck for Polysemy description: Please see the README on GitHub at <https://github.com/polysemy-research/polysemy-check#readme> category: Polysemy
src/Polysemy/Check.hs view
@@ -144,15 +144,13 @@ -- | Prove that two interpreters are equivalent. This property ensures that the -- two interpreters give the same result for every arbitrary program. prepropEquivalent- :: forall effs x r1 r2 f+ :: forall effs r1 r2 f . ( forall a. Show a => Show (f a) , forall a. Eq a => Eq (f a) )- => ( Eq x- , Show x- , Inject effs r1+ => ( Inject effs r1 , Inject effs r2- , Arbitrary (Sem effs x)+ , Arbitrary (Sem effs Int) ) => (forall a. Sem r1 a -> IO (f a)) -- ^ The first interpreter for the effect stack.Pure effect stacks can@@ -161,7 +159,7 @@ -- ^ The second interpreter to prove equivalence for. -> Property prepropEquivalent int1 int2 = property $ do- SomeSem sem <- liftGen @effs @x+ SomeSem sem <- liftGen @effs @Int pure $ ioProperty $ do a1 <- int1 sem a2 <- int2 sem
test/EquivSpec.hs view
@@ -19,7 +19,7 @@ prop "Pure state is equivalent to IO state" $ do s0 <- arbitrary pure $- prepropEquivalent @'[State Int] @Int+ prepropEquivalent @'[State Int] (runPureState s0) (runIOState s0)
test/ExampleSpec.hs view
@@ -71,7 +71,7 @@ describe "Equivalence" $ do let equiv b1 b2 =- prepropEquivalent @'[Stack Int] @Int+ prepropEquivalent @'[Stack Int] (pure . run . runStack b1) (pure . run . runStack b2)