nonempty-vector: Non-empty vectors

[ bsd3, data, library ] [ Propose Tags ]

Performant, non-empty mutable and immutable vectors


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.0.1.0, 0.0.1.1, 0.1.0.0, 0.2.0.0, 0.2.0.1, 0.2.0.2, 0.2.1.0, 0.2.2.0, 0.2.3
Change log CHANGELOG.md
Dependencies base (>=4.9 && <4.19), deepseq, primitive (>=0.6 && <0.8), vector (>=0.12 && <0.14) [details]
License BSD-3-Clause
Copyright (c) 2019-2020 Emily Pillmore <emilypi@cohomolo.gy>
Author Emily Pillmore
Maintainer emilypi@cohomolo.gy
Revised Revision 2 made by Bodigrim at 2024-04-03T18:28:15Z
Category Data
Home page https://github.com/emilypi/nonempty-vector
Bug tracker https://github.com/emilypi/nonempty-vector/issues
Source repo head: git clone https://github.com/emilypi/nonempty-vector.git
Uploaded by topos at 2020-11-19T19:13:05Z
Distributions LTSHaskell:0.2.3, NixOS:0.2.3, Stackage:0.2.3
Reverse Dependencies 6 direct, 25 indirect [details]
Downloads 13167 total (218 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-11-19 [all 1 reports]

Readme for nonempty-vector-0.2.1.0

[back to package description]

Non-empty Vectors

Build Status Hackage

This package presents thin wrappers around mutable and immutable Data.Vector types. The entire Vector API is supported for both sets of boxed vectors, with future plans to support unboxed, primitive, storable, and generic vectors.

There are no external dependencies that are not already in base.

Motivation

Every "container" in the Haskell ecosystem features a non-empty variant, including the venerable list, aside from vector. Many (including myself) use vector for its incredible performance characteristics achieved over many years by the CLC and authors of the library. But many of us also want to adhere to the principle of least power, and not have to worry about whether head or tail (for example) are safe. This package addresses both of the previous points. No new pointer indirection is exposed by this library except at construction (and even then - unsafe constructors are supplied), with as much reuse of vector's library as possible to make sure asymptotics stay the same.