Safe Haskell | None |
---|---|
Language | Haskell98 |
Reflex.Host.Class
Documentation
class Reflex t => ReflexHost t Source
Instances
class (ReflexHost t, Monad m) => MonadReadEvent t m | m -> t where Source
Methods
readEvent :: EventHandle t a -> m (Maybe (m a)) Source
Instances
class (Monad m, ReflexHost t) => MonadReflexCreateTrigger t m | m -> t where Source
Methods
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.
Instances
class (Monad m, ReflexHost t, MonadReflexCreateTrigger t m) => MonadReflexHost t m | m -> t where Source
Methods
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
Instances
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