Safe Haskell | None |
---|---|
Language | Haskell98 |
Documentation
class Reflex t => ReflexHost t Source
type EventTrigger t :: * -> * Source
type EventHandle t :: * -> * Source
class (ReflexHost t, Monad m) => MonadReadEvent t m | m -> t where Source
readEvent :: EventHandle t a -> m (Maybe (m a)) Source
class (Monad m, ReflexHost t) => MonadReflexCreateTrigger t m | m -> t where Source
newEventWithTrigger :: (EventTrigger t a -> IO (IO ())) -> m (Event t a) Source
Creates an original Event (one that is not based on any other event). When a subscriber first subscribes to an event (building another event that depends on the subscription) the given callback function is run by passing a trigger. The event is then set up in IO. The callback function returns an accompanying teardown action. Any time between setup and teardown the trigger can be used to fire the event.
class (Monad m, ReflexHost t, MonadReflexCreateTrigger t m) => MonadReflexHost t m | m -> t where Source
fireEventsAndRead :: [DSum (EventTrigger t)] -> (forall m'. MonadReadEvent t m' => m' a) -> m a Source
subscribeEvent :: Event t a -> m (EventHandle t a) Source
runFrame :: PushM t a -> m a Source
runHostFrame :: HostFrame t a -> m a Source
MonadReflexHost Spider SpiderHost | |
(Reflex t, MonadReflexHost t m) => MonadReflexHost t (ReaderT r m) |
fireEvents :: MonadReflexHost t m => [DSum (EventTrigger t)] -> m () Source
newEventWithTriggerRef :: (MonadReflexCreateTrigger t m, MonadRef m, Ref m ~ Ref IO) => m (Event t a, Ref m (Maybe (EventTrigger t a))) Source