| Safe Haskell | Trustworthy |
|---|---|
| Language | Haskell2010 |
Test.Marionette.Class
Synopsis
- class (Functor m, MonadError Error m) => Marionette (m :: Type -> Type) where
- sendCommand :: (HasCallStack, FromJSON a) => Command -> m a
- sendCommands :: (HasCallStack, Traversable t, FromJSON a) => t Command -> m (t a)
- sendCommand_ :: (HasCallStack, Marionette m) => Command -> m ()
- sendCommands_ :: (HasCallStack, Traversable t, Marionette m) => t Command -> m ()
Documentation
class (Functor m, MonadError Error m) => Marionette (m :: Type -> Type) where Source #
Monads with the ability to send commands to a Marionette server and receive their results.
Minimal complete definition
Methods
sendCommand :: (HasCallStack, FromJSON a) => Command -> m a Source #
Send a single command, decoding its result.
sendCommands :: (HasCallStack, Traversable t, FromJSON a) => t Command -> m (t a) Source #
Send multiple commands, decoding each result. The commands may be sent in parallel.
default sendCommands :: (HasCallStack, MonadUnliftIO m, Traversable t, FromJSON a) => t Command -> m (t a) Source #
Instances
| (MonadUnliftIO m, MonadThrow m, MonadCatch m) => Marionette (MarionetteT m) Source # | |
Defined in Test.Marionette.Client Methods sendCommand :: (HasCallStack, FromJSON a) => Command -> MarionetteT m a Source # sendCommands :: (HasCallStack, Traversable t, FromJSON a) => t Command -> MarionetteT m (t a) Source # | |
sendCommand_ :: (HasCallStack, Marionette m) => Command -> m () Source #
Send a single command, discarding its result.
sendCommands_ :: (HasCallStack, Traversable t, Marionette m) => t Command -> m () Source #
Send several commands, discarding their results. The commands may be sent in parallel.