
Right now I explore the possibilities of building the prototype for game physics library in Haskell. This is a purely hobby approach to gain more knowledge on Haskell and library design in general. One of intermediate steps is to build linear algebra library for further utilisation. But, here I face some difficulties. In C++ I could define needed operators on per-type basis, and define universal operators for, say, Vec3 * Mat3x3, Vec3 * Mat3x4, etc. In Haskell I should define different operators, something like `v3mulm3x3`, `v3mulm3x4`. This is somewhat inconvenient, given that I expect to utilize Vec2,3,4 and Mat(3,4)x(3,4) parametrized by Double and Float. So the question is: what other people do in situation like this and is there any paper(s) on linear algebra library design? -- Yours truly, Serguey Zefirov, theszATmail.ru.