Extend stateful API
Closed this issue · 0 comments
coot commented
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).