validity-containers (empty) → 0.1.0.0
raw patch · 6 files changed
+79/−0 lines, 6 filesdep +basedep +containersdep +validitysetup-changed
Dependencies added: base, containers, validity
Files
- LICENSE +21/−0
- Setup.hs +2/−0
- src/Data/Validity/Containers.hs +5/−0
- src/Data/Validity/Map.hs +12/−0
- src/Data/Validity/Tree.hs +11/−0
- validity-containers.cabal +28/−0
+ LICENSE view
@@ -0,0 +1,21 @@+The MIT License (MIT)++Copyright (c) 2016 Tom Sydney Kerckhove++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ src/Data/Validity/Containers.hs view
@@ -0,0 +1,5 @@+module Data.Validity.Containers where++import Data.Validity.Tree as Containers ()++
+ src/Data/Validity/Map.hs view
@@ -0,0 +1,12 @@+module Data.Validity.Map where++import Data.Validity++import Data.Map (Map)+import qualified Data.Map as M++-- | A tree of things is valid if all the things are valid+instance (Validity k, Validity v) => Validity (Map k v) where+ isValid m = all isValid (M.keys m) && all isValid m++
+ src/Data/Validity/Tree.hs view
@@ -0,0 +1,11 @@+module Data.Validity.Tree where++import Data.Validity++import Data.Tree++-- | A tree of things is valid if all the things are valid+instance Validity a => Validity (Tree a) where+ isValid = all isValid++
+ validity-containers.cabal view
@@ -0,0 +1,28 @@+name: validity-containers+version: 0.1.0.0+synopsis: Validity instances for containers+description: Please see README.md+homepage: https://github.com/NorfairKing/validity#readme+license: MIT+license-file: LICENSE+author: Tom Sydney Kerckhove+maintainer: syd.kerckhove@gmail.com+copyright: Copyright: (c) 2016 Tom Sydney Kerckhove+category: Web+build-type: Simple+-- extra-source-files:+cabal-version: >=1.10++library+ hs-source-dirs: src+ exposed-modules: Data.Validity.Containers+ , Data.Validity.Tree+ , Data.Validity.Map+ build-depends: base >= 4.7 && < 5+ , validity+ , containers + default-language: Haskell2010++source-repository head+ type: git+ location: https://github.com/NorfairKing/validity