Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Conduit.Combinators
Description
This module is meant as a replacement for Data.Conduit.List. That module follows a naming scheme which was originally inspired by its enumerator roots. This module is meant to introduce a naming scheme which encourages conduit best practices.
There are two versions of functions in this module. Those with a trailing E work in the individual elements of a chunk of data, e.g., the bytes of a ByteString, the Chars of a Text, or the Ints of a Vector Int. Those without a trailing E work on unchunked streams.
FIXME: discuss overall naming, usage of mono-traversable, etc
Mention take (Conduit) vs drop (Consumer)
Synopsis
- yieldMany :: forall (m :: Type -> Type) mono i. (Monad m, MonoFoldable mono) => mono -> ConduitT i (Element mono) m ()
- unfold :: forall (m :: Type -> Type) b a i. Monad m => (b -> Maybe (a, b)) -> b -> ConduitT i a m ()
- enumFromTo :: forall (m :: Type -> Type) a i. (Monad m, Enum a, Ord a) => a -> a -> ConduitT i a m ()
- iterate :: forall (m :: Type -> Type) a i. Monad m => (a -> a) -> a -> ConduitT i a m ()
- repeat :: forall (m :: Type -> Type) a i. Monad m => a -> ConduitT i a m ()
- replicate :: forall (m :: Type -> Type) a i. Monad m => Int -> a -> ConduitT i a m ()
- sourceLazy :: forall (m :: Type -> Type) lazy strict i. (Monad m, LazySequence lazy strict) => lazy -> ConduitT i strict m ()
- repeatM :: Monad m => m a -> ConduitT i a m ()
- repeatWhileM :: Monad m => m a -> (a -> Bool) -> ConduitT i a m ()
- replicateM :: Monad m => Int -> m a -> ConduitT i a m ()
- sourceFile :: forall (m :: Type -> Type) i. MonadResource m => FilePath -> ConduitT i ByteString m ()
- sourceFileBS :: forall (m :: Type -> Type) i. MonadResource m => FilePath -> ConduitT i ByteString m ()
- sourceHandle :: forall (m :: Type -> Type) i. MonadIO m => Handle -> ConduitT i ByteString m ()
- sourceHandleUnsafe :: forall (m :: Type -> Type) i. MonadIO m => Handle -> ConduitT i ByteString m ()
- sourceIOHandle :: forall (m :: Type -> Type) i. MonadResource m => IO Handle -> ConduitT i ByteString m ()
- stdin :: forall (m :: Type -> Type) i. MonadIO m => ConduitT i ByteString m ()
- withSourceFile :: forall m (n :: Type -> Type) i a. (MonadUnliftIO m, MonadIO n) => FilePath -> (ConduitM i ByteString n () -> m a) -> m a
- sourceDirectory :: forall (m :: Type -> Type) i. MonadResource m => FilePath -> ConduitT i FilePath m ()
- sourceDirectoryDeep :: forall (m :: Type -> Type) i. MonadResource m => Bool -> FilePath -> ConduitT i FilePath m ()
- drop :: forall (m :: Type -> Type) a o. Monad m => Int -> ConduitT a o m ()
- dropE :: forall (m :: Type -> Type) seq o. (Monad m, IsSequence seq) => Index seq -> ConduitT seq o m ()
- dropWhile :: forall (m :: Type -> Type) a o. Monad m => (a -> Bool) -> ConduitT a o m ()
- dropWhileE :: forall (m :: Type -> Type) seq o. (Monad m, IsSequence seq) => (Element seq -> Bool) -> ConduitT seq o m ()
- fold :: forall (m :: Type -> Type) a o. (Monad m, Monoid a) => ConduitT a o m a
- foldE :: forall (m :: Type -> Type) mono o. (Monad m, MonoFoldable mono, Monoid (Element mono)) => ConduitT mono o m (Element mono)
- foldl :: forall (m :: Type -> Type) a b o. Monad m => (a -> b -> a) -> a -> ConduitT b o m a
- foldl1 :: forall (m :: Type -> Type) a o. Monad m => (a -> a -> a) -> ConduitT a o m (Maybe a)
- foldlE :: forall (m :: Type -> Type) mono a o. (Monad m, MonoFoldable mono) => (a -> Element mono -> a) -> a -> ConduitT mono o m a
- foldMap :: forall (m :: Type -> Type) b a o. (Monad m, Monoid b) => (a -> b) -> ConduitT a o m b
- foldMapE :: forall (m :: Type -> Type) mono w o. (Monad m, MonoFoldable mono, Monoid w) => (Element mono -> w) -> ConduitT mono o m w
- foldWhile :: forall (m :: Type -> Type) a s e o. Monad m => (a -> s -> Either e s) -> s -> ConduitT a o m (Either e s)
- all :: forall (m :: Type -> Type) a o. Monad m => (a -> Bool) -> ConduitT a o m Bool
- allE :: forall (m :: Type -> Type) mono o. (Monad m, MonoFoldable mono) => (Element mono -> Bool) -> ConduitT mono o m Bool
- any :: forall (m :: Type -> Type) a o. Monad m => (a -> Bool) -> ConduitT a o m Bool
- anyE :: forall (m :: Type -> Type) mono o. (Monad m, MonoFoldable mono) => (Element mono -> Bool) -> ConduitT mono o m Bool
- and :: forall (m :: Type -> Type) o. Monad m => ConduitT Bool o m Bool
- andE :: forall (m :: Type -> Type) mono o. (Monad m, MonoFoldable mono, Element mono ~ Bool) => ConduitT mono o m Bool
- or :: forall (m :: Type -> Type) o. Monad m => ConduitT Bool o m Bool
- orE :: forall (m :: Type -> Type) mono o. (Monad m, MonoFoldable mono, Element mono ~ Bool) => ConduitT mono o m Bool
- asum :: forall (m :: Type -> Type) f a o. (Monad m, Alternative f) => ConduitT (f a) o m (f a)
- elem :: forall (m :: Type -> Type) a o. (Monad m, Eq a) => a -> ConduitT a o m Bool
- elemE :: forall (m :: Type -> Type) seq o. (Monad m, IsSequence seq, Eq (Element seq)) => Element seq -> ConduitT seq o m Bool
- notElem :: forall (m :: Type -> Type) a o. (Monad m, Eq a) => a -> ConduitT a o m Bool
- notElemE :: forall (m :: Type -> Type) seq o. (Monad m, IsSequence seq, Eq (Element seq)) => Element seq -> ConduitT seq o m Bool
- sinkLazy :: forall (m :: Type -> Type) lazy strict o. (Monad m, LazySequence lazy strict) => ConduitT strict o m lazy
- sinkList :: forall (m :: Type -> Type) a o. Monad m => ConduitT a o m [a]
- sinkVector :: forall v a (m :: Type -> Type) o. (Vector v a, PrimMonad m) => ConduitT a o m (v a)
- sinkVectorN :: forall v a (m :: Type -> Type) o. (Vector v a, PrimMonad m) => Int -> ConduitT a o m (v a)
- sinkLazyBuilder :: forall (m :: Type -> Type) o. Monad m => ConduitT Builder o m ByteString
- sinkNull :: forall (m :: Type -> Type) a o. Monad m => ConduitT a o m ()
- awaitNonNull :: forall (m :: Type -> Type) a o. (Monad m, MonoFoldable a) => ConduitT a o m (Maybe (NonNull a))
- head :: forall (m :: Type -> Type) a o. Monad m => ConduitT a o m (Maybe a)
- headDef :: forall (m :: Type -> Type) a o. Monad m => a -> ConduitT a o m a
- headE :: forall (m :: Type -> Type) seq o. (Monad m, IsSequence seq) => ConduitT seq o m (Maybe (Element seq))
- peek :: forall (m :: Type -> Type) a o. Monad m => ConduitT a o m (Maybe a)
- peekE :: forall (m :: Type -> Type) mono o. (Monad m, MonoFoldable mono) => ConduitT mono o m (Maybe (Element mono))
- last :: forall (m :: Type -> Type) a o. Monad m => ConduitT a o m (Maybe a)
- lastDef :: forall (m :: Type -> Type) a o. Monad m => a -> ConduitT a o m a
- lastE :: forall (m :: Type -> Type) seq o. (Monad m, IsSequence seq) => ConduitT seq o m (Maybe (Element seq))
- length :: forall (m :: Type -> Type) len a o. (Monad m, Num len) => ConduitT a o m len
- lengthE :: forall (m :: Type -> Type) len mono o. (Monad m, Num len, MonoFoldable mono) => ConduitT mono o m len
- lengthIf :: forall (m :: Type -> Type) len a o. (Monad m, Num len) => (a -> Bool) -> ConduitT a o m len
- lengthIfE :: forall (m :: Type -> Type) len mono o. (Monad m, Num len, MonoFoldable mono) => (Element mono -> Bool) -> ConduitT mono o m len
- maximum :: forall (m :: Type -> Type) a o. (Monad m, Ord a) => ConduitT a o m (Maybe a)
- maximumE :: forall (m :: Type -> Type) seq o. (Monad m, IsSequence seq, Ord (Element seq)) => ConduitT seq o m (Maybe (Element seq))
- minimum :: forall (m :: Type -> Type) a o. (Monad m, Ord a) => ConduitT a o m (Maybe a)
- minimumE :: forall (m :: Type -> Type) seq o. (Monad m, IsSequence seq, Ord (Element seq)) => ConduitT seq o m (Maybe (Element seq))
- null :: forall (m :: Type -> Type) a o. Monad m => ConduitT a o m Bool
- nullE :: forall (m :: Type -> Type) mono o. (Monad m, MonoFoldable mono) => ConduitT mono o m Bool
- sum :: forall (m :: Type -> Type) a o. (Monad m, Num a) => ConduitT a o m a
- sumE :: forall (m :: Type -> Type) mono o. (Monad m, MonoFoldable mono, Num (Element mono)) => ConduitT mono o m (Element mono)
- product :: forall (m :: Type -> Type) a o. (Monad m, Num a) => ConduitT a o m a
- productE :: forall (m :: Type -> Type) mono o. (Monad m, MonoFoldable mono, Num (Element mono)) => ConduitT mono o m (Element mono)
- find :: forall (m :: Type -> Type) a o. Monad m => (a -> Bool) -> ConduitT a o m (Maybe a)
- mapM_ :: Monad m => (a -> m ()) -> ConduitT a o m ()
- mapM_E :: (Monad m, MonoFoldable mono) => (Element mono -> m ()) -> ConduitT mono o m ()
- foldM :: Monad m => (a -> b -> m a) -> a -> ConduitT b o m a
- foldME :: (Monad m, MonoFoldable mono) => (a -> Element mono -> m a) -> a -> ConduitT mono o m a
- foldMapM :: (Monad m, Monoid w) => (a -> m w) -> ConduitT a o m w
- foldMapME :: (Monad m, MonoFoldable mono, Monoid w) => (Element mono -> m w) -> ConduitT mono o m w
- sinkFile :: forall (m :: Type -> Type) o. MonadResource m => FilePath -> ConduitT ByteString o m ()
- sinkFileCautious :: forall (m :: Type -> Type) o. MonadResource m => FilePath -> ConduitM ByteString o m ()
- sinkTempFile :: forall (m :: Type -> Type) o. MonadResource m => FilePath -> String -> ConduitM ByteString o m FilePath
- sinkSystemTempFile :: forall (m :: Type -> Type) o. MonadResource m => String -> ConduitM ByteString o m FilePath
- sinkFileBS :: forall (m :: Type -> Type) o. MonadResource m => FilePath -> ConduitT ByteString o m ()
- sinkHandle :: forall (m :: Type -> Type) o. MonadIO m => Handle -> ConduitT ByteString o m ()
- sinkIOHandle :: forall (m :: Type -> Type) o. MonadResource m => IO Handle -> ConduitT ByteString o m ()
- print :: forall a (m :: Type -> Type) o. (Show a, MonadIO m) => ConduitT a o m ()
- stdout :: forall (m :: Type -> Type) o. MonadIO m => ConduitT ByteString o m ()
- stderr :: forall (m :: Type -> Type) o. MonadIO m => ConduitT ByteString o m ()
- withSinkFile :: forall m (n :: Type -> Type) o a. (MonadUnliftIO m, MonadIO n) => FilePath -> (ConduitM ByteString o n () -> m a) -> m a
- withSinkFileBuilder :: forall m (n :: Type -> Type) o a. (MonadUnliftIO m, MonadIO n) => FilePath -> (ConduitM Builder o n () -> m a) -> m a
- withSinkFileCautious :: forall m (n :: Type -> Type) o a. (MonadUnliftIO m, MonadIO n) => FilePath -> (ConduitM ByteString o n () -> m a) -> m a
- sinkHandleBuilder :: forall (m :: Type -> Type) o. MonadIO m => Handle -> ConduitM Builder o m ()
- sinkHandleFlush :: forall (m :: Type -> Type) o. MonadIO m => Handle -> ConduitM (Flush ByteString) o m ()
- map :: forall (m :: Type -> Type) a b. Monad m => (a -> b) -> ConduitT a b m ()
- mapE :: forall (m :: Type -> Type) f a b. (Monad m, Functor f) => (a -> b) -> ConduitT (f a) (f b) m ()
- omapE :: forall (m :: Type -> Type) mono. (Monad m, MonoFunctor mono) => (Element mono -> Element mono) -> ConduitT mono mono m ()
- concatMap :: forall (m :: Type -> Type) mono a. (Monad m, MonoFoldable mono) => (a -> mono) -> ConduitT a (Element mono) m ()
- concatMapE :: forall (m :: Type -> Type) mono w. (