on develop help sign in
Merge pull request #201 from reflex-frp/doc-typos

Fix some typos of "occurence" -> "occurrence"

commit0b6ac997cc1fe09a48309b33c2117d454854790d authorRyan Trinkle <ryan.trinkle@gmail.com> dateTue 17 Jul 2018, 22:20 (8 years ago) parent5f13e7d78e9d52
1 file changed+7−7
src/Reflex/Class.hs+7−7
src/Reflex/Class.hs+7−7
@@ -543,7 +543,7 @@ instance Reflex t => Plus (Event t) where
543543tag :: Reflex t => Behavior t b -> Event t a -> Event t b
544544tag b = pushAlways $ \_ -> sample b
545545
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
547547-- current value of the 'Behavior'.
548548attach :: Reflex t => Behavior t a -> Event t b -> Event t (a, b)
549549attach = attachWith (,)
@@ -553,19 +553,19 @@ attach = attachWith (,)
553553attachWith :: Reflex t => (a -> b -> c) -> Behavior t a -> Event t b -> Event t c
554554attachWith f = attachWithMaybe $ \a b -> Just $ f a b
555555
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
557557-- the 'Behavior'. The occurrence is discarded if the combining function returns
558558-- Nothing
559559attachWithMaybe :: Reflex t => (a -> b -> Maybe c) -> Behavior t a -> Event t b -> Event t c
560560attachWithMaybe f b e = flip push e $ \o -> (`f` o) <$> sample b
561561
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
563563-- supplied 'Event'.
564564tailE :: (Reflex t, MonadHold t m) => Event t a -> m (Event t a)
565565tailE e = snd <$> headTailE e
566566
567−-- | Create a tuple of two 'Event's with the first one occuring only the first
568−-- time the supplied 'Event' occurs and the second occuring on all but 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 occurring on all but the first
569569-- occurence.
570570headTailE :: (Reflex t, MonadHold t m) => Event t a -> m (Event t a, Event t a)
571571headTailE e = do
@@ -599,7 +599,7 @@ splitE e = (fmap fst e, fmap snd e)
599599traceEvent :: (Reflex t, Show a) => String -> Event t a -> Event t a
600600traceEvent s = traceEventWith $ \x -> s <> ": " <> show x
601601
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
603603-- 'Event'. This should /only/ be used for debugging.
604604--
605605-- 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
643643leftmost = mergeWith const
644644
645645-- | 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
647647-- time.
648648mergeList :: Reflex t => [Event t a] -> Event t (NonEmpty a)
649649mergeList [] = never