(>>^) : MSF m i o -> (o -> o2) -> MSF m i o2 Sequencing of an MSF and a pure function
Visibility: export
Fixity Declaration: infixr operator, level 1(^>>) : (i -> i2) -> MSF m i2 o -> MSF m i o Sequencing of a pure function and an MSF
Visibility: export
Fixity Declaration: infixr operator, level 1(>>!) : MSF m i o -> (o -> m o2) -> MSF m i o2 Sequencing of an MSF and an effectful computation
Visibility: export
Fixity Declaration: infixr operator, level 1(!>>) : (i -> m i2) -> MSF m i2 o -> MSF m i o Sequencing of an effectful computation and an MSF
Visibility: export
Fixity Declaration: infixr operator, level 1fan_ : FanList m i os -> MSF m i () Like `fan` but discards the results.
This is mainly useful for broadcasting to data sinks
(streaming functions that do not produce any interesting
output).
TODO: Should we require a proof here that `os` is a list
of `Unit`?
Visibility: export(>>-) : MSF m i x -> FanList m x os -> MSF m i () Broadcasting an MSF to a list of sinks
Visibility: export
Fixity Declaration: infixr operator, level 1(^>-) : (i -> x) -> FanList m x os -> MSF m i () Broadcasting a pure function to a list of sinks
Visibility: export
Fixity Declaration: infixr operator, level 1(!>-) : (i -> m x) -> FanList m x os -> MSF m i () Broadcasting an effectful computation to a list of sinks
Visibility: export
Fixity Declaration: infixr operator, level 1firstArg : MSF m (HList [x, i]) o -> x -> MSF m i o Extract the first argument from an MSF taking a pair
of input values.
Visibility: exportsecondArg : MSF m (HList [i, x]) o -> x -> MSF m i o Extract the second argument from an MSF taking a pair
of input values.
Visibility: exporthd : MSF m (HList (i :: t)) i Extract the first value of an n-ary product
Visibility: exporttl : MSF m (HList (i :: t)) (HList t) Extract the tail of an n-ary product
Visibility: exportsnd : MSF m (HList (i :: (i2 :: t))) i2 Extract the second value of an n-ary product
Visibility: exportswap : MSF m (HList [a, b]) (HList [b, a]) Swaps a pair of input values
Visibility: exporteither : MSF m (Either i1 i2) (HSum [i1, i2]) Convert an `Either` input to a binary sum, which
can then be sequenced with a call to `choice` or `collect`.
Visibility: exportifLeft : Monoid o => MSF m i o -> MSF m (Either i a) o Run the given MSF only if the input is a `Left`.
Visibility: exportifRight : Monoid o => MSF m i o -> MSF m (Either a i) o Run the given MSF only if the input is a `Right`.
Visibility: exportmaybe : MSF m (Maybe i) (HSum [i, ()]) Convert an `Maybe` input to a binary sum, which
can then be sequenced with a call to `choice` or `collect`.
Visibility: exportifJust : Monoid o => MSF m i o -> MSF m (Maybe i) o Run the given MSF only if the input is a `Just`.
Visibility: exportifNothing : Monoid o => MSF m () o -> MSF m (Maybe i) o Run the given MSF only if the input is a `Nothing`.
Visibility: exportbool : (i -> Bool) -> MSF m i (HSum [i, i]) Convert an input to a binary sum, depending on whether
the given predicate returns `True` or `False`. The result
can then be sequenced with a call to `choice` or `collect`.
Visibility: exportifTrue : Monoid o => (i -> Bool) -> MSF m i o -> MSF m i o Run the given MSF only if the predicate holds for the input.
Visibility: exportifFalse : Monoid o => (i -> Bool) -> MSF m i o -> MSF m i o Run the given MSF only if the predicate does not hold for the input.
Visibility: exportifIs : Eq i => Monoid o => i -> MSF m i o -> MSF m i o Run the given MSF only if the input equlas the given value
Visibility: exportifIsNot : Eq i => Monoid o => i -> MSF m i o -> MSF m i o Run the given MSF only if the input does not equal the given value
Visibility: exportfeedback_ : s -> MSF m (HList [s, i]) s -> MSF m i () Uses the given value as a seed for feeding back output
of the MSF back to its input.
Visibility: exportiPre : o -> MSF m o o Delay a stream by one sample.
Visibility: exportaccumulateWith : (i -> o -> o) -> o -> MSF m i o Applies a function to the input and an accumulator,
outputting the updated accumulator.
Visibility: exportcount : Num n => MSF m i n Counts the number of scans of the signal function.
Visibility: exportappendFrom : Semigroup v => v -> MSF m v v Accumulate the inputs, starting from an initial value.
Visibility: exportappend : Monoid n => MSF m n n Accumulate the inputs, starting from `neutral`
Visibility: exportmealy : (i -> s -> HList [s, o]) -> s -> MSF m i o Applies a transfer function to the input and an accumulator,
returning the updated accumulator and output.
Visibility: exportunfold : (s -> HList [s, o]) -> s -> MSF m i o Unfolds a function over an initial state
value.
Visibility: exportrepeatedly : (o -> o) -> o -> MSF m i o Generates output using a step-wise generation function and an initial
value. Version of 'unfold' in which the output and the new accumulator
are the same.
Visibility: exportcycle : (vs : List o) -> {auto 0 _ : NonEmpty vs} -> MSF m i o Cycles through the given non-empty list of values.
Visibility: exportobserveWith : MSF m i () -> MSF m i i Observe input values through the given sink.
Visibility: exportwithEffect : (i -> m ()) -> MSF m i i Run the given effectful computation on each input.
Visibility: exportrunEffect : m () -> MSF m i i Run the given monadic action on each input.
Visibility: exportnever : MSF m i (Event o) The empty event stream that never fires an event
Visibility: exporthold : o -> MSF m (Event o) o Convert an event stream to a streaming function
holding the value of the last event fired starting
from the given initial value.
Visibility: exportntimes : Nat -> o -> MSF m i (Event o) Fire the given event `n` times.
Visibility: exportonce : o -> MSF m i (Event o) Fire the given event exactly once on the first
evaluation step.
Visibility: exportwhen : (i -> Bool) -> MSF m i (Event i) Fire an event whenever the given predicate holds.
Visibility: exportwhen_ : (i -> Bool) -> MSF m i (Event ()) Like `when` but discard the input.
Visibility: exportis : Eq i => i -> MSF m i (Event i) Fire an event whenever the input equals the given value.
Visibility: exportisNot : Eq i => i -> MSF m i (Event i) Fire an event whenever the input does not equal the given value.
Visibility: exportwhenLeft : MSF m (Either a b) (Event a) Fire an event if the input is a `Left`.
Visibility: exportwhenRight : MSF m (Either a b) (Event b) Fire an event if the input is a `Right`.
Visibility: exportwhenJust : MSF m (Maybe a) (Event a) Fire an event if the input is a `Just`.
Visibility: exportwhenNothing : MSF m (Maybe a) (Event ()) Fire an event if the input is a `Nothing`.
Visibility: exportevent : MSF m (Event i) (HSum [i, ()]) Convert an `Event` input to a binary sum, which
can then be sequenced with a call to `choice` or `collect`.
Visibility: exportifEvent : Monoid o => MSF m i o -> MSF m (Event i) o Run the given MSF only if the input fired an event.
Visibility: export(?>-) : MSF m i (Event x) -> FanList m x os -> MSF m i () Broadcast an event to a list of sinks.
Visibility: export
Fixity Declaration: infixr operator, level 1(?>>) : Monoid o => MSF m i (Event x) -> MSF m x o -> MSF m i o Run the given MSF if the input stream fires and event.
Visibility: export
Fixity Declaration: infixr operator, level 1ifNoEvent : Monoid o => MSF m () o -> MSF m (Event i) o Run the given MSF only if the input fired no event.
Visibility: exportonChange : Eq i => MSF m i (Event i) Fire an event whenever the input value changed.
Always fires on first input.
Visibility: exportonEvent : MSF m (HList [a, Event e]) (Event a) Fires the first input as an event whenever the
second input fires.
Visibility: exportonEventWith : (a -> e -> b) -> MSF m (HList [a, Event e]) (Event b) Combines the first input with the event fired by the
second input.
Visibility: exportleftOnEvent : MSF m (HList [Either a b, Event e]) (Event a) Combines an input event stream with a stream function
holding an `Either` trying to extract a `Left` whenever
an event is fired.
Visibility: exportrightOnEvent : MSF m (HList [Either a b, Event e]) (Event b) Combines an input event stream with a stream function
holding an `Either` trying to extract a `Right` whenever
an event is fired.
Visibility: exportjustOnEvent : MSF m (HList [Maybe a, Event e]) (Event a) Combines an input event stream with a stream function
holding a `Maybe` trying to extract the value from a `Just` whenever
an event is fired.
Visibility: exportunionWith : (o -> o -> o) -> MSF m i (Event o) -> MSF m i (Event o) -> MSF m i (Event o) Fires an event whenever one of the two given
event streams fire. Uses the given function
to combine simultaneously occuring events.
Visibility: exportunionL : MSF m i (Event o) -> MSF m i (Event o) -> MSF m i (Event o) Left-biased union of event streams.
In case of simultaneously occuring events, the
event from the first event stream is fired.
This is the same behavior as `(<|>)` from
the MSFs `Alternative` implementation
Visibility: exportunionR : MSF m i (Event o) -> MSF m i (Event o) -> MSF m i (Event o) Right-biased union of event streams.
In case of simultaneously occuring events, the
event from the second event stream is fired.
Visibility: exportunion : Semigroup o => MSF m i (Event o) -> MSF m i (Event o) -> MSF m i (Event o) Union of event streams using a `Semigroup` to
merge values in case of simultaneously occuring events.
This is an alias for `(<+>)`.
Visibility: export(<|>) : Alternative f => MSF m i (f o) -> MSF m i (f o) -> MSF m i (f o)- Visibility: export
Fixity Declaration: infixr operator, level 2 filter : (o -> Bool) -> MSF m (Event o) (Event o) Filters an event stream, letting pass only values,
fow which the given predicate holds.
Visibility: exportmapMaybe : (i -> Maybe o) -> MSF m (Event i) (Event o) Filters an event stream, letting pass only values,
fow which the given function returns a `Just`.
Visibility: exportproj : (0 t : k) -> Elem t ks => MSF m (Any f ks) (Event (f t)) Sum projection: Fires an event if a value of the given type can
be extracted from the input sum.
Visibility: exportobserveEvent : MSF m i () -> MSF m (Event i) (Event i) Observe an event throught the given sink.
Visibility: exportaccumulateWithE : (i -> o -> o) -> o -> MSF m (Event i) (Event o) Applies a function to the input and an accumulator,
outputting the updated accumulator whenever an
event is fire.
Visibility: exportcountE : MSF m (Event i) (Event Nat) Count the number of occurences of an event
Visibility: export0 Fun : List Type -> Type -> Type N-ary function type calculated from a list of n types.
Visibility: public exportuncurryNP : Fun is o -> HList is -> o Converts an n-ary function to one taking an n-ary
product as input.
Visibility: exportnp : Fun is o -> MSF m (HList is) o Alias for `arr . uncurryNP`.
Visibility: export