Maintainer | Ertugrul Soeylemez <es@ertes.de> |
---|
Wire sessions.
- data Session a b = Session {
- sessFreeVar :: TVar Bool
- sessStateRef :: IORef WireState
- sessTimeRef :: IORef UTCTime
- sessWireRef :: IORef (Wire a b)
- stepWire :: a -> Session a b -> IO (Maybe b)
- stepWireDelta :: NominalDiffTime -> a -> Session a b -> IO (Maybe b)
- stepWireTime :: UTCTime -> a -> Session a b -> IO (Maybe b)
- stepWireTime' :: UTCTime -> a -> Session a b -> IO (Maybe b)
- withWire :: Wire a b -> (Session a b -> IO c) -> IO c
Sessions
Reactive sessions with the given time type.
Session | |
|
stepWire :: a -> Session a b -> IO (Maybe b)Source
Feed the given input value into the reactive system performing the next instant using real time.
stepWireDelta :: NominalDiffTime -> a -> Session a b -> IO (Maybe b)Source
Feed the given input value into the reactive system performing the next instant using the given time delta.
stepWireTime :: UTCTime -> a -> Session a b -> IO (Maybe b)Source
Feed the given input value into the reactive system performing the next instant, which is at the given time. This function is thread-safe.