elerea-2.9.0: A minimalistic FRP library

Safe HaskellSafe
LanguageHaskell98

FRP.Elerea.Simple.Pure

Contents

Description

This module contains the reference implementation for the pure subset of the simple variant of Elerea. I/O embedding is substituted by conversion from and to lists.

Synopsis

The signal abstraction

type Signal a = Int -> a Source #

type SignalGen a = Int -> a Source #

Inputs and outputs

fromList :: [a] -> Signal a Source #

toList :: Signal a -> [a] Source #

start :: SignalGen (Signal a) -> [a] Source #

Basic building blocks

delay :: a -> Signal a -> SignalGen (Signal a) Source #

until :: (a -> Bool) -> (a -> a) -> a -> a #

until p f yields the result of applying f until p holds.

Derived combinators

stateful :: a -> (a -> a) -> SignalGen (Signal a) Source #

transfer :: a -> (t -> a -> a) -> Signal t -> SignalGen (Signal a) Source #

transfer2 :: a -> (t1 -> t2 -> a -> a) -> Signal t1 -> Signal t2 -> SignalGen (Signal a) Source #

transfer3 :: a -> (t1 -> t2 -> t3 -> a -> a) -> Signal t1 -> Signal t2 -> Signal t3 -> SignalGen (Signal a) Source #

transfer4 :: a -> (t1 -> t2 -> t3 -> t4 -> a -> a) -> Signal t1 -> Signal t2 -> Signal t3 -> Signal t4 -> SignalGen (Signal a) Source #