packages feed

genvalidity 0.8.0.0 → 0.9.0.0

raw patch · 2 files changed

+11/−4 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Data.GenValidity: genUtf16SurrogateCodePoint :: Gen Char

Files

genvalidity.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.31.1.+-- This file has been generated from package.yaml by hpack version 0.31.2. -- -- see: https://github.com/sol/hpack ----- hash: f83f379725515d102f66767260af87efc94d6cf4d8a6f2e3a4a0b8dc4437f8b9+-- hash: 3d07fce4934c73cfac46cfa5af2b300057a30ab9e210241338c4326cecc2c1f0  name:           genvalidity-version:        0.8.0.0+version:        0.9.0.0 synopsis:       Testing utilities for the validity library description:    Note: There are companion instance packages for this library:                 .
src/Data/GenValidity.hs view
@@ -74,6 +74,9 @@     , shrinkValidStructurallyWithoutExtraFiltering     , module Data.GenValidity.Utils +    -- * Strange, possibly useful functions+    , genUtf16SurrogateCodePoint+     -- * Re-exports     , module Data.Validity @@ -106,6 +109,7 @@ import Data.Word (Word, Word8, Word16, Word32, Word64) #endif import Data.Int (Int8, Int16, Int32, Int64)+import Data.Char (chr) import Data.Ratio ((%)) import GHC.Generics import GHC.Real (Ratio(..))@@ -574,8 +578,11 @@ instance GenValid Ordering  instance GenUnchecked Char where-    genUnchecked = arbitrary+    genUnchecked = frequency [(9, choose (minBound, maxBound)), (1, genUtf16SurrogateCodePoint)]     shrinkUnchecked = shrink++genUtf16SurrogateCodePoint :: Gen Char+genUtf16SurrogateCodePoint = chr <$> oneof [choose (0xD800, 0xDBFF), choose (0xDC00, 0xDFFF)]  instance GenValid Char