module Simulation.Aivika.Trans.GPSS.Block.Priority
(priorityBlock) where
import Simulation.Aivika.Trans
import Simulation.Aivika.Trans.GPSS.Block
import Simulation.Aivika.Trans.GPSS.Transact
priorityBlock :: MonadDES m
=> Int
-> Block m (Transact m a) (Transact m a)
{-# INLINABLE priorityBlock #-}
priorityBlock :: Int -> Block m (Transact m a) (Transact m a)
priorityBlock Int
priority =
Block :: forall (m :: * -> *) a b. (a -> Process m b) -> Block m a b
Block { blockProcess :: Transact m a -> Process m (Transact m a)
blockProcess = \Transact m a
a -> Transact m a -> Process m (Transact m a)
forall (m :: * -> *) a. Monad m => a -> m a
return (Transact m a -> Int -> Transact m a
forall (m :: * -> *) a. Transact m a -> Int -> Transact m a
assignTransactPriority Transact m a
a Int
priority) }