Module

Run.Streaming.Pull

Package
purescript-run-streaming
Repository
natefaubion/purescript-run-streaming

This modules defines primitive fusion operations for pull streams.

#identity Source

identity :: forall a o i r. i -> Run (Pipe i o i o r) a

#chain Source

chain :: forall a o i r. (i -> Run (Server i o r) a) -> Run (Client i o r) a -> Run r a

Connects a Server to a Client which can fulfill requests from the Client.

#traverse Source

traverse :: forall a o i r. (i -> Run r o) -> Run (Client i o r) a -> Run r a

Fulfills a Client with effects.

#for Source

for :: forall a o i r. Run (Client i o r) a -> (i -> Run r o) -> Run r a

traverse with the arguments flipped.

#compose Source

compose :: forall a x o i r. (i -> Run (Server i o r) a) -> (x -> Run (Client i o r) a) -> (x -> Run r a)

Point-free pull composition.

#composeFlipped Source

composeFlipped :: forall a x o i r. (x -> Run (Client i o r) a) -> (i -> Run (Server i o r) a) -> (x -> Run r a)

compose with the arguments flipped.

#feed Source

feed :: forall a x r. Run (Consumer x r) a -> Run (Producer x r) a -> Run r a

Connects a Consumer to a Producer.

#draw Source

draw :: forall a x r. Run (Producer x r) a -> Run (Consumer x r) a -> Run r a

Connects a Producer to a Consumer.

#into Source

into :: forall a x r. Run (Consumer x r) a -> Run r x -> Run r a

Connects a Consumer to an effect which fulfills the request.

#from Source

from :: forall a x r. Run r x -> Run (Consumer x r) a -> Run r a

Connect an effect to a Consumer, fulfilling the request.

#consume Source

consume :: forall b a x r. (x -> Run (Consumer x r) a) -> Run (Consumer x r) b

Consumes all values with effects.