-- 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.2.1.0 module Data.Vector.Conduit -- | Use an immutable vector as a source. sourceVector :: (Resource 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, Resource m, MVector v a) => v (PrimState m) a -> Source m a -- | Consumes all values from the stream and return as an immutable vector. consumeVector :: (PrimMonad m, Resource m, Vector v a) => Sink a m (v a) -- | Consumes the first n values from a source and returns as an immutable -- vector. consumeVectorN :: (PrimMonad m, Resource m, Vector v a) => Int -> Sink a m (v a) -- | Consumes all values from the stream and returns as a mutable vector. consumeMVector :: (PrimMonad m, Resource m, MVector v a) => Sink a m (v (PrimState m) a) -- | Consumes the first n values from the stream and returns as a mutable -- vector. consumeMVectorN :: (PrimMonad m, Resource m, MVector v a) => Int -> Sink a m (v (PrimState m) a) -- | Conduit which thaws immutable vectors into mutable vectors thawConduit :: (PrimMonad m, Resource m, Vector v a) => Conduit (v a) m (Mutable v (PrimState m) a) -- | Conduit which freezes mutable vectors into immutable vectors freezeConduit :: (PrimMonad m, Resource m, Vector v a) => Conduit (Mutable v (PrimState m) a) m (v a)