packages feed

validity-containers 0.1.0.3 → 0.2.0.0

raw patch · 5 files changed

+19/−11 lines, 5 filesdep ~validityPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: validity

API changes (from Hackage documentation)

Files

src/Data/Validity/Map.hs view
@@ -9,6 +9,10 @@  -- | A 'Map' of things is valid if all the keys and values are valid and the 'Map' itself -- is valid.-instance (Ord k, Validity k, Validity v) =>-         Validity (Map k v) where+instance (Ord k, Validity k, Validity v) => Validity (Map k v) where     isValid m = M.valid m && all isValid (M.toList m)+    validate m =+        mconcat+            [ M.valid m <?@> "The Map structure is valid."+            , M.toList m <?!> "Map elements"+            ]
src/Data/Validity/Sequence.hs view
@@ -8,6 +8,6 @@ import Data.Sequence (Seq)  -- | A 'Seq'uence of things is valid if all the elements are valid.-instance Validity v =>-         Validity (Seq v) where+instance Validity v => Validity (Seq v) where     isValid = all isValid . toList+    validate s = toList s <?!> "Seq elements"
src/Data/Validity/Set.hs view
@@ -9,6 +9,10 @@  -- | A 'Set' of things is valid if all the elements are valid and the 'Set' itself -- is valid.-instance (Ord v, Validity v) =>-         Validity (Set v) where+instance (Ord v, Validity v) => Validity (Set v) where     isValid s = S.valid s && all isValid (S.toList s)+    validate s =+        mconcat+            [ S.valid s <?@> "The set structure is valid."+            , all isValid (S.toList s) <?!> "Set elements"+            ]
src/Data/Validity/Tree.hs view
@@ -7,6 +7,6 @@ import Data.Tree  -- | A 'Tree' of things is valid if all the things in the 'Tree' are valid.-instance Validity a =>-         Validity (Tree a) where+instance Validity a => Validity (Tree a) where     isValid (Node rl sf) = isValid rl && isValid sf+    validate (Node rl sf) = mconcat [rl <?!> "rootLabel", sf <?!> "subForest"]
validity-containers.cabal view
@@ -1,5 +1,5 @@ name: validity-containers-version: 0.1.0.3+version: 0.2.0.0 cabal-version: >=1.10 build-type: Simple license: MIT@@ -25,8 +25,8 @@         Data.Validity.Sequence         Data.Validity.Set     build-depends:-        base >= 4.7 && <5,-        validity >=0.3 && <0.4,+        base >=4.7 && <5,+        validity >=0.4 && <0.5,         containers -any     default-language: Haskell2010     hs-source-dirs: src