netwire-3.1.0: Fast generic automaton arrow transformer for AFRP

MaintainerErtugrul Soeylemez <es@ertes.de>

Control.Wire.Prefab.Simple

Contents

Description

Basic wires.

Synopsis

Simple predefined wires.

constant :: WirePure >~ => b -> Wire e >~ a bSource

The constant wire. Outputs the given value all the time.

identity :: WirePure >~ => Wire e >~ a aSource

The identity wire. Outputs its input signal unchanged.

  • Depends: Current instant.

Forced reduction

force :: WirePure >~ => Wire e >~ b bSource

Force the input signal to weak head normal form, before outputting it. Applies seq to the input signal.

  • Depends: Current instant.

forceNF :: (NFData b, WirePure >~) => Wire e >~ b bSource

Force the input signal to normal form, before outputting it. Applies deepseq to the input signal.

  • Depends: Current instant.

Inject signals

inject :: WirePure >~ => Wire e >~ (Either e b) bSource

Inject the given Either value as a signal. Left means inhibition.

  • Depends: Current instant.
  • Inhibits: When input is Left.

injectEvent :: (Monoid e, WirePure >~) => Wire e >~ (Maybe b) bSource

Inject the given Maybe value as a signal. Nothing means inhibition.

  • Depends: Current instant.
  • Inhibits: When input is Nothing.