[Haskell-cafe] vector-space and standard API for vectors

Jacques Carette carette at mcmaster.ca
Thu Nov 4 10:33:09 EDT 2010


On 02/11/2010 8:16 PM, Conal Elliott wrote:
> > Vector (Complex a) is a vector with respect to both 'a' and 'Complex a'.
>
> Even worse, () is a vector w.r.t. *every* scalar type.

Why is this bad?  () is the canonical 0-dimensional vector space.  
0-dimensional vector spaces are very useful because they allow quite a 
number of linear algebra algorithms to be stated ``inductively'' with no 
funny special cases.

Jacques


More information about the Haskell-Cafe mailing list