Copyright | (c) Ivan Perez 2019-2022 (c) Ivan Perez and Manuel Baerenz 2016-2018 |
---|---|
License | BSD3 |
Maintainer | ivan.perez@keera.co.uk |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
FRP.BearRiver
Description
Implementation of Yampa using Monadic Stream Processing library.
Synopsis
- eventToMaybe :: Event a -> Maybe a
- boolToEvent :: Bool -> Event ()
- loopPre :: Monad m => c -> SF m (a, c) (b, c) -> SF m a b
Relation to other types
eventToMaybe :: Event a -> Maybe a Source #
Convert an Event
into a Maybe
value.
Both types are isomorphic, where a value containing an event is mapped to a
Just
, and NoEvent
is mapped to Nothing
. There is, however, a semantic
difference: a signal carrying a Maybe may change constantly, but, for a
signal carrying an Event
, there should be a bounded frequency such that
sampling the signal faster does not render more event occurrences.