[Haskell-cafe] Vectors, vector spaces and type-level Haskell
stuart.hungerford at gmail.com
Mon Oct 4 03:35:19 UTC 2021
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
Looking at for example this approach:
I get the impression this is likely to need some kind of type-level
construct? e.g. type families or type-level literals?
I haven't started learning yet about Haskell type-level programming so
I thought I'd ask for advice first to see how this could be done
idiomatically in Haskell either with or without type-level concepts.
More information about the Haskell-Cafe