packages feed

hjsonschema 0.7.0.0 → 0.7.1.0

raw patch · 6 files changed

+24/−6 lines, 6 filesdep ~basePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base

API changes (from Hackage documentation)

- Data.JsonSchema: fetchReferencedSchemas' :: (IsString t, MonadError t e, Traversable e, MonadIO m) => (Text -> m (e ByteString)) -> Spec err -> RawSchema -> Graph -> m (e Graph)
+ Data.JsonSchema: fetchReferencedSchemas' :: (MonadIO m, Functor m, MonadError t e, Traversable e, IsString t) => (Text -> m (e ByteString)) -> Spec err -> RawSchema -> Graph -> m (e Graph)

Files

Example.hs view
@@ -2,6 +2,7 @@  module Main where +import           Control.Applicative import           Data.Aeson import           Data.HashMap.Strict (HashMap) import qualified Data.HashMap.Strict as H
changelog.txt view
@@ -1,3 +1,7 @@+# 0.7.1+++ Support GHC 7.8 again.+ # 0.7  Change error type from Text to ValidationFailure.
hjsonschema.cabal view
@@ -1,5 +1,5 @@ name:                   hjsonschema-version:                0.7.0.0+version:                0.7.1.0 synopsis:               JSON Schema library homepage:               https://github.com/seagreen/hjsonschema license:                MIT@@ -9,6 +9,7 @@ category:               Data build-type:             Simple cabal-version:          >=1.10+tested-with:            GHC == 7.8.4, GHC == 7.10.2 extra-source-files:     changelog.txt                         draft4.json                         JSON-Schema-Test-Suite/tests/draft4/*.json@@ -35,7 +36,8 @@   other-extensions:     TemplateHaskell   ghc-options:          -Wall   build-depends:        aeson                >= 0.7   && < 0.10-                      , base                 >= 4.6   && < 4.9+                        -- 4.6 doesn't have a Traversable Either instance:+                      , base                 >= 4.7   && < 4.9                       , bytestring           >= 0.10  && < 0.11                       , containers           >= 0.5   && < 0.6                       , file-embed           >= 0.0.8 && < 0.0.10
src/Data/JsonSchema.hs view
@@ -8,7 +8,8 @@   , module Data.JsonSchema.Draft4   ) where -import           Control.Monad.Except++import           Control.Monad.Except (MonadError, MonadIO, join, throwError) import qualified Data.ByteString.Lazy as LBS import           Data.Foldable import qualified Data.HashMap.Strict as H@@ -22,6 +23,9 @@ import           Data.JsonSchema.Reference import           Import +-- For GHCs before 7.10:+import           Prelude hiding (sequence)+ -- | Take a schema. Retrieve every document either it or its -- subschemas include via the "$ref" keyword. Load a 'Graph' out -- with them.@@ -34,7 +38,8 @@ -- is provided by the user. This allows restrictions to be added, e.g. rejecting -- non-local URLs. fetchReferencedSchemas'-  :: forall t e m err. (IsString t, MonadError t e, Traversable e, MonadIO m)+  -- The `Functor m` declaration is for GHCs before 7.10.+  :: forall m e t err. (MonadIO m, Functor m, MonadError t e, Traversable e, IsString t)   => (Text -> m (e LBS.ByteString))   -> Spec err   -> RawSchema
src/Data/JsonSchema/Core.hs view
@@ -8,6 +8,9 @@ import           Data.JsonSchema.Reference import           Import +-- For GHCs before 7.10:+import           Prelude                   hiding (concat, sequence)+ -------------------------------------------------- -- * Primary API --------------------------------------------------@@ -73,9 +76,9 @@ data ValidationFailure err = ValidationFailure   { _failureName :: err   , _failureInfo :: FailureInfo-  } deriving (Show, Read)+  } deriving (Show)  data FailureInfo = FailureInfo   { _validatingData :: Value   , _offendingData  :: Value-  } deriving (Show, Read)+  } deriving (Show)
src/Data/JsonSchema/Draft4/Any.hs view
@@ -14,6 +14,9 @@ import           Data.JsonSchema.Reference import           Import +-- For GHCs before 7.10:+import           Prelude                   hiding (any)+ -- | http://json-schema.org/latest/json-schema-validation.html#anchor76 -- --  > The value of this keyword MUST be an array.