module Simulation.Aivika.Trans.GPSS.Block.Advance
(advanceBlock) where
import Simulation.Aivika.Trans
import Simulation.Aivika.Trans.GPSS.Block
advanceBlock :: MonadDES m
=> Process m ()
-> Block m a a
{-# INLINABLE advanceBlock #-}
advanceBlock :: Process m () -> Block m a a
advanceBlock Process m ()
p =
Block :: forall (m :: * -> *) a b. (a -> Process m b) -> Block m a b
Block { blockProcess :: a -> Process m a
blockProcess = \a
a -> Process m ()
p Process m () -> Process m a -> Process m a
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> a -> Process m a
forall (m :: * -> *) a. Monad m => a -> m a
return a
a }