MIT licensed and maintained by Nikita Volkov

Module documentation for 0.3.8

This version can be pinned in stack with:vector-builder-0.3.8@sha256:184ed15a76025943ccaf556887cf60bca21359e3ccf4d7735def394ab76b76f1,3531

An API for efficient and convenient construction of vectors. It provides the composable Builder abstraction, which has instances of the Monoid and Semigroup classes.


First you use the Builder abstraction to specify the structure of the vector. Then you execute the builder to actually produce the vector.


The following code shows how you can efficiently concatenate different datastructures into a single immutable vector:

import qualified Data.Vector as A
import qualified VectorBuilder.Builder as B
import qualified VectorBuilder.Vector as C

myVector :: A.Vector a -> [a] -> a -> A.Vector a
myVector vector list element = builder
    builder =
      B.vector vector <>
      B.foldable list <>
      B.singleton element
Used by 3 packages in nightly-2020-09-16(full list with versions):