git.iko.soy/typeable/servant
on master help sign in
servant-client: add Eq instance for ServantError
29be576Sönke Hahn
servant-client/src/Servant/Common/Req.hs+13
@@ -55,6 +55,19 @@ data ServantError
55 }
55 }
56 deriving (Show, Typeable)
56 deriving (Show, Typeable)
57
57
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+
58instance Exception ServantError
71instance Exception ServantError
59
72
60data Req = Req
73data Req = Req