[Haskell-cafe] Multi-param typeclass vs locally constrained typeclass methods

2013-09-18 Thread Jacques Carette
Could someone please explain what the difference (if any!), in semantics is between class Foo f = Bar f g where method1 :: f a - g a and class Bar' g where method2 :: Foo f = f a - g a ? Maybe the translation of the above to something lower level might help. [Note: f a - g a is just

Re: [Haskell-cafe] Multi-param typeclass vs locally constrained typeclass methods

2013-09-18 Thread Roman Cheplyaka
* Jacques Carette care...@mcmaster.ca [2013-09-18 08:21:51-0400] Could someone please explain what the difference (if any!), in semantics is between class Foo f = Bar f g where method1 :: f a - g a and class Bar' g where method2 :: Foo f = f a - g a Bar is more flexible than

Re: [Haskell-cafe] Multi-param typeclass vs locally constrained typeclass methods

2013-09-18 Thread Jacques Carette
On 13-09-18 08:54 AM, Roman Cheplyaka wrote: * Jacques Carette care...@mcmaster.ca [2013-09-18 08:21:51-0400] Could someone please explain what the difference (if any!), in semantics is between class Foo f = Bar f g where method1 :: f a - g a and class Bar' g where method2 :: Foo f = f