LanguageExt.Pipes

LanguageExt.Pipes PureProxy

This folder contains a number of micro-free-monads that allow for creation of pure producers, consumers, and pipes. They're used to facilitate the building of Proxy derived types without the need for typing the generic arguments endlessly.

The original Haskell Pipes library could auto-infer the generic parameter types, the system here tries to replicate manually what Haskell can do automatically. Hence why there are so many implementations of SelectMany!

Mostly you shouldn't need to care too much about the types in this folder as they're effectively 'intermediate' types.

Contents

class Consumer <IN, A> Source #

Methods

method Consumer<IN, B> Select <B> (Func<A, B> f) Source #

method Consumer<IN, B> Bind <B> (Func<A, Consumer<IN, B>> f) Source #

method Consumer<IN, M, B> Bind <M, B> (Func<A, Consumer<IN, M, B>> f) Source #

where M : Monad<M>

method Pipe<IN, OUT, B> Bind <OUT, B> (Func<A, Producer<OUT, B>> f) Source #

method Consumer<IN, B> Bind <B> (Func<A, Pure<B>> f) Source #

method Consumer<IN, B> Bind <B> (Func<A, Fail<Error>> f) Source #

method Consumer<IN, M, B> Bind <M, B> (Func<A, K<M, B>> f) Source #

where M : Monad<M>

method Consumer<IN, B> Bind <B> (Func<A, IO<B>> f) Source #

method Consumer<IN, M, A> Interpret <M> () Source #

where M : Monad<M>

method Pipe<IN, OUT, A> ToPipe <OUT> () Source #

method Consumer<IN, B> Map <B> (Func<A, B> f) Source #

method Consumer<IN, C> SelectMany <B, C> (Func<A, Pure<B>> f, Func<A, B, C> project) Source #

method Consumer<IN, C> SelectMany <B, C> (Func<A, Fail<Error>> f, Func<A, B, C> project) Source #

method Consumer<IN, C> SelectMany <B, C> (Func<A, IO<B>> f, Func<A, B, C> project) Source #

method Consumer<IN, M, C> SelectMany <M, B, C> (Func<A, K<M, B>> f, Func<A, B, C> project) Source #

where M : Monad<M>

method Consumer<IN, C> SelectMany <B, C> (Func<A, Consumer<IN, B>> f, Func<A, B, C> project) Source #

method Consumer<IN, M, C> SelectMany <M, B, C> (Func<A, Consumer<IN, M, B>> f, Func<A, B, C> project) Source #

where M : Monad<M>

method Pipe<IN, OUT, C> SelectMany <OUT, B, C> (Func<A, Producer<OUT, B>> f, Func<A, B, C> project) Source #

method Consumer<IN, C> SelectMany <C> (Func<A, Guard<Error, Unit>> bind, Func<A, Unit, C> project ) Source #

Operators

operator & ( Consumer<IN, A> lhs, Consumer<IN, A> rhs) Source #

class Pure Source #

Methods

method Consumer<IN, B> Select <B> (Func<A, B> f) Source #

method Consumer<IN, B> Bind <B> (Func<A, Consumer<IN, B>> f) Source #

method Consumer<IN, M, B> Bind <M, B> (Func<A, Consumer<IN, M, B>> f) Source #

method Pipe<IN, OUT, B> Bind <OUT, B> (Func<A, Producer<OUT, B>> f) Source #

method Consumer<IN, M, A> Interpret <M> () Source #

method Pipe<IN, OUT, A> ToPipe <OUT> () Source #

class Fail Source #

Methods

method Consumer<IN, B> Select <B> (Func<A, B> _) Source #

method Consumer<IN, B> Bind <B> (Func<A, Consumer<IN, B>> _) Source #

method Consumer<IN, M, B> Bind <M, B> (Func<A, Consumer<IN, M, B>> f) Source #

method Pipe<IN, OUT, B> Bind <OUT, B> (Func<A, Producer<OUT, B>> _) Source #

method Consumer<IN, M, A> Interpret <M> () Source #

method Pipe<IN, OUT, A> ToPipe <OUT> () Source #

class Lift <X> Source #

Methods

method Consumer<IN, B> Select <B> (Func<A, B> f) Source #

method Consumer<IN, B> Bind <B> (Func<A, Consumer<IN, B>> f) Source #

method Consumer<IN, M, B> Bind <M, B> (Func<A, Consumer<IN, M, B>> f) Source #

method Pipe<IN, OUT, B> Bind <OUT, B> (Func<A, Producer<OUT, B>> f) Source #

method Consumer<IN, M, A> Interpret <M> () Source #

method Pipe<IN, OUT, A> ToPipe <OUT> () Source #

class LiftIO <X> Source #

Methods

method Consumer<IN, B> Select <B> (Func<A, B> f) Source #

method Consumer<IN, B> Bind <B> (Func<A, Consumer<IN, B>> f) Source #

method Consumer<IN, M, B> Bind <M, B> (Func<A, Consumer<IN, M, B>> f) Source #

method Pipe<IN, OUT, B> Bind <OUT, B> (Func<A, Producer<OUT, B>> f) Source #

method Consumer<IN, M, A> Interpret <M> () Source #

method Pipe<IN, OUT, A> ToPipe <OUT> () Source #

class Await Source #

Fields

field Func<IN, Consumer<IN, A>> Next Source #

Constructors

constructor Await (Func<IN, Consumer<IN, A>> next) Source #

Methods

method Consumer<IN, B> Select <B> (Func<A, B> f) Source #

method Consumer<IN, B> Bind <B> (Func<A, Consumer<IN, B>> f) Source #

method Consumer<IN, M, B> Bind <M, B> (Func<A, Consumer<IN, M, B>> f) Source #

method Pipe<IN, OUT, B> Bind <OUT, B> (Func<A, Producer<OUT, B>> f) Source #

method Consumer<IN, M, A> Interpret <M> () Source #

method Pipe<IN, OUT, A> ToPipe <OUT> () Source #

class Fold <F, X> Source #

where F : Foldable<F>

Methods

method Consumer<IN, B> Select <B> (Func<A, B> f) Source #

method Consumer<IN, B> Bind <B> (Func<A, Consumer<IN, B>> f) Source #

method Consumer<IN, M, B> Bind <M, B> (Func<A, Consumer<IN, M, B>> f) Source #

method Pipe<IN, OUT, B> Bind <OUT, B> (Func<A, Producer<OUT, B>> f) Source #

method Consumer<IN, M, A> Interpret <M> () Source #

method Pipe<IN, OUT, A> ToPipe <OUT> () Source #

class Pipe <IN, OUT, A> Source #

Methods

method Pipe<IN, OUT, B> Select <B> (Func<A, B> f) Source #

method Pipe<IN, OUT, M, A> Interpret <M> () Source #

where M : Monad<M>

method Pipe<IN, OUT, B> Bind <B> (Func<A, Pipe<IN, OUT, B>> f) Source #

method Pipe<IN, OUT, M, B> Bind <M, B> (Func<A, Pipe<IN, OUT, M, B>> f) Source #

where M : Monad<M>

method Pipe<IN, OUT, B> Bind <B> (Func<A, Consumer<IN, B>> f) Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Producer<OUT, B>> f) Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Pure<B>> f) Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Fail<Error>> f) Source #

method Pipe<IN, OUT, M, B> Bind <M, B> (Func<A, K<M, B>> f) Source #

where M : Monad<M>

method Pipe<IN, OUT, B> Bind <B> (Func<A, IO<B>> f) Source #

method Pipe<IN, OUT, B> Map <B> (Func<A, B> f) Source #

method Pipe<IN, OUT, C> SelectMany <B, C> (Func<A, Pipe<IN, OUT, B>> f, Func<A, B, C> project) Source #

method Pipe<IN, OUT, C> SelectMany <B, C> (Func<A, Pure<B>> f, Func<A, B, C> project) Source #

method Pipe<IN, OUT, C> SelectMany <B, C> (Func<A, Fail<Error>> f, Func<A, B, C> project) Source #

method Pipe<IN, OUT, M, C> SelectMany <M, B, C> (Func<A, K<M, B>> f, Func<A, B, C> project) Source #

where M : Monad<M>

method Pipe<IN, OUT, C> SelectMany <B, C> (Func<A, IO<B>> f, Func<A, B, C> project) Source #

method Pipe<IN, OUT, M, C> SelectMany <M, B, C> (Func<A, Pipe<IN, OUT, M, B>> f, Func<A, B, C> project) Source #

where M : Monad<M>

method Pipe<IN, OUT, C> SelectMany <B, C> (Func<A, Consumer<IN, B>> f, Func<A, B, C> project) Source #

method Pipe<IN, OUT, C> SelectMany <B, C> (Func<A, Producer<OUT, B>> f, Func<A, B, C> project) Source #

method Pipe<IN, OUT, C> SelectMany <C> (Func<A, Guard<Error, Unit>> bind, Func<A, Unit, C> project ) Source #

Operators

operator & ( Pipe<IN, OUT, A> lhs, Pipe<IN, OUT, A> rhs) Source #

class Pure Source #

Methods

method Pipe<IN, OUT, B> Select <B> (Func<A, B> f) Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Pipe<IN, OUT, B>> f) Source #

method Pipe<IN, OUT, M, B> Bind <M, B> (Func<A, Pipe<IN, OUT, M, B>> f) Source #

method Pipe<IN, OUT, M, A> Interpret <M> () Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Consumer<IN, B>> f) Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Producer<OUT, B>> f) Source #

class Fail Source #

Methods

method Pipe<IN, OUT, B> Select <B> (Func<A, B> _) Source #

method Pipe<IN, OUT, M, A> Interpret <M> () Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Pipe<IN, OUT, B>> f) Source #

method Pipe<IN, OUT, M, B> Bind <M, B> (Func<A, Pipe<IN, OUT, M, B>> f) Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Consumer<IN, B>> _) Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Producer<OUT, B>> f) Source #

class Lift <X> Source #

Methods

method Pipe<IN, OUT, B> Select <B> (Func<A, B> f) Source #

method Pipe<IN, OUT, M, A> Interpret <M> () Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Pipe<IN, OUT, B>> f) Source #

method Pipe<IN, OUT, M, B> Bind <M, B> (Func<A, Pipe<IN, OUT, M, B>> f) Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Consumer<IN, B>> f) Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Producer<OUT, B>> f) Source #

class LiftIO <X> Source #

Methods

method Pipe<IN, OUT, B> Select <B> (Func<A, B> f) Source #

method Pipe<IN, OUT, M, A> Interpret <M> () Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Pipe<IN, OUT, B>> f) Source #

method Pipe<IN, OUT, M, B> Bind <M, B> (Func<A, Pipe<IN, OUT, M, B>> f) Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Consumer<IN, B>> f) Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Producer<OUT, B>> f) Source #

class Await Source #

Methods

method Pipe<IN, OUT, B> Select <B> (Func<A, B> f) Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Pipe<IN, OUT, B>> f) Source #

method Pipe<IN, OUT, M, B> Bind <M, B> (Func<A, Pipe<IN, OUT, M, B>> f) Source #

method Pipe<IN, OUT, M, A> Interpret <M> () Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Consumer<IN, B>> f) Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Producer<OUT, B>> f) Source #

class Yield Source #

Methods

method Pipe<IN, OUT, B> Select <B> (Func<A, B> f) Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Pipe<IN, OUT, B>> f) Source #

method Pipe<IN, OUT, M, B> Bind <M, B> (Func<A, Pipe<IN, OUT, M, B>> f) Source #

method Pipe<IN, OUT, M, A> Interpret <M> () Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Consumer<IN, B>> f) Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Producer<OUT, B>> f) Source #

class Fold <F, X> Source #

where F : Foldable<F>

Methods

method Pipe<IN, OUT, B> Select <B> (Func<A, B> f) Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Pipe<IN, OUT, B>> f) Source #

method Pipe<IN, OUT, M, B> Bind <M, B> (Func<A, Pipe<IN, OUT, M, B>> f) Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Consumer<IN, B>> f) Source #

method Pipe<IN, OUT, B> Bind <B> (Func<A, Producer<OUT, B>> f) Source #

method Pipe<IN, OUT, M, A> Interpret <M> () Source #

class Producer <OUT, A> Source #

Methods

method Producer<OUT, B> Select <B> (Func<A, B> f) Source #

method Producer<OUT, B> Bind <B> (Func<A, Producer<OUT, B>> f) Source #

method Producer<OUT, M, B> Bind <M, B> (Func<A, Producer<OUT, M, B>> f) Source #

where M : Monad<M>

method Producer<OUT, M, A> Interpret <M> () Source #

where M : Monad<M>

method Pipe<IN, OUT, A> ToPipe <IN> () Source #

method Producer<OUT, B> Bind <B> (Func<A, Pure<B>> f) Source #

method Producer<OUT, B> Bind <B> (Func<A, Fail<Error>> f) Source #

method Producer<OUT, M, B> Bind <M, B> (Func<A, K<M, B>> f) Source #

where M : Monad<M>

method Producer<OUT, B> Bind <B> (Func<A, IO<B>> f) Source #

method Producer<OUT, B> Map <B> (Func<A, B> f) Source #

method Producer<OUT, C> SelectMany <B, C> (Func<A, Producer<OUT, B>> f, Func<A, B, C> project) Source #

method Producer<OUT, M, C> SelectMany <M, B, C> (Func<A, Producer<OUT, M, B>> f, Func<A, B, C> project) Source #

where M : Monad<M>

method Producer<OUT, C> SelectMany <B, C> (Func<A, Pure<B>> f, Func<A, B, C> project) Source #

method Producer<OUT, C> SelectMany <B, C> (Func<A, Fail<Error>> f, Func<A, B, C> project) Source #

method Producer<OUT, C> SelectMany <B, C> (Func<A, IO<B>> f, Func<A, B, C> project) Source #

method Producer<OUT, M, C> SelectMany <B, M, C> (Func<A, K<M, B>> f, Func<A, B, C> project) Source #

where M : Monad<M>

method Producer<OUT, C> SelectMany <C> (Func<A, Guard<Error, Unit>> bind, Func<A, Unit, C> project ) Source #

Operators

operator & ( Producer<OUT, A> lhs, Producer<OUT, A> rhs) Source #

class Pure Source #

Methods

method Producer<OUT, B> Select <B> (Func<A, B> f) Source #

method Producer<OUT, B> Bind <B> (Func<A, Producer<OUT, B>> f) Source #

method Producer<OUT, M, B> Bind <M, B> (Func<A, Producer<OUT, M, B>> f) Source #

method Producer<OUT, M, A> Interpret <M> () Source #

method Pipe<IN, OUT, A> ToPipe <IN> () Source #

class Fail Source #

Methods

method Producer<OUT, B> Select <B> (Func<A, B> _) Source #

method Producer<OUT, B> Bind <B> (Func<A, Producer<OUT, B>> f) Source #

method Producer<OUT, M, B> Bind <M, B> (Func<A, Producer<OUT, M, B>> f) Source #

method Producer<OUT, M, A> Interpret <M> () Source #

method Pipe<IN, OUT, A> ToPipe <IN> () Source #

class Lift <X> Source #

Methods

method Producer<OUT, B> Select <B> (Func<A, B> f) Source #

method Producer<OUT, B> Bind <B> (Func<A, Producer<OUT, B>> f) Source #

method Producer<OUT, M, B> Bind <M, B> (Func<A, Producer<OUT, M, B>> f) Source #

method Producer<OUT, M, A> Interpret <M> () Source #

method Pipe<IN, OUT, A> ToPipe <IN> () Source #

class LiftIO <X> Source #

Methods

method Producer<OUT, B> Select <B> (Func<A, B> f) Source #

method Producer<OUT, B> Bind <B> (Func<A, Producer<OUT, B>> f) Source #

method Producer<OUT, M, B> Bind <M, B> (Func<A, Producer<OUT, M, B>> f) Source #

method Producer<OUT, M, A> Interpret <M> () Source #

method Pipe<IN, OUT, A> ToPipe <IN> () Source #

class Yield Source #

Methods

method Producer<OUT, B> Select <B> (Func<A, B> f) Source #

method Producer<OUT, B> Bind <B> (Func<A, Producer<OUT, B>> f) Source #

method Producer<OUT, M, B> Bind <M, B> (Func<A, Producer<OUT, M, B>> f) Source #

method Producer<OUT, M, A> Interpret <M> () Source #

method Pipe<IN, OUT, A> ToPipe <IN> () Source #

class Fold <F, X> Source #

where F : Foldable<F>

Methods

method Producer<OUT, B> Select <B> (Func<A, B> f) Source #

method Producer<OUT, B> Bind <B> (Func<A, Producer<OUT, B>> f) Source #

method Producer<OUT, M, B> Bind <M, B> (Func<A, Producer<OUT, M, B>> f) Source #

method Producer<OUT, M, A> Interpret <M> () Source #

method Pipe<IN, OUT, A> ToPipe <IN> () Source #

class PureProxy Source #

Methods

method Pipe<IN, OUT, A> PipePure <IN, OUT, A> (A value) Source #

method Producer<OUT, A> ProducerPure <OUT, A> (A value) Source #

method Consumer<IN, A> ConsumerPure <IN, A> (A value) Source #

method Pipe<IN, OUT, A> PipeFail <IN, OUT, A> (Error value) Source #

method Producer<OUT, A> ProducerFail <OUT, A> (Error value) Source #

method Consumer<IN, A> ConsumerFail <IN, A> (Error value) Source #

method Pipe<IN, OUT, A> PipeLift <IN, OUT, A> (Func<A> t) Source #

method Producer<OUT, A> ProducerLift <OUT, A> (Func<A> t) Source #

method Consumer<IN, A> ConsumerLift <IN, A> (Func<A> t) Source #

method Pipe<IN, OUT, A> PipeLiftIO <IN, OUT, A> (IO<A> ma) Source #

method Producer<OUT, A> ProducerLiftIO <OUT, A> (IO<A> ma) Source #

method Consumer<IN, A> ConsumerLiftIO <IN, A> (IO<A> ma) Source #

method Pipe<IN, OUT, Unit> PipeFold <IN, F, OUT> (K<F, OUT> items) Source #

where F : Foldable<F>

method Producer<OUT, Unit> ProducerFold <F, OUT> (K<F, OUT> items) Source #

where F : Foldable<F>

method Consumer<IN, Unit> ConsumerFold <IN, F, A> (K<F, A> items) Source #

where F : Foldable<F>

method Consumer<IN, IN> ConsumerAwait <IN> () Source #

method Pipe<IN, OUT, IN> PipeAwait <IN, OUT> () Source #

method Producer<OUT, Unit> ProducerYield <OUT> (OUT value) Source #

method Pipe<IN, OUT, Unit> PipeYield <IN, OUT> (OUT value) Source #

method Consumer<IN, M, C> SelectMany <IN, M, A, B, C> (this K<M, A> ma, Func<A, Consumer<IN, B>> f, Func<A, B, C> project) Source #

where M : Monad<M>

method Producer<OUT, M, C> SelectMany <OUT, M, A, B, C> (this K<M, A> ma, Func<A, Producer<OUT, B>> f, Func<A, B, C> project) Source #

where M : Monad<M>

method Pipe<IN, OUT, M, C> SelectMany <IN, OUT, M, A, B, C> (this K<M, A> ma, Func<A, Pipe<IN, OUT, B>> f, Func<A, B, C> project) Source #

where M : Monad<M>

method Consumer<IN, M, C> SelectMany <IN, M, A, B, C> (this K<M, A> ma, Func<A, Consumer<IN, M, B>> f, Func<A, B, C> project) Source #

where M : Monad<M>

method Producer<OUT, M, C> SelectMany <OUT, M, A, B, C> (this K<M, A> ma, Func<A, Producer<OUT, M, B>> f, Func<A, B, C> project) Source #

where M : Monad<M>

method Pipe<IN, OUT, M, C> SelectMany <IN, OUT, M, A, B, C> (this K<M, A> ma, Func<A, Pipe<IN, OUT, M, B>> f, Func<A, B, C> project) Source #

where M : Monad<M>