packages feed

rest-types 1.10.1 → 1.10.2

raw patch · 3 files changed

+17/−5 lines, 3 filesdep ~generic-aesondep ~json-schemadep ~text

Dependency ranges changed: generic-aeson, json-schema, text

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@ # Changelog +### 1.10.2++* Add `Functor`, `Foldable` and `Traversable` instances for the types+  in `Rest.Types.Error`.+ ### 1.10.1  * Added `ShowUrl` instance for strict and lazy `Text`.
rest-types.cabal view
@@ -1,5 +1,5 @@ name:                rest-types-version:             1.10.1+version:             1.10.2 description:         Silk Rest Framework Types synopsis:            Silk Rest Framework Types maintainer:          code@silk.co@@ -27,7 +27,7 @@     Rest.Types.ShowUrl   build-depends:       base == 4.*-    , aeson >= 0.7 && < 0.8+    , aeson >= 0.7 && < 0.9     , generic-aeson == 0.1.*     , hxt >= 9.2 && < 9.4     , json-schema == 0.6.*
src/Rest/Types/Error.hs view
@@ -1,6 +1,9 @@ {-# LANGUAGE     DeriveDataTypeable+  , DeriveFoldable+  , DeriveFunctor   , DeriveGeneric+  , DeriveTraversable   , EmptyDataDecls   , GADTs   , ScopedTypeVariables@@ -21,7 +24,9 @@  import Control.Monad.Error import Data.Aeson hiding (Success)+import Data.Foldable (Foldable) import Data.JSON.Schema (JSONSchema (..), gSchema)+import Data.Traversable (Traversable) import Data.Typeable import GHC.Generics import Generics.Generic.Aeson@@ -41,7 +46,8 @@   | UnsupportedFormat String   deriving (Eq, Generic, Show) -data DomainReason a = DomainReason { responseCode :: Int, reason :: a } deriving (Eq, Generic)+data DomainReason a = DomainReason { responseCode :: Int, reason :: a }+  deriving (Eq, Generic, Functor, Foldable, Traversable)  instance Show a => Show (DomainReason a) where   showsPrec a (DomainReason _ e) = showParen (a >= 11) (showString "Domain " . showsPrec 11 e)@@ -58,7 +64,8 @@ instance JSONSchema a => JSONSchema (DomainReason a) where   schema = schema . fmap reason -data Status a b = Failure a | Success b deriving (Generic, Typeable)+data Status a b = Failure a | Success b+  deriving (Eq, Show, Generic, Typeable, Functor, Foldable, Traversable)  $(deriveAll ''Status "PFStatus") type instance PF (Status a b) = PFStatus a b@@ -103,7 +110,7 @@    -- Custom domain reasons.   | CustomReason (DomainReason a)-  deriving (Eq, Generic, Show, Typeable)+  deriving (Eq, Generic, Show, Typeable, Functor, Foldable, Traversable)  instance Error DataError