@@ -68,6 +68,7 @@ module Reflex.Class
68 , switchHoldPromptOnly
68 , switchHoldPromptOnly
69 -- ** Using 'Event's to sample 'Behavior's
69 -- ** Using 'Event's to sample 'Behavior's
72 , attachWith
73 , attachWith
73 , attachWithMaybe
74 , attachWithMaybe
@@ -557,6 +558,12 @@ instance Reflex t => Plus (Event t) where
557tag :: Reflex t => Behavior t b -> Event t a -> Event t b
558tag :: Reflex t => Behavior t b -> Event t a -> Event t b
558tag b = pushAlways $ \_ -> sample b
559tag b = pushAlways $ \_ -> sample b
561+-- | Replace each occurrence value of the 'Event' with the value of the
562+-- 'Behavior' at that time; if it is 'Just', fire with the contained value; if
563+-- it is 'Nothing', drop the occurrence.
564+tagMaybe :: Reflex t => Behavior t (Maybe b) -> Event t a -> Event t b
565+tagMaybe b = push $ \_ -> sample b
560-- | Create a new 'Event' that combines occurrences of supplied 'Event' with the
567-- | Create a new 'Event' that combines occurrences of supplied 'Event' with the
561-- current value of the 'Behavior'.
568-- current value of the 'Behavior'.
562attach :: Reflex t => Behavior t a -> Event t b -> Event t (a, b)
569attach :: Reflex t => Behavior t a -> Event t b -> Event t (a, b)