[Haskell-cafe] Type-level Programming
syntactically.vincenz at gmail.com
Fri Jun 22 12:32:39 EDT 2007
Recently I was playing around with encoding matrices in the type-level
system. Thereby one can enable the multiplication of matrices. The general
idea (which can be read about at (
is that there is more than one way to multiplly a matrix.
Given two matrices A and B, with M and N dimensions:
a_1*...*a_m and b_1*...*b_n then whenever the last L dimensions of A match
the first L dimensions of B, they can be multiplied to have a matrix of
What one does is a dot-product on those middle L dimensions. This is what I
tried to do in the code in the blogpost. However, I was unable to formulate
the constraints for the final multiplication class that does the actual
Is this at all possible, or was I chasing ghosts?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe