| CARVIEW |
vector-sized: Size tagged vectors
Downloads
- vector-sized-1.6.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
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 | adjunctions (>=4.3 && <4.5), base (>=4.14 && <5), binary (>=0.8.3.0), comonad (>=4 && <6), deepseq (>=1.1 && <1.6), distributive (>=0.5 && <0.7), finite-typelits (>=0.1), hashable (>=1.2.4.0), indexed-list-literals (>=0.2.0.0), indexed-traversable (>=0.1.2 && <0.2), primitive (>=0.5 && <0.10), vector (>=0.12 && <0.14) [details] |
| Tested with | ghc ==8.10.7 || ==9.0.1 || ==9.2.1 |
| License | BSD-3-Clause |
| Copyright | 2016 Ellie Hermaszewska |
| Author | Ellie Hermaszewska |
| Maintainer | whats.our.vector.victor@monoid.al |
| Uploaded | by koz_ross at 2024-02-07T01:03:45Z |
| Category | Data |
| Home page | https://github.com/expipiplus1/vector-sized#readme |
| Bug tracker | https://github.com/expipiplus1/vector-sized/issues |
| Source repo | head: git clone https://github.com/expipiplus1/vector-sized |
| Distributions | Arch:1.6.1, LTSHaskell:1.6.1, NixOS:1.6.1, Stackage:1.6.1 |
| Reverse Dependencies | 30 direct, 61 indirect [details] |
| Downloads | 26592 total (133 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 2024-02-07 [all 1 reports] |
Readme for vector-sized-1.6.1
[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
functions from vector whose size can be determined ahead of time,
appropriately retyped.
Currently, we provide size-tagged versions of the following:
Data.Vector.Vector, inData.Vector.SizedData.Vector.Generic.Vector, inData.Vector.Generic.SizedData.Vector.Storable.Vector, inData.Vector.Storable.SizedData.Vector.Unboxed.Vector, inData.Vector.Unboxed.Sized
We also provide mutable versions of each of the above. Additionally, we include functions for converting to and from 'unsized' vectors and lists, using CPS-style existentials.
The code in this package is based on the initial work by Ben Gamari in a PR for
vulkan.
How is this different to fixed-vector?
This package is fairly similar to fixed-vector, as both libraries are
designed to provide vectors of statically known length. However, the
implementations used are different, with different tradeoffs. vector-sized
uses a newtype wrapper around vectors from vector, and is thus able to
handle vectors of arbitrary length. However, this approach requires us to carry
a runtime representation of length, which is a significant memory overhead for
small vectors. fixed-vector instead defines all functions as manipulations
of Church-encoded product types of the form ∀r. (a → a → r) → r (for 2D
vectors), allowing it to work for both arbitrary product types (like data V2 a = V2 a a) and opaque length-parameterized vectors. However, as a consequence
of this implementation choice, fixed-vector cannot handle vectors whose size
exceeds tens of elements.