
Greetings Haskellers, 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. Looking at for example this approach: https://hackage.haskell.org/package/linear-1.21.7/docs/Linear-V2.html, 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. TIA, Stu