validity-containers 0.2.0.0 → 0.3.0.0
raw patch · 5 files changed
+44/−39 lines, 5 filesdep ~validity
Dependency ranges changed: validity
Files
- src/Data/Validity/Map.hs +2/−3
- src/Data/Validity/Sequence.hs +1/−2
- src/Data/Validity/Set.hs +2/−3
- src/Data/Validity/Tree.hs +2/−2
- validity-containers.cabal +37/−29
src/Data/Validity/Map.hs view
@@ -10,9 +10,8 @@ -- | 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- 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"+ [ declare "The Map structure is valid." $ M.valid m+ , delve "Map elements" $ M.toList m ]
src/Data/Validity/Sequence.hs view
@@ -9,5 +9,4 @@ -- | A 'Seq'uence of things is valid if all the elements are valid. instance Validity v => Validity (Seq v) where- isValid = all isValid . toList- validate s = toList s <?!> "Seq elements"+ validate s = annotate (toList s) "Seq elements"
src/Data/Validity/Set.hs view
@@ -10,9 +10,8 @@ -- | 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- 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"+ [ declare "The set structure is valid." $ S.valid s+ , annotate (S.toList s) "Set elements" ]
src/Data/Validity/Tree.hs view
@@ -8,5 +8,5 @@ -- | A 'Tree' of things is valid if all the things in the 'Tree' are valid. instance Validity a => Validity (Tree a) where- isValid (Node rl sf) = isValid rl && isValid sf- validate (Node rl sf) = mconcat [rl <?!> "rootLabel", sf <?!> "subForest"]+ validate (Node rl sf) =+ mconcat [annotate rl "rootLabel", annotate sf "subForest"]
validity-containers.cabal view
@@ -1,33 +1,41 @@-name: validity-containers-version: 0.2.0.0-cabal-version: >=1.10-build-type: Simple-license: MIT-license-file: LICENSE-copyright: Copyright: (c) 2016 Tom Sydney Kerckhove-maintainer: syd.kerckhove@gmail.com-homepage: https://github.com/NorfairKing/validity#readme-synopsis: Validity instances for containers-description:- Please see README.md-category: Validity-author: Tom Sydney Kerckhove+-- This file has been generated from package.yaml by hpack version 0.20.0.+--+-- see: https://github.com/sol/hpack+--+-- hash: 4b54bc51be2c6a7922f6a1defaeae34d645b035b461c72a701e208c6cf71ebbf +name: validity-containers+version: 0.3.0.0+synopsis: Validity instances for containers+description: Please see README.md+category: Validity+homepage: https://github.com/NorfairKing/validity#readme+bug-reports: https://github.com/NorfairKing/validity/issues+author: Tom Sydney Kerckhove+maintainer: syd.kerckhove@gmail.com+copyright: Copyright: (c) 2016-2018 Tom Sydney Kerckhove+license: MIT+license-file: LICENSE+build-type: Simple+cabal-version: >= 1.10+ source-repository head- type: git- location: https://github.com/NorfairKing/validity+ type: git+ location: https://github.com/NorfairKing/validity library- exposed-modules:- Data.Validity.Containers- Data.Validity.Tree- Data.Validity.Map- Data.Validity.Sequence- Data.Validity.Set- build-depends:- base >=4.7 && <5,- validity >=0.4 && <0.5,- containers -any- default-language: Haskell2010- hs-source-dirs: src-+ hs-source-dirs:+ src+ build-depends:+ base >=4.7 && <5+ , containers+ , validity >=0.5 && <0.6+ exposed-modules:+ Data.Validity.Containers+ Data.Validity.Tree+ Data.Validity.Map+ Data.Validity.Sequence+ Data.Validity.Set+ other-modules:+ Paths_validity_containers+ default-language: Haskell2010