vec: Vec: length-indexed (sized) list
This package provides length-indexed (sized) lists, also known as vectors.
data Vec n a where VNil :: Vec 'Nat.Z a (:::) :: a -> Vec n a -> Vec ('Nat.S n) a
The functions are implemented in three flavours:
naive: with explicit recursion. It's simple, constraint-less, yet slow.
Fin n -> arepresentation, which fuses well, but makes some programs hard to write. And
inline: which exploits how GHC dictionary inlining works, unrolling recursion if the size of
Vecis known statically.
As best approach depends on the application,
vec doesn't do any magic
transformation. Benchmark your code.
This package uses fin, i.e. not
GHC.TypeLits, for indexes.
See Hasochism: the pleasure and pain of dependently typed haskell programming by Sam Lindley and Conor McBride for answers to how and why. Read APLicative Programming with Naperian Functors by Jeremy Gibbons for (not so) different ones.
Vtype, which uses
vectorpackage as backing store.
Vecis a real GADT, but tries to provide as many useful instances (upto
vector-sized Great package using
GHC.TypeLits. Current version (0.6.1.0) uses
sized-vector depends on
vecisn't light on dependencies either, but try to provide wide GHC support.
sized also depends on a
Sized f n atype is generalisation of
clash-prelude is a kitchen sink package, which has
CLaSH.Sized.Vectormodule. Also depends on
|Dependencies||adjunctions (==4.4.*), base (>=4.7 && <4.12), base-compat (>=0.9.3 && <0.11), deepseq (>=126.96.36.199 && <1.5), distributive (>=0.5.3 && <0.7), fin (>=0.0.1 && <0.1), hashable (>=188.8.131.52 && <1.3), lens (>=4.16 && <4.18), semigroupoids (>=5.2.2 && <5.4), semigroups (>=0.18.4 && <0.18.6) [details]|
|Copyright||(c) 2017 Oleg Grenrus|
|Author||Oleg Grenrus <firstname.lastname@example.org>|
|Revised||Revision 2 made by phadej at Thu Jul 5 15:22:54 UTC 2018|
|Source repo||head: git clone https://github.com/phadej/vec.git|
|Uploaded||by phadej at Fri Mar 16 14:07:13 UTC 2018|
|Distributions||LTSHaskell:0.1, NixOS:0.1, Stackage:0.1|
|Downloads||451 total (27 in the last 30 days)|
|Rating||(no votes yet) [estimated by rule of succession]|
|Status||Docs available [build log]
Last success reported on 2018-03-16 [all 1 reports]
Hackage Matrix CI
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'.
For package maintainers and hackage trustees