siki wrote:
I'm not sure if this is possible at all. I'd like to do something like this:

class A a where
    foo :: a -> Double
foo a = 5.0


class (A a) => B a where
    foo a = 7.0

This is currently not possible in Haskell. It's been proposed, though:

http://haskell.org/haskellwiki/Class_system_extension_proposal

If you have an actual example we might be able to come up with a different way of modelling it so that it does what you want, though.

Martijn.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to