smallcheck-series 0.7.0.0 → 0.7.1.0
raw patch · 2 files changed
+9/−6 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
Test/SmallCheck/Series/Utils.hs view
@@ -8,7 +8,10 @@ , zipLogic3 ) where -import Control.Monad.Logic ((<=<), MonadLogic(msplit), lift, mplus, mzero)+import Control.Applicative (empty, (<|>))+import Control.Monad ((<=<))+import Control.Monad.Logic (MonadLogic(msplit))+import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Maybe (MaybeT(..), runMaybeT) -- $setup@@ -32,10 +35,10 @@ -- Thanks to Roman Cheplyaka: https://groups.google.com/d/msg/haskell-tasty/k0dXCx9EBsc/XYkCTjYKqswJ zipLogic :: MonadLogic m => m a -> m b -> m (a, b) zipLogic gx gy =- maybe mzero return <=< runMaybeT $ do+ maybe empty pure <=< runMaybeT $ do (x, rx) <- MaybeT (msplit gx) (y, ry) <- MaybeT (msplit gy)- lift $ return (x, y) `mplus` zipLogic rx ry+ lift $ pure (x, y) <|> zipLogic rx ry -- | /One-to-One/ zipping of 3 'MonadLogic' instances. You can use for -- 'Test.SmallCheck.Series' like this:@@ -46,8 +49,8 @@ -- Thanks to Roman Cheplyaka: https://groups.google.com/d/msg/haskell-tasty/k0dXCx9EBsc/XYkCTjYKqswJ zipLogic3 :: MonadLogic m => m a -> m b -> m c -> m (a, b, c) zipLogic3 gx gy gz =- maybe mzero return <=< runMaybeT $ do+ maybe empty pure <=< runMaybeT $ do (x, rx) <- MaybeT (msplit gx) (y, ry) <- MaybeT (msplit gy) (z, rz) <- MaybeT (msplit gz)- lift $ return (x, y, z) `mplus` zipLogic3 rx ry rz+ lift $ pure (x, y, z) <|> zipLogic3 rx ry rz
smallcheck-series.cabal view
@@ -1,5 +1,5 @@ name: smallcheck-series-version: 0.7.0.0+version: 0.7.1.0 synopsis: Extra SmallCheck series and utilities description: Orphan