vector-buffer-0.1.0.1: A buffer compatible with Data.Vector.Storable

Stabilityprovisional
MaintainerVivian McPhail <haskell.vivian.mcphail@gmail.com>

Data.Vector.Storable.Buffer

Description

A buffer that can be used as a vector

Synopsis

Documentation

data Buffer a Source

newBufferSource

Arguments

:: Storable a 
=> Int

Size

-> IO (Buffer a) 

create a new buffer

pushNextElement :: Storable a => Buffer a -> a -> IO ()Source

add the next element to the buffer

toVector :: Storable a => Buffer a -> Vector aSource

convert to a vector

mapBufferM :: (Storable a, Storable b) => (a -> IO b) -> Buffer a -> IO (Vector b)Source

monadic map over a buffer

mapBufferM_ :: Storable a => (a -> IO b) -> Buffer a -> IO ()Source

monadic map over a buffer