
On Tue, 5 Oct 2021, Stuart Hungerford wrote:
On Mon, Oct 4, 2021 at 2:35 PM Stuart Hungerford
wrote: I'd like to model in Haskell two-dimensional vectors that "belong to" or "have an ambient space of" a two dimensional vector space. I'm also ignoring for now the issue of which field the vector space is over. I realize this is not strictly necessary to just start using 2D vectors, but I would like to bring the vector space in as a first class concept.
After much googling and searching Hackage, I found these references useful (note that "vectors" in these references sometimes refer to arrays of fixed length and sometimes to elements of a vector space):
https://mmhaskell.com/machine-learning/dependent-types
https://serokell.io/blog/dimensions-and-haskell-introduction
https://hackage.haskell.org/package/linear-1.20.4/docs/Linear-V2.html
http://mstksg.github.io/hmatrix/Numeric-LinearAlgebra-Static.html
You may also use https://hackage.haskell.org/package/comfort-array with https://hackage.haskell.org/package/comfort-array-0.5.1/docs/Data-Array-Comf... or https://hackage.haskell.org/package/comfort-array-shape-0.0/docs/Data-Array-... and https://hackage.haskell.org/package/lapack But it will be overkill for two-dimensional vectors.