| Safe Haskell | Trustworthy |
|---|---|
| Language | Haskell2010 |
Test.Marionette.Client
Synopsis
- data SocketClosed = SocketClosed
- newtype DecodeError = DecodeError String
- incoming :: (MonadUnliftIO m, MonadThrow m, Binary a) => Socket -> m (TQueue a)
- connect :: MonadUnliftIO m => HostName -> ServiceName -> ((Socket, SockAddr) -> m a) -> m a
- newtype MarionetteTimeout = MarionetteTimeout MarionetteMessage
- newtype UnexpectedResult = UnexpectedResult Result
- data CommandWithCallback = CommandWithCallback Command (TMVar Result)
- newtype MarionetteT (m :: Type -> Type) a = MarionetteT (ReaderT (TQueue CommandWithCallback) m a)
- runMarionetteT :: (MonadUnliftIO m, MonadMask m) => MarionetteT m a -> m a
Documentation
data SocketClosed Source #
Constructors
| SocketClosed |
Instances
| Exception SocketClosed Source # | |
Defined in Test.Marionette.Client Methods toException :: SocketClosed -> SomeException # fromException :: SomeException -> Maybe SocketClosed # displayException :: SocketClosed -> String # backtraceDesired :: SocketClosed -> Bool # | |
| Show SocketClosed Source # | |
Defined in Test.Marionette.Client Methods showsPrec :: Int -> SocketClosed -> ShowS # show :: SocketClosed -> String # showList :: [SocketClosed] -> ShowS # | |
newtype DecodeError Source #
Constructors
| DecodeError String |
Instances
| Exception DecodeError Source # | |
Defined in Test.Marionette.Client Methods toException :: DecodeError -> SomeException # fromException :: SomeException -> Maybe DecodeError # displayException :: DecodeError -> String # backtraceDesired :: DecodeError -> Bool # | |
| Show DecodeError Source # | |
Defined in Test.Marionette.Client Methods showsPrec :: Int -> DecodeError -> ShowS # show :: DecodeError -> String # showList :: [DecodeError] -> ShowS # | |
incoming :: (MonadUnliftIO m, MonadThrow m, Binary a) => Socket -> m (TQueue a) Source #
connect :: MonadUnliftIO m => HostName -> ServiceName -> ((Socket, SockAddr) -> m a) -> m a Source #
newtype MarionetteTimeout Source #
Constructors
| MarionetteTimeout MarionetteMessage |
Instances
| Exception MarionetteTimeout Source # | |
Defined in Test.Marionette.Client Methods toException :: MarionetteTimeout -> SomeException # fromException :: SomeException -> Maybe MarionetteTimeout # | |
| Show MarionetteTimeout Source # | |
Defined in Test.Marionette.Client Methods showsPrec :: Int -> MarionetteTimeout -> ShowS # show :: MarionetteTimeout -> String # showList :: [MarionetteTimeout] -> ShowS # | |
newtype UnexpectedResult Source #
Constructors
| UnexpectedResult Result |
Instances
| Exception UnexpectedResult Source # | |
Defined in Test.Marionette.Client Methods toException :: UnexpectedResult -> SomeException # fromException :: SomeException -> Maybe UnexpectedResult # | |
| Show UnexpectedResult Source # | |
Defined in Test.Marionette.Client Methods showsPrec :: Int -> UnexpectedResult -> ShowS # show :: UnexpectedResult -> String # showList :: [UnexpectedResult] -> ShowS # | |
data CommandWithCallback Source #
Constructors
| CommandWithCallback Command (TMVar Result) |
Instances
| Monad m => MonadReader (TQueue CommandWithCallback) (MarionetteT m) Source # | |
Defined in Test.Marionette.Client Methods ask :: MarionetteT m (TQueue CommandWithCallback) # local :: (TQueue CommandWithCallback -> TQueue CommandWithCallback) -> MarionetteT m a -> MarionetteT m a # reader :: (TQueue CommandWithCallback -> a) -> MarionetteT m a # | |
newtype MarionetteT (m :: Type -> Type) a Source #
A monad transformer that speaks the Marionette wire protocol over a TCP
socket. Run it with runMarionetteT.
Constructors
| MarionetteT (ReaderT (TQueue CommandWithCallback) m a) |
Instances
runMarionetteT :: (MonadUnliftIO m, MonadMask m) => MarionetteT m a -> m a Source #
Connect to a Marionette server listening on localhost:2828 (started
by launching Firefox with the --marionette flag), and run the given
action against it.