Safe Haskell | None |
---|
This module provides context connector records.
A context connector record is a record of connectors (consumers or producers) which depend on some data, called the context.
- type ContextConsumerRecord context record = ContextConnectorRecord context Consumer record
- type ContextProducerRecord context record = ContextConnectorRecord context Producer record
- type ContextConnectorRecord context connector record = record (ContextConnectorStyle context connector)
- type ContextConnectorStyle context connector = ContextStyle context (ConnectorStyle connector)
- consume :: Record SignalKind record => ContextConsumerRecord context record -> ReaderArrow context (Circuit era) (SignalRecord era record) ()
- produce :: Record SignalKind record => ContextProducerRecord context record -> ReaderArrow context (Circuit era) () (SignalRecord era record)
Context connector records
type ContextConsumerRecord context record = ContextConnectorRecord context Consumer recordSource
Records which contain functions from contexts to consumers as values.
type ContextProducerRecord context record = ContextConnectorRecord context Producer recordSource
Records which contain functions from contexts to producers as values.
type ContextConnectorRecord context connector record = record (ContextConnectorStyle context connector)Source
Records which contain functions from contexts to connectors (consumers or producers) as values.
type ContextConnectorStyle context connector = ContextStyle context (ConnectorStyle connector)Source
consume :: Record SignalKind record => ContextConsumerRecord context record -> ReaderArrow context (Circuit era) (SignalRecord era record) ()Source
Converts a record of context consumers into a reader arrow which consumes a corresponding record of signals. The concrete context has to be provided as the environment of the reader arrow.
produce :: Record SignalKind record => ContextProducerRecord context record -> ReaderArrow context (Circuit era) () (SignalRecord era record)Source
Converts a record of context producers into a reader arrow which produces a corresponding record of signals. The concrete context has to be provided as the environment of the reader arrow.