Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Event x a = Event {
- unEvent :: Subscriber x a -> EventM x (EventSubscription x, Maybe a)
- data Dynamic x target p = Dynamic {
- dynamicCurrent :: !(Behavior x target)
- dynamicUpdated :: Event x p
- type Spider = SpiderTimeline Global
- newtype EventSelector x k = EventSelector {}
- newtype EventSelectorG x k v = EventSelectorG {}
- newtype EventSelectorInt x a = EventSelectorInt {}
- newtype Behavior x a = Behavior {
- readBehaviorTracked :: BehaviorM x a
- data SpiderTimeline x
- data Global
- newtype SpiderHost (x :: Type) a = SpiderHost {
- unSpiderHost :: IO a
- type SpiderEnv = SpiderTimeline
- newtype ReadPhase x a = ReadPhase (ResultM x a)
- data EventSubscription x = EventSubscription {
- _eventSubscription_unsubscribe :: !(IO ())
- _eventSubscription_subscribed :: !(EventSubscribed x)
- data EventSubscribed x = EventSubscribed {}
- data Subscriber x a = Subscriber {
- subscriberPropagate :: !(a -> EventM x ())
- subscriberInvalidateHeight :: !(Height -> IO ())
- subscriberRecalculateHeight :: !(Height -> IO ())
- newtype EventM x a = EventM {}
- class HasSpiderTimeline x where
- type ComputeM = EventM
- class MonadIO m => Defer a m where
- getDeferralQueue :: m (IORef [a])
- newtype SomeMergeInit x = SomeMergeInit {
- unSomeMergeInit :: EventM x ()
- data CacheSubscribed x a = CacheSubscribed {
- _cacheSubscribed_subscribers :: !(FastWeakBag (Subscriber x a))
- _cacheSubscribed_parent :: !(EventSubscription x)
- _cacheSubscribed_occurrence :: !(IORef (Maybe a))
- newtype Clear a = Clear (IORef (Maybe a))
- data Root x k = Root {
- rootOccurrence :: !(IORef (DMap k Identity))
- rootSubscribed :: !(IORef (DMap k (RootSubscribed x)))
- rootInit :: !(forall a. k a -> RootTrigger x a -> IO (IO ()))
- data Fan x k v = Fan {
- fanParent :: !(Event x (DMap k v))
- fanSubscribed :: !(IORef (Maybe (FanSubscribed x k v)))
- data Switch x a = Switch {
- switchParent :: !(Behavior x (Event x a))
- switchSubscribed :: !(IORef (Maybe (SwitchSubscribed x a)))
- data Coincidence x a = Coincidence {
- coincidenceParent :: !(Event x (Event x a))
- coincidenceSubscribed :: !(IORef (Maybe (CoincidenceSubscribed x a)))
- data Hold x p = Hold {
- holdValue :: !(IORef (PatchTarget p))
- holdInvalidators :: !(IORef [Weak (Invalidator x)])
- holdEvent :: Event x p
- holdParent :: !(IORef (Maybe (EventSubscription x)))
- newtype Dyn (x :: Type) p = Dyn {}
- newtype Height = Height {}
- data CoincidenceSubscribed x a = CoincidenceSubscribed {
- coincidenceSubscribedCachedSubscribed :: !(IORef (Maybe (CoincidenceSubscribed x a)))
- coincidenceSubscribedOccurrence :: !(IORef (Maybe a))
- coincidenceSubscribedSubscribers :: !(WeakBag (Subscriber x a))
- coincidenceSubscribedHeight :: !(IORef Height)
- coincidenceSubscribedOuter :: (Subscriber x (Event x a))
- coincidenceSubscribedOuterParent :: !(EventSubscription x)
- coincidenceSubscribedInnerParent :: !(IORef (Maybe (EventSubscribed x)))
- coincidenceSubscribedWeakSelf :: !(IORef (Weak (CoincidenceSubscribed x a)))
- data SomeResetCoincidence x = forall a. SomeResetCoincidence !(EventSubscription x) !(Maybe (CoincidenceSubscribed x a))
- data FanSubscribed x k v = FanSubscribed {
- fanSubscribedCachedSubscribed :: !(IORef (Maybe (FanSubscribed x k v)))
- fanSubscribedOccurrence :: !(IORef (Maybe (DMap k v)))
- fanSubscribedSubscribers :: !(IORef (DMap k (FanSubscribedChildren x k v)))
- fanSubscribedParent :: !(EventSubscription x)
- data SwitchSubscribed x a = SwitchSubscribed {
- switchSubscribedCachedSubscribed :: !(IORef (Maybe (SwitchSubscribed x a)))
- switchSubscribedOccurrence :: !(IORef (Maybe a))
- switchSubscribedHeight :: !(IORef Height)
- switchSubscribedSubscribers :: !(WeakBag (Subscriber x a))
- switchSubscribedOwnInvalidator :: !(Invalidator x)
- switchSubscribedOwnWeakInvalidator :: !(IORef (Weak (Invalidator x)))
- switchSubscribedBehaviorParents :: !(IORef [SomeBehaviorSubscribed x])
- switchSubscribedParent :: !(Behavior x (Event x a))
- switchSubscribedCurrentParent :: !(IORef (EventSubscription x))
- switchSubscribedWeakSelf :: !(IORef (Weak (SwitchSubscribed x a)))
- data RootSubscribed x a = forall k.GCompare k => RootSubscribed {
- rootSubscribedKey :: !(k a)
- rootSubscribedCachedSubscribed :: !(IORef (DMap k (RootSubscribed x)))
- rootSubscribedSubscribers :: !(WeakBag (Subscriber x a))
- rootSubscribedOccurrence :: !(IO (Maybe a))
- rootSubscribedUninit :: IO ()
- rootSubscribedWeakSelf :: !(IORef (Weak (RootSubscribed x a)))
- newtype BehaviorM x a = BehaviorM {
- unBehaviorM :: ReaderIO (BehaviorEnv x) a
- data Pull x a = Pull {
- pullValue :: !(IORef (Maybe (PullSubscribed x a)))
- pullCompute :: !(BehaviorM x a)
- newtype SomeBehaviorSubscribed x = SomeBehaviorSubscribed (Some (BehaviorSubscribed x))
- data PullSubscribed x a = PullSubscribed {
- pullSubscribedValue :: !a
- pullSubscribedInvalidators :: !(IORef [Weak (Invalidator x)])
- pullSubscribedOwnInvalidator :: !(Invalidator x)
- pullSubscribedParents :: ![SomeBehaviorSubscribed x]
- data SomeHoldInit x = forall p.Patch p => SomeHoldInit !(Hold x p)
- type DynamicS x p = Dynamic x (PatchTarget p) p
- data Invalidator x
- = forall a. InvalidatorPull (Pull x a)
- | forall a. InvalidatorSwitch (SwitchSubscribed x a)
- newtype SpiderTimelineEnv x = STE {
- unSTE :: SpiderTimelineEnv' x
- data SpiderTimelineEnv' x = SpiderTimelineEnv {
- _spiderTimeline_lock :: !(MVar ())
- _spiderTimeline_eventEnv :: !(EventEnv x)
- data EventEnv x = EventEnv {
- eventEnvAssignments :: !(IORef [SomeAssignment x])
- eventEnvHoldInits :: !(IORef [SomeHoldInit x])
- eventEnvDynInits :: !(IORef [SomeDynInit x])
- eventEnvMergeUpdates :: !(IORef [SomeMergeUpdate x])
- eventEnvMergeInits :: !(IORef [SomeMergeInit x])
- eventEnvClears :: !(IORef [Some Clear])
- eventEnvIntClears :: !(IORef [Some IntClear])
- eventEnvRootClears :: !(IORef [Some RootClear])
- eventEnvCurrentHeight :: !(IORef Height)
- eventEnvResetCoincidences :: !(IORef [SomeResetCoincidence x])
- eventEnvDelayedMerges :: !(IORef (IntMap [EventM x ()]))
- data SomeAssignment x = forall a. SomeAssignment !(IORef a) !(IORef [Weak (Invalidator x)]) a
- data SomeDynInit x = forall p.Patch p => SomeDynInit !(Dyn x p)
- data SomeMergeUpdate x = SomeMergeUpdate {
- _someMergeUpdate_update :: !(EventM x [EventSubscription x])
- _someMergeUpdate_invalidateHeight :: !(IO ())
- _someMergeUpdate_recalculateHeight :: !(IO ())
- newtype IntClear a = IntClear (IORef (IntMap a))
- newtype RootClear k = RootClear (IORef (DMap k Identity))
- class HasSpiderTimeline x => HasCurrentHeight x m | m -> x where
- getCurrentHeight :: m Height
- scheduleMerge :: Height -> EventM x () -> m ()
- type BehaviorEnv x = (Maybe (Weak (Invalidator x), IORef [SomeBehaviorSubscribed x]), IORef [SomeHoldInit x])
- data BehaviorSubscribed x a
- = forall p. BehaviorSubscribedHold (Hold x p)
- | BehaviorSubscribedPull (PullSubscribed x a)
- data RootTrigger x a = forall k.GCompare k => RootTrigger (WeakBag (Subscriber x a), IORef (DMap k Identity), k a)
- newtype MergeSubscribedParent x a = MergeSubscribedParent {}
- data MergeSubscribedParentWithMove x k a = MergeSubscribedParentWithMove {}
- data HeightBag = HeightBag {
- _heightBag_size :: !Int
- _heightBag_contents :: !(IntMap Word)
- data FanSubscribedChildren x k v a = FanSubscribedChildren {
- _fanSubscribedChildren_list :: !(WeakBag (Subscriber x (v a)))
- _fanSubscribedChildren_self :: !(k a, FanSubscribed x k v)
- _fanSubscribedChildren_weakSelf :: !(IORef (Weak (k a, FanSubscribed x k v)))
- data DynType x p
- = UnsafeDyn !(BehaviorM x (PatchTarget p), Event x p)
- | BuildDyn !(EventM x (PatchTarget p), Event x p)
- | HoldDyn !(Hold x p)
- type ResultM = EventM
- type WeakList a = [Weak a]
- type CanTrace x m = (HasSpiderTimeline x, MonadIO m)
- data EventLoopException = EventLoopException
- data FanInt x a = FanInt {
- _fanInt_subscribers :: !(FastMutableIntMap (FastWeakBag (Subscriber x a)))
- _fanInt_subscriptionRef :: !(IORef (EventSubscription x))
- _fanInt_occRef :: !(IORef (IntMap a))
- type MergeUpdateFunc k v x p s = (forall a. EventM x (k a) -> Subscriber x (v a)) -> IORef HeightBag -> DMap k s -> p -> EventM x ([EventSubscription x], DMap k s)
- type MergeInitFunc k v q x s = DMap k q -> (forall a. EventM x (k a) -> Subscriber x (v a)) -> EventM x (DMap k v, [Height], DMap k s)
- type MergeDestroyFunc k s = DMap k s -> IO ()
- type MergeGetSubscription x s = forall a. s a -> EventSubscription x
- data Merge x k v s = Merge {
- _merge_parentsRef :: !(IORef (DMap k s))
- _merge_heightBagRef :: !(IORef HeightBag)
- _merge_heightRef :: !(IORef Height)
- _merge_sub :: !(Subscriber x (DMap k v))
- _merge_accumRef :: !(IORef (DMap k v))
- data SomeSwitchSubscribed x = forall a. SomeSwitchSubscribed (SwitchSubscribed x a)
- newtype SpiderPullM (x :: Type) a = SpiderPullM (BehaviorM x a)
- newtype SpiderPushM (x :: Type) a = SpiderPushM (ComputeM x a)
- newtype SpiderHostFrame (x :: Type) a = SpiderHostFrame {
- runSpiderHostFrame :: EventM x a
- data SpiderEventHandle x a = SpiderEventHandle {}
- data LocalSpiderTimeline (x :: Type) s
- pattern SpiderEvent :: Event x a -> Event (SpiderTimeline x) a
- unSpiderEvent :: Event (SpiderTimeline x) a -> Event x a
- pattern SpiderBehavior :: Behavior x a -> Behavior (SpiderTimeline x) a
- unSpiderBehavior :: Behavior (SpiderTimeline x) a -> Behavior x a
- pattern SpiderDynamic :: DynamicS x (Identity a) -> Dynamic (SpiderTimeline x) a
- unSpiderDynamic :: Dynamic (SpiderTimeline x) a -> DynamicS x (Identity a)
- pattern SpiderIncremental :: DynamicS x p -> Incremental (SpiderTimeline x) p
- unSpiderIncremental :: Incremental (SpiderTimeline x) p -> DynamicS x p
- run :: forall x b. HasSpiderTimeline x => [DSum (RootTrigger x) Identity] -> ResultM x b -> SpiderHost x b
- trace :: CanTrace x m => proxy x -> String -> m ()
- traceM :: CanTrace x m => proxy x -> m String -> m ()
- defer :: Defer a m => a -> m ()
- wrap :: MonadIO m => (t -> EventSubscribed x) -> (Subscriber x a -> m (WeakBagTicket, t, Maybe a)) -> Subscriber x a -> m (EventSubscription x, Maybe a)
- mergeInt :: forall x a. HasSpiderTimeline x => DynamicS x (PatchIntMap (Event x a)) -> Event x (IntMap a)
- zipDynWith :: HasSpiderTimeline x => (a -> b -> c) -> DynamicS x (Identity a) -> DynamicS x (Identity b) -> DynamicS x (Identity c)
- runSpiderHost :: SpiderHost Global a -> IO a
- runSpiderHostForTimeline :: SpiderHost x a -> SpiderTimelineEnv x -> IO a
- newSpiderTimeline :: IO (Some SpiderTimelineEnv)
- withSpiderTimeline :: (forall x. HasSpiderTimeline x => SpiderTimelineEnv x -> IO r) -> IO r
- debugStrLn :: String -> IO ()
- push :: HasSpiderTimeline x => (a -> ComputeM x (Maybe b)) -> Event x a -> Event x b
- pushCheap :: HasSpiderTimeline x => (a -> ComputeM x (Maybe b)) -> Event x a -> Event x b
- pull :: BehaviorM x a -> Behavior x a
- mergeG :: forall k q x v. (HasSpiderTimeline x, GCompare k) => (forall a. q a -> Event x (v a)) -> DynamicS x (PatchDMap k q) -> Event x (DMap k v)
- fanG :: (HasSpiderTimeline x, GCompare k) => Event x (DMap k v) -> EventSelectorG x k v
- switch :: HasSpiderTimeline x => Behavior x (Event x a) -> Event x a
- coincidence :: HasSpiderTimeline x => Event x (Event x a) -> Event x a
- unsafeBuildDynamic :: BehaviorM x (PatchTarget p) -> Event x p -> Dyn x p
- fanInt :: HasSpiderTimeline x => Event x (IntMap a) -> EventSelectorInt x a
- hold :: (Patch p, Defer (SomeHoldInit x) m) => PatchTarget p -> Event x p -> m (Hold x p)
- buildDynamic :: (Defer (SomeDynInit x) m, Patch p) => EventM x (PatchTarget p) -> Event x p -> m (Dyn x p)
- headE :: (MonadIO m, Defer (SomeMergeInit x) m, HasSpiderTimeline x) => Event x a -> m (Event x a)
- now :: (MonadIO m, Defer (Some Clear) m, HasSpiderTimeline x) => m (Event x ())
- toAny :: a -> Any
- debugPropagate :: Bool
- debugInvalidateHeight :: Bool
- debugInvalidate :: Bool
- showNodeId :: a -> String
- showNodeId' :: Int -> String
- unsubscribe :: EventSubscription x -> IO ()
- subscribeAndRead :: Event x a -> Subscriber x a -> EventM x (EventSubscription x, Maybe a)
- cacheEvent :: forall x a. HasSpiderTimeline x => Event x a -> Event x a
- debugSubscriber' :: String -> Subscriber x a -> Subscriber x a
- terminalSubscriber :: (a -> EventM x ()) -> Subscriber x a
- subscribeAndReadHead :: HasSpiderTimeline x => Event x a -> Subscriber x a -> EventM x (EventSubscription x, Maybe a)
- subscribeAndReadNever :: EventM x (EventSubscription x, Maybe a)
- nowSpiderEventM :: HasSpiderTimeline x => EventM x (Event (SpiderTimeline x) ())
- scheduleClear :: Defer (Some Clear) m => IORef (Maybe a) -> m ()
- eventSubscribedNow :: EventSubscribed x
- propagateFast :: forall x a. HasSpiderTimeline x => a -> FastWeakBag (Subscriber x a) -> EventM x ()
- invalidateSubscriberHeight :: Height -> Subscriber x a -> IO ()
- recalculateSubscriberHeight :: Height -> Subscriber x a -> IO ()
- cacheSubscription :: Subscriber x a -> IORef (FastWeak (CacheSubscribed x a)) -> FastWeakTicket (CacheSubscribed x a) -> IO (EventSubscription x, Maybe a)
- subscribe :: Event x a -> Subscriber x a -> EventM x (EventSubscription x)
- eventRoot :: (GCompare k, HasSpiderTimeline x) => k a -> Root x k -> Event x a
- eventSubscribedRoot :: RootSubscribed x a -> EventSubscribed x
- getRootSubscribed :: forall k x a. (GCompare k, HasSpiderTimeline x) => k a -> Root x k -> Subscriber x a -> IO (WeakBagTicket, RootSubscribed x a, Maybe a)
- eventSubscribedNever :: EventSubscribed x
- eventNever :: Event x a
- eventFan :: (GCompare k, HasSpiderTimeline x) => k a -> Fan x k v -> Event x (v a)
- eventSubscribedFan :: FanSubscribed x k v -> EventSubscribed x
- getFanSubscribed :: (HasSpiderTimeline x, GCompare k) => k a -> Fan x k v -> Subscriber x (v a) -> EventM x (WeakBagTicket, FanSubscribed x k v, Maybe (v a))
- eventSwitch :: HasSpiderTimeline x => Switch x a -> Event x a
- eventSubscribedSwitch :: SwitchSubscribed x a -> EventSubscribed x
- getSwitchSubscribed :: HasSpiderTimeline x => Switch x a -> Subscriber x a -> EventM x (WeakBagTicket, SwitchSubscribed x a, Maybe a)
- eventCoincidence :: HasSpiderTimeline x => Coincidence x a -> Event x a
- eventSubscribedCoincidence :: CoincidenceSubscribed x a -> EventSubscribed x
- getCoincidenceSubscribed :: forall x a. HasSpiderTimeline x => Coincidence x a -> Subscriber x a -> EventM x (WeakBagTicket, CoincidenceSubscribed x a, Maybe a)
- eventHold :: Hold x p -> Event x p
- subscribeHoldEvent :: Hold x p -> Subscriber x p -> EventM x (EventSubscription x, Maybe p)
- eventDyn :: (HasSpiderTimeline x, Patch p) => Dyn x p -> Event x p
- getDynHold :: (Defer (SomeHoldInit x) m, Patch p) => Dyn x p -> m (Hold x p)
- subscribeCoincidenceInner :: HasSpiderTimeline x => Event x a -> Height -> CoincidenceSubscribed x a -> EventM x (Maybe a, Height, EventSubscribed x)
- newSubscriberCoincidenceInner :: forall x a. HasSpiderTimeline x => CoincidenceSubscribed x a -> IO (Subscriber x a)
- getEventSubscribedHeight :: EventSubscribed x -> IO Height
- newSubscriberHold :: (HasSpiderTimeline x, Patch p) => Hold x p -> IO (Subscriber x p)
- propagateSubscriberHold :: forall x p. (HasSpiderTimeline x, Patch p) => Hold x p -> p -> EventM x ()
- newSubscriberFan :: forall x k v. (HasSpiderTimeline x, GCompare k) => FanSubscribed x k v -> IO (Subscriber x (DMap k v))
- debugSubscriber :: String -> Subscriber x a -> IO (Subscriber x a)
- tracePropagate :: CanTrace x m => proxy x -> String -> m ()
- propagate :: forall x a. HasSpiderTimeline x => a -> WeakBag (Subscriber x a) -> EventM x ()
- newSubscriberSwitch :: forall x a. HasSpiderTimeline x => SwitchSubscribed x a -> IO (Subscriber x a)
- invalidHeight :: Height
- updateSwitchHeight :: Height -> SwitchSubscribed x a -> IO ()
- newSubscriberCoincidenceOuter :: forall x b. HasSpiderTimeline x => CoincidenceSubscribed x b -> IO (Subscriber x (Event x b))
- invalidateCoincidenceHeight :: CoincidenceSubscribed x a -> IO ()
- recalculateCoincidenceHeight :: CoincidenceSubscribed x a -> IO ()
- withIncreasedDepth :: proxy x -> m a -> m a
- zeroRef :: IORef Height
- behaviorHold :: Hold x p -> Behavior x (PatchTarget p)
- readHoldTracked :: Hold x p -> BehaviorM x (PatchTarget p)
- behaviorHoldIdentity :: Hold x (Identity a) -> Behavior x a
- behaviorConst :: a -> Behavior x a
- behaviorPull :: Pull x a -> Behavior x a
- askParentsRef :: BehaviorM x (Maybe (IORef [SomeBehaviorSubscribed x]))
- askInvalidator :: BehaviorM x (Maybe (Weak (Invalidator x)))
- newInvalidatorPull :: Pull x a -> IO (Invalidator x)
- mkWeakPtrWithDebug :: a -> String -> IO (Weak a)
- askBehaviorHoldInits :: BehaviorM x (IORef [SomeHoldInit x])
- behaviorDyn :: Patch p => Dyn x p -> Behavior x (PatchTarget p)
- readBehaviorUntracked :: Defer (SomeHoldInit x) m => Behavior x a -> m a
- runBehaviorM :: BehaviorM x a -> Maybe (Weak (Invalidator x), IORef [SomeBehaviorSubscribed x]) -> IORef [SomeHoldInit x] -> IO a
- dynamicHold :: Hold x p -> DynamicS x p
- dynamicHoldIdentity :: Hold x (Identity a) -> DynamicS x (Identity a)
- dynamicConst :: PatchTarget p -> DynamicS x p
- dynamicDyn :: (HasSpiderTimeline x, Patch p) => Dyn x p -> DynamicS x p
- dynamicDynIdentity :: HasSpiderTimeline x => Dyn x (Identity a) -> DynamicS x (Identity a)
- globalSpiderTimelineEnv :: SpiderTimelineEnv Global
- unsafeNewSpiderTimelineEnv :: forall x. IO (SpiderTimelineEnv x)
- runEventM :: EventM x a -> IO a
- asksEventEnv :: forall x a. HasSpiderTimeline x => (EventEnv x -> a) -> EventM x a
- putCurrentHeight :: HasSpiderTimeline x => Height -> EventM x ()
- scheduleIntClear :: Defer (Some IntClear) m => IORef (IntMap a) -> m ()
- scheduleRootClear :: Defer (Some RootClear) m => IORef (DMap k Identity) -> m ()
- getHoldEventSubscription :: forall p x. (HasSpiderTimeline x, Patch p) => Hold x p -> EventM x (EventSubscription x)
- heightBagEmpty :: HeightBag
- heightBagVerify :: HeightBag -> HeightBag
- heightBagSize :: HeightBag -> Int
- heightBagFromList :: [Height] -> HeightBag
- heightBagAdd :: Height -> HeightBag -> HeightBag
- heightBagRemove :: Height -> HeightBag -> HeightBag
- heightBagRemoveMaybe :: Height -> HeightBag -> Maybe HeightBag
- heightBagMax :: HeightBag -> Height
- zeroHeight :: Height
- newInvalidatorSwitch :: SwitchSubscribed x a -> IO (Invalidator x)
- newMapDyn :: HasSpiderTimeline x => (a -> b) -> DynamicS x (Identity a) -> DynamicS x (Identity b)
- runFrame :: forall x a. HasSpiderTimeline x => EventM x a -> SpiderHost x a
- scheduleMerge' :: HasSpiderTimeline x => Height -> IORef Height -> EventM x () -> EventM x ()
- debugFinalize :: Bool
- traceInvalidate :: String -> IO ()
- traceInvalidateHeight :: String -> IO ()
- whoCreatedIORef :: IORef a -> IO [String]
- groupByHead :: Eq a => [NonEmpty a] -> [(a, NonEmpty [a])]
- listsToForest :: Eq a => [[a]] -> Forest a
- showStacks :: [[String]] -> String
- filterStack :: String -> [String] -> [String]
- subscribeRootSubscribed :: RootSubscribed x a -> Subscriber x a -> IO WeakBagTicket
- cleanupRootSubscribed :: RootSubscribed x a -> IO ()
- newFanInt :: IO (FanInt x a)
- fanIntSubscribed :: FastWeakBagTicket k -> FanInt x a -> IO (EventSubscribed x)
- subscribeFanSubscribed :: GCompare k => k a -> FanSubscribed x k v -> Subscriber x (v a) -> IO WeakBagTicket
- cleanupFanSubscribed :: GCompare k => (k a, FanSubscribed x k v) -> IO ()
- subscribeSwitchSubscribed :: SwitchSubscribed x a -> Subscriber x a -> IO WeakBagTicket
- cleanupSwitchSubscribed :: SwitchSubscribed x a -> IO ()
- subscribeCoincidenceSubscribed :: CoincidenceSubscribed x a -> Subscriber x a -> IO WeakBagTicket
- cleanupCoincidenceSubscribed :: CoincidenceSubscribed x a -> IO ()
- mergeCheap :: forall k x q v. (HasSpiderTimeline x, GCompare k) => (forall a. q a -> Event x (v a)) -> DynamicS x (PatchDMap k q) -> Event x (DMap k v)
- mergeWithMove :: forall k v q x. (HasSpiderTimeline x, GCompare k) => (forall a. q a -> Event x (v a)) -> DynamicS x (PatchDMapWithMove k q) -> Event x (DMap k v)
- mergeCheapWithMove :: forall k x v q. (HasSpiderTimeline x, GCompare k) => (forall a. q a -> Event x (v a)) -> DynamicS x (PatchDMapWithMove k q) -> Event x (DMap k v)
- mergeGCheap' :: forall k v x p s q. (HasSpiderTimeline x, GCompare k, PatchTarget p ~ DMap k q) => MergeGetSubscription x s -> MergeInitFunc k v q x s -> MergeUpdateFunc k v x p s -> MergeDestroyFunc k s -> DynamicS x p -> Event x (DMap k v)
- invalidateMergeHeight :: Merge x k v s -> IO ()
- invalidateMergeHeight' :: IORef Height -> Subscriber x a -> IO ()
- revalidateMergeHeight :: Merge x k v s -> IO ()
- succHeight :: Height -> Height
- scheduleMergeSelf :: HasSpiderTimeline x => Merge x k v s -> Height -> EventM x ()
- checkCycle :: HasSpiderTimeline x => EventSubscribed x -> EventM x ()
- mergeSubscriber :: forall x k v s a. (HasSpiderTimeline x, GCompare k) => EventSubscribed x -> Merge x k v s -> EventM x (k a) -> Subscriber x (v a)
- updateMerge :: (HasSpiderTimeline x, GCompare k) => EventSubscribed x -> Merge x k v s -> MergeUpdateFunc k v x p s -> p -> SomeMergeUpdate x
- mergeIntCheap :: forall x a. HasSpiderTimeline x => DynamicS x (PatchIntMap (Event x a)) -> Event x (IntMap a)
- runHoldInits :: HasSpiderTimeline x => IORef [SomeHoldInit x] -> IORef [SomeDynInit x] -> IORef [SomeMergeInit x] -> EventM x ()
- initHold :: HasSpiderTimeline x => SomeHoldInit x -> EventM x ()
- initDyn :: HasSpiderTimeline x => SomeDynInit x -> EventM x ()
- newEventEnv :: IO (EventEnv x)
- clearEventEnv :: EventEnv x -> IO ()
- invalidate :: IORef [SomeSwitchSubscribed x] -> WeakList (Invalidator x) -> IO (WeakList (Invalidator x))
- calculateSwitchHeight :: SwitchSubscribed x a -> IO Height
- calculateCoincidenceHeight :: CoincidenceSubscribed x a -> IO Height
- holdSpiderEventM :: HasSpiderTimeline x => a -> Event (SpiderTimeline x) a -> EventM x (Behavior (SpiderTimeline x) a)
- holdDynSpiderEventM :: HasSpiderTimeline x => a -> Event (SpiderTimeline x) a -> EventM x (Dynamic (SpiderTimeline x) a)
- holdIncrementalSpiderEventM :: (HasSpiderTimeline x, Patch p) => PatchTarget p -> Event (SpiderTimeline x) p -> EventM x (Incremental (SpiderTimeline x) p)
- buildDynamicSpiderEventM :: HasSpiderTimeline x => SpiderPushM x a -> Event (SpiderTimeline x) a -> EventM x (Dynamic (SpiderTimeline x) a)
- newJoinDyn :: HasSpiderTimeline x => DynamicS x (Identity (DynamicS x (Identity a))) -> Dyn x (Identity a)
- mapDynamicSpider :: HasSpiderTimeline x => (a -> b) -> Dynamic (SpiderTimeline x) a -> Dynamic (SpiderTimeline x) b
- newEventWithTriggerIO :: forall x a. HasSpiderTimeline x => (RootTrigger x a -> IO (IO ())) -> IO (Event x a)
- newFanEventWithTriggerIO :: (HasSpiderTimeline x, GCompare k) => (forall a. k a -> RootTrigger x a -> IO (IO ())) -> IO (EventSelector x k)
- localSpiderTimeline :: proxy s -> SpiderTimelineEnv x -> SpiderTimelineEnv (LocalSpiderTimeline x s)
Documentation
Event | |
|
Instances
HasSpiderTimeline x => Functor (Event x) Source # | |
HasSpiderTimeline x => Align (Event x) Source # | |
Defined in Reflex.Spider.Internal | |
HasSpiderTimeline x => Semialign (Event x) Source # | |
HasSpiderTimeline x => Zip (Event x) Source # | |
HasSpiderTimeline x => Filterable (Event x) Source # | |
data Dynamic x target p Source #
Dynamic | |
|
type Spider = SpiderTimeline Global Source #
The default, global Spider environment
newtype EventSelector x k Source #
newtype EventSelectorG x k v Source #
newtype EventSelectorInt x a Source #
Behavior | |
|
data SpiderTimeline x Source #
Designates the default, global Spider timeline
Instances
A statically allocated SpiderTimeline
Instances
newtype SpiderHost (x :: Type) a Source #
The monad for actions that manipulate a Spider timeline identified by x
SpiderHost | |
|
Instances
type SpiderEnv = SpiderTimeline Source #
Deprecated: Use SpiderTimelineEnv
instead
SpiderEnv
is the old name for SpiderTimeline
newtype ReadPhase x a Source #
Instances
data EventSubscription x Source #
data EventSubscribed x Source #
data Subscriber x a Source #
Subscriber | |
|
Instances
class HasSpiderTimeline x where Source #
spiderTimeline :: SpiderTimelineEnv x Source #
Retrieve the current SpiderTimelineEnv
Instances
HasSpiderTimeline Global Source # | |
Defined in Reflex.Spider.Internal | |
Reifies s (SpiderTimelineEnv x) => HasSpiderTimeline (LocalSpiderTimeline x s) Source # | |
Defined in Reflex.Spider.Internal |
class MonadIO m => Defer a m where Source #
getDeferralQueue :: m (IORef [a]) Source #
Instances
newtype SomeMergeInit x Source #
SomeMergeInit | |
|
Instances
HasSpiderTimeline x => Defer (SomeMergeInit x) (EventM x) Source # | |
Defined in Reflex.Spider.Internal getDeferralQueue :: EventM x (IORef [SomeMergeInit x]) Source # |
data CacheSubscribed x a Source #
CacheSubscribed | |
|
Instances
HasSpiderTimeline x => Defer (Some Clear) (EventM x) Source # | |
Defined in Reflex.Spider.Internal |
Root | |
|
Fan | |
|
Switch | |
|
data Coincidence x a Source #
Coincidence | |
|
Hold | |
|
data CoincidenceSubscribed x a Source #
CoincidenceSubscribed | |
|
data SomeResetCoincidence x Source #
forall a. SomeResetCoincidence !(EventSubscription x) !(Maybe (CoincidenceSubscribed x a)) |
Instances
HasSpiderTimeline x => Defer (SomeResetCoincidence x) (EventM x) Source # | |
Defined in Reflex.Spider.Internal getDeferralQueue :: EventM x (IORef [SomeResetCoincidence x]) Source # |
data FanSubscribed x k v Source #
FanSubscribed | |
|
data SwitchSubscribed x a Source #
SwitchSubscribed | |
|
data RootSubscribed x a Source #
forall k.GCompare k => RootSubscribed | |
|
newtype BehaviorM x a Source #
BehaviorM | |
|
Instances
MonadFix (BehaviorM x) Source # | |
Defined in Reflex.Spider.Internal | |
MonadIO (BehaviorM x) Source # | |
Defined in Reflex.Spider.Internal | |
Applicative (BehaviorM x) Source # | |
Defined in Reflex.Spider.Internal | |
Functor (BehaviorM x) Source # | |
Monad (BehaviorM x) Source # | |
MonadReader (BehaviorEnv x) (BehaviorM x) Source # | |
Defined in Reflex.Spider.Internal ask :: BehaviorM x (BehaviorEnv x) # local :: (BehaviorEnv x -> BehaviorEnv x) -> BehaviorM x a -> BehaviorM x a # reader :: (BehaviorEnv x -> a) -> BehaviorM x a # | |
Defer (SomeHoldInit x) (BehaviorM x) Source # | |
Defined in Reflex.Spider.Internal getDeferralQueue :: BehaviorM x (IORef [SomeHoldInit x]) Source # |
Pull | |
|
newtype SomeBehaviorSubscribed x Source #
Instances
MonadReader (BehaviorEnv x) (BehaviorM x) Source # | |
Defined in Reflex.Spider.Internal ask :: BehaviorM x (BehaviorEnv x) # local :: (BehaviorEnv x -> BehaviorEnv x) -> BehaviorM x a -> BehaviorM x a # reader :: (BehaviorEnv x -> a) -> BehaviorM x a # |
data PullSubscribed x a Source #
PullSubscribed | |
|
data SomeHoldInit x Source #
forall p.Patch p => SomeHoldInit !(Hold x p) |
Instances
MonadReader (BehaviorEnv x) (BehaviorM x) Source # | |
Defined in Reflex.Spider.Internal ask :: BehaviorM x (BehaviorEnv x) # local :: (BehaviorEnv x -> BehaviorEnv x) -> BehaviorM x a -> BehaviorM x a # reader :: (BehaviorEnv x -> a) -> BehaviorM x a # | |
HasSpiderTimeline x => Defer (SomeHoldInit x) (EventM x) Source # | |
Defined in Reflex.Spider.Internal getDeferralQueue :: EventM x (IORef [SomeHoldInit x]) Source # | |
Defer (SomeHoldInit x) (BehaviorM x) Source # | |
Defined in Reflex.Spider.Internal getDeferralQueue :: BehaviorM x (IORef [SomeHoldInit x]) Source # |
type DynamicS x p = Dynamic x (PatchTarget p) p Source #
data Invalidator x Source #
forall a. InvalidatorPull (Pull x a) | |
forall a. InvalidatorSwitch (SwitchSubscribed x a) |
Instances
MonadReader (BehaviorEnv x) (BehaviorM x) Source # | |
Defined in Reflex.Spider.Internal ask :: BehaviorM x (BehaviorEnv x) # local :: (BehaviorEnv x -> BehaviorEnv x) -> BehaviorM x a -> BehaviorM x a # reader :: (BehaviorEnv x -> a) -> BehaviorM x a # |
newtype SpiderTimelineEnv x Source #
Stores all global data relevant to a particular Spider timeline; only one
value should exist for each type x
STE | |
|
Instances
GEq SpiderTimelineEnv Source # | |
Defined in Reflex.Spider.Internal geq :: forall (a :: k) (b :: k). SpiderTimelineEnv a -> SpiderTimelineEnv b -> Maybe (a :~: b) # | |
Eq (SpiderTimelineEnv x) Source # | |
Defined in Reflex.Spider.Internal (==) :: SpiderTimelineEnv x -> SpiderTimelineEnv x -> Bool # (/=) :: SpiderTimelineEnv x -> SpiderTimelineEnv x -> Bool # |
data SpiderTimelineEnv' x Source #
SpiderTimelineEnv | |
|
EventEnv | |
|
data SomeAssignment x Source #
forall a. SomeAssignment !(IORef a) !(IORef [Weak (Invalidator x)]) a |
Instances
HasSpiderTimeline x => Defer (SomeAssignment x) (EventM x) Source # | |
Defined in Reflex.Spider.Internal getDeferralQueue :: EventM x (IORef [SomeAssignment x]) Source # |
data SomeDynInit x Source #
forall p.Patch p => SomeDynInit !(Dyn x p) |
Instances
HasSpiderTimeline x => Defer (SomeDynInit x) (EventM x) Source # | |
Defined in Reflex.Spider.Internal getDeferralQueue :: EventM x (IORef [SomeDynInit x]) Source # |
data SomeMergeUpdate x Source #
SomeMergeUpdate | |
|
Instances
HasSpiderTimeline x => Defer (SomeMergeUpdate x) (EventM x) Source # | |
Defined in Reflex.Spider.Internal getDeferralQueue :: EventM x (IORef [SomeMergeUpdate x]) Source # |
Instances
HasSpiderTimeline x => Defer (Some IntClear) (EventM x) Source # | |
Defined in Reflex.Spider.Internal |
Instances
HasSpiderTimeline x => Defer (Some RootClear) (EventM x) Source # | |
Defined in Reflex.Spider.Internal |
class HasSpiderTimeline x => HasCurrentHeight x m | m -> x where Source #
getCurrentHeight :: m Height Source #
scheduleMerge :: Height -> EventM x () -> m () Source #
Instances
HasSpiderTimeline x => HasCurrentHeight x (EventM x) Source # | |
Defined in Reflex.Spider.Internal |
type BehaviorEnv x = (Maybe (Weak (Invalidator x), IORef [SomeBehaviorSubscribed x]), IORef [SomeHoldInit x]) Source #
data BehaviorSubscribed x a Source #
forall p. BehaviorSubscribedHold (Hold x p) | |
BehaviorSubscribedPull (PullSubscribed x a) |
data RootTrigger x a Source #
forall k.GCompare k => RootTrigger (WeakBag (Subscriber x a), IORef (DMap k Identity), k a) |
newtype MergeSubscribedParent x a Source #
data MergeSubscribedParentWithMove x k a Source #
HeightBag | |
|
data FanSubscribedChildren x k v a Source #
FanSubscribedChildren | |
|
UnsafeDyn !(BehaviorM x (PatchTarget p), Event x p) | |
BuildDyn !(EventM x (PatchTarget p), Event x p) | |
HoldDyn !(Hold x p) |
type CanTrace x m = (HasSpiderTimeline x, MonadIO m) Source #
data EventLoopException Source #
Instances
Exception EventLoopException Source # | |
Defined in Reflex.Spider.Internal | |
Show EventLoopException Source # | |
Defined in Reflex.Spider.Internal showsPrec :: Int -> EventLoopException -> ShowS # show :: EventLoopException -> String # showList :: [EventLoopException] -> ShowS # |
FanInt | |
|
type MergeUpdateFunc k v x p s = (forall a. EventM x (k a) -> Subscriber x (v a)) -> IORef HeightBag -> DMap k s -> p -> EventM x ([EventSubscription x], DMap k s) Source #
type MergeInitFunc k v q x s = DMap k q -> (forall a. EventM x (k a) -> Subscriber x (v a)) -> EventM x (DMap k v, [Height], DMap k s) Source #
type MergeDestroyFunc k s = DMap k s -> IO () Source #
type MergeGetSubscription x s = forall a. s a -> EventSubscription x Source #
Merge | |
|
data SomeSwitchSubscribed x Source #
forall a. SomeSwitchSubscribed (SwitchSubscribed x a) |
newtype SpiderPullM (x :: Type) a Source #
SpiderPullM (BehaviorM x a) |
Instances
newtype SpiderPushM (x :: Type) a Source #
SpiderPushM (ComputeM x a) |
Instances
newtype SpiderHostFrame (x :: Type) a Source #
Instances
data SpiderEventHandle x a Source #
data LocalSpiderTimeline (x :: Type) s Source #
Instances
Reifies s (SpiderTimelineEnv x) => HasSpiderTimeline (LocalSpiderTimeline x s) Source # | |
Defined in Reflex.Spider.Internal |
pattern SpiderEvent :: Event x a -> Event (SpiderTimeline x) a Source #
unSpiderEvent :: Event (SpiderTimeline x) a -> Event x a Source #
pattern SpiderBehavior :: Behavior x a -> Behavior (SpiderTimeline x) a Source #
unSpiderBehavior :: Behavior (SpiderTimeline x) a -> Behavior x a Source #
pattern SpiderDynamic :: DynamicS x (Identity a) -> Dynamic (SpiderTimeline x) a Source #
unSpiderDynamic :: Dynamic (SpiderTimeline x) a -> DynamicS x (Identity a) Source #
pattern SpiderIncremental :: DynamicS x p -> Incremental (SpiderTimeline x) p Source #
unSpiderIncremental :: Incremental (SpiderTimeline x) p -> DynamicS x p Source #
run :: forall x b. HasSpiderTimeline x => [DSum (RootTrigger x) Identity] -> ResultM x b -> SpiderHost x b Source #
wrap :: MonadIO m => (t -> EventSubscribed x) -> (Subscriber x a -> m (WeakBagTicket, t, Maybe a)) -> Subscriber x a -> m (EventSubscription x, Maybe a) Source #
mergeInt :: forall x a. HasSpiderTimeline x => DynamicS x (PatchIntMap (Event x a)) -> Event x (IntMap a) Source #
zipDynWith :: HasSpiderTimeline x => (a -> b -> c) -> DynamicS x (Identity a) -> DynamicS x (Identity b) -> DynamicS x (Identity c) Source #
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.
debugStrLn :: String -> IO () Source #
mergeG :: forall k q x v. (HasSpiderTimeline x, GCompare k) => (forall a. q a -> Event x (v a)) -> DynamicS x (PatchDMap k q) -> Event x (DMap k v) Source #
fanG :: (HasSpiderTimeline x, GCompare k) => Event x (DMap k v) -> EventSelectorG x k v Source #
coincidence :: HasSpiderTimeline x => Event x (Event x a) -> Event x a Source #
unsafeBuildDynamic :: BehaviorM x (PatchTarget p) -> Event x p -> Dyn x p Source #
fanInt :: HasSpiderTimeline x => Event x (IntMap a) -> EventSelectorInt x a Source #
hold :: (Patch p, Defer (SomeHoldInit x) m) => PatchTarget p -> Event x p -> m (Hold x p) Source #
buildDynamic :: (Defer (SomeDynInit x) m, Patch p) => EventM x (PatchTarget p) -> Event x p -> m (Dyn x p) Source #
headE :: (MonadIO m, Defer (SomeMergeInit x) m, HasSpiderTimeline x) => Event x a -> m (Event x a) Source #
showNodeId :: a -> String Source #
showNodeId' :: Int -> String Source #
unsubscribe :: EventSubscription x -> IO () Source #
subscribeAndRead :: Event x a -> Subscriber x a -> EventM x (EventSubscription x, Maybe a) Source #
cacheEvent :: forall x a. HasSpiderTimeline x => Event x a -> Event x a Source #
Construct an Event
whose value is guaranteed not to be recomputed
repeatedly
TODO: Try a caching strategy where we subscribe directly to the parent when there's only one subscriber, and then build our own FastWeakBag only when a second subscriber joins
debugSubscriber' :: String -> Subscriber x a -> Subscriber x a Source #
terminalSubscriber :: (a -> EventM x ()) -> Subscriber x a Source #
A subscriber that never triggers other Event
s
subscribeAndReadHead :: HasSpiderTimeline x => Event x a -> Subscriber x a -> EventM x (EventSubscription x, Maybe a) Source #
Subscribe to an Event only for the duration of one occurrence
subscribeAndReadNever :: EventM x (EventSubscription x, Maybe a) Source #
nowSpiderEventM :: HasSpiderTimeline x => EventM x (Event (SpiderTimeline x) ()) Source #
propagateFast :: forall x a. HasSpiderTimeline x => a -> FastWeakBag (Subscriber x a) -> EventM x () Source #
Propagate everything at the current height
invalidateSubscriberHeight :: Height -> Subscriber x a -> IO () Source #
recalculateSubscriberHeight :: Height -> Subscriber x a -> IO () Source #
cacheSubscription :: Subscriber x a -> IORef (FastWeak (CacheSubscribed x a)) -> FastWeakTicket (CacheSubscribed x a) -> IO (EventSubscription x, Maybe a) Source #
subscribe :: Event x a -> Subscriber x a -> EventM x (EventSubscription x) Source #
eventSubscribedRoot :: RootSubscribed x a -> EventSubscribed x Source #
getRootSubscribed :: forall k x a. (GCompare k, HasSpiderTimeline x) => k a -> Root x k -> Subscriber x a -> IO (WeakBagTicket, RootSubscribed x a, Maybe a) Source #
eventNever :: Event x a Source #
eventSubscribedFan :: FanSubscribed x k v -> EventSubscribed x Source #
getFanSubscribed :: (HasSpiderTimeline x, GCompare k) => k a -> Fan x k v -> Subscriber x (v a) -> EventM x (WeakBagTicket, FanSubscribed x k v, Maybe (v a)) Source #
eventSwitch :: HasSpiderTimeline x => Switch x a -> Event x a Source #
eventSubscribedSwitch :: SwitchSubscribed x a -> EventSubscribed x Source #
getSwitchSubscribed :: HasSpiderTimeline x => Switch x a -> Subscriber x a -> EventM x (WeakBagTicket, SwitchSubscribed x a, Maybe a) Source #
eventCoincidence :: HasSpiderTimeline x => Coincidence x a -> Event x a Source #
getCoincidenceSubscribed :: forall x a. HasSpiderTimeline x => Coincidence x a -> Subscriber x a -> EventM x (WeakBagTicket, CoincidenceSubscribed x a, Maybe a) Source #
subscribeHoldEvent :: Hold x p -> Subscriber x p -> EventM x (EventSubscription x, Maybe p) Source #
getDynHold :: (Defer (SomeHoldInit x) m, Patch p) => Dyn x p -> m (Hold x p) Source #
subscribeCoincidenceInner :: HasSpiderTimeline x => Event x a -> Height -> CoincidenceSubscribed x a -> EventM x (Maybe a, Height, EventSubscribed x) Source #
newSubscriberCoincidenceInner :: forall x a. HasSpiderTimeline x => CoincidenceSubscribed x a -> IO (Subscriber x a) Source #
newSubscriberHold :: (HasSpiderTimeline x, Patch p) => Hold x p -> IO (Subscriber x p) Source #
propagateSubscriberHold :: forall x p. (HasSpiderTimeline x, Patch p) => Hold x p -> p -> EventM x () Source #
newSubscriberFan :: forall x k v. (HasSpiderTimeline x, GCompare k) => FanSubscribed x k v -> IO (Subscriber x (DMap k v)) Source #
debugSubscriber :: String -> Subscriber x a -> IO (Subscriber x a) Source #
tracePropagate :: CanTrace x m => proxy x -> String -> m () Source #
propagate :: forall x a. HasSpiderTimeline x => a -> WeakBag (Subscriber x a) -> EventM x () Source #
Propagate everything at the current height
newSubscriberSwitch :: forall x a. HasSpiderTimeline x => SwitchSubscribed x a -> IO (Subscriber x a) Source #
updateSwitchHeight :: Height -> SwitchSubscribed x a -> IO () Source #
newSubscriberCoincidenceOuter :: forall x b. HasSpiderTimeline x => CoincidenceSubscribed x b -> IO (Subscriber x (Event x b)) Source #
invalidateCoincidenceHeight :: CoincidenceSubscribed x a -> IO () Source #
recalculateCoincidenceHeight :: CoincidenceSubscribed x a -> IO () Source #
withIncreasedDepth :: proxy x -> m a -> m a Source #
behaviorHold :: Hold x p -> Behavior x (PatchTarget p) Source #
readHoldTracked :: Hold x p -> BehaviorM x (PatchTarget p) Source #
behaviorConst :: a -> Behavior x a Source #
behaviorPull :: Pull x a -> Behavior x a Source #
askParentsRef :: BehaviorM x (Maybe (IORef [SomeBehaviorSubscribed x])) Source #
askInvalidator :: BehaviorM x (Maybe (Weak (Invalidator x))) Source #
newInvalidatorPull :: Pull x a -> IO (Invalidator x) Source #
askBehaviorHoldInits :: BehaviorM x (IORef [SomeHoldInit x]) Source #
behaviorDyn :: Patch p => Dyn x p -> Behavior x (PatchTarget p) Source #
readBehaviorUntracked :: Defer (SomeHoldInit x) m => Behavior x a -> m a Source #
runBehaviorM :: BehaviorM x a -> Maybe (Weak (Invalidator x), IORef [SomeBehaviorSubscribed x]) -> IORef [SomeHoldInit x] -> IO a Source #
dynamicHold :: Hold x p -> DynamicS x p Source #
dynamicConst :: PatchTarget p -> DynamicS x p Source #
dynamicDyn :: (HasSpiderTimeline x, Patch p) => Dyn x p -> DynamicS x p Source #
dynamicDynIdentity :: HasSpiderTimeline x => Dyn x (Identity a) -> DynamicS x (Identity a) Source #
unsafeNewSpiderTimelineEnv :: forall x. IO (SpiderTimelineEnv x) Source #
asksEventEnv :: forall x a. HasSpiderTimeline x => (EventEnv x -> a) -> EventM x a Source #
putCurrentHeight :: HasSpiderTimeline x => Height -> EventM x () Source #
getHoldEventSubscription :: forall p x. (HasSpiderTimeline x, Patch p) => Hold x p -> EventM x (EventSubscription x) Source #
heightBagVerify :: HeightBag -> HeightBag Source #
heightBagSize :: HeightBag -> Int Source #
heightBagFromList :: [Height] -> HeightBag Source #
heightBagMax :: HeightBag -> Height Source #
zeroHeight :: Height Source #
newInvalidatorSwitch :: SwitchSubscribed x a -> IO (Invalidator x) Source #
newMapDyn :: HasSpiderTimeline x => (a -> b) -> DynamicS x (Identity a) -> DynamicS x (Identity b) Source #
runFrame :: forall x a. HasSpiderTimeline x => EventM x a -> SpiderHost x a Source #
Run an event action outside of a frame
scheduleMerge' :: HasSpiderTimeline x => Height -> IORef Height -> EventM x () -> EventM x () Source #
debugFinalize :: Bool Source #
traceInvalidate :: String -> IO () Source #
traceInvalidateHeight :: String -> IO () Source #
listsToForest :: Eq a => [[a]] -> Forest a Source #
showStacks :: [[String]] -> String Source #
subscribeRootSubscribed :: RootSubscribed x a -> Subscriber x a -> IO WeakBagTicket Source #
cleanupRootSubscribed :: RootSubscribed x a -> IO () Source #
fanIntSubscribed :: FastWeakBagTicket k -> FanInt x a -> IO (EventSubscribed x) Source #
subscribeFanSubscribed :: GCompare k => k a -> FanSubscribed x k v -> Subscriber x (v a) -> IO WeakBagTicket Source #
cleanupFanSubscribed :: GCompare k => (k a, FanSubscribed x k v) -> IO () Source #
subscribeSwitchSubscribed :: SwitchSubscribed x a -> Subscriber x a -> IO WeakBagTicket Source #
cleanupSwitchSubscribed :: SwitchSubscribed x a -> IO () Source #
subscribeCoincidenceSubscribed :: CoincidenceSubscribed x a -> Subscriber x a -> IO WeakBagTicket Source #
cleanupCoincidenceSubscribed :: CoincidenceSubscribed x a -> IO () Source #
mergeCheap :: forall k x q v. (HasSpiderTimeline x, GCompare k) => (forall a. q a -> Event x (v a)) -> DynamicS x (PatchDMap k q) -> Event x (DMap k v) Source #
mergeWithMove :: forall k v q x. (HasSpiderTimeline x, GCompare k) => (forall a. q a -> Event x (v a)) -> DynamicS x (PatchDMapWithMove k q) -> Event x (DMap k v) Source #
mergeCheapWithMove :: forall k x v q. (HasSpiderTimeline x, GCompare k) => (forall a. q a -> Event x (v a)) -> DynamicS x (PatchDMapWithMove k q) -> Event x (DMap k v) Source #
mergeGCheap' :: forall k v x p s q. (HasSpiderTimeline x, GCompare k, PatchTarget p ~ DMap k q) => MergeGetSubscription x s -> MergeInitFunc k v q x s -> MergeUpdateFunc k v x p s -> MergeDestroyFunc k s -> DynamicS x p -> Event x (DMap k v) Source #
invalidateMergeHeight :: Merge x k v s -> IO () Source #
invalidateMergeHeight' :: IORef Height -> Subscriber x a -> IO () Source #
revalidateMergeHeight :: Merge x k v s -> IO () Source #
succHeight :: Height -> Height Source #
scheduleMergeSelf :: HasSpiderTimeline x => Merge x k v s -> Height -> EventM x () Source #
checkCycle :: HasSpiderTimeline x => EventSubscribed x -> EventM x () Source #
mergeSubscriber :: forall x k v s a. (HasSpiderTimeline x, GCompare k) => EventSubscribed x -> Merge x k v s -> EventM x (k a) -> Subscriber x (v a) Source #
updateMerge :: (HasSpiderTimeline x, GCompare k) => EventSubscribed x -> Merge x k v s -> MergeUpdateFunc k v x p s -> p -> SomeMergeUpdate x Source #
mergeIntCheap :: forall x a. HasSpiderTimeline x => DynamicS x (PatchIntMap (Event x a)) -> Event x (IntMap a) Source #
runHoldInits :: HasSpiderTimeline x => IORef [SomeHoldInit x] -> IORef [SomeDynInit x] -> IORef [SomeMergeInit x] -> EventM x () Source #
initHold :: HasSpiderTimeline x => SomeHoldInit x -> EventM x () Source #
initDyn :: HasSpiderTimeline x => SomeDynInit x -> EventM x () Source #
newEventEnv :: IO (EventEnv x) Source #
clearEventEnv :: EventEnv x -> IO () Source #
invalidate :: IORef [SomeSwitchSubscribed x] -> WeakList (Invalidator x) -> IO (WeakList (Invalidator x)) Source #
calculateSwitchHeight :: SwitchSubscribed x a -> IO Height Source #
holdSpiderEventM :: HasSpiderTimeline x => a -> Event (SpiderTimeline x) a -> EventM x (Behavior (SpiderTimeline x) a) Source #
holdDynSpiderEventM :: HasSpiderTimeline x => a -> Event (SpiderTimeline x) a -> EventM x (Dynamic (SpiderTimeline x) a) Source #
holdIncrementalSpiderEventM :: (HasSpiderTimeline x, Patch p) => PatchTarget p -> Event (SpiderTimeline x) p -> EventM x (Incremental (SpiderTimeline x) p) Source #
buildDynamicSpiderEventM :: HasSpiderTimeline x => SpiderPushM x a -> Event (SpiderTimeline x) a -> EventM x (Dynamic (SpiderTimeline x) a) Source #
newJoinDyn :: HasSpiderTimeline x => DynamicS x (Identity (DynamicS x (Identity a))) -> Dyn x (Identity a) Source #
mapDynamicSpider :: HasSpiderTimeline x => (a -> b) -> Dynamic (SpiderTimeline x) a -> Dynamic (SpiderTimeline x) b Source #
newEventWithTriggerIO :: forall x a. HasSpiderTimeline x => (RootTrigger x a -> IO (IO ())) -> IO (Event x a) Source #
newFanEventWithTriggerIO :: (HasSpiderTimeline x, GCompare k) => (forall a. k a -> RootTrigger x a -> IO (IO ())) -> IO (EventSelector x k) Source #
localSpiderTimeline :: proxy s -> SpiderTimelineEnv x -> SpiderTimelineEnv (LocalSpiderTimeline x s) Source #