|
Control.DataDriven | Portability | portable | Stability | experimental | Maintainer | conal@conal.net |
|
|
|
|
|
Description |
Data-driven computations
|
|
Synopsis |
|
|
|
|
Plumbing for "events" and subscription
|
|
|
Sinks (consumers) of values
|
|
type Action cur = cur () | Source |
|
Actions
|
|
|
News publisher -- somewhere to register updaters to be executed
when events occur.
|
|
Data-driven computations
|
|
type DataDrivenG news cur = O ((,) news) cur | Source |
|
The general type of data-driven computations. Represented as a
news publisher (news) and a way to get new values (cur). Clients
interested in the value subscribe to news and extract a new value
from cur when notified that the value may have changed. When news
is a monoid and cur is an applicative functor, DataDrivenG news cur
is an applicative functor also. The applicative property is very
convenient for composition. See the more specific type DataDriven.
Nicer, but Haddock chokes on the infix op:
type DataDrivenG news cur = ((,) news) O cur
|
|
|
Construct a data-driven computation from a subscription service
(Monoid) and a value source subscriber (Applicative).
|
|
|
Modify the source part of a DataDriven computation.
|
|
|
Data driven with news publisher
|
|
|
Run a unit-valued DataDriven computation. Causes the source to be
executed and registered with the subscriber.
|
|
|
Apply join to a source
|
|
Produced by Haddock version 2.3.0 |