preliminary work on client methods and some type repair
This commit is contained in:
parent
ca02c88be3
commit
979adf3660
2 changed files with 36 additions and 13 deletions
|
@ -4,7 +4,8 @@ package BusTypes(
|
|||
BusClient(..), BusServer(..),
|
||||
BusRequest(..), BusResponse(..),
|
||||
ReadRequest(..), ReadResponse(..), WriteRequest(..), WriteResponse(..),
|
||||
BusVal(..), BusError(..), TransactionSize(..)
|
||||
BusVal(..), BusError(..), TransactionSize(..),
|
||||
TaggedBusRequest(..), TaggedBusResponse(..)
|
||||
) where
|
||||
|
||||
import Types
|
||||
|
@ -53,6 +54,14 @@ data BusResponse
|
|||
| BusWriteResponse WriteResponse
|
||||
deriving (Bits, Eq, FShow)
|
||||
|
||||
data TaggedBusRequest inFlightTransactions =
|
||||
TaggedBusRequest (MkTagType inFlightTransactions) BusRequest
|
||||
deriving (Bits, Eq, FShow)
|
||||
|
||||
data TaggedBusResponse inFlightTransactions =
|
||||
TaggedBusResponse (MkTagType inFlightTransactions) BusResponse
|
||||
deriving (Bits, Eq, FShow)
|
||||
|
||||
-- # BusClient.submitRequest
|
||||
-- * The bus client calls the `submitRequest` method of the `BusClient` interface
|
||||
-- with the `BusRequest` it wishes to submit and immediately recieves back
|
||||
|
@ -67,7 +76,7 @@ data BusResponse
|
|||
interface (BusClient :: # -> *) inFlightTransactions =
|
||||
submitRequest :: BusRequest
|
||||
-> ActionValue (MkTagType inFlightTransactions)
|
||||
consumeResponse :: ActionValue (BusResponse, MkTagType inFlightTransactions)
|
||||
consumeResponse :: ActionValue (TaggedBusResponse inFlightTransactions)
|
||||
|
||||
-- # BusServer.consumeRequest
|
||||
-- * The bus server calls the `consumeRequest` method of the `BusServer` interface
|
||||
|
|
Reference in a new issue