Skip to content

Commit

Permalink
servant-client: add Eq instance for ServantError
Browse files Browse the repository at this point in the history
  • Loading branch information
soenkehahn committed Apr 21, 2016
1 parent 438912f commit 29be576
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions servant-client/src/Servant/Common/Req.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 29be576

Please sign in to comment.