bearriver-0.15: FRP Yampa replacement implemented with Monadic Stream Functions.
Copyright(c) Ivan Perez 2019-2022
(c) Ivan Perez and Manuel Baerenz 2016-2018
LicenseBSD3
Maintainerivan.perez@keera.co.uk
Safe HaskellSafe-Inferred
LanguageHaskell2010

FRP.BearRiver

Description

Implementation of Yampa using Monadic Stream Processing library.

Synopsis

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.

boolToEvent :: Bool -> Event () Source #

Create an event if a Bool is True.

State keeping combinators

Loops with guaranteed well-defined feedback

loopPre :: Monad m => c -> SF m (a, c) (b, c) -> SF m a b Source #

Loop with an initial value for the signal being fed back.