ListT package:pipes

The list monad transformer, which extends a monad with non-determinism The type variables signify:
  • m - The base monad
  • a - The values that the computation yields throughout its execution
For basic construction and composition of ListT computations, much can be accomplished using common typeclass methods.
  • return corresponds to yield, yielding a single value.
  • (>>=) corresponds to for, calling the second computation once for each time the first computation yields.
  • mempty neither yields any values nor produces any effects in the base monad.
  • (<>) sequences two computations, yielding all the values of the first followed by all the values of the second.
  • lift converts an action in the base monad into a ListT computation which performs the action and yields a single value.
ListT is a newtype wrapper for Producer. You will likely need to use Select and enumerate to convert back and forth between these two types to take advantage of all the Producer-related utilities that Pipes.Prelude has to offer.
Run a self-contained ListT computation