BSD-3-Clause licensed by Emily Pillmore
Maintained by emilypi@cohomolo.gy

Module documentation for 0.2.0.1

This version can be pinned in stack with:nonempty-vector-0.2.0.1@sha256:332f8d48b5de02c1ab4e52c99973d4ca42dcbce21a073ffd1b5b2da1221e113f,1753

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.

nonempty-vector dependencies

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.

Changes

Revision history for nonempty-vector

0.2.0.1

  • Missed a strictness tick in postscanl'

  • INLINE pragma for slice

0.2.0.0

  • 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

0.1.0.0

  • Remove MonadFail instance for the sake of backcompat with LTS < 13
  • Drop Cabal version down to 2.0

0.0.1.1 – 2019-10-20

  • Export toMVector and fromMVector
  • clean up docs

0.0.1.0 – 2019-10-20

  • First version. Released on an unsuspecting world.
Used by 1 package in nightly-2019-11-29(full list with versions):
comments powered byDisqus