{-# OPTIONS_HADDOCK not-home #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module Data.Conduit.Combinators.Unqualified
(
CC.yieldMany
, unfoldC
, enumFromToC
, iterateC
, repeatC
, replicateC
, CC.sourceLazy
, repeatMC
, repeatWhileMC
, replicateMC
, CC.sourceFile
, CC.sourceFileBS
, CC.sourceHandle
, CC.sourceHandleUnsafe
, CC.sourceIOHandle
, stdinC
, CC.withSourceFile
, CC.sourceDirectory
, CC.sourceDirectoryDeep
, dropC
, dropCE
, dropWhileC
, dropWhileCE
, foldC
, foldCE
, foldlC
, foldlCE
, foldMapC
, foldMapCE
, allC
, allCE
, anyC
, anyCE
, andC
, andCE
, orC
, orCE
, asumC
, elemC
, elemCE
, notElemC
, notElemCE
, CC.sinkLazy
, CC.sinkList
, CC.sinkVector
, CC.sinkVectorN
, CC.sinkLazyBuilder
, CC.sinkNull
, CC.awaitNonNull
, headC
, headDefC
, headCE
, peekC
, peekCE
, lastC
, lastDefC
, lastCE
, lengthC
, lengthCE
, lengthIfC
, lengthIfCE
, maximumC
, maximumCE
, minimumC
, minimumCE
, nullC
, nullCE
, sumC
, sumCE
, productC
, productCE
, findC
, mapM_C
, mapM_CE
, foldMC
, foldMCE
, foldMapMC
, foldMapMCE
, CC.sinkFile
, CC.sinkFileCautious
, CC.sinkTempFile
, CC.sinkSystemTempFile
, CC.sinkFileBS
, CC.sinkHandle
, CC.sinkIOHandle
, printC
, stdoutC
, stderrC
, CC.withSinkFile
, CC.withSinkFileBuilder
, CC.withSinkFileCautious
, CC.sinkHandleBuilder
, CC.sinkHandleFlush
, mapC
, mapCE
, omapCE
, concatMapC
, concatMapCE
, takeC
, takeCE
, takeWhileC
, takeWhileCE
, takeExactlyC
, takeExactlyCE
, concatC
, filterC
, filterCE
, mapWhileC
, conduitVector
, scanlC
, mapAccumWhileC
, concatMapAccumC
, intersperseC
, slidingWindowC
, chunksOfCE
, chunksOfExactlyCE
, mapMC
, mapMCE
, omapMCE
, concatMapMC
, filterMC
, filterMCE
, iterMC
, scanlMC
, mapAccumWhileMC
, concatMapAccumMC
, encodeUtf8C
, decodeUtf8C
, decodeUtf8LenientC
, lineC
, lineAsciiC
, unlinesC
, unlinesAsciiC
, linesUnboundedC
, linesUnboundedAsciiC
, CC.builderToByteString
, CC.unsafeBuilderToByteString
, CC.builderToByteStringWith
, CC.builderToByteStringFlush
, CC.builderToByteStringWithFlush
, CC.BufferAllocStrategy
, CC.allNewBuffersStrategy
, CC.reuseBufferStrategy
, vectorBuilderC
, CC.mapAccumS
, CC.peekForever
, CC.peekForeverE
) where
import qualified Data.Conduit.Combinators as CC
import qualified Data.Traversable
import Control.Applicative (Alternative)
import Control.Monad.IO.Class (MonadIO (..))
import Control.Monad.Primitive (PrimMonad, PrimState)
import Control.Monad.Trans.Resource (MonadThrow)
import Data.Conduit
import Data.Monoid (Monoid (..))
import Data.MonoTraversable
import qualified Data.Sequences as Seq
import qualified Data.Vector.Generic as V
import Prelude (Bool (..), Eq (..), Int,
Maybe (..), Monad (..), Num (..),
Ord (..), Functor (..), Either (..),
Enum, Show, Char)
import Data.Word (Word8)
import Data.ByteString (ByteString)
import Data.Text (Text)
import qualified Data.Sequences as DTE
unfoldC :: Monad m
=> (b -> Maybe (a, b))
-> b
-> ConduitT i a m ()
unfoldC = CC.unfold
{-# INLINE unfoldC #-}
enumFromToC :: (Monad m, Enum a, Ord a) => a -> a -> ConduitT i a m ()
enumFromToC = CC.enumFromTo
{-# INLINE enumFromToC #-}
iterateC :: Monad m => (a -> a) -> a -> ConduitT i a m ()
iterateC = CC.iterate
{-# INLINE iterateC #-}
repeatC :: Monad m => a -> ConduitT i a m ()
repeatC = CC.repeat
{-# INLINE repeatC #-}
replicateC :: Monad m
=> Int
-> a
-> ConduitT i a m ()
replicateC = CC.replicate
{-# INLINE replicateC #-}
repeatMC :: Monad m
=> m a
-> ConduitT i a m ()
repeatMC = CC.repeatM
{-# INLINE repeatMC #-}
repeatWhileMC :: Monad m
=> m a
-> (a -> Bool)
-> ConduitT i a m ()
repeatWhileMC = CC.repeatWhileM
{-# INLINE repeatWhileMC #-}
replicateMC :: Monad m
=> Int
-> m a
-> ConduitT i a m ()
replicateMC = CC.replicateM
{-# INLINE replicateMC #-}
stdinC :: MonadIO m => ConduitT i ByteString m ()
stdinC = CC.stdin
{-# INLINE stdinC #-}
dropC :: Monad m
=> Int
-> ConduitT a o m ()
dropC = CC.drop
{-# INLINE dropC #-}
dropCE :: (Monad m, Seq.IsSequence seq)
=> Seq.Index seq
-> ConduitT seq o m ()
dropCE = CC.dropE
{-# INLINE dropCE #-}
dropWhileC :: Monad m
=> (a -> Bool)
-> ConduitT a o m ()
dropWhileC = CC.dropWhile
{-# INLINE dropWhileC #-}
dropWhileCE :: (Monad m, Seq.IsSequence seq)
=> (Element seq -> Bool)
-> ConduitT seq o m ()
dropWhileCE = CC.dropWhileE
{-# INLINE dropWhileCE #-}
foldC :: (Monad m, Monoid a)
=> ConduitT a o m a
foldC = CC.fold
{-# INLINE foldC #-}
foldCE :: (Monad m, MonoFoldable mono, Monoid (Element mono))
=> ConduitT mono o m (Element mono)
foldCE = CC.foldE
{-# INLINE foldCE #-}
foldlC :: Monad m => (a -> b -> a) -> a -> ConduitT b o m a
foldlC = CC.foldl
{-# INLINE foldlC #-}
foldlCE :: (Monad m, MonoFoldable mono)
=> (a -> Element mono -> a)
-> a
-> ConduitT mono o m a
foldlCE = CC.foldlE
{-# INLINE foldlCE #-}
foldMapC :: (Monad m, Monoid b)
=> (a -> b)
-> ConduitT a o m b
foldMapC = CC.foldMap
{-# INLINE foldMapC #-}
foldMapCE :: (Monad m, MonoFoldable mono, Monoid w)
=> (Element mono -> w)
-> ConduitT mono o m w
foldMapCE = CC.foldMapE
{-# INLINE foldMapCE #-}
allC :: Monad m
=> (a -> Bool)
-> ConduitT a o m Bool
allC = CC.all
{-# INLINE allC #-}
allCE :: (Monad m, MonoFoldable mono)
=> (Element mono -> Bool)
-> ConduitT mono o m Bool
allCE = CC.allE
{-# INLINE allCE #-}
anyC :: Monad m
=> (a -> Bool)
-> ConduitT a o m Bool
anyC = CC.any
{-# INLINE anyC #-}
anyCE :: (Monad m, MonoFoldable mono)
=> (Element mono -> Bool)
-> ConduitT mono o m Bool
anyCE = CC.anyE
{-# INLINE anyCE #-}
andC :: Monad m => ConduitT Bool o m Bool
andC = CC.and
{-# INLINE andC #-}
andCE :: (Monad m, MonoFoldable mono, Element mono ~ Bool)
=> ConduitT mono o m Bool
andCE = CC.andE
{-# INLINE andCE #-}
orC :: Monad m => ConduitT Bool o m Bool
orC = CC.or
{-# INLINE orC #-}
orCE :: (Monad m, MonoFoldable mono, Element mono ~ Bool)
=> ConduitT mono o m Bool
orCE = CC.orE
{-# INLINE orCE #-}
asumC :: (Monad m, Alternative f) => ConduitT (f a) o m (f a)
asumC = CC.asum
elemC :: (Monad m, Eq a) => a -> ConduitT a o m Bool
elemC = CC.elem
{-# INLINE elemC #-}
#if MIN_VERSION_mono_traversable(1,0,0)
elemCE :: (Monad m, Seq.IsSequence seq, Eq (Element seq))
#else
elemCE :: (Monad m, Seq.EqSequence seq)
#endif
=> Element seq
-> ConduitT seq o m Bool
elemCE = CC.elemE
{-# INLINE elemCE #-}
notElemC :: (Monad m, Eq a) => a -> ConduitT a o m Bool
notElemC = CC.notElem
{-# INLINE notElemC #-}
#if MIN_VERSION_mono_traversable(1,0,0)
notElemCE :: (Monad m, Seq.IsSequence seq, Eq (Element seq))
#else
notElemCE :: (Monad m, Seq.EqSequence seq)
#endif
=> Element seq
-> ConduitT seq o m Bool
notElemCE = CC.notElemE
{-# INLINE notElemCE #-}
headC :: Monad m => ConduitT a o m (Maybe a)
headC = CC.head
headDefC :: Monad m => a -> ConduitT a o m a
headDefC = CC.headDef
headCE :: (Monad m, Seq.IsSequence seq) => ConduitT seq o m (Maybe (Element seq))
headCE = CC.headE
{-# INLINE headCE #-}
peekC :: Monad m => ConduitT a o m (Maybe a)
peekC = CC.peek
{-# INLINE peekC #-}
peekCE :: (Monad m, MonoFoldable mono) => ConduitT mono o m (Maybe (Element mono))
peekCE = CC.peekE
{-# INLINE peekCE #-}
lastC :: Monad m => ConduitT a o m (Maybe a)
lastC = CC.last
{-# INLINE lastC #-}
lastDefC :: Monad m => a -> ConduitT a o m a
lastDefC = CC.lastDef
lastCE :: (Monad m, Seq.IsSequence seq) => ConduitT seq o m (Maybe (Element seq))
lastCE = CC.lastE
{-# INLINE lastCE #-}
lengthC :: (Monad m, Num len) => ConduitT a o m len
lengthC = CC.length
{-# INLINE lengthC #-}
lengthCE :: (Monad m, Num len, MonoFoldable mono) => ConduitT mono o m len
lengthCE = CC.lengthE
{-# INLINE lengthCE #-}
lengthIfC :: (Monad m, Num len) => (a -> Bool) -> ConduitT a o m len
lengthIfC = CC.lengthIf
{-# INLINE lengthIfC #-}
lengthIfCE :: (Monad m, Num len, MonoFoldable mono)
=> (Element mono -> Bool) -> ConduitT mono o m len
lengthIfCE = CC.lengthIfE
{-# INLINE lengthIfCE #-}
maximumC :: (Monad m, Ord a) => ConduitT a o m (Maybe a)
maximumC = CC.maximum
{-# INLINE maximumC #-}
#if MIN_VERSION_mono_traversable(1,0,0)
maximumCE :: (Monad m, Seq.IsSequence seq, Ord (Element seq)) => ConduitT seq o m (Maybe (Element seq))
#else
maximumCE :: (Monad m, Seq.OrdSequence seq) => ConduitT seq o m (Maybe (Element seq))
#endif
maximumCE = CC.maximumE
{-# INLINE maximumCE #-}
minimumC :: (Monad m, Ord a) => ConduitT a o m (Maybe a)
minimumC = CC.minimum
{-# INLINE minimumC #-}
#if MIN_VERSION_mono_traversable(1,0,0)
minimumCE :: (Monad m, Seq.IsSequence seq, Ord (Element seq)) => ConduitT seq o m (Maybe (Element seq))
#else
minimumCE :: (Monad m, Seq.OrdSequence seq) => ConduitT seq o m (Maybe (Element seq))
#endif
minimumCE = CC.minimumE
{-# INLINE minimumCE #-}
nullC :: Monad m => ConduitT a o m Bool
nullC = CC.null
{-# INLINE nullC #-}
nullCE :: (Monad m, MonoFoldable mono)
=> ConduitT mono o m Bool
nullCE = CC.nullE
{-# INLINE nullCE #-}
sumC :: (Monad m, Num a) => ConduitT a o m a
sumC = CC.sum
{-# INLINE sumC #-}
sumCE :: (Monad m, MonoFoldable mono, Num (Element mono)) => ConduitT mono o m (Element mono)
sumCE = CC.sumE
{-# INLINE sumCE #-}
productC :: (Monad m, Num a) => ConduitT a o m a
productC = CC.product
{-# INLINE productC #-}
productCE :: (Monad m, MonoFoldable mono, Num (Element mono)) => ConduitT mono o m (Element mono)
productCE = CC.productE
{-# INLINE productCE #-}
findC :: Monad m => (a -> Bool) -> ConduitT a o m (Maybe a)
findC = CC.find
{-# INLINE findC #-}
mapM_C :: Monad m => (a -> m ()) -> ConduitT a o m ()
mapM_C = CC.mapM_
{-# INLINE mapM_C #-}
mapM_CE :: (Monad m, MonoFoldable mono) => (Element mono -> m ()) -> ConduitT mono o m ()
mapM_CE = CC.mapM_E
{-# INLINE mapM_CE #-}
foldMC :: Monad m => (a -> b -> m a) -> a -> ConduitT b o m a
foldMC = CC.foldM
{-# INLINE foldMC #-}
foldMCE :: (Monad m, MonoFoldable mono)
=> (a -> Element mono -> m a)
-> a
-> ConduitT mono o m a
foldMCE = CC.foldME
{-# INLINE foldMCE #-}
foldMapMC :: (Monad m, Monoid w) => (a -> m w) -> ConduitT a o m w
foldMapMC = CC.foldMapM
{-# INLINE foldMapMC #-}
foldMapMCE :: (Monad m, MonoFoldable mono, Monoid w)
=> (Element mono -> m w)
-> ConduitT mono o m w
foldMapMCE = CC.foldMapME
{-# INLINE foldMapMCE #-}
printC :: (Show a, MonadIO m) => ConduitT a o m ()
printC = CC.print
{-# INLINE printC #-}
stdoutC :: MonadIO m => ConduitT ByteString o m ()
stdoutC = CC.stdout
{-# INLINE stdoutC #-}
stderrC :: MonadIO m => ConduitT ByteString o m ()
stderrC = CC.stderr
{-# INLINE stderrC #-}
mapC :: Monad m => (a -> b) -> ConduitT a b m ()
mapC = CC.map
{-# INLINE mapC #-}
mapCE :: (Monad m, Functor f) => (a -> b) -> ConduitT (f a) (f b) m ()
mapCE = CC.mapE
{-# INLINE mapCE #-}
omapCE :: (Monad m, MonoFunctor mono) => (Element mono -> Element mono) -> ConduitT mono mono m ()
omapCE = CC.omapE
{-# INLINE omapCE #-}
concatMapC :: (Monad m, MonoFoldable mono)
=> (a -> mono)
-> ConduitT a (Element mono) m ()
concatMapC = CC.concatMap
{-# INLINE concatMapC #-}
concatMapCE :: (Monad m, MonoFoldable mono, Monoid w)
=> (Element mono -> w)
-> ConduitT mono w m ()
concatMapCE = CC.concatMapE
{-# INLINE concatMapCE #-}
takeC :: Monad m => Int -> ConduitT a a m ()
takeC = CC.take
{-# INLINE takeC #-}
takeCE :: (Monad m, Seq.IsSequence seq)
=> Seq.Index seq
-> ConduitT seq seq m ()
takeCE = CC.takeE
{-# INLINE takeCE #-}
takeWhileC :: Monad m
=> (a -> Bool)
-> ConduitT a a m ()
takeWhileC = CC.takeWhile
{-# INLINE takeWhileC #-}
takeWhileCE :: (Monad m, Seq.IsSequence seq)
=> (Element seq -> Bool)
-> ConduitT seq seq m ()
takeWhileCE = CC.takeWhileE
{-# INLINE takeWhileCE #-}
takeExactlyC :: Monad m
=> Int
-> ConduitT a b m r
-> ConduitT a b m r
takeExactlyC = CC.takeExactly
{-# INLINE takeExactlyC #-}
takeExactlyCE :: (Monad m, Seq.IsSequence a)
=> Seq.Index a
-> ConduitT a b m r
-> ConduitT a b m r
takeExactlyCE = CC.takeExactlyE
{-# INLINE takeExactlyCE #-}
concatC :: (Monad m, MonoFoldable mono)
=> ConduitT mono (Element mono) m ()
concatC = CC.concat
{-# INLINE concatC #-}
filterC :: Monad m => (a -> Bool) -> ConduitT a a m ()
filterC = CC.filter
{-# INLINE filterC #-}
filterCE :: (Seq.IsSequence seq, Monad m) => (Element seq -> Bool) -> ConduitT seq seq m ()
filterCE = CC.filterE
{-# INLINE filterCE #-}
mapWhileC :: Monad m => (a -> Maybe b) -> ConduitT a b m ()
mapWhileC = CC.mapWhile
{-# INLINE mapWhileC #-}
conduitVector :: (V.Vector v a, PrimMonad m)
=> Int
-> ConduitT a (v a) m ()
conduitVector = CC.conduitVector
{-# INLINE conduitVector #-}
scanlC :: Monad m => (a -> b -> a) -> a -> ConduitT b a m ()
scanlC = CC.scanl
{-# INLINE scanlC #-}
mapAccumWhileC :: Monad m =>
(a -> s -> Either s (s, b)) -> s -> ConduitT a b m s
mapAccumWhileC = CC.mapAccumWhile
{-# INLINE mapAccumWhileC #-}
concatMapAccumC :: Monad m => (a -> accum -> (accum, [b])) -> accum -> ConduitT a b m ()
concatMapAccumC = CC.concatMapAccum
{-# INLINE concatMapAccumC #-}
intersperseC :: Monad m => a -> ConduitT a a m ()
intersperseC = CC.intersperse
{-# INLINE intersperseC #-}
slidingWindowC :: (Monad m, Seq.IsSequence seq, Element seq ~ a) => Int -> ConduitT a seq m ()
slidingWindowC = CC.slidingWindow
{-# INLINE slidingWindowC #-}
chunksOfCE :: (Monad m, Seq.IsSequence seq) => Seq.Index seq -> ConduitT seq seq m ()
chunksOfCE = CC.chunksOfE
{-# INLINE chunksOfCE #-}
chunksOfExactlyCE :: (Monad m, Seq.IsSequence seq) => Seq.Index seq -> ConduitT seq seq m ()
chunksOfExactlyCE = CC.chunksOfExactlyE
{-# INLINE chunksOfExactlyCE #-}
mapMC :: Monad m => (a -> m b) -> ConduitT a b m ()
mapMC = CC.mapM
{-# INLINE mapMC #-}
mapMCE :: (Monad m, Data.Traversable.Traversable f) => (a -> m b) -> ConduitT (f a) (f b) m ()
mapMCE = CC.mapME
{-# INLINE mapMCE #-}
omapMCE :: (Monad m, MonoTraversable mono)
=> (Element mono -> m (Element mono))
-> ConduitT mono mono m ()
omapMCE = CC.omapME
{-# INLINE omapMCE #-}
concatMapMC :: (Monad m, MonoFoldable mono)
=> (a -> m mono)
-> ConduitT a (Element mono) m ()
concatMapMC = CC.concatMapM
{-# INLINE concatMapMC #-}
filterMC :: Monad m
=> (a -> m Bool)
-> ConduitT a a m ()
filterMC = CC.filterM
{-# INLINE filterMC #-}
filterMCE :: (Monad m, Seq.IsSequence seq) => (Element seq -> m Bool) -> ConduitT seq seq m ()
filterMCE = CC.filterME
{-# INLINE filterMCE #-}
iterMC :: Monad m => (a -> m ()) -> ConduitT a a m ()
iterMC = CC.iterM
{-# INLINE iterMC #-}
scanlMC :: Monad m => (a -> b -> m a) -> a -> ConduitT b a m ()
scanlMC = CC.scanlM
{-# INLINE scanlMC #-}
mapAccumWhileMC :: Monad m => (a -> s -> m (Either s (s, b))) -> s -> ConduitT a b m s
mapAccumWhileMC = CC.mapAccumWhileM
{-# INLINE mapAccumWhileMC #-}
concatMapAccumMC :: Monad m => (a -> accum -> m (accum, [b])) -> accum -> ConduitT a b m ()
concatMapAccumMC = CC.concatMapAccumM
{-# INLINE concatMapAccumMC #-}
encodeUtf8C :: (Monad m, DTE.Utf8 text binary) => ConduitT text binary m ()
encodeUtf8C = CC.encodeUtf8
{-# INLINE encodeUtf8C #-}
decodeUtf8C :: MonadThrow m => ConduitT ByteString Text m ()
decodeUtf8C = CC.decodeUtf8
{-# INLINE decodeUtf8C #-}
decodeUtf8LenientC :: Monad m => ConduitT ByteString Text m ()
decodeUtf8LenientC = CC.decodeUtf8Lenient
{-# INLINE decodeUtf8LenientC #-}
lineC :: (Monad m, Seq.IsSequence seq, Element seq ~ Char)
=> ConduitT seq o m r
-> ConduitT seq o m r
lineC = CC.line
{-# INLINE lineC #-}
lineAsciiC :: (Monad m, Seq.IsSequence seq, Element seq ~ Word8)
=> ConduitT seq o m r
-> ConduitT seq o m r
lineAsciiC = CC.lineAscii
{-# INLINE lineAsciiC #-}
unlinesC :: (Monad m, Seq.IsSequence seq, Element seq ~ Char) => ConduitT seq seq m ()
unlinesC = CC.unlines
{-# INLINE unlinesC #-}
unlinesAsciiC :: (Monad m, Seq.IsSequence seq, Element seq ~ Word8) => ConduitT seq seq m ()
unlinesAsciiC = CC.unlinesAscii
{-# INLINE unlinesAsciiC #-}
linesUnboundedC :: (Monad m, Seq.IsSequence seq, Element seq ~ Char)
=> ConduitT seq seq m ()
linesUnboundedC = CC.linesUnbounded
{-# INLINE linesUnboundedC #-}
linesUnboundedAsciiC :: (Monad m, Seq.IsSequence seq, Element seq ~ Word8)
=> ConduitT seq seq m ()
linesUnboundedAsciiC = CC.linesUnboundedAscii
{-# INLINE linesUnboundedAsciiC #-}
vectorBuilderC :: (PrimMonad m, V.Vector v e, PrimMonad n, PrimState m ~ PrimState n)
=> Int
-> ((e -> n ()) -> ConduitT i Void m r)
-> ConduitT i (v e) m r
vectorBuilderC = CC.vectorBuilder
{-# INLINE vectorBuilderC #-}