Overloading in a statically typed functional language

I am working on a statically typed functional array language that would benefit greatly from operator overloading. I originally wanted to use something as elegant as type classes, but they don't mesh well with multiple meanings for the same operator (matrix * matrix, matrix * vector, scalar * matrix, etc... multiplication). I've looked at multiparameter type classes (with functional dependencies) but I think that approach would clutter up an already complicated language and create too much cognitive overhead for potential users. I've also looked at Furuse's work with G'Caml, which is thus far the most promising technique I've seen. Unfortunately, the complicated type signatures might be a deal breaker. I'm writing my language with current Matlab users in mind and I don't think they would tolerate deciphering the messy derived generic types that seem to crop up for even simple functions. Can anyone suggest any other mechanisms for implementing operator overloading?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

A couple of approaches

Morrow, previously seem here and here allows some form of overloading using label polymorphism, see the papers for their approaches. Also Carlos Camaraão done some work on overloading, the papers are available on his page. There's a few more pointers but this is all I can remember right now.

Thank you very much.

Thank you very much. Camaraão's System CT is the sort of thing I was hoping to find. Now I just have to read his papers and figure out how overload inference works...