quickcheck-classes 0.4.11 → 0.4.11.1
raw patch · 3 files changed
+14/−3 lines, 3 files
Files
- changelog.md +6/−1
- quickcheck-classes.cabal +1/−1
- src/Test/QuickCheck/Classes.hs +7/−1
changelog.md view
@@ -4,7 +4,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to the [Haskell Package Versioning Policy](https://pvp.haskell.org/). -## [0.4.11] - 2018-05-14+## [0.4.11.1] - 2018-05-25+### Change+- Fix compatibility with older GHCs when `semigroupoids` support+ is disabled.++## [0.4.11] - 2018-05-24 ### Added - Greatly improved documentation - `specialisedLawsCheckMany` function, a shorter way for the user
quickcheck-classes.cabal view
@@ -1,5 +1,5 @@ name: quickcheck-classes-version: 0.4.11+version: 0.4.11.1 synopsis: QuickCheck common typeclasses description: This library provides QuickCheck properties to ensure
src/Test/QuickCheck/Classes.hs view
@@ -101,6 +101,7 @@ -- import Test.QuickCheck import Test.QuickCheck.Classes.Common (foldMapA, Laws(..))+import Control.Monad import Data.Foldable import Data.Monoid (Monoid(..)) import Data.Proxy (Proxy(..))@@ -133,7 +134,7 @@ -- ToJSON/FromJSON: Partial Isomorphism +++ OK, passed 100 tests. -- Show/Read: Partial Isomorphism +++ OK, passed 100 tests. specialisedLawsCheckMany :: Proxy a -> [Proxy a -> Laws] -> IO ()-specialisedLawsCheckMany p ls = foldMap (lawsCheck . ($ p)) ls+specialisedLawsCheckMany p ls = foldlMapM (lawsCheck . ($ p)) ls -- | A convenience function for checking multiple typeclass instances -- of multiple types. Consider the following Haskell source file:@@ -229,4 +230,9 @@ -- | In older versions of GHC, Proxy is not poly-kinded, -- so we provide Proxy2. data Proxy2 (f :: * -> * -> *) = Proxy2++-- This is used internally to work around a missing Monoid+-- instance for IO on older GHCs.+foldlMapM :: (Foldable t, Monoid b, Monad m) => (a -> m b) -> t a -> m b+foldlMapM f = foldlM (\b a -> liftM (mappend b) (f a)) mempty