| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Reflex.Pure
Contents
Description
This module provides a pure implementation of Reflex, which is intended to serve as a reference for the semantics of the Reflex class. All implementations of Reflex should produce the same results as this implementation, although performance and laziness/strictness may differ.
Documentation
A completely pure-functional Reflex timeline, identifying moments in time
with the type t.
Instances
data family Behavior t :: * -> * Source #
A container for a value that can change over time. Behaviors can be
sampled at will, but it is not possible to be notified when they change
Instances
data family Event t :: * -> * Source #
A stream of occurrences. During any given frame, an Event is either
occurring or not occurring; if it is occurring, it will contain a value of
the given type (its "occurrence type")
Instances
| Reflex t => Accumulator (t :: k) (Event t) Source # | |
Defined in Reflex.Class Methods accum :: (MonadHold t m, MonadFix m) => (a -> b -> a) -> a -> Event t b -> m (Event t a) Source # accumM :: (MonadHold t m, MonadFix m) => (a -> b -> PushM t a) -> a -> Event t b -> m (Event t a) Source # accumMaybe :: (MonadHold t m, MonadFix m) => (a -> b -> Maybe a) -> a -> Event t b -> m (Event t a) Source # accumMaybeM :: (MonadHold t m, MonadFix m) => (a -> b -> PushM t (Maybe a)) -> a -> Event t b -> m (Event t a) Source # mapAccum :: (MonadHold t m, MonadFix m) => (a -> b -> (a, c)) -> a -> Event t b -> m (Event t a, Event t c) Source # mapAccumM :: (MonadHold t m, MonadFix m) => (a -> b -> PushM t (a, c)) -> a -> Event t b -> m (Event t a, Event t c) Source # mapAccumMaybe :: (MonadHold t m, MonadFix m) => (a -> b -> (Maybe a, Maybe c)) -> a -> Event t b -> m (Event t a, Event t c) Source # mapAccumMaybeM :: (MonadHold t m, MonadFix m) => (a -> b -> PushM t (Maybe a, Maybe c)) -> a -> Event t b -> m (Event t a, Event t c) Source # | |
| Reflex t => Functor (Event t) Source # | |
| Reflex t => Apply (Event t) Source # |
|
| Reflex t => Plus (Event t) Source # | |
Defined in Reflex.Class | |
| Reflex t => Alt (Event t) Source # | Left-biased event union (prefers left event on simultaneous occurrence). |
| Reflex t => Bind (Event t) Source # |
|
| Reflex t => Align (Event t) Source # | |
| Reflex t => FunctorMaybe (Event t) Source # | |
| (Semigroup a, Reflex t) => Semigroup (Event t a) Source # | |
| (Semigroup a, Reflex t) => Monoid (Event t a) Source # | |
| data Event (Pure t :: *) a Source # | |
| data Event (ProfiledTimeline t :: *) a Source # | |
Defined in Reflex.Profiled | |
| data Event (SpiderTimeline x :: *) a Source # | |
Defined in Reflex.Spider.Internal | |
data family Dynamic t :: * -> * Source #
A container for a value that can change over time and allows
notifications on changes. Basically a combination of a Behavior and an
Event, with a rule that the Behavior will change if and only if the
Event fires.
Instances
data family Incremental t :: * -> * Source #
An Incremental is a more general form of a Dynamic.
Instead of always fully replacing the value, only parts of it can be patched.
This is only needed for performance critical code via mergeIncremental to make small
changes to large values.
Instances
| data Incremental (Pure t :: *) p Source # | |
Defined in Reflex.Pure | |
| data Incremental (ProfiledTimeline t :: *) p Source # | |
Defined in Reflex.Profiled | |
| data Incremental (SpiderTimeline x :: *) p Source # | |
Defined in Reflex.Spider.Internal | |