smallcheck 1.1.0.1 → 1.1.1
raw patch · 3 files changed
+29/−2 lines, 3 files
Files
- CHANGELOG.md +6/−0
- Test/SmallCheck/Series.hs +22/−1
- smallcheck.cabal +1/−1
CHANGELOG.md view
@@ -1,6 +1,12 @@ Changes ======= +Version 1.1.1+-------------++Export some auxiliary functions from `T.S.Series`, and document how to express+`consN` and `altsN` for `N > 4`.+ Version 1.1.0.1 ---------------
Test/SmallCheck/Series.hs view
@@ -78,6 +78,14 @@ -- > -- >instance Serial m a => Serial m (Light a) where -- > series = newtypeCons Light+ --+ -- For data types with more than 4 fields define @consN@ as+ --+ -- >consN f = decDepth $+ -- > f <$> series+ -- > <~> series+ -- > <~> series+ -- > <~> ... {- series repeated N times in total -} -- ** What does consN do, exactly? @@ -124,6 +132,15 @@ -- > return $ \l -> -- > case l of -- > Light x -> f x+ --+ -- For data types with more than 4 fields define @altsN@ as+ --+ -- >altsN rs = do+ -- > rs <- fixDepth rs+ -- > decDepthChecked+ -- > (constM $ constM $ ... $ constM rs)+ -- > (coseries $ coseries $ ... $ coseries rs)+ -- > {- constM and coseries are repeated N times each -} -- ** What does altsN do, exactly? @@ -158,7 +175,10 @@ getDepth, generate, list,- listM+ listM,+ fixDepth,+ decDepthChecked,+ constM -- }}} ) where @@ -259,6 +279,7 @@ d <- getDepth guard $ d > 0 +-- | @'constM' = 'liftM' 'const'@ constM :: Monad m => m b -> m (a -> b) constM = liftM const
smallcheck.cabal view
@@ -1,5 +1,5 @@ Name: smallcheck-Version: 1.1.0.1+Version: 1.1.1 Cabal-Version: >= 1.6 License: BSD3 License-File: LICENSE