Copyright | Copyright (c) 2009-2016 David Sorokin <david.sorokin@gmail.com> |
---|---|
License | BSD3 |
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Tested with: GHC 8.0.1
The module defines a gate which can be either opened or closed.
- data Gate
- newGate :: Bool -> Simulation Gate
- newGateOpened :: Simulation Gate
- newGateClosed :: Simulation Gate
- openGate :: Gate -> Event ()
- closeGate :: Gate -> Event ()
- gateOpened :: Gate -> Event Bool
- gateClosed :: Gate -> Event Bool
- awaitGateOpened :: Gate -> Process ()
- awaitGateClosed :: Gate -> Process ()
- gateChanged_ :: Gate -> Signal ()
Documentation
newGate :: Bool -> Simulation Gate Source #
Create a new gate, specifying whether the gate is initially open.
newGateOpened :: Simulation Gate Source #
Create a new initially open gate.
newGateClosed :: Simulation Gate Source #
Create a new initially close gate.
awaitGateOpened :: Gate -> Process () Source #
Await the gate to be opened if required. If the gate is already open then the computation returns immediately.
awaitGateClosed :: Gate -> Process () Source #
Await the gate to be closed if required. If the gate is already closed then the computation returns immediately.
gateChanged_ :: Gate -> Signal () Source #
Signal triggered when the state of the gate changes.