reflex-0.6.2.3: Higher-order Functional Reactive Programming

Safe HaskellNone
LanguageHaskell98

Reflex.Spider

Contents

Description

 
Synopsis

Documentation

type Spider = SpiderTimeline Global Source #

The default, global Spider environment

data SpiderTimeline x Source #

Designates the default, global Spider timeline

Instances
HasSpiderTimeline x => Reflex (SpiderTimeline x :: Type) Source # 
Instance details

Defined in Reflex.Spider.Internal

Methods

never :: Event (SpiderTimeline x) a Source #

constant :: a -> Behavior (SpiderTimeline x) a Source #

push :: (a -> PushM (SpiderTimeline x) (Maybe b)) -> Event (SpiderTimeline x) a -> Event (SpiderTimeline x) b Source #

pushCheap :: (a -> PushM (SpiderTimeline x) (Maybe b)) -> Event (SpiderTimeline x) a -> Event (SpiderTimeline x) b Source #

pull :: PullM (SpiderTimeline x) a -> Behavior (SpiderTimeline x) a Source #

mergeG :: GCompare k => (forall (a :: k). q a -> Event (SpiderTimeline x) (v a)) -> DMap k q -> Event (SpiderTimeline x) (DMap k v) Source #

fanG :: GCompare k => Event (SpiderTimeline x) (DMap k v) -> EventSelectorG (SpiderTimeline x) k v Source #

switch :: Behavior (SpiderTimeline x) (Event (SpiderTimeline x) a) -> Event (SpiderTimeline x) a Source #

coincidence :: Event (SpiderTimeline x) (Event (SpiderTimeline x) a) -> Event (SpiderTimeline x) a Source #

current :: Dynamic (SpiderTimeline x) a -> Behavior (SpiderTimeline x) a Source #

updated :: Dynamic (SpiderTimeline x) a -> Event (SpiderTimeline x) a Source #

unsafeBuildDynamic :: PullM (SpiderTimeline x) a -> Event (SpiderTimeline x) a -> Dynamic (SpiderTimeline x) a Source #

unsafeBuildIncremental :: Patch p => PullM (SpiderTimeline x) (PatchTarget p) -> Event (SpiderTimeline x) p -> Incremental (SpiderTimeline x) p Source #

mergeIncrementalG :: GCompare k => (forall (a :: k). q a -> Event (SpiderTimeline x) (v a)) -> Incremental (SpiderTimeline x) (PatchDMap k q) -> Event (SpiderTimeline x) (DMap k v) Source #

mergeIncrementalWithMoveG :: GCompare k => (forall (a :: k). q a -> Event (SpiderTimeline x) (v a)) -> Incremental (SpiderTimeline x) (PatchDMapWithMove k q) -> Event (SpiderTimeline x) (DMap k v) Source #

currentIncremental :: Patch p => Incremental (SpiderTimeline x) p -> Behavior (SpiderTimeline x) (PatchTarget p) Source #

updatedIncremental :: Patch p => Incremental (SpiderTimeline x) p -> Event (SpiderTimeline x) p Source #

incrementalToDynamic :: Patch p => Incremental (SpiderTimeline x) p -> Dynamic (SpiderTimeline x) (PatchTarget p) Source #

behaviorCoercion :: Coercion a b -> Coercion (Behavior (SpiderTimeline x) a) (Behavior (SpiderTimeline x) b) Source #

eventCoercion :: Coercion a b -> Coercion (Event (SpiderTimeline x) a) (Event (SpiderTimeline x) b) Source #

dynamicCoercion :: Coercion a b -> Coercion (Dynamic (SpiderTimeline x) a) (Dynamic (SpiderTimeline x) b) Source #

incrementalCoercion :: Coercion (PatchTarget a) (PatchTarget b) -> Coercion a b -> Coercion (Incremental (SpiderTimeline x) a) (Incremental (SpiderTimeline x) b) Source #

mergeIntIncremental :: Incremental (SpiderTimeline x) (PatchIntMap (Event (SpiderTimeline x) a)) -> Event (SpiderTimeline x) (IntMap a) Source #

fanInt :: Event (SpiderTimeline x) (IntMap a) -> EventSelectorInt (SpiderTimeline x) a Source #

HasSpiderTimeline x => MonadHold (SpiderTimeline x :: Type) (SpiderHostFrame x) Source # 
Instance details

Defined in Reflex.Spider.Internal

HasSpiderTimeline x => MonadHold (SpiderTimeline x :: Type) (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

HasSpiderTimeline x => MonadHold (SpiderTimeline x :: Type) (SpiderPushM x) Source # 
Instance details

Defined in Reflex.Spider.Internal

HasSpiderTimeline x => MonadSample (SpiderTimeline x :: Type) (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

HasSpiderTimeline x => MonadSample (SpiderTimeline x :: Type) (SpiderHostFrame x) Source # 
Instance details

Defined in Reflex.Spider.Internal

HasSpiderTimeline x => MonadSample (SpiderTimeline x :: Type) (SpiderPushM x) Source # 
Instance details

Defined in Reflex.Spider.Internal

MonadSample (SpiderTimeline x :: Type) (SpiderPullM x) Source # 
Instance details

Defined in Reflex.Spider.Internal

HasSpiderTimeline x => MonadHold (SpiderTimeline x :: Type) (ReadPhase x) Source # 
Instance details

Defined in Reflex.Spider.Internal

HasSpiderTimeline x => MonadHold (SpiderTimeline x :: Type) (EventM x) Source # 
Instance details

Defined in Reflex.Spider.Internal

HasSpiderTimeline x => MonadSample (SpiderTimeline x :: Type) (ReadPhase x) Source # 
Instance details

Defined in Reflex.Spider.Internal

HasSpiderTimeline x => MonadSample (SpiderTimeline x :: Type) (EventM x) Source # 
Instance details

Defined in Reflex.Spider.Internal

Methods

sample :: Behavior (SpiderTimeline x) a -> EventM x a Source #

HasSpiderTimeline x => Monad (Dynamic (SpiderTimeline x)) Source # 
Instance details

Defined in Reflex.Spider.Internal

HasSpiderTimeline x => Functor (Dynamic (SpiderTimeline x)) Source # 
Instance details

Defined in Reflex.Spider.Internal

Methods

fmap :: (a -> b) -> Dynamic (SpiderTimeline x) a -> Dynamic (SpiderTimeline x) b #

(<$) :: a -> Dynamic (SpiderTimeline x) b -> Dynamic (SpiderTimeline x) a #

HasSpiderTimeline x => Applicative (Dynamic (SpiderTimeline x)) Source # 
Instance details

Defined in Reflex.Spider.Internal

HasSpiderTimeline x => ReflexHost (SpiderTimeline x) Source # 
Instance details

Defined in Reflex.Spider.Internal

HasSpiderTimeline x => MonadReflexHost (SpiderTimeline x) (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

Associated Types

type ReadPhase (SpiderHost x) :: Type -> Type Source #

MonadReflexCreateTrigger (SpiderTimeline x) (SpiderHostFrame x) Source # 
Instance details

Defined in Reflex.Spider.Internal

MonadReflexCreateTrigger (SpiderTimeline x) (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

HasSpiderTimeline x => MonadSubscribeEvent (SpiderTimeline x) (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

HasSpiderTimeline x => MonadSubscribeEvent (SpiderTimeline x) (SpiderHostFrame x) Source # 
Instance details

Defined in Reflex.Spider.Internal

NotReady (SpiderTimeline x) (SpiderHostFrame x) Source # 
Instance details

Defined in Reflex.Spider.Internal

HasSpiderTimeline x => MonadReadEvent (SpiderTimeline x) (ReadPhase x) Source # 
Instance details

Defined in Reflex.Spider.Internal

newtype Behavior (SpiderTimeline x :: Type) a Source # 
Instance details

Defined in Reflex.Spider.Internal

newtype Event (SpiderTimeline x :: Type) a Source # 
Instance details

Defined in Reflex.Spider.Internal

newtype Dynamic (SpiderTimeline x :: Type) a Source # 
Instance details

Defined in Reflex.Spider.Internal

newtype Incremental (SpiderTimeline x :: Type) p Source # 
Instance details

Defined in Reflex.Spider.Internal

type PushM (SpiderTimeline x :: Type) Source # 
Instance details

Defined in Reflex.Spider.Internal

type PullM (SpiderTimeline x :: Type) Source # 
Instance details

Defined in Reflex.Spider.Internal

type EventTrigger (SpiderTimeline x) Source # 
Instance details

Defined in Reflex.Spider.Internal

type EventHandle (SpiderTimeline x) Source # 
Instance details

Defined in Reflex.Spider.Internal

type HostFrame (SpiderTimeline x) Source # 
Instance details

Defined in Reflex.Spider.Internal

data Global Source #

A statically allocated SpiderTimeline

data SpiderHost (x :: Type) a Source #

The monad for actions that manipulate a Spider timeline identified by x

Instances
Monad (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

Methods

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

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

return :: a -> SpiderHost x a #

fail :: String -> SpiderHost x a #

Functor (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

Methods

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

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

MonadFix (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

Methods

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

Applicative (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

Methods

pure :: a -> SpiderHost x a #

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

liftA2 :: (a -> b -> c) -> SpiderHost x a -> SpiderHost x b -> SpiderHost x c #

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

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

MonadIO (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

Methods

liftIO :: IO a -> SpiderHost x a #

MonadException (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

Methods

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

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

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

MonadAsyncException (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

Methods

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

MonadRef (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

Associated Types

type Ref (SpiderHost x) :: Type -> Type #

Methods

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

readRef :: Ref (SpiderHost x) a -> SpiderHost x a #

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

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

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

MonadAtomicRef (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

Methods

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

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

HasSpiderTimeline x => MonadHold (SpiderTimeline x :: Type) (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

HasSpiderTimeline x => MonadSample (SpiderTimeline x :: Type) (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

HasSpiderTimeline x => MonadReflexHost (SpiderTimeline x) (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

Associated Types

type ReadPhase (SpiderHost x) :: Type -> Type Source #

MonadReflexCreateTrigger (SpiderTimeline x) (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

HasSpiderTimeline x => MonadSubscribeEvent (SpiderTimeline x) (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

type Ref (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

type Ref (SpiderHost x) = Ref IO
type ReadPhase (SpiderHost x) Source # 
Instance details

Defined in Reflex.Spider.Internal

runSpiderHost :: SpiderHost Global a -> IO a Source #

Run an action affecting the global Spider timeline; this will be guarded by a mutex for that timeline

runSpiderHostForTimeline :: SpiderHost x a -> SpiderTimelineEnv x -> IO a Source #

Run an action affecting a given Spider timeline; this will be guarded by a mutex for that timeline

newSpiderTimeline :: IO (Some SpiderTimelineEnv) Source #

Create a new SpiderTimelineEnv

withSpiderTimeline :: (forall x. HasSpiderTimeline x => SpiderTimelineEnv x -> IO r) -> IO r Source #

Pass a new timeline to the given function.

Deprecated

type SpiderEnv = SpiderTimeline Source #

Deprecated: Use SpiderTimelineEnv instead

SpiderEnv is the old name for SpiderTimeline