The vector-builder package

[Tags:library, mit, test]

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 <>
      foldMap B.singleton list <>
      B.singleton element


Versions 0.1, 0.1.1, 0.2, 0.3
Dependencies base (>=4.6 && <5), base-prelude (<2), semigroups (>=0.16 && <0.20), vector (==0.11.*) [details]
License MIT
Copyright (c) 2016, Nikita Volkov
Author Nikita Volkov <>
Maintainer Nikita Volkov <>
Stability Unknown
Category Vector
Home page
Bug tracker
Source repository head: git clone git://
Uploaded Wed Oct 26 11:46:22 UTC 2016 by NikitaVolkov
Distributions NixOS:0.3
Downloads 92 total (4 in the last 30 days)
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]




Maintainer's Corner

For package maintainers and hackage trustees