Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
mutableVectorOutputStream :: MVector v c => IO (OutputStream c, IO (v (PrimState IO) c))io-streams System.IO.Streams.Vector mutableVectorOutputStream returns an OutputStream which stores values fed into it and an action which flushes all stored values to a vector. The flush action resets the store. Note that this function will buffer any input sent to it on the heap. Please don't use this unless you're sure that the amount of input provided is bounded and will fit in memory without issues.
mutableVectorOutputStreamSized :: MVector v c => Int -> IO (OutputStream c, IO (v (PrimState IO) c))io-streams System.IO.Streams.Vector Like mutableVectorOutputStream, but allows control over how large the vector buffer is to start with.
outputToMutableVector :: MVector v a => (OutputStream a -> IO b) -> IO (v (PrimState IO) a)io-streams System.IO.Streams.Vector Given an IO action that requires an OutputStream, creates one and captures all the output the action sends to it as a mutable vector. Example:
ghci> import Control.Applicative ghci> (connect <$> fromList [1, 2, 3::Int]) >>= outputToMutableVector >>= V.freeze fromList [1,2,3]
-
io-streams System.IO.Streams.Vector Like outputToMutableVector, but allows control over how large the vector buffer is to start with.
outputToVector :: Vector v a => (OutputStream a -> IO b) -> IO (v a)io-streams System.IO.Streams.Vector Given an IO action that requires an OutputStream, creates one and captures all the output the action sends to it as a vector. Example:
ghci> ((connect $ fromList [1, 2, 3]) >>= outputToVector) :: IO (Vector Int) fromList [1,2,3]
outputToVectorSized :: Vector v a => Int -> (OutputStream a -> IO b) -> IO (v a)io-streams System.IO.Streams.Vector Like outputToVector, but allows control over how large the vector buffer is to start with.
toMutableVector :: MVector v a => InputStream a -> IO (v (PrimState IO) a)io-streams System.IO.Streams.Vector Drains an InputStream, converting it to a mutable vector. Note that this function reads the entire InputStream strictly into memory and as such is not recommended for streaming applications or where the size of the input is not bounded or known.
toMutableVectorSized :: MVector v a => Int -> InputStream a -> IO (v (PrimState IO) a)io-streams System.IO.Streams.Vector Like toMutableVector, but allows control over how large the vector buffer is to start with.
toVector :: Vector v a => InputStream a -> IO (v a)io-streams System.IO.Streams.Vector Drains an InputStream, converting it to a vector. Note that this function reads the entire InputStream strictly into memory and as such is not recommended for streaming applications or where the size of the input is not bounded or known.
ghci> is <- Streams.fromList [(1::Int)..4] ghci> Streams.toVector is :: IO (V.Vector Int) fromList [1,2,3,4]
toVectorSized :: Vector v a => Int -> InputStream a -> IO (v a)io-streams System.IO.Streams.Vector Like toVector, but allows control over how large the vector buffer is to start with.