Module

SodiumFRP.Operational

#updates

updates :: forall a cel. SodiumCell cel => cel a -> Stream a

A stream that gives the updates/steps for a 'Cell'

This is an OPERATIONAL primitive, which is not part of the main Sodium API. It breaks the property of non-detectability of cell steps/updates. The rule with this primitive is that you should only use it in functions that do not allow the caller to detect the cell updates.

#value

value :: forall a cel. SodiumCell cel => cel a -> Effect (Stream a)

A stream that is guaranteed to fire once in the transaction where value() is invoked, giving the current value of the cell, and thereafter behaves like 'updates' firing for each update/step of the cell's value.

This is an OPERATIONAL primitive, which is not part of the main Sodium API. It breaks the property of non-detectability of cell steps/updates. The rule with this primitive is that you should only use it in functions that do not allow the caller to detect the cell updates.

#defer

defer :: forall a str. SodiumStream str => str a -> Stream a

Push each event onto a new transaction guaranteed to come before the next externally initiated transaction. Same as 'split' but it works on a single value.

#split

split :: forall a str. SodiumStream str => str (Array a) -> Stream a

Push each event in the list onto a newly created transaction guaranteed to come before the next externally initiated transaction. Note that the semantics are such that two different invocations of split() can put events into the same new transaction, so the resulting stream's events could be simultaneous with events output by split() or 'defer' invoked elsewhere in the code.

Modules