@@ -543,7 +543,7 @@ instance Reflex t => Plus (Event t) where
543tag :: Reflex t => Behavior t b -> Event t a -> Event t b
543tag :: Reflex t => Behavior t b -> Event t a -> Event t b
544tag b = pushAlways $ \_ -> sample b
544tag b = pushAlways $ \_ -> sample b
546−-- | Create a new 'Event' that combines occurences of supplied 'Event' with the
546+-- | Create a new 'Event' that combines occurrences of supplied 'Event' with the
547-- current value of the 'Behavior'.
547-- current value of the 'Behavior'.
548attach :: Reflex t => Behavior t a -> Event t b -> Event t (a, b)
548attach :: Reflex t => Behavior t a -> Event t b -> Event t (a, b)
549attach = attachWith (,)
549attach = attachWith (,)
@@ -553,19 +553,19 @@ attach = attachWith (,)
553attachWith :: Reflex t => (a -> b -> c) -> Behavior t a -> Event t b -> Event t c
553attachWith :: Reflex t => (a -> b -> c) -> Behavior t a -> Event t b -> Event t c
554attachWith f = attachWithMaybe $ \a b -> Just $ f a b
554attachWith f = attachWithMaybe $ \a b -> Just $ f a b
556−-- | Create a new 'Event' by combining each occurence with the current value of
556+-- | Create a new 'Event' by combining each occurrence with the current value of
557-- the 'Behavior'. The occurrence is discarded if the combining function returns
557-- the 'Behavior'. The occurrence is discarded if the combining function returns
558-- Nothing
558-- Nothing
559attachWithMaybe :: Reflex t => (a -> b -> Maybe c) -> Behavior t a -> Event t b -> Event t c
559attachWithMaybe :: Reflex t => (a -> b -> Maybe c) -> Behavior t a -> Event t b -> Event t c
560attachWithMaybe f b e = flip push e $ \o -> (`f` o) <$> sample b
560attachWithMaybe f b e = flip push e $ \o -> (`f` o) <$> sample b
562−-- | Create a new 'Event' that occurs on all but the first occurence of the
562+-- | Create a new 'Event' that occurs on all but the first occurrence of the
563-- supplied 'Event'.
563-- supplied 'Event'.
564tailE :: (Reflex t, MonadHold t m) => Event t a -> m (Event t a)
564tailE :: (Reflex t, MonadHold t m) => Event t a -> m (Event t a)
565tailE e = snd <$> headTailE e
565tailE e = snd <$> headTailE e
567−-- | Create a tuple of two 'Event's with the first one occuring only the first
567+-- | Create a tuple of two 'Event's with the first one occurring only the first
568−-- time the supplied 'Event' occurs and the second occuring on all but the first
568+-- time the supplied 'Event' occurs and the second occurring on all but the first
569-- occurence.
569-- occurence.
570headTailE :: (Reflex t, MonadHold t m) => Event t a -> m (Event t a, Event t a)
570headTailE :: (Reflex t, MonadHold t m) => Event t a -> m (Event t a, Event t a)
571headTailE e = do
571headTailE e = do
@@ -599,7 +599,7 @@ splitE e = (fmap fst e, fmap snd e)
599traceEvent :: (Reflex t, Show a) => String -> Event t a -> Event t a
599traceEvent :: (Reflex t, Show a) => String -> Event t a -> Event t a
600traceEvent s = traceEventWith $ \x -> s <> ": " <> show x
600traceEvent s = traceEventWith $ \x -> s <> ": " <> show x
602−-- | Print the output of the supplied function on each occurence of the
602+-- | Print the output of the supplied function on each occurrence of the
603-- 'Event'. This should /only/ be used for debugging.
603-- 'Event'. This should /only/ be used for debugging.
605-- Note: As with Debug.Trace.trace, the message will only be printed if the
605-- Note: As with Debug.Trace.trace, the message will only be printed if the
@@ -643,7 +643,7 @@ leftmost :: Reflex t => [Event t a] -> Event t a
643leftmost = mergeWith const
643leftmost = mergeWith const
645-- | Create a new 'Event' that occurs if at least one of the 'Event's in the
645-- | Create a new 'Event' that occurs if at least one of the 'Event's in the
646−-- list occurs and has a list of the values of all 'Event's occuring at that
646+-- list occurs and has a list of the values of all 'Event's occurring at that
648mergeList :: Reflex t => [Event t a] -> Event t (NonEmpty a)
648mergeList :: Reflex t => [Event t a] -> Event t (NonEmpty a)
649mergeList [] = never
649mergeList [] = never