storablevector-0.2.13.1: Fast, packed, strict storable arrays with a list interface like ByteString

Safe HaskellNone
LanguageHaskell98

Data.StorableVector.Lazy.Builder

Description

Build a lazy storable vector by incrementally adding an element. This is analogous to Data.Binary.Builder for Data.ByteString.Lazy.

Attention: This implementation is still almost 3 times slower than constructing a lazy storable vector using unfoldr in our Chorus speed test.

Synopsis

Documentation

data Builder a Source #

Instances
Storable a => Semigroup (Builder a) Source # 
Instance details

Defined in Data.StorableVector.Lazy.Builder

Methods

(<>) :: Builder a -> Builder a -> Builder a #

sconcat :: NonEmpty (Builder a) -> Builder a #

stimes :: Integral b => b -> Builder a -> Builder a #

Storable a => Monoid (Builder a) Source # 
Instance details

Defined in Data.StorableVector.Lazy.Builder

Methods

mempty :: Builder a #

mappend :: Builder a -> Builder a -> Builder a #

mconcat :: [Builder a] -> Builder a #

toLazyStorableVector :: Storable a => ChunkSize -> Builder a -> Vector a Source #

toLazyStorableVector (ChunkSize 7) $ foldMap put ['a'..'z']

put :: Storable a => a -> Builder a Source #

flush :: Storable a => Builder a Source #

Set a laziness break.