reactive-banana-0.5.0.3: Practical library for functional reactive programming (FRP).

Safe HaskellSafe-Infered

Reactive.Banana.Internal.Model

Contents

Synopsis

Synopsis

Model implementation of the abstract syntax tree.

Description

This module contains the model implementation for the primitive combinators defined Reactive.Banana.Internal.AST which in turn are the basis for the official combinators documented in Reactive.Banana.Combinators.

This module does not export any combinators, you have to look at the source code to make use of it. (If there is no link to the source code at every type signature, then you have to run cabal with --hyperlink-source flag.)

This model is authoritative: when observed with the interpretModel function, both the actual implementation and its model must agree on the result. Note that this must also hold for recursive and partial definitions (at least in spirit, I'm not going to split hairs over _|_ vs \_ -> _|_).

Concerning time and space complexity, the model is not authoritative, however. Implementations are free to be much more efficient.

Interpretation

interpretModel :: (Event Expr a -> Event Expr b) -> Event a -> IO (Event b)Source

Interpret an event graph with the model implementation. Mainly useful for testing library internals.