reflex-0.6: Higher-order Functional Reactive Programming

Safe HaskellNone
LanguageHaskell98

Reflex.TriggerEvent.Base

Description

This module defines TriggerEventT, the standard implementation of TriggerEvent.

Synopsis

Documentation

newtype TriggerEventT t m a Source #

A basic implementation of TriggerEvent.

Instances
MonadReflexCreateTrigger t m => MonadReflexCreateTrigger t (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Methods

newEventWithTrigger :: (EventTrigger t a -> IO (IO ())) -> TriggerEventT t m (Event t a) Source #

newFanEventWithTrigger :: GCompare k => (forall a. k a -> EventTrigger t a -> IO (IO ())) -> TriggerEventT t m (EventSelector t k) Source #

Adjustable t m => Adjustable t (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Methods

runWithReplace :: TriggerEventT t m a -> Event t (TriggerEventT t m b) -> TriggerEventT t m (a, Event t b) Source #

traverseIntMapWithKeyWithAdjust :: (Key -> v -> TriggerEventT t m v') -> IntMap v -> Event t (PatchIntMap v) -> TriggerEventT t m (IntMap v', Event t (PatchIntMap v')) Source #

traverseDMapWithKeyWithAdjust :: GCompare k => (forall a. k a -> v a -> TriggerEventT t m (v' a)) -> DMap k v -> Event t (PatchDMap k v) -> TriggerEventT t m (DMap k v', Event t (PatchDMap k v')) Source #

traverseDMapWithKeyWithAdjustWithMove :: GCompare k => (forall a. k a -> v a -> TriggerEventT t m (v' a)) -> DMap k v -> Event t (PatchDMapWithMove k v) -> TriggerEventT t m (DMap k v', Event t (PatchDMapWithMove k v')) Source #

PostBuild t m => PostBuild t (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Methods

getPostBuild :: TriggerEventT t m (Event t ()) Source #

(Monad m, MonadRef m, Ref m ~ Ref IO, MonadReflexCreateTrigger t m) => TriggerEvent t (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Methods

newTriggerEvent :: TriggerEventT t m (Event t a, a -> IO ()) Source #

newTriggerEventWithOnComplete :: TriggerEventT t m (Event t a, a -> IO () -> IO ()) Source #

newEventWithLazyTriggerWithOnComplete :: ((a -> IO () -> IO ()) -> IO (IO ())) -> TriggerEventT t m (Event t a) Source #

PerformEvent t m => PerformEvent t (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Associated Types

type Performable (TriggerEventT t m) :: * -> * Source #

NotReady t m => NotReady t (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.NotReady.Class

MonadTrans (TriggerEventT t) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Methods

lift :: Monad m => m a -> TriggerEventT t m a #

MonadHold t m => MonadHold (t :: *) (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Methods

hold :: a -> Event t a -> TriggerEventT t m (Behavior t a) Source #

holdDyn :: a -> Event t a -> TriggerEventT t m (Dynamic t a) Source #

holdIncremental :: Patch p => PatchTarget p -> Event t p -> TriggerEventT t m (Incremental t p) Source #

buildDynamic :: PushM t a -> Event t a -> TriggerEventT t m (Dynamic t a) Source #

headE :: Event t a -> TriggerEventT t m (Event t a) Source #

MonadSample t m => MonadSample (t :: *) (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Methods

sample :: Behavior t a -> TriggerEventT t m a Source #

Monad m => Monad (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Methods

(>>=) :: TriggerEventT t m a -> (a -> TriggerEventT t m b) -> TriggerEventT t m b #

(>>) :: TriggerEventT t m a -> TriggerEventT t m b -> TriggerEventT t m b #

return :: a -> TriggerEventT t m a #

fail :: String -> TriggerEventT t m a #

Functor m => Functor (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Methods

fmap :: (a -> b) -> TriggerEventT t m a -> TriggerEventT t m b #

(<$) :: a -> TriggerEventT t m b -> TriggerEventT t m a #

MonadFix m => MonadFix (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Methods

mfix :: (a -> TriggerEventT t m a) -> TriggerEventT t m a #

Applicative m => Applicative (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Methods

pure :: a -> TriggerEventT t m a #

(<*>) :: TriggerEventT t m (a -> b) -> TriggerEventT t m a -> TriggerEventT t m b #

liftA2 :: (a -> b -> c) -> TriggerEventT t m a -> TriggerEventT t m b -> TriggerEventT t m c #

(*>) :: TriggerEventT t m a -> TriggerEventT t m b -> TriggerEventT t m b #

(<*) :: TriggerEventT t m a -> TriggerEventT t m b -> TriggerEventT t m a #

MonadIO m => MonadIO (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Methods

liftIO :: IO a -> TriggerEventT t m a #

MonadException m => MonadException (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Methods

throw :: Exception e => e -> TriggerEventT t m a #

catch :: Exception e => TriggerEventT t m a -> (e -> TriggerEventT t m a) -> TriggerEventT t m a #

finally :: TriggerEventT t m a -> TriggerEventT t m b -> TriggerEventT t m a #

MonadAsyncException m => MonadAsyncException (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Methods

mask :: ((forall a. TriggerEventT t m a -> TriggerEventT t m a) -> TriggerEventT t m b) -> TriggerEventT t m b #

PrimMonad m => PrimMonad (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Associated Types

type PrimState (TriggerEventT t m) :: * #

Methods

primitive :: (State# (PrimState (TriggerEventT t m)) -> (#State# (PrimState (TriggerEventT t m)), a#)) -> TriggerEventT t m a #

MonadRef m => MonadRef (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Associated Types

type Ref (TriggerEventT t m) :: * -> * #

Methods

newRef :: a -> TriggerEventT t m (Ref (TriggerEventT t m) a) #

readRef :: Ref (TriggerEventT t m) a -> TriggerEventT t m a #

writeRef :: Ref (TriggerEventT t m) a -> a -> TriggerEventT t m () #

modifyRef :: Ref (TriggerEventT t m) a -> (a -> a) -> TriggerEventT t m () #

modifyRef' :: Ref (TriggerEventT t m) a -> (a -> a) -> TriggerEventT t m () #

MonadAtomicRef m => MonadAtomicRef (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Methods

atomicModifyRef :: Ref (TriggerEventT t m) a -> (a -> (a, b)) -> TriggerEventT t m b #

atomicModifyRef' :: Ref (TriggerEventT t m) a -> (a -> (a, b)) -> TriggerEventT t m b #

(Semigroup a, Applicative m) => Semigroup (TriggerEventT t m a) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Methods

(<>) :: TriggerEventT t m a -> TriggerEventT t m a -> TriggerEventT t m a #

sconcat :: NonEmpty (TriggerEventT t m a) -> TriggerEventT t m a #

stimes :: Integral b => b -> TriggerEventT t m a -> TriggerEventT t m a #

(Monoid a, Applicative m) => Monoid (TriggerEventT t m a) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

Methods

mempty :: TriggerEventT t m a #

mappend :: TriggerEventT t m a -> TriggerEventT t m a -> TriggerEventT t m a #

mconcat :: [TriggerEventT t m a] -> TriggerEventT t m a #

type PrimState (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

type Ref (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

type Ref (TriggerEventT t m) = Ref m
type Performable (TriggerEventT t m) Source # 
Instance details

Defined in Reflex.TriggerEvent.Base

runTriggerEventT :: TriggerEventT t m a -> Chan [DSum (EventTriggerRef t) TriggerInvocation] -> m a Source #

Run a TriggerEventT action. The argument should be a Chan into which TriggerInvocations can be passed; it is expected that some other thread will be responsible for popping values out of the Chan and firing their EventTriggers.

askEvents :: Monad m => TriggerEventT t m (Chan [DSum (EventTriggerRef t) TriggerInvocation]) Source #

Retrieve the current Chan; event trigger invocations pushed into it will be fired.

data TriggerInvocation a Source #

A value with which to fire an Event, as well as a callback to invoke after its propagation has completed.

Constructors

TriggerInvocation a (IO ()) 

newtype EventTriggerRef t a Source #

A reference to an EventTrigger suitable for firing with TriggerEventT.

Constructors

EventTriggerRef