File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -714,9 +714,12 @@ filterRight = mapMaybe (either (const Nothing) Just)
714
714
instance Reflex t => Alt (Event t ) where
715
715
ev1 <!> ev2 = leftmost [ev1, ev2]
716
716
717
- -- | 'Event' intersection (convenient interface to 'coincidence') .
717
+ -- | 'Event' intersection. Only occurs when both events are co-incident .
718
718
instance Reflex t => Apply (Event t ) where
719
- evf <.> evx = coincidence (fmap (<$> evx) evf)
719
+ evf <.> evx = mapMaybe f (align evf evx) where
720
+ f (These g a) = Just (g a)
721
+ f _ = Nothing
722
+
720
723
721
724
-- | 'Event' intersection (convenient interface to 'coincidence').
722
725
instance Reflex t => Bind (Event t ) where
@@ -1073,7 +1076,7 @@ instance Reflex t => Align (Event t) where
1073
1076
instance Reflex t => Semialign (Event t ) where
1074
1077
#endif
1075
1078
align = alignEventWithMaybe Just
1076
-
1079
+
1077
1080
#if defined(MIN_VERSION_semialign)
1078
1081
zip x y = mapMaybe justThese $ align x y
1079
1082
#endif
You can’t perform that action at this time.
0 commit comments