servant-client: add Eq instance for ServantError
This commit is contained in:
parent
438912f6c5
commit
29be5761ce
1 changed files with 13 additions and 0 deletions
|
@ -55,6 +55,19 @@ data ServantError
|
||||||
}
|
}
|
||||||
deriving (Show, Typeable)
|
deriving (Show, Typeable)
|
||||||
|
|
||||||
|
instance Eq ServantError where
|
||||||
|
FailureResponse a b c == FailureResponse x y z =
|
||||||
|
(a, b, c) == (x, y, z)
|
||||||
|
DecodeFailure a b c == DecodeFailure x y z =
|
||||||
|
(a, b, c) == (x, y, z)
|
||||||
|
UnsupportedContentType a b == UnsupportedContentType x y =
|
||||||
|
(a, b) == (x, y)
|
||||||
|
InvalidContentTypeHeader a b == InvalidContentTypeHeader x y =
|
||||||
|
(a, b) == (x, y)
|
||||||
|
ConnectionError a == ConnectionError x =
|
||||||
|
show a == show x
|
||||||
|
_ == _ = False
|
||||||
|
|
||||||
instance Exception ServantError
|
instance Exception ServantError
|
||||||
|
|
||||||
data Req = Req
|
data Req = Req
|
||||||
|
|
Loading…
Reference in a new issue