Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- dsum_to_dmap :: GCompare k => DSum k f -> DMap k f
- simultaneous :: Reflex t => Event t a -> Event t b -> Event t (a, b)
- assertEvent :: (Reflex t, Show a) => String -> (a -> Bool) -> Event t a -> Event t a
- assertEventWith :: Reflex t => (a -> String) -> (a -> Bool) -> Event t a -> Event t a
- fmapMaybeWarn :: (Reflex t, Show a) => String -> (a -> Bool) -> Event t a -> Event t a
- fmapMaybeWarnWith :: Reflex t => (a -> String) -> (a -> Bool) -> Event t a -> Event t a
- traceEventSimple :: Reflex t => String -> Event t a -> Event t a
- leftmostWarn :: Reflex t => String -> [Event t a] -> Event t a
- leftmostAssert :: Reflex t => String -> [Event t a] -> Event t a
- leftmostWarnWithIndex :: Reflex t => String -> [Event t a] -> Event t a
- leftmostWarnWithEverything :: (Reflex t, Show a) => String -> [Event t a] -> Event t a
- alignWarn :: Reflex t => String -> Event t a -> Event t b -> Event t (Either a b)
- alignAssert :: Reflex t => String -> Event t a -> Event t b -> Event t (Either a b)
- foldDynMergeWith :: (Reflex t, MonadHold t m, MonadFix m) => b -> [Event t (b -> b)] -> m (Dynamic t b)
- foldDynMerge :: (Reflex t, MonadHold t m, MonadFix m) => (a -> b -> b) -> b -> [Event t a] -> m (Dynamic t b)
- fanDSum :: forall t k. (Reflex t, GCompare k) => Event t (DSum k Identity) -> EventSelector t k
- pushAlwaysDyn :: (Reflex t, MonadHold t m, MonadFix m) => (a -> PushM t b) -> Dynamic t a -> m (Dynamic t b)
- delayEvent :: forall t m a. Adjustable t m => Event t a -> m (Event t a)
- sequenceEvents :: forall t m a b. (Adjustable t m, MonadFix m) => Event t a -> Event t b -> m (Event t b)
- stepEvents :: forall t m a. (Adjustable t m, MonadFix m) => Event t [a] -> m (Event t a)
- stepEventsAndCollectOutput :: forall t m a b. (Adjustable t m, MonadHold t m, MonadFix m) => Event t [a] -> Event t b -> m (Event t a, Event t [b])
- stepEventsAndSequenceCollectOutput :: forall t m a b. (Adjustable t m, MonadHold t m, MonadFix m) => Event t [a] -> Event t b -> m (Event t a, Event t [b])
- switchHoldPair :: (Reflex t, MonadHold t m) => Event t a -> Event t b -> Event t (Event t a, Event t b) -> m (Event t a, Event t b)
- switchHoldTriple :: forall t m a b c. (Reflex t, MonadHold t m) => Event t a -> Event t b -> Event t c -> Event t (Event t a, Event t b, Event t c) -> m (Event t a, Event t b, Event t c)
- waitForSecondAfterFirst :: (Reflex t, MonadFix m, MonadHold t m) => Event t a -> Event t b -> m (Event t (a, b))
Documentation
simultaneous :: Reflex t => Event t a -> Event t b -> Event t (a, b) Source #
fires only when both events fire
:: (Reflex t, Show a) | |
=> String | assert message |
-> (a -> Bool) | predicate to check |
-> Event t a | |
-> Event t a |
assert that a predicate is true each time the event triggers
assert that a predicate is true each time the event triggers
:: (Reflex t, Show a) | |
=> String | warning message |
-> (a -> Bool) | predicate to check |
-> Event t a | |
-> Event t a |
same as fmapMaybe except outputs a warning if predicate fails
:: Reflex t | |
=> (a -> String) | warning message |
-> (a -> Bool) | predicate to check |
-> Event t a | |
-> Event t a |
same as fmapMaybe except outputs a warning if predicate fails
leftmostWarn :: Reflex t => String -> [Event t a] -> Event t a Source #
same as leftmost but outputs a warning if more than one event fires at once
leftmostAssert :: Reflex t => String -> [Event t a] -> Event t a Source #
same as leftmost but asserts if more than one event fires at once
leftmostWarnWithIndex :: Reflex t => String -> [Event t a] -> Event t a Source #
same as leftmostWarn but also adds an index for debugging
leftmostWarnWithEverything :: (Reflex t, Show a) => String -> [Event t a] -> Event t a Source #
same as leftmostWarn but rpint everything
alignWarn :: Reflex t => String -> Event t a -> Event t b -> Event t (Either a b) Source #
same as align but only returns left event if both events fire prints a warning if both events fire
alignAssert :: Reflex t => String -> Event t a -> Event t b -> Event t (Either a b) Source #
same as align but returns an either and asserts if both events fire at once
fanDSum :: forall t k. (Reflex t, GCompare k) => Event t (DSum k Identity) -> EventSelector t k Source #
pushAlwaysDyn :: (Reflex t, MonadHold t m, MonadFix m) => (a -> PushM t b) -> Dynamic t a -> m (Dynamic t b) Source #
delayEvent :: forall t m a. Adjustable t m => Event t a -> m (Event t a) Source #
delays an event by 1 tick
sequenceEvents :: forall t m a b. (Adjustable t m, MonadFix m) => Event t a -> Event t b -> m (Event t b) Source #
This takes two possibly simultaneous events to and sequences them to fire on different frames. If both events fire at the same time, this functions returns an event with the second event's results that fires one frame after the first event fires.
stepEvents :: forall t m a. (Adjustable t m, MonadFix m) => Event t [a] -> m (Event t a) Source #
Creates an output event that fires once for each input in the list. Each output event runs in a different consecutive frame. If an output event triggers the input event, they get appended to the end of the list of events to be triggered
stepEventsAndCollectOutput Source #
:: forall t m a b. (Adjustable t m, MonadHold t m, MonadFix m) | |
=> Event t [a] | event to repeat |
-> Event t b | event to collect results from, only collects if event fires |
-> m (Event t a, Event t [b]) | (repeated event, collected results once event is done repeating) |
Same as stepEvents but collects results for each event firing.
stepEventsAndSequenceCollectOutput Source #
:: forall t m a b. (Adjustable t m, MonadHold t m, MonadFix m) | |
=> Event t [a] | event to step |
-> Event t b | event to collect results from, only collects if event fires |
-> m (Event t a, Event t [b]) | (repeated event, collected results once event is done repeating) |
Same as stepEventsAndCollectOutput but the collected event fires one frame AFTER the last input event fires
switchHoldPair :: (Reflex t, MonadHold t m) => Event t a -> Event t b -> Event t (Event t a, Event t b) -> m (Event t a, Event t b) Source #
switchHoldTriple :: forall t m a b c. (Reflex t, MonadHold t m) => Event t a -> Event t b -> Event t c -> Event t (Event t a, Event t b, Event t c) -> m (Event t a, Event t b, Event t c) Source #
waitForSecondAfterFirst :: (Reflex t, MonadFix m, MonadHold t m) => Event t a -> Event t b -> m (Event t (a, b)) Source #
produces an event that will fire when the following sequence of conditions happens or happens simultaneously evA fires evB fires
the state is reset after this event fires and the sequence must occur again for the event to fire again