HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulenonempty-vector-0.2.4Haskell2010

Data.Vector.NonEmpty.Internal

Internal module exposing the constructors for NonEmptyVector and NonEmptyMVector.

Warning: Since the constructors are exposed here, by using this module, you take on the risks that you break the non-emptiness invariants of the main modules. Use at your own risk.

Contents
  1. Immutable boxed vectors
  2. Mutable boxed vectors
  3. Mutable vector aliases
Synopsis

Immutable boxed vectors

newtypenewtype NonEmptyVector a

NonEmptyVector is a thin wrapper around Vector that witnesses an API requiring non-empty construction, initialization, and generation of non-empty vectors by design.

A newtype wrapper was chosen so that no new pointer indirection is introduced when working with Vectors, and all performance characteristics inherited from the Vector API still apply.

Constructors

Instances18Monad, Functor, Applicative, Foldable, Traversable, MonadZip, …

Mutable boxed vectors

newtypenewtype NonEmptyMVector s a

NonEmptyMVector is a thin wrapper around MVector that witnesses an API requiring non-empty construction, initialization, and generation of non-empty vectors by design.

A newtype wrapper was chosen so that no new pointer indirection is introduced when working with MVectors, and all performance characteristics inherited from the MVector API still apply.

Constructors

Mutable vector aliases