servant-client: add Eq instance for ServantError

This commit is contained in:
Sönke Hahn 2016-04-21 15:27:08 +08:00
parent 438912f6c5
commit 29be5761ce

View file

@ -55,6 +55,19 @@ data ServantError
}
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
data Req = Req