pianola-0.1.0: Remotely controlling Java Swing applications

Safe HaskellNone




simpleDriver :: Protocol o -> Endpoint -> Pianola Protocol LogEntry o a -> Stream FilePath -> EitherT DriverError IO aSource

Runs a pianola computation. Receives as argument a monadic action to obtain snapshots of type o of a remote system, a connection endpoint to the remote system, a Pianola computation with context of type o and return value of type a, and an infinite stream of filenames to store the screenshots. Textual log messages are written to standard output. The computation may fail with an error of type DriverError.

See also simpleSwingDriver.

data DriverError Source

Possible failure outcomes when running a pianola computation.


DriverIOError IOException

Local exception while storing screenshots or log messages.

PianolaIOError IOException

Exception when connecting the remote system.

PianolaParseError Text

Remote system returns unparseable data.

PianolaSnapshotError Int Int

An operation was requested on an obsolete snapshot (first integer) of the remote system (whose current snapshot number is the second integer).

PianolaServerError Text

Server couldn't complete requested operation (either because it doesn't support the operation or because of an internal error.)


Failure from a call to pfail or from a Glance without results.


filePathStream :: String -> Int -> String -> FilePath -> Stream FilePathSource

A more general version of screenshotStream, which allows the client to specify the prefix before the file number, the amount of padding for the file number, and the suffix after the file number.

screenshotStream :: FilePath -> Stream FilePathSource

Returns an infinite stream of filenames for storing screenshots, located in the directory supplied as a parameter.