HORIZON HASKELLDocslts/ghc-9.14.xd82dee82026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · d82dee8 · 2026-10-12

Modulemachines-0.7.4Haskell2010

Data.Machine.Fanout

Provide a notion of fanout wherein a single input is passed to several consumers.

  • 2 values
  • Packagemachines-0.7.4
  • Exports2
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceFanout.hs
valuefanout :: (Monad m, Semigroup r) => [ProcessT m a r] -> ProcessT m a r
#

Share inputs with each of a list of processes in lockstep. Any values yielded by the processes are combined into a single yield from the composite process.

valuefanoutSteps :: (Monad m, Monoid r) => [ProcessT m a r] -> ProcessT m a r
#

Share inputs with each of a list of processes in lockstep. If none of the processes yields a value, the composite process will itself yield mempty. The idea is to provide a handle on steps only executed for their side effects. For instance, if you want to run a collection of ProcessTs that await but don't yield some number of times, you can use 'fanOutSteps . map (fmap (const ()))' followed by a taking process.