Sorry in advance if this question is a bit vague. This is the result of some days off.
Thanks to a wonderful system like Haskell, it delightfully expresses the mathematical (especially algebraic) structure as cool classes. I mean, just take a look at numeric-prelude ! But using such a beautiful structure in practice has always seemed difficult to me.
You have a good, type of system, way of expressing that v1both v2are elements of a vector space Vand that are wan element of a vector space w. The type system allows you to write a program that adds v1and v2, but v1and w. Big! But in practice, you can play with potentially hundreds of vector spaces, and you certainly do not want to create types v1, v2..., V100and declare them copies of the vector space typeclass! Or maybe you read some data from the real world, as a result of which symbols appeared a, bandc - you can express that the free vector space above these symbols is really a vector space!
So you're stuck, right? To do many of the things you would like to do with vector spaces in a scientific computational parameter, you must abandon your type system by specifying a typeclass vector space and having functions to perform compatibility checks at run time. Do you have to? Is it possible to use the fact that Haskell is purely functional for writing a program that generates all the types you need and inserts them into a real program? Is there such a technique? By all means indicate if I just miss something basic here (I probably) :-)
Edit: I just discovered fundeps . I will have to think a little about how they relate to my question (commendable comments on this are appreciated).