vector-sized: Size tagged vectors

[ bsd3, data, library ] [ Propose Tags ]

Please see README.md


[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.1.0.0, 0.2.0.0, 0.3.0.0, 0.3.2.0, 0.3.3.0, 0.4.0.0, 0.4.0.1, 0.4.1.0, 0.5.0.0, 0.5.1.0, 0.6.1.0, 1.0.0.0, 1.0.1.0, 1.0.2.0, 1.0.3.0, 1.0.3.1, 1.0.4.0, 1.1.0.0, 1.1.1.0, 1.2.0.0, 1.2.0.1, 1.4.0.0, 1.4.1.0, 1.4.2, 1.4.3, 1.4.3.1, 1.4.4, 1.5.0, 1.6.1 (info)
Change log changelog.md
Dependencies base (>=4.9 && <4.12), deepseq (>=1.1 && <1.5), finite-typelits (>=0.1), indexed-list-literals (>=0.1.0.1 && <0.2.1), primitive (>=0.5 && <0.7), vector (>=0.11 && <0.13) [details]
License BSD-3-Clause
Copyright 2016 Joe Hermaszewski
Author Joe Hermaszewski
Maintainer whats.our.vector.victor@monoid.al
Revised Revision 2 made by HerbertValerioRiedel at 2019-02-09T17:49:23Z
Category Data
Home page http://github.com/expipiplus1/vector-sized#readme
Source repo head: git clone https://github.com/expipiplus1/vector-sized
Uploaded by jophish at 2018-03-20T17:53:56Z
Distributions Arch:1.6.1, LTSHaskell:1.5.0, NixOS:1.5.0, Stackage:1.6.1
Reverse Dependencies 26 direct, 54 indirect [details]
Downloads 23766 total (171 in the last 30 days)
Rating 2.25 (votes: 2) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-03-20 [all 1 reports]

Readme for vector-sized-1.0.0.0

[back to package description]

Vector Sized

This package exports a newtype tagging the vectors from the vector package with a type level natural representing their size. It also exports a few functions from vector appropriately retyped.

This package is fairly similar to the fixed-vector package. While both provide vectors of statically know length they use completely different implementation with different tradeoffs. vector-sized is a newtype wrapper over vector thus it's able to handle vectors of arbitrary length but have to carry runtime representation of length which is significant memory overhead for small vectors. fixed-vector defines all functions as manipulations of Church-encoded product types (∀r. (a→a→r) → r for 2D vectors) so it can work for both arbitrary product types like data V2 a = V2 a a and opaque length-parametrized vectors provided by library. As consequence of implementation it can't handle vectors larger than tens of elements.

The initial code for this package was written by @bgamari in a PR for vulkan