
4 Nov
2010
4 Nov
'10
11:02 a.m.
On Thursday 04 November 2010 15:33:09, Jacques Carette wrote:
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?
It's bad for making a type class with a "Scalar" type family (or FunDeps). instance VectorSpace () where type Scalar () = ???
() 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