Maintainer | Ertugrul Soeylemez <es@ertes.de> |
---|
Wire sessions.
- data Session a b = Session {
- sessFreeVar :: TVar Bool
- sessStateRef :: IORef (WireState IO)
- sessTimeRef :: IORef UTCTime
- sessWireRef :: IORef (Wire IO a b)
- stepWire :: a -> Session a b -> IO (Output b)
- stepWireDelta :: NominalDiffTime -> a -> Session a b -> IO (Output b)
- stepWireTime :: UTCTime -> a -> Session a b -> IO (Output b)
- stepWireTime' :: UTCTime -> a -> Session a b -> IO (Output b)
- withWire :: Wire IO a b -> (Session a b -> IO c) -> IO c
Sessions
Reactive sessions with the given time type.
Session | |
|
stepWire :: a -> Session a b -> IO (Output 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 (Output 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 (Output 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.