File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ library
52
52
, monad-control >= 1.0.0.4 && < 1.1
53
53
, network-uri >= 2.6 && < 2.7
54
54
, safe >= 0.3.9 && < 0.4
55
+ , semigroupoids >= 4.3 && < 5.2
55
56
, servant == 0.9. *
56
57
, string-conversions >= 0.3 && < 0.5
57
58
, text >= 1.2 && < 1.3
Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ import Control.Exception
16
16
import Control.Monad
17
17
import Control.Monad.Catch (MonadThrow , MonadCatch )
18
18
import Data.Foldable (toList )
19
- import Data.Semigroup (Semigroup (.. ))
19
+ import Data.Functor.Alt (Alt (.. ))
20
+ import Data.Semigroup ((<>) )
20
21
21
22
import Control.Monad.Error.Class (MonadError (.. ))
22
23
import Control.Monad.Trans.Except
@@ -216,8 +217,8 @@ instance MonadBaseControl IO ClientM where
216
217
restoreM st = ClientM (restoreM st)
217
218
218
219
-- | Try clients in order, last error is preserved.
219
- instance Semigroup ( ClientM a ) where
220
- a <> b = a `catchError` \ _ -> b
220
+ instance Alt ClientM where
221
+ a <! > b = a `catchError` \ _ -> b
221
222
222
223
runClientM :: ClientM a -> ClientEnv -> IO (Either ServantError a )
223
224
runClientM cm env = runExceptT $ (flip runReaderT env) $ runClientM' cm
You can’t perform that action at this time.
0 commit comments