netwire-2.0.1: Generic automaton arrow transformer and useful tools

MaintainerErtugrul Soeylemez <es@ertes.de>

Control.Wire.Prefab.Simple

Contents

Description

Basic wires.

Synopsis

Simple predefined wires.

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

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

identity :: Wire e >~ a aSource

The identity wire. Outputs its input signal unchanged.

  • Depends: Current instant.

Forced reduction

force :: 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 => 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 :: 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 => Wire e >~ (Maybe b) bSource

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

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