Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
This module defines the multi-thread backend for the Network
monad.
Synopsis
- type MsgBuf = HashMap LocTm (Chan String)
- newtype LocalConfig = LocalConfig {}
- newEmptyMsgBuf :: [LocTm] -> IO MsgBuf
- mkLocalConfig :: [LocTm] -> IO LocalConfig
- locs :: LocalConfig -> [LocTm]
- runNetworkLocal :: MonadIO m => LocalConfig -> 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.
newtype LocalConfig Source #
Instances
Backend LocalConfig Source # | |
Defined in Choreography.Network.Local runNetwork :: MonadIO m => LocalConfig -> LocTm -> Network m a -> m a Source # |
mkLocalConfig :: [LocTm] -> IO LocalConfig Source #
locs :: LocalConfig -> [LocTm] Source #
runNetworkLocal :: MonadIO m => LocalConfig -> LocTm -> Network m a -> m a Source #