git.iko.soy/typeable/servant
on master help sign in
Remove catchServantError
commit454f53315f6c98ab1bc21702bc20bd77428f2803 authorOleg Grenrus <oleg.grenrus@iki.fi> dateSun 11 Mar 2018, 16:50 (9 years ago) parent80188e0
3 files changed+1−8
servant-client-core/src/Servant/Client/Core/Internal/RunClient.hs+1−6 servant-client-ghcjs/src/Servant/Client/Internal/XhrClient.hs−1 servant-client/src/Servant/Client/Internal/HttpClient.hs−1
servant-client-core/src/Servant/Client/Core/Internal/RunClient.hs+1−6
@@ -25,12 +25,11 @@ import Servant.Client.Core.Internal.Request (Request, Response, GenRes
2525 ServantError (..))
2626import Servant.Client.Core.Internal.ClientF
2727
28−class (Monad m) => RunClient m where
28+class Monad m => RunClient m where
2929 -- | How to make a request.
3030 runRequest :: Request -> m Response
3131 streamingRequest :: Request -> m StreamingResponse
3232 throwServantError :: ServantError -> m a
33− catchServantError :: m a -> (ServantError -> m a) -> m a
3433
3534checkContentTypeHeader :: RunClient m => Response -> m MediaType
3635checkContentTypeHeader response =
@@ -56,7 +55,3 @@ instance ClientF ~ f => RunClient (Free f) where
5655 runRequest req = liftF (RunRequest req id)
5756 streamingRequest req = liftF (StreamingRequest req id)
5857 throwServantError = liftF . Throw
59− catchServantError x h = go x where
60− go (Pure a) = Pure a
61− go (Free (Throw e)) = h e
62− go (Free f) = Free (fmap go f)
servant-client-ghcjs/src/Servant/Client/Internal/XhrClient.hs−1
@@ -78,7 +78,6 @@ instance Alt ClientM where
7878instance RunClient ClientM where
7979 runRequest = performRequest
8080 throwServantError = throwError
81− catchServantError = catchError
8281
8382instance ClientLike (ClientM a) (ClientM a) where
8483 mkClient = id
servant-client/src/Servant/Client/Internal/HttpClient.hs−1
@@ -96,7 +96,6 @@ instance RunClient ClientM where
9696 runRequest = performRequest
9797 streamingRequest = performStreamingRequest
9898 throwServantError = throwError
99− catchServantError = catchError
10099
101100instance ClientLike (ClientM a) (ClientM a) where
102101 mkClient = id