reflex-0.3: Higher-order Functional Reactive Programming

Safe HaskellNone
LanguageHaskell98

Reflex.Spider.Internal

Synopsis

Documentation

data Hold a Source

Constructors

Hold 

hold :: a -> Event a -> EventM (Behavior a) Source

data Pull a Source

Constructors

Pull 

data Invalidator Source

Constructors

forall a . InvalidatorPull (Pull a) 
forall a . InvalidatorSwitch (SwitchSubscribed a) 

data Root k Source

Constructors

Root 

Fields

rootOccurrence :: !(IORef (DMap k))
 
rootSubscribed :: !(IORef (DMap (WrapArg RootSubscribed k)))
 
rootInit :: !(forall a. k a -> RootTrigger a -> IO (IO ()))
 

data SomeHoldInit Source

Constructors

forall a . SomeHoldInit (Event a) (Hold a) 

data Push a b Source

Constructors

Push 

Fields

pushCompute :: !(a -> EventM (Maybe b))
 
pushParent :: !(Event a)
 
pushSubscribed :: !(IORef (Maybe (PushSubscribed a b)))
 

data Merge k Source

Constructors

Merge 

data FanSubscriberKey k a where Source

Constructors

FanSubscriberKey :: k a -> FanSubscriberKey k [WeakSubscriber a] 

Instances

data Fan k Source

Constructors

Fan 

Fields

fanParent :: !(Event (DMap k))
 
fanSubscribed :: !(IORef (Maybe (FanSubscribed k)))
 

data Switch a Source

Constructors

Switch 

data Box a Source

Constructors

Box 

Fields

unBox :: a
 

data WeakSubscriber a Source

Constructors

forall k . GCompare k => WeakSubscriberMerge !(k a) !(Weak (Box (MergeSubscribed k))) 
WeakSubscriberSimple !(Weak (Subscriber a)) 

data Event a Source

Constructors

forall k . GCompare k => EventRoot !(k a) !(Root k) 
EventNever 
forall b . EventPush !(Push b a) 
forall k . (GCompare k, a ~ DMap k) => EventMerge !(Merge k) 
forall k . GCompare k => EventFan !(k a) !(Fan k) 
EventSwitch !(Switch a) 
EventCoincidence !(Coincidence a) 

Instances

newBox :: a -> IO (Box a) Source

data Behavior a Source

Constructors

BehaviorHold !(Hold a) 
BehaviorConst !a 
BehaviorPull !(Pull a) 

unsafeNewIORef :: a -> b -> IORef b Source

push :: (a -> EventM (Maybe b)) -> Event a -> Event b Source

data SomeMaybeIORef Source

Constructors

forall a . SomeMaybeIORef (IORef (Maybe a)) 

data SomeDMapIORef Source

Constructors

forall k . SomeDMapIORef (IORef (DMap k)) 

data SomeAssignment Source

Constructors

forall a . SomeAssignment (Hold a) a 

data DelayedMerge Source

Constructors

forall k . DelayedMerge (MergeSubscribed k) 

type WeakList a = [Weak a] Source

traverseAndCleanWeakList_ :: Monad m => (wa -> m (Maybe a)) -> [wa] -> (a -> m ()) -> m [wa] Source

propagate :: a -> [WeakSubscriber a] -> EventM [WeakSubscriber a] Source

Propagate everything at the current height

newtype EventSelector k Source

Constructors

EventSelector 

Fields

select :: forall a. k a -> Event a
 

runFrame :: EventM a -> IO a Source

Run an event action outside of a frame

data RootTrigger a Source

Constructors

forall k . GCompare k => RootTrigger (IORef [WeakSubscriber a], IORef (DMap k), k a) 

newtype SpiderEventHandle a Source

Constructors

SpiderEventHandle 

Fields

unEventHandle :: Event a
 

newEventWithTriggerIO :: forall a. (RootTrigger a -> IO (IO ())) -> IO (Event a) Source

newFanEventWithTriggerIO :: GCompare k => (forall a. k a -> RootTrigger a -> IO (IO ())) -> IO (EventSelector k) Source