reflex-0.4.0.1: 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 Root k Source #

Constructors

Root 

Fields

data SomeHoldInit Source #

Constructors

SomeHoldInit (Event a) (Hold a) 

newtype EventM a Source #

Constructors

EventM 

Instances

Monad EventM Source # 

Methods

(>>=) :: EventM a -> (a -> EventM b) -> EventM b #

(>>) :: EventM a -> EventM b -> EventM b #

return :: a -> EventM a #

fail :: String -> EventM a #

Functor EventM Source # 

Methods

fmap :: (a -> b) -> EventM a -> EventM b #

(<$) :: a -> EventM b -> EventM a #

MonadFix EventM Source # 

Methods

mfix :: (a -> EventM a) -> EventM a #

Applicative EventM Source # 

Methods

pure :: a -> EventM a #

(<*>) :: EventM (a -> b) -> EventM a -> EventM b #

(*>) :: EventM a -> EventM b -> EventM b #

(<*) :: EventM a -> EventM b -> EventM a #

MonadIO EventM Source # 

Methods

liftIO :: IO a -> EventM a #

MonadException EventM Source # 

Methods

throw :: Exception e => e -> EventM a #

catch :: Exception e => EventM a -> (e -> EventM a) -> EventM a #

finally :: EventM a -> EventM b -> EventM a #

MonadAsyncException EventM Source # 

Methods

mask :: ((forall a. EventM a -> EventM a) -> EventM b) -> EventM b #

MonadRef EventM Source # 

Associated Types

type Ref (EventM :: * -> *) :: * -> * #

Methods

newRef :: a -> EventM (Ref EventM a) #

readRef :: Ref EventM a -> EventM a #

writeRef :: Ref EventM a -> a -> EventM () #

modifyRef :: Ref EventM a -> (a -> a) -> EventM () #

modifyRef' :: Ref EventM a -> (a -> a) -> EventM () #

MonadAtomicRef EventM Source # 

Methods

atomicModifyRef :: Ref EventM a -> (a -> (a, b)) -> EventM b #

atomicModifyRef' :: Ref EventM a -> (a -> (a, b)) -> EventM b #

MonadHold Spider EventM Source # 

Methods

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

MonadSample Spider EventM Source # 

Methods

sample :: Behavior Spider a -> EventM a Source #

type Ref EventM Source # 
type Ref EventM = Ref IO

data Push a b Source #

Constructors

Push 

Fields

data Merge k Source #

Constructors

Merge 

data FanSubscriberKey k a where Source #

Constructors

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

Instances

GCompare * k => GCompare * (FanSubscriberKey k) Source # 

Methods

gcompare :: f a -> f b -> GOrdering (FanSubscriberKey k) a b #

GEq * k => GEq * (FanSubscriberKey k) Source # 

Methods

geq :: f a -> f b -> Maybe ((FanSubscriberKey k := a) b) #

data Fan k Source #

Constructors

Fan 

data Switch a Source #

Constructors

Switch 

data Box a Source #

Constructors

Box 

Fields

data Event a Source #

Constructors

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

Instances

Functor Event Source # 

Methods

fmap :: (a -> b) -> Event a -> Event b #

(<$) :: a -> Event b -> Event a #

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

data Behavior a Source #

Constructors

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

Instances

Functor Behavior Source # 

Methods

fmap :: (a -> b) -> Behavior a -> Behavior b #

(<$) :: a -> Behavior b -> Behavior a #

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

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

data SomeAssignment Source #

Constructors

SomeAssignment (Hold a) a 

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

runFrame :: EventM a -> IO a Source #

Run an event action outside of a frame

data Spider Source #

Instances

Reflex Spider Source # 
ReflexHost Spider Source # 

Associated Types

type EventTrigger Spider :: * -> * Source #

type EventHandle Spider :: * -> * Source #

type HostFrame Spider :: * -> * Source #

MonadHold Spider ReadPhase Source # 

Methods

hold :: a -> Event Spider a -> ReadPhase (Behavior Spider a) Source #

MonadHold Spider SpiderHostFrame Source # 
MonadHold Spider SpiderHost Source # 

Methods

hold :: a -> Event Spider a -> SpiderHost (Behavior Spider a) Source #

MonadHold Spider EventM Source # 

Methods

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

MonadSample Spider ReadPhase Source # 
MonadSample Spider SpiderHostFrame Source # 
MonadSample Spider SpiderHost Source # 
MonadSample Spider EventM Source # 

Methods

sample :: Behavior Spider a -> EventM a Source #

MonadSample Spider BehaviorM Source # 
MonadReflexHost Spider SpiderHost Source # 
MonadReflexCreateTrigger Spider SpiderHostFrame Source # 
MonadReflexCreateTrigger Spider SpiderHost Source # 
MonadReadEvent Spider ReadPhase Source # 
MonadSubscribeEvent Spider SpiderHostFrame Source # 
MonadSubscribeEvent Spider SpiderHost Source # 
data Behavior Spider Source # 
data Event Spider Source # 
type PushM Spider Source # 
type PullM Spider Source # 
type EventTrigger Spider Source # 
type EventHandle Spider Source # 
type HostFrame Spider Source # 

data RootTrigger a Source #

Constructors

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

newtype SpiderEventHandle a Source #

Constructors

SpiderEventHandle 

Fields

newtype SpiderHost a Source #

Constructors

SpiderHost 

Fields

Instances

Monad SpiderHost Source # 

Methods

(>>=) :: SpiderHost a -> (a -> SpiderHost b) -> SpiderHost b #

(>>) :: SpiderHost a -> SpiderHost b -> SpiderHost b #

return :: a -> SpiderHost a #

fail :: String -> SpiderHost a #

Functor SpiderHost Source # 

Methods

fmap :: (a -> b) -> SpiderHost a -> SpiderHost b #

(<$) :: a -> SpiderHost b -> SpiderHost a #

MonadFix SpiderHost Source # 

Methods

mfix :: (a -> SpiderHost a) -> SpiderHost a #

Applicative SpiderHost Source # 

Methods

pure :: a -> SpiderHost a #

(<*>) :: SpiderHost (a -> b) -> SpiderHost a -> SpiderHost b #

(*>) :: SpiderHost a -> SpiderHost b -> SpiderHost b #

(<*) :: SpiderHost a -> SpiderHost b -> SpiderHost a #

MonadIO SpiderHost Source # 

Methods

liftIO :: IO a -> SpiderHost a #

MonadException SpiderHost Source # 

Methods

throw :: Exception e => e -> SpiderHost a #

catch :: Exception e => SpiderHost a -> (e -> SpiderHost a) -> SpiderHost a #

finally :: SpiderHost a -> SpiderHost b -> SpiderHost a #

MonadAsyncException SpiderHost Source # 

Methods

mask :: ((forall a. SpiderHost a -> SpiderHost a) -> SpiderHost b) -> SpiderHost b #

MonadRef SpiderHost Source # 

Associated Types

type Ref (SpiderHost :: * -> *) :: * -> * #

Methods

newRef :: a -> SpiderHost (Ref SpiderHost a) #

readRef :: Ref SpiderHost a -> SpiderHost a #

writeRef :: Ref SpiderHost a -> a -> SpiderHost () #

modifyRef :: Ref SpiderHost a -> (a -> a) -> SpiderHost () #

modifyRef' :: Ref SpiderHost a -> (a -> a) -> SpiderHost () #

MonadAtomicRef SpiderHost Source # 

Methods

atomicModifyRef :: Ref SpiderHost a -> (a -> (a, b)) -> SpiderHost b #

atomicModifyRef' :: Ref SpiderHost a -> (a -> (a, b)) -> SpiderHost b #

MonadHold Spider SpiderHost Source # 

Methods

hold :: a -> Event Spider a -> SpiderHost (Behavior Spider a) Source #

MonadSample Spider SpiderHost Source # 
MonadReflexHost Spider SpiderHost Source # 
MonadReflexCreateTrigger Spider SpiderHost Source # 
MonadSubscribeEvent Spider SpiderHost Source # 
type Ref SpiderHost Source # 
type ReadPhase SpiderHost Source # 

newtype SpiderHostFrame a Source #

Constructors

SpiderHostFrame 

Instances

Monad SpiderHostFrame Source # 
Functor SpiderHostFrame Source # 

Methods

fmap :: (a -> b) -> SpiderHostFrame a -> SpiderHostFrame b #

(<$) :: a -> SpiderHostFrame b -> SpiderHostFrame a #

MonadFix SpiderHostFrame Source # 

Methods

mfix :: (a -> SpiderHostFrame a) -> SpiderHostFrame a #

Applicative SpiderHostFrame Source # 
MonadIO SpiderHostFrame Source # 

Methods

liftIO :: IO a -> SpiderHostFrame a #

MonadException SpiderHostFrame Source # 
MonadAsyncException SpiderHostFrame Source # 

Methods

mask :: ((forall a. SpiderHostFrame a -> SpiderHostFrame a) -> SpiderHostFrame b) -> SpiderHostFrame b #

MonadRef SpiderHostFrame Source # 
MonadAtomicRef SpiderHostFrame Source # 

Methods

atomicModifyRef :: Ref SpiderHostFrame a -> (a -> (a, b)) -> SpiderHostFrame b #

atomicModifyRef' :: Ref SpiderHostFrame a -> (a -> (a, b)) -> SpiderHostFrame b #

MonadHold Spider SpiderHostFrame Source # 
MonadSample Spider SpiderHostFrame Source # 
MonadReflexCreateTrigger Spider SpiderHostFrame Source # 
MonadSubscribeEvent Spider SpiderHostFrame Source # 
type Ref SpiderHostFrame Source # 

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 #