Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type LamportClockSim = LamportClockSimT Identity
- newtype LamportClockSimT m a = LamportClockSim (ExceptT String (StateT (Map Pid LocalTime) m) a)
- type ProcessSim = ProcessSimT Identity
- newtype ProcessSimT m a = ProcessSim (ReaderT Pid (LamportClockSimT m) a)
- runLamportClockSim :: LamportClockSim a -> Either String a
- runLamportClockSimT :: Monad m => LamportClockSimT m a -> m (Either String a)
- runProcessSim :: Pid -> ProcessSim a -> LamportClockSim a
- runProcessSimT :: Pid -> ProcessSimT m a -> LamportClockSimT m a
Lamport clock simulation
newtype LamportClockSimT m a Source #
Lamport clock simulation. Key is Pid
.
Non-present value is equivalent to (0, initial).
MonadTrans LamportClockSimT Source # | |
Monad m => MonadError String (LamportClockSimT m) Source # | |
Monad m => Monad (LamportClockSimT m) Source # | |
Functor m => Functor (LamportClockSimT m) Source # | |
Monad m => MonadFail (LamportClockSimT m) Source # | |
Monad m => Applicative (LamportClockSimT m) Source # | |
type ProcessSim = ProcessSimT Identity Source #
newtype ProcessSimT m a Source #
ProcessSim inside Lamport clock simulation.
ProcessSim (ReaderT Pid (LamportClockSimT m) a) |
MonadTrans ProcessSimT Source # | |
Monad m => Monad (ProcessSimT m) Source # | |
Functor m => Functor (ProcessSimT m) Source # | |
Monad m => MonadFail (ProcessSimT m) Source # | |
Monad m => Applicative (ProcessSimT m) Source # | |
Monad m => Clock (ProcessSimT m) Source # | |
Monad m => Process (ProcessSimT m) Source # | |
runLamportClockSim :: LamportClockSim a -> Either String a Source #
runLamportClockSimT :: Monad m => LamportClockSimT m a -> m (Either String a) Source #
runProcessSim :: Pid -> ProcessSim a -> LamportClockSim a Source #
runProcessSimT :: Pid -> ProcessSimT m a -> LamportClockSimT m a Source #