HORIZON HASKELLDocslts/ghc-9.14.x99ffbb82026-10-19Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 99ffbb8 · 2026-10-19

Modulemachines-0.7.4Haskell2010

Data.Machine.Wye

Contents
  1. Wyes
Synopsis
  • Packagemachines-0.7.4
  • Exports9
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceWye.hs

Wyes

typetype Wye a b c = Machine (Y a b) c

A Machine that can read from two input stream in a non-deterministic manner.

typetype WyeT (m :: Type -> Type) a b c = MachineT m (Y a b) c

A Machine that can read from two input stream in a non-deterministic manner with monadic side-effects.

valuewye
  1. :: Monad m
  2. => ProcessT m a a'
  3. -> ProcessT m b b'
  4. -> WyeT m a' b' c
  5. -> WyeT m a b c

Compose a pair of pipes onto the front of a Wye.

Precompose a Process onto each input of a Wye (or WyeT).

This is left biased in that it tries to draw values from the X input whenever they are available, and only draws from the Y input when X would block.