git.iko.soy/typeable/servant
on master help sign in
servant-client: add Eq instance for ServantError
commit29be5761cecd0e88ce3b8b24a28a9a28dca0e135 authorSönke Hahn <soenkehahn@gmail.com> dateThu 21 Apr 2016, 15:27 (11 years ago) parent438912f
1 file changed+13
servant-client/src/Servant/Common/Req.hs+13
servant-client/src/Servant/Common/Req.hs+13
@@ -55,6 +55,19 @@ data ServantError
5555 }
5656 deriving (Show, Typeable)
5757
58+instance Eq ServantError where
59+ FailureResponse a b c == FailureResponse x y z =
60+ (a, b, c) == (x, y, z)
61+ DecodeFailure a b c == DecodeFailure x y z =
62+ (a, b, c) == (x, y, z)
63+ UnsupportedContentType a b == UnsupportedContentType x y =
64+ (a, b) == (x, y)
65+ InvalidContentTypeHeader a b == InvalidContentTypeHeader x y =
66+ (a, b) == (x, y)
67+ ConnectionError a == ConnectionError x =
68+ show a == show x
69+ _ == _ = False
70+
5871instance Exception ServantError
5972
6073data Req = Req