packages feed

genvalidity-containers 0.5.0.0 → 0.5.1.0

raw patch · 4 files changed

+25/−17 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

genvalidity-containers.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 4ceb99a83aa476e2b06907a031bf2c38970c3dee854c26896294c39620f4f4cb+-- hash: 7768035b368f7c5c0702f47b607c1efb2838388648616f073217ee2ca4057057  name:           genvalidity-containers-version:        0.5.0.0+version:        0.5.1.0 synopsis:       GenValidity support for containers description:    Please see README.md category:       Testing@@ -25,6 +25,14 @@   location: https://github.com/NorfairKing/validity  library+  exposed-modules:+      Data.GenValidity.Containers+      Data.GenValidity.Map+      Data.GenValidity.Sequence+      Data.GenValidity.Set+      Data.GenValidity.Tree+  other-modules:+      Paths_genvalidity_containers   hs-source-dirs:       src   build-depends:@@ -34,19 +42,17 @@     , genvalidity >=0.5     , validity >=0.5     , validity-containers >=0.3-  exposed-modules:-      Data.GenValidity.Containers-      Data.GenValidity.Map-      Data.GenValidity.Sequence-      Data.GenValidity.Set-      Data.GenValidity.Tree-  other-modules:-      Paths_genvalidity_containers   default-language: Haskell2010  test-suite genvalidity-containers-test   type: exitcode-stdio-1.0   main-is: Spec.hs+  other-modules:+      Test.Validity.Containers.MapSpec+      Test.Validity.Containers.SeqSpec+      Test.Validity.Containers.SetSpec+      Test.Validity.Containers.TreeSpec+      Paths_genvalidity_containers   hs-source-dirs:       test/   ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall@@ -57,10 +63,4 @@     , genvalidity-containers     , genvalidity-hspec     , hspec-  other-modules:-      Test.Validity.Containers.MapSpec-      Test.Validity.Containers.SeqSpec-      Test.Validity.Containers.SetSpec-      Test.Validity.Containers.TreeSpec-      Paths_genvalidity_containers   default-language: Haskell2010
src/Data/GenValidity/Map.hs view
@@ -48,6 +48,7 @@ #endif instance (Ord k, GenValid k, GenValid v) => GenValid (Map k v) where     genValid = M.fromList <$> genValid+    shrinkValid = fmap M.fromList . shrinkValid . M.toList #if MIN_VERSION_containers(0,5,9) instance (Ord k, GenInvalid k, GenInvalid v) => GenInvalid (Map k v) where     genInvalid =
src/Data/GenValidity/Tree.hs view
@@ -20,6 +20,7 @@  instance GenValid a => GenValid (Tree a) where     genValid = genTreeOf genValid+    shrinkValid (Node v ts) = [Node v' ts' | (v', ts') <- shrinkValid (v, ts)]  -- | There should be at least one invalid element, either it's here or it's -- further down the tree.@@ -32,6 +33,10 @@                 [ Node <$> resize a genInvalid <*> resize b genUnchecked                 , Node <$> resize a genUnchecked <*> resize b genInvalid                 ]+    shrinkInvalid (Node v ts) =+        if isInvalid v+            then Node <$> shrinkInvalid v <*> shrinkUnchecked ts+            else Node <$> shrinkUnchecked v <*> shrinkInvalid ts  -- | Generate a tree of values that are generated as specified. --
test/Test/Validity/Containers/TreeSpec.hs view
@@ -6,9 +6,11 @@  import Data.GenValidity.Tree () import Data.Tree (Tree)-import Test.Validity.GenValidity+import Test.Validity  spec :: Spec spec = do     genValidSpec @(Tree Int)     genValiditySpec @(Tree Double)+    shrinkValidSpec @(Tree Int)+    shrinkValiditySpec @(Tree Double)