Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Control.Monad.AWS.Matchers
Synopsis
- data Matchers
- class HasMatchers env where
- data Matcher where
- SendMatcher :: forall a. (AWSRequest a, Typeable a, Typeable (AWSResponse a)) => (a -> Bool) -> Either Error (AWSResponse a) -> Matcher
- AwaitMatcher :: forall a. (AWSRequest a, Typeable a) => (Wait a -> a -> Bool) -> Either Error Accept -> Matcher
- withMatcher :: (MonadReader env m, HasMatchers env) => Matcher -> m a -> m a
- withMatchers :: (MonadReader env m, HasMatchers env) => [Matcher] -> m a -> m a
- matchSend :: forall m env a. (MonadIO m, MonadReader env m, HasMatchers env, Typeable a, Typeable (AWSResponse a)) => a -> m (Either Error (AWSResponse a))
- matchAwait :: forall m env a. (MonadIO m, MonadReader env m, HasMatchers env, Typeable a) => Wait a -> a -> m (Either Error Accept)
- newtype UnmatchedRequestError = UnmatchedRequestError {}
Documentation
Since: 0.1.0.0
class HasMatchers env where Source #
Since: 0.1.0.0
Define a response to provide for any matched requests
Constructors
SendMatcher :: forall a. (AWSRequest a, Typeable a, Typeable (AWSResponse a)) => (a -> Bool) -> Either Error (AWSResponse a) -> Matcher | Matches calls to Since: 0.1.0.0 |
AwaitMatcher :: forall a. (AWSRequest a, Typeable a) => (Wait a -> a -> Bool) -> Either Error Accept -> Matcher | Matches calls to Since: 0.1.0.0 |
withMatcher :: (MonadReader env m, HasMatchers env) => Matcher -> m a -> m a Source #
Add a Matcher
for the duration of the block
Since: 0.1.0.0
withMatchers :: (MonadReader env m, HasMatchers env) => [Matcher] -> m a -> m a Source #
Add multiple Matcher
s for the duration of the block
Since: 0.1.0.0
matchSend :: forall m env a. (MonadIO m, MonadReader env m, HasMatchers env, Typeable a, Typeable (AWSResponse a)) => a -> m (Either Error (AWSResponse a)) Source #
Since: 0.1.0.0
matchAwait :: forall m env a. (MonadIO m, MonadReader env m, HasMatchers env, Typeable a) => Wait a -> a -> m (Either Error Accept) Source #
Since: 0.1.0.0
newtype UnmatchedRequestError Source #
Since: 0.1.0.0
Constructors
UnmatchedRequestError | |
Fields |
Instances
Exception UnmatchedRequestError Source # | |
Defined in Control.Monad.AWS.Matchers | |
Show UnmatchedRequestError Source # | |
Defined in Control.Monad.AWS.Matchers Methods showsPrec :: Int -> UnmatchedRequestError -> ShowS # show :: UnmatchedRequestError -> String # showList :: [UnmatchedRequestError] -> ShowS # |