pianola-0.1.0: Remotely controlling Java Swing applications

Safe HaskellNone

Pianola.Protocol

Synopsis

Documentation

type ProtocolF = Compose ((,) [ByteString]) (Iteratee ByteString Identity)Source

A Functor which models a RPC call as a pair in which the first component is a list of bytestrings (the arguments of the call) and the second is a pure Iteratee that consumes the bytes sent from the server and returns the response of the call.

type Protocol = EitherT ServerError (Free ProtocolF)Source

A monad to represent interactions with a remote server. A free monad over a RPC call functor, augmented with some error conditions.

call :: [ByteString] -> Iteratee ByteString Identity x -> Protocol xSource

Constructs a RPC call from a packed list of arguments and a pure Iteratee to consume the response.