Copyright | Copyright (c) 2017 David Sorokin <david.sorokin@gmail.com> |
---|---|
License | BSD3 |
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Tested with: GHC 8.0.2
This module defines a GPSS transact.
Synopsis
- data Transact a
- transactValue :: Transact a -> a
- transactArrivalDelay :: Transact a -> Maybe Double
- transactArrivalTime :: Transact a -> Double
- transactPriority :: Transact a -> Int
- transactAssemblySet :: Transact a -> Event AssemblySet
- newTransact :: Arrival a -> Int -> Simulation (Transact a)
- splitTransact :: Transact a -> Simulation (Transact a)
- assignTransactValue :: Transact a -> (a -> b) -> Transact b
- assignTransactValueM :: Monad c => Transact a -> (a -> c b) -> c (Transact b)
- assignTransactPriority :: Transact a -> Int -> Process (Transact a)
- takeTransact :: Transact a -> Process ()
- releaseTransact :: Transact a -> Process ()
- transactPreemptionBegin :: Transact a -> Event ()
- transactPreemptionEnd :: Transact a -> Event ()
- requireTransactProcessId :: Transact a -> Event ProcessId
- transferTransact :: Transact a -> Process () -> Event ()
- reactivateTransacts :: [(Transact a, Maybe (Process ()))] -> Event ()
- registerTransactQueueEntry :: Transact a -> QueueEntry -> Event ()
- unregisterTransactQueueEntry :: Transact a -> Queue -> Event QueueEntry
Documentation
transactValue :: Transact a -> a Source #
The data of the transact.
transactArrivalDelay :: Transact a -> Maybe Double Source #
The delay between the transacts generated.
transactArrivalTime :: Transact a -> Double Source #
The time at which the transact was generated.
transactPriority :: Transact a -> Int Source #
The transact priority.
transactAssemblySet :: Transact a -> Event AssemblySet Source #
Return the transact assembly set.
:: Arrival a | the arrival data |
-> Int | the transact priority |
-> Simulation (Transact a) |
Create a new transact.
splitTransact :: Transact a -> Simulation (Transact a) Source #
Split the transact.
assignTransactValue :: Transact a -> (a -> b) -> Transact b Source #
Assign the transact value and return a new version of the same transact.
assignTransactValueM :: Monad c => Transact a -> (a -> c b) -> c (Transact b) Source #
Assign the transact value and return a new version of the same transact.
assignTransactPriority :: Transact a -> Int -> Process (Transact a) Source #
Assign the priority and return a new version of the same transact.
takeTransact :: Transact a -> Process () Source #
Take the transact.
releaseTransact :: Transact a -> Process () Source #
Release the transact.
transactPreemptionBegin :: Transact a -> Event () Source #
Preempt the computation that handles the transact.
transactPreemptionEnd :: Transact a -> Event () Source #
Proceed with the computation after the transact was preempted earlier.
requireTransactProcessId :: Transact a -> Event ProcessId Source #
Require to return an identifier of the process associated with the transact.
transferTransact :: Transact a -> Process () -> Event () Source #
Like the GoTo statement, it associates the transact with another process.
reactivateTransacts :: [(Transact a, Maybe (Process ()))] -> Event () Source #
Reactivate the transacts or transfer them to the specified computations.
registerTransactQueueEntry :: Transact a -> QueueEntry -> Event () Source #
Register the queue entry in the transact.
unregisterTransactQueueEntry :: Transact a -> Queue -> Event QueueEntry Source #
Unregister the queue entry from the transact.