Safe Haskell | None |
---|
- listenTrans :: Event a -> (a -> Reactive ()) -> Reactive (IO ())
- listenValueTrans :: Behavior a -> (a -> Reactive ()) -> Reactive (IO ())
- schedulePrioritized :: Maybe (IORef Node) -> Reactive () -> Reactive ()
- scheduleLast :: IO () -> Reactive ()
- data Listen a = Listen {}
- getListen :: Event a -> Reactive (Listen a)
- runListen :: Listen a -> Maybe (IORef Node) -> (a -> Reactive ()) -> Reactive (IO ())
- linkedListen :: Event a -> Maybe (IORef Node) -> (a -> Reactive ()) -> Reactive (IO ())
- data Node
- newEventLinked :: IO (Event a, a -> Reactive (), IORef Node)
- newEvent :: Reactive (Event a, a -> Reactive ())
- finalizeEvent :: Event a -> IO () -> Event a
- finalizeListen :: Listen a -> IO () -> IO (Listen a)
- ioReactive :: IO a -> Reactive a
- data Unlistener
- addCleanup :: Unlistener -> Listen a -> Reactive (Listen a)
- unlistenize :: Reactive (IO ()) -> Reactive Unlistener
Documentation
listenTrans :: Event a -> (a -> Reactive ()) -> Reactive (IO ())Source
Variant of listen
that allows you to initiate more activity in the current
transaction. Useful for implementing new primitives.
listenValueTrans :: Behavior a -> (a -> Reactive ()) -> Reactive (IO ())Source
Variant of listenValue
that allows you to initiate more activity in the current
transaction. Useful for implementing new primitives.
schedulePrioritized :: Maybe (IORef Node) -> Reactive () -> Reactive ()Source
Queue the specified atomic to run at the end of the priority 2 queue
linkedListen :: Event a -> Maybe (IORef Node) -> (a -> Reactive ()) -> Reactive (IO ())Source
Listen for firings of this event. The returned IO ()
is an IO action
that unregisters the listener. This is the observer pattern.
newEventLinked :: IO (Event a, a -> Reactive (), IORef Node)Source
Returns an event, and a push action for pushing a value into the event.
newEvent :: Reactive (Event a, a -> Reactive ())Source
Returns an event, and a push action for pushing a value into the event.
ioReactive :: IO a -> Reactive aSource
data Unlistener Source
addCleanup :: Unlistener -> Listen a -> Reactive (Listen a)Source
Cause the things listened to with unlistenize to be unlistened when the specified listener is not referenced any more.
unlistenize :: Reactive (IO ()) -> Reactive UnlistenerSource
Listen to an input event/behavior and return an Unlistener
that can be
attached to an output event using addCleanup
.