BSD-3-Clause licensed by Emily Pillmore
Maintained by [email protected]
This version can be pinned in stack with:nonempty-vector-0.2.3@sha256:bc3dfb68ce83aa1c4dbe6b37235190827fa256f5c283e078273559a575d1c14e,1517

Module documentation for 0.2.3

Used by 2 packages in nightly-2024-03-01(full list with versions):

Non-empty Vectors

Build Status Hackage

This package presents thin wrappers around mutable and immutable Data.Vector types that enforce non-emptiness. 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.


Revision history for nonempty-vector


  • Support GHC 9.8.x

  • Drop support for GHC<8.10, update CI, bump bounds for primitive.
  • Added partitionWith from vector. (#11) - Thanks @AlistairB!

  • Added consV and snocV primitives for consing a vector to create a nonempty one. (#8) - Thanks @AlistairB!
  • Updated CI and cabal support
  • Expose constructors in new Data.Vector.NonEmpty.Internal module
  • Modules are now marked trustworthy
  • @since annotations have been added.

  • Removed spurious dependency on semigroups

  • Missed a strictness tick in postscanl'

  • INLINE pragma for slice

  • Remove naughty Generic, and Alternative instances as they can construct empty NonEmptyVectors

  • Handwritten Read and Read1 instances with safe cons

  • Added uncons, unsnoc, replicate1, generate1, iterateN1, unsafeCreate, unsafeCreateT, unfoldr1, unfoldr1N, unfoldr1M, unfoldr1NM,

  • Added unsafeFromList, unsafeFromVector, and fromNonEmptyN1

  • Add ifilterM

  • Add doctests for all new functions + many familiar ones

  • Remove MonadFail instance for the sake of backcompat with LTS < 13
  • Drop Cabal version down to 2.0 – 2019-10-20

  • Export toMVector and fromMVector
  • clean up docs – 2019-10-20

  • First version. Released on an unsuspecting world.