Data.Conduit.Internal.Fusion

conduit-1.2.6: Streaming data processing library.

Safe Haskell | Trustworthy
Language | Haskell98

Data.Conduit.Internal.Fusion

Contents

- Types
- Functions

Synopsis

- data Step s o r
  - = Emit s o
  - | Skip s
  - | Stop r
- data Stream m o r = forall s . Stream (s -> m (Step s o r)) (m s)
- data ConduitWithStream i o m r
- type StreamConduitM i o m r = Stream m i () -> Stream m o r
- type StreamConduit i m o = StreamConduitM i o m ()
- type StreamSource m o = StreamConduitM () o m ()
- type StreamProducer m o = forall i. StreamConduitM i o m ()
- type StreamSink i m r = StreamConduitM i Void m r
- type StreamConsumer i m r = forall o. StreamConduitM i o m r
- streamConduit :: ConduitM i o m r -> (Stream m i () -> Stream m o r) -> ConduitWithStream i o m r
- streamSource :: Monad m => Stream m o () -> ConduitWithStream i o m ()
- streamSourcePure :: Monad m => Stream Identity o () -> ConduitWithStream i o m ()
- unstream :: ConduitWithStream i o m r -> ConduitM i o m r

## Types

data Step s o r

This is the same as stream fusion's Step. Constructors are renamed to avoid confusion with conduit names.

Constructors

Emit s o |
Skip s |
Stop r |

Instances

Functor (Step s o) |

data Stream m o r

Constructors

forall s . Stream (s -> m (Step s o r)) (m s) |

data ConduitWithStream i o m r

type StreamConduitM i o m r = Stream m i () -> Stream m o r

type StreamConduit i m o = StreamConduitM i o m ()

type StreamSource m o = StreamConduitM () o m ()

type StreamProducer m o = forall i. StreamConduitM i o m ()

type StreamSink i m r = StreamConduitM i Void m r

type StreamConsumer i m r = forall o. StreamConduitM i o m r

## Functions

streamConduit :: ConduitM i o m r -> (Stream m i () -> Stream m o r) -> ConduitWithStream i o m r

streamSource :: Monad m => Stream m o () -> ConduitWithStream i o m ()

streamSourcePure :: Monad m => Stream Identity o () -> ConduitWithStream i o m ()

unstream :: ConduitWithStream i o m r -> ConduitM i o m r