Vectro: Haskell library for "statically typed linear algebra"

The source is here. This is work in progress. It is an extension of GSLHaskell, adding some performance improvements and an interface which guarantees operand conformability through the type system. (GSLHaskell is not needed to use Vectro, a modified version of it is included in the Vectro tarball)

To explain what I mean by "operand conformability": For instance, when two matrices are multiplied, the number of columns of the first should be the same as the number of rows of the second; otherwise the operation is not defined. Such contraints are checked statically in our interface. This means that dimension mismatch errors are caught at compile time rather than runtime. As far as I know, this is the first system to do this.

We have a working paper which is probably the best source for documentation.

There is also an extended abstract which appeared in the proceedings of the ICFP Haskell Workshop '06.

Currently, I am working on extending the interface with sparse vector types which allow low-overhead "views" as nested vectors. For instance, a matrix, which we represent as a tuple-indexed vector, could also be seen as a vector of vectors. (Semantically, the transformation is analogous to currying.) I think that this should be a nice way to work with higher-rank tensors.

Here is an example of the new interface. Please email me if you are interested in a copy of the updated library.