packages feed

validity-aeson (empty) → 0.0.0.0

raw patch · 4 files changed

+76/−0 lines, 4 filesdep +aesondep +basedep +validitysetup-changed

Dependencies added: aeson, base, validity, validity-scientific, validity-text, validity-unordered-containers, validity-vector

Files

+ LICENSE view
@@ -0,0 +1,21 @@+The MIT License (MIT)++Copyright (c) 2017 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,3 @@+import Distribution.Simple++main = defaultMain
+ src/Data/Validity/Aeson.hs view
@@ -0,0 +1,19 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}++module Data.Validity.Aeson where++import Data.Aeson+import Data.Validity+import Data.Validity.HashMap ()+import Data.Validity.Scientific ()+import Data.Validity.Text ()+import Data.Validity.Vector ()++-- | A 'Value' is valid if the recursive components are valid.+instance Validity Value where+    isValid (Object o) = isValid o+    isValid (Array a) = isValid a+    isValid (String t) = isValid t+    isValid (Number s) = isValid s+    isValid (Bool b) = isValid b+    isValid Null = True
+ validity-aeson.cabal view
@@ -0,0 +1,33 @@+name: validity-aeson+version: 0.0.0.0+cabal-version: >=1.10+build-type: Simple+license: MIT+license-file: LICENSE+copyright: Copyright: (c) 2017 Tom Sydney Kerckhove+maintainer: syd.kerckhove@gmail.com+homepage: https://github.com/NorfairKing/validity#readme+synopsis: Validity instances for aeson+description:+    Please see README.md+category: Validity+author: Tom Sydney Kerckhove++source-repository head+    type: git+    location: https://github.com/NorfairKing/validity++library+    exposed-modules:+        Data.Validity.Aeson+    build-depends:+        base >= 4.7 && <5,+        aeson -any,+        validity >=0.3 && <0.4,+        validity-text >= 0.1 && < 0.2,+        validity-unordered-containers >= 0.0 && < 0.1,+        validity-vector >= 0.0 && < 0.1,+        validity-scientific >= 0.0 && < 0.1+    default-language: Haskell2010+    hs-source-dirs: src+