-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Conduit utilities for vectors -- -- Provides sources and sinks for vectors. @package vector-conduit @version 0.3.0.0 module Data.Conduit.Vector -- | Use an immutable vector as a source. sourceVector :: (Monad m, Vector v a) => v a -> Source m a -- | Use a mutable vector as a source in the ST or IO monad. sourceMVector :: (PrimMonad m, MVector v a) => v (PrimState m) a -> Source m a -- | Consumes all values from the stream and return as an immutable vector. -- Due to the way it operates, it requires the ST monad at the minimum, -- although it can also operate IO. This is due to its dependency on a -- mutable vector. consumeVector :: (PrimMonad m, Vector v a) => Sink a m (v a) -- | Consumes all values from the stream and returns as a mutable vector. consumeMVector :: (PrimMonad m, MVector v a) => Sink a m (v (PrimState m) a) -- | Consumes the first n values from a source and returns as an immutable -- vector. takeVector :: (PrimMonad m, Vector v a) => Int -> Sink a m (v a) -- | Consumes the first n values from the stream and returns as a mutable -- vector. takeMVector :: (PrimMonad m, MVector v a) => Int -> Sink a m (v (PrimState m) a) -- | Conduit which thaws immutable vectors into mutable vectors thawConduit :: (PrimMonad m, Vector v a) => Conduit (v a) m (Mutable v (PrimState m) a) -- | Conduit which freezes mutable vectors into immutable vectors freezeConduit :: (PrimMonad m, Vector v a) => Conduit (Mutable v (PrimState m) a) m (v a)