Idris2Doc : FS.Concurrent.Signal

FS.Concurrent.Signal

(source)

Reexports

importpublic Data.Linear.Sink

Definitions

recordSignalRef : Type->Type
Totality: total
Visibility: export
Constructor: 
SR : RefWorld (STa) ->SignalRefa

Projection: 
.ref : SignalRefa->RefWorld (STa)

Hints:
DiscreteSignalRef
MutableSignalRef
ReferenceSignalRef
SignalRefa=>Signala
signal : Lift1Worldf=>a->f (SignalRefa)
  An observable, mutable value

Totality: total
Visibility: export
get : Lift1Worldf=>SignalRefa->fa
  Reads the current value of the signal.

Totality: total
Visibility: export
put1 : SignalRefa->a->IO1 ()
  Writes the current value to the signal.

Totality: total
Visibility: export
put : Lift1Worldf=>SignalRefa->a->f ()
  Lifted version of `put1`.

Totality: total
Visibility: export
update1 : SignalRefa-> (a-> (a, b)) ->IO1b
  Updates the value stored in the signal with the given function
and returns the second result of the computation.

Totality: total
Visibility: export
update : Lift1Worldf=>SignalRefa-> (a-> (a, b)) ->fb
  Lifted version of `update1`.

Totality: total
Visibility: export
modify1 : SignalRefa-> (a->a) ->IO1 ()
  Updates the value stored in the signal.

Totality: total
Visibility: export
modify : Lift1Worldf=>SignalRefa-> (a->a) ->f ()
  Lifted version of `modify1`.

Totality: total
Visibility: export
updateAndGet1 : SignalRefa-> (a->a) ->IO1a
  Updates the value stored in the signal and returns the result.

Totality: total
Visibility: export
updateAndGet : Lift1Worldf=>SignalRefa-> (a->a) ->fa
  Lifted version of `updateAndGet1`.

Totality: total
Visibility: export
next : SignalRefa->Nat->Asyncees (a, Nat)
  Awaits the next value and its count, potentially blocking the
current fiber if the internal counter is at `current`.

Note: The internal counter starts at `1`, so invoking this with
a count of `0` will always immediately return the internal
value and count.

Totality: total
Visibility: export
signalSink : SignalReft->Sinkt
Totality: total
Visibility: export
interfaceReference : (Type->Type) ->Type
Parameters: t
Methods:
current1 : ta->IO1a

Implementations:
ReferenceIORef
ReferenceSignalRef
ReferenceSignal
current1 : Referencet=>ta->IO1a
Totality: total
Visibility: public export
current : LIOf=>Referencet=>ta->fa
Totality: total
Visibility: export
continuous : LIO (fes) =>Referencet=>ta->Streamfesa
  Creates a continuous stream of values typically by reading
the current state of a mutable reference every time a value is
pulled.

Totality: total
Visibility: export
interfaceDiscrete : (Type->Type) ->Type
Parameters: t
Methods:
discrete : ta->Stream (Asynce) esa
  Creates a discrete stream of values that reads an observable
value every time it changes.

Note: For `Signal` and `Event`, there is no buffering of values.
If the they are updated
more quickly than the stream is being pulled, some values
might be lost.

If you require buffering, use a `IO.Async.BQueue` (single observer)
or a `IO.Async.Channel` (multiple observers).

Implementations:
DiscreteSignalRef
Discrete (OnceWorld)
Discrete (DeferredWorld)
DiscreteBQueue
DiscreteChannel
DiscreteSignal
discrete : Discretet=>ta->Stream (Asynce) esa
  Creates a discrete stream of values that reads an observable
value every time it changes.

Note: For `Signal` and `Event`, there is no buffering of values.
If the they are updated
more quickly than the stream is being pulled, some values
might be lost.

If you require buffering, use a `IO.Async.BQueue` (single observer)
or a `IO.Async.Channel` (multiple observers).

Totality: total
Visibility: public export
justs : Discretet=>t (Maybea) ->Stream (Asynce) esa
  Like `discrete` but for an initially empty signal.

Fires whenever a `Just` is put into the signal.

Totality: total
Visibility: export
until : Discretef=>fa-> (a->Bool) ->Asynce [] ()
  Blocks the fiber and observes the given signal until the given
predicate returns `True`.

Totality: total
Visibility: export
onChange : Eqb=>Discretef=>fa-> (a->b) ->Stream (Asynce) esb
  Observes part of a value in a signal, firing whenever the value changes.

Totality: total
Visibility: export
modSig : LIO (fes) =>SignalRefp-> (o->p->p) ->Pullfoesr->Pullfoesr
  Use the output of a pull to update the value in a signal.

Totality: total
Visibility: export
setSig : LIO (fes) =>SignalRefp->Pullfpesr->Pullfpesr
  Use the output of a pull to update the value in a signal.

Totality: total
Visibility: export
observeSig : LIO (fes) =>SignalRefp-> (o->p->fes ()) ->Pullfoesr->Pullfoesr
  Act on the output of a pull by combining it with the current
value in a signal.

Totality: total
Visibility: export
foreachSig : LIO (fes) =>SignalRefp-> (o->p->fes ()) ->Pullfoesr->Pullfqesr
  Like `observeSig` but drains the stream in the process.

Totality: total
Visibility: export
interfaceMutable : (Type->Type) ->Type
Parameters: t
Methods:
mutate : LIOf=>ta-> (a->a) ->f ()

Implementations:
MutableIORef
MutableSignalRef
mutate : Mutablet=>LIOf=>ta-> (a->a) ->f ()
Totality: total
Visibility: public export
modAt : LIO (fes) =>Mutablet=>ta-> (o->a->a) ->Pullfoesr->Pullfpesr
Totality: total
Visibility: export
writeTo : LIO (fes) =>Mutablet=>ta->Pullfaesr->Pullfpesr
Totality: total
Visibility: export
teeMod : LIO (fes) =>Mutablet=>ta-> (o->a->a) ->Pullfoesr->Pullfoesr
Totality: total
Visibility: export
teeTo : LIO (fes) =>Mutablet=>ta->Pullfaesr->Pullfaesr
Totality: total
Visibility: export
recordEvent : Type->ListType->Type->Type
Totality: total
Visibility: public export
Constructor: 
E : Stream (Asynce) esa->Sinka=>Eventeesa

Projections:
.events : Eventeesa->Stream (Asynce) esa
.snk : Eventeesa->Sinka
.events : Eventeesa->Stream (Asynce) esa
Totality: total
Visibility: public export
events : Eventeesa->Stream (Asynce) esa
Totality: total
Visibility: public export
.snk : Eventeesa->Sinka
Totality: total
Visibility: public export
snk : Eventeesa->Sinka
Totality: total
Visibility: public export
event : (0a : Type) ->Asyncees (Eventefsa)
  A discrete stream of values plus a sink for sending such values
to the stream.

Totality: total
Visibility: export
eventFrom : a->Asyncees (Eventefsa)
  Like `event` but is already "charged" with an initial value.

Totality: total
Visibility: export