record SignalRef : Type -> Type- Totality: total
Visibility: export
Constructor: SR : Ref World (ST a) -> SignalRef a
Projection: .ref : SignalRef a -> Ref World (ST a)
Hints:
Discrete SignalRef Mutable SignalRef Reference SignalRef SignalRef a => Signal a
signal : Lift1 World f => a -> f (SignalRef a) An observable, mutable value
Totality: total
Visibility: exportget : Lift1 World f => SignalRef a -> f a Reads the current value of the signal.
Totality: total
Visibility: exportput1 : SignalRef a -> a -> IO1 () Writes the current value to the signal.
Totality: total
Visibility: exportput : Lift1 World f => SignalRef a -> a -> f () Lifted version of `put1`.
Totality: total
Visibility: exportupdate1 : SignalRef a -> (a -> (a, b)) -> IO1 b Updates the value stored in the signal with the given function
and returns the second result of the computation.
Totality: total
Visibility: exportupdate : Lift1 World f => SignalRef a -> (a -> (a, b)) -> f b Lifted version of `update1`.
Totality: total
Visibility: exportmodify1 : SignalRef a -> (a -> a) -> IO1 () Updates the value stored in the signal.
Totality: total
Visibility: exportmodify : Lift1 World f => SignalRef a -> (a -> a) -> f () Lifted version of `modify1`.
Totality: total
Visibility: exportupdateAndGet1 : SignalRef a -> (a -> a) -> IO1 a Updates the value stored in the signal and returns the result.
Totality: total
Visibility: exportupdateAndGet : Lift1 World f => SignalRef a -> (a -> a) -> f a Lifted version of `updateAndGet1`.
Totality: total
Visibility: exportnext : SignalRef a -> Nat -> Async e es (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: exportsignalSink : SignalRef t -> Sink t- Totality: total
Visibility: export interface Reference : (Type -> Type) -> Type- Parameters: t
Methods:
current1 : t a -> IO1 a
Implementations:
Reference IORef Reference SignalRef Reference Signal
current1 : Reference t => t a -> IO1 a- Totality: total
Visibility: public export current : LIO f => Reference t => t a -> f a- Totality: total
Visibility: export continuous : LIO (f es) => Reference t => t a -> Stream f es a 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: exportinterface Discrete : (Type -> Type) -> Type- Parameters: t
Methods:
discrete : t a -> Stream (Async e) es a 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:
Discrete SignalRef Discrete (Once World) Discrete (Deferred World) Discrete BQueue Discrete Channel Discrete Signal
discrete : Discrete t => t a -> Stream (Async e) es a 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 exportjusts : Discrete t => t (Maybe a) -> Stream (Async e) es a Like `discrete` but for an initially empty signal.
Fires whenever a `Just` is put into the signal.
Totality: total
Visibility: exportuntil : Discrete f => f a -> (a -> Bool) -> Async e [] () Blocks the fiber and observes the given signal until the given
predicate returns `True`.
Totality: total
Visibility: exportonChange : Eq b => Discrete f => f a -> (a -> b) -> Stream (Async e) es b Observes part of a value in a signal, firing whenever the value changes.
Totality: total
Visibility: exportmodSig : LIO (f es) => SignalRef p -> (o -> p -> p) -> Pull f o es r -> Pull f o es r Use the output of a pull to update the value in a signal.
Totality: total
Visibility: exportsetSig : LIO (f es) => SignalRef p -> Pull f p es r -> Pull f p es r Use the output of a pull to update the value in a signal.
Totality: total
Visibility: exportobserveSig : LIO (f es) => SignalRef p -> (o -> p -> f es ()) -> Pull f o es r -> Pull f o es r Act on the output of a pull by combining it with the current
value in a signal.
Totality: total
Visibility: exportforeachSig : LIO (f es) => SignalRef p -> (o -> p -> f es ()) -> Pull f o es r -> Pull f q es r Like `observeSig` but drains the stream in the process.
Totality: total
Visibility: exportinterface Mutable : (Type -> Type) -> Type- Parameters: t
Methods:
mutate : LIO f => t a -> (a -> a) -> f ()
Implementations:
Mutable IORef Mutable SignalRef
mutate : Mutable t => LIO f => t a -> (a -> a) -> f ()- Totality: total
Visibility: public export modAt : LIO (f es) => Mutable t => t a -> (o -> a -> a) -> Pull f o es r -> Pull f p es r- Totality: total
Visibility: export writeTo : LIO (f es) => Mutable t => t a -> Pull f a es r -> Pull f p es r- Totality: total
Visibility: export teeMod : LIO (f es) => Mutable t => t a -> (o -> a -> a) -> Pull f o es r -> Pull f o es r- Totality: total
Visibility: export teeTo : LIO (f es) => Mutable t => t a -> Pull f a es r -> Pull f a es r- Totality: total
Visibility: export record Event : Type -> List Type -> Type -> Type- Totality: total
Visibility: public export
Constructor: E : Stream (Async e) es a -> Sink a => Event e es a
Projections:
.events : Event e es a -> Stream (Async e) es a .snk : Event e es a -> Sink a
.events : Event e es a -> Stream (Async e) es a- Totality: total
Visibility: public export events : Event e es a -> Stream (Async e) es a- Totality: total
Visibility: public export .snk : Event e es a -> Sink a- Totality: total
Visibility: public export snk : Event e es a -> Sink a- Totality: total
Visibility: public export event : (0 a : Type) -> Async e es (Event e fs a) A discrete stream of values plus a sink for sending such values
to the stream.
Totality: total
Visibility: exporteventFrom : a -> Async e es (Event e fs a) Like `event` but is already "charged" with an initial value.
Totality: total
Visibility: export