HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulestreamly-core-0.2.2Haskell2010

Streamly.Internal.Data.Pipe

There are three fundamental types in streamly. They are streams (Streamly.Data.Stream), pipes (Streamly.Internal.Data.Pipe) and folds (Streamly.Data.Fold). Streams are sources or producers of values, multiple sources can be merged into a single source but a source cannot be split into multiple stream sources. Folds are sinks or consumers, a stream can be split and distributed to multiple folds but the results cannot be merged back into a stream source again. Pipes are transformations, a stream source can be split and distributed to multiple pipes each pipe can apply its own transform on the stream and the results can be merged back into a single pipe. Pipes can be attached to a source to produce a source or they can be attached to a fold to produce a fold, or multiple pipes can be merged or zipped into a single pipe.

import qualified Streamly.Internal.Data.Pipe as Pipe
  • 3 types
  • 5 values

Pipe Type

7 declarations
valuezipWith
  1. :: Monad m
  2. => a -> b -> c
  3. -> Pipe m i a
  4. -> Pipe m i b
  5. -> Pipe m i c
#

The composed pipe distributes the input to both the constituent pipes and zips the output of the two using a supplied zipping function.

datadata Pipe (m :: Type -> Type) a b
#

Constructors

Instances5Category, Arrow, Functor, Applicative, Semigroup
  • Monad m => Category (Pipe m)Defined in streamly-core-0.2.2 · Streamly.Internal.Data.Pipe.Type
  • Monad m => Arrow (Pipe m)Defined in streamly-core-0.2.2 · Streamly.Internal.Data.Pipe.Type
  • Monad m => Functor (Pipe m a)Defined in streamly-core-0.2.2 · Streamly.Internal.Data.Pipe.Type
  • Monad m => Applicative (Pipe m a)Defined in streamly-core-0.2.2 · Streamly.Internal.Data.Pipe.Type
  • Monad m => Semigroup (Pipe m a b)Defined in streamly-core-0.2.2 · Streamly.Internal.Data.Pipe.Type
valuetee :: Monad m => Pipe m a b -> Pipe m a b -> Pipe m a b
#

The composed pipe distributes the input to both the constituent pipes and merges the outputs of the two.

datadata PipeState s1 s2
#

Represents a stateful transformation over an input stream of values of type a to outputs of type b in Monad m.

Constructors

valuecompose :: Monad m => Pipe m b c -> Pipe m a b -> Pipe m a c
#

Compose two pipes such that the output of the second pipe is attached to the input of the first pipe.

Pipes

0 declarations

Mapping