JSON-Combinator 0.2.1 → 0.2.2
raw patch · 2 files changed
+45/−1 lines, 2 files
Files
- JSON-Combinator.cabal +2/−1
- Text/JSON/Failure.hs +43/−0
JSON-Combinator.cabal view
@@ -1,5 +1,5 @@ Name: JSON-Combinator-Version: 0.2.1+Version: 0.2.2 License: BSD3 License-File: LICENSE Author: Tony Morris <ʇǝu˙sıɹɹoɯʇ@ןןǝʞsɐɥ>@@ -33,6 +33,7 @@ GHC-Options: -Wall Exposed-Modules: Text.JSON.Combinator+ , Text.JSON.Failure , Text.JSON.JSONLike , Text.JSON.JSONField , Text.JSON.JSONPrepend
+ Text/JSON/Failure.hs view
@@ -0,0 +1,43 @@+{-# LANGUAGE DeriveDataTypeable #-}++module Text.JSON.Failure+(+ NoSuchField(..)+, ExpectedObject(..)+, ExpectedBool(..)+, ExpectedNumber(..)+, ExpectedString(..)+, ExpectedArray(..)+) where++import Data.Data++-- | An object field was attempted to access but the object has no such field.+data NoSuchField z =+ NoSuchField z+ deriving (Eq, Ord, Show, Data, Typeable)++-- | The JSON value was expected to be an object but it wasn't.+data ExpectedObject j =+ ExpectedObject j+ deriving (Eq, Ord, Show, Data, Typeable)++-- | The JSON value was expected to be an array but it wasn't.+data ExpectedArray j =+ ExpectedArray j+ deriving (Eq, Ord, Show, Data, Typeable)++-- | The JSON value was expected to be a boolean but it wasn't.+data ExpectedBool j =+ ExpectedBool j+ deriving (Eq, Ord, Show, Data, Typeable)++-- | The JSON value was expected to be a number but it wasn't.+data ExpectedNumber j =+ ExpectedNumber j+ deriving (Eq, Ord, Show, Data, Typeable)++-- | The JSON value was expected to be a string but it wasn't.+data ExpectedString j =+ ExpectedString j+ deriving (Eq, Ord, Show, Data, Typeable)