Maintainer | Ertugrul Soeylemez <es@ertes.de> |
---|

Types used in the netwire library.

- data Wire e (>~) a b where
- mkFix :: Arrow >~ => (a >~ Either e b) -> Wire e >~ a b
- mkGen :: (a >~ (Either e b, Wire e >~ a b)) -> Wire e >~ a b
- mkPure :: (a -> (Either e b, Wire e >~ a b)) -> Wire e >~ a b
- mkPureFix :: (a -> Either e b) -> Wire e >~ a b
- toGen :: Arrow >~ => Wire e >~ a b -> a >~ (Either e b, Wire e >~ a b)

# The wire

data Wire e (>~) a b whereSource

Signal networks.

WGen :: !(a >~ (Either e b, Wire e >~ a b)) -> Wire e >~ a b | |

WPure :: !(a -> (Either e b, Wire e >~ a b)) -> Wire e >~ a b |

(ArrowChoice >~, ArrowReader r >~) => ArrowReader r (Wire e >~) | If the underlying arrow is a reader arrow, then the wire arrow is also a reader arrow. |

(ArrowChoice >~, ArrowState s >~) => ArrowState s (Wire e >~) | If the underlying arrow is a state arrow, then the wire arrow is also a state arrow. |

(ArrowChoice >~, ArrowWriter w >~) => ArrowWriter w (Wire e >~) | If the underlying arrow is a writer arrow, then the wire arrow is also a writer arrow. |

ArrowChoice >~ => ArrowError e (Wire e >~) | Inhibition handling interface. See also the Control.Wire.Trans.Exhibit and Control.Wire.Prefab.Event modules. |

ArrowChoice >~ => ArrowTransformer (Wire e) >~ | Wire arrows are arrow transformers. |

ArrowChoice >~ => ArrowChoice (Wire e >~) | Support for choice (signal redirection). |

(ArrowChoice >~, ArrowLoop >~) => ArrowCircuit (Wire e >~) | Support for one-instant delays. |

ArrowChoice >~ => Arrow (Wire e >~) | Wire side channels. |

(ArrowChoice >~, Monoid e) => ArrowZero (Wire e >~) | The always inhibiting wire. The |

(ArrowChoice >~, Monoid e) => ArrowPlus (Wire e >~) | Combining possibly inhibiting wires. |

(ArrowChoice >~, ArrowLoop >~) => ArrowLoop (Wire e >~) | Value recursion in the wire arrows. **NOTE**: Wires with feedback must *never* inhibit. There is an inherent, fundamental problem with handling the inhibition case, which you will observe as a fatal pattern match error. |

ArrowChoice >~ => Category (Wire e >~) | Sequencing of wires. |

(Applicative f, ArrowChoice >~, ArrowIO >~) => ArrowIO (Wire (f SomeException) >~) | When the target arrow is an |

# Smart construction

mkFix :: Arrow >~ => (a >~ Either e b) -> Wire e >~ a bSource

Create a wire from the given stateless transformation computation.

mkGen :: (a >~ (Either e b, Wire e >~ a b)) -> Wire e >~ a bSource

Create a wire from the given transformation computation.

mkPure :: (a -> (Either e b, Wire e >~ a b)) -> Wire e >~ a bSource

Create a pure wire from the given transformation function.

mkPureFix :: (a -> Either e b) -> Wire e >~ a bSource

Create a pure wire from the given transformation function.