| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Foundation.Conduit
Synopsis
- data Conduit input output (monad :: Type -> Type) result
 - data ResourceT (m :: Type -> Type) a
 - newtype ZipSink i (m :: Type -> Type) r = ZipSink {
- getZipSink :: Conduit i () m r
 
 - await :: forall i o (m :: Type -> Type). Conduit i o m (Maybe i)
 - awaitForever :: forall input output (monad :: Type -> Type) b. (input -> Conduit input output monad b) -> Conduit input output monad ()
 - yield :: forall (m :: Type -> Type) o i. Monad m => o -> Conduit i o m ()
 - yields :: forall (m :: Type -> Type) os o i. (Monad m, Foldable os, Element os ~ o) => os -> Conduit i o m ()
 - yieldOr :: o -> m () -> Conduit i o m ()
 - leftover :: forall i o (m :: Type -> Type). i -> Conduit i o m ()
 - runConduit :: Monad m => Conduit () () m r -> m r
 - runConduitPure :: Conduit () () Identity r -> r
 - runConduitRes :: (MonadBracket m, MonadIO m) => Conduit () () (ResourceT m) r -> m r
 - fuse :: forall (m :: Type -> Type) a b c r. Monad m => Conduit a b m () -> Conduit b c m r -> Conduit a c m r
 - (.|) :: forall (m :: Type -> Type) a b c r. Monad m => Conduit a b m () -> Conduit b c m r -> Conduit a c m r
 - sourceFile :: forall (m :: Type -> Type) i. MonadResource m => FilePath -> Conduit i (UArray Word8) m ()
 - sourceHandle :: forall (m :: Type -> Type) i. MonadIO m => Handle -> Conduit i (UArray Word8) m ()
 - sinkFile :: forall (m :: Type -> Type) i. MonadResource m => FilePath -> Conduit (UArray Word8) i m ()
 - sinkHandle :: forall (m :: Type -> Type) o. MonadIO m => Handle -> Conduit (UArray Word8) o m ()
 - sinkList :: forall (m :: Type -> Type) i o. Monad m => Conduit i o m [i]
 - bracketConduit :: forall (m :: Type -> Type) a b i o r. MonadResource m => IO a -> (a -> IO b) -> (a -> Conduit i o m r) -> Conduit i o m r
 
Documentation
data Conduit input output (monad :: Type -> Type) result Source #
A component of a conduit pipeline, which takes a stream of
 input, produces a stream of output, performs actions in the
 underlying monad, and produces a value of result when no more
 output data is available.
Instances
| MonadTrans (Conduit i o) Source # | |
| MonadIO m => MonadIO (Conduit i o m) Source # | |
Defined in Foundation.Conduit.Internal  | |
| Applicative (Conduit i o m) Source # | |
Defined in Foundation.Conduit.Internal Methods pure :: a -> Conduit i o m a # (<*>) :: Conduit i o m (a -> b) -> Conduit i o m a -> Conduit i o m b # liftA2 :: (a -> b -> c) -> Conduit i o m a -> Conduit i o m b -> Conduit i o m c # (*>) :: Conduit i o m a -> Conduit i o m b -> Conduit i o m b # (<*) :: Conduit i o m a -> Conduit i o m b -> Conduit i o m a #  | |
| Functor (Conduit i o m) Source # | |
| Monad (Conduit i o m) Source # | |
| MonadFailure m => MonadFailure (Conduit i o m) Source # | |
| MonadCatch m => MonadCatch (Conduit i o m) Source # | |
| MonadThrow m => MonadThrow (Conduit i o m) Source # | |
| type Failure (Conduit i o m) Source # | |
Defined in Foundation.Conduit.Internal  | |
data ResourceT (m :: Type -> Type) a Source #
Instances
| MonadTrans ResourceT Source # | |
| MonadIO m => MonadIO (ResourceT m) Source # | |
Defined in Foundation.Conduit.Internal  | |
| Applicative m => Applicative (ResourceT m) Source # | |
Defined in Foundation.Conduit.Internal  | |
| Functor m => Functor (ResourceT m) Source # | |
| Monad m => Monad (ResourceT m) Source # | |
| MonadBracket m => MonadBracket (ResourceT m) Source # | |
Defined in Foundation.Conduit.Internal Methods generalBracket :: ResourceT m a -> (a -> b -> ResourceT m ignored1) -> (a -> SomeException -> ResourceT m ignored2) -> (a -> ResourceT m b) -> ResourceT m b Source #  | |
| MonadCatch m => MonadCatch (ResourceT m) Source # | |
| MonadThrow m => MonadThrow (ResourceT m) Source # | |
newtype ZipSink i (m :: Type -> Type) r Source #
Constructors
| ZipSink | |
Fields 
  | |
await :: forall i o (m :: Type -> Type). Conduit i o m (Maybe i) Source #
Await for a value from upstream.
awaitForever :: forall input output (monad :: Type -> Type) b. (input -> Conduit input output monad b) -> Conduit input output monad () Source #
yield :: forall (m :: Type -> Type) o i. Monad m => o -> Conduit i o m () Source #
Send a value downstream.
yields :: forall (m :: Type -> Type) os o i. (Monad m, Foldable os, Element os ~ o) => os -> Conduit i o m () Source #
Send values downstream.
Arguments
| :: o | |
| -> m () | finalizer  | 
| -> Conduit i o m () | 
Same as yield, but additionally takes a finalizer to be run if
 the downstream component terminates.
leftover :: forall i o (m :: Type -> Type). i -> Conduit i o m () Source #
Provide leftover input to be consumed by the next component in the current monadic binding.
runConduit :: Monad m => Conduit () () m r -> m r Source #
Run a conduit pipeline to completion.
runConduitPure :: Conduit () () Identity r -> r Source #
Run a pure conduit pipeline to completion.
runConduitRes :: (MonadBracket m, MonadIO m) => Conduit () () (ResourceT m) r -> m r Source #
Run a conduit pipeline in a ResourceT context for acquiring resources.
fuse :: forall (m :: Type -> Type) a b c r. Monad m => Conduit a b m () -> Conduit b c m r -> Conduit a c m r Source #
Send the output of the first Conduit component to the second Conduit component.
(.|) :: forall (m :: Type -> Type) a b c r. Monad m => Conduit a b m () -> Conduit b c m r -> Conduit a c m r infixr 2 Source #
Operator version of fuse.
sourceFile :: forall (m :: Type -> Type) i. MonadResource m => FilePath -> Conduit i (UArray Word8) m () Source #
sourceHandle :: forall (m :: Type -> Type) i. MonadIO m => Handle -> Conduit i (UArray Word8) m () Source #
sinkFile :: forall (m :: Type -> Type) i. MonadResource m => FilePath -> Conduit (UArray Word8) i m () Source #