| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Choreography.Network.LocalMsgCount
Description
This module defines an instrumented version of the Local backend,
which counts how many Send operations are performed during execution of the choreography.
It is used by the benchmarks in `bench/`.
Synopsis
- type MsgBuf = HashMap LocTm (Chan String)
- data LocalMsgCountConfig = LocalMsgCountConfig {}
- newEmptyMsgBuf :: [LocTm] -> IO MsgBuf
- mkLocalMsgCountConfig :: IORef Int -> [LocTm] -> IO LocalMsgCountConfig
- locsLocalMsgCount :: LocalMsgCountConfig -> [LocTm]
- runNetworkLocalMsgCount :: MonadIO m => LocalMsgCountConfig -> LocTm -> Network m a -> m a
Documentation
type MsgBuf = HashMap LocTm (Chan String) Source #
Each location is associated with a message buffer which stores messages sent from other locations.
data LocalMsgCountConfig Source #
Constructors
| LocalMsgCountConfig | |
Instances
| Backend LocalMsgCountConfig Source # | |
Defined in Choreography.Network.LocalMsgCount Methods locs :: LocalMsgCountConfig -> [LocTm] Source # runNetwork :: MonadIO m => LocalMsgCountConfig -> LocTm -> Network m a -> m a Source # | |
mkLocalMsgCountConfig :: IORef Int -> [LocTm] -> IO LocalMsgCountConfig Source #
locsLocalMsgCount :: LocalMsgCountConfig -> [LocTm] Source #
runNetworkLocalMsgCount :: MonadIO m => LocalMsgCountConfig -> LocTm -> Network m a -> m a Source #