on develop help sign in
Update docs for `hold` to make the delay clearer
7cbc8dcRyan Trinkle
src/Reflex/Class.hs+1−1
@@ -58,7 +58,7 @@ class (Applicative m, Monad m) => MonadSample t m | m -> t where
58 sample :: Behavior t a -> m a
58 sample :: Behavior t a -> m a
59
59
60class MonadSample t m => MonadHold t m where
60class MonadSample t m => MonadHold t m where
61− -- | Create a new Behavior whose value will initially be equal to the given value and will be updated whenever the given Event occurs
61+ -- | Create a new Behavior whose value will initially be equal to the given value and will be updated whenever the given Event occurs. The update takes effect immediately after the Event occurs; if the occurrence that sets the Behavior (or one that is simultaneous with it) is used to sample the Behavior, it will see the *old* value of the Behavior, not the new one.
62 hold :: a -> Event t a -> m (Behavior t a)
62 hold :: a -> Event t a -> m (Behavior t a)
63
63
64newtype EventSelector t k = EventSelector { select :: forall a. k a -> Event t a }
64newtype EventSelector t k = EventSelector { select :: forall a. k a -> Event t a }